@kmkf-fe-packages/basic-components 1.0.1-rc.5 → 1.0.3-alpha.0

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.
package/dist/index.esm.js CHANGED
@@ -7563,11 +7563,10 @@ function ApaasPosting(props) {
7563
7563
  });
7564
7564
  }
7565
7565
 
7566
- var _excluded$a = ["value", "onChange", "type"];
7566
+ var _excluded$a = ["value", "onChange"];
7567
7567
  function ApaasLogistics(props) {
7568
7568
  var value = props.value,
7569
7569
  onChange = props.onChange,
7570
- type = props.type,
7571
7570
  other = _objectWithoutProperties(props, _excluded$a);
7572
7571
  var _useState = useState([]),
7573
7572
  _useState2 = _slicedToArray(_useState, 2),
@@ -7580,7 +7579,7 @@ function ApaasLogistics(props) {
7580
7579
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7581
7580
  while (1) switch (_context.prev = _context.next) {
7582
7581
  case 0:
7583
- express = ExpressData.getInstance(type === 'WDT_LOGISTICS' ? 'wdt' : 'default');
7582
+ express = ExpressData.getInstance();
7584
7583
  setOptions(express.expressData || []);
7585
7584
  case 2:
7586
7585
  case "end":
@@ -9834,8 +9833,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
9834
9833
  interceptReceiverMobile: undefined,
9835
9834
  interceptLogisticsStatus: undefined,
9836
9835
  interceptLogisticsStatusOther: undefined,
9837
- interceptLogisticsSnapshot: undefined,
9838
- qySelfInterceptLogisticsStatus: undefined
9836
+ interceptLogisticsSnapshot: undefined
9839
9837
  });
9840
9838
  }
9841
9839
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -9980,26 +9978,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
9980
9978
  onChange: function onChange(e) {
9981
9979
  return changeHandle(e.target.value, 'interceptLogisticsStatusOther');
9982
9980
  }
9983
- })), /*#__PURE__*/React.createElement(Item, {
9984
- label: '拦截状态',
9985
- key: 'qySelfInterceptLogisticsStatus'
9986
- }, /*#__PURE__*/React.createElement(Select, {
9987
- value: value === null || value === void 0 ? void 0 : value.qySelfInterceptLogisticsStatus,
9988
- disabled: true,
9989
- style: {
9990
- width: '200px'
9991
- },
9992
- placeholder: "\u62E6\u622A\u72B6\u6001",
9993
- onChange: function onChange(val) {
9994
- return changeHandle(val, 'qySelfInterceptLogisticsStatus');
9995
- },
9996
- options: [{
9997
- label: '拦截成功',
9998
- value: '拦截成功'
9999
- }, {
10000
- label: '拦截失败',
10001
- value: '拦截失败'
10002
- }]
10003
9981
  })));
10004
9982
  };
10005
9983
 
@@ -10424,7 +10402,7 @@ var typeInitValueMap = {
10424
10402
  }]
10425
10403
  };
10426
10404
  var jstGoods = function jstGoods(props) {
10427
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
10405
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
10428
10406
  var _props$value = props.value,
10429
10407
  value = _props$value === void 0 ? [] : _props$value,
10430
10408
  onChange = props.onChange,
@@ -10432,9 +10410,7 @@ var jstGoods = function jstGoods(props) {
10432
10410
  _props$type = props.type,
10433
10411
  type = _props$type === void 0 ? 1 : _props$type,
10434
10412
  _props$showField = props.showField,
10435
- showField = _props$showField === void 0 ? '' : _props$showField,
10436
- _props$componentType = props.componentType,
10437
- componentType = _props$componentType === void 0 ? '' : _props$componentType;
10413
+ showField = _props$showField === void 0 ? '' : _props$showField;
10438
10414
  var _useState = useState(0),
10439
10415
  _useState2 = _slicedToArray(_useState, 2),
10440
10416
  changeIndex = _useState2[0],
@@ -10465,18 +10441,6 @@ var jstGoods = function jstGoods(props) {
10465
10441
  }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
10466
10442
  }));
10467
10443
  };
10468
- var handleSelected = function handleSelected(val, type, option) {
10469
- var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
10470
- changeOrderInfo[type] = val;
10471
- changeOrderInfo['sendId'] = option.warehouseNo;
10472
- var newList = _toConsumableArray(value);
10473
- newList[changeIndex] = changeOrderInfo;
10474
- onChange === null || onChange === void 0 ? void 0 : onChange(newList);
10475
- };
10476
- var filterOption = function filterOption(input, option) {
10477
- var _option$label;
10478
- return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
10479
- };
10480
10444
  var changeInputHandle = function changeInputHandle(val, type) {
10481
10445
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
10482
10446
  changeOrderInfo[type] = val;
@@ -10518,8 +10482,7 @@ var jstGoods = function jstGoods(props) {
10518
10482
  style: {
10519
10483
  minWidth: '100px',
10520
10484
  maxWidth: '180px'
10521
- },
10522
- type: componentType
10485
+ }
10523
10486
  }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
10524
10487
  disabled: disabled,
10525
10488
  placeholder: "\u7269\u6D41\u5355\u53F7",
@@ -10548,34 +10511,20 @@ var jstGoods = function jstGoods(props) {
10548
10511
  return changeInputHandle(e.target.value, 'sendId');
10549
10512
  },
10550
10513
  value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
10551
- }), ['sendName', 'all'].includes(showField) && (componentType === 'WDT_SEND_GOOD' ? /*#__PURE__*/React.createElement(Select, {
10552
- style: {
10553
- minWidth: '100px',
10554
- maxWidth: '180px'
10555
- },
10556
- disabled: disabled,
10557
- placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
10558
- showSearch: true,
10559
- options: [],
10560
- filterOption: filterOption,
10561
- value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
10562
- onChange: function onChange(value, option) {
10563
- return handleSelected(value, 'sendName', option);
10564
- }
10565
- }) : /*#__PURE__*/React.createElement(Input, {
10514
+ }), ['sendName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
10566
10515
  disabled: disabled,
10567
10516
  placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u540D\u79F0",
10568
10517
  onChange: function onChange(e) {
10569
10518
  return changeInputHandle(e.target.value, 'sendName');
10570
10519
  },
10571
- value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
10572
- }))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
10520
+ value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName
10521
+ })) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
10573
10522
  disabled: disabled,
10574
10523
  placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
10575
10524
  onChange: function onChange(e) {
10576
10525
  return changeInputHandle(e.target.value, 'deliveryNo');
10577
10526
  },
10578
- value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
10527
+ value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
10579
10528
  })) : null) : null);
10580
10529
  };
10581
10530
 
@@ -11142,12 +11091,6 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
11142
11091
  var GoodsModal$2 = /*#__PURE__*/forwardRef(GoodsModal$1);
11143
11092
 
11144
11093
  var RangePicker = DatePicker.RangePicker;
11145
- var getWdtListProduct = function getWdtListProduct(data) {
11146
- return extendRequest('/qy/gdfw/product/wdtListProduct', {
11147
- method: 'post',
11148
- data: data
11149
- });
11150
- };
11151
11094
  var columns$1 = [{
11152
11095
  dataIndex: 'index',
11153
11096
  title: 'NO',
@@ -11222,174 +11165,226 @@ var expandedColumns = [{
11222
11165
  title: '会员价',
11223
11166
  width: 140
11224
11167
  }];
11225
- var getInitTime = function getInitTime() {
11226
- var initStartTime = hooks().subtract(30, 'd').hours(0).minutes(0).seconds(0);
11227
- var initEndTime = hooks().hours(23).minutes(59).seconds(59);
11228
- return [initStartTime, initEndTime];
11229
- };
11230
- var GoodList = function GoodList(props, ref) {
11231
- var _useState = useState([]),
11232
- _useState2 = _slicedToArray(_useState, 2),
11233
- selectList = _useState2[0],
11234
- setSelect = _useState2[1];
11235
- var _useState3 = useState(1),
11236
- _useState4 = _slicedToArray(_useState3, 2),
11237
- pageNo = _useState4[0],
11238
- setPageNo = _useState4[1];
11239
- var _useState5 = useState(10),
11240
- _useState6 = _slicedToArray(_useState5, 1),
11241
- pageSize = _useState6[0];
11242
- var _useState7 = useState([]),
11243
- _useState8 = _slicedToArray(_useState7, 2),
11244
- goodList = _useState8[0],
11245
- setGoodList = _useState8[1];
11246
- var _useState9 = useState(false),
11247
- _useState10 = _slicedToArray(_useState9, 2),
11248
- loading = _useState10[0],
11249
- setLoading = _useState10[1];
11250
- var _useState11 = useState(0),
11251
- _useState12 = _slicedToArray(_useState11, 2),
11252
- total = _useState12[0],
11253
- setTotal = _useState12[1];
11254
- var _useState13 = useState(null),
11255
- _useState14 = _slicedToArray(_useState13, 2),
11256
- dates = _useState14[0],
11257
- setDates = _useState14[1];
11168
+ var dateFormat = 'YYYY-MM-DD HH:mm:ss';
11169
+ var GoodsModal$3 = function GoodsModal(props, ref) {
11170
+ var initStartTime = hooks().subtract(30, 'd');
11171
+ var initEndTime = hooks();
11258
11172
  useImperativeHandle(ref, function () {
11259
11173
  return {
11260
- getSelectGoodList: function getSelectGoodList() {
11261
- return selectList;
11174
+ open: function open(shopCode) {
11175
+ setVisible(true);
11176
+ setPageNo(1);
11177
+ setSelect([]);
11178
+ setSelectIds([]);
11179
+ form.setFieldsValue({
11180
+ dateTimePicker: [initStartTime, initEndTime],
11181
+ code: ''
11182
+ });
11183
+ // getShopList();
11262
11184
  }
11263
11185
  };
11264
11186
  });
11187
+
11188
+ var onSubmit = props.onSubmit,
11189
+ shopId = props.shopId,
11190
+ shopList = props.shopList,
11191
+ width = props.width,
11192
+ companyKey = props.companyKey;
11193
+ var _useState = useState(false),
11194
+ _useState2 = _slicedToArray(_useState, 2),
11195
+ visible = _useState2[0],
11196
+ setVisible = _useState2[1];
11197
+ var _useState3 = useState([]),
11198
+ _useState4 = _slicedToArray(_useState3, 2),
11199
+ selectList = _useState4[0],
11200
+ setSelect = _useState4[1];
11201
+ var _useState5 = useState([]),
11202
+ _useState6 = _slicedToArray(_useState5, 2),
11203
+ selectIds = _useState6[0],
11204
+ setSelectIds = _useState6[1];
11205
+ var _useState7 = useState(1),
11206
+ _useState8 = _slicedToArray(_useState7, 2),
11207
+ pageNo = _useState8[0],
11208
+ setPageNo = _useState8[1];
11209
+ var _useState9 = useState(20),
11210
+ _useState10 = _slicedToArray(_useState9, 1),
11211
+ pageSize = _useState10[0];
11212
+ var _useState11 = useState([]),
11213
+ _useState12 = _slicedToArray(_useState11, 2),
11214
+ goodList = _useState12[0],
11215
+ setGoodList = _useState12[1];
11216
+ var _useState13 = useState(false),
11217
+ _useState14 = _slicedToArray(_useState13, 2),
11218
+ loading = _useState14[0],
11219
+ setLoading = _useState14[1];
11220
+ var _useState15 = useState(0),
11221
+ _useState16 = _slicedToArray(_useState15, 2),
11222
+ total = _useState16[0],
11223
+ setTotal = _useState16[1];
11265
11224
  var displaySelectList = useMemo(function () {
11266
11225
  return selectList.map(function (item, i) {
11267
11226
  item.index = i + 1;
11268
11227
  return item;
11269
11228
  });
11270
11229
  }, [selectList]);
11230
+ useEffect(function () {
11231
+ if (visible) {
11232
+ queryItems();
11233
+ }
11234
+ }, [pageNo, visible]);
11271
11235
  var _Form$useForm = Form.useForm(),
11272
11236
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
11273
11237
  form = _Form$useForm2[0];
11238
+ //选择页码
11239
+ var pageChange = function pageChange(page) {
11240
+ setPageNo(page);
11241
+ };
11274
11242
  /**
11275
11243
  * 查询商品
11276
11244
  */
11277
11245
  var queryItems = /*#__PURE__*/function () {
11278
11246
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11279
- var _formData$dateTimePic, _formData$dateTimePic2, _formData$dateTimePic3, _formData$dateTimePic4, _formData$dateTimePic5, _formData$dateTimePic6, formData, _getInitTime, _getInitTime2, start, end, startTime, endTime, newTime, earliest, params;
11247
+ var search,
11248
+ _formData$dateTimePic,
11249
+ _formData$dateTimePic2,
11250
+ _formData$dateTimePic3,
11251
+ _formData$dateTimePic4,
11252
+ _formData$dateTimePic5,
11253
+ _formData$dateTimePic6,
11254
+ formData,
11255
+ startTime,
11256
+ endTime,
11257
+ params,
11258
+ res,
11259
+ _res$data,
11260
+ _res$data$productList,
11261
+ productList,
11262
+ _res$data$total,
11263
+ _total,
11264
+ errorMsg,
11265
+ newProducts,
11266
+ _args = arguments;
11280
11267
  return _regeneratorRuntime().wrap(function _callee$(_context) {
11281
11268
  while (1) switch (_context.prev = _context.next) {
11282
11269
  case 0:
11283
- _context.prev = 0;
11270
+ search = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
11271
+ _context.prev = 1;
11284
11272
  setLoading(true);
11285
11273
  formData = form.getFieldsValue();
11286
- _getInitTime = getInitTime(), _getInitTime2 = _slicedToArray(_getInitTime, 2), start = _getInitTime2[0], end = _getInitTime2[1];
11287
- startTime = ((_formData$dateTimePic = formData.dateTimePicker) === null || _formData$dateTimePic === void 0 ? void 0 : (_formData$dateTimePic2 = _formData$dateTimePic[0]) === null || _formData$dateTimePic2 === void 0 ? void 0 : (_formData$dateTimePic3 = _formData$dateTimePic2.format) === null || _formData$dateTimePic3 === void 0 ? void 0 : _formData$dateTimePic3.call(_formData$dateTimePic2, 'YYYY-MM-DD HH:mm:ss')) || start.format('YYYY-MM-DD HH:mm:ss');
11288
- endTime = ((_formData$dateTimePic4 = formData.dateTimePicker) === null || _formData$dateTimePic4 === void 0 ? void 0 : (_formData$dateTimePic5 = _formData$dateTimePic4[1]) === null || _formData$dateTimePic5 === void 0 ? void 0 : (_formData$dateTimePic6 = _formData$dateTimePic5.format) === null || _formData$dateTimePic6 === void 0 ? void 0 : _formData$dateTimePic6.call(_formData$dateTimePic5, 'YYYY-MM-DD HH:mm:ss')) || end.format('YYYY-MM-DD HH:mm:ss');
11289
- endTime = hooks(endTime).hours(23).minutes(59).seconds(59).format('YYYY-MM-DD HH:mm:ss');
11290
- // PS: 故意推前3分钟,不然极端情况下,接口会报错
11291
- newTime = hooks().subtract(3, 'm'); // 只能选比现在早的时间
11292
- if (hooks(endTime).diff(newTime, 'seconds') > 0) {
11293
- endTime = newTime.format('YYYY-MM-DD HH:mm:ss');
11294
- }
11295
- // 30天内
11296
- earliest = hooks(endTime).subtract(30, 'd');
11297
- if (earliest.diff(hooks(startTime), 'seconds') > 0) {
11298
- startTime = earliest.format('YYYY-MM-DD HH:mm:ss');
11299
- }
11274
+ startTime = ((_formData$dateTimePic = formData.dateTimePicker) === null || _formData$dateTimePic === void 0 ? void 0 : (_formData$dateTimePic2 = _formData$dateTimePic[0]) === null || _formData$dateTimePic2 === void 0 ? void 0 : (_formData$dateTimePic3 = _formData$dateTimePic2.format) === null || _formData$dateTimePic3 === void 0 ? void 0 : _formData$dateTimePic3.call(_formData$dateTimePic2, dateFormat)) || hooks().subtract(30, 'd').format(dateFormat);
11275
+ endTime = ((_formData$dateTimePic4 = formData.dateTimePicker) === null || _formData$dateTimePic4 === void 0 ? void 0 : (_formData$dateTimePic5 = _formData$dateTimePic4[1]) === null || _formData$dateTimePic5 === void 0 ? void 0 : (_formData$dateTimePic6 = _formData$dateTimePic5.format) === null || _formData$dateTimePic6 === void 0 ? void 0 : _formData$dateTimePic6.call(_formData$dateTimePic5, dateFormat)) || hooks().format(dateFormat);
11300
11276
  params = {
11277
+ // shopCode: shopCode,
11301
11278
  pageSize: pageSize,
11302
11279
  pageNo: pageNo - 1,
11303
- goodNo: formData.goodNo || null,
11304
- specNo: formData.specNo || null,
11280
+ goodNo: search.code,
11305
11281
  startTime: startTime,
11306
11282
  endTime: endTime
11307
11283
  };
11308
- _context.next = 14;
11309
- return getWdtListProduct(params).then(function (res) {
11310
- if (res.success) {
11311
- var _res$data = res.data,
11312
- _res$data$productList = _res$data.productList,
11313
- productList = _res$data$productList === void 0 ? [] : _res$data$productList,
11314
- _res$data$total = _res$data.total,
11315
- _total = _res$data$total === void 0 ? 0 : _res$data$total;
11316
- var newProducts = productList.map(function (item, index) {
11317
- return _objectSpread2(_objectSpread2({}, item), {}, {
11318
- index: index + 1
11319
- });
11284
+ _context.next = 9;
11285
+ return extendRequest('/qy/gdfw/product/wdtListProduct', {
11286
+ method: 'post',
11287
+ data: params
11288
+ });
11289
+ case 9:
11290
+ res = _context.sent;
11291
+ _res$data = res.data, _res$data$productList = _res$data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList, _res$data$total = _res$data.total, _total = _res$data$total === void 0 ? 0 : _res$data$total, errorMsg = _res$data.errorMsg;
11292
+ if (res.success) {
11293
+ newProducts = productList.map(function (item, index) {
11294
+ return _objectSpread2(_objectSpread2({}, item), {}, {
11295
+ index: index + 1
11320
11296
  });
11321
- setGoodList(newProducts);
11322
- if (pageNo === 1) {
11323
- setTotal(_total);
11324
- }
11325
- } else {
11326
- var _res$data2;
11327
- setGoodList([]);
11328
- setTotal(0);
11329
- message.error(((_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.errorMsg) || res.message);
11297
+ });
11298
+ setGoodList(_toConsumableArray(newProducts));
11299
+ if (pageNo === 1) {
11300
+ setTotal(_total);
11330
11301
  }
11331
- }).catch(function (e) {
11332
- console.log(e);
11333
- });
11334
- case 14:
11335
- _context.prev = 14;
11302
+ } else {
11303
+ setGoodList([]);
11304
+ setTotal(0);
11305
+ message.error(errorMsg || res.message);
11306
+ }
11307
+ case 12:
11308
+ _context.prev = 12;
11336
11309
  setLoading(false);
11337
- return _context.finish(14);
11338
- case 17:
11310
+ return _context.finish(12);
11311
+ case 15:
11339
11312
  case "end":
11340
11313
  return _context.stop();
11341
11314
  }
11342
- }, _callee, null, [[0,, 14, 17]]);
11315
+ }, _callee, null, [[1,, 12, 15]]);
11343
11316
  }));
11344
11317
  return function queryItems() {
11345
11318
  return _ref.apply(this, arguments);
11346
11319
  };
11347
11320
  }();
11348
- var disabledDate = function disabledDate(current) {
11349
- var today = hooks(hooks().format('YYYY-MM-DD'));
11350
- var currentDay = hooks(current.format('YYYY-MM-DD'));
11351
- if (currentDay.diff(today, 'days') > 0) {
11352
- return true;
11353
- }
11354
- if (!dates) {
11355
- return false;
11356
- }
11357
- var tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
11358
- var tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
11359
- return !!tooEarly || !!tooLate;
11360
- };
11361
- var onOpenChange = function onOpenChange(open) {
11362
- if (open) {
11363
- setDates([null, null]);
11364
- } else {
11365
- setDates(null);
11366
- }
11321
+ var _onCancel = function onCancel() {
11322
+ setVisible(false);
11323
+ };
11324
+ var onOk = function onOk() {
11325
+ onSubmit(selectList);
11326
+ _onCancel();
11327
+ };
11328
+ var onFinish = function onFinish(fieldsValue) {
11329
+ var searchValue = {
11330
+ code: fieldsValue.code
11331
+ };
11332
+ queryItems(searchValue);
11367
11333
  };
11368
11334
  var onReset = function onReset() {
11335
+ form.resetFields();
11369
11336
  form.setFieldsValue({
11370
- dateTimePicker: getInitTime(),
11371
- goodNo: '',
11372
- specNo: ''
11337
+ dateTimePicker: [hooks().subtract(30, 'd'), hooks()],
11338
+ code: ''
11373
11339
  });
11374
11340
  setPageNo(function (prev) {
11375
- if (prev === 1) {
11341
+ if (prev === 1 && visible) {
11376
11342
  queryItems();
11377
11343
  }
11378
11344
  return 1;
11379
11345
  });
11380
11346
  };
11381
- var handleDelete = function handleDelete(record) {
11347
+ // const getShopList = async () => {
11348
+ // const { success, data } = await request('/qy/diamond/getConfigInfo', {
11349
+ // method: 'get',
11350
+ // params: {
11351
+ // key: 'company-third-shop-info',
11352
+ // },
11353
+ // });
11354
+ // const obj: any = JSON.parse(data || '{}');
11355
+ // if (success) {
11356
+ // const list = (obj?.[companyKey] || []).map((item: any) => {
11357
+ // return {
11358
+ // label: item.shopName,
11359
+ // value: item.shopCode,
11360
+ // };
11361
+ // });
11362
+ // setShopList(list);
11363
+ // }
11364
+ // };
11365
+ var onValuesChange = function onValuesChange(changedValues) {
11366
+ if (changedValues === null || changedValues === void 0 ? void 0 : changedValues['shopId']) {
11367
+ queryItems(changedValues === null || changedValues === void 0 ? void 0 : changedValues.shopId);
11368
+ pubsub.publish('changeShopCode', {
11369
+ shopCode: changedValues.shopId
11370
+ });
11371
+ }
11372
+ };
11373
+ var handleDelete = function handleDelete(record, index) {
11382
11374
  var newSelectList = selectList.filter(function (item) {
11383
11375
  return item.specId !== record.specId;
11384
11376
  });
11385
11377
  setSelect(_toConsumableArray(newSelectList));
11378
+ setSelectIds(_toConsumableArray(newSelectList.map(function (item) {
11379
+ return item.specId;
11380
+ })));
11386
11381
  };
11387
11382
  var displaySelectedColumns = [{
11388
11383
  dataIndex: 'operation',
11389
11384
  title: '',
11390
11385
  ellipsis: true,
11391
11386
  width: 50,
11392
- render: function render(_, record) {
11387
+ render: function render(_, record, index) {
11393
11388
  return /*#__PURE__*/React.createElement(DeleteOutlined, {
11394
11389
  onClick: function onClick() {
11395
11390
  return handleDelete(record);
@@ -11420,10 +11415,8 @@ var GoodList = function GoodList(props, ref) {
11420
11415
  }];
11421
11416
  var expandedRowSelection = {
11422
11417
  fixed: true,
11423
- selectedRowKeys: selectList.map(function (item) {
11424
- return item.specId;
11425
- }),
11426
- onSelect: function onSelect(record, selected) {
11418
+ selectedRowKeys: selectIds,
11419
+ onSelect: function onSelect(record, selected, selectedRows, nativeEvent) {
11427
11420
  var tempList = [];
11428
11421
  if (selected) {
11429
11422
  tempList = [].concat(_toConsumableArray(selectList), [record]);
@@ -11433,6 +11426,9 @@ var GoodList = function GoodList(props, ref) {
11433
11426
  });
11434
11427
  }
11435
11428
  setSelect(_toConsumableArray(tempList));
11429
+ setSelectIds(_toConsumableArray(tempList.map(function (item) {
11430
+ return item.specId;
11431
+ })));
11436
11432
  },
11437
11433
  onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
11438
11434
  var tempAllList = [];
@@ -11446,12 +11442,15 @@ var GoodList = function GoodList(props, ref) {
11446
11442
  });
11447
11443
  }
11448
11444
  setSelect(_toConsumableArray(tempAllList));
11445
+ setSelectIds(_toConsumableArray(tempAllList.map(function (item) {
11446
+ return item.specId;
11447
+ })));
11449
11448
  }
11450
11449
  };
11451
- var expandedRowRender = function expandedRowRender(record) {
11450
+ var expandedRowRender = function expandedRowRender(record, index, indent, expanded) {
11452
11451
  return /*#__PURE__*/React.createElement(Table, {
11453
- rowKey: "specId",
11454
- size: "small",
11452
+ rowKey: 'specId',
11453
+ size: 'small',
11455
11454
  columns: expandedColumns,
11456
11455
  dataSource: record.itemDetailList || [],
11457
11456
  pagination: false,
@@ -11461,61 +11460,43 @@ var GoodList = function GoodList(props, ref) {
11461
11460
  }
11462
11461
  });
11463
11462
  };
11464
- React.useEffect(function () {
11465
- queryItems();
11466
- }, []);
11467
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form, {
11463
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
11464
+ title: '选择商品',
11465
+ okText: '确认',
11466
+ cancelText: '取消',
11467
+ visible: visible,
11468
+ width: width || 850,
11469
+ onCancel: function onCancel() {
11470
+ _onCancel();
11471
+ },
11472
+ onOk: onOk,
11473
+ wrapClassName: "goodModal"
11474
+ }, /*#__PURE__*/React.createElement(Form, {
11468
11475
  layout: "inline",
11469
11476
  form: form,
11470
- onFinish: queryItems,
11477
+ onFinish: onFinish,
11478
+ onValuesChange: onValuesChange,
11471
11479
  initialValues: {
11472
- goodNo: '',
11473
- specNo: '',
11474
- dateTimePicker: getInitTime()
11480
+ code: ''
11475
11481
  }
11476
11482
  }, /*#__PURE__*/React.createElement(Form.Item, {
11477
- name: "dateTimePicker",
11478
- style: {
11479
- marginBottom: '12px'
11480
- }
11483
+ name: "dateTimePicker"
11481
11484
  }, /*#__PURE__*/React.createElement(RangePicker, {
11482
11485
  style: {
11483
- width: '240px'
11486
+ width: '350px'
11484
11487
  },
11485
11488
  placeholder: ['开始日期', '结束日期'],
11486
- showTime: false,
11487
- disabledDate: disabledDate,
11488
- onCalendarChange: function onCalendarChange(val) {
11489
- return setDates(val);
11490
- },
11491
- onOpenChange: onOpenChange
11489
+ showTime: true,
11490
+ defaultValue: [hooks(initStartTime.format(dateFormat), dateFormat), hooks(initEndTime.format(dateFormat), dateFormat)]
11492
11491
  })), /*#__PURE__*/React.createElement(Form.Item, {
11493
- name: "goodNo",
11494
- style: {
11495
- marginBottom: '12px'
11496
- }
11492
+ name: "code"
11497
11493
  }, /*#__PURE__*/React.createElement(Input, {
11498
11494
  placeholder: "\u5546\u54C1SPU\u7F16\u7801",
11499
11495
  allowClear: true,
11500
11496
  style: {
11501
11497
  width: 150
11502
11498
  }
11503
- })), /*#__PURE__*/React.createElement(Form.Item, {
11504
- name: "specNo",
11505
- style: {
11506
- marginBottom: '12px'
11507
- }
11508
- }, /*#__PURE__*/React.createElement(Input, {
11509
- placeholder: "\u5546\u54C1SKU\u7F16\u7801",
11510
- allowClear: true,
11511
- style: {
11512
- width: 150
11513
- }
11514
- })), /*#__PURE__*/React.createElement(Form.Item, {
11515
- style: {
11516
- marginBottom: '12px'
11517
- }
11518
- }, /*#__PURE__*/React.createElement(Button, {
11499
+ })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
11519
11500
  type: "primary",
11520
11501
  htmlType: "submit",
11521
11502
  style: {
@@ -11525,10 +11506,10 @@ var GoodList = function GoodList(props, ref) {
11525
11506
  onClick: onReset
11526
11507
  }, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement("div", {
11527
11508
  style: {
11528
- marginTop: '4px'
11509
+ marginTop: '16px'
11529
11510
  }
11530
11511
  }, /*#__PURE__*/React.createElement(Table, {
11531
- rowKey: "goodNo",
11512
+ rowKey: 'goodNo',
11532
11513
  columns: columns$1,
11533
11514
  dataSource: goodList,
11534
11515
  loading: loading,
@@ -11545,14 +11526,14 @@ var GoodList = function GoodList(props, ref) {
11545
11526
  current: pageNo,
11546
11527
  pageSize: pageSize,
11547
11528
  pageSizeOptions: [],
11548
- onChange: setPageNo
11529
+ onChange: pageChange
11549
11530
  }
11550
11531
  })), !!selectList.length && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, "\u5DF2\u7ECF\u9009\u62E9\u5546\u54C1\uFF08", selectList.length, "\uFF09"), /*#__PURE__*/React.createElement("div", {
11551
11532
  style: {
11552
11533
  marginTop: '16px'
11553
11534
  }
11554
11535
  }, /*#__PURE__*/React.createElement(Table, {
11555
- rowKey: "specId",
11536
+ rowKey: 'specId',
11556
11537
  columns: [].concat(displaySelectedColumns, expandedColumns),
11557
11538
  dataSource: displaySelectList,
11558
11539
  pagination: false,
@@ -11563,48 +11544,7 @@ var GoodList = function GoodList(props, ref) {
11563
11544
  style: {
11564
11545
  width: '100%'
11565
11546
  }
11566
- }))));
11567
- };
11568
- var WdtGoodList = /*#__PURE__*/forwardRef(GoodList);
11569
-
11570
- var GoodsModal$3 = function GoodsModal(props, ref) {
11571
- useImperativeHandle(ref, function () {
11572
- return {
11573
- open: function open() {
11574
- setVisible(true);
11575
- }
11576
- };
11577
- });
11578
- var onSubmit = props.onSubmit,
11579
- width = props.width;
11580
- var _useState = useState(false),
11581
- _useState2 = _slicedToArray(_useState, 2),
11582
- visible = _useState2[0],
11583
- setVisible = _useState2[1];
11584
- var wdtGoodListRef = useRef(null);
11585
- var _onCancel = function onCancel() {
11586
- setVisible(false);
11587
- };
11588
- var onOk = function onOk() {
11589
- var _wdtGoodListRef$curre;
11590
- var selectedList = ((_wdtGoodListRef$curre = wdtGoodListRef.current) === null || _wdtGoodListRef$curre === void 0 ? void 0 : _wdtGoodListRef$curre.getSelectGoodList()) || [];
11591
- onSubmit(selectedList);
11592
- _onCancel();
11593
- };
11594
- return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
11595
- title: '选择商品',
11596
- okText: '确认',
11597
- cancelText: '取消',
11598
- visible: visible,
11599
- width: width || 850,
11600
- onCancel: function onCancel() {
11601
- _onCancel();
11602
- },
11603
- onOk: onOk,
11604
- wrapClassName: "goodModal"
11605
- }, /*#__PURE__*/React.createElement(WdtGoodList, {
11606
- ref: wdtGoodListRef
11607
- })));
11547
+ })))));
11608
11548
  };
11609
11549
  var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
11610
11550
 
@@ -12391,6 +12331,20 @@ var typeMap = {
12391
12331
  money: 'money',
12392
12332
  share: 'share'
12393
12333
  }
12334
+ },
12335
+ WDT_REISSUE_GOODS: {
12336
+ key: 'wdtReissueGoods',
12337
+ name: '旺店通',
12338
+ typeName: 'wdtReissueType',
12339
+ reissueSelectList: 'wdtReissueSelectList',
12340
+ reissueSelectListReturn: 'wdtReissueSelectListReturn',
12341
+ reissueDeleteGood: 'wdtReissueDeleteGood',
12342
+ changeShopCode: 'wdtChangeShopCode',
12343
+ reissueType: 'wdtReissueType',
12344
+ formatDefaultField: {
12345
+ money: 'orderPrice',
12346
+ share: 'sharePrice'
12347
+ }
12394
12348
  }
12395
12349
  };
12396
12350
  var BsReissue = function BsReissue(props) {
@@ -12993,245 +12947,6 @@ var CommonGoods = function CommonGoods(props) {
12993
12947
  }));
12994
12948
  };
12995
12949
 
12996
- var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
12997
- var typeMap$1 = {
12998
- WDT_REISSUE_GOODS: {
12999
- key: 'wdtReissueGoods',
13000
- name: '旺店通',
13001
- typeName: 'wdtReissueType',
13002
- wdtSystemOrder: 'wdtSystemOrder',
13003
- wdtSystemOrderNo: 'wdtSystemOrderNo',
13004
- reissueSelectList: 'wdtReissueSelectList',
13005
- reissueSelectListReturn: 'wdtReissueSelectListReturn',
13006
- reissueDeleteGood: 'wdtReissueDeleteGood',
13007
- changeShopCode: 'wdtChangeShopCode',
13008
- reissueType: 'wdtReissueType',
13009
- formatDefaultField: {
13010
- money: 'orderPrice',
13011
- share: 'sharePrice'
13012
- }
13013
- }
13014
- };
13015
- var wdtReissue = function wdtReissue(props) {
13016
- var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type11, _typeMap$type25, _typeMap$type26, _value$typeMap$type$w2, _typeMap$type27, _typeMap$type28, _typeMap$type29;
13017
- var value = props.value,
13018
- onChange = props.onChange,
13019
- _props$reasonList = props.reasonList,
13020
- reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
13021
- disabled = props.disabled,
13022
- type = props.type,
13023
- other = _objectWithoutProperties(props, _excluded$g);
13024
- var valueRef = useRef({});
13025
- useEffect(function () {
13026
- var _typeMap$type, _typeMap$type4;
13027
- valueRef.current = value;
13028
- pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type = typeMap$1[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.reissueDeleteGood), function (_, data) {
13029
- if (disabled) return;
13030
- if (value) {
13031
- var _typeMap$type2, _typeMap$type3;
13032
- var newValue = _objectSpread2({}, value);
13033
- newValue["".concat((_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.key)].filter(function (item) {
13034
- return item.sku !== data;
13035
- });
13036
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13037
- }
13038
- });
13039
- pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.changeShopCode), function (type, data) {
13040
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
13041
- shopCode: data.shopCode
13042
- }));
13043
- });
13044
- }, [value, disabled]);
13045
- useEffect(function () {
13046
- var _value$orders, _value$showOrderInfo;
13047
- if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
13048
- if (type === 'WDT_SYSTEM_ORDER') {
13049
- getWdtOrderList(value.orderNo);
13050
- }
13051
- }
13052
- return;
13053
- }, [value]);
13054
- useEffect(function () {
13055
- var _typeMap$type5;
13056
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.wdtSystemOrderNo];
13057
- if (wdtSystemOrderNo) {
13058
- var _value$typeMap$type$t, _typeMap$type6;
13059
- if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
13060
- getGoodItems(wdtSystemOrderNo);
13061
- }
13062
- }
13063
- return;
13064
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
13065
- useEffect(function () {
13066
- var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
13067
- var typeName = value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0];
13068
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.wdtSystemOrderNo];
13069
- if (['1'].includes(typeName)) {
13070
- wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
13071
- } else if (['2'].includes(typeName)) {
13072
- var _typeMap$type10;
13073
- var newValue = _objectSpread2({}, value);
13074
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = [];
13075
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13076
- }
13077
- return;
13078
- }, [value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]]);
13079
- var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
13080
- var _value$typeMap$type$w, _typeMap$type12, _ref;
13081
- var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$w = value[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.wdtSystemOrder]) === null || _value$typeMap$type$w === void 0 ? void 0 : _value$typeMap$type$w.orders;
13082
- var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
13083
- return orderItem.billNo === wdtSystemOrderNo;
13084
- });
13085
- if (order) {
13086
- var _typeMap$type13, _order$goodDetails;
13087
- var newValue = _objectSpread2({}, value);
13088
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key)] = order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.map(function (item) {
13089
- var _typeMap$type14, _typeMap$type15;
13090
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.formatDefaultField.money)] = 0;
13091
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.share)] = 0;
13092
- item.canUpdateNumber = true;
13093
- return item;
13094
- });
13095
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13096
- }
13097
- };
13098
- var getWdtOrderList = /*#__PURE__*/function () {
13099
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
13100
- var _yield$request, success, data, _typeMap$type16, _typeMap$type17, orders, showOrderInfo;
13101
- return _regeneratorRuntime().wrap(function _callee$(_context) {
13102
- while (1) switch (_context.prev = _context.next) {
13103
- case 0:
13104
- _context.next = 2;
13105
- return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
13106
- method: 'post',
13107
- data: {
13108
- billNo: orderNo
13109
- }
13110
- });
13111
- case 2:
13112
- _yield$request = _context.sent;
13113
- success = _yield$request.success;
13114
- data = _yield$request.data;
13115
- if (success) {
13116
- orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
13117
- return _objectSpread2(_objectSpread2({}, item), {}, {
13118
- billNo: item.tradeNo,
13119
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13120
- billTag: item.tagName
13121
- });
13122
- });
13123
- showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
13124
- return {
13125
- billNo: item.tradeNo,
13126
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13127
- billTag: item.tagName
13128
- };
13129
- });
13130
- onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.wdtSystemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.wdtSystemOrder]), {}, {
13131
- showOrderInfo: showOrderInfo,
13132
- orders: orders
13133
- }))));
13134
- }
13135
- case 6:
13136
- case "end":
13137
- return _context.stop();
13138
- }
13139
- }, _callee);
13140
- }));
13141
- return function getWdtOrderList(_x) {
13142
- return _ref2.apply(this, arguments);
13143
- };
13144
- }();
13145
- var changeTypeHandle = function changeTypeHandle(val) {
13146
- var _typeMap$type18, _typeMap$type19;
13147
- var newValue = _objectSpread2({}, value);
13148
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName)] = val;
13149
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
13150
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13151
- valueRef.current = newValue;
13152
- // if (['2'].includes(val[0])) {
13153
- // onChange?.(newValue);
13154
- // valueRef.current = newValue;
13155
- // }
13156
- // pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
13157
- // val: val[0],
13158
- // goodValue: newValue,
13159
- // });
13160
- };
13161
-
13162
- var changeGoodHandle = function changeGoodHandle(val) {
13163
- var _typeMap$type20;
13164
- var newValue = _objectSpread2({}, value);
13165
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = (val || []).map(function (item) {
13166
- var _typeMap$type21, _typeMap$type22;
13167
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.money)] = 0;
13168
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.formatDefaultField.share)] = 0;
13169
- return item;
13170
- });
13171
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13172
- };
13173
- var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
13174
- var _typeMap$type23;
13175
- var newValue = _objectSpread2({}, value);
13176
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.wdtSystemOrderNo)] = val;
13177
- console.log('changeSystemOrderHandle', val, newValue);
13178
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13179
- };
13180
- //显示选择商品按钮 原单换不显示选择商品
13181
- var showChangeBtn = useMemo(function () {
13182
- var _typeMap$type24;
13183
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.wdtSystemOrderNo]);
13184
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]]);
13185
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
13186
- gutter: 8
13187
- }, /*#__PURE__*/React.createElement(Col, {
13188
- className: "gutter-row",
13189
- span: 6
13190
- }, /*#__PURE__*/React.createElement(Select, {
13191
- style: {
13192
- marginBottom: '8px'
13193
- },
13194
- disabled: disabled,
13195
- allowClear: false,
13196
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo)],
13197
- onChange: function onChange(val) {
13198
- return changeSystemOrderHandle(val);
13199
- }
13200
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$w2 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.wdtSystemOrder]) === null || _value$typeMap$type$w2 === void 0 ? void 0 : _value$typeMap$type$w2.showOrderInfo) || []).map(function (item) {
13201
- return /*#__PURE__*/React.createElement(Select.Option, {
13202
- key: item.billNo,
13203
- value: item.billNo,
13204
- label: item.billNo
13205
- }, item.billNo);
13206
- }))), /*#__PURE__*/React.createElement(Col, {
13207
- className: "gutter-row",
13208
- span: 6
13209
- }, /*#__PURE__*/React.createElement(Cascader, {
13210
- style: {
13211
- marginBottom: '8px'
13212
- },
13213
- disabled: disabled,
13214
- allowClear: false,
13215
- options: reasonList,
13216
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
13217
- onChange: function onChange(val) {
13218
- return changeTypeHandle(val);
13219
- }
13220
- }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
13221
- key: 'reissueGoods'
13222
- }, other), {}, {
13223
- type: type,
13224
- disabled: disabled,
13225
- canUpdateNumber: showChangeBtn,
13226
- showChangeBtn: showChangeBtn,
13227
- shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
13228
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
13229
- onChange: function onChange(val) {
13230
- return changeGoodHandle(val);
13231
- }
13232
- })));
13233
- };
13234
-
13235
12950
  var css_248z$a = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
13236
12951
  styleInject(css_248z$a);
13237
12952
 
@@ -13708,12 +13423,12 @@ var Goods$1 = function Goods(props, ref) {
13708
13423
  };
13709
13424
  var index$2 = /*#__PURE__*/forwardRef(Goods$1);
13710
13425
 
13711
- var _excluded$h = ["onChange", "value", "failValue"];
13426
+ var _excluded$g = ["onChange", "value", "failValue"];
13712
13427
  function CommonStatus(props) {
13713
13428
  var onChange = props.onChange,
13714
13429
  value = props.value,
13715
13430
  failValue = props.failValue,
13716
- other = _objectWithoutProperties(props, _excluded$h);
13431
+ other = _objectWithoutProperties(props, _excluded$g);
13717
13432
  var changeHandle = function changeHandle(val) {
13718
13433
  onChange === null || onChange === void 0 ? void 0 : onChange({
13719
13434
  status: val,
@@ -13832,7 +13547,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
13832
13547
  })) : null) : null);
13833
13548
  };
13834
13549
 
13835
- var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
13550
+ var _excluded$h = ["value", "onChange", "disabled", "failValue", "type"];
13836
13551
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13837
13552
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
13838
13553
  var _props$value = props.value,
@@ -13842,7 +13557,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13842
13557
  failValue = props.failValue,
13843
13558
  _props$type = props.type,
13844
13559
  type = _props$type === void 0 ? 1 : _props$type,
13845
- other = _objectWithoutProperties(props, _excluded$i);
13560
+ other = _objectWithoutProperties(props, _excluded$h);
13846
13561
  var _useState = useState(0),
13847
13562
  _useState2 = _slicedToArray(_useState, 2),
13848
13563
  changeIndex = _useState2[0],
@@ -13908,7 +13623,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13908
13623
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
13909
13624
  };
13910
13625
 
13911
- var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
13626
+ var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
13912
13627
  var msgTypeCh = {
13913
13628
  ding: '钉钉',
13914
13629
  wechat: '微信',
@@ -13924,7 +13639,7 @@ var MsgStatus = function MsgStatus(props) {
13924
13639
  failValue = props.failValue,
13925
13640
  _props$type = props.type,
13926
13641
  type = _props$type === void 0 ? 1 : _props$type,
13927
- other = _objectWithoutProperties(props, _excluded$j);
13642
+ other = _objectWithoutProperties(props, _excluded$i);
13928
13643
  var _useState = useState(0),
13929
13644
  _useState2 = _slicedToArray(_useState, 2),
13930
13645
  changeIndex = _useState2[0],
@@ -13993,4 +13708,4 @@ var CalculationInput = function CalculationInput(props) {
13993
13708
  }, config === null || config === void 0 ? void 0 : config.unit));
13994
13709
  };
13995
13710
 
13996
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
13711
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };