kmkf-work-order-service-component 0.2.2-alpha.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -334,6 +334,14 @@ function ModifyModal(props, ref) {
334
334
  message: '请输入买家昵称'
335
335
  }],
336
336
  children: /*#__PURE__*/_jsx(Input, {})
337
+ }), /*#__PURE__*/_jsx(Form.Item, {
338
+ label: "\u4E70\u5BB6\u6635\u79F0id",
339
+ name: "buyerOpenUid",
340
+ rules: [{
341
+ required: true,
342
+ message: '请输入买家昵称id'
343
+ }],
344
+ children: /*#__PURE__*/_jsx(Input, {})
337
345
  }), /*#__PURE__*/_jsx(Form.Item, {
338
346
  label: "\u8BA2\u5355\u7F16\u53F7",
339
347
  name: "tid",
@@ -1,6 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import BasicComponent from '../../BasicComponent';
3
+ import EBuyerName from '../EBuyerName';
4
+ import EBuyerOpenUid from '../EBuyerOpenUid';
3
5
  declare class EBuyerNick extends BasicComponent {
6
+ buyerNick: EBuyerName;
7
+ buyerOpenUid: EBuyerOpenUid;
4
8
  constructor(options: any);
5
9
  customRules: (config: any) => {
6
10
  validator: (_: any, value: {
@@ -8,7 +12,8 @@ declare class EBuyerNick extends BasicComponent {
8
12
  buyerOpenUid: any;
9
13
  }) => Promise<void>;
10
14
  }[];
11
- render: (value: any, record: any) => JSX.Element;
15
+ render: () => null;
12
16
  editRender: (value: any) => JSX.Element;
17
+ getColumns: () => any;
13
18
  }
14
19
  export default EBuyerNick;
@@ -31,11 +31,13 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
31
31
  * @Author: litian
32
32
  * @Date: 2022-06-30 17:30:05
33
33
  * @LastEditors: litian
34
- * @LastEditTime: 2022-11-30 14:34:16
34
+ * @LastEditTime: 2022-09-20 18:02:16
35
35
  */
36
36
  import React from 'react';
37
37
  import { BuyerNick } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
38
38
  import BasicComponent from "../../BasicComponent";
39
+ import EBuyerName from "../EBuyerName";
40
+ import EBuyerOpenUid from "../EBuyerOpenUid";
39
41
  import { getFormItem } from "../../common/formItemWrap";
40
42
  import { jsx as _jsx } from "react/jsx-runtime";
41
43
 
@@ -53,6 +55,10 @@ var EBuyerNick = /*#__PURE__*/function (_BasicComponent) {
53
55
 
54
56
  _this = _super.call(this, options);
55
57
 
58
+ _defineProperty(_assertThisInitialized(_this), "buyerNick", void 0);
59
+
60
+ _defineProperty(_assertThisInitialized(_this), "buyerOpenUid", void 0);
61
+
56
62
  _defineProperty(_assertThisInitialized(_this), "customRules", function (config) {
57
63
  return [{
58
64
  validator: function validator(_, value) {
@@ -60,30 +66,53 @@ var EBuyerNick = /*#__PURE__*/function (_BasicComponent) {
60
66
  return Promise.reject(new Error('请输入买家旺旺'));
61
67
  }
62
68
 
69
+ var _this$componentConfig = _this.componentConfig,
70
+ shopList = _this$componentConfig.shopList,
71
+ shopId = _this$componentConfig.shopId;
72
+ var isTaoBao = shopList.some(function (item) {
73
+ return item.shopId === shopId && item.shopSourceStr === 'TAOBAO';
74
+ });
75
+
76
+ if (isTaoBao && !(value !== null && value !== void 0 && value.buyerOpenUid)) {
77
+ return Promise.reject(new Error('请输入买家旺旺id'));
78
+ }
79
+
63
80
  return Promise.resolve();
64
81
  }
65
82
  }];
66
83
  });
67
84
 
68
- _defineProperty(_assertThisInitialized(_this), "render", function (value, record) {
69
- return /*#__PURE__*/_jsx("span", {
70
- children: value === null || value === void 0 ? void 0 : value.buyerNick
71
- });
85
+ _defineProperty(_assertThisInitialized(_this), "render", function () {
86
+ return null;
72
87
  });
73
88
 
74
89
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
75
- var _this$componentConfig, _this$componentConfig2;
90
+ var _this$componentConfig2, _this$componentConfig3;
76
91
 
77
92
  return getFormItem(_objectSpread({
78
93
  title: _this.name,
79
94
  name: _this.id,
80
- rules: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? _this.customRules(_this.componentConfig) : [],
81
- required: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required,
95
+ rules: (_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? _this.customRules(_this.componentConfig) : [],
96
+ required: (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required,
82
97
  component: /*#__PURE__*/_jsx(BuyerNick, _objectSpread({}, _this.componentConfig))
83
98
  }, value));
84
99
  });
85
100
 
86
- _this.canFilter = true;
101
+ _defineProperty(_assertThisInitialized(_this), "getColumns", function () {
102
+ return {
103
+ title: _this.name,
104
+ children: [_this.buyerNick.getColumns(), _this.buyerOpenUid.getColumns()],
105
+ canHidden: _this.canHidden,
106
+ dataIndex: _this.id
107
+ };
108
+ });
109
+
110
+ _this.buyerNick = new EBuyerName(_objectSpread(_objectSpread({}, options), {}, {
111
+ name: '买家旺旺'
112
+ }));
113
+ _this.buyerOpenUid = new EBuyerOpenUid(_objectSpread(_objectSpread({}, options), {}, {
114
+ name: '买家旺旺id'
115
+ }));
87
116
  _this.canHidden = true;
88
117
  _this.effects = options.effects;
89
118
  _this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
@@ -4,6 +4,7 @@ import AlipayNick from './AlipayNick';
4
4
  import PaymentStatus from './PaymentStatus';
5
5
  import PaymentAmount from './PaymentAmount';
6
6
  import BuyerNick from './BuyerNick';
7
+ import BuyerOpenUid from './BuyerOpenUid';
7
8
  import PaymentTid from './PaymentTid';
8
9
  import AlipayNo from './AlipayNo';
9
10
  import PayTime from './PayTime';
@@ -12,6 +13,7 @@ declare class Payment extends BasicComponent {
12
13
  paymentStatus: PaymentStatus;
13
14
  paymentAmount: PaymentAmount;
14
15
  buyerNick: BuyerNick;
16
+ buyerOpenUid: BuyerOpenUid;
15
17
  paymentTid: PaymentTid;
16
18
  alipayNo: AlipayNo;
17
19
  payTime: PayTime;
@@ -40,6 +40,7 @@ import AlipayNick from "./AlipayNick";
40
40
  import PaymentStatus from "./PaymentStatus";
41
41
  import PaymentAmount from "./PaymentAmount";
42
42
  import BuyerNick from "./BuyerNick";
43
+ import BuyerOpenUid from "./BuyerOpenUid";
43
44
  import PaymentTid from "./PaymentTid";
44
45
  import AlipayNo from "./AlipayNo";
45
46
  import PayTime from "./PayTime";
@@ -68,6 +69,8 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
68
69
 
69
70
  _defineProperty(_assertThisInitialized(_this), "buyerNick", void 0);
70
71
 
72
+ _defineProperty(_assertThisInitialized(_this), "buyerOpenUid", void 0);
73
+
71
74
  _defineProperty(_assertThisInitialized(_this), "paymentTid", void 0);
72
75
 
73
76
  _defineProperty(_assertThisInitialized(_this), "alipayNo", void 0);
@@ -89,6 +92,17 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
89
92
  return Promise.reject(new Error('请输入买家昵称'));
90
93
  }
91
94
 
95
+ var _this$componentConfig = _this.componentConfig,
96
+ shopList = _this$componentConfig.shopList,
97
+ shopId = _this$componentConfig.shopId;
98
+ var isTaoBao = shopList.some(function (item) {
99
+ return item.shopId === shopId && item.shopSourceStr === 'TAOBAO';
100
+ });
101
+
102
+ if (config.required && isTaoBao && !(value !== null && value !== void 0 && value.enterprisePaymentBuyerOpenUid)) {
103
+ return Promise.reject(new Error('请输入买家昵称id'));
104
+ }
105
+
92
106
  if (config.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
93
107
  return Promise.reject(new Error('请输入订单编号'));
94
108
  } else if (value.enterprisePaymentTid && !/^[0-9a-zA-Z_-]{1,}$/.test(value.enterprisePaymentTid)) {
@@ -115,13 +129,13 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
115
129
  });
116
130
 
117
131
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
118
- var _this$componentConfig;
132
+ var _this$componentConfig2;
119
133
 
120
134
  return getFormItem(_objectSpread({
121
135
  title: _this.name,
122
136
  name: _this.id,
123
137
  rules: _this.customRules(_this.componentConfig),
124
- required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
138
+ required: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required,
125
139
  component: /*#__PURE__*/_jsx(ApaasPayment, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
126
140
  onSearch: function onSearch(e) {
127
141
  return _this.changeHandle(e.target.value);
@@ -133,8 +147,7 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
133
147
  _defineProperty(_assertThisInitialized(_this), "getColumns", function () {
134
148
  return {
135
149
  title: _this.name,
136
- children: [_this.paymentTid.getColumns(), _this.paymentStatus.getColumns(), _this.paymentAmount.getColumns(), _this.buyerNick.getColumns(), // this.buyerOpenUid.getColumns(),
137
- _this.alipayNick.getColumns(), _this.alipayNo.getColumns(), _this.payTime.getColumns()],
150
+ children: [_this.paymentTid.getColumns(), _this.paymentStatus.getColumns(), _this.paymentAmount.getColumns(), _this.buyerNick.getColumns(), _this.buyerOpenUid.getColumns(), _this.alipayNick.getColumns(), _this.alipayNo.getColumns(), _this.payTime.getColumns()],
138
151
  canHidden: _this.canHidden,
139
152
  dataIndex: _this.id
140
153
  };
@@ -149,6 +162,9 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
149
162
  _this.buyerNick = new BuyerNick(_objectSpread(_objectSpread({}, options), {}, {
150
163
  name: '买家昵称'
151
164
  }));
165
+ _this.buyerOpenUid = new BuyerOpenUid(_objectSpread(_objectSpread({}, options), {}, {
166
+ name: '买家昵称id'
167
+ }));
152
168
  _this.paymentTid = new PaymentTid(_objectSpread(_objectSpread({}, options), {}, {
153
169
  name: '订单编号'
154
170
  }));
@@ -148,7 +148,7 @@
148
148
  }
149
149
 
150
150
  .custom_box_main_ks {
151
- height: calc(100vh - 482px); // TODO: ks顶部多144px
151
+ height: calc(100vh - 538px); // TODO: ks顶部多144px
152
152
  }
153
153
 
154
154
  .custom_box_main_empty {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmkf-work-order-service-component",
3
- "version": "0.2.2-alpha.1",
3
+ "version": "0.2.2",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@ant-design/icons": "^4.7.0",
42
- "@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.28-alpha.1",
42
+ "@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.27-alpha.1",
43
43
  "@reduxjs/toolkit": "^1.8.5",
44
44
  "js-md5": "^0.7.3",
45
45
  "react-redux": "^7.2.8",