@kmkf-fe-packages/basic-components 1.19.7 → 1.19.8-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
@@ -4,7 +4,7 @@ import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } fro
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
6
  import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, WdtSendData, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
7
- import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject } from 'lodash';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
10
10
  import pubsub from 'pubsub-js';
@@ -12093,7 +12093,7 @@ var getTableData$1 = function getTableData(_ref, formData) {
12093
12093
  data: _objectSpread2({
12094
12094
  pageSize: pageSize,
12095
12095
  pageNo: current,
12096
- platform: 'WDT_ERP'
12096
+ platform: 'BS_E3_ERP'
12097
12097
  }, data)
12098
12098
  }).then(function (res) {
12099
12099
  var _res$data = res.data,
@@ -12124,125 +12124,85 @@ var columns$2 = [{
12124
12124
  },
12125
12125
  width: 100
12126
12126
  }, {
12127
- dataIndex: 'sku',
12127
+ dataIndex: 'specNo',
12128
12128
  title: "SKU",
12129
12129
  ellipsis: true,
12130
- width: 70
12130
+ width: 150
12131
12131
  }, {
12132
- dataIndex: 'skuId',
12132
+ dataIndex: 'specId',
12133
12133
  title: "SKU ID",
12134
12134
  ellipsis: true,
12135
- width: 70
12135
+ width: 150
12136
12136
  }, {
12137
- dataIndex: 'goodsName',
12137
+ dataIndex: 'goodName',
12138
12138
  title: "\u5546\u54C1\u540D\u79F0",
12139
12139
  ellipsis: true,
12140
- width: 70
12140
+ width: 150
12141
12141
  }, {
12142
- dataIndex: 'goodsShortName',
12142
+ dataIndex: 'goodShortName',
12143
12143
  title: "\u5546\u54C1\u7B80\u79F0",
12144
12144
  ellipsis: true,
12145
- width: 70
12145
+ width: 150
12146
12146
  }, {
12147
- dataIndex: 'picPath',
12147
+ dataIndex: 'goodPicUrl',
12148
12148
  title: "\u5546\u54C1\u56FE\u7247",
12149
12149
  ellipsis: true,
12150
12150
  width: 100,
12151
12151
  render: function render(picUrl) {
12152
12152
  return /*#__PURE__*/React.createElement("img", {
12153
12153
  style: {
12154
- width: '60px',
12155
- height: '60px',
12154
+ width: '40px',
12155
+ height: '40px',
12156
12156
  objectFit: 'contain'
12157
12157
  },
12158
12158
  src: picUrl
12159
12159
  });
12160
12160
  }
12161
12161
  }, {
12162
- dataIndex: 'goodsSn',
12162
+ dataIndex: 'goodNo',
12163
12163
  title: "\u8D27\u53F7",
12164
12164
  ellipsis: true,
12165
- width: 70
12165
+ width: 150
12166
12166
  }, {
12167
- dataIndex: 'goodsId',
12167
+ dataIndex: 'goodId',
12168
12168
  title: "\u8D27\u53F7ID",
12169
12169
  ellipsis: true,
12170
- width: 70
12170
+ width: 150
12171
12171
  }, {
12172
12172
  dataIndex: 'colorName',
12173
12173
  title: "\u989C\u8272\u540D\u79F0",
12174
12174
  ellipsis: true,
12175
- width: 70
12175
+ width: 100
12176
12176
  }, {
12177
12177
  dataIndex: 'colorCode',
12178
12178
  title: "\u989C\u8272\u4EE3\u7801",
12179
12179
  ellipsis: true,
12180
- width: 70
12180
+ width: 150
12181
12181
  }, {
12182
12182
  dataIndex: 'sizeName',
12183
12183
  title: "\u5C3A\u7801\u540D\u79F0",
12184
12184
  ellipsis: true,
12185
- width: 70
12185
+ width: 100
12186
12186
  }, {
12187
12187
  dataIndex: 'sizeCode',
12188
12188
  title: "\u5C3A\u7801\u4EE3\u7801",
12189
12189
  ellipsis: true,
12190
- width: 70
12190
+ width: 150
12191
12191
  }, {
12192
12192
  dataIndex: 'brandName',
12193
12193
  title: "\u54C1\u724C\u540D\u79F0",
12194
12194
  ellipsis: true,
12195
- width: 70
12195
+ width: 150
12196
12196
  }, {
12197
- dataIndex: 'goodsNumber',
12198
- title: "\u5546\u54C1\u6570\u91CF",
12199
- ellipsis: true,
12200
- width: 70
12201
- }, {
12202
- dataIndex: 'goodsPrice',
12203
- title: "\u5546\u54C1\u5355\u4EF7",
12204
- ellipsis: true,
12205
- width: 70
12206
- }, {
12207
- dataIndex: 'shopPrice',
12208
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12209
- ellipsis: true,
12210
- width: 70
12211
- }, {
12212
- dataIndex: 'sharePrice',
12213
- title: "\u5206\u644A\u4EF7",
12214
- ellipsis: true,
12215
- width: 70
12216
- }, {
12217
- dataIndex: 'sharePayment',
12218
- title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12219
- ellipsis: true,
12220
- width: 70
12221
- }, {
12222
- dataIndex: 'payment',
12223
- title: "\u5B9E\u4ED8\u91D1\u989D",
12224
- ellipsis: true,
12225
- width: 70
12226
- }, {
12227
- dataIndex: 'tcSku',
12228
- title: "\u5957\u9910SKU",
12229
- ellipsis: true,
12230
- width: 70
12231
- }, {
12232
- dataIndex: 'tcGoodsNumber',
12233
- title: "\u5957\u9910\u5957\u6570",
12234
- ellipsis: true,
12235
- width: 70
12236
- }, {
12237
- dataIndex: 'taoCanSingleSl',
12238
- title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12197
+ dataIndex: 'marketPrice',
12198
+ title: "\u5E02\u573A\u4EF7",
12239
12199
  ellipsis: true,
12240
- width: 70
12200
+ width: 100
12241
12201
  }, {
12242
- dataIndex: 'isGift',
12243
- title: "\u662F\u5426\u8D60\u54C1",
12202
+ dataIndex: 'retailPrice',
12203
+ title: "\u552E\u4EF7",
12244
12204
  ellipsis: true,
12245
- width: 70
12205
+ width: 100
12246
12206
  }];
12247
12207
  var GoodList$1 = function GoodList(props, ref) {
12248
12208
  var _useState = useState([]),
@@ -12276,7 +12236,7 @@ var GoodList$1 = function GoodList(props, ref) {
12276
12236
  layout: "inline",
12277
12237
  form: form
12278
12238
  }, /*#__PURE__*/React.createElement(Form.Item, {
12279
- name: "goodsSn",
12239
+ name: "goodNo",
12280
12240
  style: {
12281
12241
  marginBottom: '12px'
12282
12242
  }
@@ -12287,7 +12247,7 @@ var GoodList$1 = function GoodList(props, ref) {
12287
12247
  width: 150
12288
12248
  }
12289
12249
  })), /*#__PURE__*/React.createElement(Form.Item, {
12290
- name: "goodsName",
12250
+ name: "goodName",
12291
12251
  style: {
12292
12252
  marginBottom: '12px'
12293
12253
  }
@@ -12298,7 +12258,7 @@ var GoodList$1 = function GoodList(props, ref) {
12298
12258
  width: 150
12299
12259
  }
12300
12260
  })), /*#__PURE__*/React.createElement(Form.Item, {
12301
- name: "sku",
12261
+ name: "skuCode",
12302
12262
  style: {
12303
12263
  marginBottom: '12px'
12304
12264
  }
@@ -12415,7 +12375,7 @@ var GoodList$1 = function GoodList(props, ref) {
12415
12375
  }
12416
12376
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12417
12377
  rowSelection: rowSelection,
12418
- rowKey: "goodsId",
12378
+ rowKey: "specNo",
12419
12379
  columns: columns$2,
12420
12380
  scroll: {
12421
12381
  x: '100%',
@@ -12475,15 +12435,191 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12475
12435
  };
12476
12436
  var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12477
12437
 
12478
- // interface GoodsItem {
12479
- // title: string;
12480
- // pic: string;
12481
- // platform: string;
12482
- // skuId: string;
12483
- // styleId: string;
12484
- // }
12438
+ var columns$3 = [{
12439
+ dataIndex: 'sku',
12440
+ title: "SKU",
12441
+ width: 150
12442
+ }, {
12443
+ dataIndex: 'skuId',
12444
+ title: "SKU ID",
12445
+ width: 150
12446
+ }, {
12447
+ dataIndex: 'goodsName',
12448
+ title: "\u5546\u54C1\u540D\u79F0",
12449
+ width: 150
12450
+ }, {
12451
+ dataIndex: 'goodsShortName',
12452
+ title: "\u5546\u54C1\u7B80\u4ECB",
12453
+ width: 150
12454
+ }, {
12455
+ dataIndex: 'picPath',
12456
+ title: "\u5546\u54C1\u56FE\u7247",
12457
+ width: 150
12458
+ }, {
12459
+ dataIndex: 'goodsSn',
12460
+ title: "\u8D27\u53F7",
12461
+ width: 150
12462
+ }, {
12463
+ dataIndex: 'goodsId',
12464
+ title: "\u8D27\u53F7ID",
12465
+ width: 150
12466
+ }, {
12467
+ dataIndex: 'colorName',
12468
+ title: "\u989C\u8272\u540D\u79F0",
12469
+ width: 150
12470
+ }, {
12471
+ dataIndex: 'colorCode',
12472
+ title: "\u989C\u8272\u4EE3\u7801",
12473
+ width: 150
12474
+ }, {
12475
+ dataIndex: 'sizeName',
12476
+ title: "\u5C3A\u5BF8\u540D\u79F0",
12477
+ width: 150
12478
+ }, {
12479
+ dataIndex: 'sizeCode',
12480
+ title: "\u5C3A\u5BF8\u4EE3\u7801",
12481
+ width: 150
12482
+ }, {
12483
+ dataIndex: 'brandName',
12484
+ title: "\u54C1\u724C\u540D\u79F0",
12485
+ width: 150
12486
+ }, {
12487
+ dataIndex: 'shopPrice',
12488
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12489
+ width: 150
12490
+ }, {
12491
+ dataIndex: 'goodsNumber',
12492
+ title: "\u5546\u54C1\u6570\u91CF",
12493
+ width: 150
12494
+ }, {
12495
+ dataIndex: 'goodsPrice',
12496
+ title: "\u5546\u54C1\u5355\u4EF7",
12497
+ width: 150
12498
+ }, {
12499
+ dataIndex: 'isGift',
12500
+ title: "\u662F\u5426\u8D60\u54C1",
12501
+ width: 150
12502
+ }];
12503
+ var renderFieldMap = {
12504
+ goodsNumber: function goodsNumber(_ref) {
12505
+ var disabled = _ref.disabled,
12506
+ updateHandle = _ref.updateHandle;
12507
+ return function (val, record, index) {
12508
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12509
+ style: {
12510
+ width: 70
12511
+ },
12512
+ value: val,
12513
+ min: 1,
12514
+ precision: 0,
12515
+ onChange: function onChange(num) {
12516
+ return updateHandle(num, index, 'goodsNumber');
12517
+ }
12518
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12519
+ };
12520
+ },
12521
+ goodsPrice: function goodsPrice(_ref2) {
12522
+ var disabled = _ref2.disabled,
12523
+ updateHandle = _ref2.updateHandle;
12524
+ return function (val, record, index) {
12525
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12526
+ style: {
12527
+ width: 70
12528
+ },
12529
+ value: val,
12530
+ min: 0,
12531
+ onChange: function onChange(value) {
12532
+ return updateHandle(value, index, 'goodsPrice');
12533
+ }
12534
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12535
+ };
12536
+ },
12537
+ isGift: function isGift(_ref3) {
12538
+ var disabled = _ref3.disabled,
12539
+ updateHandle = _ref3.updateHandle;
12540
+ return function (val, record, index) {
12541
+ var options = [{
12542
+ label: '是',
12543
+ value: '赠品'
12544
+ }, {
12545
+ label: '否',
12546
+ value: '非赠品'
12547
+ }];
12548
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
12549
+ style: {
12550
+ width: 70
12551
+ },
12552
+ options: options,
12553
+ value: val,
12554
+ onChange: function onChange(value) {
12555
+ return updateHandle(value, index, 'isGift');
12556
+ }
12557
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12558
+ };
12559
+ }
12560
+ };
12561
+ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
12562
+ var disabled = _ref4.disabled,
12563
+ updateHandle = _ref4.updateHandle,
12564
+ operate = _ref4.operate;
12565
+ return columns$3.map(function (item) {
12566
+ var newItem = _objectSpread2({
12567
+ align: 'center',
12568
+ ellipsis: true
12569
+ }, item);
12570
+ if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12571
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
12572
+ render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12573
+ disabled: disabled,
12574
+ updateHandle: updateHandle
12575
+ })
12576
+ });
12577
+ }
12578
+ return newItem;
12579
+ });
12580
+ };
12581
+
12582
+ var SelectTradeGoods = function SelectTradeGoods(_ref) {
12583
+ var columns = _ref.columns,
12584
+ dataSource = _ref.dataSource,
12585
+ selectedRowKeys = _ref.selectedRowKeys,
12586
+ onChangeSelectedKeys = _ref.onChangeSelectedKeys;
12587
+ var _useState = useState(false),
12588
+ _useState2 = _slicedToArray(_useState, 2),
12589
+ tradeGoodsVisible = _useState2[0],
12590
+ setTradeGoodsVisible = _useState2[1];
12591
+ var openModal = function openModal() {
12592
+ return setTradeGoodsVisible(true);
12593
+ };
12594
+ var closeModal = function closeModal() {
12595
+ return setTradeGoodsVisible(false);
12596
+ };
12597
+ var rowSelection = {
12598
+ selectedRowKeys: selectedRowKeys,
12599
+ onChange: onChangeSelectedKeys
12600
+ };
12601
+ console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
12602
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
12603
+ type: "link",
12604
+ onClick: openModal
12605
+ }, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React.createElement(Modal, {
12606
+ title: "\u8BA2\u5355\u5546\u54C1",
12607
+ visible: tradeGoodsVisible,
12608
+ footer: null,
12609
+ onCancel: closeModal
12610
+ }, /*#__PURE__*/React.createElement(Table, {
12611
+ rowKey: "sku",
12612
+ rowSelection: rowSelection,
12613
+ columns: columns,
12614
+ dataSource: dataSource,
12615
+ pagination: false,
12616
+ scroll: {
12617
+ x: 500,
12618
+ y: 500
12619
+ }
12620
+ }), /*#__PURE__*/React.createElement("span", null, "\u4EE5\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
12621
+ };
12485
12622
  var GoodItem$1 = function GoodItem(props) {
12486
- var _ref;
12487
12623
  var _props$value = props.value,
12488
12624
  value = _props$value === void 0 ? [] : _props$value,
12489
12625
  type = props.type,
@@ -12517,8 +12653,10 @@ var GoodItem$1 = function GoodItem(props) {
12517
12653
  companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
12518
12654
  onSelect = props.onSelect,
12519
12655
  onDelete = props.onDelete,
12520
- onModeChange = props.onModeChange;
12656
+ onModeChange = props.onModeChange,
12657
+ tradeGoods = props.tradeGoods;
12521
12658
  var refModal = useRef();
12659
+ console.debug('表格数据', value);
12522
12660
  var handleDelete = function handleDelete(record, index) {
12523
12661
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
12524
12662
  var newList = _toConsumableArray(value).filter(function (item, i) {
@@ -12526,13 +12664,19 @@ var GoodItem$1 = function GoodItem(props) {
12526
12664
  });
12527
12665
  onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
12528
12666
  };
12529
- var _useState = useState([]),
12530
- _useState2 = _slicedToArray(_useState, 2),
12531
- selectedRowKeys = _useState2[0],
12532
- setSelectedRowKeys = _useState2[1];
12667
+ var _useState3 = useState([]),
12668
+ _useState4 = _slicedToArray(_useState3, 2),
12669
+ selectedRowKeys = _useState4[0],
12670
+ setSelectedRowKeys = _useState4[1];
12533
12671
  useEffect(function () {
12534
12672
  setSelectedRowKeys([]);
12535
12673
  }, [tableSelect, selectType]);
12674
+ // TODO: 商品订单中以选中商品
12675
+ var selectedGoods = useMemo(function () {
12676
+ return value === null || value === void 0 ? void 0 : value.map(function (v) {
12677
+ return v.sku;
12678
+ });
12679
+ }, [value]);
12536
12680
  var updateHandle = function updateHandle(val, index, columnType) {
12537
12681
  if (value === null || value === void 0 ? void 0 : value.length) {
12538
12682
  value[index][columnType] = val;
@@ -12566,6 +12710,7 @@ var GoodItem$1 = function GoodItem(props) {
12566
12710
  };
12567
12711
  var COLUMNS_MAP = function COLUMNS_MAP() {
12568
12712
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12713
+ var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
12569
12714
  return function (type) {
12570
12715
  var columns = [];
12571
12716
  switch (type) {
@@ -13063,6 +13208,15 @@ var GoodItem$1 = function GoodItem(props) {
13063
13208
  }];
13064
13209
  }
13065
13210
  break;
13211
+ case 'BS_E3_REISSUE_GOODS':
13212
+ {
13213
+ columns = getBsE3ReissueGoodColumns({
13214
+ disabled: disabled,
13215
+ updateHandle: updateHandle,
13216
+ operate: operate
13217
+ });
13218
+ }
13219
+ break;
13066
13220
  default:
13067
13221
  columns = [{
13068
13222
  dataIndex: 'mark',
@@ -13202,6 +13356,19 @@ var GoodItem$1 = function GoodItem(props) {
13202
13356
  }
13203
13357
  return columnList;
13204
13358
  }, [showHeader, value, disabled]);
13359
+ var orderColumns = useMemo(function () {
13360
+ var columns = COLUMNS_MAP('', false)(type);
13361
+ return [{
13362
+ dataIndex: '',
13363
+ title: '序号',
13364
+ align: 'center',
13365
+ ellipsis: true,
13366
+ width: 50,
13367
+ render: function render(val, record, index) {
13368
+ return /*#__PURE__*/React.createElement("span", null, index + 1);
13369
+ }
13370
+ }].concat(_toConsumableArray(columns));
13371
+ }, []);
13205
13372
  var onSubmit = function onSubmit(list) {
13206
13373
  var newList = [];
13207
13374
  if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
@@ -13220,12 +13387,36 @@ var GoodItem$1 = function GoodItem(props) {
13220
13387
  });
13221
13388
  } else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
13222
13389
  newList = list.map(function (item) {
13223
- item.uuid = uuid();
13224
- item.canDelete = true;
13225
- item.goodsNumber = 1;
13226
- item.goodsPrice = 0;
13227
- item.canUpdateNumber = canUpdateNumber;
13228
- return item;
13390
+ var specNo = item.specNo,
13391
+ specId = item.specId,
13392
+ goodName = item.goodName,
13393
+ goodShortName = item.goodShortName,
13394
+ goodPicUrl = item.goodPicUrl,
13395
+ goodNo = item.goodNo,
13396
+ goodId = item.goodId,
13397
+ retailPrice = item.retailPrice;
13398
+ return _objectSpread2(_objectSpread2({}, item), {}, {
13399
+ sku: specNo,
13400
+ skuId: specId,
13401
+ goodsName: goodName,
13402
+ goodsShortName: goodShortName,
13403
+ picPath: goodPicUrl,
13404
+ goodsSn: goodNo,
13405
+ goodsId: goodId,
13406
+ goodsPrice: retailPrice,
13407
+ shopPrice: retailPrice,
13408
+ sharePayment: '',
13409
+ sharePrice: '',
13410
+ payment: '',
13411
+ tcSku: '',
13412
+ tcGoodsNumber: '',
13413
+ taoCanSingleSl: '',
13414
+ isGift: '',
13415
+ uuid: uuid(),
13416
+ canDelete: true,
13417
+ goodsNumber: 1,
13418
+ canUpdateNumber: canUpdateNumber
13419
+ });
13229
13420
  });
13230
13421
  } else {
13231
13422
  newList = list.map(function (item) {
@@ -13286,7 +13477,12 @@ var GoodItem$1 = function GoodItem(props) {
13286
13477
  }, showModeBtn && /*#__PURE__*/React.createElement(Checkbox, {
13287
13478
  checked: isStrict,
13288
13479
  onChange: handleCheckboxChange
13289
- }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !((_ref = ['BS_E3_GOODS']) === null || _ref === void 0 ? void 0 : _ref.includes(type)) && /*#__PURE__*/React.createElement(Button, {
13480
+ }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && /*#__PURE__*/React.createElement(SelectTradeGoods, {
13481
+ columns: orderColumns,
13482
+ dataSource: tradeGoods.originDataSource,
13483
+ selectedRowKeys: selectedGoods,
13484
+ onChangeSelectedKeys: tradeGoods.selectedGoodsChange
13485
+ }), /*#__PURE__*/React.createElement(Button, {
13290
13486
  type: "link",
13291
13487
  onClick: handleChangeGoods
13292
13488
  }, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
@@ -14859,11 +15055,12 @@ var typeMap$1 = {
14859
15055
  formatDefaultField: {
14860
15056
  money: 'orderPrice',
14861
15057
  share: 'sharePrice'
14862
- }
15058
+ },
15059
+ getOrderList: wdtUtils.getWdtOrderListSingleton
14863
15060
  }
14864
15061
  };
14865
15062
  var wdtReissue = function wdtReissue(props) {
14866
- var _value$wdtSystemOrder, _typeMap$type7, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
15063
+ var _value$wdtSystemOrder, _typeMap$type7, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
14867
15064
  var value = props.value,
14868
15065
  onChange = props.onChange,
14869
15066
  _props$reasonList = props.reasonList,
@@ -14885,7 +15082,7 @@ var wdtReissue = function wdtReissue(props) {
14885
15082
  if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$1[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$1[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)) {
14886
15083
  var _value$typeMap$type$s4, _typeMap$type3;
14887
15084
  getOrderFlag.current = true;
14888
- getWdtOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$1[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);
15085
+ getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$1[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);
14889
15086
  }
14890
15087
  return;
14891
15088
  }, [value]);
@@ -14903,13 +15100,30 @@ var wdtReissue = function wdtReissue(props) {
14903
15100
  }
14904
15101
  return;
14905
15102
  }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
14906
- var getWdtOrderList = /*#__PURE__*/function () {
15103
+ // const getWdtOrderList = async (orderNo: string) => {
15104
+ // wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
15105
+ // const orders = data?.trades || [];
15106
+ // const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
15107
+ // return { billNo, billType, billTag }
15108
+ // });
15109
+ // onChange({
15110
+ // ...value,
15111
+ // [typeMap[type]?.systemOrder]: {
15112
+ // ...value[typeMap[type]?.systemOrder],
15113
+ // showOrderInfo,
15114
+ // orders,
15115
+ // },
15116
+ // });
15117
+ // })
15118
+ // };
15119
+ var getOrderList = /*#__PURE__*/function () {
14907
15120
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
15121
+ var _typeMap$type8;
14908
15122
  return _regeneratorRuntime().wrap(function _callee$(_context) {
14909
15123
  while (1) switch (_context.prev = _context.next) {
14910
15124
  case 0:
14911
- wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
14912
- var _typeMap$type8, _typeMap$type9;
15125
+ (_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.getOrderList(orderNo).then(function (data) {
15126
+ var _typeMap$type9, _typeMap$type10;
14913
15127
  var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
14914
15128
  var showOrderInfo = orders.map(function (_ref2) {
14915
15129
  var billNo = _ref2.billNo,
@@ -14921,7 +15135,7 @@ var wdtReissue = function wdtReissue(props) {
14921
15135
  billTag: billTag
14922
15136
  };
14923
15137
  });
14924
- onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder]), {}, {
15138
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.systemOrder]), {}, {
14925
15139
  showOrderInfo: showOrderInfo,
14926
15140
  orders: orders
14927
15141
  }))));
@@ -14932,43 +15146,43 @@ var wdtReissue = function wdtReissue(props) {
14932
15146
  }
14933
15147
  }, _callee);
14934
15148
  }));
14935
- return function getWdtOrderList(_x) {
15149
+ return function getOrderList(_x) {
14936
15150
  return _ref.apply(this, arguments);
14937
15151
  };
14938
15152
  }();
14939
15153
  var changeTypeHandle = function changeTypeHandle(val) {
14940
- var _value$typeMap$type$t2, _typeMap$type10, _typeMap$type11;
15154
+ var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
14941
15155
  var typeName = val === null || val === void 0 ? void 0 : val[0];
14942
- if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) return;
15156
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$1[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])) return;
14943
15157
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
14944
15158
  var newValue = _objectSpread2({}, value);
14945
- newValue[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
15159
+ newValue[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
14946
15160
  if (typeName === '1') {
14947
- var _typeMap$type12;
14948
- newValue[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
15161
+ var _typeMap$type13;
15162
+ newValue[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
14949
15163
  mode: isStrict
14950
15164
  });
14951
15165
  } else if (typeName === '2') {
14952
- var _typeMap$type13;
15166
+ var _typeMap$type14;
14953
15167
  // 切换到非原单,清空列表
14954
- newValue[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
15168
+ newValue[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
14955
15169
  }
14956
15170
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14957
15171
  };
14958
15172
  var handleModeChange = function handleModeChange(mode) {
14959
- var _value$typeMap$type$t3, _typeMap$type14, _typeMap$type15;
14960
- var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]) === '1';
15173
+ var _value$typeMap$type$t3, _typeMap$type15, _typeMap$type16;
15174
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]) === '1';
14961
15175
  setIsStrict(mode);
14962
15176
  if (!isOriginalOrder) return;
14963
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key, getGoodDetails({
15177
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key, getGoodDetails({
14964
15178
  mode: mode
14965
15179
  }))));
14966
15180
  };
14967
15181
  var getGoodDetails = function getGoodDetails(_ref3) {
14968
- var _typeMap$type16, _typeMap$type17, _order$goodDetails;
15182
+ var _typeMap$type17, _typeMap$type18, _order$goodDetails;
14969
15183
  var mode = _ref3.mode;
14970
- var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrder];
14971
- var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo];
15184
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
15185
+ var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo];
14972
15186
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
14973
15187
  return order.tradeNo === systemOrderNo;
14974
15188
  });
@@ -14979,31 +15193,31 @@ var wdtReissue = function wdtReissue(props) {
14979
15193
  }) : goodDetails;
14980
15194
  };
14981
15195
  var changeGoodHandle = function changeGoodHandle(val) {
14982
- var _typeMap$type18;
15196
+ var _typeMap$type19;
14983
15197
  var newValue = _objectSpread2({}, value);
14984
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key)] = (val || []).map(function (item) {
14985
- var _typeMap$type19, _typeMap$type20;
14986
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.formatDefaultField.money)] = 0;
14987
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.share)] = 0;
15198
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = (val || []).map(function (item) {
15199
+ var _typeMap$type20, _typeMap$type21;
15200
+ item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.money)] = 0;
15201
+ item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.share)] = 0;
14988
15202
  return item;
14989
15203
  });
14990
15204
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14991
15205
  };
14992
15206
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
14993
- var _typeMap$type21, _value$typeMap$type$t4, _typeMap$type22;
15207
+ var _typeMap$type22, _value$typeMap$type$t4, _typeMap$type23;
14994
15208
  var newValue = _objectSpread2({}, value);
14995
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo)] = val;
14996
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
14997
- var _typeMap$type23;
14998
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = [];
15209
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
15210
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
15211
+ var _typeMap$type24;
15212
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = [];
14999
15213
  }
15000
15214
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15001
15215
  };
15002
15216
  //显示选择商品按钮 原单换不显示选择商品
15003
15217
  var showChangeBtn = useMemo(function () {
15004
- var _typeMap$type24;
15005
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
15006
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
15218
+ var _typeMap$type25;
15219
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
15220
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
15007
15221
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
15008
15222
  gutter: 8,
15009
15223
  wrap: true
@@ -15021,12 +15235,12 @@ var wdtReissue = function wdtReissue(props) {
15021
15235
  },
15022
15236
  disabled: disabled,
15023
15237
  allowClear: false,
15024
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
15238
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo)],
15025
15239
  onChange: function onChange(val) {
15026
15240
  return changeSystemOrderHandle(val);
15027
15241
  },
15028
15242
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
15029
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
15243
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
15030
15244
  return /*#__PURE__*/React.createElement(Select.Option, {
15031
15245
  key: item.billNo,
15032
15246
  value: item.billNo,
@@ -15047,7 +15261,7 @@ var wdtReissue = function wdtReissue(props) {
15047
15261
  disabled: disabled,
15048
15262
  allowClear: false,
15049
15263
  options: reasonList,
15050
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
15264
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName)],
15051
15265
  onChange: function onChange(val) {
15052
15266
  return changeTypeHandle(val);
15053
15267
  }
@@ -15059,7 +15273,7 @@ var wdtReissue = function wdtReissue(props) {
15059
15273
  canUpdateNumber: showChangeBtn,
15060
15274
  showChangeBtn: showChangeBtn,
15061
15275
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
15062
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
15276
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
15063
15277
  onChange: function onChange(val) {
15064
15278
  return changeGoodHandle(val);
15065
15279
  },
@@ -15839,4 +16053,230 @@ var CalculationInput = function CalculationInput(props) {
15839
16053
  }, config === null || config === void 0 ? void 0 : config.unit));
15840
16054
  };
15841
16055
 
15842
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
16056
+ var _excluded$k = ["value", "onChange", "reasonList", "disabled", "type"];
16057
+ var typeMap$2 = {
16058
+ BS_E3_REISSUE_GOODS: {
16059
+ key: 'bsE3ReissueGoods',
16060
+ typeName: 'bsE3ReissueType',
16061
+ systemOrder: 'bsE3SystemOrder',
16062
+ systemOrderNo: 'bsE3SystemOrderNo',
16063
+ getOrderList: bsE3Utils.getBsE3OrderListSingleton
16064
+ }
16065
+ };
16066
+ var bsE3Reissue = function bsE3Reissue(props) {
16067
+ var _typeMap$type7, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
16068
+ var value = props.value,
16069
+ onChange = props.onChange,
16070
+ _props$reasonList = props.reasonList,
16071
+ reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
16072
+ disabled = props.disabled,
16073
+ type = props.type,
16074
+ other = _objectWithoutProperties(props, _excluded$k);
16075
+ var getOrderFlag = useRef(false);
16076
+ var _useState = useState(false),
16077
+ _useState2 = _slicedToArray(_useState, 2),
16078
+ isStrict = _useState2[0],
16079
+ setIsStrict = _useState2[1];
16080
+ console.debug('bsE3Reissue', value);
16081
+ useEffect(function () {
16082
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
16083
+ 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)) {
16084
+ var _value$typeMap$type$s4, _typeMap$type3;
16085
+ getOrderFlag.current = true;
16086
+ 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);
16087
+ }
16088
+ return;
16089
+ }, [value]);
16090
+ useEffect(function () {
16091
+ var _typeMap$type4;
16092
+ var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo];
16093
+ if (systemOrderNo) {
16094
+ var _value$typeMap$type$t, _typeMap$type5;
16095
+ if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
16096
+ var _typeMap$type6;
16097
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key, getGoodDetails({
16098
+ mode: isStrict
16099
+ }))));
16100
+ }
16101
+ }
16102
+ return;
16103
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
16104
+ var getOrderList = /*#__PURE__*/function () {
16105
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
16106
+ var _typeMap$type8;
16107
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
16108
+ while (1) switch (_context.prev = _context.next) {
16109
+ case 0:
16110
+ (_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.getOrderList(orderNo).then(function (data) {
16111
+ var _typeMap$type9, _typeMap$type10;
16112
+ var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
16113
+ var showOrderInfo = orders.map(function (_ref2) {
16114
+ var billNo = _ref2.billNo,
16115
+ billType = _ref2.billType,
16116
+ billTag = _ref2.billTag;
16117
+ return {
16118
+ billNo: billNo,
16119
+ billType: billType,
16120
+ billTag: billTag
16121
+ };
16122
+ });
16123
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.systemOrder]), {}, {
16124
+ showOrderInfo: showOrderInfo,
16125
+ orders: orders
16126
+ }))));
16127
+ });
16128
+ case 1:
16129
+ case "end":
16130
+ return _context.stop();
16131
+ }
16132
+ }, _callee);
16133
+ }));
16134
+ return function getOrderList(_x) {
16135
+ return _ref.apply(this, arguments);
16136
+ };
16137
+ }();
16138
+ var changeTypeHandle = function changeTypeHandle(val) {
16139
+ var _typeMap$type11;
16140
+ var typeName = val === null || val === void 0 ? void 0 : val[0];
16141
+ // if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
16142
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
16143
+ var newValue = _objectSpread2({}, value);
16144
+ newValue[(_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
16145
+ if (typeName === '1') {
16146
+ var _typeMap$type12;
16147
+ newValue[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
16148
+ mode: isStrict
16149
+ });
16150
+ } else if (typeName === '2') {
16151
+ var _typeMap$type13;
16152
+ // 切换到非原单,清空列表
16153
+ newValue[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
16154
+ }
16155
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16156
+ };
16157
+ var handleModeChange = function handleModeChange(mode) {
16158
+ var _value$typeMap$type$t2, _typeMap$type14, _typeMap$type15;
16159
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
16160
+ setIsStrict(mode);
16161
+ if (!isOriginalOrder) return;
16162
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key, getGoodDetails({
16163
+ mode: mode
16164
+ }))));
16165
+ };
16166
+ var getGoodDetails = function getGoodDetails(_ref3) {
16167
+ var _typeMap$type16, _typeMap$type17, _order$orderDetailGet;
16168
+ var mode = _ref3.mode;
16169
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrder];
16170
+ var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo];
16171
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
16172
+ return order.orderSn === systemOrderNo;
16173
+ });
16174
+ var goodDetails = (order === null || order === void 0 ? void 0 : (_order$orderDetailGet = order.orderDetailGets) === null || _order$orderDetailGet === void 0 ? void 0 : _order$orderDetailGet.length) ? updateBsE3GoodsHandle([order]) : [];
16175
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
16176
+ return mode ? goodDetails.filter(function (goodItem) {
16177
+ return !orderNo || goodItem.originalOrderSn === orderNo;
16178
+ }) : goodDetails;
16179
+ };
16180
+ var changeGoodHandle = function changeGoodHandle(val) {
16181
+ var _typeMap$type18;
16182
+ var newValue = _objectSpread2({}, value);
16183
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key)] = val || [];
16184
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16185
+ };
16186
+ var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
16187
+ var _typeMap$type19, _value$typeMap$type$t3, _typeMap$type20;
16188
+ var newValue = _objectSpread2({}, value);
16189
+ 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.systemOrderNo)] = val;
16190
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
16191
+ var _typeMap$type21;
16192
+ 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.key)] = [];
16193
+ }
16194
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16195
+ };
16196
+ //显示选择商品按钮 原单换不显示选择商品
16197
+ var showChangeBtn = useMemo(function () {
16198
+ var _typeMap$type22;
16199
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo]);
16200
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo]]);
16201
+ var selectedGoodsChange = useCallback(function (skuList) {
16202
+ var _typeMap$type24, _getGoodDetails;
16203
+ var newValue = _objectSpread2({}, value);
16204
+ newValue["".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)] = (_getGoodDetails = getGoodDetails({
16205
+ mode: isStrict
16206
+ })) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
16207
+ return skuList.includes(item.sku);
16208
+ });
16209
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16210
+ }, [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.key)], isStrict]);
16211
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
16212
+ gutter: 8,
16213
+ wrap: true
16214
+ }, /*#__PURE__*/React.createElement(Col, {
16215
+ className: "gutter-row",
16216
+ xs: {
16217
+ span: 11
16218
+ },
16219
+ sm: {
16220
+ span: 6
16221
+ }
16222
+ }, /*#__PURE__*/React.createElement(Select, {
16223
+ style: {
16224
+ marginBottom: '8px'
16225
+ },
16226
+ disabled: disabled,
16227
+ allowClear: false,
16228
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
16229
+ onChange: function onChange(val) {
16230
+ return changeSystemOrderHandle(val);
16231
+ },
16232
+ placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
16233
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
16234
+ return /*#__PURE__*/React.createElement(Select.Option, {
16235
+ key: item.billNo,
16236
+ value: item.billNo,
16237
+ label: item.billNo
16238
+ }, item.billNo);
16239
+ }))), /*#__PURE__*/React.createElement(Col, {
16240
+ className: "gutter-row",
16241
+ xs: {
16242
+ span: 11
16243
+ },
16244
+ sm: {
16245
+ span: 6
16246
+ }
16247
+ }, /*#__PURE__*/React.createElement(Cascader, {
16248
+ style: {
16249
+ marginBottom: '8px'
16250
+ },
16251
+ disabled: disabled,
16252
+ allowClear: false,
16253
+ options: reasonList,
16254
+ 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.typeName)],
16255
+ onChange: function onChange(val) {
16256
+ return changeTypeHandle(val);
16257
+ }
16258
+ }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
16259
+ key: 'reissueGoods'
16260
+ }, other), {}, {
16261
+ type: type,
16262
+ disabled: disabled,
16263
+ canUpdateNumber: showChangeBtn,
16264
+ showChangeBtn: showChangeBtn,
16265
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
16266
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
16267
+ onChange: function onChange(val) {
16268
+ return changeGoodHandle(val);
16269
+ },
16270
+ onModeChange: handleModeChange,
16271
+ showModeBtn: false,
16272
+ isStrict: isStrict,
16273
+ tradeGoods: {
16274
+ originDataSource: getGoodDetails({
16275
+ mode: isStrict
16276
+ }),
16277
+ selectedGoodsChange: selectedGoodsChange
16278
+ }
16279
+ })));
16280
+ };
16281
+
16282
+ 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, 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 };