@kmkf-fe-packages/services-components 0.27.1-test.11 → 0.27.1-test.12

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.
@@ -47,7 +47,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
47
47
  _typeMap$_options$typ5,
48
48
  _typeMap$_options$typ6,
49
49
  _this$componentConfig3,
50
- _this$componentConfig4;
50
+ _this$componentConfig5;
51
51
  _classCallCheck(this, BsLogistics);
52
52
  _defineProperty(this, "name", void 0);
53
53
  _defineProperty(this, "id", void 0);
@@ -74,7 +74,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
74
74
  value: /*#__PURE__*/React.createElement(JstGoodImage, {
75
75
  list: record === null || record === void 0 ? void 0 : record[_this.id],
76
76
  type: 1,
77
- componentType: _this.type
77
+ platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
78
78
  })
79
79
  }) : null;
80
80
  });
@@ -122,7 +122,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
122
122
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
123
123
  list: list,
124
124
  type: 1,
125
- componentType: _this.type
125
+ platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
126
126
  }));
127
127
  });
128
128
  _defineProperty(this, "renderLog", function (r) {
@@ -149,7 +149,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
149
149
  required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
150
150
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
151
151
  type: 1,
152
- componentType: _this.type,
152
+ platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default',
153
153
  options: _this.expressDateInstance.getExpressData(),
154
154
  onChange: p === null || p === void 0 ? void 0 : p.onChange
155
155
  }))
@@ -175,7 +175,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
175
175
  name: "物流公司",
176
176
  parentName: this.name,
177
177
  id: "".concat(_options.id, "_").concat((_typeMap$_options$typ3 = typeMap[_options.type]) === null || _typeMap$_options$typ3 === void 0 ? void 0 : _typeMap$_options$typ3.key, "_").concat((_typeMap$_options$typ4 = typeMap[_options.type]) === null || _typeMap$_options$typ4 === void 0 ? void 0 : _typeMap$_options$typ4.company),
178
- width: 200
178
+ width: 200,
179
+ platformType: this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
179
180
  }));
180
181
  this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, _options), {}, {
181
182
  name: "物流单号",
@@ -188,7 +189,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
188
189
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
189
190
  required: true,
190
191
  validator: function validator(_, value) {
191
- var showField = _this.componentConfig.showField;
192
+ var _this$componentConfig4;
193
+ var showField = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField;
192
194
  var hasNo = (value || []).some(function (item) {
193
195
  if (showField === "logisticsCompany") {
194
196
  return item.logisticsCompany;
@@ -205,6 +207,6 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
205
207
  }
206
208
  }] : [];
207
209
  this.expressDateInstance = ExpressData.getInstance(this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default');
208
- this.sortChildField = this.getSortChildFields(((_this$componentConfig4 = this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) || "", _options);
210
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) || "", _options);
209
211
  });
210
212
  export default BsLogistics;
@@ -18,7 +18,8 @@ var componentType = {
18
18
  BS_EXCHANGE_GOODS: 'bsExchangeType',
19
19
  BS_REISSUE_GOODS: 'bsReissueType',
20
20
  BS_RETURN_GOODS: 'bsReturnType',
21
- WDT_REISSUE_GOODS: 'wdtReissueType'
21
+ WDT_REISSUE_GOODS: 'wdtReissueType',
22
+ WDT_RETURN_GOODS: 'wdtReturnType'
22
23
  };
23
24
  var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
24
25
  var _this = this;
@@ -19,7 +19,8 @@ var componentType = {
19
19
  BS_EXCHANGE_GOODS: 'bsExchangeType',
20
20
  BS_REISSUE_GOODS: 'bsReissueType',
21
21
  BS_RETURN_GOODS: 'bsReturnType',
22
- WDT_REISSUE_GOODS: 'wdtReissueType'
22
+ WDT_REISSUE_GOODS: 'wdtReissueType',
23
+ WDT_RETURN_GOODS: 'wdtReturnType'
23
24
  };
24
25
  var BsType = /*#__PURE__*/_createClass(function BsType(options) {
25
26
  var _this = this;
@@ -18,7 +18,10 @@ declare class Express implements ComponentInterface {
18
18
  dataType: ComponentInterface["dataType"];
19
19
  options: ComponentInterface["options"];
20
20
  parentName: string;
21
- constructor(options: PickOption);
21
+ platformType?: string;
22
+ constructor(options: PickOption & {
23
+ platformType: string;
24
+ });
22
25
  renderClient: () => null;
23
26
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
24
27
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -46,6 +46,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
46
46
  _defineProperty(this, "dataType", void 0);
47
47
  _defineProperty(this, "options", void 0);
48
48
  _defineProperty(this, "parentName", void 0);
49
+ _defineProperty(this, "platformType", void 0);
49
50
  _defineProperty(this, "renderClient", function () {
50
51
  return null;
51
52
  });
@@ -62,7 +63,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
62
63
  return /*#__PURE__*/React.createElement(BsExpressRender, {
63
64
  list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)],
64
65
  showField: "company",
65
- componentType: _this.type
66
+ platformType: _this.platformType
66
67
  });
67
68
  });
68
69
  _defineProperty(this, "renderLog", function (r) {
@@ -109,7 +110,8 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
109
110
  this.componentConfig = options.componentConfig;
110
111
  this.rules = [];
111
112
  this.align = "left";
112
- this.expressDateInstance = ExpressData.getInstance(options.type === 'WDT_LOGISTICS' ? 'wdt' : 'default');
113
+ this.platformType = options.platformType;
114
+ this.expressDateInstance = ExpressData.getInstance(this.platformType);
113
115
  this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
114
116
  this.isCombinationComponent = false;
115
117
  this.canSort = false;
@@ -15,8 +15,8 @@ export declare const showImage: ({ item, type, index, showHeader, }: {
15
15
  }) => React.JSX.Element;
16
16
  export declare const ShowTotalImage: ({ total, allImage, type, showHeader, }: any) => React.JSX.Element;
17
17
  export declare const GoodImage: ({ list, type, showHeader }: any) => React.JSX.Element | null;
18
- export declare const JstGoodImage: ({ list, type, componentType }: any) => any;
19
- export declare const BsExpressRender: ({ list, showField, componentType }: any) => any;
18
+ export declare const JstGoodImage: ({ list, type, platformType }: any) => any;
19
+ export declare const BsExpressRender: ({ list, showField, platformType }: any) => any;
20
20
  export declare const CommonOrderContent: ({ list, valueKey, failValue, options, }: any) => any;
21
21
  export declare const BsGoodImage: ({ item, index }: {
22
22
  item: any;
@@ -256,11 +256,11 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
256
256
  var _ref6$list = _ref6.list,
257
257
  list = _ref6$list === void 0 ? [] : _ref6$list,
258
258
  type = _ref6.type,
259
- _ref6$componentType = _ref6.componentType,
260
- componentType = _ref6$componentType === void 0 ? '' : _ref6$componentType;
259
+ _ref6$platformType = _ref6.platformType,
260
+ platformType = _ref6$platformType === void 0 ? 'default' : _ref6$platformType;
261
261
  return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
262
262
  var logisticsCompany = item.logisticsCompany;
263
- var company = ExpressData.getInstance(componentType === 'WDT_LOGISTICS' ? 'wdt' : 'default').getExpressNameByCode(logisticsCompany);
263
+ var company = ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany);
264
264
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
265
265
  content: content(item, index),
266
266
  overlayStyle: {
@@ -276,7 +276,7 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
276
276
  text: item.logisticsCode
277
277
  })) : company ? company : item.logisticsCode ? /*#__PURE__*/React.createElement(CopyText, {
278
278
  text: item.logisticsCode
279
- }) : null) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join('/') : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, componentType === 'WDT_SEND_GOOD' ? WdtSendData.getInstance().getWdtSendNameByCode(item.sendName) : item.sendName].join("/") : item.sendId ? item.sendId : componentType === 'WDT_SEND_GOOD' ? WdtSendData.getInstance().getWdtSendNameByCode(item.sendName) : item.sendName) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || '') : null));
279
+ }) : null) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join('/') : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, platformType === 'wdt' ? WdtSendData.getInstance().getWdtSendNameByCode(item.sendName) : item.sendName].join("/") : item.sendId ? item.sendId : platformType === 'wdt' ? WdtSendData.getInstance().getWdtSendNameByCode(item.sendName) : item.sendName) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || '') : null));
280
280
  }) : null;
281
281
  };
282
282
  export var BsExpressRender = function BsExpressRender(_ref7) {
@@ -284,11 +284,11 @@ export var BsExpressRender = function BsExpressRender(_ref7) {
284
284
  list = _ref7$list === void 0 ? [] : _ref7$list,
285
285
  _ref7$showField = _ref7.showField,
286
286
  showField = _ref7$showField === void 0 ? "" : _ref7$showField,
287
- _ref7$componentType = _ref7.componentType,
288
- componentType = _ref7$componentType === void 0 ? "" : _ref7$componentType;
287
+ _ref7$platformType = _ref7.platformType,
288
+ platformType = _ref7$platformType === void 0 ? "default" : _ref7$platformType;
289
289
  return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
290
290
  var logisticsCompany = item.logisticsCompany;
291
- var company = ExpressData.getInstance(componentType === 'WDT_LOGISTICS' ? 'wdt' : 'default').getExpressNameByCode(logisticsCompany);
291
+ var company = ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany);
292
292
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
293
293
  content: content(item, index),
294
294
  overlayStyle: {
@@ -104,6 +104,174 @@ var GoodHeaderMap = {
104
104
  giftType: "赠品方式"
105
105
  },
106
106
  moneyKey: "orderPrice"
107
+ },
108
+ "WDT_RETURN_GOODS": {
109
+ headerMap: {
110
+ goodId: {
111
+ component: BsHeaderChild,
112
+ name: "SPUID",
113
+ key: "goodId",
114
+ width: 140
115
+ },
116
+ goodNo: {
117
+ component: BsHeaderChild,
118
+ name: "商品SPU编码",
119
+ key: "goodNo",
120
+ width: 180
121
+ },
122
+ goodName: {
123
+ component: BsHeaderChild,
124
+ name: "商品名称",
125
+ key: "goodName",
126
+ width: 100
127
+ },
128
+ specId: {
129
+ component: BsHeaderChild,
130
+ name: "SKUID",
131
+ key: "specId",
132
+ width: 200
133
+ },
134
+ specNo: {
135
+ component: BsHeaderChild,
136
+ name: "商品SKU编码",
137
+ key: "specNo",
138
+ width: 180
139
+ },
140
+ specName: {
141
+ component: BsHeaderChild,
142
+ name: "商品SKU名称",
143
+ key: "specName",
144
+ width: 140
145
+ },
146
+ num: {
147
+ component: BsHeaderChild,
148
+ name: "退货数量",
149
+ key: "num",
150
+ width: 100
151
+ },
152
+ sharePrice: {
153
+ component: BsHeaderChild,
154
+ name: "分摊价",
155
+ key: "sharePrice",
156
+ width: 120
157
+ },
158
+ returnPrice: {
159
+ component: BsHeaderChild,
160
+ name: "退款金额",
161
+ key: "returnPrice",
162
+ width: 120
163
+ },
164
+ giftType: {
165
+ component: BsHeaderChild,
166
+ name: "赠品方式",
167
+ key: "giftType",
168
+ width: 150
169
+ },
170
+ productType: {
171
+ component: BsHeaderChild,
172
+ name: "商品类型",
173
+ key: "productType",
174
+ width: 100
175
+ }
176
+ },
177
+ itemKey: {
178
+ goodId: "SPUID",
179
+ goodNo: "商品SPU编码",
180
+ goodName: "商品名称",
181
+ specId: "SKUID",
182
+ specNo: "商品SKU编码",
183
+ specName: "商品SKU名称",
184
+ num: "退货数量",
185
+ sharePrice: "分摊价",
186
+ returnPrice: "退款金额",
187
+ giftType: "赠品方式",
188
+ productType: "商品类型"
189
+ },
190
+ moneyKey: "returnPrice"
191
+ },
192
+ "WDT_EXCHANGE_GOODS": {
193
+ headerMap: {
194
+ goodId: {
195
+ component: BsHeaderChild,
196
+ name: "SPUID",
197
+ key: "goodId",
198
+ width: 140
199
+ },
200
+ goodNo: {
201
+ component: BsHeaderChild,
202
+ name: "商品SPU编码",
203
+ key: "goodNo",
204
+ width: 180
205
+ },
206
+ goodName: {
207
+ component: BsHeaderChild,
208
+ name: "商品名称",
209
+ key: "goodName",
210
+ width: 100
211
+ },
212
+ specId: {
213
+ component: BsHeaderChild,
214
+ name: "SKUID",
215
+ key: "specId",
216
+ width: 200
217
+ },
218
+ specNo: {
219
+ component: BsHeaderChild,
220
+ name: "商品SKU编码",
221
+ key: "specNo",
222
+ width: 180
223
+ },
224
+ specName: {
225
+ component: BsHeaderChild,
226
+ name: "商品SKU名称",
227
+ key: "specName",
228
+ width: 140
229
+ },
230
+ num: {
231
+ component: BsHeaderChild,
232
+ name: "换出数量",
233
+ key: "num",
234
+ width: 100
235
+ },
236
+ productPrice: {
237
+ component: BsHeaderChild,
238
+ name: "商品单价",
239
+ key: "productPrice",
240
+ width: 120
241
+ },
242
+ exchangePrice: {
243
+ component: BsHeaderChild,
244
+ name: "换出金额",
245
+ key: "exchangePrice",
246
+ width: 120
247
+ },
248
+ productType: {
249
+ component: BsHeaderChild,
250
+ name: "商品类型",
251
+ key: "productType",
252
+ width: 100
253
+ },
254
+ giftType: {
255
+ component: BsHeaderChild,
256
+ name: "赠品方式",
257
+ key: "giftType",
258
+ width: 150
259
+ }
260
+ },
261
+ itemKey: {
262
+ goodId: "SPUID",
263
+ goodNo: "商品SPU编码",
264
+ goodName: "商品名称",
265
+ specId: "SKUID",
266
+ specNo: "商品SKU编码",
267
+ specName: "商品SKU名称",
268
+ num: "换出数量",
269
+ productPrice: "商品单价",
270
+ exchangePrice: "换出金额",
271
+ productType: "商品类型",
272
+ giftType: "赠品方式"
273
+ },
274
+ moneyKey: "exchangePrice"
107
275
  }
108
276
  };
109
277
  GoodHeaderMap['WDT_REISSUE_GOODS'] = GoodHeaderMap['WDT_GOODS'];
@@ -33,8 +33,9 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
33
33
  var _this = this,
34
34
  _typeMap$_options$typ,
35
35
  _typeMap$_options$typ2,
36
- _this$componentConfig3,
37
- _this$componentConfig4;
36
+ _this$componentConfig6,
37
+ _this$componentConfig7,
38
+ _this$componentConfig8;
38
39
  _classCallCheck(this, JstLogistics);
39
40
  _defineProperty(this, "name", void 0);
40
41
  _defineProperty(this, "id", void 0);
@@ -84,6 +85,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
84
85
  return [];
85
86
  });
86
87
  _defineProperty(this, "renderClient", function (record) {
88
+ var _this$componentConfig;
87
89
  var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
88
90
  return !isNull(item);
89
91
  }) : false;
@@ -92,12 +94,13 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
92
94
  label: _this.name,
93
95
  value: /*#__PURE__*/React.createElement(JstGoodImage, {
94
96
  list: record === null || record === void 0 ? void 0 : record[_this.id],
95
- type: 1
97
+ type: 1,
98
+ platformType: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.logistics
96
99
  })
97
100
  }) : null;
98
101
  });
99
102
  _defineProperty(this, "renderPc", function (value, record) {
100
- var _typeMap$_this$type;
103
+ var _typeMap$_this$type, _this$componentConfig2;
101
104
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)];
102
105
  //兼容多个商品
103
106
  return /*#__PURE__*/React.createElement("span", {
@@ -106,7 +109,8 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
106
109
  }
107
110
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
108
111
  list: list,
109
- type: 1
112
+ type: 1,
113
+ platformType: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.logistics
110
114
  }));
111
115
  });
112
116
  _defineProperty(this, "renderLog", function (r) {
@@ -127,17 +131,18 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
127
131
  }).join(",");
128
132
  });
129
133
  _defineProperty(this, "editRender", function (p) {
130
- var _this$componentConfig, _this$componentConfig2;
134
+ var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
131
135
  return /*#__PURE__*/React.createElement(GetFormItem, {
132
136
  title: _this.name,
133
137
  name: _this.id,
134
138
  rules: _this.rules,
135
139
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
136
140
  display: p === null || p === void 0 ? void 0 : p.display,
137
- required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
141
+ required: (_this$componentConfig3 = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.required) !== null && _this$componentConfig3 !== void 0 ? _this$componentConfig3 : false,
138
142
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
139
143
  type: 1,
140
- options: _this.expressDateInstance.getExpressData()
144
+ options: _this.expressDateInstance.getExpressData(),
145
+ platformType: (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.logistics
141
146
  }))
142
147
  });
143
148
  });
@@ -199,7 +204,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
199
204
  this.canSort = false;
200
205
  this.children = [];
201
206
  this.dataType = "object";
202
- this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
207
+ this.rules = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
203
208
  required: true,
204
209
  validator: function validator(_, value) {
205
210
  var hasNo = (value || []).some(function (item) {
@@ -212,7 +217,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
212
217
  }
213
218
  }] : [];
214
219
  this.align = "left";
215
- this.expressDateInstance = ExpressData.getInstance();
216
- this.sortChildField = this.getSortChildFields(((_this$componentConfig4 = this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) || "", _options);
220
+ this.expressDateInstance = ExpressData.getInstance((_this$componentConfig7 = this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.logistics);
221
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.showField) || "", _options);
217
222
  });
218
223
  export default JstLogistics;
@@ -101,7 +101,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
101
101
  value: /*#__PURE__*/React.createElement(JstGoodImage, {
102
102
  list: record === null || record === void 0 ? void 0 : record[_this.id],
103
103
  type: 3,
104
- componentType: _this.type
104
+ platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
105
105
  })
106
106
  }) : null;
107
107
  });
@@ -116,7 +116,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
116
116
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
117
117
  list: list,
118
118
  type: 3,
119
- componentType: _this.type
119
+ platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
120
120
  }));
121
121
  });
122
122
  _defineProperty(this, "renderLog", function (r) {
@@ -146,7 +146,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
146
146
  display: p === null || p === void 0 ? void 0 : p.display,
147
147
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
148
148
  type: 3,
149
- componentType: _this.type
149
+ platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
150
150
  }))
151
151
  });
152
152
  });
@@ -0,0 +1,35 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
+ import React from "react";
3
+ import CommonHeaderGoods from "../../CommonHeaderGood";
4
+ declare class BsExchange implements ComponentInterface {
5
+ name: string;
6
+ id: string;
7
+ sortField: string;
8
+ type: string;
9
+ rules: any[];
10
+ componentConfig: ComponentInterface["componentConfig"];
11
+ effects: ComponentInterface["effects"];
12
+ isCombinationComponent: boolean;
13
+ formField: string;
14
+ canSort: boolean;
15
+ children: ComponentInterface[];
16
+ dataType: ComponentInterface["dataType"];
17
+ returnGoods: CommonHeaderGoods;
18
+ constructor(options: PickOption);
19
+ renderClient: (record: any) => React.JSX.Element | null;
20
+ renderPc: () => null;
21
+ renderLog: (r: Record) => React.JSX.Element;
22
+ getComponentValue: (r: Record) => {
23
+ wdtExchangeGoods: any;
24
+ };
25
+ renderExport: (value: any, record: any) => null;
26
+ editRender: (p: any) => React.JSX.Element;
27
+ filterConfig: (item: ColumnConfig) => {
28
+ searchDefaultConditions: "like";
29
+ type: string;
30
+ id: string;
31
+ name: string;
32
+ filterComponentType: "Input";
33
+ }[];
34
+ }
35
+ export default BsExchange;
@@ -0,0 +1,181 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
6
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
+ import React from "react";
12
+ import GetFormItem from "../../GetFormItem";
13
+ import { BsGoodsTable } from "../../Common";
14
+ import ItemView from "../../../commonComponents/ItemView";
15
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { SYMBOL } from "../../../constant";
17
+ // import { BsType, BsMemo } from "../../Bs/common";
18
+ import { CommonExchangeGoods } from "@kmkf-fe-packages/basic-components";
19
+ import CommonHeaderGoods from "../../CommonHeaderGood";
20
+ var BsExchange = /*#__PURE__*/_createClass(
21
+ // wdtType: BsType;
22
+ // wdtMemo: BsMemo;
23
+
24
+ // swapOutGoods: BsHeaderGood;
25
+ // giftGoods: BsHeaderGood;
26
+ function BsExchange(options) {
27
+ var _this = this,
28
+ _this$componentConfig4;
29
+ _classCallCheck(this, BsExchange);
30
+ _defineProperty(this, "name", void 0);
31
+ _defineProperty(this, "id", void 0);
32
+ _defineProperty(this, "sortField", void 0);
33
+ _defineProperty(this, "type", void 0);
34
+ _defineProperty(this, "rules", void 0);
35
+ _defineProperty(this, "componentConfig", void 0);
36
+ _defineProperty(this, "effects", void 0);
37
+ _defineProperty(this, "isCombinationComponent", void 0);
38
+ _defineProperty(this, "formField", void 0);
39
+ _defineProperty(this, "canSort", void 0);
40
+ _defineProperty(this, "children", void 0);
41
+ _defineProperty(this, "dataType", void 0);
42
+ _defineProperty(this, "returnGoods", void 0);
43
+ _defineProperty(this, "renderClient", function (record) {
44
+ var _this$componentConfig;
45
+ var wdtExchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_wdtExchangeGoods")]) || "[]");
46
+ return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
47
+ id: "".concat(_this.id, "-out"),
48
+ label: "".concat(_this.name, "-\u6362\u51FA"),
49
+ value: /*#__PURE__*/React.createElement(BsGoodsTable, {
50
+ list: wdtExchangeGoods || [],
51
+ showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
52
+ })
53
+ })) : null;
54
+ });
55
+ _defineProperty(this, "renderPc", function () {
56
+ return null;
57
+ });
58
+ _defineProperty(this, "renderLog", function (r) {
59
+ var _r, _this$componentConfig2;
60
+ return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_wdtExchangeGoods")]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement("div", null, "\u6362\u51FA\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
61
+ list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtExchangeGoods")]) || [],
62
+ showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
63
+ })) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
64
+ });
65
+ _defineProperty(this, "getComponentValue", function (r) {
66
+ return {
67
+ wdtExchangeGoods: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtExchangeGoods")]
68
+ };
69
+ });
70
+ _defineProperty(this, "renderExport", function (value, record) {
71
+ return null;
72
+ });
73
+ _defineProperty(this, "editRender", function (p) {
74
+ var _this$componentConfig3, _this$effects, _this$effects2, _this$effects3;
75
+ return /*#__PURE__*/React.createElement(GetFormItem, {
76
+ title: _this.name,
77
+ name: _this.id,
78
+ rules: _this.rules,
79
+ required: false,
80
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
81
+ display: p === null || p === void 0 ? void 0 : p.display,
82
+ component: /*#__PURE__*/React.createElement(CommonExchangeGoods, _extends({}, _this.componentConfig, {
83
+ maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
84
+ shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
85
+ shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
86
+ companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
87
+ width: "90%",
88
+ type: "WDT_EXCHANGE_GOODS"
89
+ }))
90
+ });
91
+ });
92
+ _defineProperty(this, "filterConfig", function (item) {
93
+ return [{
94
+ searchDefaultConditions: SYMBOL.like,
95
+ type: item.type,
96
+ id: "".concat(item.id, "_wdtExchangeGoods"),
97
+ name: "".concat(_this.name, "-\u6362\u51FA"),
98
+ filterComponentType: "Input"
99
+ }];
100
+ });
101
+ this.name = options.name;
102
+ this.id = options.id;
103
+ this.sortField = "".concat(options.id);
104
+ this.formField = "".concat(options.id);
105
+ this.type = options.type;
106
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
107
+ this.isCombinationComponent = true;
108
+ this.canSort = false;
109
+ // this.wdtType = new BsType({
110
+ // ...options,
111
+ // id: `${options.id}_wdtExchangeType`,
112
+ // name: "换货类型",
113
+ // });
114
+ // this.wdtMemo = new BsMemo({
115
+ // ...options,
116
+ // id: `${options.id}_wdtExchangeType_memo`,
117
+ // name: "换货备注",
118
+ // });
119
+ this.returnGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
120
+ id: "".concat(options.id, "_wdtExchangeGoods"),
121
+ name: "换出商品"
122
+ }));
123
+ // this.swapOutGoods = new BsHeaderGood({
124
+ // ...options,
125
+ // id: `${options.id}_wdtExchangeSwapOutGoods`,
126
+ // name: "换出商品",
127
+ // });
128
+ // this.giftGoods = new BsHeaderGood({
129
+ // ...options,
130
+ // id: `${options.id}_wdtExchangeGiftGoods`,
131
+ // name: "赠品商品",
132
+ // });
133
+ this.children = [
134
+ // this.wdtType,
135
+ // this.wdtMemo,
136
+ this.returnGoods
137
+ // this.swapOutGoods,
138
+ // this.giftGoods,
139
+ ];
140
+
141
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
142
+ this.rules = [{
143
+ required: (_this$componentConfig4 = this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.required,
144
+ validator: function validator(_, value) {
145
+ var _this$componentConfig5, _value$wdtExchangeGoo;
146
+ if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && !(value !== null && value !== void 0 && (_value$wdtExchangeGoo = value.wdtExchangeGoods) !== null && _value$wdtExchangeGoo !== void 0 && _value$wdtExchangeGoo.length)) {
147
+ return Promise.reject(new Error("请选择wdt换货商品"));
148
+ }
149
+ return Promise.resolve();
150
+ }
151
+ }
152
+ /* {
153
+ validator: (_: any, value: any) => {
154
+ if (value && ["2", "4"].includes(value?.wdtExchangeType?.[0])) {
155
+ const hasNoGood = (value?.wdtExchangeGoods || []).some(
156
+ (item: any) => {
157
+ return !item?.wdtExchangeGoods.length;
158
+ }
159
+ );
160
+ if (hasNoGood) {
161
+ return Promise.reject(new Error("请选择退回商品后再提交工单"));
162
+ }
163
+ const hasLen = (value?.wdtExchangeGoods || []).some(
164
+ (item: any) => {
165
+ return (
166
+ item?.wdtExchangeGoods.length !==
167
+ item?.wdtExchangeSwapOutGoods.length
168
+ );
169
+ }
170
+ );
171
+ if (hasLen) {
172
+ return Promise.reject(new Error("请核对商品数据,再提交工单"));
173
+ }
174
+ }
175
+ return Promise.resolve();
176
+ },
177
+ },*/];
178
+
179
+ this.dataType = "object";
180
+ });
181
+ export default BsExchange;
@@ -0,0 +1,54 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
+ import React from "react";
3
+ import { BsType } from "../../BS/common/index";
4
+ import CommonHeaderGoods from "../../CommonHeaderGood";
5
+ declare class WdtReturn implements ComponentInterface {
6
+ name: string;
7
+ id: string;
8
+ sortField: string;
9
+ type: string;
10
+ rules: any[];
11
+ componentConfig: ComponentInterface["componentConfig"];
12
+ effects: ComponentInterface["effects"];
13
+ isCombinationComponent: boolean;
14
+ formField: string;
15
+ canSort: boolean;
16
+ children: ComponentInterface[];
17
+ dataType: ComponentInterface["dataType"];
18
+ wdtType: BsType;
19
+ reissueGoods: CommonHeaderGoods;
20
+ constructor(options: PickOption);
21
+ renderClient: (record: any) => React.JSX.Element | null;
22
+ renderPc: () => null;
23
+ renderLog: (r: Record) => React.JSX.Element;
24
+ getComponentValue: (r: Record) => any;
25
+ renderExport: () => null;
26
+ editRender: (p: any) => React.JSX.Element;
27
+ filterConfig: (item: ColumnConfig) => ({
28
+ searchDefaultConditions: "in";
29
+ type: string;
30
+ id: string;
31
+ name: string;
32
+ filterComponentType: "Cascader";
33
+ props: {
34
+ options: any[] | undefined;
35
+ fieldNames: {
36
+ label: string;
37
+ value: string;
38
+ children: string;
39
+ };
40
+ };
41
+ formatFilterValue: (val: Array<string>) => string[] | undefined;
42
+ filterFn: (value: string) => (i: Record) => boolean;
43
+ } | {
44
+ searchDefaultConditions: "like";
45
+ type: string;
46
+ id: string;
47
+ name: string;
48
+ filterComponentType: "Input";
49
+ props?: undefined;
50
+ formatFilterValue?: undefined;
51
+ filterFn?: undefined;
52
+ })[];
53
+ }
54
+ export default WdtReturn;
@@ -0,0 +1,148 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
6
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
+ import React from "react";
12
+ import GetFormItem from "../../GetFormItem";
13
+ import ItemView from "../../../commonComponents/ItemView";
14
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { SYMBOL } from "../../../constant";
16
+ import { BsGoodsTable } from "../../Common";
17
+ import { BsType } from "../../BS/common/index";
18
+ import { CommonReturnGoods } from "@kmkf-fe-packages/basic-components";
19
+ import CommonHeaderGoods from "../../CommonHeaderGood";
20
+ var WdtReturn = /*#__PURE__*/_createClass(function WdtReturn(options) {
21
+ var _this = this,
22
+ _this$componentConfig4;
23
+ _classCallCheck(this, WdtReturn);
24
+ _defineProperty(this, "name", void 0);
25
+ _defineProperty(this, "id", void 0);
26
+ _defineProperty(this, "sortField", void 0);
27
+ _defineProperty(this, "type", void 0);
28
+ _defineProperty(this, "rules", void 0);
29
+ _defineProperty(this, "componentConfig", void 0);
30
+ _defineProperty(this, "effects", void 0);
31
+ _defineProperty(this, "isCombinationComponent", void 0);
32
+ _defineProperty(this, "formField", void 0);
33
+ _defineProperty(this, "canSort", void 0);
34
+ _defineProperty(this, "children", void 0);
35
+ _defineProperty(this, "dataType", void 0);
36
+ _defineProperty(this, "wdtType", void 0);
37
+ _defineProperty(this, "reissueGoods", void 0);
38
+ _defineProperty(this, "renderClient", function (record) {
39
+ var _this$componentConfig;
40
+ return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.wdtType.renderClient(record), record !== null && record !== void 0 && record["".concat(_this.id)].wdtReturnGoods.length ? /*#__PURE__*/React.createElement(ItemView, {
41
+ id: _this.id,
42
+ label: _this.name,
43
+ value: /*#__PURE__*/React.createElement(BsGoodsTable, {
44
+ list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].wdtReturnGoods) || [],
45
+ showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
46
+ })
47
+ }) : null) : null;
48
+ });
49
+ _defineProperty(this, "renderPc", function () {
50
+ return null;
51
+ });
52
+ _defineProperty(this, "renderLog", function (r) {
53
+ var _r, _r2, _this$componentConfig2;
54
+ return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_wdtReturnType")]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.wdtType.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_wdtReturnGoods")]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, "\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
55
+ list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtReturnGoods")]) || [],
56
+ showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
57
+ })) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
58
+ });
59
+ _defineProperty(this, "getComponentValue", function (r) {
60
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtReturnGoods")];
61
+ });
62
+ _defineProperty(this, "renderExport", function () {
63
+ return null;
64
+ });
65
+ _defineProperty(this, "editRender", function (p) {
66
+ var _this$componentConfig3, _this$effects, _this$effects2, _this$effects3;
67
+ return /*#__PURE__*/React.createElement(GetFormItem, {
68
+ title: _this.name,
69
+ name: _this.id,
70
+ rules: _this.rules,
71
+ required: false,
72
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
73
+ display: p === null || p === void 0 ? void 0 : p.display,
74
+ component: /*#__PURE__*/React.createElement(CommonReturnGoods, _extends({}, _this.componentConfig, {
75
+ maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
76
+ shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
77
+ shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
78
+ companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
79
+ type: "WDT_RETURN_GOODS",
80
+ width: "90%"
81
+ }))
82
+ });
83
+ });
84
+ _defineProperty(this, "filterConfig", function (item) {
85
+ var _item$templateConfig;
86
+ return [{
87
+ searchDefaultConditions: SYMBOL.in,
88
+ type: item.type,
89
+ id: "".concat(item.id, "_wdtReturnType"),
90
+ name: "".concat(item.name, "-\u9000\u8D27\u7C7B\u578B"),
91
+ filterComponentType: "Cascader",
92
+ props: {
93
+ options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
94
+ fieldNames: {
95
+ label: "label",
96
+ value: "value",
97
+ children: "children"
98
+ }
99
+ },
100
+ formatFilterValue: function formatFilterValue(val) {
101
+ if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
102
+ return [val[val.length - 1]];
103
+ }
104
+ },
105
+ filterFn: function filterFn(value) {
106
+ return function (i) {
107
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "wdtReturnType"), value);
108
+ };
109
+ }
110
+ }, {
111
+ searchDefaultConditions: SYMBOL.like,
112
+ type: item.type,
113
+ id: "".concat(item.id, "_wdtReturnGoods"),
114
+ name: "".concat(_this.name),
115
+ filterComponentType: "Input"
116
+ }];
117
+ });
118
+ this.name = options.name;
119
+ this.id = options.id;
120
+ this.sortField = "".concat(options.id);
121
+ this.formField = "".concat(options.id);
122
+ this.type = options.type;
123
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
124
+ this.isCombinationComponent = true;
125
+ this.canSort = false;
126
+ this.wdtType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
127
+ id: "".concat(options.id, "_wdtReturnType"),
128
+ name: "退货类型"
129
+ }));
130
+ this.reissueGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
131
+ id: "".concat(options.id, "_wdtReturnGoods"),
132
+ name: "商品信息"
133
+ }));
134
+ this.children = [this.wdtType, this.reissueGoods];
135
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
136
+ this.rules = this !== null && this !== void 0 && (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
137
+ required: true,
138
+ validator: function validator(_, value) {
139
+ var _value$wdtReturnGoods;
140
+ if (!value || !(value !== null && value !== void 0 && (_value$wdtReturnGoods = value.wdtReturnGoods) !== null && _value$wdtReturnGoods !== void 0 && _value$wdtReturnGoods.length)) {
141
+ return Promise.reject(new Error("请选择wdt退货商品"));
142
+ }
143
+ return Promise.resolve();
144
+ }
145
+ }] : [];
146
+ this.dataType = "object";
147
+ });
148
+ export default WdtReturn;
@@ -1,3 +1,3 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, WdtReissue } from "./index";
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, WdtReissue } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsLogistics | BsReissue | CommonInput | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | PaymentVoucherCode;
3
+ export declare const factory: (type: string, options: PickOption) => AliPay | JstSendGood | LogisticsInterception | WdtExchange | WdtReissue | WdtReturn | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | CommonInput | PaymentVoucherCode;
@@ -1,6 +1,6 @@
1
1
  import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
2
2
  // CommonTradeId,
3
- CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, WdtReissue } from "./index";
3
+ CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, WdtReissue } from "./index";
4
4
  export var factory = function factory(type, options) {
5
5
  var _options$componentCon;
6
6
  switch (type) {
@@ -141,12 +141,16 @@ export var factory = function factory(type, options) {
141
141
  return new BsGoods(options);
142
142
  case "BS_EXCHANGE_GOODS":
143
143
  return new BsExchange(options);
144
+ case "WDT_EXCHANGE_GOODS":
145
+ return new WdtExchange(options);
144
146
  case "BS_REISSUE_GOODS":
145
147
  return new BsReissue(options);
146
148
  case "WDT_REISSUE_GOODS":
147
149
  return new WdtReissue(options);
148
150
  case "BS_RETURN_GOODS":
149
151
  return new BsReturn(options);
152
+ case "WDT_RETURN_GOODS":
153
+ return new WdtReturn(options);
150
154
  case "REISSUE_TRADE_ID":
151
155
  case "BS_DELIVERY_NO":
152
156
  case "RETURN_GOODS_TRADE_ID":
@@ -75,6 +75,8 @@ export { default as FlowWorkOrderStatus } from "./components/FlowWorkOrderStatus
75
75
  export { default as MsgStatus } from "./components/MsgStatus";
76
76
  export { default as WdtGoods } from "./components/WDT/WdtGoods";
77
77
  export { default as WdtReissue } from "./components/WDT/WdtRessuie";
78
+ export { default as WdtReturn } from "./components/WDT/WdtReturn";
79
+ export { default as WdtExchange } from "./components/WDT/WdtExchange";
78
80
  export { default as CommonInput } from "./components/CommonInput";
79
81
  export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
80
82
  export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
package/dist/esm/index.js CHANGED
@@ -75,6 +75,8 @@ export { default as FlowWorkOrderStatus } from "./components/FlowWorkOrderStatus
75
75
  export { default as MsgStatus } from "./components/MsgStatus";
76
76
  export { default as WdtGoods } from "./components/WDT/WdtGoods";
77
77
  export { default as WdtReissue } from "./components/WDT/WdtRessuie";
78
+ export { default as WdtReturn } from "./components/WDT/WdtReturn";
79
+ export { default as WdtExchange } from "./components/WDT/WdtExchange";
78
80
  export { default as CommonInput } from "./components/CommonInput";
79
81
  export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
80
82
  // TODO: ERP 打款工单使用
@@ -53,6 +53,7 @@ export interface ComponentInterface {
53
53
  templateId?: string;
54
54
  workOrderUniqueKey?: string;
55
55
  platform?: PlatForm;
56
+ parentName?: string;
56
57
  /**
57
58
  * @description 组件下标
58
59
  * @deprecated 已弃用字段,后续版本不在使用
@@ -78,7 +79,7 @@ export interface ComponentInterface {
78
79
  /**
79
80
  * @description 显示字段名称
80
81
  */
81
- showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder";
82
+ showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder" | "logisticsCompany" | "logisticsCode";
82
83
  /**
83
84
  * @description 是否选择SKU
84
85
  */
@@ -166,6 +167,7 @@ export interface ComponentInterface {
166
167
  config?: any;
167
168
  rulesOptions?: Array<any>;
168
169
  selectRules?: Array<string>;
170
+ logistics?: string;
169
171
  };
170
172
  effects?: {
171
173
  queryWorkOrderDetail?: (r: Record) => void;
@@ -234,7 +236,7 @@ export interface ComponentInterface {
234
236
  getComponentValue: (r: Record) => any;
235
237
  formDataTransform?: (r: any) => any;
236
238
  }
237
- export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform">;
239
+ export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width">;
238
240
  export declare type ColumnConfig = {
239
241
  id: string;
240
242
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.27.1-test.11",
3
+ "version": "0.27.1-test.12",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -20,8 +20,8 @@
20
20
  ]
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/basic-components": "^0.27.1-test.11",
24
- "@kmkf-fe-packages/kmkf-utils": "^0.27.1-test.11"
23
+ "@kmkf-fe-packages/basic-components": "^0.27.1-test.12",
24
+ "@kmkf-fe-packages/kmkf-utils": "^0.27.1-test.12"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@typescript-eslint/eslint-plugin": "^5.59.2",
@@ -37,7 +37,7 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "d231b86d32d60379160f32cf2f6a0bdc58f8d536",
40
+ "gitHead": "39f280a5b0b1c8208931c8f70ae30dba64e89168",
41
41
  "gitHooks": {
42
42
  "pre-commit": "lint-staged"
43
43
  }