@kmkf-fe-packages/basic-components 2.0.16 → 2.0.17

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.js CHANGED
@@ -11020,7 +11020,7 @@ var typeInitValueMap = {
11020
11020
  }]
11021
11021
  };
11022
11022
  var jstGoods = function jstGoods(props) {
11023
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
11023
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9;
11024
11024
  var _props$value = props.value,
11025
11025
  value = _props$value === void 0 ? [] : _props$value,
11026
11026
  onChange = props.onChange,
@@ -11037,7 +11037,8 @@ var jstGoods = function jstGoods(props) {
11037
11037
  changeIndex = _useState2[0],
11038
11038
  setChangeIndex = _useState2[1]; //选中的包裹
11039
11039
  var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
11040
- var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
11040
+ var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
11041
+ var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
11041
11042
  var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
11042
11043
  React.useEffect(function () {
11043
11044
  //没有值塞个默认值
@@ -11049,7 +11050,7 @@ var jstGoods = function jstGoods(props) {
11049
11050
  if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
11050
11051
  setChangeIndex(0);
11051
11052
  }
11052
- }, value);
11053
+ }, [value]);
11053
11054
  var content = function content(item, index) {
11054
11055
  return /*#__PURE__*/React__default['default'].createElement("div", {
11055
11056
  style: {
@@ -11077,7 +11078,14 @@ var jstGoods = function jstGoods(props) {
11077
11078
  changeOrderInfo['sendId'] = option.value;
11078
11079
  }
11079
11080
  if (isSelectName && type === 'sendName') {
11080
- changeOrderInfo['sendSnapshotName'] = option.label;
11081
+ if (isSendGoodSavedId) {
11082
+ // 如果发货仓名称存的是id,将名称存入快照
11083
+ changeOrderInfo['sendSnapshotName'] = option.label;
11084
+ } else {
11085
+ // 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
11086
+ changeOrderInfo['sendSnapshotId'] = option.value;
11087
+ changeOrderInfo['sendName'] = option.label;
11088
+ }
11081
11089
  }
11082
11090
  var newList = _toConsumableArray(value);
11083
11091
  newList[changeIndex] = changeOrderInfo;
@@ -11177,7 +11185,7 @@ var jstGoods = function jstGoods(props) {
11177
11185
  showSearch: true,
11178
11186
  options: sendOptions,
11179
11187
  filterOption: filterOption,
11180
- value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
11188
+ value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendSnapshotId) || ((_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName) || null,
11181
11189
  onChange: function onChange(value, option) {
11182
11190
  return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
11183
11191
  }
@@ -11187,14 +11195,14 @@ var jstGoods = function jstGoods(props) {
11187
11195
  onChange: function onChange(e) {
11188
11196
  return changeInputHandle(e.target.value, 'sendName');
11189
11197
  },
11190
- value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
11198
+ value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
11191
11199
  }))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11192
11200
  disabled: disabled,
11193
11201
  placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
11194
11202
  onChange: function onChange(e) {
11195
11203
  return changeInputHandle(e.target.value, 'deliveryNo');
11196
11204
  },
11197
- value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
11205
+ value: (_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendName
11198
11206
  })) : null) : null);
11199
11207
  };
11200
11208
 
@@ -12166,19 +12174,13 @@ var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
12166
12174
  var getTableData$1 = function getTableData(_ref, formData) {
12167
12175
  var current = _ref.current,
12168
12176
  pageSize = _ref.pageSize;
12169
- var data = {
12170
- goodNo: formData.goodNo || null,
12171
- goodName: formData.goodName || null,
12172
- skuCode: formData.skuCode || null,
12173
- skuId: formData.skuId || null
12174
- };
12175
12177
  return extendRequest('/qy/gdfw/product/product/page', {
12176
12178
  method: 'post',
12177
12179
  data: _objectSpread2({
12178
12180
  pageSize: pageSize,
12179
12181
  pageNo: current,
12180
- platform: 'BS_E3_ERP'
12181
- }, data)
12182
+ platform: 'JST_ERP'
12183
+ }, formData)
12182
12184
  }).then(function (res) {
12183
12185
  var _res$data = res.data,
12184
12186
  _res$data$productSkuL = _res$data.productSkuList,
@@ -12186,9 +12188,7 @@ var getTableData$1 = function getTableData(_ref, formData) {
12186
12188
  _res$data$total = _res$data.total,
12187
12189
  total = _res$data$total === void 0 ? 0 : _res$data$total;
12188
12190
  var newProducts = productSkuList.map(function (item, index) {
12189
- return _objectSpread2(_objectSpread2({}, item), {}, {
12190
- index: index + 1
12191
- });
12191
+ return _objectSpread2({}, item);
12192
12192
  });
12193
12193
  return {
12194
12194
  total: total,
@@ -12207,90 +12207,86 @@ var columns$2 = [{
12207
12207
  }, index + 1);
12208
12208
  },
12209
12209
  width: 80
12210
- }, {
12211
- dataIndex: 'specNo',
12212
- title: "SKU",
12213
- ellipsis: true,
12214
- width: 200
12215
- }, {
12216
- dataIndex: 'specId',
12217
- title: "SKU ID",
12218
- ellipsis: true,
12219
- width: 80
12220
12210
  }, {
12221
12211
  dataIndex: 'goodName',
12222
- title: "\u5546\u54C1\u540D\u79F0",
12223
- ellipsis: true,
12224
- width: 250
12212
+ title: '商品名称',
12213
+ width: 250,
12214
+ ellipsis: true
12225
12215
  }, {
12226
- dataIndex: 'goodShortName',
12227
- title: "\u5546\u54C1\u7B80\u79F0",
12228
- ellipsis: true,
12229
- width: 250
12230
- },
12231
- // {
12232
- // dataIndex: 'goodPicUrl',
12233
- // title: `商品图片`,
12234
- // ellipsis: true,
12235
- // width: 100,
12236
- // render: (picUrl: string) => {
12237
- // return (
12238
- // <img
12239
- // style={{
12240
- // width: '40px',
12241
- // height: '40px',
12242
- // objectFit: 'contain',
12243
- // }}
12244
- // src={picUrl}
12245
- // ></img>
12246
- // );
12247
- // },
12248
- // },
12249
- {
12250
12216
  dataIndex: 'goodNo',
12251
- title: "\u8D27\u53F7",
12252
- ellipsis: true,
12253
- width: 150
12254
- }, {
12255
- dataIndex: 'goodId',
12256
- title: "\u8D27\u53F7ID",
12257
- ellipsis: true,
12258
- width: 100
12217
+ title: '商品编码',
12218
+ width: 200,
12219
+ ellipsis: true
12259
12220
  }, {
12260
- dataIndex: 'colorName',
12261
- title: "\u989C\u8272\u540D\u79F0",
12262
- ellipsis: true,
12263
- width: 100
12221
+ dataIndex: 'styleCode',
12222
+ title: '款式编码',
12223
+ width: 200,
12224
+ ellipsis: true
12264
12225
  }, {
12265
- dataIndex: 'colorCode',
12266
- title: "\u989C\u8272\u4EE3\u7801",
12267
- ellipsis: true,
12268
- width: 100
12226
+ dataIndex: 'propertiesValue',
12227
+ title: '规格值',
12228
+ width: 200,
12229
+ ellipsis: true
12269
12230
  }, {
12270
- dataIndex: 'sizeName',
12271
- title: "\u5C3A\u7801\u540D\u79F0",
12272
- ellipsis: true,
12273
- width: 100
12231
+ dataIndex: 'goodPicUrl',
12232
+ title: '商品图片',
12233
+ width: 100,
12234
+ render: function render(picUrl) {
12235
+ return /*#__PURE__*/React__default['default'].createElement("img", {
12236
+ style: {
12237
+ width: '40px',
12238
+ height: '40px',
12239
+ objectFit: 'contain'
12240
+ },
12241
+ src: picUrl
12242
+ });
12243
+ }
12274
12244
  }, {
12275
- dataIndex: 'sizeCode',
12276
- title: "\u5C3A\u7801\u4EE3\u7801",
12245
+ dataIndex: 'goodShortName',
12246
+ title: "\u5546\u54C1\u7B80\u79F0",
12277
12247
  ellipsis: true,
12278
- width: 100
12248
+ width: 250
12279
12249
  }, {
12280
12250
  dataIndex: 'brandName',
12281
- title: "\u54C1\u724C\u540D\u79F0",
12251
+ title: '品牌名称',
12252
+ width: 200,
12253
+ ellipsis: true
12254
+ }, {
12255
+ dataIndex: 'retailPrice',
12256
+ title: "\u9500\u552E\u4EF7\u683C",
12282
12257
  ellipsis: true,
12283
- width: 100
12258
+ width: 100,
12259
+ render: function render(price) {
12260
+ return price || price === 0 ? Number(price).toFixed(2) : '';
12261
+ }
12284
12262
  }, {
12285
12263
  dataIndex: 'marketPrice',
12286
12264
  title: "\u5E02\u573A\u4EF7",
12287
12265
  ellipsis: true,
12288
- width: 100
12266
+ width: 100,
12267
+ render: function render(price) {
12268
+ return price || price === 0 ? Number(price).toFixed(2) : '';
12269
+ }
12289
12270
  }, {
12290
- dataIndex: 'retailPrice',
12291
- title: "\u552E\u4EF7",
12271
+ dataIndex: 'costPrice',
12272
+ title: "\u6210\u672C\u4EF7",
12292
12273
  ellipsis: true,
12293
- width: 100
12274
+ width: 100,
12275
+ render: function render(price) {
12276
+ return price || price === 0 ? Number(price).toFixed(2) : '';
12277
+ }
12278
+ }, {
12279
+ dataIndex: 'skuType',
12280
+ title: "\u5546\u54C1\u7C7B\u578B",
12281
+ ellipsis: true,
12282
+ width: 100,
12283
+ render: function render() {
12284
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
12285
+ return {
12286
+ 'combine': '组合装商品',
12287
+ 'normal': '普通商品'
12288
+ }[type] || type;
12289
+ }
12294
12290
  }];
12295
12291
  var GoodList$1 = function GoodList(props, ref) {
12296
12292
  var _useState = React.useState([]),
@@ -12324,17 +12320,6 @@ var GoodList$1 = function GoodList(props, ref) {
12324
12320
  layout: "inline",
12325
12321
  form: form
12326
12322
  }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12327
- name: "goodNo",
12328
- style: {
12329
- marginBottom: '12px'
12330
- }
12331
- }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
12332
- placeholder: "\u5546\u54C1\u8D27\u53F7",
12333
- allowClear: true,
12334
- style: {
12335
- width: 150
12336
- }
12337
- })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12338
12323
  name: "goodName",
12339
12324
  style: {
12340
12325
  marginBottom: '12px'
@@ -12346,23 +12331,23 @@ var GoodList$1 = function GoodList(props, ref) {
12346
12331
  width: 150
12347
12332
  }
12348
12333
  })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12349
- name: "skuCode",
12334
+ name: "goodNo",
12350
12335
  style: {
12351
12336
  marginBottom: '12px'
12352
12337
  }
12353
12338
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
12354
- placeholder: "SKU",
12339
+ placeholder: "\u5546\u54C1\u7F16\u7801",
12355
12340
  allowClear: true,
12356
12341
  style: {
12357
12342
  width: 150
12358
12343
  }
12359
12344
  })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12360
- name: "skuId",
12345
+ name: "styleCode",
12361
12346
  style: {
12362
12347
  marginBottom: '12px'
12363
12348
  }
12364
12349
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
12365
- placeholder: "SKU ID",
12350
+ placeholder: "\u6B3E\u5F0F\u7F16\u7801",
12366
12351
  allowClear: true,
12367
12352
  style: {
12368
12353
  width: 150
@@ -12385,41 +12370,50 @@ var GoodList$1 = function GoodList(props, ref) {
12385
12370
  fixed: true,
12386
12371
  onSelect: function onSelect(record, selected) {
12387
12372
  if (selected) {
12388
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
12373
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.goodNo]));
12389
12374
  setSelect([].concat(_toConsumableArray(selectList), [record]));
12390
12375
  } else {
12391
12376
  setSelectIds(selectIds.filter(function (t) {
12392
- return t !== record.specNo;
12377
+ return t !== record.goodNo;
12393
12378
  }));
12394
12379
  setSelect(selectList.filter(function (t) {
12395
- return t.specNo !== record.specNo;
12380
+ return t.goodNo !== record.goodNo;
12396
12381
  }));
12397
12382
  }
12398
12383
  },
12399
12384
  onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
12400
12385
  if (selected) {
12401
12386
  setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
12402
- return t.specNo;
12387
+ return t.goodNo;
12403
12388
  }))));
12404
12389
  setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
12405
12390
  } else {
12406
12391
  setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
12407
- return t.specNo;
12392
+ return t.goodNo;
12408
12393
  })));
12409
12394
  var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
12410
- return arrVal.specNo !== othVal.specNo;
12395
+ return arrVal.goodNo !== othVal.goodNo;
12411
12396
  });
12412
12397
  setSelect(list);
12413
12398
  }
12399
+ },
12400
+ getCheckboxProps: function getCheckboxProps(record) {
12401
+ var options = {
12402
+ disabled: (props.selectedRows || []).map(function (row) {
12403
+ return row.goodNo || row.skuId;
12404
+ }).includes(record.goodNo || record.skuId),
12405
+ name: record.goodNo
12406
+ };
12407
+ return options;
12414
12408
  }
12415
12409
  };
12416
12410
  var showTable = function showTable() {
12417
12411
  var handleDelete = function handleDelete(record) {
12418
12412
  setSelectIds(selectIds.filter(function (t) {
12419
- return t !== record.specNo;
12413
+ return t !== record.goodNo;
12420
12414
  }));
12421
12415
  setSelect(selectList.filter(function (t) {
12422
- return t.specNo !== record.specNo;
12416
+ return t.goodNo !== record.goodNo;
12423
12417
  }));
12424
12418
  };
12425
12419
  var showColumns = [{
@@ -12443,7 +12437,7 @@ var GoodList$1 = function GoodList(props, ref) {
12443
12437
  }
12444
12438
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
12445
12439
  columns: showColumns,
12446
- rowKey: 'specNo',
12440
+ rowKey: 'goodNo',
12447
12441
  dataSource: selectList,
12448
12442
  scroll: {
12449
12443
  x: '100%',
@@ -12463,7 +12457,7 @@ var GoodList$1 = function GoodList(props, ref) {
12463
12457
  }
12464
12458
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
12465
12459
  rowSelection: rowSelection,
12466
- rowKey: "specNo",
12460
+ rowKey: "goodNo",
12467
12461
  columns: columns$2,
12468
12462
  scroll: {
12469
12463
  x: '100%',
@@ -12480,13 +12474,15 @@ var GoodList$1 = function GoodList(props, ref) {
12480
12474
  type: "text"
12481
12475
  }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
12482
12476
  };
12483
- var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$1);
12477
+ var GyGoodsList = /*#__PURE__*/React.forwardRef(GoodList$1);
12484
12478
 
12485
- var GoodsModal$4 = function GoodsModal(props, ref) {
12479
+ var GyGoodsModal = function GyGoodsModal(props, ref) {
12486
12480
  React.useImperativeHandle(ref, function () {
12487
12481
  return {
12488
- open: function open() {
12482
+ open: function open(shopCode) {
12483
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12489
12484
  setVisible(true);
12485
+ setSelectedRows(options.value || []);
12490
12486
  }
12491
12487
  };
12492
12488
  });
@@ -12496,13 +12492,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12496
12492
  _useState2 = _slicedToArray(_useState, 2),
12497
12493
  visible = _useState2[0],
12498
12494
  setVisible = _useState2[1];
12499
- var bsE3GoodListRef = React.useRef(null);
12495
+ var _useState3 = React.useState([]),
12496
+ _useState4 = _slicedToArray(_useState3, 2),
12497
+ selectedRows = _useState4[0],
12498
+ setSelectedRows = _useState4[1];
12499
+ var gyGoodsListRef = React.useRef(null);
12500
12500
  var _onCancel = function onCancel() {
12501
12501
  setVisible(false);
12502
12502
  };
12503
12503
  var onOk = function onOk() {
12504
- var _bsE3GoodListRef$curr;
12505
- var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
12504
+ var _gyGoodsListRef$curre;
12505
+ var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
12506
12506
  onSubmit(selectedList);
12507
12507
  _onCancel();
12508
12508
  };
@@ -12517,28 +12517,28 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12517
12517
  },
12518
12518
  onOk: onOk,
12519
12519
  wrapClassName: "goodModal"
12520
- }, /*#__PURE__*/React__default['default'].createElement(BsE3GoodList, {
12521
- ref: bsE3GoodListRef
12520
+ }, /*#__PURE__*/React__default['default'].createElement(GyGoodsList, {
12521
+ ref: gyGoodsListRef,
12522
+ selectedRows: selectedRows
12522
12523
  })));
12523
12524
  };
12524
- var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
12525
+ var JstGoodsModal = /*#__PURE__*/React.forwardRef(GyGoodsModal);
12525
12526
 
12526
12527
  var getTableData$2 = function getTableData(_ref, formData) {
12527
12528
  var current = _ref.current,
12528
12529
  pageSize = _ref.pageSize;
12529
12530
  var data = {
12530
- goodShortName: formData.goodShortName || null,
12531
- skuName: formData.skuName || null,
12532
- skuCode: formData.skuCode || null,
12531
+ goodNo: formData.goodNo || null,
12533
12532
  goodName: formData.goodName || null,
12534
- goodNo: formData.goodNo || null
12533
+ skuCode: formData.skuCode || null,
12534
+ skuId: formData.skuId || null
12535
12535
  };
12536
12536
  return extendRequest('/qy/gdfw/product/product/page', {
12537
12537
  method: 'post',
12538
12538
  data: _objectSpread2({
12539
12539
  pageSize: pageSize,
12540
12540
  pageNo: current,
12541
- platform: 'GY_ERP'
12541
+ platform: 'BS_E3_ERP'
12542
12542
  }, data)
12543
12543
  }).then(function (res) {
12544
12544
  var _res$data = res.data,
@@ -12547,7 +12547,9 @@ var getTableData$2 = function getTableData(_ref, formData) {
12547
12547
  _res$data$total = _res$data.total,
12548
12548
  total = _res$data$total === void 0 ? 0 : _res$data$total;
12549
12549
  var newProducts = productSkuList.map(function (item, index) {
12550
- return _objectSpread2({}, item);
12550
+ return _objectSpread2(_objectSpread2({}, item), {}, {
12551
+ index: index + 1
12552
+ });
12551
12553
  });
12552
12554
  return {
12553
12555
  total: total,
@@ -12566,58 +12568,88 @@ var columns$3 = [{
12566
12568
  }, index + 1);
12567
12569
  },
12568
12570
  width: 80
12569
- }, {
12570
- dataIndex: 'specName',
12571
- title: 'SKU名称',
12572
- width: 250,
12573
- ellipsis: true
12574
12571
  }, {
12575
12572
  dataIndex: 'specNo',
12576
- title: 'SKU编码',
12577
- width: 200,
12578
- ellipsis: true
12573
+ title: "SKU",
12574
+ ellipsis: true,
12575
+ width: 200
12576
+ }, {
12577
+ dataIndex: 'specId',
12578
+ title: "SKU ID",
12579
+ ellipsis: true,
12580
+ width: 80
12579
12581
  }, {
12580
12582
  dataIndex: 'goodName',
12581
- title: '商品名称',
12582
- width: 250,
12583
- ellipsis: true
12583
+ title: "\u5546\u54C1\u540D\u79F0",
12584
+ ellipsis: true,
12585
+ width: 250
12584
12586
  }, {
12585
12587
  dataIndex: 'goodShortName',
12586
12588
  title: "\u5546\u54C1\u7B80\u79F0",
12587
12589
  ellipsis: true,
12588
12590
  width: 250
12589
- }, {
12591
+ },
12592
+ // {
12593
+ // dataIndex: 'goodPicUrl',
12594
+ // title: `商品图片`,
12595
+ // ellipsis: true,
12596
+ // width: 100,
12597
+ // render: (picUrl: string) => {
12598
+ // return (
12599
+ // <img
12600
+ // style={{
12601
+ // width: '40px',
12602
+ // height: '40px',
12603
+ // objectFit: 'contain',
12604
+ // }}
12605
+ // src={picUrl}
12606
+ // ></img>
12607
+ // );
12608
+ // },
12609
+ // },
12610
+ {
12590
12611
  dataIndex: 'goodNo',
12591
- title: '商品编码',
12592
- width: 200,
12593
- ellipsis: true
12612
+ title: "\u8D27\u53F7",
12613
+ ellipsis: true,
12614
+ width: 150
12594
12615
  }, {
12595
- dataIndex: 'goodPicUrl',
12596
- title: '商品图片',
12597
- width: 100,
12598
- render: function render(picUrl) {
12599
- return /*#__PURE__*/React__default['default'].createElement("img", {
12600
- style: {
12601
- width: '40px',
12602
- height: '40px',
12603
- objectFit: 'contain'
12604
- },
12605
- src: picUrl
12606
- });
12607
- }
12616
+ dataIndex: 'goodId',
12617
+ title: "\u8D27\u53F7ID",
12618
+ ellipsis: true,
12619
+ width: 100
12608
12620
  }, {
12609
- dataIndex: 'brandName',
12610
- title: '品牌名称',
12611
- width: 200,
12612
- ellipsis: true
12621
+ dataIndex: 'colorName',
12622
+ title: "\u989C\u8272\u540D\u79F0",
12623
+ ellipsis: true,
12624
+ width: 100
12613
12625
  }, {
12614
- dataIndex: 'retailPrice',
12615
- title: "\u6807\u51C6\u552E\u4EF7",
12626
+ dataIndex: 'colorCode',
12627
+ title: "\u989C\u8272\u4EE3\u7801",
12616
12628
  ellipsis: true,
12617
12629
  width: 100
12618
12630
  }, {
12619
- dataIndex: 'costPrice',
12620
- title: "\u6210\u672C\u4EF7",
12631
+ dataIndex: 'sizeName',
12632
+ title: "\u5C3A\u7801\u540D\u79F0",
12633
+ ellipsis: true,
12634
+ width: 100
12635
+ }, {
12636
+ dataIndex: 'sizeCode',
12637
+ title: "\u5C3A\u7801\u4EE3\u7801",
12638
+ ellipsis: true,
12639
+ width: 100
12640
+ }, {
12641
+ dataIndex: 'brandName',
12642
+ title: "\u54C1\u724C\u540D\u79F0",
12643
+ ellipsis: true,
12644
+ width: 100
12645
+ }, {
12646
+ dataIndex: 'marketPrice',
12647
+ title: "\u5E02\u573A\u4EF7",
12648
+ ellipsis: true,
12649
+ width: 100
12650
+ }, {
12651
+ dataIndex: 'retailPrice',
12652
+ title: "\u552E\u4EF7",
12621
12653
  ellipsis: true,
12622
12654
  width: 100
12623
12655
  }];
@@ -12653,23 +12685,23 @@ var GoodList$2 = function GoodList(props, ref) {
12653
12685
  layout: "inline",
12654
12686
  form: form
12655
12687
  }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12656
- name: "goodShortName",
12688
+ name: "goodNo",
12657
12689
  style: {
12658
12690
  marginBottom: '12px'
12659
12691
  }
12660
12692
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
12661
- placeholder: "\u5546\u54C1\u7B80\u79F0",
12693
+ placeholder: "\u5546\u54C1\u8D27\u53F7",
12662
12694
  allowClear: true,
12663
12695
  style: {
12664
12696
  width: 150
12665
12697
  }
12666
12698
  })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12667
- name: "skuName",
12699
+ name: "goodName",
12668
12700
  style: {
12669
12701
  marginBottom: '12px'
12670
12702
  }
12671
12703
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
12672
- placeholder: "\u5546\u54C1sku\u540D\u79F0",
12704
+ placeholder: "\u5546\u54C1\u540D\u79F0",
12673
12705
  allowClear: true,
12674
12706
  style: {
12675
12707
  width: 150
@@ -12680,29 +12712,18 @@ var GoodList$2 = function GoodList(props, ref) {
12680
12712
  marginBottom: '12px'
12681
12713
  }
12682
12714
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
12683
- placeholder: "\u5546\u54C1sku\u7F16\u7801",
12684
- allowClear: true,
12685
- style: {
12686
- width: 150
12687
- }
12688
- })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12689
- name: "goodName",
12690
- style: {
12691
- marginBottom: '12px'
12692
- }
12693
- }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
12694
- placeholder: "\u5546\u54C1\u540D\u79F0",
12715
+ placeholder: "SKU",
12695
12716
  allowClear: true,
12696
12717
  style: {
12697
12718
  width: 150
12698
12719
  }
12699
12720
  })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12700
- name: "goodNo",
12721
+ name: "skuId",
12701
12722
  style: {
12702
12723
  marginBottom: '12px'
12703
12724
  }
12704
12725
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
12705
- placeholder: "\u5546\u54C1\u7F16\u7801",
12726
+ placeholder: "SKU ID",
12706
12727
  allowClear: true,
12707
12728
  style: {
12708
12729
  width: 150
@@ -12820,9 +12841,9 @@ var GoodList$2 = function GoodList(props, ref) {
12820
12841
  type: "text"
12821
12842
  }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
12822
12843
  };
12823
- var GyGoodsList = /*#__PURE__*/React.forwardRef(GoodList$2);
12844
+ var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$2);
12824
12845
 
12825
- var GyGoodsModal = function GyGoodsModal(props, ref) {
12846
+ var GoodsModal$4 = function GoodsModal(props, ref) {
12826
12847
  React.useImperativeHandle(ref, function () {
12827
12848
  return {
12828
12849
  open: function open() {
@@ -12836,13 +12857,13 @@ var GyGoodsModal = function GyGoodsModal(props, ref) {
12836
12857
  _useState2 = _slicedToArray(_useState, 2),
12837
12858
  visible = _useState2[0],
12838
12859
  setVisible = _useState2[1];
12839
- var gyGoodsListRef = React.useRef(null);
12860
+ var bsE3GoodListRef = React.useRef(null);
12840
12861
  var _onCancel = function onCancel() {
12841
12862
  setVisible(false);
12842
12863
  };
12843
12864
  var onOk = function onOk() {
12844
- var _gyGoodsListRef$curre;
12845
- var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
12865
+ var _bsE3GoodListRef$curr;
12866
+ var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
12846
12867
  onSubmit(selectedList);
12847
12868
  _onCancel();
12848
12869
  };
@@ -12857,35 +12878,375 @@ var GyGoodsModal = function GyGoodsModal(props, ref) {
12857
12878
  },
12858
12879
  onOk: onOk,
12859
12880
  wrapClassName: "goodModal"
12860
- }, /*#__PURE__*/React__default['default'].createElement(GyGoodsList, {
12861
- ref: gyGoodsListRef
12881
+ }, /*#__PURE__*/React__default['default'].createElement(BsE3GoodList, {
12882
+ ref: bsE3GoodListRef
12862
12883
  })));
12863
12884
  };
12864
- var GyGoodsModal$1 = /*#__PURE__*/React.forwardRef(GyGoodsModal);
12885
+ var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
12865
12886
 
12866
- var getColumns = function getColumns(_ref) {
12867
- var _ref$text = _ref.text,
12868
- disabled = _ref.disabled,
12869
- updateHandle = _ref.updateHandle;
12870
- return {
12871
- //百胜E3补发商品
12872
- BS_E3_REISSUE_GOODS: [{
12873
- dataIndex: 'sku',
12874
- title: "SKU",
12887
+ var getTableData$3 = function getTableData(_ref, formData) {
12888
+ var current = _ref.current,
12889
+ pageSize = _ref.pageSize;
12890
+ var data = {
12891
+ goodShortName: formData.goodShortName || null,
12892
+ skuName: formData.skuName || null,
12893
+ skuCode: formData.skuCode || null,
12894
+ goodName: formData.goodName || null,
12895
+ goodNo: formData.goodNo || null
12896
+ };
12897
+ return extendRequest('/qy/gdfw/product/product/page', {
12898
+ method: 'post',
12899
+ data: _objectSpread2({
12900
+ pageSize: pageSize,
12901
+ pageNo: current,
12902
+ platform: 'GY_ERP'
12903
+ }, data)
12904
+ }).then(function (res) {
12905
+ var _res$data = res.data,
12906
+ _res$data$productSkuL = _res$data.productSkuList,
12907
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12908
+ _res$data$total = _res$data.total,
12909
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
12910
+ var newProducts = productSkuList.map(function (item, index) {
12911
+ return _objectSpread2({}, item);
12912
+ });
12913
+ return {
12914
+ total: total,
12915
+ list: newProducts
12916
+ };
12917
+ });
12918
+ };
12919
+ var columns$4 = [{
12920
+ dataIndex: 'index',
12921
+ title: 'NO',
12922
+ render: function render(val, record, index) {
12923
+ return /*#__PURE__*/React__default['default'].createElement("div", {
12924
+ style: {
12925
+ width: 25
12926
+ }
12927
+ }, index + 1);
12928
+ },
12929
+ width: 80
12930
+ }, {
12931
+ dataIndex: 'specName',
12932
+ title: 'SKU名称',
12933
+ width: 250,
12934
+ ellipsis: true
12935
+ }, {
12936
+ dataIndex: 'specNo',
12937
+ title: 'SKU编码',
12938
+ width: 200,
12939
+ ellipsis: true
12940
+ }, {
12941
+ dataIndex: 'goodName',
12942
+ title: '商品名称',
12943
+ width: 250,
12944
+ ellipsis: true
12945
+ }, {
12946
+ dataIndex: 'goodShortName',
12947
+ title: "\u5546\u54C1\u7B80\u79F0",
12948
+ ellipsis: true,
12949
+ width: 250
12950
+ }, {
12951
+ dataIndex: 'goodNo',
12952
+ title: '商品编码',
12953
+ width: 200,
12954
+ ellipsis: true
12955
+ }, {
12956
+ dataIndex: 'goodPicUrl',
12957
+ title: '商品图片',
12958
+ width: 100,
12959
+ render: function render(picUrl) {
12960
+ return /*#__PURE__*/React__default['default'].createElement("img", {
12961
+ style: {
12962
+ width: '40px',
12963
+ height: '40px',
12964
+ objectFit: 'contain'
12965
+ },
12966
+ src: picUrl
12967
+ });
12968
+ }
12969
+ }, {
12970
+ dataIndex: 'brandName',
12971
+ title: '品牌名称',
12972
+ width: 200,
12973
+ ellipsis: true
12974
+ }, {
12975
+ dataIndex: 'retailPrice',
12976
+ title: "\u6807\u51C6\u552E\u4EF7",
12977
+ ellipsis: true,
12978
+ width: 100
12979
+ }, {
12980
+ dataIndex: 'costPrice',
12981
+ title: "\u6210\u672C\u4EF7",
12982
+ ellipsis: true,
12983
+ width: 100
12984
+ }];
12985
+ var GoodList$3 = function GoodList(props, ref) {
12986
+ var _useState = React.useState([]),
12987
+ _useState2 = _slicedToArray(_useState, 2),
12988
+ selectList = _useState2[0],
12989
+ setSelect = _useState2[1];
12990
+ var _useState3 = React.useState([]),
12991
+ _useState4 = _slicedToArray(_useState3, 2),
12992
+ selectIds = _useState4[0],
12993
+ setSelectIds = _useState4[1];
12994
+ React.useImperativeHandle(ref, function () {
12995
+ return {
12996
+ getSelectGoodList: function getSelectGoodList() {
12997
+ return selectList;
12998
+ }
12999
+ };
13000
+ });
13001
+ var _Form$useForm = antd.Form.useForm(),
13002
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13003
+ form = _Form$useForm2[0];
13004
+ var _useAntdTable = ahooks.useAntdTable(getTableData$3, {
13005
+ defaultPageSize: 10,
13006
+ form: form
13007
+ }),
13008
+ tableProps = _useAntdTable.tableProps,
13009
+ search = _useAntdTable.search,
13010
+ params = _useAntdTable.params;
13011
+ var submit = search.submit,
13012
+ reset = search.reset;
13013
+ var advanceSearchForm = /*#__PURE__*/React__default['default'].createElement(antd.Form, {
13014
+ layout: "inline",
13015
+ form: form
13016
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
13017
+ name: "goodShortName",
13018
+ style: {
13019
+ marginBottom: '12px'
13020
+ }
13021
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
13022
+ placeholder: "\u5546\u54C1\u7B80\u79F0",
13023
+ allowClear: true,
13024
+ style: {
12875
13025
  width: 150
12876
- }, {
12877
- dataIndex: 'skuId',
12878
- title: "SKU ID",
13026
+ }
13027
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
13028
+ name: "skuName",
13029
+ style: {
13030
+ marginBottom: '12px'
13031
+ }
13032
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
13033
+ placeholder: "\u5546\u54C1sku\u540D\u79F0",
13034
+ allowClear: true,
13035
+ style: {
12879
13036
  width: 150
12880
- }, {
12881
- dataIndex: 'goodsName',
12882
- title: "\u5546\u54C1\u540D\u79F0",
13037
+ }
13038
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
13039
+ name: "skuCode",
13040
+ style: {
13041
+ marginBottom: '12px'
13042
+ }
13043
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
13044
+ placeholder: "\u5546\u54C1sku\u7F16\u7801",
13045
+ allowClear: true,
13046
+ style: {
12883
13047
  width: 150
12884
- }, {
12885
- dataIndex: 'goodsShortName',
12886
- title: "\u5546\u54C1\u7B80\u79F0",
13048
+ }
13049
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
13050
+ name: "goodName",
13051
+ style: {
13052
+ marginBottom: '12px'
13053
+ }
13054
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
13055
+ placeholder: "\u5546\u54C1\u540D\u79F0",
13056
+ allowClear: true,
13057
+ style: {
12887
13058
  width: 150
12888
- }, {
13059
+ }
13060
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
13061
+ name: "goodNo",
13062
+ style: {
13063
+ marginBottom: '12px'
13064
+ }
13065
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
13066
+ placeholder: "\u5546\u54C1\u7F16\u7801",
13067
+ allowClear: true,
13068
+ style: {
13069
+ width: 150
13070
+ }
13071
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
13072
+ style: {
13073
+ marginBottom: '12px'
13074
+ }
13075
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13076
+ type: "primary",
13077
+ style: {
13078
+ marginRight: '8px'
13079
+ },
13080
+ onClick: submit
13081
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13082
+ onClick: reset
13083
+ }, "\u91CD\u7F6E")));
13084
+ var rowSelection = {
13085
+ selectedRowKeys: selectIds,
13086
+ fixed: true,
13087
+ onSelect: function onSelect(record, selected) {
13088
+ if (selected) {
13089
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
13090
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
13091
+ } else {
13092
+ setSelectIds(selectIds.filter(function (t) {
13093
+ return t !== record.specNo;
13094
+ }));
13095
+ setSelect(selectList.filter(function (t) {
13096
+ return t.specNo !== record.specNo;
13097
+ }));
13098
+ }
13099
+ },
13100
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
13101
+ if (selected) {
13102
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
13103
+ return t.specNo;
13104
+ }))));
13105
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
13106
+ } else {
13107
+ setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
13108
+ return t.specNo;
13109
+ })));
13110
+ var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
13111
+ return arrVal.specNo !== othVal.specNo;
13112
+ });
13113
+ setSelect(list);
13114
+ }
13115
+ }
13116
+ };
13117
+ var showTable = function showTable() {
13118
+ var handleDelete = function handleDelete(record) {
13119
+ setSelectIds(selectIds.filter(function (t) {
13120
+ return t !== record.specNo;
13121
+ }));
13122
+ setSelect(selectList.filter(function (t) {
13123
+ return t.specNo !== record.specNo;
13124
+ }));
13125
+ };
13126
+ var showColumns = [{
13127
+ dataIndex: '',
13128
+ title: "\u64CD\u4F5C",
13129
+ ellipsis: true,
13130
+ width: 100,
13131
+ render: function render(val, record) {
13132
+ return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13133
+ type: "link",
13134
+ onClick: function onClick() {
13135
+ return handleDelete(record);
13136
+ }
13137
+ }, "\u5220\u9664");
13138
+ }
13139
+ }].concat(lodash.takeRight(columns$4, columns$4.length - 1));
13140
+ return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
13141
+ style: {
13142
+ width: '100%',
13143
+ maxWidth: '387px'
13144
+ }
13145
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
13146
+ columns: showColumns,
13147
+ rowKey: 'specNo',
13148
+ dataSource: selectList,
13149
+ scroll: {
13150
+ x: '100%',
13151
+ y: 250
13152
+ },
13153
+ pagination: {
13154
+ size: 'small',
13155
+ total: selectIds.length,
13156
+ pageSize: 10,
13157
+ showSizeChanger: false
13158
+ }
13159
+ })) : null;
13160
+ };
13161
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, advanceSearchForm, /*#__PURE__*/React__default['default'].createElement("div", {
13162
+ style: {
13163
+ marginTop: '4px'
13164
+ }
13165
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
13166
+ rowSelection: rowSelection,
13167
+ rowKey: "specNo",
13168
+ columns: columns$4,
13169
+ scroll: {
13170
+ x: '100%',
13171
+ y: 250
13172
+ }
13173
+ }, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
13174
+ getPopupContainer: function getPopupContainer(triggerNode) {
13175
+ return triggerNode.parentElement;
13176
+ },
13177
+ content: showTable(),
13178
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
13179
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13180
+ danger: true,
13181
+ type: "text"
13182
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
13183
+ };
13184
+ var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$3);
13185
+
13186
+ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13187
+ React.useImperativeHandle(ref, function () {
13188
+ return {
13189
+ open: function open() {
13190
+ setVisible(true);
13191
+ }
13192
+ };
13193
+ });
13194
+ var onSubmit = props.onSubmit,
13195
+ width = props.width;
13196
+ var _useState = React.useState(false),
13197
+ _useState2 = _slicedToArray(_useState, 2),
13198
+ visible = _useState2[0],
13199
+ setVisible = _useState2[1];
13200
+ var gyGoodsListRef = React.useRef(null);
13201
+ var _onCancel = function onCancel() {
13202
+ setVisible(false);
13203
+ };
13204
+ var onOk = function onOk() {
13205
+ var _gyGoodsListRef$curre;
13206
+ var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
13207
+ onSubmit(selectedList);
13208
+ _onCancel();
13209
+ };
13210
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
13211
+ title: '选择商品',
13212
+ okText: '确认',
13213
+ cancelText: '取消',
13214
+ visible: visible,
13215
+ width: width || 850,
13216
+ onCancel: function onCancel() {
13217
+ _onCancel();
13218
+ },
13219
+ onOk: onOk,
13220
+ wrapClassName: "goodModal"
13221
+ }, /*#__PURE__*/React__default['default'].createElement(GyGoodsList$1, {
13222
+ ref: gyGoodsListRef
13223
+ })));
13224
+ };
13225
+ var GyGoodsModal$2 = /*#__PURE__*/React.forwardRef(GyGoodsModal$1);
13226
+
13227
+ var getColumns = function getColumns(_ref) {
13228
+ var _ref$text = _ref.text,
13229
+ disabled = _ref.disabled,
13230
+ updateHandle = _ref.updateHandle;
13231
+ return {
13232
+ //百胜E3补发商品
13233
+ BS_E3_REISSUE_GOODS: [{
13234
+ dataIndex: 'sku',
13235
+ title: "SKU",
13236
+ width: 150
13237
+ }, {
13238
+ dataIndex: 'skuId',
13239
+ title: "SKU ID",
13240
+ width: 150
13241
+ }, {
13242
+ dataIndex: 'goodsName',
13243
+ title: "\u5546\u54C1\u540D\u79F0",
13244
+ width: 150
13245
+ }, {
13246
+ dataIndex: 'goodsShortName',
13247
+ title: "\u5546\u54C1\u7B80\u79F0",
13248
+ width: 150
13249
+ }, {
12889
13250
  dataIndex: 'picPath',
12890
13251
  title: "\u5546\u54C1\u56FE\u7247",
12891
13252
  width: 150,
@@ -13874,148 +14235,622 @@ var getColumns$4 = function getColumns(_ref) {
13874
14235
  title: "\u8BA9\u5229\u540E\u91D1\u989D",
13875
14236
  width: 150
13876
14237
  }, {
13877
- dataIndex: 'cancel',
13878
- title: "\u662F\u5426\u53D6\u6D88",
13879
- width: 150,
13880
- render: function render(val) {
13881
- return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
14238
+ dataIndex: 'cancel',
14239
+ title: "\u662F\u5426\u53D6\u6D88",
14240
+ width: 150,
14241
+ render: function render(val) {
14242
+ return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
14243
+ }
14244
+ }, {
14245
+ dataIndex: 'isGift',
14246
+ title: "\u662F\u5426\u8D60\u54C1",
14247
+ width: 150,
14248
+ render: function render(val, record, index) {
14249
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14250
+ value: val,
14251
+ onChange: function onChange(value) {
14252
+ updateHandle(value, index, 'isGift');
14253
+ },
14254
+ options: [{
14255
+ label: '是',
14256
+ value: 1
14257
+ }, {
14258
+ label: '否',
14259
+ value: 0
14260
+ }]
14261
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
14262
+ }
14263
+ }, {
14264
+ dataIndex: 'skuNote',
14265
+ title: "\u5546\u54C1\u5907\u6CE8",
14266
+ width: 150
14267
+ }].map(function (item) {
14268
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14269
+ align: 'center',
14270
+ ellipsis: true
14271
+ });
14272
+ }),
14273
+ //管易补发商品信息
14274
+ GY_REISSUE_GOODS: [{
14275
+ dataIndex: 'goodName',
14276
+ title: "\u5546\u54C1\u540D\u79F0",
14277
+ width: 150
14278
+ }, {
14279
+ dataIndex: 'goodShortName',
14280
+ title: "\u5546\u54C1\u7B80\u79F0",
14281
+ width: 150
14282
+ }, {
14283
+ dataIndex: 'goodNo',
14284
+ title: "\u5546\u54C1\u7F16\u7801",
14285
+ width: 200
14286
+ }, {
14287
+ dataIndex: 'specName',
14288
+ title: "SKU\u540D\u79F0",
14289
+ align: 'center',
14290
+ ellipsis: true,
14291
+ width: 250
14292
+ }, {
14293
+ dataIndex: 'specNo',
14294
+ title: "SKU\u7F16\u7801",
14295
+ align: 'center',
14296
+ ellipsis: true,
14297
+ width: 150
14298
+ }, {
14299
+ dataIndex: 'qty',
14300
+ title: "\u6570\u91CF",
14301
+ width: 100,
14302
+ render: function render(val, record, index) {
14303
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14304
+ style: {
14305
+ width: 70
14306
+ },
14307
+ value: val,
14308
+ min: 1,
14309
+ precision: 0,
14310
+ onChange: function onChange(num) {
14311
+ updateDataHandle({
14312
+ qty: num,
14313
+ amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
14314
+ originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
14315
+ }, index);
14316
+ }
14317
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14318
+ }
14319
+ }, {
14320
+ dataIndex: 'price',
14321
+ title: "\u5B9E\u9645\u5355\u4EF7",
14322
+ width: 150,
14323
+ render: function render(val, record, index) {
14324
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14325
+ style: {
14326
+ width: 130
14327
+ },
14328
+ value: val,
14329
+ min: 0,
14330
+ precision: 2,
14331
+ onChange: function onChange(num) {
14332
+ updateDataHandle({
14333
+ price: num,
14334
+ amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
14335
+ }, index);
14336
+ }
14337
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14338
+ }
14339
+ }, {
14340
+ dataIndex: 'amount',
14341
+ title: "\u5B9E\u9645\u91D1\u989D",
14342
+ width: 150
14343
+ }, {
14344
+ dataIndex: 'originPrice',
14345
+ title: "\u6807\u51C6\u5355\u4EF7",
14346
+ width: 150
14347
+ }, {
14348
+ dataIndex: 'originAmount',
14349
+ title: "\u6807\u51C6\u91D1\u989D",
14350
+ width: 150
14351
+ }, {
14352
+ dataIndex: 'isGift',
14353
+ title: "\u662F\u5426\u8D60\u54C1",
14354
+ width: 150,
14355
+ render: function render(val, record, index) {
14356
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14357
+ value: val,
14358
+ onChange: function onChange(value) {
14359
+ updateHandle(value, index, 'isGift');
14360
+ },
14361
+ options: [{
14362
+ label: '是',
14363
+ value: 1
14364
+ }, {
14365
+ label: '否',
14366
+ value: 0
14367
+ }]
14368
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
14369
+ }
14370
+ }].map(function (item) {
14371
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14372
+ align: 'center',
14373
+ ellipsis: true
14374
+ });
14375
+ })
14376
+ };
14377
+ };
14378
+
14379
+ var fillAttrs = function fillAttrs(item) {
14380
+ if (!item.width) item.width = 150;
14381
+ if (typeof item.ellipsis !== 'boolean') item.ellipsis = true;
14382
+ if (!item.align) item.align = 'center';
14383
+ return item;
14384
+ };
14385
+ var getColumns$5 = function getColumns() {
14386
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
14387
+ _ref$text = _ref.text,
14388
+ disabled = _ref.disabled,
14389
+ updateHandle = _ref.updateHandle;
14390
+ return {
14391
+ JST_GOODS: [{
14392
+ dataIndex: 'name',
14393
+ title: '商品名称',
14394
+ width: 150,
14395
+ ellipsis: true,
14396
+ align: 'center'
14397
+ }, {
14398
+ dataIndex: 'skuId',
14399
+ title: '商品编码',
14400
+ width: 150,
14401
+ ellipsis: true,
14402
+ align: 'center'
14403
+ }, {
14404
+ dataIndex: 'iId',
14405
+ title: '款式编码',
14406
+ width: 150,
14407
+ ellipsis: true,
14408
+ align: 'center'
14409
+ }, {
14410
+ dataIndex: 'pic',
14411
+ title: '商品图片',
14412
+ ellipsis: true,
14413
+ align: 'center',
14414
+ width: 100,
14415
+ render: function render(val) {
14416
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
14417
+ width: 60,
14418
+ src: val
14419
+ });
14420
+ }
14421
+ }, {
14422
+ dataIndex: 'propertiesValue',
14423
+ title: '规格值',
14424
+ width: 150,
14425
+ ellipsis: true,
14426
+ align: 'center'
14427
+ }, {
14428
+ dataIndex: 'saleBasePrice',
14429
+ title: '原价',
14430
+ width: 150,
14431
+ ellipsis: true,
14432
+ align: 'center',
14433
+ render: function render(price) {
14434
+ return price || price === 0 ? Number(price).toFixed(2) : '';
14435
+ }
14436
+ }, {
14437
+ dataIndex: 'salePrice',
14438
+ title: '单价',
14439
+ ellipsis: true,
14440
+ align: 'center',
14441
+ width: 120,
14442
+ render: function render(val, record, index) {
14443
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14444
+ style: {
14445
+ width: 70
14446
+ },
14447
+ value: val,
14448
+ min: 0,
14449
+ precision: 2,
14450
+ onChange: function onChange(num) {
14451
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
14452
+ }
14453
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
14454
+ }
14455
+ }, {
14456
+ dataIndex: 'qty',
14457
+ title: '数量',
14458
+ ellipsis: true,
14459
+ align: 'center',
14460
+ width: 100,
14461
+ render: function render(val, record, index) {
14462
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14463
+ style: {
14464
+ width: 70
14465
+ },
14466
+ value: val,
14467
+ min: 1,
14468
+ precision: 0,
14469
+ onChange: function onChange(num) {
14470
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
14471
+ }
14472
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14473
+ }
14474
+ }, {
14475
+ dataIndex: 'saleAmount',
14476
+ title: '总金额',
14477
+ width: 150,
14478
+ ellipsis: true,
14479
+ align: 'center',
14480
+ render: function render(val, record, index) {
14481
+ return (record.qty || 0) * (+record.salePrice || 0);
14482
+ }
14483
+ }, {
14484
+ dataIndex: 'batchId',
14485
+ title: '批次号',
14486
+ width: 150,
14487
+ ellipsis: true,
14488
+ align: 'center'
14489
+ }, {
14490
+ dataIndex: 'isGift',
14491
+ title: '是否赠品',
14492
+ ellipsis: true,
14493
+ align: 'center',
14494
+ width: 100,
14495
+ render: function render(val, record, index) {
14496
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14497
+ value: val,
14498
+ onChange: function onChange(value) {
14499
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
14500
+ },
14501
+ options: [{
14502
+ label: '是',
14503
+ value: true
14504
+ }, {
14505
+ label: '否',
14506
+ value: false
14507
+ }]
14508
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
14509
+ }
14510
+ }, {
14511
+ dataIndex: 'outerOiId',
14512
+ title: '子订单号',
14513
+ width: 240,
14514
+ ellipsis: true,
14515
+ align: 'center'
14516
+ }],
14517
+ JST_REISSUE_GOODS: [{
14518
+ dataIndex: 'name',
14519
+ title: '商品名称',
14520
+ width: 150,
14521
+ ellipsis: true,
14522
+ align: 'center'
14523
+ }, {
14524
+ dataIndex: 'skuId',
14525
+ title: '商品编码',
14526
+ width: 150,
14527
+ ellipsis: true,
14528
+ align: 'center'
14529
+ }, {
14530
+ dataIndex: 'iId',
14531
+ title: '款式编码',
14532
+ width: 150,
14533
+ ellipsis: true,
14534
+ align: 'center'
14535
+ }, {
14536
+ dataIndex: 'pic',
14537
+ title: '商品图片',
14538
+ ellipsis: true,
14539
+ align: 'center',
14540
+ width: 100,
14541
+ render: function render(val) {
14542
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
14543
+ width: 60,
14544
+ src: val
14545
+ });
14546
+ }
14547
+ }, {
14548
+ dataIndex: 'propertiesValue',
14549
+ title: '规格值',
14550
+ width: 150,
14551
+ ellipsis: true,
14552
+ align: 'center'
14553
+ }, {
14554
+ dataIndex: 'saleBasePrice',
14555
+ title: '原价',
14556
+ width: 150,
14557
+ ellipsis: true,
14558
+ align: 'center',
14559
+ render: function render(price) {
14560
+ return price || price === 0 ? Number(price).toFixed(2) : '';
14561
+ }
14562
+ }, {
14563
+ dataIndex: 'salePrice',
14564
+ title: '单价',
14565
+ ellipsis: true,
14566
+ align: 'center',
14567
+ width: 120,
14568
+ render: function render(val, record, index) {
14569
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14570
+ style: {
14571
+ width: 70
14572
+ },
14573
+ value: val,
14574
+ min: 0,
14575
+ precision: 2,
14576
+ onChange: function onChange(num) {
14577
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
14578
+ }
14579
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
14580
+ }
14581
+ }, {
14582
+ dataIndex: 'qty',
14583
+ title: '数量',
14584
+ ellipsis: true,
14585
+ align: 'center',
14586
+ width: 100,
14587
+ render: function render(val, record, index) {
14588
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14589
+ style: {
14590
+ width: 70
14591
+ },
14592
+ value: val,
14593
+ min: 1,
14594
+ precision: 0,
14595
+ onChange: function onChange(num) {
14596
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
14597
+ }
14598
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14599
+ }
14600
+ }, {
14601
+ dataIndex: 'isGift',
14602
+ title: '是否赠品',
14603
+ ellipsis: true,
14604
+ align: 'center',
14605
+ width: 100,
14606
+ render: function render(val, record, index) {
14607
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14608
+ value: val,
14609
+ onChange: function onChange(value) {
14610
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
14611
+ },
14612
+ options: [{
14613
+ label: '是',
14614
+ value: true
14615
+ }, {
14616
+ label: '否',
14617
+ value: false
14618
+ }]
14619
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
14620
+ }
14621
+ }, {
14622
+ dataIndex: 'remark',
14623
+ title: '备注',
14624
+ width: 150,
14625
+ ellipsis: true,
14626
+ align: 'center',
14627
+ render: function render(val, record, index) {
14628
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
14629
+ style: {
14630
+ width: 70
14631
+ },
14632
+ value: val,
14633
+ onChange: function onChange(e) {
14634
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
14635
+ }
14636
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14637
+ }
14638
+ }],
14639
+ JST_RETURN_GOODS: [{
14640
+ dataIndex: 'name',
14641
+ title: '商品名称'
14642
+ }, {
14643
+ dataIndex: 'skuId',
14644
+ title: '商品编码'
14645
+ }, {
14646
+ dataIndex: 'iId',
14647
+ title: '款式编码'
14648
+ }, {
14649
+ dataIndex: 'pic',
14650
+ title: '商品图片',
14651
+ width: 100,
14652
+ render: function render(val) {
14653
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
14654
+ width: 60,
14655
+ src: val
14656
+ });
14657
+ }
14658
+ }, {
14659
+ dataIndex: 'propertiesValue',
14660
+ title: '规格值'
14661
+ }, {
14662
+ dataIndex: 'saleBasePrice',
14663
+ title: '原价',
14664
+ render: function render(price) {
14665
+ return price || price === 0 ? Number(price).toFixed(2) : '';
14666
+ }
14667
+ }, {
14668
+ dataIndex: 'salePrice',
14669
+ title: '单价',
14670
+ width: 120,
14671
+ render: function render(val, record, index) {
14672
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14673
+ style: {
14674
+ width: 70
14675
+ },
14676
+ value: val,
14677
+ min: 0,
14678
+ precision: 2,
14679
+ onChange: function onChange(num) {
14680
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
14681
+ }
14682
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
14683
+ }
14684
+ }, {
14685
+ dataIndex: 'qty',
14686
+ title: '数量',
14687
+ width: 100,
14688
+ render: function render(val, record, index) {
14689
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14690
+ style: {
14691
+ width: 70
14692
+ },
14693
+ value: val,
14694
+ min: 1,
14695
+ precision: 0,
14696
+ onChange: function onChange(num) {
14697
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
14698
+ }
14699
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14700
+ }
14701
+ }, {
14702
+ dataIndex: 'saleAmount',
14703
+ title: '总金额',
14704
+ render: function render(val, record) {
14705
+ return (record.qty || 0) * (+record.salePrice || 0);
13882
14706
  }
14707
+ }, {
14708
+ dataIndex: 'batchId',
14709
+ title: '批次号'
13883
14710
  }, {
13884
14711
  dataIndex: 'isGift',
13885
- title: "\u662F\u5426\u8D60\u54C1",
13886
- width: 150,
14712
+ title: '是否赠品',
14713
+ width: 100,
13887
14714
  render: function render(val, record, index) {
13888
- return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14715
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13889
14716
  value: val,
13890
14717
  onChange: function onChange(value) {
13891
- updateHandle(value, index, 'isGift');
14718
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
13892
14719
  },
13893
14720
  options: [{
13894
14721
  label: '是',
13895
- value: 1
14722
+ value: true
13896
14723
  }, {
13897
14724
  label: '否',
13898
- value: 0
14725
+ value: false
13899
14726
  }]
13900
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
14727
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
13901
14728
  }
13902
14729
  }, {
13903
- dataIndex: 'skuNote',
13904
- title: "\u5546\u54C1\u5907\u6CE8",
13905
- width: 150
13906
- }].map(function (item) {
13907
- return _objectSpread2(_objectSpread2({}, item), {}, {
13908
- align: 'center',
13909
- ellipsis: true
13910
- });
13911
- }),
13912
- //管易补发商品信息
13913
- GY_REISSUE_GOODS: [{
13914
- dataIndex: 'goodName',
13915
- title: "\u5546\u54C1\u540D\u79F0",
13916
- width: 150
13917
- }, {
13918
- dataIndex: 'goodShortName',
13919
- title: "\u5546\u54C1\u7B80\u79F0",
13920
- width: 150
14730
+ dataIndex: 'remark',
14731
+ title: '备注',
14732
+ render: function render(val, record, index) {
14733
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
14734
+ style: {
14735
+ width: 70
14736
+ },
14737
+ value: val,
14738
+ onChange: function onChange(e) {
14739
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
14740
+ }
14741
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14742
+ }
13921
14743
  }, {
13922
- dataIndex: 'goodNo',
13923
- title: "\u5546\u54C1\u7F16\u7801",
13924
- width: 200
14744
+ dataIndex: 'outerOiId',
14745
+ title: '子订单号',
14746
+ width: 240
14747
+ }].map(fillAttrs),
14748
+ JST_EXCHANGE_GOODS: [{
14749
+ dataIndex: 'name',
14750
+ title: '商品名称'
13925
14751
  }, {
13926
- dataIndex: 'specName',
13927
- title: "SKU\u540D\u79F0",
13928
- align: 'center',
13929
- ellipsis: true,
13930
- width: 250
14752
+ dataIndex: 'skuId',
14753
+ title: '商品编码'
13931
14754
  }, {
13932
- dataIndex: 'specNo',
13933
- title: "SKU\u7F16\u7801",
13934
- align: 'center',
13935
- ellipsis: true,
13936
- width: 150
14755
+ dataIndex: 'iId',
14756
+ title: '款式编码'
13937
14757
  }, {
13938
- dataIndex: 'qty',
13939
- title: "\u6570\u91CF",
14758
+ dataIndex: 'pic',
14759
+ title: '商品图片',
13940
14760
  width: 100,
14761
+ render: function render(val) {
14762
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
14763
+ width: 60,
14764
+ src: val
14765
+ });
14766
+ }
14767
+ }, {
14768
+ dataIndex: 'propertiesValue',
14769
+ title: '规格值'
14770
+ }, {
14771
+ dataIndex: 'saleBasePrice',
14772
+ title: '原价',
14773
+ render: function render(price) {
14774
+ return price || price === 0 ? Number(price).toFixed(2) : '';
14775
+ }
14776
+ }, {
14777
+ dataIndex: 'salePrice',
14778
+ title: '单价',
14779
+ width: 120,
13941
14780
  render: function render(val, record, index) {
13942
- return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14781
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13943
14782
  style: {
13944
14783
  width: 70
13945
14784
  },
13946
14785
  value: val,
13947
- min: 1,
13948
- precision: 0,
14786
+ min: 0,
14787
+ precision: 2,
13949
14788
  onChange: function onChange(num) {
13950
- updateDataHandle({
13951
- qty: num,
13952
- amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
13953
- originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
13954
- }, index);
14789
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
13955
14790
  }
13956
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14791
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
13957
14792
  }
13958
14793
  }, {
13959
- dataIndex: 'price',
13960
- title: "\u5B9E\u9645\u5355\u4EF7",
13961
- width: 150,
14794
+ dataIndex: 'qty',
14795
+ title: '数量',
14796
+ width: 100,
13962
14797
  render: function render(val, record, index) {
13963
- return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14798
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13964
14799
  style: {
13965
- width: 130
14800
+ width: 70
13966
14801
  },
13967
14802
  value: val,
13968
- min: 0,
13969
- precision: 2,
14803
+ min: 1,
14804
+ precision: 0,
13970
14805
  onChange: function onChange(num) {
13971
- updateDataHandle({
13972
- price: num,
13973
- amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
13974
- }, index);
14806
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
13975
14807
  }
13976
14808
  }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13977
14809
  }
13978
14810
  }, {
13979
- dataIndex: 'amount',
13980
- title: "\u5B9E\u9645\u91D1\u989D",
13981
- width: 150
13982
- }, {
13983
- dataIndex: 'originPrice',
13984
- title: "\u6807\u51C6\u5355\u4EF7",
13985
- width: 150
13986
- }, {
13987
- dataIndex: 'originAmount',
13988
- title: "\u6807\u51C6\u91D1\u989D",
13989
- width: 150
14811
+ dataIndex: 'saleAmount',
14812
+ title: '总金额',
14813
+ render: function render(val, record) {
14814
+ return (record.qty || 0) * (+record.salePrice || 0);
14815
+ }
13990
14816
  }, {
13991
14817
  dataIndex: 'isGift',
13992
- title: "\u662F\u5426\u8D60\u54C1",
13993
- width: 150,
14818
+ title: '是否赠品',
14819
+ width: 100,
13994
14820
  render: function render(val, record, index) {
13995
- return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14821
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13996
14822
  value: val,
13997
14823
  onChange: function onChange(value) {
13998
- updateHandle(value, index, 'isGift');
14824
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
13999
14825
  },
14000
14826
  options: [{
14001
14827
  label: '是',
14002
- value: 1
14828
+ value: true
14003
14829
  }, {
14004
14830
  label: '否',
14005
- value: 0
14831
+ value: false
14006
14832
  }]
14007
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
14833
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
14008
14834
  }
14009
- }].map(function (item) {
14010
- return _objectSpread2(_objectSpread2({}, item), {}, {
14011
- align: 'center',
14012
- ellipsis: true
14013
- });
14014
- })
14835
+ }, {
14836
+ dataIndex: 'remark',
14837
+ title: '备注',
14838
+ render: function render(val, record, index) {
14839
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
14840
+ style: {
14841
+ width: 70
14842
+ },
14843
+ value: val,
14844
+ onChange: function onChange(e) {
14845
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
14846
+ }
14847
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14848
+ }
14849
+ }].map(fillAttrs)
14015
14850
  };
14016
14851
  };
14017
14852
 
14018
- var getColumns$5 = function getColumns(_ref) {
14853
+ var getColumns$6 = function getColumns(_ref) {
14019
14854
  var _ref$text = _ref.text,
14020
14855
  text = _ref$text === void 0 ? '' : _ref$text,
14021
14856
  disabled = _ref.disabled,
@@ -14128,7 +14963,7 @@ var getColumnsMap = function getColumnsMap(args) {
14128
14963
  disabled = _ref.disabled,
14129
14964
  updateHandle = _ref.updateHandle,
14130
14965
  updateDataHandle = _ref.updateDataHandle;
14131
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
14966
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
14132
14967
  text: text,
14133
14968
  disabled: disabled,
14134
14969
  updateHandle: updateHandle
@@ -14149,8 +14984,12 @@ var getColumnsMap = function getColumnsMap(args) {
14149
14984
  disabled: disabled,
14150
14985
  updateHandle: updateHandle,
14151
14986
  updateDataHandle: updateDataHandle
14987
+ })), getColumns$5({
14988
+ text: text,
14989
+ disabled: disabled,
14990
+ updateHandle: updateHandle
14152
14991
  })), {}, {
14153
- default: getColumns$5({
14992
+ default: getColumns$6({
14154
14993
  text: text,
14155
14994
  disabled: disabled,
14156
14995
  updateHandle: updateHandle
@@ -14254,27 +15093,50 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
14254
15093
  });
14255
15094
  };
14256
15095
 
14257
- var MAIN_FIELD = 'uuid';
15096
+ var GoodsModalMap = {
15097
+ WDT_REISSUE_GOODS: WdtGoodsModal,
15098
+ WDT_GOODS: WdtGoodsModal,
15099
+ WDT_EXCHANGE_GOODS: WdtGoodsModal,
15100
+ BS_E3_REISSUE_GOODS: BsE3GoodsModal,
15101
+ BS_E3_GOODS: BsE3GoodsModal,
15102
+ BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
15103
+ GY_GOODS: GyGoodsModal$2,
15104
+ GY_REISSUE_GOODS: GyGoodsModal$2,
15105
+ JST_GOODS: JstGoodsModal,
15106
+ JST_REISSUE_GOODS: JstGoodsModal,
15107
+ JST_RETURN_GOODS: JstGoodsModal,
15108
+ JST_EXCHANGE_GOODS: JstGoodsModal,
15109
+ OTHER_GOODS: GoodsModal$2
15110
+ };
14258
15111
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
14259
15112
  var columns = _ref.columns,
14260
15113
  dataSource = _ref.dataSource,
15114
+ getDataSourceAsync = _ref.getDataSourceAsync,
14261
15115
  selectedRowKeys = _ref.selectedRowKeys,
14262
- onChangeSelectedKeys = _ref.onChangeSelectedKeys;
15116
+ onChangeSelectedKeys = _ref.onChangeSelectedKeys,
15117
+ _ref$uniqueKey = _ref.uniqueKey,
15118
+ uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey;
14263
15119
  var _useState = React.useState(false),
14264
15120
  _useState2 = _slicedToArray(_useState, 2),
14265
15121
  tradeGoodsVisible = _useState2[0],
14266
15122
  setTradeGoodsVisible = _useState2[1];
14267
15123
  var openModal = function openModal() {
14268
- return setTradeGoodsVisible(true);
15124
+ if (getDataSourceAsync) {
15125
+ getDataSourceAsync().then(function () {
15126
+ setTradeGoodsVisible(true);
15127
+ });
15128
+ } else {
15129
+ setTradeGoodsVisible(true);
15130
+ }
14269
15131
  };
14270
15132
  var closeModal = function closeModal() {
14271
15133
  return setTradeGoodsVisible(false);
14272
15134
  };
14273
15135
  var currentTradeOriginGoods = lodash.intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
14274
- return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
15136
+ return item === null || item === void 0 ? void 0 : item[uniqueKey];
14275
15137
  }), selectedRowKeys);
14276
15138
  var unCurrentTradeOriginGoods = lodash.difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
14277
- return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
15139
+ return item === null || item === void 0 ? void 0 : item[uniqueKey];
14278
15140
  }));
14279
15141
  var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
14280
15142
  console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
@@ -14293,7 +15155,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
14293
15155
  footer: null,
14294
15156
  onCancel: closeModal
14295
15157
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
14296
- rowKey: MAIN_FIELD,
15158
+ rowKey: uniqueKey,
14297
15159
  rowSelection: rowSelection,
14298
15160
  columns: columns,
14299
15161
  dataSource: dataSource,
@@ -14315,6 +15177,9 @@ var getButtonText = function getButtonText() {
14315
15177
  if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
14316
15178
  return '选择管易ERP商品';
14317
15179
  }
15180
+ if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
15181
+ return '选择聚水潭ERP商品';
15182
+ }
14318
15183
  return '选择商品';
14319
15184
  };
14320
15185
  var GoodItem$1 = function GoodItem(props) {
@@ -14334,6 +15199,8 @@ var GoodItem$1 = function GoodItem(props) {
14334
15199
  maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
14335
15200
  _props$showChangeBtn = props.showChangeBtn,
14336
15201
  showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
15202
+ _props$showErpGoodsBt = props.showErpGoodsBtn,
15203
+ showErpGoodsBtn = _props$showErpGoodsBt === void 0 ? true : _props$showErpGoodsBt,
14337
15204
  _props$showModeBtn = props.showModeBtn,
14338
15205
  showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
14339
15206
  _props$isStrict = props.isStrict,
@@ -14352,7 +15219,12 @@ var GoodItem$1 = function GoodItem(props) {
14352
15219
  onSelect = props.onSelect,
14353
15220
  onDelete = props.onDelete,
14354
15221
  onModeChange = props.onModeChange,
14355
- tradeGoods = props.tradeGoods;
15222
+ tradeGoods = props.tradeGoods,
15223
+ form = props.form;
15224
+ var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
15225
+ // 监听聚水潭退货商品
15226
+ var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
15227
+ var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
14356
15228
  var refModal = React.useRef();
14357
15229
  console.debug('表格数据', value);
14358
15230
  var handleDelete = function handleDelete(record, index) {
@@ -14372,7 +15244,7 @@ var GoodItem$1 = function GoodItem(props) {
14372
15244
  // TODO: 商品订单中以选中商品
14373
15245
  var selectedGoods = React.useMemo(function () {
14374
15246
  return value === null || value === void 0 ? void 0 : value.map(function (v) {
14375
- return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
15247
+ return v === null || v === void 0 ? void 0 : v[uniqueKey];
14376
15248
  });
14377
15249
  }, [value]);
14378
15250
  var updateHandle = function updateHandle(val, index, columnType) {
@@ -14414,7 +15286,7 @@ var GoodItem$1 = function GoodItem(props) {
14414
15286
  };
14415
15287
  var COLUMNS_MAP = function COLUMNS_MAP() {
14416
15288
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
14417
- var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
15289
+ var columnsOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
14418
15290
  return function (type) {
14419
15291
  var columns = [];
14420
15292
  switch (type) {
@@ -14425,11 +15297,15 @@ var GoodItem$1 = function GoodItem(props) {
14425
15297
  case 'BS_GOODS':
14426
15298
  case 'WLN_GOODS':
14427
15299
  case 'GY_GOODS':
15300
+ case 'JST_GOODS':
15301
+ case 'JST_REISSUE_GOODS':
15302
+ case 'JST_EXCHANGE_GOODS':
15303
+ case 'JST_RETURN_GOODS':
14428
15304
  case 'GY_REISSUE_GOODS':
14429
15305
  {
14430
15306
  columns = getColumnsMap({
14431
15307
  text: text,
14432
- disabled: disabled,
15308
+ disabled: disabled || columnsOptions.disabled,
14433
15309
  updateHandle: updateHandle,
14434
15310
  updateDataHandle: updateDataHandle
14435
15311
  })[type];
@@ -14438,25 +15314,25 @@ var GoodItem$1 = function GoodItem(props) {
14438
15314
  case 'WDT_REISSUE_GOODS':
14439
15315
  {
14440
15316
  columns = getWdtReissueGoodColumns({
14441
- disabled: disabled,
15317
+ disabled: disabled || columnsOptions.disabled,
14442
15318
  updateHandle: updateHandle,
14443
- operate: operate
15319
+ operate: columnsOptions.operate
14444
15320
  });
14445
15321
  }
14446
15322
  break;
14447
15323
  case 'BS_E3_REISSUE_GOODS':
14448
15324
  {
14449
15325
  columns = getBsE3ReissueGoodColumns({
14450
- disabled: disabled,
15326
+ disabled: disabled || columnsOptions.disabled,
14451
15327
  updateHandle: updateHandle,
14452
- operate: operate
15328
+ operate: columnsOptions.operate
14453
15329
  });
14454
15330
  }
14455
15331
  break;
14456
15332
  default:
14457
15333
  columns = getColumnsMap({
14458
15334
  text: text,
14459
- disabled: disabled,
15335
+ disabled: disabled || columnsOptions.disabled,
14460
15336
  updateHandle: updateHandle,
14461
15337
  updateDataHandle: updateDataHandle
14462
15338
  })['default'];
@@ -14519,7 +15395,10 @@ var GoodItem$1 = function GoodItem(props) {
14519
15395
  return columnList;
14520
15396
  }, [showHeader, value, disabled]);
14521
15397
  var orderColumns = React.useMemo(function () {
14522
- var columns = COLUMNS_MAP('', false)(type);
15398
+ var columns = COLUMNS_MAP('', {
15399
+ operate: false,
15400
+ disabled: true
15401
+ })(type);
14523
15402
  return [{
14524
15403
  dataIndex: '',
14525
15404
  title: '序号',
@@ -14603,6 +15482,23 @@ var GoodItem$1 = function GoodItem(props) {
14603
15482
  originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
14604
15483
  });
14605
15484
  });
15485
+ } else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
15486
+ newList = list.map(function (item) {
15487
+ return {
15488
+ name: item.goodName,
15489
+ skuId: item.goodNo,
15490
+ iId: item.styleCode,
15491
+ pic: item.goodPicUrl,
15492
+ propertiesValue: item.propertiesValue,
15493
+ saleBasePrice: item.retailPrice,
15494
+ salePrice: item.retailPrice,
15495
+ remark: '',
15496
+ uuid: kmkfUtils.uuid(),
15497
+ canDelete: true,
15498
+ canEdit: true,
15499
+ qty: 1
15500
+ };
15501
+ });
14606
15502
  } else {
14607
15503
  newList = list.map(function (item) {
14608
15504
  var goodsId = item.goodsId,
@@ -14634,11 +15530,13 @@ var GoodItem$1 = function GoodItem(props) {
14634
15530
  var onSelectChange = function onSelectChange(newSelectedRowKeys) {
14635
15531
  setSelectedRowKeys(newSelectedRowKeys);
14636
15532
  onSelect === null || onSelect === void 0 ? void 0 : onSelect(value.filter(function (t) {
14637
- return newSelectedRowKeys.includes(t.uuid);
15533
+ return newSelectedRowKeys.includes(t[uniqueKey]);
14638
15534
  }));
14639
15535
  };
14640
15536
  var handleChangeGoods = function handleChangeGoods() {
14641
- refModal.current.open(shopCode);
15537
+ refModal.current.open(shopCode, {
15538
+ value: value
15539
+ });
14642
15540
  };
14643
15541
  var rowSelection = {
14644
15542
  selectedRowKeys: selectedRowKeys,
@@ -14655,6 +15553,7 @@ var GoodItem$1 = function GoodItem(props) {
14655
15553
  }
14656
15554
  return params;
14657
15555
  }, [tableSelect, selectedRowKeys]);
15556
+ var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
14658
15557
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React__default['default'].createElement("div", {
14659
15558
  style: {
14660
15559
  float: 'right'
@@ -14662,18 +15561,20 @@ var GoodItem$1 = function GoodItem(props) {
14662
15561
  }, showModeBtn && /*#__PURE__*/React__default['default'].createElement(antd.Checkbox, {
14663
15562
  checked: isStrict,
14664
15563
  onChange: handleCheckboxChange
14665
- }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !lodash.isEmpty(tradeGoods) && /*#__PURE__*/React__default['default'].createElement(SelectTradeGoods, {
15564
+ }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !lodash.isEmpty(tradeGoods) && isShowSelectTradeGoods && /*#__PURE__*/React__default['default'].createElement(SelectTradeGoods, {
15565
+ uniqueKey: uniqueKey,
14666
15566
  columns: orderColumns,
14667
15567
  dataSource: tradeGoods.originDataSource,
15568
+ getDataSourceAsync: tradeGoods.getDataSourceAsync,
14668
15569
  selectedRowKeys: selectedGoods,
14669
15570
  onChangeSelectedKeys: tradeGoods.selectedGoodsChange
14670
- }), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
15571
+ }), showErpGoodsBtn && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
14671
15572
  type: "link",
14672
15573
  onClick: handleChangeGoods
14673
15574
  }, getButtonText(type)), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
14674
15575
  columns: newColumns,
14675
15576
  dataSource: value,
14676
- rowKey: 'uuid',
15577
+ rowKey: uniqueKey,
14677
15578
  size: "small",
14678
15579
  pagination: false,
14679
15580
  scroll: {
@@ -14682,31 +15583,7 @@ var GoodItem$1 = function GoodItem(props) {
14682
15583
  locale: {
14683
15584
  emptyText: '暂无数据'
14684
15585
  }
14685
- })), ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(WdtGoodsModal, {
14686
- ref: refModal,
14687
- onSubmit: onSubmit,
14688
- width: width,
14689
- shopList: shopList,
14690
- shopId: shopId,
14691
- maxLength: maxLength,
14692
- companyKey: companyKey
14693
- }) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(BsE3GoodsModal, {
14694
- ref: refModal,
14695
- onSubmit: onSubmit,
14696
- width: width,
14697
- shopList: shopList,
14698
- shopId: shopId,
14699
- maxLength: maxLength,
14700
- companyKey: companyKey
14701
- }) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(GyGoodsModal$1, {
14702
- ref: refModal,
14703
- onSubmit: onSubmit,
14704
- width: width,
14705
- shopList: shopList,
14706
- shopId: shopId,
14707
- maxLength: maxLength,
14708
- companyKey: companyKey
14709
- }) : /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
15586
+ })), /*#__PURE__*/React__default['default'].createElement(TheGoodsModal, {
14710
15587
  ref: refModal,
14711
15588
  onSubmit: onSubmit,
14712
15589
  width: width,
@@ -15453,12 +16330,45 @@ var gyUtils = {
15453
16330
  };
15454
16331
 
15455
16332
  var singletonMap$3 = new Map();
15456
- var getOrderListSingleton = function getOrderListSingleton(orderNo) {
16333
+ var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
15457
16334
  if (!singletonMap$3.has(orderNo)) {
15458
16335
  var p = new Promise(function (resolve, reject) {
15459
16336
  var doReject = function doReject(err) {
15460
16337
  // 清空掉错误的请求记录
15461
- singletonMap$3.delete(orderNo);
16338
+ // singletonMap.delete(orderNo);
16339
+ reject(err);
16340
+ };
16341
+ extendRequest('/qy/gdfw/jst/erp/orderOut/list', {
16342
+ method: 'post',
16343
+ data: {
16344
+ soId: orderNo
16345
+ }
16346
+ }).then(function (data) {
16347
+ if (data === null || data === void 0 ? void 0 : data.success) {
16348
+ data.data = kmkfUtils.filterJstOrders({
16349
+ orderList: (data === null || data === void 0 ? void 0 : data.data) || []
16350
+ }, orderNo);
16351
+ resolve(data.data);
16352
+ } else {
16353
+ doReject(data);
16354
+ }
16355
+ }).catch(doReject);
16356
+ });
16357
+ singletonMap$3.set(orderNo, p);
16358
+ }
16359
+ return singletonMap$3.get(orderNo);
16360
+ };
16361
+ var jstUtils = {
16362
+ getJstOrderListSingleton: getJstOrderListSingleton
16363
+ };
16364
+
16365
+ var singletonMap$4 = new Map();
16366
+ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
16367
+ if (!singletonMap$4.has(orderNo)) {
16368
+ var p = new Promise(function (resolve, reject) {
16369
+ var doReject = function doReject(err) {
16370
+ // 清空掉错误的请求记录
16371
+ singletonMap$4.delete(orderNo);
15462
16372
  reject(err);
15463
16373
  };
15464
16374
  extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
@@ -15484,16 +16394,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
15484
16394
  }
15485
16395
  // 延迟10秒清除,保证订单的时效性
15486
16396
  setTimeout(function () {
15487
- singletonMap$3.delete(orderNo);
16397
+ singletonMap$4.delete(orderNo);
15488
16398
  }, 1000 * 10);
15489
16399
  } else {
15490
16400
  doReject(data);
15491
16401
  }
15492
16402
  }).catch(doReject);
15493
16403
  });
15494
- singletonMap$3.set(orderNo, p);
16404
+ singletonMap$4.set(orderNo, p);
15495
16405
  }
15496
- return singletonMap$3.get(orderNo);
16406
+ return singletonMap$4.get(orderNo);
15497
16407
  };
15498
16408
  var kmUtils = {
15499
16409
  getOrderListSingleton: getOrderListSingleton
@@ -15506,7 +16416,8 @@ var columnsMap = {
15506
16416
  WLN_SYSTEM_ORDER: kmkfUtils.WLN_SYSTEM_ORDER_CONFIG.columns,
15507
16417
  WDT_SYSTEM_ORDER: kmkfUtils.WDT_SYSTEM_ORDER_CONFIG.columns,
15508
16418
  BS_E3_SYSTEM_ORDER: kmkfUtils.BS_E3_SYSTEM_ORDER_CONFIG.columns,
15509
- GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns
16419
+ GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns,
16420
+ JST_SYSTEM_ORDER: kmkfUtils.JST_SYSTEM_ORDER_CONFIG.columns
15510
16421
  };
15511
16422
  var rowKeyMap = {
15512
16423
  BS_SYSTEM_ORDER: 'billNo',
@@ -15514,7 +16425,8 @@ var rowKeyMap = {
15514
16425
  WLN_SYSTEM_ORDER: 'billNo',
15515
16426
  WDT_SYSTEM_ORDER: 'billNo',
15516
16427
  BS_E3_SYSTEM_ORDER: 'orderSn',
15517
- GY_SYSTEM_ORDER: 'billNo'
16428
+ GY_SYSTEM_ORDER: 'billNo',
16429
+ JST_SYSTEM_ORDER: 'oId'
15518
16430
  };
15519
16431
  var index$1 = (function (props) {
15520
16432
  var value = props.value,
@@ -15539,6 +16451,8 @@ var index$1 = (function (props) {
15539
16451
  } else if (type === 'GY_SYSTEM_ORDER') {
15540
16452
  console.log('触发gy--getGyOrderList--1');
15541
16453
  getGyOrderList(value.orderNo);
16454
+ } else if (type === 'JST_SYSTEM_ORDER') {
16455
+ getJstOrderList(value.orderNo);
15542
16456
  }
15543
16457
  }
15544
16458
  }, [value, type]);
@@ -15694,18 +16608,41 @@ var index$1 = (function (props) {
15694
16608
  return _ref5.apply(this, arguments);
15695
16609
  };
15696
16610
  }();
15697
- var getKmOrderList = /*#__PURE__*/function () {
16611
+ var getJstOrderList = /*#__PURE__*/function () {
15698
16612
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
15699
16613
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
15700
16614
  while (1) switch (_context5.prev = _context5.next) {
16615
+ case 0:
16616
+ jstUtils.getJstOrderListSingleton(orderNo).then(function (data) {
16617
+ var trades = data || [];
16618
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
16619
+ orders: trades,
16620
+ showOrderInfo: trades
16621
+ }));
16622
+ });
16623
+ onceRef.current = false;
16624
+ case 2:
16625
+ case "end":
16626
+ return _context5.stop();
16627
+ }
16628
+ }, _callee5);
16629
+ }));
16630
+ return function getJstOrderList(_x5) {
16631
+ return _ref6.apply(this, arguments);
16632
+ };
16633
+ }();
16634
+ var getKmOrderList = /*#__PURE__*/function () {
16635
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
16636
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
16637
+ while (1) switch (_context6.prev = _context6.next) {
15701
16638
  case 0:
15702
16639
  kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
15703
16640
  _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
15704
16641
  orders: trades,
15705
- showOrderInfo: trades.map(function (_ref7) {
15706
- var billNo = _ref7.billNo,
15707
- billType = _ref7.billType,
15708
- billTag = _ref7.billTag;
16642
+ showOrderInfo: trades.map(function (_ref8) {
16643
+ var billNo = _ref8.billNo,
16644
+ billType = _ref8.billType,
16645
+ billTag = _ref8.billTag;
15709
16646
  return {
15710
16647
  billNo: billNo,
15711
16648
  billType: billType,
@@ -15717,18 +16654,18 @@ var index$1 = (function (props) {
15717
16654
  onceRef.current = false;
15718
16655
  case 2:
15719
16656
  case "end":
15720
- return _context5.stop();
16657
+ return _context6.stop();
15721
16658
  }
15722
- }, _callee5);
16659
+ }, _callee6);
15723
16660
  }));
15724
- return function getKmOrderList(_x5) {
15725
- return _ref6.apply(this, arguments);
16661
+ return function getKmOrderList(_x6) {
16662
+ return _ref7.apply(this, arguments);
15726
16663
  };
15727
16664
  }();
15728
16665
  var getGyOrderList = /*#__PURE__*/function () {
15729
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
15730
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
15731
- while (1) switch (_context6.prev = _context6.next) {
16666
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(orderNo) {
16667
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
16668
+ while (1) switch (_context7.prev = _context7.next) {
15732
16669
  case 0:
15733
16670
  gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
15734
16671
  var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
@@ -15736,15 +16673,15 @@ var index$1 = (function (props) {
15736
16673
  });
15737
16674
  _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
15738
16675
  orders: trades,
15739
- showOrderInfo: trades.map(function (_ref9) {
15740
- var billNo = _ref9.billNo,
15741
- billType = _ref9.billType,
15742
- billTag = _ref9.billTag,
15743
- tradeTagName = _ref9.tradeTagName,
15744
- deliveryState = _ref9.deliveryState,
15745
- vipCode = _ref9.vipCode,
15746
- shopCode = _ref9.shopCode,
15747
- rest = _objectWithoutProperties(_ref9, _excluded$g);
16676
+ showOrderInfo: trades.map(function (_ref10) {
16677
+ var billNo = _ref10.billNo,
16678
+ billType = _ref10.billType,
16679
+ billTag = _ref10.billTag,
16680
+ tradeTagName = _ref10.tradeTagName,
16681
+ deliveryState = _ref10.deliveryState,
16682
+ vipCode = _ref10.vipCode,
16683
+ shopCode = _ref10.shopCode,
16684
+ rest = _objectWithoutProperties(_ref10, _excluded$g);
15748
16685
  return _objectSpread2(_objectSpread2({}, rest), {}, {
15749
16686
  billNo: billNo,
15750
16687
  billType: billType,
@@ -15761,12 +16698,12 @@ var index$1 = (function (props) {
15761
16698
  onceRef.current = false;
15762
16699
  case 2:
15763
16700
  case "end":
15764
- return _context6.stop();
16701
+ return _context7.stop();
15765
16702
  }
15766
- }, _callee6);
16703
+ }, _callee7);
15767
16704
  }));
15768
- return function getGyOrderList(_x6) {
15769
- return _ref8.apply(this, arguments);
16705
+ return function getGyOrderList(_x7) {
16706
+ return _ref9.apply(this, arguments);
15770
16707
  };
15771
16708
  }();
15772
16709
  var rowSelection = {
@@ -15915,6 +16852,31 @@ var componentMap$1 = {
15915
16852
  returnDeleteGood: 'gyReturnDeleteGood',
15916
16853
  exchangeDeleteGood: 'gyExchangeDeleteGood'
15917
16854
  }
16855
+ },
16856
+ JST_GOODS: {
16857
+ type: 'jst',
16858
+ key: 'jstGoods',
16859
+ name: '聚水潭',
16860
+ orderNo: 'dealCode',
16861
+ goodDetailOrderNo: 'originalDealCode',
16862
+ eventNameMap: {
16863
+ // pubsub 事件
16864
+ type: 'jstType',
16865
+ updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
16866
+ selectListReturn: 'jstSelectListReturn',
16867
+ selectList: 'jstSelectList',
16868
+ reissueSelectList: 'jstReissueSelectList',
16869
+ reissueSelectListReturn: 'jstReissueSelectListReturn',
16870
+ reissueDeleteGood: 'jstReissueDeleteGood',
16871
+ changeShopCode: 'jstChangeShopCode',
16872
+ reissueType: 'jstReissueType',
16873
+ returnType: 'jstReturnType',
16874
+ returnSelectListReturn: 'jstReturnSelectListReturn',
16875
+ returnSelectList: 'jstReturnSelectList',
16876
+ deleteGood: 'jstDeleteGood',
16877
+ returnDeleteGood: 'jstReturnDeleteGood',
16878
+ exchangeDeleteGood: 'jstExchangeDeleteGood'
16879
+ }
15918
16880
  }
15919
16881
  };
15920
16882
  var CommonGoods = function CommonGoods(props) {
@@ -16264,27 +17226,58 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
16264
17226
  };
16265
17227
 
16266
17228
  var componentMap$3 = {
16267
- 'WDT_EXCHANGE_GOODS': {
17229
+ WDT_EXCHANGE_GOODS: {
16268
17230
  type: 'wdt',
16269
17231
  valueKey: 'wdtExchangeGoods',
16270
17232
  returnTypeKey: 'wdtExchangeType',
16271
17233
  name: '旺店通',
16272
17234
  eventNameMap: {
16273
- changeShopCode: 'wdtChangeShopCode',
16274
- exchangeDeleteGood: 'wdtExchangeDeleteGood',
17235
+ // pubsub 事件
16275
17236
  exchangeCopyGood: 'wdtExchangeCopyGood',
16276
17237
  exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
16277
17238
  }
17239
+ },
17240
+ JST_EXCHANGE_GOODS: {
17241
+ type: 'jst',
17242
+ showChooseTradeGoodsBtn: true,
17243
+ valueKey: 'jstExchangeGoods',
17244
+ returnTypeKey: 'jstExchangeType',
17245
+ systemOrder: 'jstSystemOrder',
17246
+ systemOrderNo: 'jstSystemOrderNo',
17247
+ oIdKey: 'oId',
17248
+ goodDetailsKey: 'items',
17249
+ skuIdKey: 'skuId',
17250
+ outerOiIdKey: '',
17251
+ name: '聚水潭',
17252
+ updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
17253
+ eventNameMap: {
17254
+ // pubsub 事件
17255
+ exchangeCopyGood: 'jstExchangeCopyGood',
17256
+ exchangeBackCopyGood: 'jstExchangeBackCopyGood',
17257
+ returnGoodsSysorder: 'jstReturnGoodsSysorder',
17258
+ returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
17259
+ }
16278
17260
  }
16279
17261
  };
16280
17262
  var CommonExchangeGoods = function CommonExchangeGoods(props) {
17263
+ var _componentMap$compTyp, _componentMap$compTyp4;
16281
17264
  var value = props.value,
16282
17265
  onChange = props.onChange,
16283
17266
  disabled = props.disabled,
16284
17267
  compType = props.type;
17268
+ var uniqueKey = (componentMap$3 === null || componentMap$3 === void 0 ? void 0 : (_componentMap$compTyp = componentMap$3[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.skuIdKey) || 'uuid';
16285
17269
  var valueRef = React.useRef({});
17270
+ // PS: 目前选择订单商品,只有聚水潭换出商品,而且聚水潭不用考虑合并单,所以这个值一直是 false
17271
+ var _useState = React.useState(false),
17272
+ _useState2 = _slicedToArray(_useState, 2),
17273
+ isStrict = _useState2[0],
17274
+ setIsStrict = _useState2[1];
17275
+ var _useState3 = React.useState([]),
17276
+ _useState4 = _slicedToArray(_useState3, 2),
17277
+ originDataSource = _useState4[0],
17278
+ setOriginDataSource = _useState4[1];
16286
17279
  React.useEffect(function () {
16287
- var subscription = pubsub__default['default'].subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
17280
+ var subscription = componentMap$3[compType].eventNameMap.exchangeBackCopyGood && pubsub__default['default'].subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
16288
17281
  if (disabled) return;
16289
17282
  var newValue = {
16290
17283
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
@@ -16306,26 +17299,11 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
16306
17299
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16307
17300
  });
16308
17301
  return function () {
16309
- pubsub__default['default'].unsubscribe(subscription);
17302
+ subscription && pubsub__default['default'].unsubscribe(subscription);
16310
17303
  };
16311
- });
17304
+ }, []);
16312
17305
  React.useEffect(function () {
16313
17306
  valueRef.current = value;
16314
- pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.exchangeDeleteGood, function (_, data) {
16315
- if (disabled) return;
16316
- if (value) {
16317
- var newValue = _objectSpread2({}, value);
16318
- newValue[componentMap$3[compType].valueKey] = newValue[componentMap$3[compType].valueKey].filter(function (item) {
16319
- return item.sku !== data;
16320
- });
16321
- onChange(newValue);
16322
- }
16323
- });
16324
- pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.changeShopCode, function (type, data) {
16325
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
16326
- shopCode: data.shopCode
16327
- }));
16328
- });
16329
17307
  }, [value]);
16330
17308
  var changeGoodHandle = function changeGoodHandle(val) {
16331
17309
  var newValue = _objectSpread2({}, value);
@@ -16340,13 +17318,53 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
16340
17318
  };
16341
17319
  var copyGoods = function copyGoods() {
16342
17320
  var copyHandle = function copyHandle() {
16343
- pubsub__default['default'].publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, 'WDT_EXCHANGE_GOODS');
17321
+ pubsub__default['default'].publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, compType);
16344
17322
  };
16345
17323
  return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
16346
17324
  type: "link",
16347
17325
  onClick: copyHandle
16348
17326
  }, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
16349
17327
  };
17328
+ var selectedGoodsChange = React.useCallback(function (skuList) {
17329
+ var _componentMap$compTyp2, _componentMap$compTyp3, _uniqBy;
17330
+ var newValue = _objectSpread2({}, value);
17331
+ // 原订单商品
17332
+ var originTradeGoodList = originDataSource || [];
17333
+ // 当前选中的所有商品【包含了原订单+商品库】
17334
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value[componentMap$3 === null || componentMap$3 === void 0 ? void 0 : (_componentMap$compTyp2 = componentMap$3[compType]) === null || _componentMap$compTyp2 === void 0 ? void 0 : _componentMap$compTyp2.valueKey]) || [];
17335
+ newValue[componentMap$3 === null || componentMap$3 === void 0 ? void 0 : (_componentMap$compTyp3 = componentMap$3[compType]) === null || _componentMap$compTyp3 === void 0 ? void 0 : _componentMap$compTyp3.valueKey] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), uniqueKey)) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17336
+ return skuList.includes(item[uniqueKey]);
17337
+ });
17338
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17339
+ }, [value === null || value === void 0 ? void 0 : value[componentMap$3 === null || componentMap$3 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$3[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.valueKey], isStrict, originDataSource]);
17340
+ var getGoodDetails = function getGoodDetails(_ref) {
17341
+ var _componentMap$compTyp5, _componentMap$compTyp6, _order$componentMap$c, _componentMap$compTyp7;
17342
+ var returnGoodsValue = _ref.returnGoodsValue,
17343
+ mode = _ref.mode,
17344
+ sysOrderNo = _ref.sysOrderNo;
17345
+ var systemOrder = returnGoodsValue === null || returnGoodsValue === void 0 ? void 0 : returnGoodsValue[(_componentMap$compTyp5 = componentMap$3[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.systemOrder];
17346
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : returnGoodsValue === null || returnGoodsValue === void 0 ? void 0 : returnGoodsValue[(_componentMap$compTyp6 = componentMap$3[compType]) === null || _componentMap$compTyp6 === void 0 ? void 0 : _componentMap$compTyp6.systemOrderNo];
17347
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17348
+ return order[componentMap$3[compType].oIdKey] === systemOrderNo;
17349
+ });
17350
+ var goodDetails = kmkfUtils.jstMergeIdenticalGoods((order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$3[compType].goodDetailsKey]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.length) ? (_componentMap$compTyp7 = componentMap$3[compType]) === null || _componentMap$compTyp7 === void 0 ? void 0 : _componentMap$compTyp7.updateGoodsHandle([order], true) : []);
17351
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
17352
+ return mode ? goodDetails.filter(function (goodItem) {
17353
+ return !orderNo || goodItem[componentMap$3[compType].outerOiIdKey] === orderNo;
17354
+ }) : goodDetails;
17355
+ };
17356
+ var getDataSourceAsync = function getDataSourceAsync() {
17357
+ return new Promise(function (resolve) {
17358
+ pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
17359
+ resolve(data);
17360
+ setOriginDataSource(getGoodDetails({
17361
+ returnGoodsValue: data,
17362
+ mode: isStrict
17363
+ }));
17364
+ });
17365
+ pubsub__default['default'].publish(componentMap$3[compType].eventNameMap.returnGoodsSysorder, compType);
17366
+ });
17367
+ };
16350
17368
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
16351
17369
  key: componentMap$3[compType].type
16352
17370
  }, props), {}, {
@@ -16356,6 +17374,12 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
16356
17374
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
16357
17375
  value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
16358
17376
  otherOperations: copyGoods(),
17377
+ tradeGoods: componentMap$3[compType].showChooseTradeGoodsBtn ? {
17378
+ uniqueKey: uniqueKey,
17379
+ originDataSource: originDataSource,
17380
+ getDataSourceAsync: getDataSourceAsync,
17381
+ selectedGoodsChange: selectedGoodsChange
17382
+ } : void 0,
16359
17383
  onChange: function onChange(val) {
16360
17384
  return changeGoodHandle(val);
16361
17385
  }
@@ -16634,6 +17658,305 @@ var wdtReissue = function wdtReissue(props) {
16634
17658
  })));
16635
17659
  };
16636
17660
 
17661
+ var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
17662
+ var typeMap$2 = {
17663
+ JST_REISSUE_GOODS: {
17664
+ compType: '补发',
17665
+ key: 'jstReissueGoods',
17666
+ typeName: 'jstReissueType',
17667
+ systemOrder: 'jstSystemOrder',
17668
+ systemOrderNo: 'jstSystemOrderNo',
17669
+ systemOrderBillType: 'jstSystemOrderBillType',
17670
+ getOrderList: jstUtils.getJstOrderListSingleton,
17671
+ updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
17672
+ orderTypeKey: 'orderType',
17673
+ oIdKey: 'oId',
17674
+ outerOiIdKey: '',
17675
+ goodDetailsKey: 'items'
17676
+ },
17677
+ JST_RETURN_GOODS: {
17678
+ compType: '退货',
17679
+ key: 'jstReturnGoods',
17680
+ typeName: 'jstReturnType',
17681
+ systemOrder: 'jstSystemOrder',
17682
+ systemOrderNo: 'jstSystemOrderNo',
17683
+ systemOrderBillType: 'jstSystemOrderBillType',
17684
+ getOrderList: jstUtils.getJstOrderListSingleton,
17685
+ updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
17686
+ orderTypeKey: 'orderType',
17687
+ oIdKey: 'oId',
17688
+ outerOiIdKey: '',
17689
+ goodDetailsKey: 'items',
17690
+ showErpGoodsBtn: false,
17691
+ eventNameMap: {
17692
+ // pubsub 事件
17693
+ exchangeCopyGood: 'jstExchangeCopyGood',
17694
+ exchangeBackCopyGood: 'jstExchangeBackCopyGood',
17695
+ returnGoodsSysorder: 'jstReturnGoodsSysorder',
17696
+ returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
17697
+ }
17698
+ }
17699
+ };
17700
+ var PublicReissue = function PublicReissue(props) {
17701
+ var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43;
17702
+ var value = props.value,
17703
+ onChange = props.onChange,
17704
+ _props$reasonList = props.reasonList,
17705
+ reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17706
+ disabled = props.disabled,
17707
+ type = props.type,
17708
+ other = _objectWithoutProperties(props, _excluded$i);
17709
+ var getOrderFlag = React.useRef(false);
17710
+ var _useState = React.useState(false),
17711
+ _useState2 = _slicedToArray(_useState, 2),
17712
+ isStrict = _useState2[0],
17713
+ setIsStrict = _useState2[1];
17714
+ // TODO: 在修改场景下手动获取一次订单详情中数据
17715
+ React.useEffect(function () {
17716
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
17717
+ if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$2[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$2[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
17718
+ var _value$typeMap$type$s4, _typeMap$type3;
17719
+ getOrderFlag.current = true;
17720
+ getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$2[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
17721
+ }
17722
+ return;
17723
+ }, [value]);
17724
+ var valueRef = React.useRef({});
17725
+ React.useEffect(function () {
17726
+ valueRef.current = value;
17727
+ }, [value]);
17728
+ React.useEffect(function () {
17729
+ var subscription;
17730
+ var subscription2;
17731
+ if (typeMap$2[type].eventNameMap) {
17732
+ subscription = pubsub__default['default'].subscribe(typeMap$2[type].eventNameMap.exchangeCopyGood, function () {
17733
+ var _valueRef$current, _valueRef$current2;
17734
+ pubsub__default['default'].publish(typeMap$2[type].eventNameMap.exchangeBackCopyGood, {
17735
+ list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current[typeMap$2[type].key]) || []),
17736
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode
17737
+ });
17738
+ });
17739
+ subscription2 = pubsub__default['default'].subscribe(typeMap$2[type].eventNameMap.returnGoodsSysorder, function () {
17740
+ pubsub__default['default'].publish(typeMap$2[type].eventNameMap.returnGoodsSysorderBack, lodash.cloneDeep(valueRef.current));
17741
+ });
17742
+ }
17743
+ return function () {
17744
+ subscription && pubsub__default['default'].unsubscribe(subscription);
17745
+ subscription2 && pubsub__default['default'].unsubscribe(subscription2);
17746
+ };
17747
+ }, []);
17748
+ var getOrderList = /*#__PURE__*/function () {
17749
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
17750
+ var _typeMap$type4;
17751
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
17752
+ while (1) switch (_context.prev = _context.next) {
17753
+ case 0:
17754
+ (_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
17755
+ var _typeMap$type5, _typeMap$type6, _typeMap$type10, _typeMap$type11;
17756
+ var orders = data || [];
17757
+ var showOrderInfo = orders.map(function (orderItem) {
17758
+ return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
17759
+ });
17760
+ var typeObj = {};
17761
+ var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrderNo];
17762
+ if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrderBillType) {
17763
+ var _typeMap$type8, _typeMap$type9;
17764
+ var targetOrder = orders.find(function (oItem) {
17765
+ var _typeMap$type7;
17766
+ return oItem[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.oIdKey] === systemOrderNo;
17767
+ });
17768
+ typeObj[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.orderTypeKey];
17769
+ }
17770
+ onChange(_objectSpread2(_objectSpread2(_objectSpread2({}, value), typeObj), {}, _defineProperty({}, (_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.systemOrder]), {}, {
17771
+ showOrderInfo: showOrderInfo,
17772
+ orders: orders
17773
+ }))));
17774
+ });
17775
+ case 1:
17776
+ case "end":
17777
+ return _context.stop();
17778
+ }
17779
+ }, _callee);
17780
+ }));
17781
+ return function getOrderList(_x) {
17782
+ return _ref.apply(this, arguments);
17783
+ };
17784
+ }();
17785
+ var changeTypeHandle = function changeTypeHandle(val) {
17786
+ var _typeMap$type12;
17787
+ var typeName = val === null || val === void 0 ? void 0 : val[0];
17788
+ // if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
17789
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
17790
+ var newValue = _objectSpread2({}, value);
17791
+ newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
17792
+ if (typeName === '1') {
17793
+ var _typeMap$type13;
17794
+ newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
17795
+ mode: isStrict
17796
+ });
17797
+ } else if (typeName === '2') {
17798
+ var _typeMap$type14;
17799
+ // 切换到非原单,清空列表
17800
+ newValue[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
17801
+ }
17802
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17803
+ };
17804
+ var handleModeChange = function handleModeChange(mode) {
17805
+ var _value$typeMap$type$t, _typeMap$type15, _typeMap$type16;
17806
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
17807
+ setIsStrict(mode);
17808
+ if (!isOriginalOrder) return;
17809
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key, getGoodDetails({
17810
+ mode: mode
17811
+ }))));
17812
+ };
17813
+ var getGoodDetails = function getGoodDetails(_ref3) {
17814
+ var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
17815
+ var mode = _ref3.mode,
17816
+ sysOrderNo = _ref3.sysOrderNo;
17817
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
17818
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo];
17819
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17820
+ return order[typeMap$2[type].oIdKey] === systemOrderNo;
17821
+ });
17822
+ var goodDetails = kmkfUtils.jstMergeIdenticalGoods((order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length) ? (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], true) : []);
17823
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
17824
+ return mode ? goodDetails.filter(function (goodItem) {
17825
+ return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
17826
+ }) : goodDetails;
17827
+ };
17828
+ var changeGoodHandle = function changeGoodHandle(val) {
17829
+ var _typeMap$type20;
17830
+ var newValue = _objectSpread2({}, value);
17831
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = val || [];
17832
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17833
+ };
17834
+ var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
17835
+ var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
17836
+ var newValue = _objectSpread2({}, value);
17837
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo)] = val;
17838
+ if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderBillType) {
17839
+ var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
17840
+ var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orders) || [];
17841
+ var targetOrder = val && orders.find(function (oItem) {
17842
+ var _typeMap$type24;
17843
+ return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
17844
+ });
17845
+ newValue[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.orderTypeKey];
17846
+ }
17847
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
17848
+ var _typeMap$type28;
17849
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)] = [];
17850
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
17851
+ var _typeMap$type30;
17852
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)] = getGoodDetails({
17853
+ mode: isStrict,
17854
+ sysOrderNo: val
17855
+ });
17856
+ }
17857
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17858
+ };
17859
+ //显示选择商品按钮
17860
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
17861
+ var selectedGoodsChange = React.useCallback(function (skuList) {
17862
+ var _typeMap$type32, _typeMap$type33, _uniqBy;
17863
+ var newValue = _objectSpread2({}, value);
17864
+ // 原订单商品
17865
+ var originTradeGoodList = getGoodDetails({
17866
+ mode: isStrict
17867
+ }) || [];
17868
+ // 当前选中的所有商品【包含了原订单+商品库】
17869
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)]) || [];
17870
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17871
+ return skuList.includes(item.uuid);
17872
+ });
17873
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17874
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)], isStrict]);
17875
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
17876
+ gutter: 8,
17877
+ wrap: true,
17878
+ id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key) || "".concat(Date.now())
17879
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
17880
+ className: "gutter-row",
17881
+ xs: {
17882
+ span: 11
17883
+ },
17884
+ sm: {
17885
+ span: 6
17886
+ }
17887
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
17888
+ style: {
17889
+ marginBottom: '8px'
17890
+ },
17891
+ disabled: disabled,
17892
+ allowClear: false,
17893
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.systemOrderNo)],
17894
+ onChange: function onChange(val) {
17895
+ return changeSystemOrderHandle(val);
17896
+ },
17897
+ placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.compType) || '', "\u7CFB\u7EDF\u5355")
17898
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
17899
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
17900
+ key: item[typeMap$2[type].oIdKey],
17901
+ value: item[typeMap$2[type].oIdKey],
17902
+ label: item[typeMap$2[type].oIdKey]
17903
+ }, item[typeMap$2[type].oIdKey]);
17904
+ }))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
17905
+ className: "gutter-row",
17906
+ xs: {
17907
+ span: 11
17908
+ },
17909
+ sm: {
17910
+ span: 6
17911
+ }
17912
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
17913
+ style: {
17914
+ marginBottom: '8px'
17915
+ },
17916
+ disabled: disabled,
17917
+ allowClear: false,
17918
+ options: reasonList,
17919
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.typeName)],
17920
+ onChange: function onChange(val) {
17921
+ return changeTypeHandle(val);
17922
+ }
17923
+ })), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.systemOrderBillType) && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
17924
+ className: "gutter-row",
17925
+ xs: {
17926
+ span: 11
17927
+ },
17928
+ sm: {
17929
+ span: 6
17930
+ }
17931
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
17932
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrderBillType)],
17933
+ disabled: disabled,
17934
+ readOnly: true
17935
+ }))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
17936
+ key: 'reissueGoods'
17937
+ }, other), {}, {
17938
+ type: type,
17939
+ disabled: disabled,
17940
+ canUpdateNumber: showChangeBtn,
17941
+ showChangeBtn: showChangeBtn,
17942
+ showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.showErpGoodsBtn,
17943
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
17944
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.key)],
17945
+ onChange: function onChange(val) {
17946
+ return changeGoodHandle(val);
17947
+ },
17948
+ onModeChange: handleModeChange,
17949
+ showModeBtn: false,
17950
+ isStrict: isStrict,
17951
+ tradeGoods: {
17952
+ originDataSource: getGoodDetails({
17953
+ mode: isStrict
17954
+ }),
17955
+ selectedGoodsChange: selectedGoodsChange
17956
+ }
17957
+ })));
17958
+ };
17959
+
16637
17960
  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";
16638
17961
  styleInject(css_248z$a);
16639
17962
 
@@ -17110,12 +18433,12 @@ var Goods$1 = function Goods(props, ref) {
17110
18433
  };
17111
18434
  var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
17112
18435
 
17113
- var _excluded$i = ["onChange", "value", "failValue"];
18436
+ var _excluded$j = ["onChange", "value", "failValue"];
17114
18437
  function CommonStatus(props) {
17115
18438
  var onChange = props.onChange,
17116
18439
  value = props.value,
17117
18440
  failValue = props.failValue,
17118
- other = _objectWithoutProperties(props, _excluded$i);
18441
+ other = _objectWithoutProperties(props, _excluded$j);
17119
18442
  var changeHandle = function changeHandle(val) {
17120
18443
  onChange === null || onChange === void 0 ? void 0 : onChange({
17121
18444
  status: val,
@@ -17155,10 +18478,15 @@ var typeInitValueMap$1 = {
17155
18478
  initValue: [{
17156
18479
  billNo: ''
17157
18480
  }]
18481
+ },
18482
+ 5: {
18483
+ initValue: [{
18484
+ billNo: ''
18485
+ }]
17158
18486
  }
17159
18487
  };
17160
18488
  var CommonSystemOrder = function CommonSystemOrder(props) {
17161
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
18489
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5;
17162
18490
  var _props$value = props.value,
17163
18491
  value = _props$value === void 0 ? [] : _props$value,
17164
18492
  onChange = props.onChange,
@@ -17180,7 +18508,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
17180
18508
  maxHeight: '300px',
17181
18509
  overflowY: 'auto'
17182
18510
  }
17183
- }, [1, 2, 3, 4].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
18511
+ }, [1, 2, 3, 4, 5].includes(type) ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
17184
18512
  };
17185
18513
  var changeInputHandle = function changeInputHandle(val, type) {
17186
18514
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
@@ -17237,10 +18565,17 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
17237
18565
  return changeInputHandle(e.target.value, 'billNo');
17238
18566
  },
17239
18567
  value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
18568
+ })) : null, type === 5 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
18569
+ disabled: disabled,
18570
+ placeholder: "\u8BF7\u8F93\u5165\u552E\u540E\u5355id",
18571
+ onChange: function onChange(e) {
18572
+ return changeInputHandle(e.target.value, 'billNo');
18573
+ },
18574
+ value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
17240
18575
  })) : null) : null);
17241
18576
  };
17242
18577
 
17243
- var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
18578
+ var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
17244
18579
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
17245
18580
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
17246
18581
  var _props$value = props.value,
@@ -17250,7 +18585,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
17250
18585
  failValue = props.failValue,
17251
18586
  _props$type = props.type,
17252
18587
  type = _props$type === void 0 ? 1 : _props$type,
17253
- other = _objectWithoutProperties(props, _excluded$j);
18588
+ other = _objectWithoutProperties(props, _excluded$k);
17254
18589
  var _useState = React.useState(0),
17255
18590
  _useState2 = _slicedToArray(_useState, 2),
17256
18591
  changeIndex = _useState2[0],
@@ -17316,7 +18651,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
17316
18651
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
17317
18652
  };
17318
18653
 
17319
- var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
18654
+ var _excluded$l = ["value", "onChange", "disabled", "failValue", "type"];
17320
18655
  var MsgStatus = function MsgStatus(props) {
17321
18656
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
17322
18657
  var _props$value = props.value,
@@ -17326,7 +18661,7 @@ var MsgStatus = function MsgStatus(props) {
17326
18661
  failValue = props.failValue,
17327
18662
  _props$type = props.type,
17328
18663
  type = _props$type === void 0 ? 1 : _props$type,
17329
- other = _objectWithoutProperties(props, _excluded$k);
18664
+ other = _objectWithoutProperties(props, _excluded$l);
17330
18665
  var _useState = React.useState(0),
17331
18666
  _useState2 = _slicedToArray(_useState, 2),
17332
18667
  changeIndex = _useState2[0],
@@ -17395,8 +18730,8 @@ var CalculationInput = function CalculationInput(props) {
17395
18730
  }, config === null || config === void 0 ? void 0 : config.unit));
17396
18731
  };
17397
18732
 
17398
- var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
17399
- var typeMap$2 = {
18733
+ var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"];
18734
+ var typeMap$3 = {
17400
18735
  BS_E3_REISSUE_GOODS: {
17401
18736
  key: 'bsE3ReissueGoods',
17402
18737
  typeName: 'bsE3ReissueType',
@@ -17413,7 +18748,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17413
18748
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17414
18749
  disabled = props.disabled,
17415
18750
  type = props.type,
17416
- other = _objectWithoutProperties(props, _excluded$l);
18751
+ other = _objectWithoutProperties(props, _excluded$m);
17417
18752
  var getOrderFlag = React.useRef(false);
17418
18753
  var _useState = React.useState(false),
17419
18754
  _useState2 = _slicedToArray(_useState, 2),
@@ -17422,10 +18757,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
17422
18757
  // TODO: 在修改场景下手动获取一次订单详情中数据
17423
18758
  React.useEffect(function () {
17424
18759
  var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
17425
- if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$2[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$2[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
18760
+ if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$3[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$3[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
17426
18761
  var _value$typeMap$type$s4, _typeMap$type3;
17427
18762
  getOrderFlag.current = true;
17428
- getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$2[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
18763
+ getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$3[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
17429
18764
  }
17430
18765
  return;
17431
18766
  }, [value]);
@@ -17449,7 +18784,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17449
18784
  return _regeneratorRuntime().wrap(function _callee$(_context) {
17450
18785
  while (1) switch (_context.prev = _context.next) {
17451
18786
  case 0:
17452
- (_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
18787
+ (_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
17453
18788
  var _typeMap$type5, _typeMap$type6;
17454
18789
  var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
17455
18790
  var showOrderInfo = orders.map(function (_ref2) {
@@ -17458,7 +18793,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17458
18793
  billNo: orderSn
17459
18794
  };
17460
18795
  });
17461
- onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
18796
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
17462
18797
  showOrderInfo: showOrderInfo,
17463
18798
  orders: orders
17464
18799
  }))));
@@ -17479,25 +18814,25 @@ var bsE3Reissue = function bsE3Reissue(props) {
17479
18814
  // if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
17480
18815
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
17481
18816
  var newValue = _objectSpread2({}, value);
17482
- newValue[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
18817
+ newValue[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
17483
18818
  if (typeName === '1') {
17484
18819
  var _typeMap$type8;
17485
- newValue[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
18820
+ newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
17486
18821
  mode: isStrict
17487
18822
  });
17488
18823
  } else if (typeName === '2') {
17489
18824
  var _typeMap$type9;
17490
18825
  // 切换到非原单,清空列表
17491
- newValue[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
18826
+ newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
17492
18827
  }
17493
18828
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17494
18829
  };
17495
18830
  var handleModeChange = function handleModeChange(mode) {
17496
18831
  var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
17497
- var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
18832
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
17498
18833
  setIsStrict(mode);
17499
18834
  if (!isOriginalOrder) return;
17500
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key, getGoodDetails({
18835
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key, getGoodDetails({
17501
18836
  mode: mode
17502
18837
  }))));
17503
18838
  };
@@ -17505,8 +18840,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
17505
18840
  var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
17506
18841
  var mode = _ref3.mode,
17507
18842
  sysOrderNo = _ref3.sysOrderNo;
17508
- var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.systemOrder];
17509
- var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrderNo];
18843
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.systemOrder];
18844
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrderNo];
17510
18845
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17511
18846
  return order.orderSn === systemOrderNo;
17512
18847
  });
@@ -17519,19 +18854,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
17519
18854
  var changeGoodHandle = function changeGoodHandle(val) {
17520
18855
  var _typeMap$type14;
17521
18856
  var newValue = _objectSpread2({}, value);
17522
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = val || [];
18857
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = val || [];
17523
18858
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17524
18859
  };
17525
18860
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
17526
18861
  var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
17527
18862
  var newValue = _objectSpread2({}, value);
17528
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrderNo)] = val;
17529
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
18863
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrderNo)] = val;
18864
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
17530
18865
  var _typeMap$type17;
17531
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = [];
17532
- } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
18866
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = [];
18867
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
17533
18868
  var _typeMap$type19;
17534
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = getGoodDetails({
18869
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = getGoodDetails({
17535
18870
  mode: isStrict,
17536
18871
  sysOrderNo: val
17537
18872
  });
@@ -17541,8 +18876,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
17541
18876
  //显示选择商品按钮 原单换不显示选择商品
17542
18877
  var showChangeBtn = React.useMemo(function () {
17543
18878
  var _typeMap$type20;
17544
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
17545
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
18879
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
18880
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
17546
18881
  var selectedGoodsChange = React.useCallback(function (skuList) {
17547
18882
  var _typeMap$type22, _typeMap$type23, _uniqBy;
17548
18883
  var newValue = _objectSpread2({}, value);
@@ -17551,12 +18886,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
17551
18886
  mode: isStrict
17552
18887
  }) || [];
17553
18888
  // 当前选中的所有商品【包含了原订单+商品库】
17554
- var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
17555
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
18889
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
18890
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17556
18891
  return skuList.includes(item.uuid);
17557
18892
  });
17558
18893
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17559
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
18894
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
17560
18895
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
17561
18896
  gutter: 8,
17562
18897
  wrap: true,
@@ -17575,12 +18910,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
17575
18910
  },
17576
18911
  disabled: disabled,
17577
18912
  allowClear: false,
17578
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
18913
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
17579
18914
  onChange: function onChange(val) {
17580
18915
  return changeSystemOrderHandle(val);
17581
18916
  },
17582
18917
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
17583
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
18918
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
17584
18919
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
17585
18920
  key: item.billNo,
17586
18921
  value: item.billNo,
@@ -17601,7 +18936,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17601
18936
  disabled: disabled,
17602
18937
  allowClear: false,
17603
18938
  options: reasonList,
17604
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
18939
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
17605
18940
  onChange: function onChange(val) {
17606
18941
  return changeTypeHandle(val);
17607
18942
  }
@@ -17613,7 +18948,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17613
18948
  canUpdateNumber: showChangeBtn,
17614
18949
  showChangeBtn: showChangeBtn,
17615
18950
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
17616
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
18951
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
17617
18952
  onChange: function onChange(val) {
17618
18953
  return changeGoodHandle(val);
17619
18954
  },
@@ -17629,9 +18964,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
17629
18964
  })));
17630
18965
  };
17631
18966
 
17632
- var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"],
18967
+ var _excluded$n = ["value", "onChange", "reasonList", "disabled", "type"],
17633
18968
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
17634
- var typeMap$3 = {
18969
+ var typeMap$4 = {
17635
18970
  GY_REISSUE_GOODS: {
17636
18971
  key: 'gyReissueGoods',
17637
18972
  name: '管易',
@@ -17658,7 +18993,7 @@ var GyReissue = function GyReissue(props) {
17658
18993
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17659
18994
  disabled = props.disabled,
17660
18995
  type = props.type,
17661
- other = _objectWithoutProperties(props, _excluded$m);
18996
+ other = _objectWithoutProperties(props, _excluded$n);
17662
18997
  var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$gySystemOrder = value.gySystemOrder) === null || _value$gySystemOrder === void 0 ? void 0 : _value$gySystemOrder.orders) || []).some(function (order) {
17663
18998
  var _order$platformCode;
17664
18999
  return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
@@ -17670,10 +19005,10 @@ var GyReissue = function GyReissue(props) {
17670
19005
  setIsStrict = _useState2[1];
17671
19006
  React.useEffect(function () {
17672
19007
  var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
17673
- if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$3[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$3[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
19008
+ if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$4[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$4[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
17674
19009
  var _value$typeMap$type$s4, _typeMap$type3;
17675
19010
  getOrderFlag.current = true;
17676
- getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$3[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
19011
+ getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$4[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
17677
19012
  }
17678
19013
  return;
17679
19014
  }, [value]);
@@ -17683,7 +19018,7 @@ var GyReissue = function GyReissue(props) {
17683
19018
  return _regeneratorRuntime().wrap(function _callee$(_context) {
17684
19019
  while (1) switch (_context.prev = _context.next) {
17685
19020
  case 0:
17686
- (_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
19021
+ (_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
17687
19022
  var _typeMap$type5, _typeMap$type6;
17688
19023
  var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
17689
19024
  var showOrderInfo = orders.map(function (_ref2) {
@@ -17706,7 +19041,7 @@ var GyReissue = function GyReissue(props) {
17706
19041
  shopCode: shopCode
17707
19042
  });
17708
19043
  });
17709
- onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
19044
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
17710
19045
  showOrderInfo: showOrderInfo,
17711
19046
  orders: orders
17712
19047
  }))));
@@ -17724,28 +19059,28 @@ var GyReissue = function GyReissue(props) {
17724
19059
  var changeTypeHandle = function changeTypeHandle(val) {
17725
19060
  var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
17726
19061
  var typeName = val === null || val === void 0 ? void 0 : val[0];
17727
- if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
19062
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
17728
19063
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
17729
19064
  var newValue = _objectSpread2({}, value);
17730
- newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
19065
+ newValue[(_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
17731
19066
  if (typeName === '1') {
17732
19067
  var _typeMap$type9;
17733
- newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
19068
+ newValue[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
17734
19069
  mode: isStrict
17735
19070
  });
17736
19071
  } else if (typeName === '2') {
17737
19072
  var _typeMap$type10;
17738
19073
  // 切换到非原单,清空列表
17739
- newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
19074
+ newValue[(_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
17740
19075
  }
17741
19076
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17742
19077
  };
17743
19078
  var handleModeChange = function handleModeChange(mode) {
17744
19079
  var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
17745
- var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
19080
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
17746
19081
  setIsStrict(mode);
17747
19082
  if (!isOriginalOrder) return;
17748
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
19083
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
17749
19084
  mode: mode
17750
19085
  }))));
17751
19086
  };
@@ -17753,8 +19088,8 @@ var GyReissue = function GyReissue(props) {
17753
19088
  var _typeMap$type13, _typeMap$type14, _order$details;
17754
19089
  var mode = _ref3.mode,
17755
19090
  sysOrderNo = _ref3.sysOrderNo;
17756
- var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
17757
- var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
19091
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
19092
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
17758
19093
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17759
19094
  return order.code === systemOrderNo;
17760
19095
  });
@@ -17767,10 +19102,10 @@ var GyReissue = function GyReissue(props) {
17767
19102
  var changeGoodHandle = function changeGoodHandle(val) {
17768
19103
  var _typeMap$type15;
17769
19104
  var newValue = _objectSpread2({}, value);
17770
- newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
19105
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
17771
19106
  var _typeMap$type16, _typeMap$type17;
17772
- item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
17773
- item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
19107
+ item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
19108
+ item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
17774
19109
  return item;
17775
19110
  });
17776
19111
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -17778,13 +19113,13 @@ var GyReissue = function GyReissue(props) {
17778
19113
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
17779
19114
  var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
17780
19115
  var newValue = _objectSpread2({}, value);
17781
- newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
17782
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
19116
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
19117
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
17783
19118
  var _typeMap$type20;
17784
- newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
17785
- } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
19119
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
19120
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
17786
19121
  var _typeMap$type22;
17787
- newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
19122
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
17788
19123
  mode: isStrict,
17789
19124
  sysOrderNo: val
17790
19125
  });
@@ -17799,18 +19134,18 @@ var GyReissue = function GyReissue(props) {
17799
19134
  mode: isStrict
17800
19135
  }) || [];
17801
19136
  // 当前选中的所有商品【包含了原订单+商品库】
17802
- var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
17803
- newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
19137
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
19138
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17804
19139
  return skuList.includes(item.uuid);
17805
19140
  });
17806
- console.log('商品发生变化', newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
19141
+ console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
17807
19142
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17808
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
19143
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
17809
19144
  //显示选择商品按钮 原单换不显示选择商品
17810
19145
  var showChangeBtn = React.useMemo(function () {
17811
19146
  var _typeMap$type27;
17812
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
17813
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
19147
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
19148
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
17814
19149
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
17815
19150
  gutter: 8,
17816
19151
  wrap: true
@@ -17828,12 +19163,12 @@ var GyReissue = function GyReissue(props) {
17828
19163
  },
17829
19164
  disabled: disabled,
17830
19165
  allowClear: false,
17831
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
19166
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
17832
19167
  onChange: function onChange(val) {
17833
19168
  return changeSystemOrderHandle(val);
17834
19169
  },
17835
19170
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
17836
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$3[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
19171
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
17837
19172
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
17838
19173
  key: item.billNo,
17839
19174
  value: item.billNo,
@@ -17854,7 +19189,7 @@ var GyReissue = function GyReissue(props) {
17854
19189
  disabled: disabled,
17855
19190
  allowClear: false,
17856
19191
  options: reasonList,
17857
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
19192
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
17858
19193
  onChange: function onChange(val) {
17859
19194
  return changeTypeHandle(val);
17860
19195
  }
@@ -17866,7 +19201,7 @@ var GyReissue = function GyReissue(props) {
17866
19201
  canUpdateNumber: showChangeBtn,
17867
19202
  showChangeBtn: showChangeBtn,
17868
19203
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
17869
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
19204
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
17870
19205
  onChange: function onChange(val) {
17871
19206
  return changeGoodHandle(val);
17872
19207
  },
@@ -17932,6 +19267,7 @@ exports.LogisticsTrajectory = LogisticsTrajectory;
17932
19267
  exports.MsgStatus = MsgStatus;
17933
19268
  exports.ParseLogistics = ParseLogistics;
17934
19269
  exports.Payment = Payment;
19270
+ exports.PublicReissue = PublicReissue;
17935
19271
  exports.Remark = RemarkInput;
17936
19272
  exports.ReturnLogistics = ExpressLogistics;
17937
19273
  exports.ShopName = ShopNameSelect;
@@ -17945,3 +19281,4 @@ exports.WdtGoodList = WdtGoodList;
17945
19281
  exports.WdtReissue = wdtReissue;
17946
19282
  exports.WlnGoods = WlnGoods;
17947
19283
  exports.columnsBaseInfoMap = columnsBaseInfoMap;
19284
+ exports.getJstColumns = getColumns$5;