@kmkf-fe-packages/basic-components 2.0.0-rc.1 → 2.0.0-rc.2

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,8 +3,8 @@ 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, 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';
6
+ import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, BS_E3_ORDER_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, 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';
@@ -953,18 +953,10 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
953
953
  _useState2 = _slicedToArray(_useState, 2),
954
954
  uploading = _useState2[0],
955
955
  setUploading = _useState2[1];
956
- var _useState3 = useState(false),
956
+ var _useState3 = useState(true),
957
957
  _useState4 = _slicedToArray(_useState3, 2),
958
- visible = _useState4[0],
959
- setVisible = _useState4[1];
960
- var _useState5 = useState(''),
961
- _useState6 = _slicedToArray(_useState5, 2),
962
- currentPreviewImg = _useState6[0],
963
- setCurrentPreviewImg = _useState6[1];
964
- var _useState7 = useState(true),
965
- _useState8 = _slicedToArray(_useState7, 2),
966
- pasteDefaultStates = _useState8[0],
967
- setPasteDefaultStates = _useState8[1];
958
+ pasteDefaultStates = _useState4[0],
959
+ setPasteDefaultStates = _useState4[1];
968
960
  useEffect(function () {
969
961
  valueRef.current = value;
970
962
  }, [value]);
@@ -1172,21 +1164,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1172
1164
  beforeUpload: beforeUpload
1173
1165
  }, resetProps), value.length >= maxCount ? null : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1174
1166
  className: "addBtn"
1175
- }, "+"), /*#__PURE__*/React.createElement("div", null, uploadText))), /*#__PURE__*/React.createElement(Image, {
1176
- width: 0,
1177
- style: {
1178
- display: visible ? '' : 'none'
1179
- },
1180
- src: currentPreviewImg,
1181
- preview: {
1182
- visible: visible,
1183
- src: "".concat(currentPreviewImg),
1184
- onVisibleChange: function onVisibleChange(value) {
1185
- setCurrentPreviewImg('');
1186
- setVisible(value);
1187
- }
1188
- }
1189
- })));
1167
+ }, "+"), /*#__PURE__*/React.createElement("div", null, uploadText)))));
1190
1168
  };
1191
1169
  var index = /*#__PURE__*/forwardRef(ApaasUploadAsync);
1192
1170
 
@@ -10969,7 +10947,7 @@ var jstGoods = function jstGoods(props) {
10969
10947
  _useState2 = _slicedToArray(_useState, 2),
10970
10948
  changeIndex = _useState2[0],
10971
10949
  setChangeIndex = _useState2[1]; //选中的包裹
10972
- var wdtSendOptions = WdtSendData.getInstance().wdtSendData || [];
10950
+ var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
10973
10951
  useEffect(function () {
10974
10952
  //没有值塞个默认值
10975
10953
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
@@ -11000,7 +10978,7 @@ var jstGoods = function jstGoods(props) {
11000
10978
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
11001
10979
  changeOrderInfo[type] = val;
11002
10980
  changeOrderInfo['sendId'] = option.value;
11003
- if (platformType === 'wdt' && type === 'sendName') {
10981
+ if ((platformType === 'wdt' || platformType === 'bsE3') && type === 'sendName') {
11004
10982
  changeOrderInfo['sendSnapshotName'] = option.label;
11005
10983
  }
11006
10984
  var newList = _toConsumableArray(value);
@@ -11083,7 +11061,7 @@ var jstGoods = function jstGoods(props) {
11083
11061
  return changeInputHandle(e.target.value, 'sendId');
11084
11062
  },
11085
11063
  value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
11086
- }), ['sendName', 'all'].includes(showField) && (platformType === 'wdt' ? /*#__PURE__*/React.createElement(Select, {
11064
+ }), ['sendName', 'all'].includes(showField) && (platformType === 'wdt' || platformType === 'bsE3' ? /*#__PURE__*/React.createElement(Select, {
11087
11065
  style: {
11088
11066
  minWidth: '100px',
11089
11067
  maxWidth: '180px'
@@ -11091,7 +11069,7 @@ var jstGoods = function jstGoods(props) {
11091
11069
  disabled: disabled,
11092
11070
  placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
11093
11071
  showSearch: true,
11094
- options: wdtSendOptions,
11072
+ options: sendOptions,
11095
11073
  filterOption: filterOption,
11096
11074
  value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
11097
11075
  onChange: function onChange(value, option) {
@@ -12083,9 +12061,9 @@ var getTableData$1 = function getTableData(_ref, formData) {
12083
12061
  var current = _ref.current,
12084
12062
  pageSize = _ref.pageSize;
12085
12063
  var data = {
12086
- goodsSn: formData.goodsSn || null,
12087
- goodsName: formData.goodsName || null,
12088
- sku: formData.sku || null,
12064
+ goodNo: formData.goodNo || null,
12065
+ goodName: formData.goodName || null,
12066
+ skuCode: formData.skuCode || null,
12089
12067
  skuId: formData.skuId || null
12090
12068
  };
12091
12069
  return extendRequest('/qy/gdfw/product/product/page', {
@@ -12093,7 +12071,7 @@ var getTableData$1 = function getTableData(_ref, formData) {
12093
12071
  data: _objectSpread2({
12094
12072
  pageSize: pageSize,
12095
12073
  pageNo: current,
12096
- platform: 'WDT_ERP'
12074
+ platform: 'BS_E3_ERP'
12097
12075
  }, data)
12098
12076
  }).then(function (res) {
12099
12077
  var _res$data = res.data,
@@ -12122,127 +12100,91 @@ var columns$2 = [{
12122
12100
  }
12123
12101
  }, index + 1);
12124
12102
  },
12125
- width: 100
12103
+ width: 80
12126
12104
  }, {
12127
- dataIndex: 'sku',
12105
+ dataIndex: 'specNo',
12128
12106
  title: "SKU",
12129
12107
  ellipsis: true,
12130
- width: 70
12108
+ width: 200
12131
12109
  }, {
12132
- dataIndex: 'skuId',
12110
+ dataIndex: 'specId',
12133
12111
  title: "SKU ID",
12134
12112
  ellipsis: true,
12135
- width: 70
12113
+ width: 80
12136
12114
  }, {
12137
- dataIndex: 'goodsName',
12115
+ dataIndex: 'goodName',
12138
12116
  title: "\u5546\u54C1\u540D\u79F0",
12139
12117
  ellipsis: true,
12140
- width: 70
12118
+ width: 250
12141
12119
  }, {
12142
- dataIndex: 'goodsShortName',
12120
+ dataIndex: 'goodShortName',
12143
12121
  title: "\u5546\u54C1\u7B80\u79F0",
12144
12122
  ellipsis: true,
12145
- width: 70
12146
- }, {
12147
- dataIndex: 'picPath',
12148
- title: "\u5546\u54C1\u56FE\u7247",
12149
- ellipsis: true,
12150
- width: 100,
12151
- render: function render(picUrl) {
12152
- return /*#__PURE__*/React.createElement("img", {
12153
- style: {
12154
- width: '60px',
12155
- height: '60px',
12156
- objectFit: 'contain'
12157
- },
12158
- src: picUrl
12159
- });
12160
- }
12161
- }, {
12162
- dataIndex: 'goodsSn',
12123
+ width: 250
12124
+ },
12125
+ // {
12126
+ // dataIndex: 'goodPicUrl',
12127
+ // title: `商品图片`,
12128
+ // ellipsis: true,
12129
+ // width: 100,
12130
+ // render: (picUrl: string) => {
12131
+ // return (
12132
+ // <img
12133
+ // style={{
12134
+ // width: '40px',
12135
+ // height: '40px',
12136
+ // objectFit: 'contain',
12137
+ // }}
12138
+ // src={picUrl}
12139
+ // ></img>
12140
+ // );
12141
+ // },
12142
+ // },
12143
+ {
12144
+ dataIndex: 'goodNo',
12163
12145
  title: "\u8D27\u53F7",
12164
12146
  ellipsis: true,
12165
- width: 70
12147
+ width: 150
12166
12148
  }, {
12167
- dataIndex: 'goodsId',
12149
+ dataIndex: 'goodId',
12168
12150
  title: "\u8D27\u53F7ID",
12169
12151
  ellipsis: true,
12170
- width: 70
12152
+ width: 100
12171
12153
  }, {
12172
12154
  dataIndex: 'colorName',
12173
12155
  title: "\u989C\u8272\u540D\u79F0",
12174
12156
  ellipsis: true,
12175
- width: 70
12157
+ width: 100
12176
12158
  }, {
12177
12159
  dataIndex: 'colorCode',
12178
12160
  title: "\u989C\u8272\u4EE3\u7801",
12179
12161
  ellipsis: true,
12180
- width: 70
12162
+ width: 100
12181
12163
  }, {
12182
12164
  dataIndex: 'sizeName',
12183
12165
  title: "\u5C3A\u7801\u540D\u79F0",
12184
12166
  ellipsis: true,
12185
- width: 70
12167
+ width: 100
12186
12168
  }, {
12187
12169
  dataIndex: 'sizeCode',
12188
12170
  title: "\u5C3A\u7801\u4EE3\u7801",
12189
12171
  ellipsis: true,
12190
- width: 70
12172
+ width: 100
12191
12173
  }, {
12192
12174
  dataIndex: 'brandName',
12193
12175
  title: "\u54C1\u724C\u540D\u79F0",
12194
12176
  ellipsis: true,
12195
- width: 70
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
12177
+ width: 100
12236
12178
  }, {
12237
- dataIndex: 'taoCanSingleSl',
12238
- title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12179
+ dataIndex: 'marketPrice',
12180
+ title: "\u5E02\u573A\u4EF7",
12239
12181
  ellipsis: true,
12240
- width: 70
12182
+ width: 100
12241
12183
  }, {
12242
- dataIndex: 'isGift',
12243
- title: "\u662F\u5426\u8D60\u54C1",
12184
+ dataIndex: 'retailPrice',
12185
+ title: "\u552E\u4EF7",
12244
12186
  ellipsis: true,
12245
- width: 70
12187
+ width: 100
12246
12188
  }];
12247
12189
  var GoodList$1 = function GoodList(props, ref) {
12248
12190
  var _useState = useState([]),
@@ -12276,7 +12218,7 @@ var GoodList$1 = function GoodList(props, ref) {
12276
12218
  layout: "inline",
12277
12219
  form: form
12278
12220
  }, /*#__PURE__*/React.createElement(Form.Item, {
12279
- name: "goodsSn",
12221
+ name: "goodNo",
12280
12222
  style: {
12281
12223
  marginBottom: '12px'
12282
12224
  }
@@ -12287,7 +12229,7 @@ var GoodList$1 = function GoodList(props, ref) {
12287
12229
  width: 150
12288
12230
  }
12289
12231
  })), /*#__PURE__*/React.createElement(Form.Item, {
12290
- name: "goodsName",
12232
+ name: "goodName",
12291
12233
  style: {
12292
12234
  marginBottom: '12px'
12293
12235
  }
@@ -12298,7 +12240,7 @@ var GoodList$1 = function GoodList(props, ref) {
12298
12240
  width: 150
12299
12241
  }
12300
12242
  })), /*#__PURE__*/React.createElement(Form.Item, {
12301
- name: "sku",
12243
+ name: "skuCode",
12302
12244
  style: {
12303
12245
  marginBottom: '12px'
12304
12246
  }
@@ -12415,7 +12357,7 @@ var GoodList$1 = function GoodList(props, ref) {
12415
12357
  }
12416
12358
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12417
12359
  rowSelection: rowSelection,
12418
- rowKey: "goodsId",
12360
+ rowKey: "specNo",
12419
12361
  columns: columns$2,
12420
12362
  scroll: {
12421
12363
  x: '100%',
@@ -12475,15 +12417,197 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12475
12417
  };
12476
12418
  var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12477
12419
 
12478
- // interface GoodsItem {
12479
- // title: string;
12480
- // pic: string;
12481
- // platform: string;
12482
- // skuId: string;
12483
- // styleId: string;
12484
- // }
12420
+ var columns$3 = [{
12421
+ dataIndex: 'sku',
12422
+ title: "SKU",
12423
+ width: 150
12424
+ }, {
12425
+ dataIndex: 'skuId',
12426
+ title: "SKU ID",
12427
+ width: 150
12428
+ }, {
12429
+ dataIndex: 'goodsName',
12430
+ title: "\u5546\u54C1\u540D\u79F0",
12431
+ width: 150
12432
+ }, {
12433
+ dataIndex: 'goodsShortName',
12434
+ title: "\u5546\u54C1\u7B80\u79F0",
12435
+ width: 150
12436
+ }, {
12437
+ dataIndex: 'picPath',
12438
+ title: "\u5546\u54C1\u56FE\u7247",
12439
+ width: 150
12440
+ }, {
12441
+ dataIndex: 'goodsSn',
12442
+ title: "\u8D27\u53F7",
12443
+ width: 150
12444
+ }, {
12445
+ dataIndex: 'goodsId',
12446
+ title: "\u8D27\u53F7ID",
12447
+ width: 150
12448
+ }, {
12449
+ dataIndex: 'colorName',
12450
+ title: "\u989C\u8272\u540D\u79F0",
12451
+ width: 150
12452
+ }, {
12453
+ dataIndex: 'colorCode',
12454
+ title: "\u989C\u8272\u4EE3\u7801",
12455
+ width: 150
12456
+ }, {
12457
+ dataIndex: 'sizeName',
12458
+ title: "\u5C3A\u7801\u540D\u79F0",
12459
+ width: 150
12460
+ }, {
12461
+ dataIndex: 'sizeCode',
12462
+ title: "\u5C3A\u7801\u4EE3\u7801",
12463
+ width: 150
12464
+ }, {
12465
+ dataIndex: 'brandName',
12466
+ title: "\u54C1\u724C\u540D\u79F0",
12467
+ width: 150
12468
+ }, {
12469
+ dataIndex: 'goodsNumber',
12470
+ title: "\u5546\u54C1\u6570\u91CF",
12471
+ width: 150
12472
+ }, {
12473
+ dataIndex: 'goodsPrice',
12474
+ title: "\u5546\u54C1\u5355\u4EF7",
12475
+ width: 150
12476
+ }, {
12477
+ dataIndex: 'shopPrice',
12478
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12479
+ width: 150
12480
+ }, {
12481
+ dataIndex: 'isGift',
12482
+ title: "\u662F\u5426\u8D60\u54C1",
12483
+ width: 150,
12484
+ render: function render(val) {
12485
+ return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12486
+ }
12487
+ }];
12488
+ var renderFieldMap = {
12489
+ goodsNumber: function goodsNumber(_ref) {
12490
+ var disabled = _ref.disabled,
12491
+ updateHandle = _ref.updateHandle;
12492
+ return function (val, record, index) {
12493
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12494
+ style: {
12495
+ width: 70
12496
+ },
12497
+ value: val,
12498
+ min: 1,
12499
+ precision: 0,
12500
+ onChange: function onChange(num) {
12501
+ return updateHandle(num, index, 'goodsNumber');
12502
+ }
12503
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12504
+ };
12505
+ },
12506
+ goodsPrice: function goodsPrice(_ref2) {
12507
+ var disabled = _ref2.disabled,
12508
+ updateHandle = _ref2.updateHandle;
12509
+ return function (val, record, index) {
12510
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12511
+ style: {
12512
+ width: 70
12513
+ },
12514
+ value: val,
12515
+ min: 0,
12516
+ onChange: function onChange(value) {
12517
+ return updateHandle(value, index, 'goodsPrice');
12518
+ }
12519
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12520
+ };
12521
+ },
12522
+ isGift: function isGift(_ref3) {
12523
+ var disabled = _ref3.disabled,
12524
+ updateHandle = _ref3.updateHandle;
12525
+ return function (val, record, index) {
12526
+ var options = [{
12527
+ label: '是',
12528
+ value: 1
12529
+ }, {
12530
+ label: '否',
12531
+ value: 0
12532
+ }];
12533
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
12534
+ style: {
12535
+ width: 70
12536
+ },
12537
+ options: options,
12538
+ value: val,
12539
+ onChange: function onChange(value) {
12540
+ return updateHandle(value, index, 'isGift');
12541
+ },
12542
+ getPopupContainer: function getPopupContainer() {
12543
+ return document.getElementById('bsE3ReissueGoods');
12544
+ }
12545
+ }) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12546
+ };
12547
+ }
12548
+ };
12549
+ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
12550
+ var disabled = _ref4.disabled,
12551
+ updateHandle = _ref4.updateHandle,
12552
+ operate = _ref4.operate;
12553
+ return columns$3.map(function (item) {
12554
+ var newItem = _objectSpread2({
12555
+ align: 'center',
12556
+ ellipsis: true
12557
+ }, item);
12558
+ if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12559
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
12560
+ render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12561
+ disabled: disabled,
12562
+ updateHandle: updateHandle
12563
+ })
12564
+ });
12565
+ }
12566
+ return newItem;
12567
+ });
12568
+ };
12569
+
12570
+ var SelectTradeGoods = function SelectTradeGoods(_ref) {
12571
+ var columns = _ref.columns,
12572
+ dataSource = _ref.dataSource,
12573
+ selectedRowKeys = _ref.selectedRowKeys,
12574
+ onChangeSelectedKeys = _ref.onChangeSelectedKeys;
12575
+ var _useState = useState(false),
12576
+ _useState2 = _slicedToArray(_useState, 2),
12577
+ tradeGoodsVisible = _useState2[0],
12578
+ setTradeGoodsVisible = _useState2[1];
12579
+ var openModal = function openModal() {
12580
+ return setTradeGoodsVisible(true);
12581
+ };
12582
+ var closeModal = function closeModal() {
12583
+ return setTradeGoodsVisible(false);
12584
+ };
12585
+ var rowSelection = {
12586
+ selectedRowKeys: selectedRowKeys,
12587
+ onChange: onChangeSelectedKeys
12588
+ };
12589
+ console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
12590
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
12591
+ type: "link",
12592
+ onClick: openModal
12593
+ }, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React.createElement(Modal, {
12594
+ title: "\u8BA2\u5355\u5546\u54C1",
12595
+ visible: tradeGoodsVisible,
12596
+ footer: null,
12597
+ onCancel: closeModal
12598
+ }, /*#__PURE__*/React.createElement(Table, {
12599
+ rowKey: "sku",
12600
+ rowSelection: rowSelection,
12601
+ columns: columns,
12602
+ dataSource: dataSource,
12603
+ pagination: false,
12604
+ scroll: {
12605
+ x: 500,
12606
+ y: 500
12607
+ }
12608
+ }), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
12609
+ };
12485
12610
  var GoodItem$1 = function GoodItem(props) {
12486
- var _ref;
12487
12611
  var _props$value = props.value,
12488
12612
  value = _props$value === void 0 ? [] : _props$value,
12489
12613
  type = props.type,
@@ -12517,8 +12641,10 @@ var GoodItem$1 = function GoodItem(props) {
12517
12641
  companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
12518
12642
  onSelect = props.onSelect,
12519
12643
  onDelete = props.onDelete,
12520
- onModeChange = props.onModeChange;
12644
+ onModeChange = props.onModeChange,
12645
+ tradeGoods = props.tradeGoods;
12521
12646
  var refModal = useRef();
12647
+ console.debug('表格数据', value);
12522
12648
  var handleDelete = function handleDelete(record, index) {
12523
12649
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
12524
12650
  var newList = _toConsumableArray(value).filter(function (item, i) {
@@ -12526,13 +12652,19 @@ var GoodItem$1 = function GoodItem(props) {
12526
12652
  });
12527
12653
  onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
12528
12654
  };
12529
- var _useState = useState([]),
12530
- _useState2 = _slicedToArray(_useState, 2),
12531
- selectedRowKeys = _useState2[0],
12532
- setSelectedRowKeys = _useState2[1];
12655
+ var _useState3 = useState([]),
12656
+ _useState4 = _slicedToArray(_useState3, 2),
12657
+ selectedRowKeys = _useState4[0],
12658
+ setSelectedRowKeys = _useState4[1];
12533
12659
  useEffect(function () {
12534
12660
  setSelectedRowKeys([]);
12535
12661
  }, [tableSelect, selectType]);
12662
+ // TODO: 商品订单中以选中商品
12663
+ var selectedGoods = useMemo(function () {
12664
+ return value === null || value === void 0 ? void 0 : value.map(function (v) {
12665
+ return v.sku;
12666
+ });
12667
+ }, [value]);
12536
12668
  var updateHandle = function updateHandle(val, index, columnType) {
12537
12669
  if (value === null || value === void 0 ? void 0 : value.length) {
12538
12670
  value[index][columnType] = val;
@@ -12566,6 +12698,7 @@ var GoodItem$1 = function GoodItem(props) {
12566
12698
  };
12567
12699
  var COLUMNS_MAP = function COLUMNS_MAP() {
12568
12700
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12701
+ var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
12569
12702
  return function (type) {
12570
12703
  var columns = [];
12571
12704
  switch (type) {
@@ -13059,10 +13192,22 @@ var GoodItem$1 = function GoodItem(props) {
13059
13192
  title: "\u662F\u5426\u8D60\u54C1",
13060
13193
  align: 'center',
13061
13194
  ellipsis: true,
13062
- width: 100
13195
+ width: 100,
13196
+ render: function render(val) {
13197
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
13198
+ }
13063
13199
  }];
13064
13200
  }
13065
13201
  break;
13202
+ case 'BS_E3_REISSUE_GOODS':
13203
+ {
13204
+ columns = getBsE3ReissueGoodColumns({
13205
+ disabled: disabled,
13206
+ updateHandle: updateHandle,
13207
+ operate: operate
13208
+ });
13209
+ }
13210
+ break;
13066
13211
  default:
13067
13212
  columns = [{
13068
13213
  dataIndex: 'mark',
@@ -13202,6 +13347,19 @@ var GoodItem$1 = function GoodItem(props) {
13202
13347
  }
13203
13348
  return columnList;
13204
13349
  }, [showHeader, value, disabled]);
13350
+ var orderColumns = useMemo(function () {
13351
+ var columns = COLUMNS_MAP('', false)(type);
13352
+ return [{
13353
+ dataIndex: '',
13354
+ title: '序号',
13355
+ align: 'center',
13356
+ ellipsis: true,
13357
+ width: 50,
13358
+ render: function render(val, record, index) {
13359
+ return /*#__PURE__*/React.createElement("span", null, index + 1);
13360
+ }
13361
+ }].concat(_toConsumableArray(columns));
13362
+ }, []);
13205
13363
  var onSubmit = function onSubmit(list) {
13206
13364
  var newList = [];
13207
13365
  if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
@@ -13220,12 +13378,36 @@ var GoodItem$1 = function GoodItem(props) {
13220
13378
  });
13221
13379
  } else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
13222
13380
  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;
13381
+ var specNo = item.specNo,
13382
+ specId = item.specId,
13383
+ goodName = item.goodName,
13384
+ goodShortName = item.goodShortName,
13385
+ goodPicUrl = item.goodPicUrl,
13386
+ goodNo = item.goodNo,
13387
+ goodId = item.goodId,
13388
+ retailPrice = item.retailPrice;
13389
+ return _objectSpread2(_objectSpread2({}, item), {}, {
13390
+ sku: specNo,
13391
+ skuId: specId,
13392
+ goodsName: goodName,
13393
+ goodsShortName: goodShortName,
13394
+ picPath: goodPicUrl,
13395
+ goodsSn: goodNo,
13396
+ goodsId: goodId,
13397
+ goodsPrice: retailPrice,
13398
+ shopPrice: retailPrice,
13399
+ sharePayment: '',
13400
+ sharePrice: '',
13401
+ payment: '',
13402
+ tcSku: '',
13403
+ tcGoodsNumber: '',
13404
+ taoCanSingleSl: '',
13405
+ isGift: '',
13406
+ uuid: uuid(),
13407
+ canDelete: true,
13408
+ goodsNumber: 1,
13409
+ canUpdateNumber: canUpdateNumber
13410
+ });
13229
13411
  });
13230
13412
  } else {
13231
13413
  newList = list.map(function (item) {
@@ -13286,10 +13468,15 @@ var GoodItem$1 = function GoodItem(props) {
13286
13468
  }, showModeBtn && /*#__PURE__*/React.createElement(Checkbox, {
13287
13469
  checked: isStrict,
13288
13470
  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, {
13471
+ }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && /*#__PURE__*/React.createElement(SelectTradeGoods, {
13472
+ columns: orderColumns,
13473
+ dataSource: tradeGoods.originDataSource,
13474
+ selectedRowKeys: selectedGoods,
13475
+ onChangeSelectedKeys: tradeGoods.selectedGoodsChange
13476
+ }), /*#__PURE__*/React.createElement(Button, {
13290
13477
  type: "link",
13291
13478
  onClick: handleChangeGoods
13292
- }, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
13479
+ }, ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? '选择百胜ERP商品' : '选择商品'), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
13293
13480
  columns: newColumns,
13294
13481
  dataSource: value,
13295
13482
  rowKey: 'uuid',
@@ -13998,25 +14185,7 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
13998
14185
  if (data === null || data === void 0 ? void 0 : data.success) {
13999
14186
  var _data$data, _data$data$orderList;
14000
14187
  if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderList = _data$data.orderList) === null || _data$data$orderList === void 0 ? void 0 : _data$data$orderList.length) {
14001
- var _filterBsE3Orders;
14002
- data.data.orderList = (_filterBsE3Orders = filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo)) === null || _filterBsE3Orders === void 0 ? void 0 : _filterBsE3Orders.map(function (item) {
14003
- var isSplit = item.isSplit,
14004
- isSplitNew = item.isSplitNew,
14005
- isCopy = item.isCopy,
14006
- isExchangeOrder = item.isExchangeOrder,
14007
- isCombineNew = item.isCombineNew,
14008
- isCombine = item.isCombine,
14009
- orderStatus = item.orderStatus;
14010
- return _objectSpread2(_objectSpread2({}, item), {}, {
14011
- orderStatus: BS_E3_ORDER_STATUS_MAP[orderStatus],
14012
- isSplit: BS_E3_BOOLEAN_STATUS_MAP[isSplit],
14013
- isSplitNew: BS_E3_BOOLEAN_STATUS_MAP[isSplitNew],
14014
- isExchangeOrder: BS_E3_BOOLEAN_STATUS_MAP[isExchangeOrder],
14015
- isCopy: BS_E3_BOOLEAN_STATUS_MAP[isCopy],
14016
- isCombineNew: BS_E3_BOOLEAN_STATUS_MAP[isCombineNew],
14017
- isCombine: BS_E3_BOOLEAN_STATUS_MAP[isCombine]
14018
- });
14019
- });
14188
+ data.data.orderList = filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo);
14020
14189
  }
14021
14190
  resolve(data.data);
14022
14191
  } else {
@@ -14045,7 +14214,22 @@ var columnsMap = {
14045
14214
  title: '标签',
14046
14215
  dataIndex: 'billTag',
14047
14216
  width: 150
14048
- }],
14217
+ }, {
14218
+ title: '主播名称',
14219
+ dataIndex: 'authorName',
14220
+ width: 150
14221
+ }, {
14222
+ title: '主播ID',
14223
+ dataIndex: 'authorId',
14224
+ width: 150
14225
+ }
14226
+ // {
14227
+ // title: '直播活动',
14228
+ // dataIndex: 'liveActivites',
14229
+ // width: 150,
14230
+ // },
14231
+ ],
14232
+
14049
14233
  WLN_SYSTEM_ORDER: [{
14050
14234
  title: '订单类型',
14051
14235
  dataIndex: 'billType',
@@ -14081,37 +14265,58 @@ var columnsMap = {
14081
14265
  title: '订单状态',
14082
14266
  dataIndex: 'orderStatus',
14083
14267
  width: 100,
14084
- ellipsis: true
14268
+ ellipsis: true,
14269
+ render: function render(val) {
14270
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_ORDER_STATUS_MAP[val] || val);
14271
+ }
14085
14272
  }, {
14086
14273
  title: '是否被拆分',
14087
14274
  dataIndex: 'isSplit',
14088
- width: 70,
14089
- ellipsis: true
14275
+ width: 100,
14276
+ ellipsis: true,
14277
+ render: function render(val) {
14278
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14279
+ }
14090
14280
  }, {
14091
14281
  title: '是否拆分子单',
14092
14282
  dataIndex: 'isSplitNew',
14093
- width: 70,
14094
- ellipsis: true
14283
+ width: 100,
14284
+ ellipsis: true,
14285
+ render: function render(val) {
14286
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14287
+ }
14095
14288
  }, {
14096
14289
  title: '是否被合并',
14097
14290
  dataIndex: 'isCombine',
14098
- width: 70,
14099
- ellipsis: true
14291
+ width: 100,
14292
+ ellipsis: true,
14293
+ render: function render(val) {
14294
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14295
+ }
14100
14296
  }, {
14101
14297
  title: '是否合并新单',
14102
14298
  dataIndex: 'isCombineNew',
14103
- width: 70,
14104
- ellipsis: true
14299
+ width: 100,
14300
+ ellipsis: true,
14301
+ render: function render(val) {
14302
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14303
+ }
14105
14304
  }, {
14106
14305
  title: '是否复制单',
14107
14306
  dataIndex: 'isCopy',
14108
- width: 70,
14109
- ellipsis: true
14307
+ width: 100,
14308
+ ellipsis: true,
14309
+ render: function render(val) {
14310
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14311
+ }
14110
14312
  }, {
14111
14313
  title: '是否换货单',
14112
14314
  dataIndex: 'isExchangeOrder',
14113
- width: 70,
14114
- ellipsis: true
14315
+ width: 100,
14316
+ ellipsis: true,
14317
+ render: function render(val) {
14318
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14319
+ }
14115
14320
  }, {
14116
14321
  title: '订单备注',
14117
14322
  dataIndex: 'orderMsg',
@@ -14173,11 +14378,15 @@ var index$1 = (function (props) {
14173
14378
  return {
14174
14379
  billNo: item.billNo,
14175
14380
  billType: item.billType,
14176
- billTag: item.billTag
14381
+ billTag: item.billTag,
14382
+ authorName: item.authorName,
14383
+ authorId: item.authorId
14384
+ // liveActivites: item.liveActivites,
14177
14385
  };
14178
14386
  })
14179
14387
  }));
14180
14388
  }
14389
+
14181
14390
  onceRef.current = false;
14182
14391
  case 7:
14183
14392
  case "end":
@@ -14422,7 +14631,7 @@ var CommonGoods = function CommonGoods(props) {
14422
14631
  valueRef.current = value;
14423
14632
  if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo)) {
14424
14633
  getOrderFlag.current = true;
14425
- getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
14634
+ compType.indexOf('WDT') > -1 && getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
14426
14635
  }
14427
14636
  }, [value]);
14428
14637
  var getWdtOrderList = /*#__PURE__*/function () {
@@ -14859,11 +15068,12 @@ var typeMap$1 = {
14859
15068
  formatDefaultField: {
14860
15069
  money: 'orderPrice',
14861
15070
  share: 'sharePrice'
14862
- }
15071
+ },
15072
+ getOrderList: wdtUtils.getWdtOrderListSingleton
14863
15073
  }
14864
15074
  };
14865
15075
  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;
15076
+ var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
14867
15077
  var value = props.value,
14868
15078
  onChange = props.onChange,
14869
15079
  _props$reasonList = props.reasonList,
@@ -14885,31 +15095,48 @@ var wdtReissue = function wdtReissue(props) {
14885
15095
  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
15096
  var _value$typeMap$type$s4, _typeMap$type3;
14887
15097
  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);
15098
+ 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
15099
  }
14890
15100
  return;
14891
15101
  }, [value]);
14892
- useEffect(function () {
14893
- var _typeMap$type4;
14894
- var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo];
14895
- if (systemOrderNo) {
14896
- var _value$typeMap$type$t, _typeMap$type5;
14897
- if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type5 = typeMap$1[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])) {
14898
- var _typeMap$type6;
14899
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key, getGoodDetails({
14900
- mode: isStrict
14901
- }))));
14902
- }
14903
- }
14904
- return;
14905
- }, [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 () {
15102
+ // useEffect(() => {
15103
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
15104
+ // if (systemOrderNo) {
15105
+ // if (['1'].includes(value?.[typeMap[type]?.typeName]?.[0])) {
15106
+ // onChange?.({
15107
+ // ...value,
15108
+ // [typeMap[type]?.key]: getGoodDetails({
15109
+ // mode: isStrict
15110
+ // })
15111
+ // })
15112
+ // }
15113
+ // }
15114
+ // return;
15115
+ // }, [value?.[typeMap[type]?.systemOrderNo]]);
15116
+ // const getWdtOrderList = async (orderNo: string) => {
15117
+ // wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
15118
+ // const orders = data?.trades || [];
15119
+ // const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
15120
+ // return { billNo, billType, billTag }
15121
+ // });
15122
+ // onChange({
15123
+ // ...value,
15124
+ // [typeMap[type]?.systemOrder]: {
15125
+ // ...value[typeMap[type]?.systemOrder],
15126
+ // showOrderInfo,
15127
+ // orders,
15128
+ // },
15129
+ // });
15130
+ // })
15131
+ // };
15132
+ var getOrderList = /*#__PURE__*/function () {
14907
15133
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
15134
+ var _typeMap$type4;
14908
15135
  return _regeneratorRuntime().wrap(function _callee$(_context) {
14909
15136
  while (1) switch (_context.prev = _context.next) {
14910
15137
  case 0:
14911
- wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
14912
- var _typeMap$type8, _typeMap$type9;
15138
+ (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
15139
+ var _typeMap$type5, _typeMap$type6;
14913
15140
  var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
14914
15141
  var showOrderInfo = orders.map(function (_ref2) {
14915
15142
  var billNo = _ref2.billNo,
@@ -14921,7 +15148,7 @@ var wdtReissue = function wdtReissue(props) {
14921
15148
  billTag: billTag
14922
15149
  };
14923
15150
  });
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]), {}, {
15151
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
14925
15152
  showOrderInfo: showOrderInfo,
14926
15153
  orders: orders
14927
15154
  }))));
@@ -14932,43 +15159,44 @@ var wdtReissue = function wdtReissue(props) {
14932
15159
  }
14933
15160
  }, _callee);
14934
15161
  }));
14935
- return function getWdtOrderList(_x) {
15162
+ return function getOrderList(_x) {
14936
15163
  return _ref.apply(this, arguments);
14937
15164
  };
14938
15165
  }();
14939
15166
  var changeTypeHandle = function changeTypeHandle(val) {
14940
- var _value$typeMap$type$t2, _typeMap$type10, _typeMap$type11;
15167
+ var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
14941
15168
  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;
15169
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$1[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;
14943
15170
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
14944
15171
  var newValue = _objectSpread2({}, value);
14945
- newValue[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
15172
+ newValue[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
14946
15173
  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({
15174
+ var _typeMap$type9;
15175
+ newValue[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
14949
15176
  mode: isStrict
14950
15177
  });
14951
15178
  } else if (typeName === '2') {
14952
- var _typeMap$type13;
15179
+ var _typeMap$type10;
14953
15180
  // 切换到非原单,清空列表
14954
- newValue[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
15181
+ newValue[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
14955
15182
  }
14956
15183
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14957
15184
  };
14958
15185
  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';
15186
+ var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
15187
+ var isOriginalOrder = (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]) === '1';
14961
15188
  setIsStrict(mode);
14962
15189
  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({
15190
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
14964
15191
  mode: mode
14965
15192
  }))));
14966
15193
  };
14967
15194
  var getGoodDetails = function getGoodDetails(_ref3) {
14968
- var _typeMap$type16, _typeMap$type17, _order$goodDetails;
14969
- 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];
15195
+ var _typeMap$type13, _typeMap$type14, _order$goodDetails;
15196
+ var mode = _ref3.mode,
15197
+ sysOrderNo = _ref3.sysOrderNo;
15198
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
15199
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
14972
15200
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
14973
15201
  return order.tradeNo === systemOrderNo;
14974
15202
  });
@@ -14979,31 +15207,37 @@ var wdtReissue = function wdtReissue(props) {
14979
15207
  }) : goodDetails;
14980
15208
  };
14981
15209
  var changeGoodHandle = function changeGoodHandle(val) {
14982
- var _typeMap$type18;
15210
+ var _typeMap$type15;
14983
15211
  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;
15212
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
15213
+ var _typeMap$type16, _typeMap$type17;
15214
+ item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
15215
+ item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
14988
15216
  return item;
14989
15217
  });
14990
15218
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14991
15219
  };
14992
15220
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
14993
- var _typeMap$type21, _value$typeMap$type$t4, _typeMap$type22;
15221
+ var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
14994
15222
  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)] = [];
15223
+ 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.systemOrderNo)] = val;
15224
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$1[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])) {
15225
+ var _typeMap$type20;
15226
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
15227
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$1[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])) {
15228
+ var _typeMap$type22;
15229
+ 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.key)] = getGoodDetails({
15230
+ mode: isStrict,
15231
+ sysOrderNo: val
15232
+ });
14999
15233
  }
15000
15234
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15001
15235
  };
15002
15236
  //显示选择商品按钮 原单换不显示选择商品
15003
15237
  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]]);
15238
+ var _typeMap$type23;
15239
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo]);
15240
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]]);
15007
15241
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
15008
15242
  gutter: 8,
15009
15243
  wrap: true
@@ -15021,12 +15255,12 @@ var wdtReissue = function wdtReissue(props) {
15021
15255
  },
15022
15256
  disabled: disabled,
15023
15257
  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)],
15258
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
15025
15259
  onChange: function onChange(val) {
15026
15260
  return changeSystemOrderHandle(val);
15027
15261
  },
15028
15262
  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) {
15263
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$1[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) {
15030
15264
  return /*#__PURE__*/React.createElement(Select.Option, {
15031
15265
  key: item.billNo,
15032
15266
  value: item.billNo,
@@ -15047,7 +15281,7 @@ var wdtReissue = function wdtReissue(props) {
15047
15281
  disabled: disabled,
15048
15282
  allowClear: false,
15049
15283
  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)],
15284
+ 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.typeName)],
15051
15285
  onChange: function onChange(val) {
15052
15286
  return changeTypeHandle(val);
15053
15287
  }
@@ -15059,7 +15293,7 @@ var wdtReissue = function wdtReissue(props) {
15059
15293
  canUpdateNumber: showChangeBtn,
15060
15294
  showChangeBtn: showChangeBtn,
15061
15295
  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)],
15296
+ 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.key)],
15063
15297
  onChange: function onChange(val) {
15064
15298
  return changeGoodHandle(val);
15065
15299
  },
@@ -15839,4 +16073,234 @@ var CalculationInput = function CalculationInput(props) {
15839
16073
  }, config === null || config === void 0 ? void 0 : config.unit));
15840
16074
  };
15841
16075
 
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 };
16076
+ var _excluded$k = ["value", "onChange", "reasonList", "disabled", "type"];
16077
+ var typeMap$2 = {
16078
+ BS_E3_REISSUE_GOODS: {
16079
+ key: 'bsE3ReissueGoods',
16080
+ typeName: 'bsE3ReissueType',
16081
+ systemOrder: 'bsE3SystemOrder',
16082
+ systemOrderNo: 'bsE3SystemOrderNo',
16083
+ getOrderList: bsE3Utils.getBsE3OrderListSingleton
16084
+ }
16085
+ };
16086
+ var bsE3Reissue = function bsE3Reissue(props) {
16087
+ var _typeMap$type21, _typeMap$type23, _typeMap$type24, _value$typeMap$type$s5, _typeMap$type25, _typeMap$type26, _typeMap$type27;
16088
+ var value = props.value,
16089
+ onChange = props.onChange,
16090
+ _props$reasonList = props.reasonList,
16091
+ reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
16092
+ disabled = props.disabled,
16093
+ type = props.type,
16094
+ other = _objectWithoutProperties(props, _excluded$k);
16095
+ var getOrderFlag = useRef(false);
16096
+ var _useState = useState(false),
16097
+ _useState2 = _slicedToArray(_useState, 2),
16098
+ isStrict = _useState2[0],
16099
+ setIsStrict = _useState2[1];
16100
+ // TODO: 在修改场景下手动获取一次订单详情中数据
16101
+ useEffect(function () {
16102
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
16103
+ 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)) {
16104
+ var _value$typeMap$type$s4, _typeMap$type3;
16105
+ getOrderFlag.current = true;
16106
+ 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);
16107
+ }
16108
+ return;
16109
+ }, [value]);
16110
+ // useEffect(() => {
16111
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
16112
+ // if (systemOrderNo) {
16113
+ // if (['1'].includes(value?.[typeMap[type]?.typeName]?.[0])) {
16114
+ // onChange?.({
16115
+ // ...value,
16116
+ // [typeMap[type]?.key]: getGoodDetails({
16117
+ // mode: isStrict
16118
+ // })
16119
+ // })
16120
+ // }
16121
+ // }
16122
+ // return;
16123
+ // }, [value?.[typeMap[type]?.systemOrderNo]]);
16124
+ var getOrderList = /*#__PURE__*/function () {
16125
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
16126
+ var _typeMap$type4;
16127
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
16128
+ while (1) switch (_context.prev = _context.next) {
16129
+ case 0:
16130
+ (_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
16131
+ var _typeMap$type5, _typeMap$type6;
16132
+ var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
16133
+ var showOrderInfo = orders.map(function (_ref2) {
16134
+ var orderSn = _ref2.orderSn;
16135
+ return {
16136
+ billNo: orderSn
16137
+ };
16138
+ });
16139
+ 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]), {}, {
16140
+ showOrderInfo: showOrderInfo,
16141
+ orders: orders
16142
+ }))));
16143
+ });
16144
+ case 1:
16145
+ case "end":
16146
+ return _context.stop();
16147
+ }
16148
+ }, _callee);
16149
+ }));
16150
+ return function getOrderList(_x) {
16151
+ return _ref.apply(this, arguments);
16152
+ };
16153
+ }();
16154
+ var changeTypeHandle = function changeTypeHandle(val) {
16155
+ var _typeMap$type7;
16156
+ var typeName = val === null || val === void 0 ? void 0 : val[0];
16157
+ // if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
16158
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
16159
+ var newValue = _objectSpread2({}, value);
16160
+ newValue[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
16161
+ if (typeName === '1') {
16162
+ var _typeMap$type8;
16163
+ newValue[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
16164
+ mode: isStrict
16165
+ });
16166
+ } else if (typeName === '2') {
16167
+ var _typeMap$type9;
16168
+ // 切换到非原单,清空列表
16169
+ newValue[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
16170
+ }
16171
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16172
+ };
16173
+ var handleModeChange = function handleModeChange(mode) {
16174
+ var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
16175
+ 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';
16176
+ setIsStrict(mode);
16177
+ if (!isOriginalOrder) return;
16178
+ 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({
16179
+ mode: mode
16180
+ }))));
16181
+ };
16182
+ var getGoodDetails = function getGoodDetails(_ref3) {
16183
+ var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
16184
+ var mode = _ref3.mode,
16185
+ sysOrderNo = _ref3.sysOrderNo;
16186
+ 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];
16187
+ 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];
16188
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
16189
+ return order.orderSn === systemOrderNo;
16190
+ });
16191
+ 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]) : [];
16192
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
16193
+ return mode ? goodDetails.filter(function (goodItem) {
16194
+ return !orderNo || goodItem.originalOrderSn === orderNo;
16195
+ }) : goodDetails;
16196
+ };
16197
+ var changeGoodHandle = function changeGoodHandle(val) {
16198
+ var _typeMap$type14;
16199
+ var newValue = _objectSpread2({}, value);
16200
+ 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 || [];
16201
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16202
+ };
16203
+ var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
16204
+ var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
16205
+ var newValue = _objectSpread2({}, value);
16206
+ 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;
16207
+ 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])) {
16208
+ var _typeMap$type17;
16209
+ 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)] = [];
16210
+ } 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])) {
16211
+ var _typeMap$type19;
16212
+ 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({
16213
+ mode: isStrict,
16214
+ sysOrderNo: val
16215
+ });
16216
+ }
16217
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16218
+ };
16219
+ //显示选择商品按钮 原单换不显示选择商品
16220
+ var showChangeBtn = useMemo(function () {
16221
+ var _typeMap$type20;
16222
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
16223
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
16224
+ var selectedGoodsChange = useCallback(function (skuList) {
16225
+ var _typeMap$type22, _getGoodDetails;
16226
+ var newValue = _objectSpread2({}, value);
16227
+ newValue["".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)] = (_getGoodDetails = getGoodDetails({
16228
+ mode: isStrict
16229
+ })) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
16230
+ return skuList.includes(item.sku);
16231
+ });
16232
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16233
+ }, [value === null || value === void 0 ? void 0 : value["".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)], isStrict]);
16234
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
16235
+ gutter: 8,
16236
+ wrap: true,
16237
+ id: "bsE3ReissueGoods"
16238
+ }, /*#__PURE__*/React.createElement(Col, {
16239
+ className: "gutter-row",
16240
+ xs: {
16241
+ span: 11
16242
+ },
16243
+ sm: {
16244
+ span: 6
16245
+ }
16246
+ }, /*#__PURE__*/React.createElement(Select, {
16247
+ style: {
16248
+ marginBottom: '8px'
16249
+ },
16250
+ disabled: disabled,
16251
+ allowClear: false,
16252
+ value: 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.systemOrderNo)],
16253
+ onChange: function onChange(val) {
16254
+ return changeSystemOrderHandle(val);
16255
+ },
16256
+ placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
16257
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
16258
+ return /*#__PURE__*/React.createElement(Select.Option, {
16259
+ key: item.billNo,
16260
+ value: item.billNo,
16261
+ label: item.billNo
16262
+ }, item.billNo);
16263
+ }))), /*#__PURE__*/React.createElement(Col, {
16264
+ className: "gutter-row",
16265
+ xs: {
16266
+ span: 11
16267
+ },
16268
+ sm: {
16269
+ span: 6
16270
+ }
16271
+ }, /*#__PURE__*/React.createElement(Cascader, {
16272
+ style: {
16273
+ marginBottom: '8px'
16274
+ },
16275
+ disabled: disabled,
16276
+ allowClear: false,
16277
+ options: reasonList,
16278
+ 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.typeName)],
16279
+ onChange: function onChange(val) {
16280
+ return changeTypeHandle(val);
16281
+ }
16282
+ }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
16283
+ key: 'reissueGoods'
16284
+ }, other), {}, {
16285
+ type: type,
16286
+ disabled: disabled,
16287
+ canUpdateNumber: showChangeBtn,
16288
+ showChangeBtn: showChangeBtn,
16289
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
16290
+ 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.key)],
16291
+ onChange: function onChange(val) {
16292
+ return changeGoodHandle(val);
16293
+ },
16294
+ onModeChange: handleModeChange,
16295
+ showModeBtn: false,
16296
+ isStrict: isStrict,
16297
+ tradeGoods: {
16298
+ originDataSource: getGoodDetails({
16299
+ mode: isStrict
16300
+ }),
16301
+ selectedGoodsChange: selectedGoodsChange
16302
+ }
16303
+ })));
16304
+ };
16305
+
16306
+ 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 };