@kmkf-fe-packages/basic-components 2.0.54-beta.3 → 2.0.54-beta.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8013,7 +8013,8 @@ var WidgetMap = {
8013
8013
  var pageSize = 50;
8014
8014
  var SubForm = function SubForm(props) {
8015
8015
  var _selectOptions$;
8016
- var value = props.value,
8016
+ var _props$value = props.value,
8017
+ value = _props$value === void 0 ? [] : _props$value,
8017
8018
  onChange = props.onChange,
8018
8019
  needFilterShopByPermission = props.needFilterShopByPermission,
8019
8020
  _props$subConfig = props.subConfig,
@@ -8315,7 +8316,7 @@ var SubForm = function SubForm(props) {
8315
8316
  }
8316
8317
  });
8317
8318
  }
8318
- onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, newValue), {}, {
8319
+ onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
8319
8320
  uuid: kmkfUtils.uuid()
8320
8321
  })]));
8321
8322
  };
@@ -10973,7 +10974,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
10973
10974
  }
10974
10975
  })), /*#__PURE__*/React__default['default'].createElement(Item, {
10975
10976
  label: '发件人手机号',
10976
- required: true,
10977
+ // required={true}
10977
10978
  key: 'interceptSenderMobile',
10978
10979
  hidden: !showSenderMobile
10979
10980
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
@@ -11153,7 +11154,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11153
11154
  _props$value = props.value,
11154
11155
  value = _props$value === void 0 ? {} : _props$value,
11155
11156
  disabled = props.disabled,
11156
- onChange = props.onChange;
11157
+ onChange = props.onChange,
11158
+ _props$isSingle = props.isSingle,
11159
+ isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
11160
+ _props$trajectoryApiS = props.trajectoryApiStatus,
11161
+ trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
11157
11162
  var handleInputChange = function handleInputChange(e, type) {
11158
11163
  var val = e.target.value;
11159
11164
  typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
@@ -11164,13 +11169,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11164
11169
  }));
11165
11170
  handleSearchSnapshot(val);
11166
11171
  };
11172
+ var handleStatusChange = function handleStatusChange(val) {
11173
+ var _value$trajectoryApiS;
11174
+ var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
11175
+ trajectoryApiStatus: {
11176
+ status: val,
11177
+ reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
11178
+ }
11179
+ });
11180
+ onChange(newVal);
11181
+ };
11167
11182
  var handleSearchSnapshot = function handleSearchSnapshot(company) {
11168
11183
  var trajectoryCompany = value.trajectoryCompany,
11169
11184
  trajectoryCode = value.trajectoryCode,
11170
11185
  trajectoryPhone = value.trajectoryPhone;
11171
11186
  var newCompany = company ? company : trajectoryCompany;
11172
11187
  //不展示拦截状态不请求
11173
- if (!(showField && showField.includes('snapshot'))) {
11188
+ if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
11174
11189
  return;
11175
11190
  }
11176
11191
  if (disabled) {
@@ -11195,13 +11210,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11195
11210
  data = res.data,
11196
11211
  msg = res.message;
11197
11212
  if (result === 100 || success) {
11198
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11199
- trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
11213
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
11200
11214
  trajectoryCompany: newCompany
11201
- }));
11215
+ });
11216
+ if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
11217
+ if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
11218
+ onChange(newValue);
11202
11219
  } else {
11203
11220
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11204
11221
  trajectorySnapshot: '',
11222
+ trajectoryApiStatus: {
11223
+ reason: '',
11224
+ status: ''
11225
+ },
11205
11226
  trajectoryCompany: newCompany
11206
11227
  }));
11207
11228
  msg && antd.message.error(msg);
@@ -11210,6 +11231,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11210
11231
  } catch (err) {
11211
11232
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11212
11233
  trajectorySnapshot: '',
11234
+ trajectoryApiStatus: {
11235
+ reason: '',
11236
+ status: ''
11237
+ },
11213
11238
  trajectoryCompany: newCompany
11214
11239
  }));
11215
11240
  (err === null || err === void 0 ? void 0 : err.message) && antd.message.error(err === null || err === void 0 ? void 0 : err.message);
@@ -11263,6 +11288,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11263
11288
  }
11264
11289
  });
11265
11290
  };
11291
+ // 接口状态
11292
+ var LogisticsApiStatus = function LogisticsApiStatus() {
11293
+ var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
11294
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
11295
+ value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
11296
+ disabled: true,
11297
+ style: {
11298
+ width: '100%',
11299
+ marginTop: '8px'
11300
+ },
11301
+ placeholder: "\u63A5\u53E3\u72B6\u6001",
11302
+ onChange: handleStatusChange,
11303
+ options: [{
11304
+ label: '成功',
11305
+ value: '成功'
11306
+ }, {
11307
+ label: '失败',
11308
+ value: '失败'
11309
+ }]
11310
+ }), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS3 = value.trajectoryApiStatus) === null || _value$trajectoryApiS3 === void 0 ? void 0 : _value$trajectoryApiS3.reason) ? /*#__PURE__*/React__default['default'].createElement("div", {
11311
+ style: {
11312
+ color: 'red'
11313
+ }
11314
+ }, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : (_value$trajectoryApiS4 = value.trajectoryApiStatus) === null || _value$trajectoryApiS4 === void 0 ? void 0 : _value$trajectoryApiS4.reason) : null);
11315
+ };
11266
11316
  //物流快照
11267
11317
  var LogisticsSnapshot = function LogisticsSnapshot() {
11268
11318
  return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
@@ -11277,7 +11327,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11277
11327
  value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
11278
11328
  });
11279
11329
  };
11280
- return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
11330
+ return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
11281
11331
  };
11282
11332
 
11283
11333
  var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
@@ -11490,7 +11540,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
11490
11540
  disabled: disabled,
11491
11541
  onChange: function onChange(val) {
11492
11542
  return handleChange(val, changeIndex);
11493
- }
11543
+ },
11544
+ isSingle: false
11494
11545
  }));
11495
11546
  };
11496
11547
 
@@ -11513,7 +11564,7 @@ var typeInitValueMap = {
11513
11564
  }]
11514
11565
  };
11515
11566
  var jstGoods = function jstGoods(props) {
11516
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9;
11567
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11, _value$changeIndex12;
11517
11568
  var _props$value = props.value,
11518
11569
  value = _props$value === void 0 ? [] : _props$value,
11519
11570
  onChange = props.onChange,
@@ -11531,8 +11582,8 @@ var jstGoods = function jstGoods(props) {
11531
11582
  setChangeIndex = _useState2[1]; //选中的包裹
11532
11583
  var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
11533
11584
  var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
11585
+ var expressDateInstance = kmkfUtils.ExpressData.getInstance(platformType);
11534
11586
  var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
11535
- var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
11536
11587
  React.useEffect(function () {
11537
11588
  //没有值塞个默认值
11538
11589
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
@@ -11615,59 +11666,51 @@ var jstGoods = function jstGoods(props) {
11615
11666
  return setChangeIndex(index);
11616
11667
  }
11617
11668
  }, "\u5305\u88F9".concat(index + 1)));
11618
- }))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, _objectSpread2(_objectSpread2({
11619
- type: logisticsType,
11669
+ }))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, {
11620
11670
  disabled: disabled,
11621
11671
  placeholder: "\u7269\u6D41\u516C\u53F8",
11622
11672
  onChange: function onChange(val) {
11623
- if (logisticsType === 'input') {
11624
- changeInputHandle(null, 'logisticsCompany');
11625
- changeInputHandle(val, 'logisticsCompanyName');
11626
- } else {
11627
- changeInputHandle(val, 'logisticsCompany');
11628
- }
11673
+ changeInputHandle(val, 'logisticsCompany');
11629
11674
  },
11630
- value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
11631
- }, logisticsType === 'input' ? {} : {
11675
+ value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false) ? (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompany'] : (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompanyName'] : (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4['logisticsCompany'],
11632
11676
  showSearch: true,
11633
11677
  dropdownMatchSelectWidth: false,
11634
11678
  filterOption: function filterOption(input, option) {
11635
11679
  return option.label.includes(input);
11636
- }
11637
- }), {}, {
11680
+ },
11638
11681
  style: {
11639
11682
  minWidth: '100px',
11640
11683
  maxWidth: '180px'
11641
11684
  },
11642
11685
  platformType: platformType
11643
- })) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11686
+ }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11644
11687
  disabled: disabled,
11645
11688
  placeholder: "\u7269\u6D41\u5355\u53F7",
11646
11689
  onChange: function onChange(e) {
11647
11690
  return changeInputHandle(e.target.value, 'logisticsCode');
11648
11691
  },
11649
- value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.logisticsCode
11692
+ value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
11650
11693
  }) : null) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11651
11694
  disabled: disabled,
11652
11695
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
11653
11696
  onChange: function onChange(e) {
11654
11697
  return changeInputHandle(e.target.value, 'supplyId');
11655
11698
  },
11656
- value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.supplyId
11699
+ value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
11657
11700
  }), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11658
11701
  disabled: disabled,
11659
11702
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
11660
11703
  onChange: function onChange(e) {
11661
11704
  return changeInputHandle(e.target.value, 'supplyName');
11662
11705
  },
11663
- value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.supplyName
11706
+ value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
11664
11707
  })) : null, type === 3 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11665
11708
  disabled: disabled,
11666
11709
  placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
11667
11710
  onChange: function onChange(e) {
11668
11711
  return changeInputHandle(e.target.value, 'sendId');
11669
11712
  },
11670
- value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
11713
+ value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
11671
11714
  }), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
11672
11715
  style: {
11673
11716
  minWidth: '100px',
@@ -11678,7 +11721,7 @@ var jstGoods = function jstGoods(props) {
11678
11721
  showSearch: true,
11679
11722
  options: sendOptions,
11680
11723
  filterOption: filterOption,
11681
- value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendSnapshotId) || ((_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName) || null,
11724
+ value: ((_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendSnapshotId) || ((_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendName) || null,
11682
11725
  onChange: function onChange(value, option) {
11683
11726
  return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
11684
11727
  }
@@ -11688,14 +11731,14 @@ var jstGoods = function jstGoods(props) {
11688
11731
  onChange: function onChange(e) {
11689
11732
  return changeInputHandle(e.target.value, 'sendName');
11690
11733
  },
11691
- value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
11734
+ value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
11692
11735
  }))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11693
11736
  disabled: disabled,
11694
11737
  placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
11695
11738
  onChange: function onChange(e) {
11696
11739
  return changeInputHandle(e.target.value, 'deliveryNo');
11697
11740
  },
11698
- value: (_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendName
11741
+ value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
11699
11742
  })) : null) : null);
11700
11743
  };
11701
11744
 
@@ -12550,12 +12593,144 @@ var bse3Columns = [{
12550
12593
  width: 100
12551
12594
  }];
12552
12595
 
12596
+ var getYesOrNo = function getYesOrNo(val) {
12597
+ if (!lodash.isBoolean(val)) return null;
12598
+ return val ? '是' : '否';
12599
+ };
12600
+ var kmColumns = [{
12601
+ dataIndex: 'goodName',
12602
+ title: '商品名称',
12603
+ width: 250,
12604
+ ellipsis: true
12605
+ }, {
12606
+ dataIndex: 'goodNo',
12607
+ title: '商品编码',
12608
+ width: 150,
12609
+ ellipsis: true
12610
+ }, {
12611
+ dataIndex: 'goodId',
12612
+ title: '商品ID',
12613
+ width: 200,
12614
+ ellipsis: true
12615
+ }, {
12616
+ dataIndex: 'goodPicUrl',
12617
+ title: "\u5546\u54C1\u56FE\u7247",
12618
+ width: 150,
12619
+ render: function render(val) {
12620
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
12621
+ width: 60,
12622
+ src: val
12623
+ });
12624
+ }
12625
+ }, {
12626
+ dataIndex: 'goodShortName',
12627
+ title: '商品简称',
12628
+ width: 200,
12629
+ ellipsis: true
12630
+ }, {
12631
+ dataIndex: 'goodBarcode',
12632
+ title: '商品条码',
12633
+ width: 200,
12634
+ ellipsis: true
12635
+ }, {
12636
+ dataIndex: 'brandName',
12637
+ title: "\u54C1\u724C\u540D\u79F0",
12638
+ ellipsis: true,
12639
+ width: 150
12640
+ }, {
12641
+ dataIndex: 'skuType',
12642
+ title: "\u5546\u54C1\u7C7B\u578B",
12643
+ ellipsis: true,
12644
+ width: 150
12645
+ }, {
12646
+ dataIndex: 'specName',
12647
+ title: "SKU\u540D\u79F0",
12648
+ ellipsis: true,
12649
+ width: 150
12650
+ }, {
12651
+ dataIndex: 'specNo',
12652
+ title: "SKU\u7F16\u7801",
12653
+ ellipsis: true,
12654
+ width: 150
12655
+ }, {
12656
+ dataIndex: 'specId',
12657
+ title: "SKU ID",
12658
+ ellipsis: true,
12659
+ width: 150
12660
+ }, {
12661
+ dataIndex: 'propertiesValue',
12662
+ title: "\u89C4\u683C\u503C",
12663
+ ellipsis: true,
12664
+ width: 150
12665
+ }, {
12666
+ dataIndex: 'skuShortTitle',
12667
+ title: "\u89C4\u683C\u7B80\u79F0",
12668
+ ellipsis: true,
12669
+ width: 150
12670
+ }, {
12671
+ dataIndex: 'specBarcode',
12672
+ title: "\u89C4\u683C\u6761\u7801",
12673
+ ellipsis: true,
12674
+ width: 150
12675
+ }, {
12676
+ dataIndex: 'specImgUrl',
12677
+ title: "SKU \u56FE\u7247",
12678
+ ellipsis: true,
12679
+ width: 150,
12680
+ render: function render(val) {
12681
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
12682
+ width: 60,
12683
+ src: val
12684
+ });
12685
+ }
12686
+ }, {
12687
+ dataIndex: 'isGift',
12688
+ title: "\u662F\u5426\u8D60\u54C1",
12689
+ ellipsis: true,
12690
+ width: 150,
12691
+ render: function render(val) {
12692
+ return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
12693
+ }
12694
+ }, {
12695
+ dataIndex: 'isVirtual',
12696
+ title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
12697
+ ellipsis: true,
12698
+ width: 150,
12699
+ render: function render(val) {
12700
+ return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
12701
+ }
12702
+ }, {
12703
+ dataIndex: 'isSkuItem',
12704
+ title: "\u662F\u5426\u542B\u6709SKU",
12705
+ ellipsis: true,
12706
+ width: 150,
12707
+ render: function render(val) {
12708
+ return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
12709
+ }
12710
+ }, {
12711
+ dataIndex: 'marketPrice',
12712
+ title: "\u5E02\u573A\u4EF7",
12713
+ ellipsis: true,
12714
+ width: 150
12715
+ }, {
12716
+ dataIndex: 'retailPrice',
12717
+ title: "\u96F6\u552E\u4EF7",
12718
+ ellipsis: true,
12719
+ width: 150
12720
+ }, {
12721
+ dataIndex: 'costPrice',
12722
+ title: "\u6210\u672C\u4EF7",
12723
+ ellipsis: true,
12724
+ width: 150
12725
+ }];
12726
+
12553
12727
  var getColumnsMap = function getColumnsMap() {
12554
12728
  return lodash.cloneDeep({
12555
12729
  gy: gyColumns,
12556
12730
  jst: jstColumns,
12557
12731
  wdt: wdtColumns,
12558
- bse3: bse3Columns
12732
+ bse3: bse3Columns,
12733
+ km: kmColumns
12559
12734
  });
12560
12735
  };
12561
12736
  var getColumnsBaseInfo = function getColumnsBaseInfo() {
@@ -12610,9 +12785,7 @@ var useGetColumns = (function (type) {
12610
12785
  loading = _useState4[0],
12611
12786
  setLoading = _useState4[1];
12612
12787
  var showColumnsDataIndexList = React.useMemo(function () {
12613
- return columns.filter(function (item) {
12614
- return Object.hasOwn(item, 'dataIndex');
12615
- }).map(function (item) {
12788
+ return columns.map(function (item) {
12616
12789
  return item.dataIndex;
12617
12790
  });
12618
12791
  }, [columns]);
@@ -13307,22 +13480,248 @@ var getTableData$2 = function getTableData(_ref, formData) {
13307
13480
  };
13308
13481
  });
13309
13482
  };
13310
- var searchFormData$1 = [{
13311
- label: '商品货号',
13312
- name: 'goodNo'
13313
- }, {
13483
+ var searchFormData$1 = [{
13484
+ label: '商品货号',
13485
+ name: 'goodNo'
13486
+ }, {
13487
+ label: '商品名称',
13488
+ name: 'goodName'
13489
+ }, {
13490
+ label: 'SKU',
13491
+ name: 'skuCode',
13492
+ dataIndex: 'specNo'
13493
+ }, {
13494
+ label: 'SKU ID',
13495
+ name: 'skuId',
13496
+ dataIndex: 'specId'
13497
+ }];
13498
+ var GoodList$2 = function GoodList(props, ref) {
13499
+ var _useState = React.useState([]),
13500
+ _useState2 = _slicedToArray(_useState, 2),
13501
+ selectList = _useState2[0],
13502
+ setSelect = _useState2[1];
13503
+ var _useState3 = React.useState([]),
13504
+ _useState4 = _slicedToArray(_useState3, 2),
13505
+ selectIds = _useState4[0],
13506
+ setSelectIds = _useState4[1];
13507
+ var _useGetColumns = useGetColumns('bse3'),
13508
+ _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13509
+ columns = _useGetColumns2[0],
13510
+ showColumnsDataIndexList = _useGetColumns2[1],
13511
+ loading = _useGetColumns2[2];
13512
+ React.useImperativeHandle(ref, function () {
13513
+ return {
13514
+ getSelectGoodList: function getSelectGoodList() {
13515
+ return selectList;
13516
+ }
13517
+ };
13518
+ });
13519
+ var _Form$useForm = antd.Form.useForm(),
13520
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13521
+ form = _Form$useForm2[0];
13522
+ var _useAntdTable = ahooks.useAntdTable(getTableData$2, {
13523
+ defaultPageSize: 10,
13524
+ form: form
13525
+ }),
13526
+ tableProps = _useAntdTable.tableProps,
13527
+ search = _useAntdTable.search,
13528
+ params = _useAntdTable.params;
13529
+ var submit = search.submit,
13530
+ reset = search.reset;
13531
+ var rowSelection = {
13532
+ selectedRowKeys: selectIds,
13533
+ fixed: true,
13534
+ onSelect: function onSelect(record, selected) {
13535
+ if (selected) {
13536
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
13537
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
13538
+ } else {
13539
+ setSelectIds(selectIds.filter(function (t) {
13540
+ return t !== record.specNo;
13541
+ }));
13542
+ setSelect(selectList.filter(function (t) {
13543
+ return t.specNo !== record.specNo;
13544
+ }));
13545
+ }
13546
+ },
13547
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
13548
+ if (selected) {
13549
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
13550
+ return t.specNo;
13551
+ }))));
13552
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
13553
+ } else {
13554
+ setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
13555
+ return t.specNo;
13556
+ })));
13557
+ var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
13558
+ return arrVal.specNo !== othVal.specNo;
13559
+ });
13560
+ setSelect(list);
13561
+ }
13562
+ }
13563
+ };
13564
+ var showTable = function showTable() {
13565
+ var handleDelete = function handleDelete(record) {
13566
+ setSelectIds(selectIds.filter(function (t) {
13567
+ return t !== record.specNo;
13568
+ }));
13569
+ setSelect(selectList.filter(function (t) {
13570
+ return t.specNo !== record.specNo;
13571
+ }));
13572
+ };
13573
+ var showColumns = [{
13574
+ dataIndex: '',
13575
+ title: "\u64CD\u4F5C",
13576
+ ellipsis: true,
13577
+ width: 100,
13578
+ render: function render(val, record) {
13579
+ return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13580
+ type: "link",
13581
+ onClick: function onClick() {
13582
+ return handleDelete(record);
13583
+ }
13584
+ }, "\u5220\u9664");
13585
+ }
13586
+ }].concat(lodash.takeRight(columns, columns.length - 1));
13587
+ return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
13588
+ style: {
13589
+ width: '100%',
13590
+ maxWidth: '387px'
13591
+ }
13592
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
13593
+ columns: showColumns,
13594
+ rowKey: 'specNo',
13595
+ dataSource: selectList,
13596
+ scroll: {
13597
+ x: '100%',
13598
+ y: 250
13599
+ },
13600
+ pagination: {
13601
+ size: 'small',
13602
+ total: selectIds.length,
13603
+ pageSize: 10,
13604
+ showSizeChanger: false
13605
+ }
13606
+ })) : null;
13607
+ };
13608
+ return /*#__PURE__*/React__default['default'].createElement(antd.Skeleton, {
13609
+ active: true,
13610
+ loading: loading
13611
+ }, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
13612
+ searchFormData: searchFormData$1,
13613
+ form: form,
13614
+ showColumnsDataIndexList: showColumnsDataIndexList,
13615
+ submit: submit,
13616
+ reset: reset
13617
+ }), /*#__PURE__*/React__default['default'].createElement("div", {
13618
+ style: {
13619
+ marginTop: '4px'
13620
+ }
13621
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
13622
+ rowSelection: rowSelection,
13623
+ rowKey: "specNo",
13624
+ columns: columns,
13625
+ scroll: {
13626
+ x: '100%',
13627
+ y: 250
13628
+ }
13629
+ }, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
13630
+ getPopupContainer: function getPopupContainer(triggerNode) {
13631
+ return triggerNode.parentElement;
13632
+ },
13633
+ content: showTable(),
13634
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
13635
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13636
+ danger: true,
13637
+ type: "text"
13638
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
13639
+ };
13640
+ var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$2);
13641
+
13642
+ var GoodsModal$4 = function GoodsModal(props, ref) {
13643
+ React.useImperativeHandle(ref, function () {
13644
+ return {
13645
+ open: function open() {
13646
+ setVisible(true);
13647
+ }
13648
+ };
13649
+ });
13650
+ var onSubmit = props.onSubmit,
13651
+ width = props.width;
13652
+ var _useState = React.useState(false),
13653
+ _useState2 = _slicedToArray(_useState, 2),
13654
+ visible = _useState2[0],
13655
+ setVisible = _useState2[1];
13656
+ var bsE3GoodListRef = React.useRef(null);
13657
+ var _onCancel = function onCancel() {
13658
+ setVisible(false);
13659
+ };
13660
+ var onOk = function onOk() {
13661
+ var _bsE3GoodListRef$curr;
13662
+ var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
13663
+ onSubmit(selectedList);
13664
+ _onCancel();
13665
+ };
13666
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
13667
+ title: '选择商品',
13668
+ okText: '确认',
13669
+ cancelText: '取消',
13670
+ visible: visible,
13671
+ width: width || 850,
13672
+ onCancel: function onCancel() {
13673
+ _onCancel();
13674
+ },
13675
+ onOk: onOk,
13676
+ wrapClassName: "goodModal"
13677
+ }, /*#__PURE__*/React__default['default'].createElement(BsE3GoodList, {
13678
+ ref: bsE3GoodListRef
13679
+ })));
13680
+ };
13681
+ var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
13682
+
13683
+ var rowCheckKey = 'id';
13684
+ var getTableData$3 = function getTableData(_ref, formData) {
13685
+ var current = _ref.current,
13686
+ pageSize = _ref.pageSize;
13687
+ return extendRequest('/qy/gdfw/product/product/page', {
13688
+ method: 'post',
13689
+ data: _objectSpread2({
13690
+ pageSize: pageSize,
13691
+ pageNo: current,
13692
+ platform: 'KM_ERP'
13693
+ }, formData)
13694
+ }).then(function (res) {
13695
+ var _res$data = res.data,
13696
+ _res$data$productSkuL = _res$data.productSkuList,
13697
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
13698
+ _res$data$total = _res$data.total,
13699
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
13700
+ var newProducts = productSkuList.map(function (item, index) {
13701
+ return _objectSpread2({}, item);
13702
+ });
13703
+ return {
13704
+ total: total,
13705
+ list: newProducts
13706
+ };
13707
+ });
13708
+ };
13709
+ var searchFormData$2 = [{
13314
13710
  label: '商品名称',
13315
13711
  name: 'goodName'
13316
13712
  }, {
13317
- label: 'SKU',
13713
+ label: '商品编码',
13714
+ name: 'goodNo'
13715
+ }, {
13716
+ label: 'SKU名称',
13717
+ name: 'skuName',
13718
+ dataIndex: 'specName'
13719
+ }, {
13720
+ label: 'SKU编码',
13318
13721
  name: 'skuCode',
13319
13722
  dataIndex: 'specNo'
13320
- }, {
13321
- label: 'SKU ID',
13322
- name: 'skuId',
13323
- dataIndex: 'specId'
13324
13723
  }];
13325
- var GoodList$2 = function GoodList(props, ref) {
13724
+ var GoodList$3 = function GoodList(props, ref) {
13326
13725
  var _useState = React.useState([]),
13327
13726
  _useState2 = _slicedToArray(_useState, 2),
13328
13727
  selectList = _useState2[0],
@@ -13331,7 +13730,7 @@ var GoodList$2 = function GoodList(props, ref) {
13331
13730
  _useState4 = _slicedToArray(_useState3, 2),
13332
13731
  selectIds = _useState4[0],
13333
13732
  setSelectIds = _useState4[1];
13334
- var _useGetColumns = useGetColumns('bse3'),
13733
+ var _useGetColumns = useGetColumns('km'),
13335
13734
  _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13336
13735
  columns = _useGetColumns2[0],
13337
13736
  showColumnsDataIndexList = _useGetColumns2[1],
@@ -13346,7 +13745,7 @@ var GoodList$2 = function GoodList(props, ref) {
13346
13745
  var _Form$useForm = antd.Form.useForm(),
13347
13746
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13348
13747
  form = _Form$useForm2[0];
13349
- var _useAntdTable = ahooks.useAntdTable(getTableData$2, {
13748
+ var _useAntdTable = ahooks.useAntdTable(getTableData$3, {
13350
13749
  defaultPageSize: 10,
13351
13750
  form: form
13352
13751
  }),
@@ -13360,41 +13759,50 @@ var GoodList$2 = function GoodList(props, ref) {
13360
13759
  fixed: true,
13361
13760
  onSelect: function onSelect(record, selected) {
13362
13761
  if (selected) {
13363
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
13762
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
13364
13763
  setSelect([].concat(_toConsumableArray(selectList), [record]));
13365
13764
  } else {
13366
13765
  setSelectIds(selectIds.filter(function (t) {
13367
- return t !== record.specNo;
13766
+ return t !== record[rowCheckKey];
13368
13767
  }));
13369
13768
  setSelect(selectList.filter(function (t) {
13370
- return t.specNo !== record.specNo;
13769
+ return t[rowCheckKey] !== record[rowCheckKey];
13371
13770
  }));
13372
13771
  }
13373
13772
  },
13374
13773
  onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
13375
13774
  if (selected) {
13376
13775
  setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
13377
- return t.specNo;
13776
+ return t[rowCheckKey];
13378
13777
  }))));
13379
13778
  setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
13380
13779
  } else {
13381
13780
  setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
13382
- return t.specNo;
13781
+ return t[rowCheckKey];
13383
13782
  })));
13384
13783
  var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
13385
- return arrVal.specNo !== othVal.specNo;
13784
+ return arrVal[rowCheckKey] !== othVal[rowCheckKey];
13386
13785
  });
13387
13786
  setSelect(list);
13388
13787
  }
13788
+ },
13789
+ getCheckboxProps: function getCheckboxProps(record) {
13790
+ var options = {
13791
+ disabled: (props.selectedRows || []).map(function (row) {
13792
+ return row[rowCheckKey] || row.skuId;
13793
+ }).includes(record[rowCheckKey] || record.skuId),
13794
+ name: record[rowCheckKey]
13795
+ };
13796
+ return options;
13389
13797
  }
13390
13798
  };
13391
13799
  var showTable = function showTable() {
13392
13800
  var handleDelete = function handleDelete(record) {
13393
13801
  setSelectIds(selectIds.filter(function (t) {
13394
- return t !== record.specNo;
13802
+ return t !== record[rowCheckKey];
13395
13803
  }));
13396
13804
  setSelect(selectList.filter(function (t) {
13397
- return t.specNo !== record.specNo;
13805
+ return t[rowCheckKey] !== record[rowCheckKey];
13398
13806
  }));
13399
13807
  };
13400
13808
  var showColumns = [{
@@ -13418,7 +13826,7 @@ var GoodList$2 = function GoodList(props, ref) {
13418
13826
  }
13419
13827
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
13420
13828
  columns: showColumns,
13421
- rowKey: 'specNo',
13829
+ rowKey: rowCheckKey,
13422
13830
  dataSource: selectList,
13423
13831
  scroll: {
13424
13832
  x: '100%',
@@ -13436,7 +13844,7 @@ var GoodList$2 = function GoodList(props, ref) {
13436
13844
  active: true,
13437
13845
  loading: loading
13438
13846
  }, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
13439
- searchFormData: searchFormData$1,
13847
+ searchFormData: searchFormData$2,
13440
13848
  form: form,
13441
13849
  showColumnsDataIndexList: showColumnsDataIndexList,
13442
13850
  submit: submit,
@@ -13447,7 +13855,7 @@ var GoodList$2 = function GoodList(props, ref) {
13447
13855
  }
13448
13856
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
13449
13857
  rowSelection: rowSelection,
13450
- rowKey: "specNo",
13858
+ rowKey: rowCheckKey,
13451
13859
  columns: columns,
13452
13860
  scroll: {
13453
13861
  x: '100%',
@@ -13464,13 +13872,15 @@ var GoodList$2 = function GoodList(props, ref) {
13464
13872
  type: "text"
13465
13873
  }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
13466
13874
  };
13467
- var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$2);
13875
+ var ErpGoodsList = /*#__PURE__*/React.forwardRef(GoodList$3);
13468
13876
 
13469
- var GoodsModal$4 = function GoodsModal(props, ref) {
13877
+ var ErpGoodsModal = function ErpGoodsModal(props, ref) {
13470
13878
  React.useImperativeHandle(ref, function () {
13471
13879
  return {
13472
- open: function open() {
13880
+ open: function open(shopCode) {
13881
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13473
13882
  setVisible(true);
13883
+ setSelectedRows(options.value || []);
13474
13884
  }
13475
13885
  };
13476
13886
  });
@@ -13480,13 +13890,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
13480
13890
  _useState2 = _slicedToArray(_useState, 2),
13481
13891
  visible = _useState2[0],
13482
13892
  setVisible = _useState2[1];
13483
- var bsE3GoodListRef = React.useRef(null);
13893
+ var _useState3 = React.useState([]),
13894
+ _useState4 = _slicedToArray(_useState3, 2),
13895
+ selectedRows = _useState4[0],
13896
+ setSelectedRows = _useState4[1];
13897
+ var erpGoodsListRef = React.useRef(null);
13484
13898
  var _onCancel = function onCancel() {
13485
13899
  setVisible(false);
13486
13900
  };
13487
13901
  var onOk = function onOk() {
13488
- var _bsE3GoodListRef$curr;
13489
- var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
13902
+ var _erpGoodsListRef$curr;
13903
+ var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
13490
13904
  onSubmit(selectedList);
13491
13905
  _onCancel();
13492
13906
  };
@@ -13501,13 +13915,14 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
13501
13915
  },
13502
13916
  onOk: onOk,
13503
13917
  wrapClassName: "goodModal"
13504
- }, /*#__PURE__*/React__default['default'].createElement(BsE3GoodList, {
13505
- ref: bsE3GoodListRef
13918
+ }, /*#__PURE__*/React__default['default'].createElement(ErpGoodsList, {
13919
+ ref: erpGoodsListRef,
13920
+ selectedRows: selectedRows
13506
13921
  })));
13507
13922
  };
13508
- var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
13923
+ var KmGoodsModal = /*#__PURE__*/React.forwardRef(ErpGoodsModal);
13509
13924
 
13510
- var getTableData$3 = function getTableData(_ref, formData) {
13925
+ var getTableData$4 = function getTableData(_ref, formData) {
13511
13926
  var current = _ref.current,
13512
13927
  pageSize = _ref.pageSize;
13513
13928
  var data = {
@@ -13539,7 +13954,7 @@ var getTableData$3 = function getTableData(_ref, formData) {
13539
13954
  };
13540
13955
  });
13541
13956
  };
13542
- var searchFormData$2 = [{
13957
+ var searchFormData$3 = [{
13543
13958
  label: '商品简称',
13544
13959
  name: 'goodShortName'
13545
13960
  }, {
@@ -13557,7 +13972,7 @@ var searchFormData$2 = [{
13557
13972
  label: '商品编码',
13558
13973
  name: 'goodNo'
13559
13974
  }];
13560
- var GoodList$3 = function GoodList(props, ref) {
13975
+ var GoodList$4 = function GoodList(props, ref) {
13561
13976
  var _useState = React.useState([]),
13562
13977
  _useState2 = _slicedToArray(_useState, 2),
13563
13978
  selectList = _useState2[0],
@@ -13581,7 +13996,7 @@ var GoodList$3 = function GoodList(props, ref) {
13581
13996
  var _Form$useForm = antd.Form.useForm(),
13582
13997
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13583
13998
  form = _Form$useForm2[0];
13584
- var _useAntdTable = ahooks.useAntdTable(getTableData$3, {
13999
+ var _useAntdTable = ahooks.useAntdTable(getTableData$4, {
13585
14000
  defaultPageSize: 10,
13586
14001
  form: form
13587
14002
  }),
@@ -13671,7 +14086,7 @@ var GoodList$3 = function GoodList(props, ref) {
13671
14086
  active: true,
13672
14087
  loading: loading
13673
14088
  }, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
13674
- searchFormData: searchFormData$2,
14089
+ searchFormData: searchFormData$3,
13675
14090
  form: form,
13676
14091
  showColumnsDataIndexList: showColumnsDataIndexList,
13677
14092
  submit: submit,
@@ -13699,7 +14114,7 @@ var GoodList$3 = function GoodList(props, ref) {
13699
14114
  type: "text"
13700
14115
  }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
13701
14116
  };
13702
- var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$3);
14117
+ var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$4);
13703
14118
 
13704
14119
  var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13705
14120
  React.useImperativeHandle(ref, function () {
@@ -14448,6 +14863,10 @@ var getColumns$2 = function getColumns(_ref) {
14448
14863
  label: '组合装',
14449
14864
  value: '2'
14450
14865
  }];
14866
+ var typeMap = {
14867
+ '1': '单品',
14868
+ '2': '组合装'
14869
+ };
14451
14870
  return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14452
14871
  style: {
14453
14872
  width: 70
@@ -14457,7 +14876,7 @@ var getColumns$2 = function getColumns(_ref) {
14457
14876
  onChange: function onChange(value) {
14458
14877
  return updateHandle(value, index, 'type');
14459
14878
  }
14460
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14879
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
14461
14880
  }
14462
14881
  }],
14463
14882
  //旺店通换出商品信息
@@ -14569,6 +14988,10 @@ var getColumns$2 = function getColumns(_ref) {
14569
14988
  label: '组合装',
14570
14989
  value: '2'
14571
14990
  }];
14991
+ var typeMap = {
14992
+ '1': '单品',
14993
+ '2': '组合装'
14994
+ };
14572
14995
  return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14573
14996
  style: {
14574
14997
  width: 70
@@ -14578,13 +15001,13 @@ var getColumns$2 = function getColumns(_ref) {
14578
15001
  onChange: function onChange(value) {
14579
15002
  return updateHandle(value, index, 'type');
14580
15003
  }
14581
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
15004
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
14582
15005
  }
14583
15006
  }]
14584
15007
  };
14585
15008
  };
14586
15009
 
14587
- var getYesOrNo = function getYesOrNo(val) {
15010
+ var getYesOrNo$1 = function getYesOrNo(val) {
14588
15011
  if (kmkfUtils.isNull(val)) return null;
14589
15012
  return val ? '是' : '否';
14590
15013
  };
@@ -14722,7 +15145,7 @@ var getColumns$3 = function getColumns(_ref) {
14722
15145
  label: '否',
14723
15146
  value: false
14724
15147
  }]
14725
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
15148
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
14726
15149
  },
14727
15150
  width: 100
14728
15151
  }]
@@ -14734,7 +15157,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
14734
15157
  if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
14735
15158
  return false;
14736
15159
  };
14737
- var getYesOrNo$1 = function getYesOrNo(val) {
15160
+ var getYesOrNo$2 = function getYesOrNo(val) {
14738
15161
  if (kmkfUtils.isNull(val)) return null;
14739
15162
  return val ? '是' : '否';
14740
15163
  };
@@ -14844,7 +15267,7 @@ var getColumns$4 = function getColumns(_ref) {
14844
15267
  title: "\u662F\u5426\u53D6\u6D88",
14845
15268
  width: 150,
14846
15269
  render: function render(val) {
14847
- return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
15270
+ return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
14848
15271
  }
14849
15272
  }, {
14850
15273
  dataIndex: 'isGift',
@@ -14863,7 +15286,7 @@ var getColumns$4 = function getColumns(_ref) {
14863
15286
  label: '否',
14864
15287
  value: 0
14865
15288
  }]
14866
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
15289
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
14867
15290
  }
14868
15291
  }, {
14869
15292
  dataIndex: 'skuNote',
@@ -14983,7 +15406,7 @@ var getColumns$4 = function getColumns(_ref) {
14983
15406
  label: '否',
14984
15407
  value: 0
14985
15408
  }]
14986
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
15409
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
14987
15410
  }
14988
15411
  }].map(function (item) {
14989
15412
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -15107,7 +15530,7 @@ var getColumns$4 = function getColumns(_ref) {
15107
15530
  label: '否',
15108
15531
  value: 0
15109
15532
  }]
15110
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
15533
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
15111
15534
  }
15112
15535
  }].map(function (item) {
15113
15536
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -15229,7 +15652,7 @@ var getColumns$5 = function getColumns() {
15229
15652
  ellipsis: true,
15230
15653
  align: 'center',
15231
15654
  render: function render(val, record, index) {
15232
- return (record.qty || 0) * (+record.salePrice || 0);
15655
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15233
15656
  }
15234
15657
  }, {
15235
15658
  dataIndex: 'batchId',
@@ -15505,7 +15928,7 @@ var getColumns$5 = function getColumns() {
15505
15928
  dataIndex: 'saleAmount',
15506
15929
  title: '总金额',
15507
15930
  render: function render(val, record) {
15508
- return (record.qty || 0) * (+record.salePrice || 0);
15931
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15509
15932
  }
15510
15933
  }, {
15511
15934
  dataIndex: 'batchId',
@@ -15614,7 +16037,7 @@ var getColumns$5 = function getColumns() {
15614
16037
  dataIndex: 'saleAmount',
15615
16038
  title: '总金额',
15616
16039
  render: function render(val, record) {
15617
- return (record.qty || 0) * (+record.salePrice || 0);
16040
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15618
16041
  }
15619
16042
  }, {
15620
16043
  dataIndex: 'isGift',
@@ -15654,6 +16077,104 @@ var getColumns$5 = function getColumns() {
15654
16077
  };
15655
16078
 
15656
16079
  var getColumns$6 = function getColumns(_ref) {
16080
+ var _ref$text = _ref.text,
16081
+ disabled = _ref.disabled,
16082
+ updateHandle = _ref.updateHandle;
16083
+ return {
16084
+ KM_GOODS: [{
16085
+ dataIndex: 'sysSkuPropertiesName',
16086
+ title: "\u89C4\u683C\u540D\u79F0",
16087
+ width: 250
16088
+ }, {
16089
+ dataIndex: 'sysTitle',
16090
+ title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
16091
+ width: 150
16092
+ }, {
16093
+ dataIndex: 'title',
16094
+ title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
16095
+ width: 150
16096
+ }, {
16097
+ dataIndex: 'shortTitle',
16098
+ title: "\u5546\u54C1\u7B80\u79F0",
16099
+ width: 150
16100
+ }, {
16101
+ dataIndex: 'sysOuterId',
16102
+ title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
16103
+ width: 150
16104
+ }, {
16105
+ dataIndex: 'outerId',
16106
+ title: "\u5546\u5BB6\u7F16\u7801",
16107
+ width: 150
16108
+ }, {
16109
+ dataIndex: 'skuSysId',
16110
+ title: "\u7CFB\u7EDF\u89C4\u683CID",
16111
+ width: 150
16112
+ }, {
16113
+ dataIndex: 'itemSysId',
16114
+ title: "\u7CFB\u7EDF\u5546\u54C1ID",
16115
+ width: 150
16116
+ }, {
16117
+ dataIndex: 'sysPicPath',
16118
+ title: "\u5546\u54C1\u56FE\u7247",
16119
+ width: 100,
16120
+ render: function render(val) {
16121
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
16122
+ width: 60,
16123
+ src: val
16124
+ });
16125
+ }
16126
+ }, {
16127
+ dataIndex: 'num',
16128
+ title: "\u6570\u91CF",
16129
+ width: 100,
16130
+ render: function render(val, record, index) {
16131
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
16132
+ style: {
16133
+ width: 70
16134
+ },
16135
+ value: val,
16136
+ min: 1,
16137
+ precision: 0,
16138
+ onChange: function onChange(num) {
16139
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
16140
+ }
16141
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
16142
+ }
16143
+ }, {
16144
+ dataIndex: 'payment',
16145
+ title: "\u5B9E\u4ED8\u91D1\u989D",
16146
+ width: 150,
16147
+ render: function render(val, record, index) {
16148
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
16149
+ style: {
16150
+ width: 130
16151
+ },
16152
+ value: val,
16153
+ min: 0,
16154
+ precision: 2,
16155
+ onChange: function onChange(num) {
16156
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
16157
+ }
16158
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
16159
+ }
16160
+ }, {
16161
+ dataIndex: 'price',
16162
+ title: "\u5546\u54C1\u9500\u552E\u4EF7",
16163
+ width: 150
16164
+ }, {
16165
+ dataIndex: 'type',
16166
+ title: "\u5546\u54C1\u7C7B\u578B",
16167
+ width: 150
16168
+ }].map(function (item) {
16169
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16170
+ align: 'center',
16171
+ ellipsis: true
16172
+ });
16173
+ })
16174
+ };
16175
+ };
16176
+
16177
+ var getColumns$7 = function getColumns(_ref) {
15657
16178
  var _ref$text = _ref.text,
15658
16179
  text = _ref$text === void 0 ? '' : _ref$text,
15659
16180
  disabled = _ref.disabled,
@@ -15766,7 +16287,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15766
16287
  disabled = _ref.disabled,
15767
16288
  updateHandle = _ref.updateHandle,
15768
16289
  updateDataHandle = _ref.updateDataHandle;
15769
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
16290
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
15770
16291
  text: text,
15771
16292
  disabled: disabled,
15772
16293
  updateHandle: updateHandle
@@ -15791,8 +16312,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15791
16312
  text: text,
15792
16313
  disabled: disabled,
15793
16314
  updateHandle: updateHandle
16315
+ })), getColumns$6({
16316
+ text: text,
16317
+ disabled: disabled,
16318
+ updateHandle: updateHandle
15794
16319
  })), {}, {
15795
- default: getColumns$6({
16320
+ default: getColumns$7({
15796
16321
  text: text,
15797
16322
  disabled: disabled,
15798
16323
  updateHandle: updateHandle
@@ -15944,6 +16469,222 @@ function HoverTableRowDeleteIcon(_ref) {
15944
16469
  })));
15945
16470
  }
15946
16471
 
16472
+ var isErpType = {
16473
+ isWdt: function isWdt(type) {
16474
+ return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
16475
+ },
16476
+ isBsE3: function isBsE3(type) {
16477
+ return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
16478
+ },
16479
+ isGy: function isGy(type) {
16480
+ return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
16481
+ },
16482
+ isJst: function isJst(type) {
16483
+ return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
16484
+ },
16485
+ isKm: function isKm(type) {
16486
+ return ['KM_GOODS'].includes(type);
16487
+ }
16488
+ };
16489
+ var processGoods = function processGoods(_ref) {
16490
+ var list = _ref.list,
16491
+ type = _ref.type,
16492
+ canUpdateNumber = _ref.canUpdateNumber;
16493
+ var newList = [];
16494
+ // 根据商品类型处理数据
16495
+ if (isErpType.isWdt(type)) {
16496
+ newList = processWdtGoods({
16497
+ list: list,
16498
+ type: type,
16499
+ canUpdateNumber: canUpdateNumber
16500
+ });
16501
+ } else if (isErpType.isBsE3(type)) {
16502
+ newList = processBsE3Goods({
16503
+ list: list,
16504
+ type: type,
16505
+ canUpdateNumber: canUpdateNumber
16506
+ });
16507
+ } else if (isErpType.isGy(type)) {
16508
+ newList = processGyGoods({
16509
+ list: list,
16510
+ type: type,
16511
+ canUpdateNumber: canUpdateNumber
16512
+ });
16513
+ } else if (isErpType.isJst(type)) {
16514
+ newList = processJstGoods({
16515
+ list: list,
16516
+ type: type,
16517
+ canUpdateNumber: canUpdateNumber
16518
+ });
16519
+ } else if (isErpType.isKm(type)) {
16520
+ newList = processKmGoods({
16521
+ list: list,
16522
+ type: type,
16523
+ canUpdateNumber: canUpdateNumber
16524
+ });
16525
+ } else {
16526
+ newList = processDefaultGoods({
16527
+ list: list,
16528
+ type: type,
16529
+ canUpdateNumber: canUpdateNumber
16530
+ });
16531
+ }
16532
+ return newList;
16533
+ };
16534
+ // 处理不同类型的商品数据
16535
+ var processWdtGoods = function processWdtGoods(_ref2) {
16536
+ var list = _ref2.list,
16537
+ type = _ref2.type,
16538
+ canUpdateNumber = _ref2.canUpdateNumber;
16539
+ return list.map(function (item) {
16540
+ var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
16541
+ uuid: kmkfUtils.uuid(),
16542
+ canDelete: true,
16543
+ num: 1,
16544
+ orderPrice: 0,
16545
+ sharePrice: 0,
16546
+ canUpdateNumber: canUpdateNumber
16547
+ });
16548
+ // 特殊处理换货商品
16549
+ if (type === 'WDT_EXCHANGE_GOODS') {
16550
+ processedItem.price = item.retailPrice;
16551
+ processedItem.type = '1';
16552
+ }
16553
+ return processedItem;
16554
+ });
16555
+ };
16556
+ var processBsE3Goods = function processBsE3Goods(_ref3) {
16557
+ var list = _ref3.list,
16558
+ canUpdateNumber = _ref3.canUpdateNumber;
16559
+ return list.map(function (item) {
16560
+ var specNo = item.specNo,
16561
+ specId = item.specId,
16562
+ goodName = item.goodName,
16563
+ goodShortName = item.goodShortName,
16564
+ goodPicUrl = item.goodPicUrl,
16565
+ goodNo = item.goodNo,
16566
+ goodId = item.goodId,
16567
+ retailPrice = item.retailPrice;
16568
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16569
+ sku: specNo,
16570
+ skuId: specId,
16571
+ goodsName: goodName,
16572
+ goodsShortName: goodShortName,
16573
+ picPath: goodPicUrl,
16574
+ goodsSn: goodNo,
16575
+ goodsId: goodId,
16576
+ goodsPrice: retailPrice,
16577
+ shopPrice: retailPrice,
16578
+ sharePayment: '',
16579
+ sharePrice: '',
16580
+ payment: '',
16581
+ tcSku: '',
16582
+ tcGoodsNumber: '',
16583
+ taoCanSingleSl: '',
16584
+ isGift: '',
16585
+ uuid: kmkfUtils.uuid(),
16586
+ canDelete: true,
16587
+ canEdit: true,
16588
+ goodsNumber: 1,
16589
+ canUpdateNumber: canUpdateNumber
16590
+ });
16591
+ });
16592
+ };
16593
+ var processGyGoods = function processGyGoods(_ref4) {
16594
+ var list = _ref4.list;
16595
+ return list.map(function (item) {
16596
+ var goodName = item.goodName,
16597
+ goodShortName = item.goodShortName,
16598
+ goodNo = item.goodNo,
16599
+ specName = item.specName,
16600
+ specNo = item.specNo,
16601
+ retailPrice = item.retailPrice;
16602
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16603
+ uuid: kmkfUtils.uuid(),
16604
+ canDelete: true,
16605
+ canEdit: true,
16606
+ qty: 1,
16607
+ goodName: goodName,
16608
+ goodShortName: goodShortName,
16609
+ goodNo: goodNo,
16610
+ specName: specName,
16611
+ specNo: specNo,
16612
+ originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
16613
+ originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
16614
+ });
16615
+ });
16616
+ };
16617
+ var processJstGoods = function processJstGoods(_ref5) {
16618
+ var list = _ref5.list;
16619
+ return list.map(function (item) {
16620
+ return {
16621
+ name: item.goodName,
16622
+ skuId: item.goodNo,
16623
+ iId: item.styleCode,
16624
+ pic: item.goodPicUrl,
16625
+ propertiesValue: item.propertiesValue,
16626
+ saleBasePrice: item.retailPrice,
16627
+ salePrice: item.retailPrice,
16628
+ remark: '',
16629
+ uuid: kmkfUtils.uuid(),
16630
+ canDelete: true,
16631
+ canEdit: true,
16632
+ qty: 1
16633
+ };
16634
+ });
16635
+ };
16636
+ var processKmGoods = function processKmGoods(_ref6) {
16637
+ var list = _ref6.list;
16638
+ return list.map(function (item) {
16639
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16640
+ sysSkuPropertiesName: item.specName,
16641
+ sysTitle: item.goodName,
16642
+ title: null,
16643
+ shortTitle: item.goodShortName,
16644
+ sysOuterId: item.goodNo,
16645
+ outerId: item.goodNo,
16646
+ skuSysId: item.specId,
16647
+ itemSysId: item.goodId,
16648
+ sysPicPath: item.goodPicUrl,
16649
+ payment: null,
16650
+ price: item.retailPrice,
16651
+ type: null,
16652
+ uuid: kmkfUtils.uuid(),
16653
+ canDelete: true,
16654
+ canEdit: true,
16655
+ num: 1
16656
+ });
16657
+ });
16658
+ };
16659
+ var processDefaultGoods = function processDefaultGoods(_ref7) {
16660
+ var list = _ref7.list,
16661
+ canUpdateNumber = _ref7.canUpdateNumber;
16662
+ return list.map(function (item) {
16663
+ var goodsId = item.goodsId,
16664
+ name = item.name,
16665
+ code = item.code,
16666
+ skuCode = item.skuCode,
16667
+ marketPrice = item.marketPrice,
16668
+ skuName = item.skuName;
16669
+ return {
16670
+ id: goodsId,
16671
+ mark: '是',
16672
+ pic: '',
16673
+ skuName: skuName,
16674
+ name: name,
16675
+ code: code,
16676
+ sku: skuCode,
16677
+ money: marketPrice || 0,
16678
+ share: marketPrice || 0,
16679
+ number: 1,
16680
+ type: '',
16681
+ uuid: kmkfUtils.uuid(),
16682
+ canDelete: true,
16683
+ canUpdateNumber: canUpdateNumber
16684
+ };
16685
+ });
16686
+ };
16687
+
15947
16688
  var GoodsModalMap = {
15948
16689
  WDT_REISSUE_GOODS: WdtGoodsModal,
15949
16690
  WDT_GOODS: WdtGoodsModal,
@@ -15953,10 +16694,12 @@ var GoodsModalMap = {
15953
16694
  BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
15954
16695
  GY_GOODS: GyGoodsModal$2,
15955
16696
  GY_REISSUE_GOODS: GyGoodsModal$2,
16697
+ GY_RETURN_GOODS: GyGoodsModal$2,
15956
16698
  JST_GOODS: JstGoodsModal,
15957
16699
  JST_REISSUE_GOODS: JstGoodsModal,
15958
16700
  JST_RETURN_GOODS: JstGoodsModal,
15959
16701
  JST_EXCHANGE_GOODS: JstGoodsModal,
16702
+ KM_GOODS: KmGoodsModal,
15960
16703
  OTHER_GOODS: GoodsModal$2
15961
16704
  };
15962
16705
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
@@ -15990,7 +16733,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
15990
16733
  return item === null || item === void 0 ? void 0 : item[uniqueKey];
15991
16734
  }));
15992
16735
  var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
15993
- console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
16736
+ // console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
15994
16737
  onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
15995
16738
  };
15996
16739
  var rowSelection = {
@@ -16019,13 +16762,16 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
16019
16762
  };
16020
16763
  var getButtonText = function getButtonText() {
16021
16764
  var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
16765
+ if (['KM_GOODS'].includes(type)) {
16766
+ return '选择快麦ERP商品';
16767
+ }
16022
16768
  if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
16023
16769
  return '选择百胜ERP商品';
16024
16770
  }
16025
16771
  if (['WDT_REISSUE_GOODS'].includes(type)) {
16026
16772
  return '选择旺店通商品';
16027
16773
  }
16028
- if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16774
+ if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
16029
16775
  return '选择管易ERP商品';
16030
16776
  }
16031
16777
  if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
@@ -16162,6 +16908,7 @@ var GoodItem$1 = function GoodItem(props) {
16162
16908
  case 'JST_RETURN_GOODS':
16163
16909
  case 'GY_REISSUE_GOODS':
16164
16910
  case 'GY_RETURN_GOODS':
16911
+ case 'KM_GOODS':
16165
16912
  {
16166
16913
  columns = getColumnsMap$1({
16167
16914
  text: text,
@@ -16279,120 +17026,11 @@ var GoodItem$1 = function GoodItem(props) {
16279
17026
  }].concat(_toConsumableArray(columns));
16280
17027
  }, []);
16281
17028
  var onSubmit = function onSubmit(list) {
16282
- var newList = [];
16283
- if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
16284
- newList = list.map(function (item) {
16285
- item.uuid = kmkfUtils.uuid();
16286
- item.canDelete = true;
16287
- item.num = 1;
16288
- item.orderPrice = 0;
16289
- item.sharePrice = 0;
16290
- item.canUpdateNumber = canUpdateNumber;
16291
- if (type === 'WDT_EXCHANGE_GOODS') {
16292
- item.price = item.retailPrice;
16293
- item.type = '1';
16294
- }
16295
- return item;
16296
- });
16297
- } else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
16298
- newList = list.map(function (item) {
16299
- var specNo = item.specNo,
16300
- specId = item.specId,
16301
- goodName = item.goodName,
16302
- goodShortName = item.goodShortName,
16303
- goodPicUrl = item.goodPicUrl,
16304
- goodNo = item.goodNo,
16305
- goodId = item.goodId,
16306
- retailPrice = item.retailPrice;
16307
- return _objectSpread2(_objectSpread2({}, item), {}, {
16308
- sku: specNo,
16309
- skuId: specId,
16310
- goodsName: goodName,
16311
- goodsShortName: goodShortName,
16312
- picPath: goodPicUrl,
16313
- goodsSn: goodNo,
16314
- goodsId: goodId,
16315
- goodsPrice: retailPrice,
16316
- shopPrice: retailPrice,
16317
- sharePayment: '',
16318
- sharePrice: '',
16319
- payment: '',
16320
- tcSku: '',
16321
- tcGoodsNumber: '',
16322
- taoCanSingleSl: '',
16323
- isGift: '',
16324
- uuid: kmkfUtils.uuid(),
16325
- canDelete: true,
16326
- canEdit: true,
16327
- goodsNumber: 1,
16328
- canUpdateNumber: canUpdateNumber
16329
- });
16330
- });
16331
- } else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16332
- newList = list.map(function (item) {
16333
- var goodName = item.goodName,
16334
- goodShortName = item.goodShortName,
16335
- goodNo = item.goodNo,
16336
- specName = item.specName,
16337
- specNo = item.specNo,
16338
- retailPrice = item.retailPrice;
16339
- return _objectSpread2(_objectSpread2({}, item), {}, {
16340
- uuid: kmkfUtils.uuid(),
16341
- canDelete: true,
16342
- canEdit: true,
16343
- qty: 1,
16344
- goodName: goodName,
16345
- goodShortName: goodShortName,
16346
- goodNo: goodNo,
16347
- specName: specName,
16348
- specNo: specNo,
16349
- originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
16350
- originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
16351
- });
16352
- });
16353
- } else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
16354
- newList = list.map(function (item) {
16355
- return {
16356
- name: item.goodName,
16357
- skuId: item.goodNo,
16358
- iId: item.styleCode,
16359
- pic: item.goodPicUrl,
16360
- propertiesValue: item.propertiesValue,
16361
- saleBasePrice: item.retailPrice,
16362
- salePrice: item.retailPrice,
16363
- remark: '',
16364
- uuid: kmkfUtils.uuid(),
16365
- canDelete: true,
16366
- canEdit: true,
16367
- qty: 1
16368
- };
16369
- });
16370
- } else {
16371
- newList = list.map(function (item) {
16372
- var goodsId = item.goodsId,
16373
- name = item.name,
16374
- code = item.code,
16375
- skuCode = item.skuCode,
16376
- marketPrice = item.marketPrice,
16377
- skuName = item.skuName;
16378
- return {
16379
- id: goodsId,
16380
- mark: '是',
16381
- pic: '',
16382
- skuName: skuName,
16383
- name: name,
16384
- code: code,
16385
- sku: skuCode,
16386
- money: marketPrice || 0,
16387
- share: marketPrice || 0,
16388
- number: 1,
16389
- type: '',
16390
- uuid: kmkfUtils.uuid(),
16391
- canDelete: true,
16392
- canUpdateNumber: canUpdateNumber
16393
- };
16394
- });
16395
- }
17029
+ var newList = processGoods({
17030
+ list: list,
17031
+ canUpdateNumber: canUpdateNumber,
17032
+ type: type
17033
+ });
16396
17034
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
16397
17035
  };
16398
17036
  var onSelectChange = function onSelectChange(newSelectedRowKeys) {
@@ -17106,10 +17744,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
17106
17744
  var _data$data, _data$data$trades;
17107
17745
  if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
17108
17746
  data.data.trades = kmkfUtils.filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
17747
+ var _tradeStatusMap$data$;
17109
17748
  return _objectSpread2(_objectSpread2({}, item), {}, {
17110
17749
  billNo: item.tradeNo,
17111
17750
  billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
17112
- billTag: item.tagName
17751
+ billTag: item.tagName,
17752
+ tradeStatusValue: kmkfUtils.tradeStatusMap === null || kmkfUtils.tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = kmkfUtils.tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
17113
17753
  });
17114
17754
  });
17115
17755
  }
@@ -17352,7 +17992,6 @@ var index$3 = (function (props) {
17352
17992
  } else if (type === 'BS_E3_SYSTEM_ORDER') {
17353
17993
  getBsE3OrderList(value.orderNo);
17354
17994
  } else if (type === 'GY_SYSTEM_ORDER') {
17355
- console.log('触发gy--getGyOrderList--1');
17356
17995
  getGyOrderList(value.orderNo);
17357
17996
  } else if (type === 'JST_SYSTEM_ORDER') {
17358
17997
  getJstOrderList(value.orderNo);
@@ -17466,11 +18105,13 @@ var index$3 = (function (props) {
17466
18105
  showOrderInfo: trades.map(function (_ref4) {
17467
18106
  var billNo = _ref4.billNo,
17468
18107
  billType = _ref4.billType,
17469
- billTag = _ref4.billTag;
18108
+ billTag = _ref4.billTag,
18109
+ tradeStatusValue = _ref4.tradeStatusValue;
17470
18110
  return {
17471
18111
  billNo: billNo,
17472
18112
  billType: billType,
17473
- billTag: billTag
18113
+ billTag: billTag,
18114
+ tradeStatusValue: tradeStatusValue
17474
18115
  };
17475
18116
  })
17476
18117
  }));
@@ -17780,6 +18421,31 @@ var componentMap$1 = {
17780
18421
  returnDeleteGood: 'jstReturnDeleteGood',
17781
18422
  exchangeDeleteGood: 'jstExchangeDeleteGood'
17782
18423
  }
18424
+ },
18425
+ KM_GOODS: {
18426
+ type: 'km',
18427
+ key: 'kmGoods',
18428
+ name: '快麦',
18429
+ orderNo: 'tid',
18430
+ goodDetailOrderNo: 'originalDealCode',
18431
+ eventNameMap: {
18432
+ // pubsub 事件
18433
+ type: 'kmType',
18434
+ updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
18435
+ selectListReturn: 'kmSelectListReturn',
18436
+ selectList: 'kmSelectList',
18437
+ reissueSelectList: 'kmReissueSelectList',
18438
+ reissueSelectListReturn: 'kmReissueSelectListReturn',
18439
+ reissueDeleteGood: 'kmReissueDeleteGood',
18440
+ changeShopCode: 'kmChangeShopCode',
18441
+ reissueType: 'kmReissueType',
18442
+ returnType: 'kmReturnType',
18443
+ returnSelectListReturn: 'kmReturnSelectListReturn',
18444
+ returnSelectList: 'kmReturnSelectList',
18445
+ deleteGood: 'kmDeleteGood',
18446
+ returnDeleteGood: 'kmReturnDeleteGood',
18447
+ exchangeDeleteGood: 'kmExchangeDeleteGood'
18448
+ }
17783
18449
  }
17784
18450
  };
17785
18451
  var CommonGoods = function CommonGoods(props) {
@@ -17788,7 +18454,7 @@ var CommonGoods = function CommonGoods(props) {
17788
18454
  disabled = props.disabled,
17789
18455
  onChange = props.onChange,
17790
18456
  compType = props.type;
17791
- console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
18457
+ // console.log('value?.orders', value?.orders);
17792
18458
  // 合并单订单会包含","
17793
18459
  var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
17794
18460
  var _order$componentMap$c;
@@ -18312,7 +18978,7 @@ var typeMap$1 = {
18312
18978
  }
18313
18979
  };
18314
18980
  var wdtReissue = function wdtReissue(props) {
18315
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
18981
+ var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
18316
18982
  var value = props.value,
18317
18983
  onChange = props.onChange,
18318
18984
  _props$reasonList = props.reasonList,
@@ -18382,11 +19048,13 @@ var wdtReissue = function wdtReissue(props) {
18382
19048
  var showOrderInfo = orders.map(function (_ref2) {
18383
19049
  var billNo = _ref2.billNo,
18384
19050
  billType = _ref2.billType,
18385
- billTag = _ref2.billTag;
19051
+ billTag = _ref2.billTag,
19052
+ tradeStatusValue = _ref2.tradeStatusValue;
18386
19053
  return {
18387
19054
  billNo: billNo,
18388
19055
  billType: billType,
18389
- billTag: billTag
19056
+ billTag: billTag,
19057
+ tradeStatusValue: tradeStatusValue
18390
19058
  };
18391
19059
  });
18392
19060
  onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
@@ -18469,7 +19137,7 @@ var wdtReissue = function wdtReissue(props) {
18469
19137
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18470
19138
  };
18471
19139
  var selectedGoodsChange = React.useCallback(function (skuList) {
18472
- var _typeMap$type21, _typeMap$type22, _uniqBy, _typeMap$type23;
19140
+ var _typeMap$type21, _typeMap$type22, _uniqBy;
18473
19141
  var newValue = _objectSpread2({}, value);
18474
19142
  // 原订单商品
18475
19143
  var originTradeGoodList = getGoodDetails({
@@ -18480,14 +19148,14 @@ var wdtReissue = function wdtReissue(props) {
18480
19148
  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)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
18481
19149
  return skuList.includes(item.uuid);
18482
19150
  });
18483
- console.log('商品发生变化', 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)]);
19151
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
18484
19152
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18485
- }, [value === null || value === void 0 ? void 0 : value["".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)], isStrict]);
19153
+ }, [value === null || value === void 0 ? void 0 : value["".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)], isStrict]);
18486
19154
  //显示选择商品按钮 原单换不显示选择商品
18487
19155
  var showChangeBtn = React.useMemo(function () {
18488
- var _typeMap$type25;
18489
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
18490
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
19156
+ var _typeMap$type24;
19157
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
19158
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
18491
19159
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
18492
19160
  gutter: 8,
18493
19161
  wrap: true
@@ -18505,12 +19173,12 @@ var wdtReissue = function wdtReissue(props) {
18505
19173
  },
18506
19174
  disabled: disabled,
18507
19175
  allowClear: false,
18508
- 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)],
19176
+ 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)],
18509
19177
  onChange: function onChange(val) {
18510
19178
  return changeSystemOrderHandle(val);
18511
19179
  },
18512
19180
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
18513
- }, ((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) {
19181
+ }, ((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) {
18514
19182
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
18515
19183
  key: item.billNo,
18516
19184
  value: item.billNo,
@@ -18531,7 +19199,7 @@ var wdtReissue = function wdtReissue(props) {
18531
19199
  disabled: disabled,
18532
19200
  allowClear: false,
18533
19201
  options: reasonList,
18534
- 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)],
19202
+ 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)],
18535
19203
  onChange: function onChange(val) {
18536
19204
  return changeTypeHandle(val);
18537
19205
  }
@@ -18543,7 +19211,7 @@ var wdtReissue = function wdtReissue(props) {
18543
19211
  canUpdateNumber: showChangeBtn,
18544
19212
  showChangeBtn: showChangeBtn,
18545
19213
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
18546
- 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)],
19214
+ 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)],
18547
19215
  onChange: function onChange(val) {
18548
19216
  return changeGoodHandle(val);
18549
19217
  },
@@ -19615,6 +20283,39 @@ var MsgStatus = function MsgStatus(props) {
19615
20283
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
19616
20284
  };
19617
20285
 
20286
+ var _excluded$n = ["showOnly", "getOptionsAsync"];
20287
+ var AsyncSelect = function AsyncSelect(props) {
20288
+ var _props$showOnly = props.showOnly,
20289
+ showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
20290
+ getOptionsAsync = props.getOptionsAsync,
20291
+ otherProps = _objectWithoutProperties(props, _excluded$n);
20292
+ var _React$useState = React__default['default'].useState([]),
20293
+ _React$useState2 = _slicedToArray(_React$useState, 2),
20294
+ data = _React$useState2[0],
20295
+ setData = _React$useState2[1];
20296
+ React__default['default'].useEffect(function () {
20297
+ getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
20298
+ setData(list);
20299
+ });
20300
+ }, []);
20301
+ var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
20302
+ if (showOnly) {
20303
+ var selectedItem = options.find(function (option) {
20304
+ return option.value === props.value;
20305
+ });
20306
+ return selectedItem ? selectedItem.label : props.value;
20307
+ }
20308
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
20309
+ showSearch: true,
20310
+ filterOption: function filterOption(input, option) {
20311
+ return option.label.includes(input);
20312
+ },
20313
+ notFoundContent: null
20314
+ }, otherProps), {}, {
20315
+ options: options
20316
+ }));
20317
+ };
20318
+
19618
20319
  var CalculationInput = function CalculationInput(props) {
19619
20320
  var _props$config = props.config,
19620
20321
  config = _props$config === void 0 ? {} : _props$config;
@@ -19633,7 +20334,7 @@ var CalculationInput = function CalculationInput(props) {
19633
20334
  }, config === null || config === void 0 ? void 0 : config.unit));
19634
20335
  };
19635
20336
 
19636
- var _excluded$n = ["value", "onChange", "reasonList", "disabled", "type"];
20337
+ var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type"];
19637
20338
  var typeMap$3 = {
19638
20339
  BS_E3_REISSUE_GOODS: {
19639
20340
  key: 'bsE3ReissueGoods',
@@ -19651,7 +20352,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
19651
20352
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
19652
20353
  disabled = props.disabled,
19653
20354
  type = props.type,
19654
- other = _objectWithoutProperties(props, _excluded$n);
20355
+ other = _objectWithoutProperties(props, _excluded$o);
19655
20356
  var getOrderFlag = React.useRef(false);
19656
20357
  var valueRef = React.useRef(null);
19657
20358
  var _useState = React.useState(false),
@@ -19869,7 +20570,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
19869
20570
  })));
19870
20571
  };
19871
20572
 
19872
- var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type"],
20573
+ var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type"],
19873
20574
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
19874
20575
  var typeMap$4 = {
19875
20576
  GY_REISSUE_GOODS: {
@@ -19891,14 +20592,14 @@ var typeMap$4 = {
19891
20592
  }
19892
20593
  };
19893
20594
  var GyReissue = function GyReissue(props) {
19894
- var _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
20595
+ var _typeMap$type27, _typeMap$type28, _typeMap$type29, _systemOrder$orders, _typeMap$type30, _value$typeMap$type$s5, _typeMap$type31, _typeMap$type32, _typeMap$type33;
19895
20596
  var value = props.value,
19896
20597
  onChange = props.onChange,
19897
20598
  _props$reasonList = props.reasonList,
19898
20599
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
19899
20600
  disabled = props.disabled,
19900
20601
  type = props.type,
19901
- other = _objectWithoutProperties(props, _excluded$o);
20602
+ other = _objectWithoutProperties(props, _excluded$p);
19902
20603
  // const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
19903
20604
  // order?.platformCode?.includes(';'),
19904
20605
  // );
@@ -20046,7 +20747,7 @@ var GyReissue = function GyReissue(props) {
20046
20747
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20047
20748
  };
20048
20749
  var selectedGoodsChange = React.useCallback(function (skuList) {
20049
- var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
20750
+ var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
20050
20751
  kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
20051
20752
  var newValue = _objectSpread2({}, valueRef.current || {});
20052
20753
  // 原订单商品
@@ -20058,21 +20759,15 @@ var GyReissue = function GyReissue(props) {
20058
20759
  newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
20059
20760
  return skuList.includes(item.uuid);
20060
20761
  });
20061
- console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]);
20762
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
20062
20763
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20063
20764
  kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
20064
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)], isStrict]);
20765
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)], isStrict]);
20065
20766
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
20066
- var showChangeBtn = React.useMemo(function () {
20067
- var _typeMap$type29;
20068
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
20069
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
20070
- return /*#__PURE__*/React__default['default'].createElement("div", {
20071
- id: "TEST_GY",
20072
- onClick: function onClick() {
20073
- console.log('TEST_GY', value);
20074
- }
20075
- }, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
20767
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder];
20768
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
20769
+ var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
20770
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
20076
20771
  gutter: 8,
20077
20772
  wrap: true
20078
20773
  }, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
@@ -20089,12 +20784,12 @@ var GyReissue = function GyReissue(props) {
20089
20784
  },
20090
20785
  disabled: disabled,
20091
20786
  allowClear: false,
20092
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo)],
20787
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo)],
20093
20788
  onChange: function onChange(val) {
20094
20789
  return changeSystemOrderHandle(val);
20095
20790
  },
20096
20791
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
20097
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
20792
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
20098
20793
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
20099
20794
  key: item.billNo,
20100
20795
  value: item.billNo,
@@ -20115,7 +20810,7 @@ var GyReissue = function GyReissue(props) {
20115
20810
  disabled: disabled,
20116
20811
  allowClear: false,
20117
20812
  options: reasonList,
20118
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.typeName)],
20813
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.typeName)],
20119
20814
  onChange: function onChange(val) {
20120
20815
  return changeTypeHandle(val);
20121
20816
  }
@@ -20126,8 +20821,10 @@ var GyReissue = function GyReissue(props) {
20126
20821
  disabled: disabled,
20127
20822
  canUpdateNumber: showChangeBtn,
20128
20823
  showChangeBtn: showChangeBtn,
20824
+ showErpGoodsBtn: showErpGoodsBtn,
20825
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20129
20826
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20130
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)],
20827
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)],
20131
20828
  onChange: function onChange(val) {
20132
20829
  return changeGoodHandle(val);
20133
20830
  },
@@ -20142,7 +20839,7 @@ var GyReissue = function GyReissue(props) {
20142
20839
  })));
20143
20840
  };
20144
20841
 
20145
- var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type"],
20842
+ var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type"],
20146
20843
  _excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
20147
20844
  var typeMap$5 = {
20148
20845
  GY_RETURN_GOODS: {
@@ -20164,14 +20861,14 @@ var typeMap$5 = {
20164
20861
  }
20165
20862
  };
20166
20863
  var GyReturnGoods = function GyReturnGoods(props) {
20167
- var _typeMap$type10, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
20864
+ var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
20168
20865
  var value = props.value,
20169
20866
  onChange = props.onChange,
20170
20867
  _props$reasonList = props.reasonList,
20171
20868
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
20172
20869
  disabled = props.disabled,
20173
20870
  type = props.type,
20174
- other = _objectWithoutProperties(props, _excluded$p);
20871
+ other = _objectWithoutProperties(props, _excluded$q);
20175
20872
  var valueRef = React.useRef({});
20176
20873
  var getOrderFlag = React.useRef(false);
20177
20874
  var _useState = React.useState(false),
@@ -20272,7 +20969,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20272
20969
  };
20273
20970
  }();
20274
20971
  var selectedGoodsChange = React.useCallback(function (skuList) {
20275
- var _typeMap$type7, _typeMap$type8, _uniqBy, _typeMap$type9;
20972
+ var _typeMap$type7, _typeMap$type8, _uniqBy;
20276
20973
  var newValue = _objectSpread2({}, value);
20277
20974
  // 原订单商品
20278
20975
  var originTradeGoodList = getGoodDetails({
@@ -20283,49 +20980,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
20283
20980
  newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
20284
20981
  return skuList.includes(item.uuid);
20285
20982
  });
20286
- console.log('商品发生变化', newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)]);
20983
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
20287
20984
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20288
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)], isStrict]);
20985
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)], isStrict]);
20289
20986
  var changeTypeHandle = function changeTypeHandle(val) {
20290
- var _value$typeMap$type$t, _typeMap$type11, _typeMap$type12;
20987
+ var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
20291
20988
  var typeName = val === null || val === void 0 ? void 0 : val[0];
20292
- if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
20989
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$5[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])) return;
20293
20990
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
20294
20991
  var newValue = _objectSpread2({}, value);
20295
- newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
20992
+ newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
20296
20993
  if (typeName === '1') {
20297
- var _typeMap$type13;
20298
- newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
20994
+ var _typeMap$type12;
20995
+ newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
20299
20996
  mode: isStrict
20300
20997
  });
20301
20998
  } else if (typeName === '2') {
20302
- var _typeMap$type14;
20999
+ var _typeMap$type13;
20303
21000
  // 切换到非原单,清空列表
20304
- newValue[(_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
21001
+ newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
20305
21002
  }
20306
21003
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20307
21004
  };
20308
21005
  var changeGoodHandle = function changeGoodHandle(val) {
20309
- var _typeMap$type15;
21006
+ var _typeMap$type14;
20310
21007
  var newValue = _objectSpread2({}, value);
20311
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
20312
- var _typeMap$type16, _typeMap$type17;
20313
- item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
20314
- item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
21008
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = (val || []).map(function (item) {
21009
+ var _typeMap$type15, _typeMap$type16;
21010
+ item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.money)] = 0;
21011
+ item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.share)] = 0;
20315
21012
  return item;
20316
21013
  });
20317
21014
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20318
21015
  };
20319
21016
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
20320
- var _typeMap$type18, _value$typeMap$type$t2, _typeMap$type19, _value$typeMap$type$t3, _typeMap$type21;
21017
+ var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
20321
21018
  var newValue = _objectSpread2({}, value);
20322
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
20323
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
20324
- var _typeMap$type20;
20325
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
20326
- } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
20327
- var _typeMap$type22;
20328
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
21019
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo)] = val;
21020
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
21021
+ var _typeMap$type19;
21022
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
21023
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$5[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])) {
21024
+ var _typeMap$type21;
21025
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = getGoodDetails({
20329
21026
  mode: isStrict,
20330
21027
  sysOrderNo: val
20331
21028
  });
@@ -20333,11 +21030,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
20333
21030
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20334
21031
  };
20335
21032
  var getGoodDetails = function getGoodDetails(_ref4) {
20336
- var _typeMap$type23, _typeMap$type24, _order$details;
21033
+ var _typeMap$type22, _typeMap$type23, _order$details;
20337
21034
  var mode = _ref4.mode,
20338
21035
  sysOrderNo = _ref4.sysOrderNo;
20339
- var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder];
20340
- var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo];
21036
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
21037
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
20341
21038
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
20342
21039
  return order.code === systemOrderNo;
20343
21040
  });
@@ -20348,19 +21045,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
20348
21045
  }) : goodDetails;
20349
21046
  };
20350
21047
  var handleModeChange = function handleModeChange(mode) {
20351
- var _value$typeMap$type$t4, _typeMap$type25, _typeMap$type26;
20352
- var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
21048
+ var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
21049
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
20353
21050
  setIsStrict(mode);
20354
21051
  if (!isOriginalOrder) return;
20355
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key, getGoodDetails({
21052
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key, getGoodDetails({
20356
21053
  mode: mode
20357
21054
  }))));
20358
21055
  };
20359
21056
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
20360
- var showChangeBtn = React.useMemo(function () {
20361
- var _typeMap$type27;
20362
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
20363
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
21057
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder];
21058
+ var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
21059
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
20364
21060
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
20365
21061
  gutter: 8,
20366
21062
  wrap: true
@@ -20378,12 +21074,12 @@ var GyReturnGoods = function GyReturnGoods(props) {
20378
21074
  },
20379
21075
  disabled: disabled,
20380
21076
  allowClear: false,
20381
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
21077
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
20382
21078
  onChange: function onChange(val) {
20383
21079
  return changeSystemOrderHandle(val);
20384
21080
  },
20385
21081
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
20386
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
21082
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
20387
21083
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
20388
21084
  key: item.billNo,
20389
21085
  value: item.billNo,
@@ -20404,7 +21100,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20404
21100
  disabled: disabled,
20405
21101
  allowClear: false,
20406
21102
  options: reasonList,
20407
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
21103
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
20408
21104
  onChange: function onChange(val) {
20409
21105
  return changeTypeHandle(val);
20410
21106
  }
@@ -20416,13 +21112,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
20416
21112
  canUpdateNumber: showChangeBtn,
20417
21113
  showChangeBtn: showChangeBtn,
20418
21114
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20419
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type32 = typeMap$5[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
21115
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
20420
21116
  onChange: function onChange(val) {
20421
21117
  return changeGoodHandle(val);
20422
21118
  },
20423
21119
  onModeChange: handleModeChange,
20424
21120
  isStrict: isStrict,
20425
- showErpGoodsBtn: false,
21121
+ showErpGoodsBtn: showErpGoodsBtn,
21122
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20426
21123
  tradeGoods: {
20427
21124
  originDataSource: getGoodDetails({
20428
21125
  mode: isStrict
@@ -20453,6 +21150,7 @@ exports.ApaasUpload = ApaasUpload;
20453
21150
  exports.ApaasUploadAsync = index;
20454
21151
  exports.ApaasUploadFile = ApaasUploadFile;
20455
21152
  exports.ApaasUploadProAsync = index$1;
21153
+ exports.AsyncSelect = AsyncSelect;
20456
21154
  exports.BsE3Reissue = bsE3Reissue;
20457
21155
  exports.BsExchange = BsExchange;
20458
21156
  exports.BsGoods = BsGoods;
@@ -20504,5 +21202,6 @@ exports.erpFormValidator = erpFormValidator;
20504
21202
  exports.erpModalColumnsMap = index$2;
20505
21203
  exports.getGyColumns = getColumns$4;
20506
21204
  exports.getJstColumns = getColumns$5;
21205
+ exports.getKmColumns = getColumns$6;
20507
21206
  exports.getWdtColumns = getColumns$2;
20508
21207
  exports.getWlnColumns = getColumns$3;