@kmkf-fe-packages/basic-components 2.0.16 → 2.0.18-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
3
3
  import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
- import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
7
7
  import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
@@ -11008,7 +11008,7 @@ var typeInitValueMap = {
11008
11008
  }]
11009
11009
  };
11010
11010
  var jstGoods = function jstGoods(props) {
11011
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
11011
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9;
11012
11012
  var _props$value = props.value,
11013
11013
  value = _props$value === void 0 ? [] : _props$value,
11014
11014
  onChange = props.onChange,
@@ -11025,7 +11025,8 @@ var jstGoods = function jstGoods(props) {
11025
11025
  changeIndex = _useState2[0],
11026
11026
  setChangeIndex = _useState2[1]; //选中的包裹
11027
11027
  var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
11028
- var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
11028
+ var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
11029
+ var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
11029
11030
  var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
11030
11031
  useEffect(function () {
11031
11032
  //没有值塞个默认值
@@ -11037,7 +11038,7 @@ var jstGoods = function jstGoods(props) {
11037
11038
  if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
11038
11039
  setChangeIndex(0);
11039
11040
  }
11040
- }, value);
11041
+ }, [value]);
11041
11042
  var content = function content(item, index) {
11042
11043
  return /*#__PURE__*/React.createElement("div", {
11043
11044
  style: {
@@ -11065,7 +11066,14 @@ var jstGoods = function jstGoods(props) {
11065
11066
  changeOrderInfo['sendId'] = option.value;
11066
11067
  }
11067
11068
  if (isSelectName && type === 'sendName') {
11068
- changeOrderInfo['sendSnapshotName'] = option.label;
11069
+ if (isSendGoodSavedId) {
11070
+ // 如果发货仓名称存的是id,将名称存入快照
11071
+ changeOrderInfo['sendSnapshotName'] = option.label;
11072
+ } else {
11073
+ // 如果发货仓名称存的是name,将id存入快照,同时把id替换成名称
11074
+ changeOrderInfo['sendSnapshotId'] = option.value;
11075
+ changeOrderInfo['sendName'] = option.label;
11076
+ }
11069
11077
  }
11070
11078
  var newList = _toConsumableArray(value);
11071
11079
  newList[changeIndex] = changeOrderInfo;
@@ -11165,7 +11173,7 @@ var jstGoods = function jstGoods(props) {
11165
11173
  showSearch: true,
11166
11174
  options: sendOptions,
11167
11175
  filterOption: filterOption,
11168
- value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
11176
+ 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,
11169
11177
  onChange: function onChange(value, option) {
11170
11178
  return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
11171
11179
  }
@@ -11175,14 +11183,14 @@ var jstGoods = function jstGoods(props) {
11175
11183
  onChange: function onChange(e) {
11176
11184
  return changeInputHandle(e.target.value, 'sendName');
11177
11185
  },
11178
- value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
11186
+ value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
11179
11187
  }))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
11180
11188
  disabled: disabled,
11181
11189
  placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
11182
11190
  onChange: function onChange(e) {
11183
11191
  return changeInputHandle(e.target.value, 'deliveryNo');
11184
11192
  },
11185
- value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
11193
+ value: (_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendName
11186
11194
  })) : null) : null);
11187
11195
  };
11188
11196
 
@@ -12154,19 +12162,13 @@ var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
12154
12162
  var getTableData$1 = function getTableData(_ref, formData) {
12155
12163
  var current = _ref.current,
12156
12164
  pageSize = _ref.pageSize;
12157
- var data = {
12158
- goodNo: formData.goodNo || null,
12159
- goodName: formData.goodName || null,
12160
- skuCode: formData.skuCode || null,
12161
- skuId: formData.skuId || null
12162
- };
12163
12165
  return extendRequest('/qy/gdfw/product/product/page', {
12164
12166
  method: 'post',
12165
12167
  data: _objectSpread2({
12166
12168
  pageSize: pageSize,
12167
12169
  pageNo: current,
12168
- platform: 'BS_E3_ERP'
12169
- }, data)
12170
+ platform: 'JST_ERP'
12171
+ }, formData)
12170
12172
  }).then(function (res) {
12171
12173
  var _res$data = res.data,
12172
12174
  _res$data$productSkuL = _res$data.productSkuList,
@@ -12174,9 +12176,7 @@ var getTableData$1 = function getTableData(_ref, formData) {
12174
12176
  _res$data$total = _res$data.total,
12175
12177
  total = _res$data$total === void 0 ? 0 : _res$data$total;
12176
12178
  var newProducts = productSkuList.map(function (item, index) {
12177
- return _objectSpread2(_objectSpread2({}, item), {}, {
12178
- index: index + 1
12179
- });
12179
+ return _objectSpread2({}, item);
12180
12180
  });
12181
12181
  return {
12182
12182
  total: total,
@@ -12195,90 +12195,86 @@ var columns$2 = [{
12195
12195
  }, index + 1);
12196
12196
  },
12197
12197
  width: 80
12198
- }, {
12199
- dataIndex: 'specNo',
12200
- title: "SKU",
12201
- ellipsis: true,
12202
- width: 200
12203
- }, {
12204
- dataIndex: 'specId',
12205
- title: "SKU ID",
12206
- ellipsis: true,
12207
- width: 80
12208
12198
  }, {
12209
12199
  dataIndex: 'goodName',
12210
- title: "\u5546\u54C1\u540D\u79F0",
12211
- ellipsis: true,
12212
- width: 250
12200
+ title: '商品名称',
12201
+ width: 250,
12202
+ ellipsis: true
12213
12203
  }, {
12214
- dataIndex: 'goodShortName',
12215
- title: "\u5546\u54C1\u7B80\u79F0",
12216
- ellipsis: true,
12217
- width: 250
12218
- },
12219
- // {
12220
- // dataIndex: 'goodPicUrl',
12221
- // title: `商品图片`,
12222
- // ellipsis: true,
12223
- // width: 100,
12224
- // render: (picUrl: string) => {
12225
- // return (
12226
- // <img
12227
- // style={{
12228
- // width: '40px',
12229
- // height: '40px',
12230
- // objectFit: 'contain',
12231
- // }}
12232
- // src={picUrl}
12233
- // ></img>
12234
- // );
12235
- // },
12236
- // },
12237
- {
12238
12204
  dataIndex: 'goodNo',
12239
- title: "\u8D27\u53F7",
12240
- ellipsis: true,
12241
- width: 150
12242
- }, {
12243
- dataIndex: 'goodId',
12244
- title: "\u8D27\u53F7ID",
12245
- ellipsis: true,
12246
- width: 100
12205
+ title: '商品编码',
12206
+ width: 200,
12207
+ ellipsis: true
12247
12208
  }, {
12248
- dataIndex: 'colorName',
12249
- title: "\u989C\u8272\u540D\u79F0",
12250
- ellipsis: true,
12251
- width: 100
12209
+ dataIndex: 'styleCode',
12210
+ title: '款式编码',
12211
+ width: 200,
12212
+ ellipsis: true
12252
12213
  }, {
12253
- dataIndex: 'colorCode',
12254
- title: "\u989C\u8272\u4EE3\u7801",
12255
- ellipsis: true,
12256
- width: 100
12214
+ dataIndex: 'propertiesValue',
12215
+ title: '规格值',
12216
+ width: 200,
12217
+ ellipsis: true
12257
12218
  }, {
12258
- dataIndex: 'sizeName',
12259
- title: "\u5C3A\u7801\u540D\u79F0",
12260
- ellipsis: true,
12261
- width: 100
12219
+ dataIndex: 'goodPicUrl',
12220
+ title: '商品图片',
12221
+ width: 100,
12222
+ render: function render(picUrl) {
12223
+ return /*#__PURE__*/React.createElement("img", {
12224
+ style: {
12225
+ width: '40px',
12226
+ height: '40px',
12227
+ objectFit: 'contain'
12228
+ },
12229
+ src: picUrl
12230
+ });
12231
+ }
12262
12232
  }, {
12263
- dataIndex: 'sizeCode',
12264
- title: "\u5C3A\u7801\u4EE3\u7801",
12233
+ dataIndex: 'goodShortName',
12234
+ title: "\u5546\u54C1\u7B80\u79F0",
12265
12235
  ellipsis: true,
12266
- width: 100
12236
+ width: 250
12267
12237
  }, {
12268
12238
  dataIndex: 'brandName',
12269
- title: "\u54C1\u724C\u540D\u79F0",
12239
+ title: '品牌名称',
12240
+ width: 200,
12241
+ ellipsis: true
12242
+ }, {
12243
+ dataIndex: 'retailPrice',
12244
+ title: "\u9500\u552E\u4EF7\u683C",
12270
12245
  ellipsis: true,
12271
- width: 100
12246
+ width: 100,
12247
+ render: function render(price) {
12248
+ return price || price === 0 ? Number(price).toFixed(2) : '';
12249
+ }
12272
12250
  }, {
12273
12251
  dataIndex: 'marketPrice',
12274
12252
  title: "\u5E02\u573A\u4EF7",
12275
12253
  ellipsis: true,
12276
- width: 100
12254
+ width: 100,
12255
+ render: function render(price) {
12256
+ return price || price === 0 ? Number(price).toFixed(2) : '';
12257
+ }
12277
12258
  }, {
12278
- dataIndex: 'retailPrice',
12279
- title: "\u552E\u4EF7",
12259
+ dataIndex: 'costPrice',
12260
+ title: "\u6210\u672C\u4EF7",
12280
12261
  ellipsis: true,
12281
- width: 100
12262
+ width: 100,
12263
+ render: function render(price) {
12264
+ return price || price === 0 ? Number(price).toFixed(2) : '';
12265
+ }
12266
+ }, {
12267
+ dataIndex: 'skuType',
12268
+ title: "\u5546\u54C1\u7C7B\u578B",
12269
+ ellipsis: true,
12270
+ width: 100,
12271
+ render: function render() {
12272
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'normal';
12273
+ return {
12274
+ 'combine': '组合装商品',
12275
+ 'normal': '普通商品'
12276
+ }[type] || type;
12277
+ }
12282
12278
  }];
12283
12279
  var GoodList$1 = function GoodList(props, ref) {
12284
12280
  var _useState = useState([]),
@@ -12312,17 +12308,6 @@ var GoodList$1 = function GoodList(props, ref) {
12312
12308
  layout: "inline",
12313
12309
  form: form
12314
12310
  }, /*#__PURE__*/React.createElement(Form.Item, {
12315
- name: "goodNo",
12316
- style: {
12317
- marginBottom: '12px'
12318
- }
12319
- }, /*#__PURE__*/React.createElement(Input, {
12320
- placeholder: "\u5546\u54C1\u8D27\u53F7",
12321
- allowClear: true,
12322
- style: {
12323
- width: 150
12324
- }
12325
- })), /*#__PURE__*/React.createElement(Form.Item, {
12326
12311
  name: "goodName",
12327
12312
  style: {
12328
12313
  marginBottom: '12px'
@@ -12334,23 +12319,23 @@ var GoodList$1 = function GoodList(props, ref) {
12334
12319
  width: 150
12335
12320
  }
12336
12321
  })), /*#__PURE__*/React.createElement(Form.Item, {
12337
- name: "skuCode",
12322
+ name: "goodNo",
12338
12323
  style: {
12339
12324
  marginBottom: '12px'
12340
12325
  }
12341
12326
  }, /*#__PURE__*/React.createElement(Input, {
12342
- placeholder: "SKU",
12327
+ placeholder: "\u5546\u54C1\u7F16\u7801",
12343
12328
  allowClear: true,
12344
12329
  style: {
12345
12330
  width: 150
12346
12331
  }
12347
12332
  })), /*#__PURE__*/React.createElement(Form.Item, {
12348
- name: "skuId",
12333
+ name: "styleCode",
12349
12334
  style: {
12350
12335
  marginBottom: '12px'
12351
12336
  }
12352
12337
  }, /*#__PURE__*/React.createElement(Input, {
12353
- placeholder: "SKU ID",
12338
+ placeholder: "\u6B3E\u5F0F\u7F16\u7801",
12354
12339
  allowClear: true,
12355
12340
  style: {
12356
12341
  width: 150
@@ -12373,41 +12358,50 @@ var GoodList$1 = function GoodList(props, ref) {
12373
12358
  fixed: true,
12374
12359
  onSelect: function onSelect(record, selected) {
12375
12360
  if (selected) {
12376
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
12361
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.goodNo]));
12377
12362
  setSelect([].concat(_toConsumableArray(selectList), [record]));
12378
12363
  } else {
12379
12364
  setSelectIds(selectIds.filter(function (t) {
12380
- return t !== record.specNo;
12365
+ return t !== record.goodNo;
12381
12366
  }));
12382
12367
  setSelect(selectList.filter(function (t) {
12383
- return t.specNo !== record.specNo;
12368
+ return t.goodNo !== record.goodNo;
12384
12369
  }));
12385
12370
  }
12386
12371
  },
12387
12372
  onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
12388
12373
  if (selected) {
12389
12374
  setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
12390
- return t.specNo;
12375
+ return t.goodNo;
12391
12376
  }))));
12392
12377
  setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
12393
12378
  } else {
12394
12379
  setSelectIds(difference(selectIds, changeRows.map(function (t) {
12395
- return t.specNo;
12380
+ return t.goodNo;
12396
12381
  })));
12397
12382
  var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
12398
- return arrVal.specNo !== othVal.specNo;
12383
+ return arrVal.goodNo !== othVal.goodNo;
12399
12384
  });
12400
12385
  setSelect(list);
12401
12386
  }
12387
+ },
12388
+ getCheckboxProps: function getCheckboxProps(record) {
12389
+ var options = {
12390
+ disabled: (props.selectedRows || []).map(function (row) {
12391
+ return row.goodNo || row.skuId;
12392
+ }).includes(record.goodNo || record.skuId),
12393
+ name: record.goodNo
12394
+ };
12395
+ return options;
12402
12396
  }
12403
12397
  };
12404
12398
  var showTable = function showTable() {
12405
12399
  var handleDelete = function handleDelete(record) {
12406
12400
  setSelectIds(selectIds.filter(function (t) {
12407
- return t !== record.specNo;
12401
+ return t !== record.goodNo;
12408
12402
  }));
12409
12403
  setSelect(selectList.filter(function (t) {
12410
- return t.specNo !== record.specNo;
12404
+ return t.goodNo !== record.goodNo;
12411
12405
  }));
12412
12406
  };
12413
12407
  var showColumns = [{
@@ -12431,7 +12425,7 @@ var GoodList$1 = function GoodList(props, ref) {
12431
12425
  }
12432
12426
  }, /*#__PURE__*/React.createElement(Table, {
12433
12427
  columns: showColumns,
12434
- rowKey: 'specNo',
12428
+ rowKey: 'goodNo',
12435
12429
  dataSource: selectList,
12436
12430
  scroll: {
12437
12431
  x: '100%',
@@ -12451,7 +12445,7 @@ var GoodList$1 = function GoodList(props, ref) {
12451
12445
  }
12452
12446
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12453
12447
  rowSelection: rowSelection,
12454
- rowKey: "specNo",
12448
+ rowKey: "goodNo",
12455
12449
  columns: columns$2,
12456
12450
  scroll: {
12457
12451
  x: '100%',
@@ -12468,13 +12462,15 @@ var GoodList$1 = function GoodList(props, ref) {
12468
12462
  type: "text"
12469
12463
  }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
12470
12464
  };
12471
- var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$1);
12465
+ var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$1);
12472
12466
 
12473
- var GoodsModal$4 = function GoodsModal(props, ref) {
12467
+ var GyGoodsModal = function GyGoodsModal(props, ref) {
12474
12468
  useImperativeHandle(ref, function () {
12475
12469
  return {
12476
- open: function open() {
12470
+ open: function open(shopCode) {
12471
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12477
12472
  setVisible(true);
12473
+ setSelectedRows(options.value || []);
12478
12474
  }
12479
12475
  };
12480
12476
  });
@@ -12484,13 +12480,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12484
12480
  _useState2 = _slicedToArray(_useState, 2),
12485
12481
  visible = _useState2[0],
12486
12482
  setVisible = _useState2[1];
12487
- var bsE3GoodListRef = useRef(null);
12483
+ var _useState3 = useState([]),
12484
+ _useState4 = _slicedToArray(_useState3, 2),
12485
+ selectedRows = _useState4[0],
12486
+ setSelectedRows = _useState4[1];
12487
+ var gyGoodsListRef = useRef(null);
12488
12488
  var _onCancel = function onCancel() {
12489
12489
  setVisible(false);
12490
12490
  };
12491
12491
  var onOk = function onOk() {
12492
- var _bsE3GoodListRef$curr;
12493
- var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
12492
+ var _gyGoodsListRef$curre;
12493
+ var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
12494
12494
  onSubmit(selectedList);
12495
12495
  _onCancel();
12496
12496
  };
@@ -12505,28 +12505,28 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12505
12505
  },
12506
12506
  onOk: onOk,
12507
12507
  wrapClassName: "goodModal"
12508
- }, /*#__PURE__*/React.createElement(BsE3GoodList, {
12509
- ref: bsE3GoodListRef
12508
+ }, /*#__PURE__*/React.createElement(GyGoodsList, {
12509
+ ref: gyGoodsListRef,
12510
+ selectedRows: selectedRows
12510
12511
  })));
12511
12512
  };
12512
- var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12513
+ var JstGoodsModal = /*#__PURE__*/forwardRef(GyGoodsModal);
12513
12514
 
12514
12515
  var getTableData$2 = function getTableData(_ref, formData) {
12515
12516
  var current = _ref.current,
12516
12517
  pageSize = _ref.pageSize;
12517
12518
  var data = {
12518
- goodShortName: formData.goodShortName || null,
12519
- skuName: formData.skuName || null,
12520
- skuCode: formData.skuCode || null,
12519
+ goodNo: formData.goodNo || null,
12521
12520
  goodName: formData.goodName || null,
12522
- goodNo: formData.goodNo || null
12521
+ skuCode: formData.skuCode || null,
12522
+ skuId: formData.skuId || null
12523
12523
  };
12524
12524
  return extendRequest('/qy/gdfw/product/product/page', {
12525
12525
  method: 'post',
12526
12526
  data: _objectSpread2({
12527
12527
  pageSize: pageSize,
12528
12528
  pageNo: current,
12529
- platform: 'GY_ERP'
12529
+ platform: 'BS_E3_ERP'
12530
12530
  }, data)
12531
12531
  }).then(function (res) {
12532
12532
  var _res$data = res.data,
@@ -12535,7 +12535,9 @@ var getTableData$2 = function getTableData(_ref, formData) {
12535
12535
  _res$data$total = _res$data.total,
12536
12536
  total = _res$data$total === void 0 ? 0 : _res$data$total;
12537
12537
  var newProducts = productSkuList.map(function (item, index) {
12538
- return _objectSpread2({}, item);
12538
+ return _objectSpread2(_objectSpread2({}, item), {}, {
12539
+ index: index + 1
12540
+ });
12539
12541
  });
12540
12542
  return {
12541
12543
  total: total,
@@ -12554,58 +12556,88 @@ var columns$3 = [{
12554
12556
  }, index + 1);
12555
12557
  },
12556
12558
  width: 80
12557
- }, {
12558
- dataIndex: 'specName',
12559
- title: 'SKU名称',
12560
- width: 250,
12561
- ellipsis: true
12562
12559
  }, {
12563
12560
  dataIndex: 'specNo',
12564
- title: 'SKU编码',
12565
- width: 200,
12566
- ellipsis: true
12561
+ title: "SKU",
12562
+ ellipsis: true,
12563
+ width: 200
12564
+ }, {
12565
+ dataIndex: 'specId',
12566
+ title: "SKU ID",
12567
+ ellipsis: true,
12568
+ width: 80
12567
12569
  }, {
12568
12570
  dataIndex: 'goodName',
12569
- title: '商品名称',
12570
- width: 250,
12571
- ellipsis: true
12571
+ title: "\u5546\u54C1\u540D\u79F0",
12572
+ ellipsis: true,
12573
+ width: 250
12572
12574
  }, {
12573
12575
  dataIndex: 'goodShortName',
12574
12576
  title: "\u5546\u54C1\u7B80\u79F0",
12575
12577
  ellipsis: true,
12576
12578
  width: 250
12577
- }, {
12579
+ },
12580
+ // {
12581
+ // dataIndex: 'goodPicUrl',
12582
+ // title: `商品图片`,
12583
+ // ellipsis: true,
12584
+ // width: 100,
12585
+ // render: (picUrl: string) => {
12586
+ // return (
12587
+ // <img
12588
+ // style={{
12589
+ // width: '40px',
12590
+ // height: '40px',
12591
+ // objectFit: 'contain',
12592
+ // }}
12593
+ // src={picUrl}
12594
+ // ></img>
12595
+ // );
12596
+ // },
12597
+ // },
12598
+ {
12578
12599
  dataIndex: 'goodNo',
12579
- title: '商品编码',
12580
- width: 200,
12581
- ellipsis: true
12600
+ title: "\u8D27\u53F7",
12601
+ ellipsis: true,
12602
+ width: 150
12582
12603
  }, {
12583
- dataIndex: 'goodPicUrl',
12584
- title: '商品图片',
12585
- width: 100,
12586
- render: function render(picUrl) {
12587
- return /*#__PURE__*/React.createElement("img", {
12588
- style: {
12589
- width: '40px',
12590
- height: '40px',
12591
- objectFit: 'contain'
12592
- },
12593
- src: picUrl
12594
- });
12595
- }
12604
+ dataIndex: 'goodId',
12605
+ title: "\u8D27\u53F7ID",
12606
+ ellipsis: true,
12607
+ width: 100
12596
12608
  }, {
12597
- dataIndex: 'brandName',
12598
- title: '品牌名称',
12599
- width: 200,
12600
- ellipsis: true
12609
+ dataIndex: 'colorName',
12610
+ title: "\u989C\u8272\u540D\u79F0",
12611
+ ellipsis: true,
12612
+ width: 100
12601
12613
  }, {
12602
- dataIndex: 'retailPrice',
12603
- title: "\u6807\u51C6\u552E\u4EF7",
12614
+ dataIndex: 'colorCode',
12615
+ title: "\u989C\u8272\u4EE3\u7801",
12604
12616
  ellipsis: true,
12605
12617
  width: 100
12606
12618
  }, {
12607
- dataIndex: 'costPrice',
12608
- title: "\u6210\u672C\u4EF7",
12619
+ dataIndex: 'sizeName',
12620
+ title: "\u5C3A\u7801\u540D\u79F0",
12621
+ ellipsis: true,
12622
+ width: 100
12623
+ }, {
12624
+ dataIndex: 'sizeCode',
12625
+ title: "\u5C3A\u7801\u4EE3\u7801",
12626
+ ellipsis: true,
12627
+ width: 100
12628
+ }, {
12629
+ dataIndex: 'brandName',
12630
+ title: "\u54C1\u724C\u540D\u79F0",
12631
+ ellipsis: true,
12632
+ width: 100
12633
+ }, {
12634
+ dataIndex: 'marketPrice',
12635
+ title: "\u5E02\u573A\u4EF7",
12636
+ ellipsis: true,
12637
+ width: 100
12638
+ }, {
12639
+ dataIndex: 'retailPrice',
12640
+ title: "\u552E\u4EF7",
12609
12641
  ellipsis: true,
12610
12642
  width: 100
12611
12643
  }];
@@ -12641,23 +12673,23 @@ var GoodList$2 = function GoodList(props, ref) {
12641
12673
  layout: "inline",
12642
12674
  form: form
12643
12675
  }, /*#__PURE__*/React.createElement(Form.Item, {
12644
- name: "goodShortName",
12676
+ name: "goodNo",
12645
12677
  style: {
12646
12678
  marginBottom: '12px'
12647
12679
  }
12648
12680
  }, /*#__PURE__*/React.createElement(Input, {
12649
- placeholder: "\u5546\u54C1\u7B80\u79F0",
12681
+ placeholder: "\u5546\u54C1\u8D27\u53F7",
12650
12682
  allowClear: true,
12651
12683
  style: {
12652
12684
  width: 150
12653
12685
  }
12654
12686
  })), /*#__PURE__*/React.createElement(Form.Item, {
12655
- name: "skuName",
12687
+ name: "goodName",
12656
12688
  style: {
12657
12689
  marginBottom: '12px'
12658
12690
  }
12659
12691
  }, /*#__PURE__*/React.createElement(Input, {
12660
- placeholder: "\u5546\u54C1sku\u540D\u79F0",
12692
+ placeholder: "\u5546\u54C1\u540D\u79F0",
12661
12693
  allowClear: true,
12662
12694
  style: {
12663
12695
  width: 150
@@ -12668,29 +12700,18 @@ var GoodList$2 = function GoodList(props, ref) {
12668
12700
  marginBottom: '12px'
12669
12701
  }
12670
12702
  }, /*#__PURE__*/React.createElement(Input, {
12671
- placeholder: "\u5546\u54C1sku\u7F16\u7801",
12672
- allowClear: true,
12673
- style: {
12674
- width: 150
12675
- }
12676
- })), /*#__PURE__*/React.createElement(Form.Item, {
12677
- name: "goodName",
12678
- style: {
12679
- marginBottom: '12px'
12680
- }
12681
- }, /*#__PURE__*/React.createElement(Input, {
12682
- placeholder: "\u5546\u54C1\u540D\u79F0",
12703
+ placeholder: "SKU",
12683
12704
  allowClear: true,
12684
12705
  style: {
12685
12706
  width: 150
12686
12707
  }
12687
12708
  })), /*#__PURE__*/React.createElement(Form.Item, {
12688
- name: "goodNo",
12709
+ name: "skuId",
12689
12710
  style: {
12690
12711
  marginBottom: '12px'
12691
12712
  }
12692
12713
  }, /*#__PURE__*/React.createElement(Input, {
12693
- placeholder: "\u5546\u54C1\u7F16\u7801",
12714
+ placeholder: "SKU ID",
12694
12715
  allowClear: true,
12695
12716
  style: {
12696
12717
  width: 150
@@ -12808,9 +12829,9 @@ var GoodList$2 = function GoodList(props, ref) {
12808
12829
  type: "text"
12809
12830
  }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
12810
12831
  };
12811
- var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$2);
12832
+ var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$2);
12812
12833
 
12813
- var GyGoodsModal = function GyGoodsModal(props, ref) {
12834
+ var GoodsModal$4 = function GoodsModal(props, ref) {
12814
12835
  useImperativeHandle(ref, function () {
12815
12836
  return {
12816
12837
  open: function open() {
@@ -12824,13 +12845,13 @@ var GyGoodsModal = function GyGoodsModal(props, ref) {
12824
12845
  _useState2 = _slicedToArray(_useState, 2),
12825
12846
  visible = _useState2[0],
12826
12847
  setVisible = _useState2[1];
12827
- var gyGoodsListRef = useRef(null);
12848
+ var bsE3GoodListRef = useRef(null);
12828
12849
  var _onCancel = function onCancel() {
12829
12850
  setVisible(false);
12830
12851
  };
12831
12852
  var onOk = function onOk() {
12832
- var _gyGoodsListRef$curre;
12833
- var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
12853
+ var _bsE3GoodListRef$curr;
12854
+ var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
12834
12855
  onSubmit(selectedList);
12835
12856
  _onCancel();
12836
12857
  };
@@ -12845,35 +12866,375 @@ var GyGoodsModal = function GyGoodsModal(props, ref) {
12845
12866
  },
12846
12867
  onOk: onOk,
12847
12868
  wrapClassName: "goodModal"
12848
- }, /*#__PURE__*/React.createElement(GyGoodsList, {
12849
- ref: gyGoodsListRef
12869
+ }, /*#__PURE__*/React.createElement(BsE3GoodList, {
12870
+ ref: bsE3GoodListRef
12850
12871
  })));
12851
12872
  };
12852
- var GyGoodsModal$1 = /*#__PURE__*/forwardRef(GyGoodsModal);
12873
+ var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12853
12874
 
12854
- var getColumns = function getColumns(_ref) {
12855
- var _ref$text = _ref.text,
12856
- disabled = _ref.disabled,
12857
- updateHandle = _ref.updateHandle;
12858
- return {
12859
- //百胜E3补发商品
12860
- BS_E3_REISSUE_GOODS: [{
12861
- dataIndex: 'sku',
12862
- title: "SKU",
12875
+ var getTableData$3 = function getTableData(_ref, formData) {
12876
+ var current = _ref.current,
12877
+ pageSize = _ref.pageSize;
12878
+ var data = {
12879
+ goodShortName: formData.goodShortName || null,
12880
+ skuName: formData.skuName || null,
12881
+ skuCode: formData.skuCode || null,
12882
+ goodName: formData.goodName || null,
12883
+ goodNo: formData.goodNo || null
12884
+ };
12885
+ return extendRequest('/qy/gdfw/product/product/page', {
12886
+ method: 'post',
12887
+ data: _objectSpread2({
12888
+ pageSize: pageSize,
12889
+ pageNo: current,
12890
+ platform: 'GY_ERP'
12891
+ }, data)
12892
+ }).then(function (res) {
12893
+ var _res$data = res.data,
12894
+ _res$data$productSkuL = _res$data.productSkuList,
12895
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12896
+ _res$data$total = _res$data.total,
12897
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
12898
+ var newProducts = productSkuList.map(function (item, index) {
12899
+ return _objectSpread2({}, item);
12900
+ });
12901
+ return {
12902
+ total: total,
12903
+ list: newProducts
12904
+ };
12905
+ });
12906
+ };
12907
+ var columns$4 = [{
12908
+ dataIndex: 'index',
12909
+ title: 'NO',
12910
+ render: function render(val, record, index) {
12911
+ return /*#__PURE__*/React.createElement("div", {
12912
+ style: {
12913
+ width: 25
12914
+ }
12915
+ }, index + 1);
12916
+ },
12917
+ width: 80
12918
+ }, {
12919
+ dataIndex: 'specName',
12920
+ title: 'SKU名称',
12921
+ width: 250,
12922
+ ellipsis: true
12923
+ }, {
12924
+ dataIndex: 'specNo',
12925
+ title: 'SKU编码',
12926
+ width: 200,
12927
+ ellipsis: true
12928
+ }, {
12929
+ dataIndex: 'goodName',
12930
+ title: '商品名称',
12931
+ width: 250,
12932
+ ellipsis: true
12933
+ }, {
12934
+ dataIndex: 'goodShortName',
12935
+ title: "\u5546\u54C1\u7B80\u79F0",
12936
+ ellipsis: true,
12937
+ width: 250
12938
+ }, {
12939
+ dataIndex: 'goodNo',
12940
+ title: '商品编码',
12941
+ width: 200,
12942
+ ellipsis: true
12943
+ }, {
12944
+ dataIndex: 'goodPicUrl',
12945
+ title: '商品图片',
12946
+ width: 100,
12947
+ render: function render(picUrl) {
12948
+ return /*#__PURE__*/React.createElement("img", {
12949
+ style: {
12950
+ width: '40px',
12951
+ height: '40px',
12952
+ objectFit: 'contain'
12953
+ },
12954
+ src: picUrl
12955
+ });
12956
+ }
12957
+ }, {
12958
+ dataIndex: 'brandName',
12959
+ title: '品牌名称',
12960
+ width: 200,
12961
+ ellipsis: true
12962
+ }, {
12963
+ dataIndex: 'retailPrice',
12964
+ title: "\u6807\u51C6\u552E\u4EF7",
12965
+ ellipsis: true,
12966
+ width: 100
12967
+ }, {
12968
+ dataIndex: 'costPrice',
12969
+ title: "\u6210\u672C\u4EF7",
12970
+ ellipsis: true,
12971
+ width: 100
12972
+ }];
12973
+ var GoodList$3 = function GoodList(props, ref) {
12974
+ var _useState = useState([]),
12975
+ _useState2 = _slicedToArray(_useState, 2),
12976
+ selectList = _useState2[0],
12977
+ setSelect = _useState2[1];
12978
+ var _useState3 = useState([]),
12979
+ _useState4 = _slicedToArray(_useState3, 2),
12980
+ selectIds = _useState4[0],
12981
+ setSelectIds = _useState4[1];
12982
+ useImperativeHandle(ref, function () {
12983
+ return {
12984
+ getSelectGoodList: function getSelectGoodList() {
12985
+ return selectList;
12986
+ }
12987
+ };
12988
+ });
12989
+ var _Form$useForm = Form.useForm(),
12990
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
12991
+ form = _Form$useForm2[0];
12992
+ var _useAntdTable = useAntdTable(getTableData$3, {
12993
+ defaultPageSize: 10,
12994
+ form: form
12995
+ }),
12996
+ tableProps = _useAntdTable.tableProps,
12997
+ search = _useAntdTable.search,
12998
+ params = _useAntdTable.params;
12999
+ var submit = search.submit,
13000
+ reset = search.reset;
13001
+ var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
13002
+ layout: "inline",
13003
+ form: form
13004
+ }, /*#__PURE__*/React.createElement(Form.Item, {
13005
+ name: "goodShortName",
13006
+ style: {
13007
+ marginBottom: '12px'
13008
+ }
13009
+ }, /*#__PURE__*/React.createElement(Input, {
13010
+ placeholder: "\u5546\u54C1\u7B80\u79F0",
13011
+ allowClear: true,
13012
+ style: {
12863
13013
  width: 150
12864
- }, {
12865
- dataIndex: 'skuId',
12866
- title: "SKU ID",
13014
+ }
13015
+ })), /*#__PURE__*/React.createElement(Form.Item, {
13016
+ name: "skuName",
13017
+ style: {
13018
+ marginBottom: '12px'
13019
+ }
13020
+ }, /*#__PURE__*/React.createElement(Input, {
13021
+ placeholder: "\u5546\u54C1sku\u540D\u79F0",
13022
+ allowClear: true,
13023
+ style: {
12867
13024
  width: 150
12868
- }, {
12869
- dataIndex: 'goodsName',
12870
- title: "\u5546\u54C1\u540D\u79F0",
13025
+ }
13026
+ })), /*#__PURE__*/React.createElement(Form.Item, {
13027
+ name: "skuCode",
13028
+ style: {
13029
+ marginBottom: '12px'
13030
+ }
13031
+ }, /*#__PURE__*/React.createElement(Input, {
13032
+ placeholder: "\u5546\u54C1sku\u7F16\u7801",
13033
+ allowClear: true,
13034
+ style: {
12871
13035
  width: 150
12872
- }, {
12873
- dataIndex: 'goodsShortName',
12874
- title: "\u5546\u54C1\u7B80\u79F0",
13036
+ }
13037
+ })), /*#__PURE__*/React.createElement(Form.Item, {
13038
+ name: "goodName",
13039
+ style: {
13040
+ marginBottom: '12px'
13041
+ }
13042
+ }, /*#__PURE__*/React.createElement(Input, {
13043
+ placeholder: "\u5546\u54C1\u540D\u79F0",
13044
+ allowClear: true,
13045
+ style: {
12875
13046
  width: 150
12876
- }, {
13047
+ }
13048
+ })), /*#__PURE__*/React.createElement(Form.Item, {
13049
+ name: "goodNo",
13050
+ style: {
13051
+ marginBottom: '12px'
13052
+ }
13053
+ }, /*#__PURE__*/React.createElement(Input, {
13054
+ placeholder: "\u5546\u54C1\u7F16\u7801",
13055
+ allowClear: true,
13056
+ style: {
13057
+ width: 150
13058
+ }
13059
+ })), /*#__PURE__*/React.createElement(Form.Item, {
13060
+ style: {
13061
+ marginBottom: '12px'
13062
+ }
13063
+ }, /*#__PURE__*/React.createElement(Button, {
13064
+ type: "primary",
13065
+ style: {
13066
+ marginRight: '8px'
13067
+ },
13068
+ onClick: submit
13069
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
13070
+ onClick: reset
13071
+ }, "\u91CD\u7F6E")));
13072
+ var rowSelection = {
13073
+ selectedRowKeys: selectIds,
13074
+ fixed: true,
13075
+ onSelect: function onSelect(record, selected) {
13076
+ if (selected) {
13077
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
13078
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
13079
+ } else {
13080
+ setSelectIds(selectIds.filter(function (t) {
13081
+ return t !== record.specNo;
13082
+ }));
13083
+ setSelect(selectList.filter(function (t) {
13084
+ return t.specNo !== record.specNo;
13085
+ }));
13086
+ }
13087
+ },
13088
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
13089
+ if (selected) {
13090
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
13091
+ return t.specNo;
13092
+ }))));
13093
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
13094
+ } else {
13095
+ setSelectIds(difference(selectIds, changeRows.map(function (t) {
13096
+ return t.specNo;
13097
+ })));
13098
+ var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
13099
+ return arrVal.specNo !== othVal.specNo;
13100
+ });
13101
+ setSelect(list);
13102
+ }
13103
+ }
13104
+ };
13105
+ var showTable = function showTable() {
13106
+ var handleDelete = function handleDelete(record) {
13107
+ setSelectIds(selectIds.filter(function (t) {
13108
+ return t !== record.specNo;
13109
+ }));
13110
+ setSelect(selectList.filter(function (t) {
13111
+ return t.specNo !== record.specNo;
13112
+ }));
13113
+ };
13114
+ var showColumns = [{
13115
+ dataIndex: '',
13116
+ title: "\u64CD\u4F5C",
13117
+ ellipsis: true,
13118
+ width: 100,
13119
+ render: function render(val, record) {
13120
+ return /*#__PURE__*/React.createElement(Button, {
13121
+ type: "link",
13122
+ onClick: function onClick() {
13123
+ return handleDelete(record);
13124
+ }
13125
+ }, "\u5220\u9664");
13126
+ }
13127
+ }].concat(takeRight(columns$4, columns$4.length - 1));
13128
+ return selectList.length ? /*#__PURE__*/React.createElement("div", {
13129
+ style: {
13130
+ width: '100%',
13131
+ maxWidth: '387px'
13132
+ }
13133
+ }, /*#__PURE__*/React.createElement(Table, {
13134
+ columns: showColumns,
13135
+ rowKey: 'specNo',
13136
+ dataSource: selectList,
13137
+ scroll: {
13138
+ x: '100%',
13139
+ y: 250
13140
+ },
13141
+ pagination: {
13142
+ size: 'small',
13143
+ total: selectIds.length,
13144
+ pageSize: 10,
13145
+ showSizeChanger: false
13146
+ }
13147
+ })) : null;
13148
+ };
13149
+ return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
13150
+ style: {
13151
+ marginTop: '4px'
13152
+ }
13153
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
13154
+ rowSelection: rowSelection,
13155
+ rowKey: "specNo",
13156
+ columns: columns$4,
13157
+ scroll: {
13158
+ x: '100%',
13159
+ y: 250
13160
+ }
13161
+ }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
13162
+ getPopupContainer: function getPopupContainer(triggerNode) {
13163
+ return triggerNode.parentElement;
13164
+ },
13165
+ content: showTable(),
13166
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
13167
+ }, /*#__PURE__*/React.createElement(Button, {
13168
+ danger: true,
13169
+ type: "text"
13170
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
13171
+ };
13172
+ var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$3);
13173
+
13174
+ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13175
+ useImperativeHandle(ref, function () {
13176
+ return {
13177
+ open: function open() {
13178
+ setVisible(true);
13179
+ }
13180
+ };
13181
+ });
13182
+ var onSubmit = props.onSubmit,
13183
+ width = props.width;
13184
+ var _useState = useState(false),
13185
+ _useState2 = _slicedToArray(_useState, 2),
13186
+ visible = _useState2[0],
13187
+ setVisible = _useState2[1];
13188
+ var gyGoodsListRef = useRef(null);
13189
+ var _onCancel = function onCancel() {
13190
+ setVisible(false);
13191
+ };
13192
+ var onOk = function onOk() {
13193
+ var _gyGoodsListRef$curre;
13194
+ var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
13195
+ onSubmit(selectedList);
13196
+ _onCancel();
13197
+ };
13198
+ return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
13199
+ title: '选择商品',
13200
+ okText: '确认',
13201
+ cancelText: '取消',
13202
+ visible: visible,
13203
+ width: width || 850,
13204
+ onCancel: function onCancel() {
13205
+ _onCancel();
13206
+ },
13207
+ onOk: onOk,
13208
+ wrapClassName: "goodModal"
13209
+ }, /*#__PURE__*/React.createElement(GyGoodsList$1, {
13210
+ ref: gyGoodsListRef
13211
+ })));
13212
+ };
13213
+ var GyGoodsModal$2 = /*#__PURE__*/forwardRef(GyGoodsModal$1);
13214
+
13215
+ var getColumns = function getColumns(_ref) {
13216
+ var _ref$text = _ref.text,
13217
+ disabled = _ref.disabled,
13218
+ updateHandle = _ref.updateHandle;
13219
+ return {
13220
+ //百胜E3补发商品
13221
+ BS_E3_REISSUE_GOODS: [{
13222
+ dataIndex: 'sku',
13223
+ title: "SKU",
13224
+ width: 150
13225
+ }, {
13226
+ dataIndex: 'skuId',
13227
+ title: "SKU ID",
13228
+ width: 150
13229
+ }, {
13230
+ dataIndex: 'goodsName',
13231
+ title: "\u5546\u54C1\u540D\u79F0",
13232
+ width: 150
13233
+ }, {
13234
+ dataIndex: 'goodsShortName',
13235
+ title: "\u5546\u54C1\u7B80\u79F0",
13236
+ width: 150
13237
+ }, {
12877
13238
  dataIndex: 'picPath',
12878
13239
  title: "\u5546\u54C1\u56FE\u7247",
12879
13240
  width: 150,
@@ -13862,148 +14223,622 @@ var getColumns$4 = function getColumns(_ref) {
13862
14223
  title: "\u8BA9\u5229\u540E\u91D1\u989D",
13863
14224
  width: 150
13864
14225
  }, {
13865
- dataIndex: 'cancel',
13866
- title: "\u662F\u5426\u53D6\u6D88",
13867
- width: 150,
13868
- render: function render(val) {
13869
- return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
14226
+ dataIndex: 'cancel',
14227
+ title: "\u662F\u5426\u53D6\u6D88",
14228
+ width: 150,
14229
+ render: function render(val) {
14230
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
14231
+ }
14232
+ }, {
14233
+ dataIndex: 'isGift',
14234
+ title: "\u662F\u5426\u8D60\u54C1",
14235
+ width: 150,
14236
+ render: function render(val, record, index) {
14237
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
14238
+ value: val,
14239
+ onChange: function onChange(value) {
14240
+ updateHandle(value, index, 'isGift');
14241
+ },
14242
+ options: [{
14243
+ label: '是',
14244
+ value: 1
14245
+ }, {
14246
+ label: '否',
14247
+ value: 0
14248
+ }]
14249
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
14250
+ }
14251
+ }, {
14252
+ dataIndex: 'skuNote',
14253
+ title: "\u5546\u54C1\u5907\u6CE8",
14254
+ width: 150
14255
+ }].map(function (item) {
14256
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14257
+ align: 'center',
14258
+ ellipsis: true
14259
+ });
14260
+ }),
14261
+ //管易补发商品信息
14262
+ GY_REISSUE_GOODS: [{
14263
+ dataIndex: 'goodName',
14264
+ title: "\u5546\u54C1\u540D\u79F0",
14265
+ width: 150
14266
+ }, {
14267
+ dataIndex: 'goodShortName',
14268
+ title: "\u5546\u54C1\u7B80\u79F0",
14269
+ width: 150
14270
+ }, {
14271
+ dataIndex: 'goodNo',
14272
+ title: "\u5546\u54C1\u7F16\u7801",
14273
+ width: 200
14274
+ }, {
14275
+ dataIndex: 'specName',
14276
+ title: "SKU\u540D\u79F0",
14277
+ align: 'center',
14278
+ ellipsis: true,
14279
+ width: 250
14280
+ }, {
14281
+ dataIndex: 'specNo',
14282
+ title: "SKU\u7F16\u7801",
14283
+ align: 'center',
14284
+ ellipsis: true,
14285
+ width: 150
14286
+ }, {
14287
+ dataIndex: 'qty',
14288
+ title: "\u6570\u91CF",
14289
+ width: 100,
14290
+ render: function render(val, record, index) {
14291
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14292
+ style: {
14293
+ width: 70
14294
+ },
14295
+ value: val,
14296
+ min: 1,
14297
+ precision: 0,
14298
+ onChange: function onChange(num) {
14299
+ updateDataHandle({
14300
+ qty: num,
14301
+ amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
14302
+ originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
14303
+ }, index);
14304
+ }
14305
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14306
+ }
14307
+ }, {
14308
+ dataIndex: 'price',
14309
+ title: "\u5B9E\u9645\u5355\u4EF7",
14310
+ width: 150,
14311
+ render: function render(val, record, index) {
14312
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14313
+ style: {
14314
+ width: 130
14315
+ },
14316
+ value: val,
14317
+ min: 0,
14318
+ precision: 2,
14319
+ onChange: function onChange(num) {
14320
+ updateDataHandle({
14321
+ price: num,
14322
+ amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
14323
+ }, index);
14324
+ }
14325
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14326
+ }
14327
+ }, {
14328
+ dataIndex: 'amount',
14329
+ title: "\u5B9E\u9645\u91D1\u989D",
14330
+ width: 150
14331
+ }, {
14332
+ dataIndex: 'originPrice',
14333
+ title: "\u6807\u51C6\u5355\u4EF7",
14334
+ width: 150
14335
+ }, {
14336
+ dataIndex: 'originAmount',
14337
+ title: "\u6807\u51C6\u91D1\u989D",
14338
+ width: 150
14339
+ }, {
14340
+ dataIndex: 'isGift',
14341
+ title: "\u662F\u5426\u8D60\u54C1",
14342
+ width: 150,
14343
+ render: function render(val, record, index) {
14344
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
14345
+ value: val,
14346
+ onChange: function onChange(value) {
14347
+ updateHandle(value, index, 'isGift');
14348
+ },
14349
+ options: [{
14350
+ label: '是',
14351
+ value: 1
14352
+ }, {
14353
+ label: '否',
14354
+ value: 0
14355
+ }]
14356
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
14357
+ }
14358
+ }].map(function (item) {
14359
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14360
+ align: 'center',
14361
+ ellipsis: true
14362
+ });
14363
+ })
14364
+ };
14365
+ };
14366
+
14367
+ var fillAttrs = function fillAttrs(item) {
14368
+ if (!item.width) item.width = 150;
14369
+ if (typeof item.ellipsis !== 'boolean') item.ellipsis = true;
14370
+ if (!item.align) item.align = 'center';
14371
+ return item;
14372
+ };
14373
+ var getColumns$5 = function getColumns() {
14374
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
14375
+ _ref$text = _ref.text,
14376
+ disabled = _ref.disabled,
14377
+ updateHandle = _ref.updateHandle;
14378
+ return {
14379
+ JST_GOODS: [{
14380
+ dataIndex: 'name',
14381
+ title: '商品名称',
14382
+ width: 150,
14383
+ ellipsis: true,
14384
+ align: 'center'
14385
+ }, {
14386
+ dataIndex: 'skuId',
14387
+ title: '商品编码',
14388
+ width: 150,
14389
+ ellipsis: true,
14390
+ align: 'center'
14391
+ }, {
14392
+ dataIndex: 'iId',
14393
+ title: '款式编码',
14394
+ width: 150,
14395
+ ellipsis: true,
14396
+ align: 'center'
14397
+ }, {
14398
+ dataIndex: 'pic',
14399
+ title: '商品图片',
14400
+ ellipsis: true,
14401
+ align: 'center',
14402
+ width: 100,
14403
+ render: function render(val) {
14404
+ return /*#__PURE__*/React.createElement(Image, {
14405
+ width: 60,
14406
+ src: val
14407
+ });
14408
+ }
14409
+ }, {
14410
+ dataIndex: 'propertiesValue',
14411
+ title: '规格值',
14412
+ width: 150,
14413
+ ellipsis: true,
14414
+ align: 'center'
14415
+ }, {
14416
+ dataIndex: 'saleBasePrice',
14417
+ title: '原价',
14418
+ width: 150,
14419
+ ellipsis: true,
14420
+ align: 'center',
14421
+ render: function render(price) {
14422
+ return price || price === 0 ? Number(price).toFixed(2) : '';
14423
+ }
14424
+ }, {
14425
+ dataIndex: 'salePrice',
14426
+ title: '单价',
14427
+ ellipsis: true,
14428
+ align: 'center',
14429
+ width: 120,
14430
+ render: function render(val, record, index) {
14431
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14432
+ style: {
14433
+ width: 70
14434
+ },
14435
+ value: val,
14436
+ min: 0,
14437
+ precision: 2,
14438
+ onChange: function onChange(num) {
14439
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
14440
+ }
14441
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
14442
+ }
14443
+ }, {
14444
+ dataIndex: 'qty',
14445
+ title: '数量',
14446
+ ellipsis: true,
14447
+ align: 'center',
14448
+ width: 100,
14449
+ render: function render(val, record, index) {
14450
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14451
+ style: {
14452
+ width: 70
14453
+ },
14454
+ value: val,
14455
+ min: 1,
14456
+ precision: 0,
14457
+ onChange: function onChange(num) {
14458
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
14459
+ }
14460
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14461
+ }
14462
+ }, {
14463
+ dataIndex: 'saleAmount',
14464
+ title: '总金额',
14465
+ width: 150,
14466
+ ellipsis: true,
14467
+ align: 'center',
14468
+ render: function render(val, record, index) {
14469
+ return (record.qty || 0) * (+record.salePrice || 0);
14470
+ }
14471
+ }, {
14472
+ dataIndex: 'batchId',
14473
+ title: '批次号',
14474
+ width: 150,
14475
+ ellipsis: true,
14476
+ align: 'center'
14477
+ }, {
14478
+ dataIndex: 'isGift',
14479
+ title: '是否赠品',
14480
+ ellipsis: true,
14481
+ align: 'center',
14482
+ width: 100,
14483
+ render: function render(val, record, index) {
14484
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
14485
+ value: val,
14486
+ onChange: function onChange(value) {
14487
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
14488
+ },
14489
+ options: [{
14490
+ label: '是',
14491
+ value: true
14492
+ }, {
14493
+ label: '否',
14494
+ value: false
14495
+ }]
14496
+ }) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
14497
+ }
14498
+ }, {
14499
+ dataIndex: 'outerOiId',
14500
+ title: '子订单号',
14501
+ width: 240,
14502
+ ellipsis: true,
14503
+ align: 'center'
14504
+ }],
14505
+ JST_REISSUE_GOODS: [{
14506
+ dataIndex: 'name',
14507
+ title: '商品名称',
14508
+ width: 150,
14509
+ ellipsis: true,
14510
+ align: 'center'
14511
+ }, {
14512
+ dataIndex: 'skuId',
14513
+ title: '商品编码',
14514
+ width: 150,
14515
+ ellipsis: true,
14516
+ align: 'center'
14517
+ }, {
14518
+ dataIndex: 'iId',
14519
+ title: '款式编码',
14520
+ width: 150,
14521
+ ellipsis: true,
14522
+ align: 'center'
14523
+ }, {
14524
+ dataIndex: 'pic',
14525
+ title: '商品图片',
14526
+ ellipsis: true,
14527
+ align: 'center',
14528
+ width: 100,
14529
+ render: function render(val) {
14530
+ return /*#__PURE__*/React.createElement(Image, {
14531
+ width: 60,
14532
+ src: val
14533
+ });
14534
+ }
14535
+ }, {
14536
+ dataIndex: 'propertiesValue',
14537
+ title: '规格值',
14538
+ width: 150,
14539
+ ellipsis: true,
14540
+ align: 'center'
14541
+ }, {
14542
+ dataIndex: 'saleBasePrice',
14543
+ title: '原价',
14544
+ width: 150,
14545
+ ellipsis: true,
14546
+ align: 'center',
14547
+ render: function render(price) {
14548
+ return price || price === 0 ? Number(price).toFixed(2) : '';
14549
+ }
14550
+ }, {
14551
+ dataIndex: 'salePrice',
14552
+ title: '单价',
14553
+ ellipsis: true,
14554
+ align: 'center',
14555
+ width: 120,
14556
+ render: function render(val, record, index) {
14557
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14558
+ style: {
14559
+ width: 70
14560
+ },
14561
+ value: val,
14562
+ min: 0,
14563
+ precision: 2,
14564
+ onChange: function onChange(num) {
14565
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
14566
+ }
14567
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
14568
+ }
14569
+ }, {
14570
+ dataIndex: 'qty',
14571
+ title: '数量',
14572
+ ellipsis: true,
14573
+ align: 'center',
14574
+ width: 100,
14575
+ render: function render(val, record, index) {
14576
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14577
+ style: {
14578
+ width: 70
14579
+ },
14580
+ value: val,
14581
+ min: 1,
14582
+ precision: 0,
14583
+ onChange: function onChange(num) {
14584
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
14585
+ }
14586
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14587
+ }
14588
+ }, {
14589
+ dataIndex: 'isGift',
14590
+ title: '是否赠品',
14591
+ ellipsis: true,
14592
+ align: 'center',
14593
+ width: 100,
14594
+ render: function render(val, record, index) {
14595
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
14596
+ value: val,
14597
+ onChange: function onChange(value) {
14598
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
14599
+ },
14600
+ options: [{
14601
+ label: '是',
14602
+ value: true
14603
+ }, {
14604
+ label: '否',
14605
+ value: false
14606
+ }]
14607
+ }) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
14608
+ }
14609
+ }, {
14610
+ dataIndex: 'remark',
14611
+ title: '备注',
14612
+ width: 150,
14613
+ ellipsis: true,
14614
+ align: 'center',
14615
+ render: function render(val, record, index) {
14616
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Input, {
14617
+ style: {
14618
+ width: 70
14619
+ },
14620
+ value: val,
14621
+ onChange: function onChange(e) {
14622
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
14623
+ }
14624
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14625
+ }
14626
+ }],
14627
+ JST_RETURN_GOODS: [{
14628
+ dataIndex: 'name',
14629
+ title: '商品名称'
14630
+ }, {
14631
+ dataIndex: 'skuId',
14632
+ title: '商品编码'
14633
+ }, {
14634
+ dataIndex: 'iId',
14635
+ title: '款式编码'
14636
+ }, {
14637
+ dataIndex: 'pic',
14638
+ title: '商品图片',
14639
+ width: 100,
14640
+ render: function render(val) {
14641
+ return /*#__PURE__*/React.createElement(Image, {
14642
+ width: 60,
14643
+ src: val
14644
+ });
14645
+ }
14646
+ }, {
14647
+ dataIndex: 'propertiesValue',
14648
+ title: '规格值'
14649
+ }, {
14650
+ dataIndex: 'saleBasePrice',
14651
+ title: '原价',
14652
+ render: function render(price) {
14653
+ return price || price === 0 ? Number(price).toFixed(2) : '';
14654
+ }
14655
+ }, {
14656
+ dataIndex: 'salePrice',
14657
+ title: '单价',
14658
+ width: 120,
14659
+ render: function render(val, record, index) {
14660
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14661
+ style: {
14662
+ width: 70
14663
+ },
14664
+ value: val,
14665
+ min: 0,
14666
+ precision: 2,
14667
+ onChange: function onChange(num) {
14668
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
14669
+ }
14670
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
14671
+ }
14672
+ }, {
14673
+ dataIndex: 'qty',
14674
+ title: '数量',
14675
+ width: 100,
14676
+ render: function render(val, record, index) {
14677
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14678
+ style: {
14679
+ width: 70
14680
+ },
14681
+ value: val,
14682
+ min: 1,
14683
+ precision: 0,
14684
+ onChange: function onChange(num) {
14685
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
14686
+ }
14687
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14688
+ }
14689
+ }, {
14690
+ dataIndex: 'saleAmount',
14691
+ title: '总金额',
14692
+ render: function render(val, record) {
14693
+ return (record.qty || 0) * (+record.salePrice || 0);
13870
14694
  }
14695
+ }, {
14696
+ dataIndex: 'batchId',
14697
+ title: '批次号'
13871
14698
  }, {
13872
14699
  dataIndex: 'isGift',
13873
- title: "\u662F\u5426\u8D60\u54C1",
13874
- width: 150,
14700
+ title: '是否赠品',
14701
+ width: 100,
13875
14702
  render: function render(val, record, index) {
13876
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
14703
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13877
14704
  value: val,
13878
14705
  onChange: function onChange(value) {
13879
- updateHandle(value, index, 'isGift');
14706
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
13880
14707
  },
13881
14708
  options: [{
13882
14709
  label: '是',
13883
- value: 1
14710
+ value: true
13884
14711
  }, {
13885
14712
  label: '否',
13886
- value: 0
14713
+ value: false
13887
14714
  }]
13888
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
14715
+ }) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
13889
14716
  }
13890
14717
  }, {
13891
- dataIndex: 'skuNote',
13892
- title: "\u5546\u54C1\u5907\u6CE8",
13893
- width: 150
13894
- }].map(function (item) {
13895
- return _objectSpread2(_objectSpread2({}, item), {}, {
13896
- align: 'center',
13897
- ellipsis: true
13898
- });
13899
- }),
13900
- //管易补发商品信息
13901
- GY_REISSUE_GOODS: [{
13902
- dataIndex: 'goodName',
13903
- title: "\u5546\u54C1\u540D\u79F0",
13904
- width: 150
13905
- }, {
13906
- dataIndex: 'goodShortName',
13907
- title: "\u5546\u54C1\u7B80\u79F0",
13908
- width: 150
14718
+ dataIndex: 'remark',
14719
+ title: '备注',
14720
+ render: function render(val, record, index) {
14721
+ return !disabled ? /*#__PURE__*/React.createElement(Input, {
14722
+ style: {
14723
+ width: 70
14724
+ },
14725
+ value: val,
14726
+ onChange: function onChange(e) {
14727
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
14728
+ }
14729
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14730
+ }
13909
14731
  }, {
13910
- dataIndex: 'goodNo',
13911
- title: "\u5546\u54C1\u7F16\u7801",
13912
- width: 200
14732
+ dataIndex: 'outerOiId',
14733
+ title: '子订单号',
14734
+ width: 240
14735
+ }].map(fillAttrs),
14736
+ JST_EXCHANGE_GOODS: [{
14737
+ dataIndex: 'name',
14738
+ title: '商品名称'
13913
14739
  }, {
13914
- dataIndex: 'specName',
13915
- title: "SKU\u540D\u79F0",
13916
- align: 'center',
13917
- ellipsis: true,
13918
- width: 250
14740
+ dataIndex: 'skuId',
14741
+ title: '商品编码'
13919
14742
  }, {
13920
- dataIndex: 'specNo',
13921
- title: "SKU\u7F16\u7801",
13922
- align: 'center',
13923
- ellipsis: true,
13924
- width: 150
14743
+ dataIndex: 'iId',
14744
+ title: '款式编码'
13925
14745
  }, {
13926
- dataIndex: 'qty',
13927
- title: "\u6570\u91CF",
14746
+ dataIndex: 'pic',
14747
+ title: '商品图片',
13928
14748
  width: 100,
14749
+ render: function render(val) {
14750
+ return /*#__PURE__*/React.createElement(Image, {
14751
+ width: 60,
14752
+ src: val
14753
+ });
14754
+ }
14755
+ }, {
14756
+ dataIndex: 'propertiesValue',
14757
+ title: '规格值'
14758
+ }, {
14759
+ dataIndex: 'saleBasePrice',
14760
+ title: '原价',
14761
+ render: function render(price) {
14762
+ return price || price === 0 ? Number(price).toFixed(2) : '';
14763
+ }
14764
+ }, {
14765
+ dataIndex: 'salePrice',
14766
+ title: '单价',
14767
+ width: 120,
13929
14768
  render: function render(val, record, index) {
13930
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14769
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13931
14770
  style: {
13932
14771
  width: 70
13933
14772
  },
13934
14773
  value: val,
13935
- min: 1,
13936
- precision: 0,
14774
+ min: 0,
14775
+ precision: 2,
13937
14776
  onChange: function onChange(num) {
13938
- updateDataHandle({
13939
- qty: num,
13940
- amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
13941
- originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
13942
- }, index);
14777
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
13943
14778
  }
13944
- }) : /*#__PURE__*/React.createElement("span", null, val);
14779
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
13945
14780
  }
13946
14781
  }, {
13947
- dataIndex: 'price',
13948
- title: "\u5B9E\u9645\u5355\u4EF7",
13949
- width: 150,
14782
+ dataIndex: 'qty',
14783
+ title: '数量',
14784
+ width: 100,
13950
14785
  render: function render(val, record, index) {
13951
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14786
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13952
14787
  style: {
13953
- width: 130
14788
+ width: 70
13954
14789
  },
13955
14790
  value: val,
13956
- min: 0,
13957
- precision: 2,
14791
+ min: 1,
14792
+ precision: 0,
13958
14793
  onChange: function onChange(num) {
13959
- updateDataHandle({
13960
- price: num,
13961
- amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
13962
- }, index);
14794
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
13963
14795
  }
13964
14796
  }) : /*#__PURE__*/React.createElement("span", null, val);
13965
14797
  }
13966
14798
  }, {
13967
- dataIndex: 'amount',
13968
- title: "\u5B9E\u9645\u91D1\u989D",
13969
- width: 150
13970
- }, {
13971
- dataIndex: 'originPrice',
13972
- title: "\u6807\u51C6\u5355\u4EF7",
13973
- width: 150
13974
- }, {
13975
- dataIndex: 'originAmount',
13976
- title: "\u6807\u51C6\u91D1\u989D",
13977
- width: 150
14799
+ dataIndex: 'saleAmount',
14800
+ title: '总金额',
14801
+ render: function render(val, record) {
14802
+ return (record.qty || 0) * (+record.salePrice || 0);
14803
+ }
13978
14804
  }, {
13979
14805
  dataIndex: 'isGift',
13980
- title: "\u662F\u5426\u8D60\u54C1",
13981
- width: 150,
14806
+ title: '是否赠品',
14807
+ width: 100,
13982
14808
  render: function render(val, record, index) {
13983
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
14809
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13984
14810
  value: val,
13985
14811
  onChange: function onChange(value) {
13986
- updateHandle(value, index, 'isGift');
14812
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
13987
14813
  },
13988
14814
  options: [{
13989
14815
  label: '是',
13990
- value: 1
14816
+ value: true
13991
14817
  }, {
13992
14818
  label: '否',
13993
- value: 0
14819
+ value: false
13994
14820
  }]
13995
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
14821
+ }) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
13996
14822
  }
13997
- }].map(function (item) {
13998
- return _objectSpread2(_objectSpread2({}, item), {}, {
13999
- align: 'center',
14000
- ellipsis: true
14001
- });
14002
- })
14823
+ }, {
14824
+ dataIndex: 'remark',
14825
+ title: '备注',
14826
+ render: function render(val, record, index) {
14827
+ return !disabled ? /*#__PURE__*/React.createElement(Input, {
14828
+ style: {
14829
+ width: 70
14830
+ },
14831
+ value: val,
14832
+ onChange: function onChange(e) {
14833
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
14834
+ }
14835
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14836
+ }
14837
+ }].map(fillAttrs)
14003
14838
  };
14004
14839
  };
14005
14840
 
14006
- var getColumns$5 = function getColumns(_ref) {
14841
+ var getColumns$6 = function getColumns(_ref) {
14007
14842
  var _ref$text = _ref.text,
14008
14843
  text = _ref$text === void 0 ? '' : _ref$text,
14009
14844
  disabled = _ref.disabled,
@@ -14116,7 +14951,7 @@ var getColumnsMap = function getColumnsMap(args) {
14116
14951
  disabled = _ref.disabled,
14117
14952
  updateHandle = _ref.updateHandle,
14118
14953
  updateDataHandle = _ref.updateDataHandle;
14119
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
14954
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
14120
14955
  text: text,
14121
14956
  disabled: disabled,
14122
14957
  updateHandle: updateHandle
@@ -14137,8 +14972,12 @@ var getColumnsMap = function getColumnsMap(args) {
14137
14972
  disabled: disabled,
14138
14973
  updateHandle: updateHandle,
14139
14974
  updateDataHandle: updateDataHandle
14975
+ })), getColumns$5({
14976
+ text: text,
14977
+ disabled: disabled,
14978
+ updateHandle: updateHandle
14140
14979
  })), {}, {
14141
- default: getColumns$5({
14980
+ default: getColumns$6({
14142
14981
  text: text,
14143
14982
  disabled: disabled,
14144
14983
  updateHandle: updateHandle
@@ -14242,27 +15081,50 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
14242
15081
  });
14243
15082
  };
14244
15083
 
14245
- var MAIN_FIELD = 'uuid';
15084
+ var GoodsModalMap = {
15085
+ WDT_REISSUE_GOODS: WdtGoodsModal,
15086
+ WDT_GOODS: WdtGoodsModal,
15087
+ WDT_EXCHANGE_GOODS: WdtGoodsModal,
15088
+ BS_E3_REISSUE_GOODS: BsE3GoodsModal,
15089
+ BS_E3_GOODS: BsE3GoodsModal,
15090
+ BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
15091
+ GY_GOODS: GyGoodsModal$2,
15092
+ GY_REISSUE_GOODS: GyGoodsModal$2,
15093
+ JST_GOODS: JstGoodsModal,
15094
+ JST_REISSUE_GOODS: JstGoodsModal,
15095
+ JST_RETURN_GOODS: JstGoodsModal,
15096
+ JST_EXCHANGE_GOODS: JstGoodsModal,
15097
+ OTHER_GOODS: GoodsModal$2
15098
+ };
14246
15099
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
14247
15100
  var columns = _ref.columns,
14248
15101
  dataSource = _ref.dataSource,
15102
+ getDataSourceAsync = _ref.getDataSourceAsync,
14249
15103
  selectedRowKeys = _ref.selectedRowKeys,
14250
- onChangeSelectedKeys = _ref.onChangeSelectedKeys;
15104
+ onChangeSelectedKeys = _ref.onChangeSelectedKeys,
15105
+ _ref$uniqueKey = _ref.uniqueKey,
15106
+ uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey;
14251
15107
  var _useState = useState(false),
14252
15108
  _useState2 = _slicedToArray(_useState, 2),
14253
15109
  tradeGoodsVisible = _useState2[0],
14254
15110
  setTradeGoodsVisible = _useState2[1];
14255
15111
  var openModal = function openModal() {
14256
- return setTradeGoodsVisible(true);
15112
+ if (getDataSourceAsync) {
15113
+ getDataSourceAsync().then(function () {
15114
+ setTradeGoodsVisible(true);
15115
+ });
15116
+ } else {
15117
+ setTradeGoodsVisible(true);
15118
+ }
14257
15119
  };
14258
15120
  var closeModal = function closeModal() {
14259
15121
  return setTradeGoodsVisible(false);
14260
15122
  };
14261
15123
  var currentTradeOriginGoods = intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
14262
- return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
15124
+ return item === null || item === void 0 ? void 0 : item[uniqueKey];
14263
15125
  }), selectedRowKeys);
14264
15126
  var unCurrentTradeOriginGoods = difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
14265
- return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
15127
+ return item === null || item === void 0 ? void 0 : item[uniqueKey];
14266
15128
  }));
14267
15129
  var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
14268
15130
  console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
@@ -14281,7 +15143,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
14281
15143
  footer: null,
14282
15144
  onCancel: closeModal
14283
15145
  }, /*#__PURE__*/React.createElement(Table, {
14284
- rowKey: MAIN_FIELD,
15146
+ rowKey: uniqueKey,
14285
15147
  rowSelection: rowSelection,
14286
15148
  columns: columns,
14287
15149
  dataSource: dataSource,
@@ -14303,6 +15165,9 @@ var getButtonText = function getButtonText() {
14303
15165
  if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
14304
15166
  return '选择管易ERP商品';
14305
15167
  }
15168
+ if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
15169
+ return '选择聚水潭ERP商品';
15170
+ }
14306
15171
  return '选择商品';
14307
15172
  };
14308
15173
  var GoodItem$1 = function GoodItem(props) {
@@ -14322,6 +15187,8 @@ var GoodItem$1 = function GoodItem(props) {
14322
15187
  maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
14323
15188
  _props$showChangeBtn = props.showChangeBtn,
14324
15189
  showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
15190
+ _props$showErpGoodsBt = props.showErpGoodsBtn,
15191
+ showErpGoodsBtn = _props$showErpGoodsBt === void 0 ? true : _props$showErpGoodsBt,
14325
15192
  _props$showModeBtn = props.showModeBtn,
14326
15193
  showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
14327
15194
  _props$isStrict = props.isStrict,
@@ -14340,7 +15207,12 @@ var GoodItem$1 = function GoodItem(props) {
14340
15207
  onSelect = props.onSelect,
14341
15208
  onDelete = props.onDelete,
14342
15209
  onModeChange = props.onModeChange,
14343
- tradeGoods = props.tradeGoods;
15210
+ tradeGoods = props.tradeGoods,
15211
+ form = props.form;
15212
+ var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
15213
+ // 监听聚水潭退货商品
15214
+ var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
15215
+ var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
14344
15216
  var refModal = useRef();
14345
15217
  console.debug('表格数据', value);
14346
15218
  var handleDelete = function handleDelete(record, index) {
@@ -14360,7 +15232,7 @@ var GoodItem$1 = function GoodItem(props) {
14360
15232
  // TODO: 商品订单中以选中商品
14361
15233
  var selectedGoods = useMemo(function () {
14362
15234
  return value === null || value === void 0 ? void 0 : value.map(function (v) {
14363
- return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
15235
+ return v === null || v === void 0 ? void 0 : v[uniqueKey];
14364
15236
  });
14365
15237
  }, [value]);
14366
15238
  var updateHandle = function updateHandle(val, index, columnType) {
@@ -14402,7 +15274,7 @@ var GoodItem$1 = function GoodItem(props) {
14402
15274
  };
14403
15275
  var COLUMNS_MAP = function COLUMNS_MAP() {
14404
15276
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
14405
- var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
15277
+ var columnsOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
14406
15278
  return function (type) {
14407
15279
  var columns = [];
14408
15280
  switch (type) {
@@ -14413,11 +15285,15 @@ var GoodItem$1 = function GoodItem(props) {
14413
15285
  case 'BS_GOODS':
14414
15286
  case 'WLN_GOODS':
14415
15287
  case 'GY_GOODS':
15288
+ case 'JST_GOODS':
15289
+ case 'JST_REISSUE_GOODS':
15290
+ case 'JST_EXCHANGE_GOODS':
15291
+ case 'JST_RETURN_GOODS':
14416
15292
  case 'GY_REISSUE_GOODS':
14417
15293
  {
14418
15294
  columns = getColumnsMap({
14419
15295
  text: text,
14420
- disabled: disabled,
15296
+ disabled: disabled || columnsOptions.disabled,
14421
15297
  updateHandle: updateHandle,
14422
15298
  updateDataHandle: updateDataHandle
14423
15299
  })[type];
@@ -14426,25 +15302,25 @@ var GoodItem$1 = function GoodItem(props) {
14426
15302
  case 'WDT_REISSUE_GOODS':
14427
15303
  {
14428
15304
  columns = getWdtReissueGoodColumns({
14429
- disabled: disabled,
15305
+ disabled: disabled || columnsOptions.disabled,
14430
15306
  updateHandle: updateHandle,
14431
- operate: operate
15307
+ operate: columnsOptions.operate
14432
15308
  });
14433
15309
  }
14434
15310
  break;
14435
15311
  case 'BS_E3_REISSUE_GOODS':
14436
15312
  {
14437
15313
  columns = getBsE3ReissueGoodColumns({
14438
- disabled: disabled,
15314
+ disabled: disabled || columnsOptions.disabled,
14439
15315
  updateHandle: updateHandle,
14440
- operate: operate
15316
+ operate: columnsOptions.operate
14441
15317
  });
14442
15318
  }
14443
15319
  break;
14444
15320
  default:
14445
15321
  columns = getColumnsMap({
14446
15322
  text: text,
14447
- disabled: disabled,
15323
+ disabled: disabled || columnsOptions.disabled,
14448
15324
  updateHandle: updateHandle,
14449
15325
  updateDataHandle: updateDataHandle
14450
15326
  })['default'];
@@ -14507,7 +15383,10 @@ var GoodItem$1 = function GoodItem(props) {
14507
15383
  return columnList;
14508
15384
  }, [showHeader, value, disabled]);
14509
15385
  var orderColumns = useMemo(function () {
14510
- var columns = COLUMNS_MAP('', false)(type);
15386
+ var columns = COLUMNS_MAP('', {
15387
+ operate: false,
15388
+ disabled: true
15389
+ })(type);
14511
15390
  return [{
14512
15391
  dataIndex: '',
14513
15392
  title: '序号',
@@ -14591,6 +15470,23 @@ var GoodItem$1 = function GoodItem(props) {
14591
15470
  originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
14592
15471
  });
14593
15472
  });
15473
+ } else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
15474
+ newList = list.map(function (item) {
15475
+ return {
15476
+ name: item.goodName,
15477
+ skuId: item.goodNo,
15478
+ iId: item.styleCode,
15479
+ pic: item.goodPicUrl,
15480
+ propertiesValue: item.propertiesValue,
15481
+ saleBasePrice: item.retailPrice,
15482
+ salePrice: item.retailPrice,
15483
+ remark: '',
15484
+ uuid: uuid(),
15485
+ canDelete: true,
15486
+ canEdit: true,
15487
+ qty: 1
15488
+ };
15489
+ });
14594
15490
  } else {
14595
15491
  newList = list.map(function (item) {
14596
15492
  var goodsId = item.goodsId,
@@ -14622,11 +15518,13 @@ var GoodItem$1 = function GoodItem(props) {
14622
15518
  var onSelectChange = function onSelectChange(newSelectedRowKeys) {
14623
15519
  setSelectedRowKeys(newSelectedRowKeys);
14624
15520
  onSelect === null || onSelect === void 0 ? void 0 : onSelect(value.filter(function (t) {
14625
- return newSelectedRowKeys.includes(t.uuid);
15521
+ return newSelectedRowKeys.includes(t[uniqueKey]);
14626
15522
  }));
14627
15523
  };
14628
15524
  var handleChangeGoods = function handleChangeGoods() {
14629
- refModal.current.open(shopCode);
15525
+ refModal.current.open(shopCode, {
15526
+ value: value
15527
+ });
14630
15528
  };
14631
15529
  var rowSelection = {
14632
15530
  selectedRowKeys: selectedRowKeys,
@@ -14643,6 +15541,7 @@ var GoodItem$1 = function GoodItem(props) {
14643
15541
  }
14644
15542
  return params;
14645
15543
  }, [tableSelect, selectedRowKeys]);
15544
+ var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
14646
15545
  return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React.createElement("div", {
14647
15546
  style: {
14648
15547
  float: 'right'
@@ -14650,18 +15549,20 @@ var GoodItem$1 = function GoodItem(props) {
14650
15549
  }, showModeBtn && /*#__PURE__*/React.createElement(Checkbox, {
14651
15550
  checked: isStrict,
14652
15551
  onChange: handleCheckboxChange
14653
- }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && /*#__PURE__*/React.createElement(SelectTradeGoods, {
15552
+ }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && isShowSelectTradeGoods && /*#__PURE__*/React.createElement(SelectTradeGoods, {
15553
+ uniqueKey: uniqueKey,
14654
15554
  columns: orderColumns,
14655
15555
  dataSource: tradeGoods.originDataSource,
15556
+ getDataSourceAsync: tradeGoods.getDataSourceAsync,
14656
15557
  selectedRowKeys: selectedGoods,
14657
15558
  onChangeSelectedKeys: tradeGoods.selectedGoodsChange
14658
- }), /*#__PURE__*/React.createElement(Button, {
15559
+ }), showErpGoodsBtn && /*#__PURE__*/React.createElement(Button, {
14659
15560
  type: "link",
14660
15561
  onClick: handleChangeGoods
14661
15562
  }, getButtonText(type)), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
14662
15563
  columns: newColumns,
14663
15564
  dataSource: value,
14664
- rowKey: 'uuid',
15565
+ rowKey: uniqueKey,
14665
15566
  size: "small",
14666
15567
  pagination: false,
14667
15568
  scroll: {
@@ -14670,31 +15571,7 @@ var GoodItem$1 = function GoodItem(props) {
14670
15571
  locale: {
14671
15572
  emptyText: '暂无数据'
14672
15573
  }
14673
- })), ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(WdtGoodsModal, {
14674
- ref: refModal,
14675
- onSubmit: onSubmit,
14676
- width: width,
14677
- shopList: shopList,
14678
- shopId: shopId,
14679
- maxLength: maxLength,
14680
- companyKey: companyKey
14681
- }) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(BsE3GoodsModal, {
14682
- ref: refModal,
14683
- onSubmit: onSubmit,
14684
- width: width,
14685
- shopList: shopList,
14686
- shopId: shopId,
14687
- maxLength: maxLength,
14688
- companyKey: companyKey
14689
- }) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(GyGoodsModal$1, {
14690
- ref: refModal,
14691
- onSubmit: onSubmit,
14692
- width: width,
14693
- shopList: shopList,
14694
- shopId: shopId,
14695
- maxLength: maxLength,
14696
- companyKey: companyKey
14697
- }) : /*#__PURE__*/React.createElement(GoodsModal$2, {
15574
+ })), /*#__PURE__*/React.createElement(TheGoodsModal, {
14698
15575
  ref: refModal,
14699
15576
  onSubmit: onSubmit,
14700
15577
  width: width,
@@ -15441,12 +16318,45 @@ var gyUtils = {
15441
16318
  };
15442
16319
 
15443
16320
  var singletonMap$3 = new Map();
15444
- var getOrderListSingleton = function getOrderListSingleton(orderNo) {
16321
+ var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
15445
16322
  if (!singletonMap$3.has(orderNo)) {
15446
16323
  var p = new Promise(function (resolve, reject) {
15447
16324
  var doReject = function doReject(err) {
15448
16325
  // 清空掉错误的请求记录
15449
- singletonMap$3.delete(orderNo);
16326
+ // singletonMap.delete(orderNo);
16327
+ reject(err);
16328
+ };
16329
+ extendRequest('/qy/gdfw/jst/erp/orderOut/list', {
16330
+ method: 'post',
16331
+ data: {
16332
+ soId: orderNo
16333
+ }
16334
+ }).then(function (data) {
16335
+ if (data === null || data === void 0 ? void 0 : data.success) {
16336
+ data.data = filterJstOrders({
16337
+ orderList: (data === null || data === void 0 ? void 0 : data.data) || []
16338
+ }, orderNo);
16339
+ resolve(data.data);
16340
+ } else {
16341
+ doReject(data);
16342
+ }
16343
+ }).catch(doReject);
16344
+ });
16345
+ singletonMap$3.set(orderNo, p);
16346
+ }
16347
+ return singletonMap$3.get(orderNo);
16348
+ };
16349
+ var jstUtils = {
16350
+ getJstOrderListSingleton: getJstOrderListSingleton
16351
+ };
16352
+
16353
+ var singletonMap$4 = new Map();
16354
+ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
16355
+ if (!singletonMap$4.has(orderNo)) {
16356
+ var p = new Promise(function (resolve, reject) {
16357
+ var doReject = function doReject(err) {
16358
+ // 清空掉错误的请求记录
16359
+ singletonMap$4.delete(orderNo);
15450
16360
  reject(err);
15451
16361
  };
15452
16362
  extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
@@ -15472,16 +16382,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
15472
16382
  }
15473
16383
  // 延迟10秒清除,保证订单的时效性
15474
16384
  setTimeout(function () {
15475
- singletonMap$3.delete(orderNo);
16385
+ singletonMap$4.delete(orderNo);
15476
16386
  }, 1000 * 10);
15477
16387
  } else {
15478
16388
  doReject(data);
15479
16389
  }
15480
16390
  }).catch(doReject);
15481
16391
  });
15482
- singletonMap$3.set(orderNo, p);
16392
+ singletonMap$4.set(orderNo, p);
15483
16393
  }
15484
- return singletonMap$3.get(orderNo);
16394
+ return singletonMap$4.get(orderNo);
15485
16395
  };
15486
16396
  var kmUtils = {
15487
16397
  getOrderListSingleton: getOrderListSingleton
@@ -15494,7 +16404,8 @@ var columnsMap = {
15494
16404
  WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG.columns,
15495
16405
  WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG.columns,
15496
16406
  BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG.columns,
15497
- GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
16407
+ GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns,
16408
+ JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG.columns
15498
16409
  };
15499
16410
  var rowKeyMap = {
15500
16411
  BS_SYSTEM_ORDER: 'billNo',
@@ -15502,7 +16413,8 @@ var rowKeyMap = {
15502
16413
  WLN_SYSTEM_ORDER: 'billNo',
15503
16414
  WDT_SYSTEM_ORDER: 'billNo',
15504
16415
  BS_E3_SYSTEM_ORDER: 'orderSn',
15505
- GY_SYSTEM_ORDER: 'billNo'
16416
+ GY_SYSTEM_ORDER: 'billNo',
16417
+ JST_SYSTEM_ORDER: 'oId'
15506
16418
  };
15507
16419
  var index$1 = (function (props) {
15508
16420
  var value = props.value,
@@ -15527,6 +16439,8 @@ var index$1 = (function (props) {
15527
16439
  } else if (type === 'GY_SYSTEM_ORDER') {
15528
16440
  console.log('触发gy--getGyOrderList--1');
15529
16441
  getGyOrderList(value.orderNo);
16442
+ } else if (type === 'JST_SYSTEM_ORDER') {
16443
+ getJstOrderList(value.orderNo);
15530
16444
  }
15531
16445
  }
15532
16446
  }, [value, type]);
@@ -15682,18 +16596,41 @@ var index$1 = (function (props) {
15682
16596
  return _ref5.apply(this, arguments);
15683
16597
  };
15684
16598
  }();
15685
- var getKmOrderList = /*#__PURE__*/function () {
16599
+ var getJstOrderList = /*#__PURE__*/function () {
15686
16600
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
15687
16601
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
15688
16602
  while (1) switch (_context5.prev = _context5.next) {
16603
+ case 0:
16604
+ jstUtils.getJstOrderListSingleton(orderNo).then(function (data) {
16605
+ var trades = data || [];
16606
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
16607
+ orders: trades,
16608
+ showOrderInfo: trades
16609
+ }));
16610
+ });
16611
+ onceRef.current = false;
16612
+ case 2:
16613
+ case "end":
16614
+ return _context5.stop();
16615
+ }
16616
+ }, _callee5);
16617
+ }));
16618
+ return function getJstOrderList(_x5) {
16619
+ return _ref6.apply(this, arguments);
16620
+ };
16621
+ }();
16622
+ var getKmOrderList = /*#__PURE__*/function () {
16623
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
16624
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
16625
+ while (1) switch (_context6.prev = _context6.next) {
15689
16626
  case 0:
15690
16627
  kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
15691
16628
  _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
15692
16629
  orders: trades,
15693
- showOrderInfo: trades.map(function (_ref7) {
15694
- var billNo = _ref7.billNo,
15695
- billType = _ref7.billType,
15696
- billTag = _ref7.billTag;
16630
+ showOrderInfo: trades.map(function (_ref8) {
16631
+ var billNo = _ref8.billNo,
16632
+ billType = _ref8.billType,
16633
+ billTag = _ref8.billTag;
15697
16634
  return {
15698
16635
  billNo: billNo,
15699
16636
  billType: billType,
@@ -15705,18 +16642,18 @@ var index$1 = (function (props) {
15705
16642
  onceRef.current = false;
15706
16643
  case 2:
15707
16644
  case "end":
15708
- return _context5.stop();
16645
+ return _context6.stop();
15709
16646
  }
15710
- }, _callee5);
16647
+ }, _callee6);
15711
16648
  }));
15712
- return function getKmOrderList(_x5) {
15713
- return _ref6.apply(this, arguments);
16649
+ return function getKmOrderList(_x6) {
16650
+ return _ref7.apply(this, arguments);
15714
16651
  };
15715
16652
  }();
15716
16653
  var getGyOrderList = /*#__PURE__*/function () {
15717
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
15718
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
15719
- while (1) switch (_context6.prev = _context6.next) {
16654
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(orderNo) {
16655
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
16656
+ while (1) switch (_context7.prev = _context7.next) {
15720
16657
  case 0:
15721
16658
  gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
15722
16659
  var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
@@ -15724,15 +16661,15 @@ var index$1 = (function (props) {
15724
16661
  });
15725
16662
  _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
15726
16663
  orders: trades,
15727
- showOrderInfo: trades.map(function (_ref9) {
15728
- var billNo = _ref9.billNo,
15729
- billType = _ref9.billType,
15730
- billTag = _ref9.billTag,
15731
- tradeTagName = _ref9.tradeTagName,
15732
- deliveryState = _ref9.deliveryState,
15733
- vipCode = _ref9.vipCode,
15734
- shopCode = _ref9.shopCode,
15735
- rest = _objectWithoutProperties(_ref9, _excluded$g);
16664
+ showOrderInfo: trades.map(function (_ref10) {
16665
+ var billNo = _ref10.billNo,
16666
+ billType = _ref10.billType,
16667
+ billTag = _ref10.billTag,
16668
+ tradeTagName = _ref10.tradeTagName,
16669
+ deliveryState = _ref10.deliveryState,
16670
+ vipCode = _ref10.vipCode,
16671
+ shopCode = _ref10.shopCode,
16672
+ rest = _objectWithoutProperties(_ref10, _excluded$g);
15736
16673
  return _objectSpread2(_objectSpread2({}, rest), {}, {
15737
16674
  billNo: billNo,
15738
16675
  billType: billType,
@@ -15749,12 +16686,12 @@ var index$1 = (function (props) {
15749
16686
  onceRef.current = false;
15750
16687
  case 2:
15751
16688
  case "end":
15752
- return _context6.stop();
16689
+ return _context7.stop();
15753
16690
  }
15754
- }, _callee6);
16691
+ }, _callee7);
15755
16692
  }));
15756
- return function getGyOrderList(_x6) {
15757
- return _ref8.apply(this, arguments);
16693
+ return function getGyOrderList(_x7) {
16694
+ return _ref9.apply(this, arguments);
15758
16695
  };
15759
16696
  }();
15760
16697
  var rowSelection = {
@@ -15903,6 +16840,31 @@ var componentMap$1 = {
15903
16840
  returnDeleteGood: 'gyReturnDeleteGood',
15904
16841
  exchangeDeleteGood: 'gyExchangeDeleteGood'
15905
16842
  }
16843
+ },
16844
+ JST_GOODS: {
16845
+ type: 'jst',
16846
+ key: 'jstGoods',
16847
+ name: '聚水潭',
16848
+ orderNo: 'dealCode',
16849
+ goodDetailOrderNo: 'originalDealCode',
16850
+ eventNameMap: {
16851
+ // pubsub 事件
16852
+ type: 'jstType',
16853
+ updateGoodsHandle: updateJstGoodsHandle,
16854
+ selectListReturn: 'jstSelectListReturn',
16855
+ selectList: 'jstSelectList',
16856
+ reissueSelectList: 'jstReissueSelectList',
16857
+ reissueSelectListReturn: 'jstReissueSelectListReturn',
16858
+ reissueDeleteGood: 'jstReissueDeleteGood',
16859
+ changeShopCode: 'jstChangeShopCode',
16860
+ reissueType: 'jstReissueType',
16861
+ returnType: 'jstReturnType',
16862
+ returnSelectListReturn: 'jstReturnSelectListReturn',
16863
+ returnSelectList: 'jstReturnSelectList',
16864
+ deleteGood: 'jstDeleteGood',
16865
+ returnDeleteGood: 'jstReturnDeleteGood',
16866
+ exchangeDeleteGood: 'jstExchangeDeleteGood'
16867
+ }
15906
16868
  }
15907
16869
  };
15908
16870
  var CommonGoods = function CommonGoods(props) {
@@ -16252,27 +17214,58 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
16252
17214
  };
16253
17215
 
16254
17216
  var componentMap$3 = {
16255
- 'WDT_EXCHANGE_GOODS': {
17217
+ WDT_EXCHANGE_GOODS: {
16256
17218
  type: 'wdt',
16257
17219
  valueKey: 'wdtExchangeGoods',
16258
17220
  returnTypeKey: 'wdtExchangeType',
16259
17221
  name: '旺店通',
16260
17222
  eventNameMap: {
16261
- changeShopCode: 'wdtChangeShopCode',
16262
- exchangeDeleteGood: 'wdtExchangeDeleteGood',
17223
+ // pubsub 事件
16263
17224
  exchangeCopyGood: 'wdtExchangeCopyGood',
16264
17225
  exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
16265
17226
  }
17227
+ },
17228
+ JST_EXCHANGE_GOODS: {
17229
+ type: 'jst',
17230
+ showChooseTradeGoodsBtn: true,
17231
+ valueKey: 'jstExchangeGoods',
17232
+ returnTypeKey: 'jstExchangeType',
17233
+ systemOrder: 'jstSystemOrder',
17234
+ systemOrderNo: 'jstSystemOrderNo',
17235
+ oIdKey: 'oId',
17236
+ goodDetailsKey: 'items',
17237
+ skuIdKey: 'skuId',
17238
+ outerOiIdKey: '',
17239
+ name: '聚水潭',
17240
+ updateGoodsHandle: updateJstGoodsHandle,
17241
+ eventNameMap: {
17242
+ // pubsub 事件
17243
+ exchangeCopyGood: 'jstExchangeCopyGood',
17244
+ exchangeBackCopyGood: 'jstExchangeBackCopyGood',
17245
+ returnGoodsSysorder: 'jstReturnGoodsSysorder',
17246
+ returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
17247
+ }
16266
17248
  }
16267
17249
  };
16268
17250
  var CommonExchangeGoods = function CommonExchangeGoods(props) {
17251
+ var _componentMap$compTyp, _componentMap$compTyp4;
16269
17252
  var value = props.value,
16270
17253
  onChange = props.onChange,
16271
17254
  disabled = props.disabled,
16272
17255
  compType = props.type;
17256
+ 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';
16273
17257
  var valueRef = useRef({});
17258
+ // PS: 目前选择订单商品,只有聚水潭换出商品,而且聚水潭不用考虑合并单,所以这个值一直是 false
17259
+ var _useState = useState(false),
17260
+ _useState2 = _slicedToArray(_useState, 2),
17261
+ isStrict = _useState2[0],
17262
+ setIsStrict = _useState2[1];
17263
+ var _useState3 = useState([]),
17264
+ _useState4 = _slicedToArray(_useState3, 2),
17265
+ originDataSource = _useState4[0],
17266
+ setOriginDataSource = _useState4[1];
16274
17267
  useEffect(function () {
16275
- var subscription = pubsub.subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
17268
+ var subscription = componentMap$3[compType].eventNameMap.exchangeBackCopyGood && pubsub.subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
16276
17269
  if (disabled) return;
16277
17270
  var newValue = {
16278
17271
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
@@ -16294,26 +17287,11 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
16294
17287
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16295
17288
  });
16296
17289
  return function () {
16297
- pubsub.unsubscribe(subscription);
17290
+ subscription && pubsub.unsubscribe(subscription);
16298
17291
  };
16299
- });
17292
+ }, []);
16300
17293
  useEffect(function () {
16301
17294
  valueRef.current = value;
16302
- pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.exchangeDeleteGood, function (_, data) {
16303
- if (disabled) return;
16304
- if (value) {
16305
- var newValue = _objectSpread2({}, value);
16306
- newValue[componentMap$3[compType].valueKey] = newValue[componentMap$3[compType].valueKey].filter(function (item) {
16307
- return item.sku !== data;
16308
- });
16309
- onChange(newValue);
16310
- }
16311
- });
16312
- pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.changeShopCode, function (type, data) {
16313
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
16314
- shopCode: data.shopCode
16315
- }));
16316
- });
16317
17295
  }, [value]);
16318
17296
  var changeGoodHandle = function changeGoodHandle(val) {
16319
17297
  var newValue = _objectSpread2({}, value);
@@ -16328,13 +17306,53 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
16328
17306
  };
16329
17307
  var copyGoods = function copyGoods() {
16330
17308
  var copyHandle = function copyHandle() {
16331
- pubsub.publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, 'WDT_EXCHANGE_GOODS');
17309
+ pubsub.publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, compType);
16332
17310
  };
16333
17311
  return /*#__PURE__*/React.createElement(Button, {
16334
17312
  type: "link",
16335
17313
  onClick: copyHandle
16336
17314
  }, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
16337
17315
  };
17316
+ var selectedGoodsChange = useCallback(function (skuList) {
17317
+ var _componentMap$compTyp2, _componentMap$compTyp3, _uniqBy;
17318
+ var newValue = _objectSpread2({}, value);
17319
+ // 原订单商品
17320
+ var originTradeGoodList = originDataSource || [];
17321
+ // 当前选中的所有商品【包含了原订单+商品库】
17322
+ 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]) || [];
17323
+ 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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), uniqueKey)) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17324
+ return skuList.includes(item[uniqueKey]);
17325
+ });
17326
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17327
+ }, [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]);
17328
+ var getGoodDetails = function getGoodDetails(_ref) {
17329
+ var _componentMap$compTyp5, _componentMap$compTyp6, _order$componentMap$c, _componentMap$compTyp7;
17330
+ var returnGoodsValue = _ref.returnGoodsValue,
17331
+ mode = _ref.mode,
17332
+ sysOrderNo = _ref.sysOrderNo;
17333
+ 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];
17334
+ 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];
17335
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17336
+ return order[componentMap$3[compType].oIdKey] === systemOrderNo;
17337
+ });
17338
+ var goodDetails = 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) : []);
17339
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
17340
+ return mode ? goodDetails.filter(function (goodItem) {
17341
+ return !orderNo || goodItem[componentMap$3[compType].outerOiIdKey] === orderNo;
17342
+ }) : goodDetails;
17343
+ };
17344
+ var getDataSourceAsync = function getDataSourceAsync() {
17345
+ return new Promise(function (resolve) {
17346
+ pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
17347
+ resolve(data);
17348
+ setOriginDataSource(getGoodDetails({
17349
+ returnGoodsValue: data,
17350
+ mode: isStrict
17351
+ }));
17352
+ });
17353
+ pubsub.publish(componentMap$3[compType].eventNameMap.returnGoodsSysorder, compType);
17354
+ });
17355
+ };
16338
17356
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
16339
17357
  key: componentMap$3[compType].type
16340
17358
  }, props), {}, {
@@ -16344,6 +17362,12 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
16344
17362
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
16345
17363
  value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
16346
17364
  otherOperations: copyGoods(),
17365
+ tradeGoods: componentMap$3[compType].showChooseTradeGoodsBtn ? {
17366
+ uniqueKey: uniqueKey,
17367
+ originDataSource: originDataSource,
17368
+ getDataSourceAsync: getDataSourceAsync,
17369
+ selectedGoodsChange: selectedGoodsChange
17370
+ } : void 0,
16347
17371
  onChange: function onChange(val) {
16348
17372
  return changeGoodHandle(val);
16349
17373
  }
@@ -16622,6 +17646,305 @@ var wdtReissue = function wdtReissue(props) {
16622
17646
  })));
16623
17647
  };
16624
17648
 
17649
+ var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
17650
+ var typeMap$2 = {
17651
+ JST_REISSUE_GOODS: {
17652
+ compType: '补发',
17653
+ key: 'jstReissueGoods',
17654
+ typeName: 'jstReissueType',
17655
+ systemOrder: 'jstSystemOrder',
17656
+ systemOrderNo: 'jstSystemOrderNo',
17657
+ systemOrderBillType: 'jstSystemOrderBillType',
17658
+ getOrderList: jstUtils.getJstOrderListSingleton,
17659
+ updateGoodsHandle: updateJstGoodsHandle,
17660
+ orderTypeKey: 'orderType',
17661
+ oIdKey: 'oId',
17662
+ outerOiIdKey: '',
17663
+ goodDetailsKey: 'items'
17664
+ },
17665
+ JST_RETURN_GOODS: {
17666
+ compType: '退货',
17667
+ key: 'jstReturnGoods',
17668
+ typeName: 'jstReturnType',
17669
+ systemOrder: 'jstSystemOrder',
17670
+ systemOrderNo: 'jstSystemOrderNo',
17671
+ systemOrderBillType: 'jstSystemOrderBillType',
17672
+ getOrderList: jstUtils.getJstOrderListSingleton,
17673
+ updateGoodsHandle: updateJstGoodsHandle,
17674
+ orderTypeKey: 'orderType',
17675
+ oIdKey: 'oId',
17676
+ outerOiIdKey: '',
17677
+ goodDetailsKey: 'items',
17678
+ showErpGoodsBtn: false,
17679
+ eventNameMap: {
17680
+ // pubsub 事件
17681
+ exchangeCopyGood: 'jstExchangeCopyGood',
17682
+ exchangeBackCopyGood: 'jstExchangeBackCopyGood',
17683
+ returnGoodsSysorder: 'jstReturnGoodsSysorder',
17684
+ returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
17685
+ }
17686
+ }
17687
+ };
17688
+ var PublicReissue = function PublicReissue(props) {
17689
+ 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;
17690
+ var value = props.value,
17691
+ onChange = props.onChange,
17692
+ _props$reasonList = props.reasonList,
17693
+ reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17694
+ disabled = props.disabled,
17695
+ type = props.type,
17696
+ other = _objectWithoutProperties(props, _excluded$i);
17697
+ var getOrderFlag = useRef(false);
17698
+ var _useState = useState(false),
17699
+ _useState2 = _slicedToArray(_useState, 2),
17700
+ isStrict = _useState2[0],
17701
+ setIsStrict = _useState2[1];
17702
+ // TODO: 在修改场景下手动获取一次订单详情中数据
17703
+ useEffect(function () {
17704
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
17705
+ 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)) {
17706
+ var _value$typeMap$type$s4, _typeMap$type3;
17707
+ getOrderFlag.current = true;
17708
+ 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);
17709
+ }
17710
+ return;
17711
+ }, [value]);
17712
+ var valueRef = useRef({});
17713
+ useEffect(function () {
17714
+ valueRef.current = value;
17715
+ }, [value]);
17716
+ useEffect(function () {
17717
+ var subscription;
17718
+ var subscription2;
17719
+ if (typeMap$2[type].eventNameMap) {
17720
+ subscription = pubsub.subscribe(typeMap$2[type].eventNameMap.exchangeCopyGood, function () {
17721
+ var _valueRef$current, _valueRef$current2;
17722
+ pubsub.publish(typeMap$2[type].eventNameMap.exchangeBackCopyGood, {
17723
+ list: 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]) || []),
17724
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode
17725
+ });
17726
+ });
17727
+ subscription2 = pubsub.subscribe(typeMap$2[type].eventNameMap.returnGoodsSysorder, function () {
17728
+ pubsub.publish(typeMap$2[type].eventNameMap.returnGoodsSysorderBack, cloneDeep(valueRef.current));
17729
+ });
17730
+ }
17731
+ return function () {
17732
+ subscription && pubsub.unsubscribe(subscription);
17733
+ subscription2 && pubsub.unsubscribe(subscription2);
17734
+ };
17735
+ }, []);
17736
+ var getOrderList = /*#__PURE__*/function () {
17737
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
17738
+ var _typeMap$type4;
17739
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
17740
+ while (1) switch (_context.prev = _context.next) {
17741
+ case 0:
17742
+ (_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
17743
+ var _typeMap$type5, _typeMap$type6, _typeMap$type10, _typeMap$type11;
17744
+ var orders = data || [];
17745
+ var showOrderInfo = orders.map(function (orderItem) {
17746
+ return _defineProperty({}, typeMap$2[type].oIdKey, orderItem[typeMap$2[type].oIdKey]);
17747
+ });
17748
+ var typeObj = {};
17749
+ 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];
17750
+ 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) {
17751
+ var _typeMap$type8, _typeMap$type9;
17752
+ var targetOrder = orders.find(function (oItem) {
17753
+ var _typeMap$type7;
17754
+ return oItem[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.oIdKey] === systemOrderNo;
17755
+ });
17756
+ 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];
17757
+ }
17758
+ 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]), {}, {
17759
+ showOrderInfo: showOrderInfo,
17760
+ orders: orders
17761
+ }))));
17762
+ });
17763
+ case 1:
17764
+ case "end":
17765
+ return _context.stop();
17766
+ }
17767
+ }, _callee);
17768
+ }));
17769
+ return function getOrderList(_x) {
17770
+ return _ref.apply(this, arguments);
17771
+ };
17772
+ }();
17773
+ var changeTypeHandle = function changeTypeHandle(val) {
17774
+ var _typeMap$type12;
17775
+ var typeName = val === null || val === void 0 ? void 0 : val[0];
17776
+ // if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
17777
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
17778
+ var newValue = _objectSpread2({}, value);
17779
+ newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
17780
+ if (typeName === '1') {
17781
+ var _typeMap$type13;
17782
+ newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
17783
+ mode: isStrict
17784
+ });
17785
+ } else if (typeName === '2') {
17786
+ var _typeMap$type14;
17787
+ // 切换到非原单,清空列表
17788
+ newValue[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
17789
+ }
17790
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17791
+ };
17792
+ var handleModeChange = function handleModeChange(mode) {
17793
+ var _value$typeMap$type$t, _typeMap$type15, _typeMap$type16;
17794
+ 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';
17795
+ setIsStrict(mode);
17796
+ if (!isOriginalOrder) return;
17797
+ 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({
17798
+ mode: mode
17799
+ }))));
17800
+ };
17801
+ var getGoodDetails = function getGoodDetails(_ref3) {
17802
+ var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
17803
+ var mode = _ref3.mode,
17804
+ sysOrderNo = _ref3.sysOrderNo;
17805
+ 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];
17806
+ 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];
17807
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17808
+ return order[typeMap$2[type].oIdKey] === systemOrderNo;
17809
+ });
17810
+ var goodDetails = 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) : []);
17811
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
17812
+ return mode ? goodDetails.filter(function (goodItem) {
17813
+ return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
17814
+ }) : goodDetails;
17815
+ };
17816
+ var changeGoodHandle = function changeGoodHandle(val) {
17817
+ var _typeMap$type20;
17818
+ var newValue = _objectSpread2({}, value);
17819
+ 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 || [];
17820
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17821
+ };
17822
+ var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
17823
+ var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
17824
+ var newValue = _objectSpread2({}, value);
17825
+ 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;
17826
+ 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) {
17827
+ var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
17828
+ 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) || [];
17829
+ var targetOrder = val && orders.find(function (oItem) {
17830
+ var _typeMap$type24;
17831
+ return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
17832
+ });
17833
+ 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];
17834
+ }
17835
+ 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])) {
17836
+ var _typeMap$type28;
17837
+ 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)] = [];
17838
+ } 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])) {
17839
+ var _typeMap$type30;
17840
+ 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({
17841
+ mode: isStrict,
17842
+ sysOrderNo: val
17843
+ });
17844
+ }
17845
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17846
+ };
17847
+ //显示选择商品按钮
17848
+ 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]);
17849
+ var selectedGoodsChange = useCallback(function (skuList) {
17850
+ var _typeMap$type32, _typeMap$type33, _uniqBy;
17851
+ var newValue = _objectSpread2({}, value);
17852
+ // 原订单商品
17853
+ var originTradeGoodList = getGoodDetails({
17854
+ mode: isStrict
17855
+ }) || [];
17856
+ // 当前选中的所有商品【包含了原订单+商品库】
17857
+ 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)]) || [];
17858
+ 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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17859
+ return skuList.includes(item.uuid);
17860
+ });
17861
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17862
+ }, [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]);
17863
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
17864
+ gutter: 8,
17865
+ wrap: true,
17866
+ 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())
17867
+ }, /*#__PURE__*/React.createElement(Col, {
17868
+ className: "gutter-row",
17869
+ xs: {
17870
+ span: 11
17871
+ },
17872
+ sm: {
17873
+ span: 6
17874
+ }
17875
+ }, /*#__PURE__*/React.createElement(Select, {
17876
+ style: {
17877
+ marginBottom: '8px'
17878
+ },
17879
+ disabled: disabled,
17880
+ allowClear: false,
17881
+ 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)],
17882
+ onChange: function onChange(val) {
17883
+ return changeSystemOrderHandle(val);
17884
+ },
17885
+ 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")
17886
+ }, ((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) {
17887
+ return /*#__PURE__*/React.createElement(Select.Option, {
17888
+ key: item[typeMap$2[type].oIdKey],
17889
+ value: item[typeMap$2[type].oIdKey],
17890
+ label: item[typeMap$2[type].oIdKey]
17891
+ }, item[typeMap$2[type].oIdKey]);
17892
+ }))), /*#__PURE__*/React.createElement(Col, {
17893
+ className: "gutter-row",
17894
+ xs: {
17895
+ span: 11
17896
+ },
17897
+ sm: {
17898
+ span: 6
17899
+ }
17900
+ }, /*#__PURE__*/React.createElement(Cascader, {
17901
+ style: {
17902
+ marginBottom: '8px'
17903
+ },
17904
+ disabled: disabled,
17905
+ allowClear: false,
17906
+ options: reasonList,
17907
+ 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)],
17908
+ onChange: function onChange(val) {
17909
+ return changeTypeHandle(val);
17910
+ }
17911
+ })), (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.createElement(Col, {
17912
+ className: "gutter-row",
17913
+ xs: {
17914
+ span: 11
17915
+ },
17916
+ sm: {
17917
+ span: 6
17918
+ }
17919
+ }, /*#__PURE__*/React.createElement(Input, {
17920
+ 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)],
17921
+ disabled: disabled,
17922
+ readOnly: true
17923
+ }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
17924
+ key: 'reissueGoods'
17925
+ }, other), {}, {
17926
+ type: type,
17927
+ disabled: disabled,
17928
+ canUpdateNumber: showChangeBtn,
17929
+ showChangeBtn: showChangeBtn,
17930
+ 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,
17931
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
17932
+ 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)],
17933
+ onChange: function onChange(val) {
17934
+ return changeGoodHandle(val);
17935
+ },
17936
+ onModeChange: handleModeChange,
17937
+ showModeBtn: false,
17938
+ isStrict: isStrict,
17939
+ tradeGoods: {
17940
+ originDataSource: getGoodDetails({
17941
+ mode: isStrict
17942
+ }),
17943
+ selectedGoodsChange: selectedGoodsChange
17944
+ }
17945
+ })));
17946
+ };
17947
+
16625
17948
  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";
16626
17949
  styleInject(css_248z$a);
16627
17950
 
@@ -17098,12 +18421,12 @@ var Goods$1 = function Goods(props, ref) {
17098
18421
  };
17099
18422
  var index$2 = /*#__PURE__*/forwardRef(Goods$1);
17100
18423
 
17101
- var _excluded$i = ["onChange", "value", "failValue"];
18424
+ var _excluded$j = ["onChange", "value", "failValue"];
17102
18425
  function CommonStatus(props) {
17103
18426
  var onChange = props.onChange,
17104
18427
  value = props.value,
17105
18428
  failValue = props.failValue,
17106
- other = _objectWithoutProperties(props, _excluded$i);
18429
+ other = _objectWithoutProperties(props, _excluded$j);
17107
18430
  var changeHandle = function changeHandle(val) {
17108
18431
  onChange === null || onChange === void 0 ? void 0 : onChange({
17109
18432
  status: val,
@@ -17143,10 +18466,15 @@ var typeInitValueMap$1 = {
17143
18466
  initValue: [{
17144
18467
  billNo: ''
17145
18468
  }]
18469
+ },
18470
+ 5: {
18471
+ initValue: [{
18472
+ billNo: ''
18473
+ }]
17146
18474
  }
17147
18475
  };
17148
18476
  var CommonSystemOrder = function CommonSystemOrder(props) {
17149
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
18477
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5;
17150
18478
  var _props$value = props.value,
17151
18479
  value = _props$value === void 0 ? [] : _props$value,
17152
18480
  onChange = props.onChange,
@@ -17168,7 +18496,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
17168
18496
  maxHeight: '300px',
17169
18497
  overflowY: 'auto'
17170
18498
  }
17171
- }, [1, 2, 3, 4].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
18499
+ }, [1, 2, 3, 4, 5].includes(type) ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
17172
18500
  };
17173
18501
  var changeInputHandle = function changeInputHandle(val, type) {
17174
18502
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
@@ -17225,10 +18553,17 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
17225
18553
  return changeInputHandle(e.target.value, 'billNo');
17226
18554
  },
17227
18555
  value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
18556
+ })) : null, type === 5 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
18557
+ disabled: disabled,
18558
+ placeholder: "\u8BF7\u8F93\u5165\u552E\u540E\u5355id",
18559
+ onChange: function onChange(e) {
18560
+ return changeInputHandle(e.target.value, 'billNo');
18561
+ },
18562
+ value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
17228
18563
  })) : null) : null);
17229
18564
  };
17230
18565
 
17231
- var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
18566
+ var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
17232
18567
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
17233
18568
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
17234
18569
  var _props$value = props.value,
@@ -17238,7 +18573,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
17238
18573
  failValue = props.failValue,
17239
18574
  _props$type = props.type,
17240
18575
  type = _props$type === void 0 ? 1 : _props$type,
17241
- other = _objectWithoutProperties(props, _excluded$j);
18576
+ other = _objectWithoutProperties(props, _excluded$k);
17242
18577
  var _useState = useState(0),
17243
18578
  _useState2 = _slicedToArray(_useState, 2),
17244
18579
  changeIndex = _useState2[0],
@@ -17304,7 +18639,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
17304
18639
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
17305
18640
  };
17306
18641
 
17307
- var _excluded$k = ["value", "onChange", "disabled", "failValue", "type"];
18642
+ var _excluded$l = ["value", "onChange", "disabled", "failValue", "type"];
17308
18643
  var MsgStatus = function MsgStatus(props) {
17309
18644
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
17310
18645
  var _props$value = props.value,
@@ -17314,7 +18649,7 @@ var MsgStatus = function MsgStatus(props) {
17314
18649
  failValue = props.failValue,
17315
18650
  _props$type = props.type,
17316
18651
  type = _props$type === void 0 ? 1 : _props$type,
17317
- other = _objectWithoutProperties(props, _excluded$k);
18652
+ other = _objectWithoutProperties(props, _excluded$l);
17318
18653
  var _useState = useState(0),
17319
18654
  _useState2 = _slicedToArray(_useState, 2),
17320
18655
  changeIndex = _useState2[0],
@@ -17383,8 +18718,8 @@ var CalculationInput = function CalculationInput(props) {
17383
18718
  }, config === null || config === void 0 ? void 0 : config.unit));
17384
18719
  };
17385
18720
 
17386
- var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
17387
- var typeMap$2 = {
18721
+ var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"];
18722
+ var typeMap$3 = {
17388
18723
  BS_E3_REISSUE_GOODS: {
17389
18724
  key: 'bsE3ReissueGoods',
17390
18725
  typeName: 'bsE3ReissueType',
@@ -17401,7 +18736,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17401
18736
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17402
18737
  disabled = props.disabled,
17403
18738
  type = props.type,
17404
- other = _objectWithoutProperties(props, _excluded$l);
18739
+ other = _objectWithoutProperties(props, _excluded$m);
17405
18740
  var getOrderFlag = useRef(false);
17406
18741
  var _useState = useState(false),
17407
18742
  _useState2 = _slicedToArray(_useState, 2),
@@ -17410,10 +18745,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
17410
18745
  // TODO: 在修改场景下手动获取一次订单详情中数据
17411
18746
  useEffect(function () {
17412
18747
  var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
17413
- 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)) {
18748
+ 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)) {
17414
18749
  var _value$typeMap$type$s4, _typeMap$type3;
17415
18750
  getOrderFlag.current = true;
17416
- 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);
18751
+ 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);
17417
18752
  }
17418
18753
  return;
17419
18754
  }, [value]);
@@ -17437,7 +18772,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17437
18772
  return _regeneratorRuntime().wrap(function _callee$(_context) {
17438
18773
  while (1) switch (_context.prev = _context.next) {
17439
18774
  case 0:
17440
- (_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
18775
+ (_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
17441
18776
  var _typeMap$type5, _typeMap$type6;
17442
18777
  var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
17443
18778
  var showOrderInfo = orders.map(function (_ref2) {
@@ -17446,7 +18781,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17446
18781
  billNo: orderSn
17447
18782
  };
17448
18783
  });
17449
- 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]), {}, {
18784
+ 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]), {}, {
17450
18785
  showOrderInfo: showOrderInfo,
17451
18786
  orders: orders
17452
18787
  }))));
@@ -17467,25 +18802,25 @@ var bsE3Reissue = function bsE3Reissue(props) {
17467
18802
  // if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
17468
18803
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
17469
18804
  var newValue = _objectSpread2({}, value);
17470
- newValue[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
18805
+ newValue[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
17471
18806
  if (typeName === '1') {
17472
18807
  var _typeMap$type8;
17473
- newValue[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
18808
+ newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
17474
18809
  mode: isStrict
17475
18810
  });
17476
18811
  } else if (typeName === '2') {
17477
18812
  var _typeMap$type9;
17478
18813
  // 切换到非原单,清空列表
17479
- newValue[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
18814
+ newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
17480
18815
  }
17481
18816
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17482
18817
  };
17483
18818
  var handleModeChange = function handleModeChange(mode) {
17484
18819
  var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
17485
- 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';
18820
+ 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';
17486
18821
  setIsStrict(mode);
17487
18822
  if (!isOriginalOrder) return;
17488
- 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({
18823
+ 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({
17489
18824
  mode: mode
17490
18825
  }))));
17491
18826
  };
@@ -17493,8 +18828,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
17493
18828
  var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
17494
18829
  var mode = _ref3.mode,
17495
18830
  sysOrderNo = _ref3.sysOrderNo;
17496
- 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];
17497
- 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];
18831
+ 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];
18832
+ 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];
17498
18833
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17499
18834
  return order.orderSn === systemOrderNo;
17500
18835
  });
@@ -17507,19 +18842,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
17507
18842
  var changeGoodHandle = function changeGoodHandle(val) {
17508
18843
  var _typeMap$type14;
17509
18844
  var newValue = _objectSpread2({}, value);
17510
- 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 || [];
18845
+ 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 || [];
17511
18846
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17512
18847
  };
17513
18848
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
17514
18849
  var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
17515
18850
  var newValue = _objectSpread2({}, value);
17516
- 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;
17517
- 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])) {
18851
+ 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;
18852
+ 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])) {
17518
18853
  var _typeMap$type17;
17519
- 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)] = [];
17520
- } 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])) {
18854
+ 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)] = [];
18855
+ } 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])) {
17521
18856
  var _typeMap$type19;
17522
- 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({
18857
+ 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({
17523
18858
  mode: isStrict,
17524
18859
  sysOrderNo: val
17525
18860
  });
@@ -17529,8 +18864,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
17529
18864
  //显示选择商品按钮 原单换不显示选择商品
17530
18865
  var showChangeBtn = useMemo(function () {
17531
18866
  var _typeMap$type20;
17532
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
17533
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
18867
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
18868
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
17534
18869
  var selectedGoodsChange = useCallback(function (skuList) {
17535
18870
  var _typeMap$type22, _typeMap$type23, _uniqBy;
17536
18871
  var newValue = _objectSpread2({}, value);
@@ -17539,12 +18874,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
17539
18874
  mode: isStrict
17540
18875
  }) || [];
17541
18876
  // 当前选中的所有商品【包含了原订单+商品库】
17542
- 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)]) || [];
17543
- 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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
18877
+ 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)]) || [];
18878
+ 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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17544
18879
  return skuList.includes(item.uuid);
17545
18880
  });
17546
18881
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17547
- }, [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]);
18882
+ }, [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]);
17548
18883
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
17549
18884
  gutter: 8,
17550
18885
  wrap: true,
@@ -17563,12 +18898,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
17563
18898
  },
17564
18899
  disabled: disabled,
17565
18900
  allowClear: false,
17566
- 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)],
18901
+ 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)],
17567
18902
  onChange: function onChange(val) {
17568
18903
  return changeSystemOrderHandle(val);
17569
18904
  },
17570
18905
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
17571
- }, ((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) {
18906
+ }, ((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) {
17572
18907
  return /*#__PURE__*/React.createElement(Select.Option, {
17573
18908
  key: item.billNo,
17574
18909
  value: item.billNo,
@@ -17589,7 +18924,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17589
18924
  disabled: disabled,
17590
18925
  allowClear: false,
17591
18926
  options: reasonList,
17592
- 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)],
18927
+ 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)],
17593
18928
  onChange: function onChange(val) {
17594
18929
  return changeTypeHandle(val);
17595
18930
  }
@@ -17601,7 +18936,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
17601
18936
  canUpdateNumber: showChangeBtn,
17602
18937
  showChangeBtn: showChangeBtn,
17603
18938
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
17604
- 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)],
18939
+ 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)],
17605
18940
  onChange: function onChange(val) {
17606
18941
  return changeGoodHandle(val);
17607
18942
  },
@@ -17617,9 +18952,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
17617
18952
  })));
17618
18953
  };
17619
18954
 
17620
- var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type"],
18955
+ var _excluded$n = ["value", "onChange", "reasonList", "disabled", "type"],
17621
18956
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
17622
- var typeMap$3 = {
18957
+ var typeMap$4 = {
17623
18958
  GY_REISSUE_GOODS: {
17624
18959
  key: 'gyReissueGoods',
17625
18960
  name: '管易',
@@ -17646,7 +18981,7 @@ var GyReissue = function GyReissue(props) {
17646
18981
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17647
18982
  disabled = props.disabled,
17648
18983
  type = props.type,
17649
- other = _objectWithoutProperties(props, _excluded$m);
18984
+ other = _objectWithoutProperties(props, _excluded$n);
17650
18985
  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) {
17651
18986
  var _order$platformCode;
17652
18987
  return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
@@ -17658,10 +18993,10 @@ var GyReissue = function GyReissue(props) {
17658
18993
  setIsStrict = _useState2[1];
17659
18994
  useEffect(function () {
17660
18995
  var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
17661
- 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)) {
18996
+ 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)) {
17662
18997
  var _value$typeMap$type$s4, _typeMap$type3;
17663
18998
  getOrderFlag.current = true;
17664
- 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);
18999
+ 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);
17665
19000
  }
17666
19001
  return;
17667
19002
  }, [value]);
@@ -17671,7 +19006,7 @@ var GyReissue = function GyReissue(props) {
17671
19006
  return _regeneratorRuntime().wrap(function _callee$(_context) {
17672
19007
  while (1) switch (_context.prev = _context.next) {
17673
19008
  case 0:
17674
- (_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
19009
+ (_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
17675
19010
  var _typeMap$type5, _typeMap$type6;
17676
19011
  var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
17677
19012
  var showOrderInfo = orders.map(function (_ref2) {
@@ -17694,7 +19029,7 @@ var GyReissue = function GyReissue(props) {
17694
19029
  shopCode: shopCode
17695
19030
  });
17696
19031
  });
17697
- 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]), {}, {
19032
+ 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]), {}, {
17698
19033
  showOrderInfo: showOrderInfo,
17699
19034
  orders: orders
17700
19035
  }))));
@@ -17712,28 +19047,28 @@ var GyReissue = function GyReissue(props) {
17712
19047
  var changeTypeHandle = function changeTypeHandle(val) {
17713
19048
  var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
17714
19049
  var typeName = val === null || val === void 0 ? void 0 : val[0];
17715
- 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;
19050
+ 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;
17716
19051
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
17717
19052
  var newValue = _objectSpread2({}, value);
17718
- newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
19053
+ newValue[(_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
17719
19054
  if (typeName === '1') {
17720
19055
  var _typeMap$type9;
17721
- newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
19056
+ newValue[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
17722
19057
  mode: isStrict
17723
19058
  });
17724
19059
  } else if (typeName === '2') {
17725
19060
  var _typeMap$type10;
17726
19061
  // 切换到非原单,清空列表
17727
- newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
19062
+ newValue[(_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
17728
19063
  }
17729
19064
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17730
19065
  };
17731
19066
  var handleModeChange = function handleModeChange(mode) {
17732
19067
  var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
17733
- 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';
19068
+ 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';
17734
19069
  setIsStrict(mode);
17735
19070
  if (!isOriginalOrder) return;
17736
- 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({
19071
+ 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({
17737
19072
  mode: mode
17738
19073
  }))));
17739
19074
  };
@@ -17741,8 +19076,8 @@ var GyReissue = function GyReissue(props) {
17741
19076
  var _typeMap$type13, _typeMap$type14, _order$details;
17742
19077
  var mode = _ref3.mode,
17743
19078
  sysOrderNo = _ref3.sysOrderNo;
17744
- 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];
17745
- 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];
19079
+ 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];
19080
+ 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];
17746
19081
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17747
19082
  return order.code === systemOrderNo;
17748
19083
  });
@@ -17755,10 +19090,10 @@ var GyReissue = function GyReissue(props) {
17755
19090
  var changeGoodHandle = function changeGoodHandle(val) {
17756
19091
  var _typeMap$type15;
17757
19092
  var newValue = _objectSpread2({}, value);
17758
- 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) {
19093
+ 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) {
17759
19094
  var _typeMap$type16, _typeMap$type17;
17760
- 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;
17761
- 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;
19095
+ 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;
19096
+ 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;
17762
19097
  return item;
17763
19098
  });
17764
19099
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -17766,13 +19101,13 @@ var GyReissue = function GyReissue(props) {
17766
19101
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
17767
19102
  var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
17768
19103
  var newValue = _objectSpread2({}, value);
17769
- 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;
17770
- 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])) {
19104
+ 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;
19105
+ 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])) {
17771
19106
  var _typeMap$type20;
17772
- 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)] = [];
17773
- } 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])) {
19107
+ 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)] = [];
19108
+ } 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])) {
17774
19109
  var _typeMap$type22;
17775
- 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({
19110
+ 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({
17776
19111
  mode: isStrict,
17777
19112
  sysOrderNo: val
17778
19113
  });
@@ -17787,18 +19122,18 @@ var GyReissue = function GyReissue(props) {
17787
19122
  mode: isStrict
17788
19123
  }) || [];
17789
19124
  // 当前选中的所有商品【包含了原订单+商品库】
17790
- 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)]) || [];
17791
- 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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
19125
+ 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)]) || [];
19126
+ 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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17792
19127
  return skuList.includes(item.uuid);
17793
19128
  });
17794
- 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)]);
19129
+ 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)]);
17795
19130
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17796
- }, [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]);
19131
+ }, [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]);
17797
19132
  //显示选择商品按钮 原单换不显示选择商品
17798
19133
  var showChangeBtn = useMemo(function () {
17799
19134
  var _typeMap$type27;
17800
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
17801
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
19135
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
19136
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
17802
19137
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
17803
19138
  gutter: 8,
17804
19139
  wrap: true
@@ -17816,12 +19151,12 @@ var GyReissue = function GyReissue(props) {
17816
19151
  },
17817
19152
  disabled: disabled,
17818
19153
  allowClear: false,
17819
- 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)],
19154
+ 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)],
17820
19155
  onChange: function onChange(val) {
17821
19156
  return changeSystemOrderHandle(val);
17822
19157
  },
17823
19158
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
17824
- }, ((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) {
19159
+ }, ((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) {
17825
19160
  return /*#__PURE__*/React.createElement(Select.Option, {
17826
19161
  key: item.billNo,
17827
19162
  value: item.billNo,
@@ -17842,7 +19177,7 @@ var GyReissue = function GyReissue(props) {
17842
19177
  disabled: disabled,
17843
19178
  allowClear: false,
17844
19179
  options: reasonList,
17845
- 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)],
19180
+ 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)],
17846
19181
  onChange: function onChange(val) {
17847
19182
  return changeTypeHandle(val);
17848
19183
  }
@@ -17854,7 +19189,7 @@ var GyReissue = function GyReissue(props) {
17854
19189
  canUpdateNumber: showChangeBtn,
17855
19190
  showChangeBtn: showChangeBtn,
17856
19191
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
17857
- 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)],
19192
+ 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)],
17858
19193
  onChange: function onChange(val) {
17859
19194
  return changeGoodHandle(val);
17860
19195
  },
@@ -17870,4 +19205,4 @@ var GyReissue = function GyReissue(props) {
17870
19205
  })));
17871
19206
  };
17872
19207
 
17873
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };
19208
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, getColumns$5 as getJstColumns };