@kmkf-fe-packages/basic-components 2.0.54-beta.4 → 2.0.54-beta.41

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
@@ -10974,7 +10974,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
10974
10974
  }
10975
10975
  })), /*#__PURE__*/React__default['default'].createElement(Item, {
10976
10976
  label: '发件人手机号',
10977
- required: true,
10977
+ // required={true}
10978
10978
  key: 'interceptSenderMobile',
10979
10979
  hidden: !showSenderMobile
10980
10980
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
@@ -11154,7 +11154,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11154
11154
  _props$value = props.value,
11155
11155
  value = _props$value === void 0 ? {} : _props$value,
11156
11156
  disabled = props.disabled,
11157
- 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;
11158
11162
  var handleInputChange = function handleInputChange(e, type) {
11159
11163
  var val = e.target.value;
11160
11164
  typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
@@ -11165,13 +11169,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11165
11169
  }));
11166
11170
  handleSearchSnapshot(val);
11167
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
+ };
11168
11182
  var handleSearchSnapshot = function handleSearchSnapshot(company) {
11169
11183
  var trajectoryCompany = value.trajectoryCompany,
11170
11184
  trajectoryCode = value.trajectoryCode,
11171
11185
  trajectoryPhone = value.trajectoryPhone;
11172
11186
  var newCompany = company ? company : trajectoryCompany;
11173
11187
  //不展示拦截状态不请求
11174
- if (!(showField && showField.includes('snapshot'))) {
11188
+ if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
11175
11189
  return;
11176
11190
  }
11177
11191
  if (disabled) {
@@ -11196,13 +11210,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11196
11210
  data = res.data,
11197
11211
  msg = res.message;
11198
11212
  if (result === 100 || success) {
11199
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11200
- trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
11213
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
11201
11214
  trajectoryCompany: newCompany
11202
- }));
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);
11203
11219
  } else {
11204
11220
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11205
11221
  trajectorySnapshot: '',
11222
+ trajectoryApiStatus: {
11223
+ reason: '',
11224
+ status: ''
11225
+ },
11206
11226
  trajectoryCompany: newCompany
11207
11227
  }));
11208
11228
  msg && antd.message.error(msg);
@@ -11211,6 +11231,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11211
11231
  } catch (err) {
11212
11232
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11213
11233
  trajectorySnapshot: '',
11234
+ trajectoryApiStatus: {
11235
+ reason: '',
11236
+ status: ''
11237
+ },
11214
11238
  trajectoryCompany: newCompany
11215
11239
  }));
11216
11240
  (err === null || err === void 0 ? void 0 : err.message) && antd.message.error(err === null || err === void 0 ? void 0 : err.message);
@@ -11264,6 +11288,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11264
11288
  }
11265
11289
  });
11266
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
+ };
11267
11316
  //物流快照
11268
11317
  var LogisticsSnapshot = function LogisticsSnapshot() {
11269
11318
  return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
@@ -11278,7 +11327,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11278
11327
  value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
11279
11328
  });
11280
11329
  };
11281
- 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);
11282
11331
  };
11283
11332
 
11284
11333
  var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
@@ -11491,7 +11540,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
11491
11540
  disabled: disabled,
11492
11541
  onChange: function onChange(val) {
11493
11542
  return handleChange(val, changeIndex);
11494
- }
11543
+ },
11544
+ isSingle: false
11495
11545
  }));
11496
11546
  };
11497
11547
 
@@ -11514,7 +11564,7 @@ var typeInitValueMap = {
11514
11564
  }]
11515
11565
  };
11516
11566
  var jstGoods = function jstGoods(props) {
11517
- 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;
11518
11568
  var _props$value = props.value,
11519
11569
  value = _props$value === void 0 ? [] : _props$value,
11520
11570
  onChange = props.onChange,
@@ -11532,8 +11582,8 @@ var jstGoods = function jstGoods(props) {
11532
11582
  setChangeIndex = _useState2[1]; //选中的包裹
11533
11583
  var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
11534
11584
  var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
11585
+ var expressDateInstance = kmkfUtils.ExpressData.getInstance(platformType);
11535
11586
  var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
11536
- var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
11537
11587
  React.useEffect(function () {
11538
11588
  //没有值塞个默认值
11539
11589
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
@@ -11616,59 +11666,51 @@ var jstGoods = function jstGoods(props) {
11616
11666
  return setChangeIndex(index);
11617
11667
  }
11618
11668
  }, "\u5305\u88F9".concat(index + 1)));
11619
- }))) : 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({
11620
- 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, {
11621
11670
  disabled: disabled,
11622
11671
  placeholder: "\u7269\u6D41\u516C\u53F8",
11623
11672
  onChange: function onChange(val) {
11624
- if (logisticsType === 'input') {
11625
- changeInputHandle(null, 'logisticsCompany');
11626
- changeInputHandle(val, 'logisticsCompanyName');
11627
- } else {
11628
- changeInputHandle(val, 'logisticsCompany');
11629
- }
11673
+ changeInputHandle(val, 'logisticsCompany');
11630
11674
  },
11631
- value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
11632
- }, 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'],
11633
11676
  showSearch: true,
11634
11677
  dropdownMatchSelectWidth: false,
11635
11678
  filterOption: function filterOption(input, option) {
11636
11679
  return option.label.includes(input);
11637
- }
11638
- }), {}, {
11680
+ },
11639
11681
  style: {
11640
11682
  minWidth: '100px',
11641
11683
  maxWidth: '180px'
11642
11684
  },
11643
11685
  platformType: platformType
11644
- })) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11686
+ }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11645
11687
  disabled: disabled,
11646
11688
  placeholder: "\u7269\u6D41\u5355\u53F7",
11647
11689
  onChange: function onChange(e) {
11648
11690
  return changeInputHandle(e.target.value, 'logisticsCode');
11649
11691
  },
11650
- 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
11651
11693
  }) : null) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11652
11694
  disabled: disabled,
11653
11695
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
11654
11696
  onChange: function onChange(e) {
11655
11697
  return changeInputHandle(e.target.value, 'supplyId');
11656
11698
  },
11657
- 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
11658
11700
  }), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11659
11701
  disabled: disabled,
11660
11702
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
11661
11703
  onChange: function onChange(e) {
11662
11704
  return changeInputHandle(e.target.value, 'supplyName');
11663
11705
  },
11664
- 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
11665
11707
  })) : null, type === 3 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11666
11708
  disabled: disabled,
11667
11709
  placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
11668
11710
  onChange: function onChange(e) {
11669
11711
  return changeInputHandle(e.target.value, 'sendId');
11670
11712
  },
11671
- 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
11672
11714
  }), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
11673
11715
  style: {
11674
11716
  minWidth: '100px',
@@ -11679,7 +11721,7 @@ var jstGoods = function jstGoods(props) {
11679
11721
  showSearch: true,
11680
11722
  options: sendOptions,
11681
11723
  filterOption: filterOption,
11682
- 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,
11683
11725
  onChange: function onChange(value, option) {
11684
11726
  return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
11685
11727
  }
@@ -11689,14 +11731,14 @@ var jstGoods = function jstGoods(props) {
11689
11731
  onChange: function onChange(e) {
11690
11732
  return changeInputHandle(e.target.value, 'sendName');
11691
11733
  },
11692
- 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
11693
11735
  }))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11694
11736
  disabled: disabled,
11695
11737
  placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
11696
11738
  onChange: function onChange(e) {
11697
11739
  return changeInputHandle(e.target.value, 'deliveryNo');
11698
11740
  },
11699
- 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
11700
11742
  })) : null) : null);
11701
11743
  };
11702
11744
 
@@ -12263,7 +12305,7 @@ var gyColumns = [{
12263
12305
  }, {
12264
12306
  dataIndex: 'specNo',
12265
12307
  title: 'SKU编码',
12266
- width: 200,
12308
+ width: 150,
12267
12309
  ellipsis: true
12268
12310
  }, {
12269
12311
  dataIndex: 'goodName',
@@ -12274,11 +12316,11 @@ var gyColumns = [{
12274
12316
  dataIndex: 'goodShortName',
12275
12317
  title: "\u5546\u54C1\u7B80\u79F0",
12276
12318
  ellipsis: true,
12277
- width: 250
12319
+ width: 150
12278
12320
  }, {
12279
12321
  dataIndex: 'goodNo',
12280
12322
  title: '商品编码',
12281
- width: 200,
12323
+ width: 150,
12282
12324
  ellipsis: true
12283
12325
  }, {
12284
12326
  dataIndex: 'goodPicUrl',
@@ -12551,12 +12593,144 @@ var bse3Columns = [{
12551
12593
  width: 100
12552
12594
  }];
12553
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
+
12554
12727
  var getColumnsMap = function getColumnsMap() {
12555
12728
  return lodash.cloneDeep({
12556
12729
  gy: gyColumns,
12557
12730
  jst: jstColumns,
12558
12731
  wdt: wdtColumns,
12559
- bse3: bse3Columns
12732
+ bse3: bse3Columns,
12733
+ km: kmColumns
12560
12734
  });
12561
12735
  };
12562
12736
  var getColumnsBaseInfo = function getColumnsBaseInfo() {
@@ -12611,9 +12785,7 @@ var useGetColumns = (function (type) {
12611
12785
  loading = _useState4[0],
12612
12786
  setLoading = _useState4[1];
12613
12787
  var showColumnsDataIndexList = React.useMemo(function () {
12614
- return columns.filter(function (item) {
12615
- return Object.hasOwn(item, 'dataIndex');
12616
- }).map(function (item) {
12788
+ return columns.map(function (item) {
12617
12789
  return item.dataIndex;
12618
12790
  });
12619
12791
  }, [columns]);
@@ -13508,23 +13680,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
13508
13680
  };
13509
13681
  var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
13510
13682
 
13683
+ var rowCheckKey = 'id';
13511
13684
  var getTableData$3 = function getTableData(_ref, formData) {
13512
13685
  var current = _ref.current,
13513
13686
  pageSize = _ref.pageSize;
13514
- var data = {
13515
- goodShortName: formData.goodShortName || null,
13516
- skuName: formData.skuName || null,
13517
- skuCode: formData.skuCode || null,
13518
- goodName: formData.goodName || null,
13519
- goodNo: formData.goodNo || null
13520
- };
13521
13687
  return extendRequest('/qy/gdfw/product/product/page', {
13522
13688
  method: 'post',
13523
13689
  data: _objectSpread2({
13524
13690
  pageSize: pageSize,
13525
13691
  pageNo: current,
13526
- platform: 'GY_ERP'
13527
- }, data)
13692
+ platform: 'KM_ERP'
13693
+ }, formData)
13528
13694
  }).then(function (res) {
13529
13695
  var _res$data = res.data,
13530
13696
  _res$data$productSkuL = _res$data.productSkuList,
@@ -13541,22 +13707,19 @@ var getTableData$3 = function getTableData(_ref, formData) {
13541
13707
  });
13542
13708
  };
13543
13709
  var searchFormData$2 = [{
13544
- label: '商品简称',
13545
- name: 'goodShortName'
13710
+ label: '商品名称',
13711
+ name: 'goodName'
13546
13712
  }, {
13547
- label: '商品sku名称',
13713
+ label: '商品编码',
13714
+ name: 'goodNo'
13715
+ }, {
13716
+ label: 'SKU名称',
13548
13717
  name: 'skuName',
13549
13718
  dataIndex: 'specName'
13550
13719
  }, {
13551
- label: '商品sku编码',
13720
+ label: 'SKU编码',
13552
13721
  name: 'skuCode',
13553
13722
  dataIndex: 'specNo'
13554
- }, {
13555
- label: '商品名称',
13556
- name: 'goodName'
13557
- }, {
13558
- label: '商品编码',
13559
- name: 'goodNo'
13560
13723
  }];
13561
13724
  var GoodList$3 = function GoodList(props, ref) {
13562
13725
  var _useState = React.useState([]),
@@ -13567,7 +13730,7 @@ var GoodList$3 = function GoodList(props, ref) {
13567
13730
  _useState4 = _slicedToArray(_useState3, 2),
13568
13731
  selectIds = _useState4[0],
13569
13732
  setSelectIds = _useState4[1];
13570
- var _useGetColumns = useGetColumns('gy'),
13733
+ var _useGetColumns = useGetColumns('km'),
13571
13734
  _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13572
13735
  columns = _useGetColumns2[0],
13573
13736
  showColumnsDataIndexList = _useGetColumns2[1],
@@ -13596,41 +13759,50 @@ var GoodList$3 = function GoodList(props, ref) {
13596
13759
  fixed: true,
13597
13760
  onSelect: function onSelect(record, selected) {
13598
13761
  if (selected) {
13599
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
13762
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
13600
13763
  setSelect([].concat(_toConsumableArray(selectList), [record]));
13601
13764
  } else {
13602
13765
  setSelectIds(selectIds.filter(function (t) {
13603
- return t !== record.id;
13766
+ return t !== record[rowCheckKey];
13604
13767
  }));
13605
13768
  setSelect(selectList.filter(function (t) {
13606
- return t.id !== record.id;
13769
+ return t[rowCheckKey] !== record[rowCheckKey];
13607
13770
  }));
13608
13771
  }
13609
13772
  },
13610
13773
  onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
13611
13774
  if (selected) {
13612
13775
  setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
13613
- return t.id;
13776
+ return t[rowCheckKey];
13614
13777
  }))));
13615
13778
  setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
13616
13779
  } else {
13617
13780
  setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
13618
- return t.id;
13781
+ return t[rowCheckKey];
13619
13782
  })));
13620
13783
  var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
13621
- return arrVal.id !== othVal.id;
13784
+ return arrVal[rowCheckKey] !== othVal[rowCheckKey];
13622
13785
  });
13623
13786
  setSelect(list);
13624
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;
13625
13797
  }
13626
13798
  };
13627
13799
  var showTable = function showTable() {
13628
13800
  var handleDelete = function handleDelete(record) {
13629
13801
  setSelectIds(selectIds.filter(function (t) {
13630
- return t !== record.id;
13802
+ return t !== record[rowCheckKey];
13631
13803
  }));
13632
13804
  setSelect(selectList.filter(function (t) {
13633
- return t.id !== record.id;
13805
+ return t[rowCheckKey] !== record[rowCheckKey];
13634
13806
  }));
13635
13807
  };
13636
13808
  var showColumns = [{
@@ -13654,7 +13826,7 @@ var GoodList$3 = function GoodList(props, ref) {
13654
13826
  }
13655
13827
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
13656
13828
  columns: showColumns,
13657
- rowKey: 'id',
13829
+ rowKey: rowCheckKey,
13658
13830
  dataSource: selectList,
13659
13831
  scroll: {
13660
13832
  x: '100%',
@@ -13683,7 +13855,7 @@ var GoodList$3 = function GoodList(props, ref) {
13683
13855
  }
13684
13856
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
13685
13857
  rowSelection: rowSelection,
13686
- rowKey: "id",
13858
+ rowKey: rowCheckKey,
13687
13859
  columns: columns,
13688
13860
  scroll: {
13689
13861
  x: '100%',
@@ -13700,13 +13872,15 @@ var GoodList$3 = function GoodList(props, ref) {
13700
13872
  type: "text"
13701
13873
  }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
13702
13874
  };
13703
- var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$3);
13875
+ var ErpGoodsList = /*#__PURE__*/React.forwardRef(GoodList$3);
13704
13876
 
13705
- var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13877
+ var ErpGoodsModal = function ErpGoodsModal(props, ref) {
13706
13878
  React.useImperativeHandle(ref, function () {
13707
13879
  return {
13708
- open: function open() {
13880
+ open: function open(shopCode) {
13881
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13709
13882
  setVisible(true);
13883
+ setSelectedRows(options.value || []);
13710
13884
  }
13711
13885
  };
13712
13886
  });
@@ -13716,13 +13890,17 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13716
13890
  _useState2 = _slicedToArray(_useState, 2),
13717
13891
  visible = _useState2[0],
13718
13892
  setVisible = _useState2[1];
13719
- var gyGoodsListRef = 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);
13720
13898
  var _onCancel = function onCancel() {
13721
13899
  setVisible(false);
13722
13900
  };
13723
13901
  var onOk = function onOk() {
13724
- var _gyGoodsListRef$curre;
13725
- var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
13902
+ var _erpGoodsListRef$curr;
13903
+ var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
13726
13904
  onSubmit(selectedList);
13727
13905
  _onCancel();
13728
13906
  };
@@ -13737,84 +13915,320 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13737
13915
  },
13738
13916
  onOk: onOk,
13739
13917
  wrapClassName: "goodModal"
13740
- }, /*#__PURE__*/React__default['default'].createElement(GyGoodsList$1, {
13741
- ref: gyGoodsListRef
13918
+ }, /*#__PURE__*/React__default['default'].createElement(ErpGoodsList, {
13919
+ ref: erpGoodsListRef,
13920
+ selectedRows: selectedRows
13742
13921
  })));
13743
13922
  };
13744
- var GyGoodsModal$2 = /*#__PURE__*/React.forwardRef(GyGoodsModal$1);
13923
+ var KmGoodsModal = /*#__PURE__*/React.forwardRef(ErpGoodsModal);
13745
13924
 
13746
- var getColumns = function getColumns(_ref) {
13747
- var _ref$text = _ref.text,
13748
- disabled = _ref.disabled,
13749
- updateHandle = _ref.updateHandle;
13750
- return {
13751
- //百胜E3补发商品
13752
- BS_E3_REISSUE_GOODS: [{
13753
- dataIndex: 'sku',
13754
- title: "SKU",
13755
- width: 150
13756
- }, {
13757
- dataIndex: 'skuId',
13758
- title: "SKU ID",
13759
- width: 150
13760
- }, {
13761
- dataIndex: 'goodsName',
13762
- title: "\u5546\u54C1\u540D\u79F0",
13763
- width: 150
13764
- }, {
13765
- dataIndex: 'goodsShortName',
13766
- title: "\u5546\u54C1\u7B80\u79F0",
13767
- width: 150
13768
- }, {
13769
- dataIndex: 'picPath',
13770
- title: "\u5546\u54C1\u56FE\u7247",
13771
- width: 150,
13772
- render: function render(val) {
13773
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13774
- width: 60,
13775
- src: val
13776
- });
13777
- }
13778
- }, {
13779
- dataIndex: 'goodsSn',
13780
- title: "\u8D27\u53F7",
13781
- width: 150
13782
- }, {
13783
- dataIndex: 'goodsId',
13784
- title: "\u8D27\u53F7ID",
13785
- width: 150
13786
- }, {
13787
- dataIndex: 'colorName',
13788
- title: "\u989C\u8272\u540D\u79F0",
13789
- width: 150
13790
- }, {
13791
- dataIndex: 'colorCode',
13792
- title: "\u989C\u8272\u4EE3\u7801",
13793
- width: 150
13794
- }, {
13795
- dataIndex: 'sizeName',
13796
- title: "\u5C3A\u7801\u540D\u79F0",
13797
- width: 150
13798
- }, {
13799
- dataIndex: 'sizeCode',
13800
- title: "\u5C3A\u7801\u4EE3\u7801",
13801
- width: 150
13802
- }, {
13803
- dataIndex: 'brandName',
13804
- title: "\u54C1\u724C\u540D\u79F0",
13805
- width: 150
13806
- }, {
13807
- dataIndex: 'goodsNumber',
13808
- title: "\u5546\u54C1\u6570\u91CF",
13809
- width: 150
13810
- }, {
13811
- dataIndex: 'goodsPrice',
13812
- title: "\u5546\u54C1\u5355\u4EF7",
13813
- width: 150
13814
- }, {
13815
- dataIndex: 'shopPrice',
13816
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13817
- width: 150
13925
+ var getTableData$4 = function getTableData(_ref, formData) {
13926
+ var current = _ref.current,
13927
+ pageSize = _ref.pageSize;
13928
+ var data = {
13929
+ goodShortName: formData.goodShortName || null,
13930
+ skuName: formData.skuName || null,
13931
+ skuCode: formData.skuCode || null,
13932
+ goodName: formData.goodName || null,
13933
+ goodNo: formData.goodNo || null
13934
+ };
13935
+ return extendRequest('/qy/gdfw/product/product/page', {
13936
+ method: 'post',
13937
+ data: _objectSpread2({
13938
+ pageSize: pageSize,
13939
+ pageNo: current,
13940
+ platform: 'GY_ERP'
13941
+ }, data)
13942
+ }).then(function (res) {
13943
+ var _res$data = res.data,
13944
+ _res$data$productSkuL = _res$data.productSkuList,
13945
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
13946
+ _res$data$total = _res$data.total,
13947
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
13948
+ var newProducts = productSkuList.map(function (item, index) {
13949
+ return _objectSpread2({}, item);
13950
+ });
13951
+ return {
13952
+ total: total,
13953
+ list: newProducts
13954
+ };
13955
+ });
13956
+ };
13957
+ var searchFormData$3 = [{
13958
+ label: '商品简称',
13959
+ name: 'goodShortName'
13960
+ }, {
13961
+ label: '商品sku名称',
13962
+ name: 'skuName',
13963
+ dataIndex: 'specName'
13964
+ }, {
13965
+ label: '商品sku编码',
13966
+ name: 'skuCode',
13967
+ dataIndex: 'specNo'
13968
+ }, {
13969
+ label: '商品名称',
13970
+ name: 'goodName'
13971
+ }, {
13972
+ label: '商品编码',
13973
+ name: 'goodNo'
13974
+ }];
13975
+ var GoodList$4 = function GoodList(props, ref) {
13976
+ var _useState = React.useState([]),
13977
+ _useState2 = _slicedToArray(_useState, 2),
13978
+ selectList = _useState2[0],
13979
+ setSelect = _useState2[1];
13980
+ var _useState3 = React.useState([]),
13981
+ _useState4 = _slicedToArray(_useState3, 2),
13982
+ selectIds = _useState4[0],
13983
+ setSelectIds = _useState4[1];
13984
+ var _useGetColumns = useGetColumns('gy'),
13985
+ _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13986
+ columns = _useGetColumns2[0],
13987
+ showColumnsDataIndexList = _useGetColumns2[1],
13988
+ loading = _useGetColumns2[2];
13989
+ React.useImperativeHandle(ref, function () {
13990
+ return {
13991
+ getSelectGoodList: function getSelectGoodList() {
13992
+ return selectList;
13993
+ }
13994
+ };
13995
+ });
13996
+ var _Form$useForm = antd.Form.useForm(),
13997
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13998
+ form = _Form$useForm2[0];
13999
+ var _useAntdTable = ahooks.useAntdTable(getTableData$4, {
14000
+ defaultPageSize: 10,
14001
+ form: form
14002
+ }),
14003
+ tableProps = _useAntdTable.tableProps,
14004
+ search = _useAntdTable.search,
14005
+ params = _useAntdTable.params;
14006
+ var submit = search.submit,
14007
+ reset = search.reset;
14008
+ var rowSelection = {
14009
+ selectedRowKeys: selectIds,
14010
+ fixed: true,
14011
+ onSelect: function onSelect(record, selected) {
14012
+ if (selected) {
14013
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
14014
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
14015
+ } else {
14016
+ setSelectIds(selectIds.filter(function (t) {
14017
+ return t !== record.id;
14018
+ }));
14019
+ setSelect(selectList.filter(function (t) {
14020
+ return t.id !== record.id;
14021
+ }));
14022
+ }
14023
+ },
14024
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
14025
+ if (selected) {
14026
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
14027
+ return t.id;
14028
+ }))));
14029
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
14030
+ } else {
14031
+ setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
14032
+ return t.id;
14033
+ })));
14034
+ var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
14035
+ return arrVal.id !== othVal.id;
14036
+ });
14037
+ setSelect(list);
14038
+ }
14039
+ }
14040
+ };
14041
+ var showTable = function showTable() {
14042
+ var handleDelete = function handleDelete(record) {
14043
+ setSelectIds(selectIds.filter(function (t) {
14044
+ return t !== record.id;
14045
+ }));
14046
+ setSelect(selectList.filter(function (t) {
14047
+ return t.id !== record.id;
14048
+ }));
14049
+ };
14050
+ var showColumns = [{
14051
+ dataIndex: '',
14052
+ title: "\u64CD\u4F5C",
14053
+ ellipsis: true,
14054
+ width: 100,
14055
+ render: function render(val, record) {
14056
+ return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
14057
+ type: "link",
14058
+ onClick: function onClick() {
14059
+ return handleDelete(record);
14060
+ }
14061
+ }, "\u5220\u9664");
14062
+ }
14063
+ }].concat(lodash.takeRight(columns, columns.length - 1));
14064
+ return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
14065
+ style: {
14066
+ width: '100%',
14067
+ maxWidth: '387px'
14068
+ }
14069
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
14070
+ columns: showColumns,
14071
+ rowKey: 'id',
14072
+ dataSource: selectList,
14073
+ scroll: {
14074
+ x: '100%',
14075
+ y: 250
14076
+ },
14077
+ pagination: {
14078
+ size: 'small',
14079
+ total: selectIds.length,
14080
+ pageSize: 10,
14081
+ showSizeChanger: false
14082
+ }
14083
+ })) : null;
14084
+ };
14085
+ return /*#__PURE__*/React__default['default'].createElement(antd.Skeleton, {
14086
+ active: true,
14087
+ loading: loading
14088
+ }, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
14089
+ searchFormData: searchFormData$3,
14090
+ form: form,
14091
+ showColumnsDataIndexList: showColumnsDataIndexList,
14092
+ submit: submit,
14093
+ reset: reset
14094
+ }), /*#__PURE__*/React__default['default'].createElement("div", {
14095
+ style: {
14096
+ marginTop: '4px'
14097
+ }
14098
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
14099
+ rowSelection: rowSelection,
14100
+ rowKey: "id",
14101
+ columns: columns,
14102
+ scroll: {
14103
+ x: '100%',
14104
+ y: 250
14105
+ }
14106
+ }, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
14107
+ getPopupContainer: function getPopupContainer(triggerNode) {
14108
+ return triggerNode.parentElement;
14109
+ },
14110
+ content: showTable(),
14111
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
14112
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
14113
+ danger: true,
14114
+ type: "text"
14115
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
14116
+ };
14117
+ var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$4);
14118
+
14119
+ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
14120
+ React.useImperativeHandle(ref, function () {
14121
+ return {
14122
+ open: function open() {
14123
+ setVisible(true);
14124
+ }
14125
+ };
14126
+ });
14127
+ var onSubmit = props.onSubmit,
14128
+ width = props.width;
14129
+ var _useState = React.useState(false),
14130
+ _useState2 = _slicedToArray(_useState, 2),
14131
+ visible = _useState2[0],
14132
+ setVisible = _useState2[1];
14133
+ var gyGoodsListRef = React.useRef(null);
14134
+ var _onCancel = function onCancel() {
14135
+ setVisible(false);
14136
+ };
14137
+ var onOk = function onOk() {
14138
+ var _gyGoodsListRef$curre;
14139
+ var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
14140
+ onSubmit(selectedList);
14141
+ _onCancel();
14142
+ };
14143
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
14144
+ title: '选择商品',
14145
+ okText: '确认',
14146
+ cancelText: '取消',
14147
+ visible: visible,
14148
+ width: width || 850,
14149
+ onCancel: function onCancel() {
14150
+ _onCancel();
14151
+ },
14152
+ onOk: onOk,
14153
+ wrapClassName: "goodModal"
14154
+ }, /*#__PURE__*/React__default['default'].createElement(GyGoodsList$1, {
14155
+ ref: gyGoodsListRef
14156
+ })));
14157
+ };
14158
+ var GyGoodsModal$2 = /*#__PURE__*/React.forwardRef(GyGoodsModal$1);
14159
+
14160
+ var getColumns = function getColumns(_ref) {
14161
+ var _ref$text = _ref.text,
14162
+ disabled = _ref.disabled,
14163
+ updateHandle = _ref.updateHandle;
14164
+ return {
14165
+ //百胜E3补发商品
14166
+ BS_E3_REISSUE_GOODS: [{
14167
+ dataIndex: 'sku',
14168
+ title: "SKU",
14169
+ width: 150
14170
+ }, {
14171
+ dataIndex: 'skuId',
14172
+ title: "SKU ID",
14173
+ width: 150
14174
+ }, {
14175
+ dataIndex: 'goodsName',
14176
+ title: "\u5546\u54C1\u540D\u79F0",
14177
+ width: 150
14178
+ }, {
14179
+ dataIndex: 'goodsShortName',
14180
+ title: "\u5546\u54C1\u7B80\u79F0",
14181
+ width: 150
14182
+ }, {
14183
+ dataIndex: 'picPath',
14184
+ title: "\u5546\u54C1\u56FE\u7247",
14185
+ width: 150,
14186
+ render: function render(val) {
14187
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
14188
+ width: 60,
14189
+ src: val
14190
+ });
14191
+ }
14192
+ }, {
14193
+ dataIndex: 'goodsSn',
14194
+ title: "\u8D27\u53F7",
14195
+ width: 150
14196
+ }, {
14197
+ dataIndex: 'goodsId',
14198
+ title: "\u8D27\u53F7ID",
14199
+ width: 150
14200
+ }, {
14201
+ dataIndex: 'colorName',
14202
+ title: "\u989C\u8272\u540D\u79F0",
14203
+ width: 150
14204
+ }, {
14205
+ dataIndex: 'colorCode',
14206
+ title: "\u989C\u8272\u4EE3\u7801",
14207
+ width: 150
14208
+ }, {
14209
+ dataIndex: 'sizeName',
14210
+ title: "\u5C3A\u7801\u540D\u79F0",
14211
+ width: 150
14212
+ }, {
14213
+ dataIndex: 'sizeCode',
14214
+ title: "\u5C3A\u7801\u4EE3\u7801",
14215
+ width: 150
14216
+ }, {
14217
+ dataIndex: 'brandName',
14218
+ title: "\u54C1\u724C\u540D\u79F0",
14219
+ width: 150
14220
+ }, {
14221
+ dataIndex: 'goodsNumber',
14222
+ title: "\u5546\u54C1\u6570\u91CF",
14223
+ width: 150
14224
+ }, {
14225
+ dataIndex: 'goodsPrice',
14226
+ title: "\u5546\u54C1\u5355\u4EF7",
14227
+ width: 150
14228
+ }, {
14229
+ dataIndex: 'shopPrice',
14230
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
14231
+ width: 150
13818
14232
  }, {
13819
14233
  dataIndex: 'isGift',
13820
14234
  title: "\u662F\u5426\u8D60\u54C1",
@@ -14449,6 +14863,10 @@ var getColumns$2 = function getColumns(_ref) {
14449
14863
  label: '组合装',
14450
14864
  value: '2'
14451
14865
  }];
14866
+ var typeMap = {
14867
+ '1': '单品',
14868
+ '2': '组合装'
14869
+ };
14452
14870
  return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14453
14871
  style: {
14454
14872
  width: 70
@@ -14458,7 +14876,7 @@ var getColumns$2 = function getColumns(_ref) {
14458
14876
  onChange: function onChange(value) {
14459
14877
  return updateHandle(value, index, 'type');
14460
14878
  }
14461
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
14879
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
14462
14880
  }
14463
14881
  }],
14464
14882
  //旺店通换出商品信息
@@ -14570,6 +14988,10 @@ var getColumns$2 = function getColumns(_ref) {
14570
14988
  label: '组合装',
14571
14989
  value: '2'
14572
14990
  }];
14991
+ var typeMap = {
14992
+ '1': '单品',
14993
+ '2': '组合装'
14994
+ };
14573
14995
  return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14574
14996
  style: {
14575
14997
  width: 70
@@ -14579,13 +15001,13 @@ var getColumns$2 = function getColumns(_ref) {
14579
15001
  onChange: function onChange(value) {
14580
15002
  return updateHandle(value, index, 'type');
14581
15003
  }
14582
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
15004
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
14583
15005
  }
14584
15006
  }]
14585
15007
  };
14586
15008
  };
14587
15009
 
14588
- var getYesOrNo = function getYesOrNo(val) {
15010
+ var getYesOrNo$1 = function getYesOrNo(val) {
14589
15011
  if (kmkfUtils.isNull(val)) return null;
14590
15012
  return val ? '是' : '否';
14591
15013
  };
@@ -14723,7 +15145,7 @@ var getColumns$3 = function getColumns(_ref) {
14723
15145
  label: '否',
14724
15146
  value: false
14725
15147
  }]
14726
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
15148
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
14727
15149
  },
14728
15150
  width: 100
14729
15151
  }]
@@ -14735,7 +15157,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
14735
15157
  if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
14736
15158
  return false;
14737
15159
  };
14738
- var getYesOrNo$1 = function getYesOrNo(val) {
15160
+ var getYesOrNo$2 = function getYesOrNo(val) {
14739
15161
  if (kmkfUtils.isNull(val)) return null;
14740
15162
  return val ? '是' : '否';
14741
15163
  };
@@ -14845,7 +15267,7 @@ var getColumns$4 = function getColumns(_ref) {
14845
15267
  title: "\u662F\u5426\u53D6\u6D88",
14846
15268
  width: 150,
14847
15269
  render: function render(val) {
14848
- return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
15270
+ return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
14849
15271
  }
14850
15272
  }, {
14851
15273
  dataIndex: 'isGift',
@@ -14864,7 +15286,7 @@ var getColumns$4 = function getColumns(_ref) {
14864
15286
  label: '否',
14865
15287
  value: 0
14866
15288
  }]
14867
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
15289
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
14868
15290
  }
14869
15291
  }, {
14870
15292
  dataIndex: 'skuNote',
@@ -14984,7 +15406,7 @@ var getColumns$4 = function getColumns(_ref) {
14984
15406
  label: '否',
14985
15407
  value: 0
14986
15408
  }]
14987
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
15409
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
14988
15410
  }
14989
15411
  }].map(function (item) {
14990
15412
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -15108,7 +15530,7 @@ var getColumns$4 = function getColumns(_ref) {
15108
15530
  label: '否',
15109
15531
  value: 0
15110
15532
  }]
15111
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
15533
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
15112
15534
  }
15113
15535
  }].map(function (item) {
15114
15536
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -15230,7 +15652,7 @@ var getColumns$5 = function getColumns() {
15230
15652
  ellipsis: true,
15231
15653
  align: 'center',
15232
15654
  render: function render(val, record, index) {
15233
- return (record.qty || 0) * (+record.salePrice || 0);
15655
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15234
15656
  }
15235
15657
  }, {
15236
15658
  dataIndex: 'batchId',
@@ -15506,7 +15928,7 @@ var getColumns$5 = function getColumns() {
15506
15928
  dataIndex: 'saleAmount',
15507
15929
  title: '总金额',
15508
15930
  render: function render(val, record) {
15509
- return (record.qty || 0) * (+record.salePrice || 0);
15931
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15510
15932
  }
15511
15933
  }, {
15512
15934
  dataIndex: 'batchId',
@@ -15553,53 +15975,282 @@ var getColumns$5 = function getColumns() {
15553
15975
  dataIndex: 'name',
15554
15976
  title: '商品名称'
15555
15977
  }, {
15556
- dataIndex: 'skuId',
15557
- title: '商品编码'
15978
+ dataIndex: 'skuId',
15979
+ title: '商品编码'
15980
+ }, {
15981
+ dataIndex: 'iId',
15982
+ title: '款式编码'
15983
+ }, {
15984
+ dataIndex: 'pic',
15985
+ title: '商品图片',
15986
+ width: 100,
15987
+ render: function render(val) {
15988
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
15989
+ width: 60,
15990
+ src: val
15991
+ });
15992
+ }
15993
+ }, {
15994
+ dataIndex: 'propertiesValue',
15995
+ title: '规格值'
15996
+ }, {
15997
+ dataIndex: 'saleBasePrice',
15998
+ title: '原价',
15999
+ render: function render(price) {
16000
+ return price || price === 0 ? Number(price).toFixed(2) : '';
16001
+ }
16002
+ }, {
16003
+ dataIndex: 'salePrice',
16004
+ title: '单价',
16005
+ width: 120,
16006
+ render: function render(val, record, index) {
16007
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
16008
+ style: {
16009
+ width: 70
16010
+ },
16011
+ value: val,
16012
+ min: 0,
16013
+ precision: 2,
16014
+ onChange: function onChange(num) {
16015
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
16016
+ }
16017
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
16018
+ }
16019
+ }, {
16020
+ dataIndex: 'qty',
16021
+ title: '数量',
16022
+ width: 100,
16023
+ render: function render(val, record, index) {
16024
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
16025
+ style: {
16026
+ width: 70
16027
+ },
16028
+ value: val,
16029
+ min: 1,
16030
+ precision: 0,
16031
+ onChange: function onChange(num) {
16032
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
16033
+ }
16034
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
16035
+ }
16036
+ }, {
16037
+ dataIndex: 'saleAmount',
16038
+ title: '总金额',
16039
+ render: function render(val, record) {
16040
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
16041
+ }
16042
+ }, {
16043
+ dataIndex: 'isGift',
16044
+ title: '是否赠品',
16045
+ width: 100,
16046
+ render: function render(val, record, index) {
16047
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
16048
+ value: val,
16049
+ onChange: function onChange(value) {
16050
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
16051
+ },
16052
+ options: [{
16053
+ label: '是',
16054
+ value: true
16055
+ }, {
16056
+ label: '否',
16057
+ value: false
16058
+ }]
16059
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
16060
+ }
16061
+ }, {
16062
+ dataIndex: 'remark',
16063
+ title: '备注',
16064
+ render: function render(val, record, index) {
16065
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
16066
+ style: {
16067
+ width: 70
16068
+ },
16069
+ value: val,
16070
+ onChange: function onChange(e) {
16071
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
16072
+ }
16073
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
16074
+ }
16075
+ }].map(fillAttrs)
16076
+ };
16077
+ };
16078
+
16079
+ function toNum$2(value) {
16080
+ if (typeof value === 'string') {
16081
+ return value ? +value : void 0;
16082
+ }
16083
+ if (typeof value === 'number') {
16084
+ return value;
16085
+ }
16086
+ return void 0;
16087
+ }
16088
+ var getColumns$6 = function getColumns(_ref) {
16089
+ var _ref$text = _ref.text,
16090
+ disabled = _ref.disabled,
16091
+ updateHandle = _ref.updateHandle;
16092
+ return {
16093
+ KM_GOODS: [{
16094
+ dataIndex: 'skuPropertiesName',
16095
+ title: "\u89C4\u683C\u540D\u79F0",
16096
+ width: 250
16097
+ }, {
16098
+ dataIndex: 'sysTitle',
16099
+ title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
16100
+ width: 150
16101
+ }, {
16102
+ dataIndex: 'title',
16103
+ title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
16104
+ width: 150
16105
+ }, {
16106
+ dataIndex: 'shortTitle',
16107
+ title: "\u5546\u54C1\u7B80\u79F0",
16108
+ width: 150
16109
+ }, {
16110
+ dataIndex: 'sysOuterId',
16111
+ title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
16112
+ width: 150
16113
+ }, {
16114
+ dataIndex: 'outerId',
16115
+ title: "\u5546\u5BB6\u7F16\u7801",
16116
+ width: 150
16117
+ }, {
16118
+ dataIndex: 'skuSysId',
16119
+ title: "\u7CFB\u7EDF\u89C4\u683CID",
16120
+ width: 150
16121
+ }, {
16122
+ dataIndex: 'itemSysId',
16123
+ title: "\u7CFB\u7EDF\u5546\u54C1ID",
16124
+ width: 150
16125
+ }, {
16126
+ dataIndex: 'sysPicPath',
16127
+ title: "\u5546\u54C1\u56FE\u7247",
16128
+ width: 100,
16129
+ render: function render(val) {
16130
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
16131
+ width: 60,
16132
+ src: val
16133
+ });
16134
+ }
16135
+ }, {
16136
+ dataIndex: 'num',
16137
+ title: "\u6570\u91CF",
16138
+ width: 100,
16139
+ render: function render(val, record, index) {
16140
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
16141
+ style: {
16142
+ width: 70
16143
+ },
16144
+ value: val,
16145
+ min: 1,
16146
+ precision: 0,
16147
+ onChange: function onChange(num) {
16148
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
16149
+ }
16150
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
16151
+ }
16152
+ }, {
16153
+ dataIndex: 'payment',
16154
+ title: "\u5B9E\u4ED8\u91D1\u989D",
16155
+ width: 150,
16156
+ render: function render(val, record, index) {
16157
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
16158
+ style: {
16159
+ width: 130
16160
+ },
16161
+ value: val,
16162
+ min: 0,
16163
+ precision: 2,
16164
+ onChange: function onChange(num) {
16165
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
16166
+ }
16167
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
16168
+ }
16169
+ }, {
16170
+ dataIndex: 'price',
16171
+ title: "\u5546\u54C1\u9500\u552E\u4EF7",
16172
+ width: 150,
16173
+ render: function render(val) {
16174
+ return val || val === 0 ? Number(val).toFixed(2) : '';
16175
+ }
16176
+ }, {
16177
+ dataIndex: 'type',
16178
+ title: "\u5546\u54C1\u7C7B\u578B",
16179
+ width: 150
16180
+ }].map(function (item) {
16181
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16182
+ align: 'center',
16183
+ ellipsis: true
16184
+ });
16185
+ }),
16186
+ KM_REISSUE_GOODS: [{
16187
+ dataIndex: 'sysSkuPropertiesName',
16188
+ title: "\u89C4\u683C\u540D\u79F0",
16189
+ width: 250
16190
+ }, {
16191
+ dataIndex: 'sysTitle',
16192
+ title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
16193
+ width: 150
16194
+ }, {
16195
+ dataIndex: 'shortTitle',
16196
+ title: "\u5546\u54C1\u7B80\u79F0",
16197
+ width: 150
16198
+ }, {
16199
+ dataIndex: 'title',
16200
+ title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
16201
+ width: 150
15558
16202
  }, {
15559
- dataIndex: 'iId',
15560
- title: '款式编码'
16203
+ dataIndex: 'outerId',
16204
+ title: "\u5546\u5BB6\u7F16\u7801",
16205
+ width: 150
15561
16206
  }, {
15562
- dataIndex: 'pic',
15563
- title: '商品图片',
15564
- width: 100,
15565
- render: function render(val) {
15566
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
15567
- width: 60,
15568
- src: val
15569
- });
15570
- }
16207
+ dataIndex: 'sysOuterId',
16208
+ title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
16209
+ width: 150
15571
16210
  }, {
15572
- dataIndex: 'propertiesValue',
15573
- title: '规格值'
16211
+ dataIndex: 'itemSysId',
16212
+ title: "\u7CFB\u7EDF\u5546\u54C1ID",
16213
+ width: 150
15574
16214
  }, {
15575
- dataIndex: 'saleBasePrice',
15576
- title: '原价',
15577
- render: function render(price) {
15578
- return price || price === 0 ? Number(price).toFixed(2) : '';
15579
- }
16215
+ dataIndex: 'skuSysId',
16216
+ title: "\u7CFB\u7EDF\u89C4\u683CID",
16217
+ width: 150
15580
16218
  }, {
15581
- dataIndex: 'salePrice',
15582
- title: '单价',
15583
- width: 120,
16219
+ dataIndex: 'realNum',
16220
+ title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
16221
+ width: 100,
16222
+ validator: function validator(_rule, value) {
16223
+ var title = '';
16224
+ if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
16225
+ var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
16226
+ var res = typeof realNum === 'number' ? realNum < 1 : true;
16227
+ if (res) {
16228
+ title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
16229
+ }
16230
+ return res;
16231
+ })) {
16232
+ return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
16233
+ }
16234
+ },
15584
16235
  render: function render(val, record, index) {
15585
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
16236
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
15586
16237
  style: {
15587
16238
  width: 70
15588
16239
  },
15589
16240
  value: val,
15590
- min: 0,
15591
- precision: 2,
16241
+ min: 1,
16242
+ precision: 0,
15592
16243
  onChange: function onChange(num) {
15593
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
16244
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
15594
16245
  }
15595
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
16246
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
15596
16247
  }
15597
16248
  }, {
15598
- dataIndex: 'qty',
15599
- title: '数量',
16249
+ dataIndex: 'desiredNum',
16250
+ title: "\u5E94\u8865\u53D1\u6570\u91CF",
15600
16251
  width: 100,
15601
16252
  render: function render(val, record, index) {
15602
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
16253
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
15603
16254
  style: {
15604
16255
  width: 70
15605
16256
  },
@@ -15607,54 +16258,55 @@ var getColumns$5 = function getColumns() {
15607
16258
  min: 1,
15608
16259
  precision: 0,
15609
16260
  onChange: function onChange(num) {
15610
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
16261
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
15611
16262
  }
15612
16263
  }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
15613
16264
  }
15614
16265
  }, {
15615
- dataIndex: 'saleAmount',
15616
- title: '总金额',
15617
- render: function render(val, record) {
15618
- return (record.qty || 0) * (+record.salePrice || 0);
15619
- }
15620
- }, {
15621
- dataIndex: 'isGift',
15622
- title: '是否赠品',
15623
- width: 100,
15624
- render: function render(val, record, index) {
15625
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
15626
- value: val,
15627
- onChange: function onChange(value) {
15628
- updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
15629
- },
15630
- options: [{
15631
- label: '是',
15632
- value: true
15633
- }, {
15634
- label: '否',
15635
- value: false
15636
- }]
15637
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
15638
- }
16266
+ dataIndex: 'price',
16267
+ title: "\u5546\u54C1\u9500\u552E\u4EF7",
16268
+ width: 150
15639
16269
  }, {
15640
- dataIndex: 'remark',
15641
- title: '备注',
16270
+ dataIndex: 'payment',
16271
+ title: "\u5B9E\u4ED8\u91D1\u989D",
16272
+ width: 150,
15642
16273
  render: function render(val, record, index) {
15643
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
16274
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
15644
16275
  style: {
15645
- width: 70
16276
+ width: 130
15646
16277
  },
15647
16278
  value: val,
15648
- onChange: function onChange(e) {
15649
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
16279
+ min: 0,
16280
+ precision: 2,
16281
+ onChange: function onChange(num) {
16282
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
15650
16283
  }
15651
16284
  }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
15652
16285
  }
15653
- }].map(fillAttrs)
16286
+ }, {
16287
+ dataIndex: 'type',
16288
+ title: "\u5546\u54C1\u7C7B\u578B",
16289
+ width: 150
16290
+ }, {
16291
+ dataIndex: 'sysPicPath',
16292
+ title: "\u5546\u54C1\u56FE\u7247",
16293
+ width: 100,
16294
+ render: function render(val) {
16295
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
16296
+ width: 60,
16297
+ src: val
16298
+ });
16299
+ }
16300
+ }].map(function (item) {
16301
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16302
+ align: 'center',
16303
+ ellipsis: true
16304
+ });
16305
+ })
15654
16306
  };
15655
16307
  };
15656
16308
 
15657
- var getColumns$6 = function getColumns(_ref) {
16309
+ var getColumns$7 = function getColumns(_ref) {
15658
16310
  var _ref$text = _ref.text,
15659
16311
  text = _ref$text === void 0 ? '' : _ref$text,
15660
16312
  disabled = _ref.disabled,
@@ -15767,7 +16419,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15767
16419
  disabled = _ref.disabled,
15768
16420
  updateHandle = _ref.updateHandle,
15769
16421
  updateDataHandle = _ref.updateDataHandle;
15770
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
16422
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
15771
16423
  text: text,
15772
16424
  disabled: disabled,
15773
16425
  updateHandle: updateHandle
@@ -15792,8 +16444,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15792
16444
  text: text,
15793
16445
  disabled: disabled,
15794
16446
  updateHandle: updateHandle
16447
+ })), getColumns$6({
16448
+ text: text,
16449
+ disabled: disabled,
16450
+ updateHandle: updateHandle
15795
16451
  })), {}, {
15796
- default: getColumns$6({
16452
+ default: getColumns$7({
15797
16453
  text: text,
15798
16454
  disabled: disabled,
15799
16455
  updateHandle: updateHandle
@@ -15945,6 +16601,231 @@ function HoverTableRowDeleteIcon(_ref) {
15945
16601
  })));
15946
16602
  }
15947
16603
 
16604
+ var isErpType = {
16605
+ isWdt: function isWdt(type) {
16606
+ return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
16607
+ },
16608
+ isBsE3: function isBsE3(type) {
16609
+ return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
16610
+ },
16611
+ isGy: function isGy(type) {
16612
+ return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
16613
+ },
16614
+ isJst: function isJst(type) {
16615
+ return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
16616
+ },
16617
+ isKm: function isKm(type) {
16618
+ return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
16619
+ }
16620
+ };
16621
+ var processGoods = function processGoods(_ref) {
16622
+ var list = _ref.list,
16623
+ type = _ref.type,
16624
+ canUpdateNumber = _ref.canUpdateNumber;
16625
+ var newList = [];
16626
+ // 根据商品类型处理数据
16627
+ if (isErpType.isWdt(type)) {
16628
+ newList = processWdtGoods({
16629
+ list: list,
16630
+ type: type,
16631
+ canUpdateNumber: canUpdateNumber
16632
+ });
16633
+ } else if (isErpType.isBsE3(type)) {
16634
+ newList = processBsE3Goods({
16635
+ list: list,
16636
+ type: type,
16637
+ canUpdateNumber: canUpdateNumber
16638
+ });
16639
+ } else if (isErpType.isGy(type)) {
16640
+ newList = processGyGoods({
16641
+ list: list,
16642
+ type: type,
16643
+ canUpdateNumber: canUpdateNumber
16644
+ });
16645
+ } else if (isErpType.isJst(type)) {
16646
+ newList = processJstGoods({
16647
+ list: list,
16648
+ type: type,
16649
+ canUpdateNumber: canUpdateNumber
16650
+ });
16651
+ } else if (isErpType.isKm(type)) {
16652
+ newList = processKmGoods({
16653
+ list: list,
16654
+ type: type,
16655
+ canUpdateNumber: canUpdateNumber
16656
+ });
16657
+ } else {
16658
+ newList = processDefaultGoods({
16659
+ list: list,
16660
+ type: type,
16661
+ canUpdateNumber: canUpdateNumber
16662
+ });
16663
+ }
16664
+ return newList;
16665
+ };
16666
+ // 处理不同类型的商品数据
16667
+ var processWdtGoods = function processWdtGoods(_ref2) {
16668
+ var list = _ref2.list,
16669
+ type = _ref2.type,
16670
+ canUpdateNumber = _ref2.canUpdateNumber;
16671
+ return list.map(function (item) {
16672
+ var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
16673
+ uuid: kmkfUtils.uuid(),
16674
+ canDelete: true,
16675
+ num: 1,
16676
+ orderPrice: 0,
16677
+ sharePrice: 0,
16678
+ canUpdateNumber: canUpdateNumber
16679
+ });
16680
+ // 特殊处理换货商品
16681
+ if (type === 'WDT_EXCHANGE_GOODS') {
16682
+ processedItem.price = item.retailPrice;
16683
+ processedItem.type = '1';
16684
+ }
16685
+ return processedItem;
16686
+ });
16687
+ };
16688
+ var processBsE3Goods = function processBsE3Goods(_ref3) {
16689
+ var list = _ref3.list,
16690
+ canUpdateNumber = _ref3.canUpdateNumber;
16691
+ return list.map(function (item) {
16692
+ var specNo = item.specNo,
16693
+ specId = item.specId,
16694
+ goodName = item.goodName,
16695
+ goodShortName = item.goodShortName,
16696
+ goodPicUrl = item.goodPicUrl,
16697
+ goodNo = item.goodNo,
16698
+ goodId = item.goodId,
16699
+ retailPrice = item.retailPrice;
16700
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16701
+ sku: specNo,
16702
+ skuId: specId,
16703
+ goodsName: goodName,
16704
+ goodsShortName: goodShortName,
16705
+ picPath: goodPicUrl,
16706
+ goodsSn: goodNo,
16707
+ goodsId: goodId,
16708
+ goodsPrice: retailPrice,
16709
+ shopPrice: retailPrice,
16710
+ sharePayment: '',
16711
+ sharePrice: '',
16712
+ payment: '',
16713
+ tcSku: '',
16714
+ tcGoodsNumber: '',
16715
+ taoCanSingleSl: '',
16716
+ isGift: '',
16717
+ uuid: kmkfUtils.uuid(),
16718
+ canDelete: true,
16719
+ canEdit: true,
16720
+ goodsNumber: 1,
16721
+ canUpdateNumber: canUpdateNumber
16722
+ });
16723
+ });
16724
+ };
16725
+ var processGyGoods = function processGyGoods(_ref4) {
16726
+ var list = _ref4.list;
16727
+ return list.map(function (item) {
16728
+ var goodName = item.goodName,
16729
+ goodShortName = item.goodShortName,
16730
+ goodNo = item.goodNo,
16731
+ specName = item.specName,
16732
+ specNo = item.specNo,
16733
+ retailPrice = item.retailPrice;
16734
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16735
+ uuid: kmkfUtils.uuid(),
16736
+ canDelete: true,
16737
+ canEdit: true,
16738
+ qty: 1,
16739
+ goodName: goodName,
16740
+ goodShortName: goodShortName,
16741
+ goodNo: goodNo,
16742
+ specName: specName,
16743
+ specNo: specNo,
16744
+ originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
16745
+ originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
16746
+ });
16747
+ });
16748
+ };
16749
+ var processJstGoods = function processJstGoods(_ref5) {
16750
+ var list = _ref5.list;
16751
+ return list.map(function (item) {
16752
+ return {
16753
+ name: item.goodName,
16754
+ skuId: item.goodNo,
16755
+ iId: item.styleCode,
16756
+ pic: item.goodPicUrl,
16757
+ propertiesValue: item.propertiesValue,
16758
+ saleBasePrice: item.retailPrice,
16759
+ salePrice: item.retailPrice,
16760
+ remark: '',
16761
+ uuid: kmkfUtils.uuid(),
16762
+ canDelete: true,
16763
+ canEdit: true,
16764
+ qty: 1
16765
+ };
16766
+ });
16767
+ };
16768
+ var processKmGoods = function processKmGoods(_ref6) {
16769
+ var list = _ref6.list,
16770
+ type = _ref6.type;
16771
+ var initParamsMap = {
16772
+ KM_GOODS: {
16773
+ num: 1
16774
+ },
16775
+ KM_REISSUE_GOODS: {
16776
+ realNum: 1,
16777
+ desiredNum: 1
16778
+ }
16779
+ };
16780
+ return list.map(function (item) {
16781
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16782
+ sysSkuPropertiesName: item.specName,
16783
+ sysTitle: item.goodName,
16784
+ title: null,
16785
+ shortTitle: item.goodShortName,
16786
+ sysOuterId: item.goodNo,
16787
+ outerId: item.goodNo,
16788
+ skuSysId: item.specId,
16789
+ itemSysId: item.goodId,
16790
+ sysPicPath: item.goodPicUrl,
16791
+ payment: null,
16792
+ price: item.retailPrice,
16793
+ type: null,
16794
+ uuid: kmkfUtils.uuid(),
16795
+ canDelete: true,
16796
+ canEdit: true
16797
+ }, initParamsMap[type] || {});
16798
+ });
16799
+ };
16800
+ var processDefaultGoods = function processDefaultGoods(_ref7) {
16801
+ var list = _ref7.list,
16802
+ canUpdateNumber = _ref7.canUpdateNumber;
16803
+ return list.map(function (item) {
16804
+ var goodsId = item.goodsId,
16805
+ name = item.name,
16806
+ code = item.code,
16807
+ skuCode = item.skuCode,
16808
+ marketPrice = item.marketPrice,
16809
+ skuName = item.skuName;
16810
+ return {
16811
+ id: goodsId,
16812
+ mark: '是',
16813
+ pic: '',
16814
+ skuName: skuName,
16815
+ name: name,
16816
+ code: code,
16817
+ sku: skuCode,
16818
+ money: marketPrice || 0,
16819
+ share: marketPrice || 0,
16820
+ number: 1,
16821
+ type: '',
16822
+ uuid: kmkfUtils.uuid(),
16823
+ canDelete: true,
16824
+ canUpdateNumber: canUpdateNumber
16825
+ };
16826
+ });
16827
+ };
16828
+
15948
16829
  var GoodsModalMap = {
15949
16830
  WDT_REISSUE_GOODS: WdtGoodsModal,
15950
16831
  WDT_GOODS: WdtGoodsModal,
@@ -15954,10 +16835,13 @@ var GoodsModalMap = {
15954
16835
  BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
15955
16836
  GY_GOODS: GyGoodsModal$2,
15956
16837
  GY_REISSUE_GOODS: GyGoodsModal$2,
16838
+ GY_RETURN_GOODS: GyGoodsModal$2,
15957
16839
  JST_GOODS: JstGoodsModal,
15958
16840
  JST_REISSUE_GOODS: JstGoodsModal,
15959
16841
  JST_RETURN_GOODS: JstGoodsModal,
15960
16842
  JST_EXCHANGE_GOODS: JstGoodsModal,
16843
+ KM_GOODS: KmGoodsModal,
16844
+ KM_REISSUE_GOODS: KmGoodsModal,
15961
16845
  OTHER_GOODS: GoodsModal$2
15962
16846
  };
15963
16847
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
@@ -15991,7 +16875,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
15991
16875
  return item === null || item === void 0 ? void 0 : item[uniqueKey];
15992
16876
  }));
15993
16877
  var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
15994
- console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
16878
+ // console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
15995
16879
  onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
15996
16880
  };
15997
16881
  var rowSelection = {
@@ -16020,13 +16904,16 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
16020
16904
  };
16021
16905
  var getButtonText = function getButtonText() {
16022
16906
  var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
16907
+ if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
16908
+ return '选择快麦ERP商品';
16909
+ }
16023
16910
  if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
16024
16911
  return '选择百胜ERP商品';
16025
16912
  }
16026
16913
  if (['WDT_REISSUE_GOODS'].includes(type)) {
16027
16914
  return '选择旺店通商品';
16028
16915
  }
16029
- if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16916
+ if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
16030
16917
  return '选择管易ERP商品';
16031
16918
  }
16032
16919
  if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
@@ -16163,6 +17050,8 @@ var GoodItem$1 = function GoodItem(props) {
16163
17050
  case 'JST_RETURN_GOODS':
16164
17051
  case 'GY_REISSUE_GOODS':
16165
17052
  case 'GY_RETURN_GOODS':
17053
+ case 'KM_GOODS':
17054
+ case 'KM_REISSUE_GOODS':
16166
17055
  {
16167
17056
  columns = getColumnsMap$1({
16168
17057
  text: text,
@@ -16280,120 +17169,11 @@ var GoodItem$1 = function GoodItem(props) {
16280
17169
  }].concat(_toConsumableArray(columns));
16281
17170
  }, []);
16282
17171
  var onSubmit = function onSubmit(list) {
16283
- var newList = [];
16284
- if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
16285
- newList = list.map(function (item) {
16286
- item.uuid = kmkfUtils.uuid();
16287
- item.canDelete = true;
16288
- item.num = 1;
16289
- item.orderPrice = 0;
16290
- item.sharePrice = 0;
16291
- item.canUpdateNumber = canUpdateNumber;
16292
- if (type === 'WDT_EXCHANGE_GOODS') {
16293
- item.price = item.retailPrice;
16294
- item.type = '1';
16295
- }
16296
- return item;
16297
- });
16298
- } else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
16299
- newList = list.map(function (item) {
16300
- var specNo = item.specNo,
16301
- specId = item.specId,
16302
- goodName = item.goodName,
16303
- goodShortName = item.goodShortName,
16304
- goodPicUrl = item.goodPicUrl,
16305
- goodNo = item.goodNo,
16306
- goodId = item.goodId,
16307
- retailPrice = item.retailPrice;
16308
- return _objectSpread2(_objectSpread2({}, item), {}, {
16309
- sku: specNo,
16310
- skuId: specId,
16311
- goodsName: goodName,
16312
- goodsShortName: goodShortName,
16313
- picPath: goodPicUrl,
16314
- goodsSn: goodNo,
16315
- goodsId: goodId,
16316
- goodsPrice: retailPrice,
16317
- shopPrice: retailPrice,
16318
- sharePayment: '',
16319
- sharePrice: '',
16320
- payment: '',
16321
- tcSku: '',
16322
- tcGoodsNumber: '',
16323
- taoCanSingleSl: '',
16324
- isGift: '',
16325
- uuid: kmkfUtils.uuid(),
16326
- canDelete: true,
16327
- canEdit: true,
16328
- goodsNumber: 1,
16329
- canUpdateNumber: canUpdateNumber
16330
- });
16331
- });
16332
- } else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16333
- newList = list.map(function (item) {
16334
- var goodName = item.goodName,
16335
- goodShortName = item.goodShortName,
16336
- goodNo = item.goodNo,
16337
- specName = item.specName,
16338
- specNo = item.specNo,
16339
- retailPrice = item.retailPrice;
16340
- return _objectSpread2(_objectSpread2({}, item), {}, {
16341
- uuid: kmkfUtils.uuid(),
16342
- canDelete: true,
16343
- canEdit: true,
16344
- qty: 1,
16345
- goodName: goodName,
16346
- goodShortName: goodShortName,
16347
- goodNo: goodNo,
16348
- specName: specName,
16349
- specNo: specNo,
16350
- originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
16351
- originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
16352
- });
16353
- });
16354
- } else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
16355
- newList = list.map(function (item) {
16356
- return {
16357
- name: item.goodName,
16358
- skuId: item.goodNo,
16359
- iId: item.styleCode,
16360
- pic: item.goodPicUrl,
16361
- propertiesValue: item.propertiesValue,
16362
- saleBasePrice: item.retailPrice,
16363
- salePrice: item.retailPrice,
16364
- remark: '',
16365
- uuid: kmkfUtils.uuid(),
16366
- canDelete: true,
16367
- canEdit: true,
16368
- qty: 1
16369
- };
16370
- });
16371
- } else {
16372
- newList = list.map(function (item) {
16373
- var goodsId = item.goodsId,
16374
- name = item.name,
16375
- code = item.code,
16376
- skuCode = item.skuCode,
16377
- marketPrice = item.marketPrice,
16378
- skuName = item.skuName;
16379
- return {
16380
- id: goodsId,
16381
- mark: '是',
16382
- pic: '',
16383
- skuName: skuName,
16384
- name: name,
16385
- code: code,
16386
- sku: skuCode,
16387
- money: marketPrice || 0,
16388
- share: marketPrice || 0,
16389
- number: 1,
16390
- type: '',
16391
- uuid: kmkfUtils.uuid(),
16392
- canDelete: true,
16393
- canUpdateNumber: canUpdateNumber
16394
- };
16395
- });
16396
- }
17172
+ var newList = processGoods({
17173
+ list: list,
17174
+ canUpdateNumber: canUpdateNumber,
17175
+ type: type
17176
+ });
16397
17177
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
16398
17178
  };
16399
17179
  var onSelectChange = function onSelectChange(newSelectedRowKeys) {
@@ -17107,10 +17887,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
17107
17887
  var _data$data, _data$data$trades;
17108
17888
  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) {
17109
17889
  data.data.trades = kmkfUtils.filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
17890
+ var _tradeStatusMap$data$;
17110
17891
  return _objectSpread2(_objectSpread2({}, item), {}, {
17111
17892
  billNo: item.tradeNo,
17112
17893
  billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
17113
- billTag: item.tagName
17894
+ billTag: item.tagName,
17895
+ 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]
17114
17896
  });
17115
17897
  });
17116
17898
  }
@@ -17353,7 +18135,6 @@ var index$3 = (function (props) {
17353
18135
  } else if (type === 'BS_E3_SYSTEM_ORDER') {
17354
18136
  getBsE3OrderList(value.orderNo);
17355
18137
  } else if (type === 'GY_SYSTEM_ORDER') {
17356
- console.log('触发gy--getGyOrderList--1');
17357
18138
  getGyOrderList(value.orderNo);
17358
18139
  } else if (type === 'JST_SYSTEM_ORDER') {
17359
18140
  getJstOrderList(value.orderNo);
@@ -17467,11 +18248,13 @@ var index$3 = (function (props) {
17467
18248
  showOrderInfo: trades.map(function (_ref4) {
17468
18249
  var billNo = _ref4.billNo,
17469
18250
  billType = _ref4.billType,
17470
- billTag = _ref4.billTag;
18251
+ billTag = _ref4.billTag,
18252
+ tradeStatusValue = _ref4.tradeStatusValue;
17471
18253
  return {
17472
18254
  billNo: billNo,
17473
18255
  billType: billType,
17474
- billTag: billTag
18256
+ billTag: billTag,
18257
+ tradeStatusValue: tradeStatusValue
17475
18258
  };
17476
18259
  })
17477
18260
  }));
@@ -17781,6 +18564,31 @@ var componentMap$1 = {
17781
18564
  returnDeleteGood: 'jstReturnDeleteGood',
17782
18565
  exchangeDeleteGood: 'jstExchangeDeleteGood'
17783
18566
  }
18567
+ },
18568
+ KM_GOODS: {
18569
+ type: 'km',
18570
+ key: 'kmGoods',
18571
+ name: '快麦',
18572
+ orderNo: 'tid',
18573
+ goodDetailOrderNo: 'originalDealCode',
18574
+ eventNameMap: {
18575
+ // pubsub 事件
18576
+ type: 'kmType',
18577
+ updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
18578
+ selectListReturn: 'kmSelectListReturn',
18579
+ selectList: 'kmSelectList',
18580
+ reissueSelectList: 'kmReissueSelectList',
18581
+ reissueSelectListReturn: 'kmReissueSelectListReturn',
18582
+ reissueDeleteGood: 'kmReissueDeleteGood',
18583
+ changeShopCode: 'kmChangeShopCode',
18584
+ reissueType: 'kmReissueType',
18585
+ returnType: 'kmReturnType',
18586
+ returnSelectListReturn: 'kmReturnSelectListReturn',
18587
+ returnSelectList: 'kmReturnSelectList',
18588
+ deleteGood: 'kmDeleteGood',
18589
+ returnDeleteGood: 'kmReturnDeleteGood',
18590
+ exchangeDeleteGood: 'kmExchangeDeleteGood'
18591
+ }
17784
18592
  }
17785
18593
  };
17786
18594
  var CommonGoods = function CommonGoods(props) {
@@ -17789,7 +18597,7 @@ var CommonGoods = function CommonGoods(props) {
17789
18597
  disabled = props.disabled,
17790
18598
  onChange = props.onChange,
17791
18599
  compType = props.type;
17792
- console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
18600
+ // console.log('value?.orders', value?.orders);
17793
18601
  // 合并单订单会包含","
17794
18602
  var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
17795
18603
  var _order$componentMap$c;
@@ -17942,7 +18750,9 @@ var CommonGoods = function CommonGoods(props) {
17942
18750
  var getGoodDetails = function getGoodDetails(_ref2) {
17943
18751
  var mode = _ref2.mode;
17944
18752
  var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
17945
- var goodDetails = updateHandle(value.orders || []);
18753
+ var goodDetails = updateHandle(value.orders || [], {
18754
+ orderBackGoodsLevel: props.orderBackGoodsLevel
18755
+ });
17946
18756
  var orderNo = value.orderNo;
17947
18757
  return mode ? goodDetails.filter(function (goodItem) {
17948
18758
  var _componentMap$compTyp;
@@ -17996,7 +18806,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
17996
18806
  _props$reasonList = props.reasonList,
17997
18807
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17998
18808
  disabled = props.disabled,
17999
- compType = props.type;
18809
+ compType = props.type,
18810
+ isSettingConfig = props.isSettingConfig;
18000
18811
  var valueRef = React.useRef({});
18001
18812
  React.useEffect(function () {
18002
18813
  var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
@@ -18088,7 +18899,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
18088
18899
  var newValue = _objectSpread2({}, value);
18089
18900
  newValue[componentMap$2[compType].returnTypeKey] = val;
18090
18901
  newValue[componentMap$2[compType].valueKey] = [];
18091
- if (['2'].includes(val[0])) {
18902
+ if (isSettingConfig || ['2'].includes(val[0])) {
18092
18903
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18093
18904
  valueRef.current = newValue;
18094
18905
  }
@@ -18110,7 +18921,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
18110
18921
  style: {
18111
18922
  marginBottom: '8px'
18112
18923
  },
18113
- disabled: disabled,
18924
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
18114
18925
  allowClear: false,
18115
18926
  options: reasonList,
18116
18927
  value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
@@ -18292,7 +19103,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
18292
19103
  })));
18293
19104
  };
18294
19105
 
18295
- var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
19106
+ var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
18296
19107
  var typeMap$1 = {
18297
19108
  WDT_REISSUE_GOODS: {
18298
19109
  key: 'wdtReissueGoods',
@@ -18313,13 +19124,14 @@ var typeMap$1 = {
18313
19124
  }
18314
19125
  };
18315
19126
  var wdtReissue = function wdtReissue(props) {
18316
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
19127
+ var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
18317
19128
  var value = props.value,
18318
19129
  onChange = props.onChange,
18319
19130
  _props$reasonList = props.reasonList,
18320
19131
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
18321
19132
  disabled = props.disabled,
18322
19133
  type = props.type,
19134
+ isSettingConfig = props.isSettingConfig,
18323
19135
  other = _objectWithoutProperties(props, _excluded$i);
18324
19136
  var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
18325
19137
  var _order$srcTid;
@@ -18383,11 +19195,13 @@ var wdtReissue = function wdtReissue(props) {
18383
19195
  var showOrderInfo = orders.map(function (_ref2) {
18384
19196
  var billNo = _ref2.billNo,
18385
19197
  billType = _ref2.billType,
18386
- billTag = _ref2.billTag;
19198
+ billTag = _ref2.billTag,
19199
+ tradeStatusValue = _ref2.tradeStatusValue;
18387
19200
  return {
18388
19201
  billNo: billNo,
18389
19202
  billType: billType,
18390
- billTag: billTag
19203
+ billTag: billTag,
19204
+ tradeStatusValue: tradeStatusValue
18391
19205
  };
18392
19206
  });
18393
19207
  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]) || {}), {}, {
@@ -18470,7 +19284,7 @@ var wdtReissue = function wdtReissue(props) {
18470
19284
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18471
19285
  };
18472
19286
  var selectedGoodsChange = React.useCallback(function (skuList) {
18473
- var _typeMap$type21, _typeMap$type22, _uniqBy, _typeMap$type23;
19287
+ var _typeMap$type21, _typeMap$type22, _uniqBy;
18474
19288
  var newValue = _objectSpread2({}, value);
18475
19289
  // 原订单商品
18476
19290
  var originTradeGoodList = getGoodDetails({
@@ -18481,14 +19295,14 @@ var wdtReissue = function wdtReissue(props) {
18481
19295
  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) {
18482
19296
  return skuList.includes(item.uuid);
18483
19297
  });
18484
- 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)]);
19298
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
18485
19299
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18486
- }, [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]);
19300
+ }, [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]);
18487
19301
  //显示选择商品按钮 原单换不显示选择商品
18488
19302
  var showChangeBtn = React.useMemo(function () {
18489
- var _typeMap$type25;
18490
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
18491
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
19303
+ var _typeMap$type24;
19304
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
19305
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
18492
19306
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
18493
19307
  gutter: 8,
18494
19308
  wrap: true
@@ -18502,16 +19316,17 @@ var wdtReissue = function wdtReissue(props) {
18502
19316
  }
18503
19317
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
18504
19318
  style: {
18505
- marginBottom: '8px'
19319
+ marginBottom: '8px',
19320
+ width: '100%'
18506
19321
  },
18507
19322
  disabled: disabled,
18508
19323
  allowClear: false,
18509
- 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)],
19324
+ 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)],
18510
19325
  onChange: function onChange(val) {
18511
19326
  return changeSystemOrderHandle(val);
18512
19327
  },
18513
19328
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
18514
- }, ((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) {
19329
+ }, ((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) {
18515
19330
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
18516
19331
  key: item.billNo,
18517
19332
  value: item.billNo,
@@ -18527,12 +19342,13 @@ var wdtReissue = function wdtReissue(props) {
18527
19342
  }
18528
19343
  }, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
18529
19344
  style: {
18530
- marginBottom: '8px'
19345
+ marginBottom: '8px',
19346
+ width: '100%'
18531
19347
  },
18532
- disabled: disabled,
19348
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
18533
19349
  allowClear: false,
18534
19350
  options: reasonList,
18535
- 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)],
19351
+ 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)],
18536
19352
  onChange: function onChange(val) {
18537
19353
  return changeTypeHandle(val);
18538
19354
  }
@@ -18544,7 +19360,7 @@ var wdtReissue = function wdtReissue(props) {
18544
19360
  canUpdateNumber: showChangeBtn,
18545
19361
  showChangeBtn: showChangeBtn,
18546
19362
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
18547
- 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)],
19363
+ 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)],
18548
19364
  onChange: function onChange(val) {
18549
19365
  return changeGoodHandle(val);
18550
19366
  },
@@ -18560,7 +19376,7 @@ var wdtReissue = function wdtReissue(props) {
18560
19376
  })));
18561
19377
  };
18562
19378
 
18563
- var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
19379
+ var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
18564
19380
  var typeMap$2 = {
18565
19381
  JST_REISSUE_GOODS: {
18566
19382
  compType: '补发',
@@ -18575,7 +19391,9 @@ var typeMap$2 = {
18575
19391
  orderTypeKey: 'orderType',
18576
19392
  oIdKey: 'oId',
18577
19393
  outerOiIdKey: '',
18578
- goodDetailsKey: 'items'
19394
+ goodDetailsKey: 'items',
19395
+ mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
19396
+ uniqueKey: 'uuid'
18579
19397
  },
18580
19398
  JST_RETURN_GOODS: {
18581
19399
  compType: '退货',
@@ -18591,6 +19409,8 @@ var typeMap$2 = {
18591
19409
  oIdKey: 'oId',
18592
19410
  outerOiIdKey: '',
18593
19411
  goodDetailsKey: 'items',
19412
+ mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
19413
+ uniqueKey: 'uuid',
18594
19414
  eventNameMap: {
18595
19415
  // pubsub 事件
18596
19416
  exchangeCopyGood: 'jstExchangeCopyGood',
@@ -18598,16 +19418,32 @@ var typeMap$2 = {
18598
19418
  returnGoodsSysorder: 'jstReturnGoodsSysorder',
18599
19419
  returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
18600
19420
  }
19421
+ },
19422
+ KM_REISSUE_GOODS: {
19423
+ compType: '补发',
19424
+ key: 'kmReissueGoods',
19425
+ typeName: 'kmReissueType',
19426
+ systemOrder: 'kmSystemOrder',
19427
+ systemOrderNo: 'kmSystemOrderNo',
19428
+ getOrderList: kmUtils.getOrderListSingleton,
19429
+ updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
19430
+ alwaysShowChooseErpGoodsBtn: true,
19431
+ orderTypeKey: 'orderType',
19432
+ oIdKey: 'billNo',
19433
+ outerOiIdKey: '',
19434
+ goodDetailsKey: 'subOrders',
19435
+ uniqueKey: 'id'
18601
19436
  }
18602
19437
  };
18603
19438
  var PublicReissue = function PublicReissue(props) {
18604
- var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44;
19439
+ var _typeMap$type32, _typeMap$type37, _typeMap$type38, _typeMap$type39, _typeMap$type40, _value$typeMap$type$s6, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48;
18605
19440
  var value = props.value,
18606
19441
  onChange = props.onChange,
18607
19442
  _props$reasonList = props.reasonList,
18608
19443
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
18609
19444
  disabled = props.disabled,
18610
19445
  type = props.type,
19446
+ isSettingConfig = props.isSettingConfig,
18611
19447
  other = _objectWithoutProperties(props, _excluded$j);
18612
19448
  var getOrderFlag = React.useRef(false);
18613
19449
  var _useState = React.useState(false),
@@ -18714,7 +19550,7 @@ var PublicReissue = function PublicReissue(props) {
18714
19550
  }))));
18715
19551
  };
18716
19552
  var getGoodDetails = function getGoodDetails(_ref4) {
18717
- var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
19553
+ var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
18718
19554
  var mode = _ref4.mode,
18719
19555
  sysOrderNo = _ref4.sysOrderNo;
18720
19556
  var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
@@ -18722,37 +19558,47 @@ var PublicReissue = function PublicReissue(props) {
18722
19558
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
18723
19559
  return order[typeMap$2[type].oIdKey] === systemOrderNo;
18724
19560
  });
18725
- var goodDetails = kmkfUtils.jstMergeIdenticalGoods((order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length) ? (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], true) : []);
19561
+ var orderRest = undefined;
19562
+ if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
19563
+ orderRest = true;
19564
+ } else if (type === 'KM_REISSUE_GOODS') {
19565
+ orderRest = {
19566
+ orderBackGoodsLevel: props.orderBackGoodsLevel,
19567
+ canEdit: true
19568
+ };
19569
+ }
19570
+ var goodDetails = (order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length) ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], orderRest)) : (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.updateGoodsHandle([order], orderRest) : [];
18726
19571
  var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
18727
- return mode ? goodDetails.filter(function (goodItem) {
19572
+ var list = mode ? goodDetails.filter(function (goodItem) {
18728
19573
  return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
18729
19574
  }) : goodDetails;
19575
+ return list;
18730
19576
  };
18731
19577
  var changeGoodHandle = function changeGoodHandle(val) {
18732
- var _typeMap$type20;
19578
+ var _typeMap$type21;
18733
19579
  var newValue = _objectSpread2({}, value);
18734
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = val || [];
19580
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = val || [];
18735
19581
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18736
19582
  };
18737
19583
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
18738
- var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
19584
+ var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
18739
19585
  var newValue = _objectSpread2({}, value);
18740
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo)] = val;
18741
- if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderBillType) {
18742
- var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
18743
- var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orders) || [];
19586
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
19587
+ if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderBillType) {
19588
+ var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
19589
+ var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orders) || [];
18744
19590
  var targetOrder = val && orders.find(function (oItem) {
18745
- var _typeMap$type24;
18746
- return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
19591
+ var _typeMap$type25;
19592
+ return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
18747
19593
  });
18748
- newValue[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.orderTypeKey];
18749
- }
18750
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
18751
- var _typeMap$type28;
18752
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)] = [];
18753
- } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
18754
- var _typeMap$type30;
18755
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)] = getGoodDetails({
19594
+ newValue[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.orderTypeKey];
19595
+ }
19596
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
19597
+ var _typeMap$type29;
19598
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)] = [];
19599
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
19600
+ var _typeMap$type31;
19601
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)] = getGoodDetails({
18756
19602
  mode: isStrict,
18757
19603
  sysOrderNo: val
18758
19604
  });
@@ -18760,25 +19606,26 @@ var PublicReissue = function PublicReissue(props) {
18760
19606
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18761
19607
  };
18762
19608
  //显示选择商品按钮
18763
- var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
19609
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]);
18764
19610
  var selectedGoodsChange = React.useCallback(function (skuList) {
18765
- var _typeMap$type32, _typeMap$type33, _uniqBy;
19611
+ var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
18766
19612
  var newValue = _objectSpread2({}, value);
18767
19613
  // 原订单商品
18768
19614
  var originTradeGoodList = getGoodDetails({
18769
19615
  mode: isStrict
18770
19616
  }) || [];
18771
19617
  // 当前选中的所有商品【包含了原订单+商品库】
18772
- var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)]) || [];
18773
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
18774
- return skuList.includes(item.uuid);
19618
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)]) || [];
19619
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
19620
+ var _typeMap$type36;
19621
+ return skuList.includes(item[typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.uniqueKey]);
18775
19622
  });
18776
19623
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18777
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)], isStrict]);
19624
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.key)], isStrict]);
18778
19625
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
18779
19626
  gutter: 8,
18780
19627
  wrap: true,
18781
- id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key) || "".concat(Date.now())
19628
+ id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key) || "".concat(Date.now())
18782
19629
  }, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
18783
19630
  className: "gutter-row",
18784
19631
  xs: {
@@ -18789,16 +19636,17 @@ var PublicReissue = function PublicReissue(props) {
18789
19636
  }
18790
19637
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
18791
19638
  style: {
18792
- marginBottom: '8px'
19639
+ marginBottom: '8px',
19640
+ width: '100%'
18793
19641
  },
18794
19642
  disabled: disabled,
18795
19643
  allowClear: false,
18796
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.systemOrderNo)],
19644
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.systemOrderNo)],
18797
19645
  onChange: function onChange(val) {
18798
19646
  return changeSystemOrderHandle(val);
18799
19647
  },
18800
- placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.compType) || '', "\u7CFB\u7EDF\u5355")
18801
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
19648
+ placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.compType) || '', "\u7CFB\u7EDF\u5355")
19649
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
18802
19650
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
18803
19651
  key: item[typeMap$2[type].oIdKey],
18804
19652
  value: item[typeMap$2[type].oIdKey],
@@ -18814,16 +19662,17 @@ var PublicReissue = function PublicReissue(props) {
18814
19662
  }
18815
19663
  }, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
18816
19664
  style: {
18817
- marginBottom: '8px'
19665
+ marginBottom: '8px',
19666
+ width: '100%'
18818
19667
  },
18819
- disabled: disabled,
19668
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
18820
19669
  allowClear: false,
18821
19670
  options: reasonList,
18822
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.typeName)],
19671
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.typeName)],
18823
19672
  onChange: function onChange(val) {
18824
19673
  return changeTypeHandle(val);
18825
19674
  }
18826
- })), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.systemOrderBillType) && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
19675
+ })), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
18827
19676
  className: "gutter-row",
18828
19677
  xs: {
18829
19678
  span: 11
@@ -18832,7 +19681,7 @@ var PublicReissue = function PublicReissue(props) {
18832
19681
  span: 6
18833
19682
  }
18834
19683
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
18835
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrderBillType)],
19684
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.systemOrderBillType)],
18836
19685
  disabled: disabled,
18837
19686
  readOnly: true
18838
19687
  }))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
@@ -18842,10 +19691,10 @@ var PublicReissue = function PublicReissue(props) {
18842
19691
  disabled: disabled,
18843
19692
  canUpdateNumber: showChangeBtn,
18844
19693
  showChangeBtn: showChangeBtn,
18845
- alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.alwaysShowChooseErpGoodsBtn,
18846
- showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.showErpGoodsBtn,
19694
+ alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.alwaysShowChooseErpGoodsBtn,
19695
+ showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.showErpGoodsBtn,
18847
19696
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
18848
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.key)],
19697
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.key)],
18849
19698
  onChange: function onChange(val) {
18850
19699
  return changeGoodHandle(val);
18851
19700
  },
@@ -18856,6 +19705,7 @@ var PublicReissue = function PublicReissue(props) {
18856
19705
  originDataSource: getGoodDetails({
18857
19706
  mode: isStrict
18858
19707
  }),
19708
+ uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.uniqueKey) || 'uuid',
18859
19709
  selectedGoodsChange: selectedGoodsChange
18860
19710
  }
18861
19711
  })));
@@ -19616,6 +20466,39 @@ var MsgStatus = function MsgStatus(props) {
19616
20466
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
19617
20467
  };
19618
20468
 
20469
+ var _excluded$n = ["showOnly", "getOptionsAsync"];
20470
+ var AsyncSelect = function AsyncSelect(props) {
20471
+ var _props$showOnly = props.showOnly,
20472
+ showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
20473
+ getOptionsAsync = props.getOptionsAsync,
20474
+ otherProps = _objectWithoutProperties(props, _excluded$n);
20475
+ var _React$useState = React__default['default'].useState([]),
20476
+ _React$useState2 = _slicedToArray(_React$useState, 2),
20477
+ data = _React$useState2[0],
20478
+ setData = _React$useState2[1];
20479
+ React__default['default'].useEffect(function () {
20480
+ getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
20481
+ setData(list);
20482
+ });
20483
+ }, []);
20484
+ var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
20485
+ if (showOnly) {
20486
+ var selectedItem = options.find(function (option) {
20487
+ return option.value === props.value;
20488
+ });
20489
+ return selectedItem ? selectedItem.label : props.value;
20490
+ }
20491
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
20492
+ showSearch: true,
20493
+ filterOption: function filterOption(input, option) {
20494
+ return option.label.includes(input);
20495
+ },
20496
+ notFoundContent: null
20497
+ }, otherProps), {}, {
20498
+ options: options
20499
+ }));
20500
+ };
20501
+
19619
20502
  var CalculationInput = function CalculationInput(props) {
19620
20503
  var _props$config = props.config,
19621
20504
  config = _props$config === void 0 ? {} : _props$config;
@@ -19634,7 +20517,7 @@ var CalculationInput = function CalculationInput(props) {
19634
20517
  }, config === null || config === void 0 ? void 0 : config.unit));
19635
20518
  };
19636
20519
 
19637
- var _excluded$n = ["value", "onChange", "reasonList", "disabled", "type"];
20520
+ var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
19638
20521
  var typeMap$3 = {
19639
20522
  BS_E3_REISSUE_GOODS: {
19640
20523
  key: 'bsE3ReissueGoods',
@@ -19652,7 +20535,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
19652
20535
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
19653
20536
  disabled = props.disabled,
19654
20537
  type = props.type,
19655
- other = _objectWithoutProperties(props, _excluded$n);
20538
+ isSettingConfig = props.isSettingConfig,
20539
+ other = _objectWithoutProperties(props, _excluded$o);
19656
20540
  var getOrderFlag = React.useRef(false);
19657
20541
  var valueRef = React.useRef(null);
19658
20542
  var _useState = React.useState(false),
@@ -19812,7 +20696,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
19812
20696
  }
19813
20697
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
19814
20698
  style: {
19815
- marginBottom: '8px'
20699
+ marginBottom: '8px',
20700
+ width: '100%'
19816
20701
  },
19817
20702
  disabled: disabled,
19818
20703
  allowClear: false,
@@ -19837,9 +20722,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
19837
20722
  }
19838
20723
  }, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
19839
20724
  style: {
19840
- marginBottom: '8px'
20725
+ marginBottom: '8px',
20726
+ width: '100%'
19841
20727
  },
19842
- disabled: disabled,
20728
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
19843
20729
  allowClear: false,
19844
20730
  options: reasonList,
19845
20731
  value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
@@ -19870,7 +20756,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
19870
20756
  })));
19871
20757
  };
19872
20758
 
19873
- var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type"],
20759
+ var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
19874
20760
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
19875
20761
  var typeMap$4 = {
19876
20762
  GY_REISSUE_GOODS: {
@@ -19892,14 +20778,15 @@ var typeMap$4 = {
19892
20778
  }
19893
20779
  };
19894
20780
  var GyReissue = function GyReissue(props) {
19895
- var _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
20781
+ var _typeMap$type27, _typeMap$type28, _typeMap$type29, _systemOrder$orders, _typeMap$type30, _value$typeMap$type$s5, _typeMap$type31, _typeMap$type32, _typeMap$type33;
19896
20782
  var value = props.value,
19897
20783
  onChange = props.onChange,
19898
20784
  _props$reasonList = props.reasonList,
19899
20785
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
19900
20786
  disabled = props.disabled,
19901
20787
  type = props.type,
19902
- other = _objectWithoutProperties(props, _excluded$o);
20788
+ isSettingConfig = props.isSettingConfig,
20789
+ other = _objectWithoutProperties(props, _excluded$p);
19903
20790
  // const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
19904
20791
  // order?.platformCode?.includes(';'),
19905
20792
  // );
@@ -20047,7 +20934,7 @@ var GyReissue = function GyReissue(props) {
20047
20934
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20048
20935
  };
20049
20936
  var selectedGoodsChange = React.useCallback(function (skuList) {
20050
- var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
20937
+ var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
20051
20938
  kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
20052
20939
  var newValue = _objectSpread2({}, valueRef.current || {});
20053
20940
  // 原订单商品
@@ -20059,21 +20946,15 @@ var GyReissue = function GyReissue(props) {
20059
20946
  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) {
20060
20947
  return skuList.includes(item.uuid);
20061
20948
  });
20062
- 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)]);
20949
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
20063
20950
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20064
20951
  kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
20065
- }, [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]);
20952
+ }, [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]);
20066
20953
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
20067
- var showChangeBtn = React.useMemo(function () {
20068
- var _typeMap$type29;
20069
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
20070
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
20071
- return /*#__PURE__*/React__default['default'].createElement("div", {
20072
- id: "TEST_GY",
20073
- onClick: function onClick() {
20074
- console.log('TEST_GY', value);
20075
- }
20076
- }, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
20954
+ 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];
20955
+ 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]);
20956
+ var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
20957
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
20077
20958
  gutter: 8,
20078
20959
  wrap: true
20079
20960
  }, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
@@ -20086,16 +20967,17 @@ var GyReissue = function GyReissue(props) {
20086
20967
  }
20087
20968
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
20088
20969
  style: {
20089
- marginBottom: '8px'
20970
+ marginBottom: '8px',
20971
+ width: '100%'
20090
20972
  },
20091
20973
  disabled: disabled,
20092
20974
  allowClear: false,
20093
- 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)],
20975
+ 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)],
20094
20976
  onChange: function onChange(val) {
20095
20977
  return changeSystemOrderHandle(val);
20096
20978
  },
20097
20979
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
20098
- }, ((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) {
20980
+ }, ((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) {
20099
20981
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
20100
20982
  key: item.billNo,
20101
20983
  value: item.billNo,
@@ -20111,12 +20993,13 @@ var GyReissue = function GyReissue(props) {
20111
20993
  }
20112
20994
  }, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
20113
20995
  style: {
20114
- marginBottom: '8px'
20996
+ marginBottom: '8px',
20997
+ width: '100%'
20115
20998
  },
20116
- disabled: disabled,
20999
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
20117
21000
  allowClear: false,
20118
21001
  options: reasonList,
20119
- 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)],
21002
+ 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)],
20120
21003
  onChange: function onChange(val) {
20121
21004
  return changeTypeHandle(val);
20122
21005
  }
@@ -20127,8 +21010,10 @@ var GyReissue = function GyReissue(props) {
20127
21010
  disabled: disabled,
20128
21011
  canUpdateNumber: showChangeBtn,
20129
21012
  showChangeBtn: showChangeBtn,
21013
+ showErpGoodsBtn: showErpGoodsBtn,
21014
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20130
21015
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20131
- 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)],
21016
+ 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)],
20132
21017
  onChange: function onChange(val) {
20133
21018
  return changeGoodHandle(val);
20134
21019
  },
@@ -20143,7 +21028,7 @@ var GyReissue = function GyReissue(props) {
20143
21028
  })));
20144
21029
  };
20145
21030
 
20146
- var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type"],
21031
+ var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
20147
21032
  _excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
20148
21033
  var typeMap$5 = {
20149
21034
  GY_RETURN_GOODS: {
@@ -20165,14 +21050,15 @@ var typeMap$5 = {
20165
21050
  }
20166
21051
  };
20167
21052
  var GyReturnGoods = function GyReturnGoods(props) {
20168
- var _typeMap$type10, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
21053
+ var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
20169
21054
  var value = props.value,
20170
21055
  onChange = props.onChange,
20171
21056
  _props$reasonList = props.reasonList,
20172
21057
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
20173
21058
  disabled = props.disabled,
20174
21059
  type = props.type,
20175
- other = _objectWithoutProperties(props, _excluded$p);
21060
+ isSettingConfig = props.isSettingConfig,
21061
+ other = _objectWithoutProperties(props, _excluded$q);
20176
21062
  var valueRef = React.useRef({});
20177
21063
  var getOrderFlag = React.useRef(false);
20178
21064
  var _useState = React.useState(false),
@@ -20273,7 +21159,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20273
21159
  };
20274
21160
  }();
20275
21161
  var selectedGoodsChange = React.useCallback(function (skuList) {
20276
- var _typeMap$type7, _typeMap$type8, _uniqBy, _typeMap$type9;
21162
+ var _typeMap$type7, _typeMap$type8, _uniqBy;
20277
21163
  var newValue = _objectSpread2({}, value);
20278
21164
  // 原订单商品
20279
21165
  var originTradeGoodList = getGoodDetails({
@@ -20284,49 +21170,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
20284
21170
  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) {
20285
21171
  return skuList.includes(item.uuid);
20286
21172
  });
20287
- 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)]);
21173
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
20288
21174
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20289
- }, [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]);
21175
+ }, [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]);
20290
21176
  var changeTypeHandle = function changeTypeHandle(val) {
20291
- var _value$typeMap$type$t, _typeMap$type11, _typeMap$type12;
21177
+ var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
20292
21178
  var typeName = val === null || val === void 0 ? void 0 : val[0];
20293
- 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;
21179
+ 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;
20294
21180
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
20295
21181
  var newValue = _objectSpread2({}, value);
20296
- newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
21182
+ newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
20297
21183
  if (typeName === '1') {
20298
- var _typeMap$type13;
20299
- newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
21184
+ var _typeMap$type12;
21185
+ newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
20300
21186
  mode: isStrict
20301
21187
  });
20302
21188
  } else if (typeName === '2') {
20303
- var _typeMap$type14;
21189
+ var _typeMap$type13;
20304
21190
  // 切换到非原单,清空列表
20305
- newValue[(_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
21191
+ newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
20306
21192
  }
20307
21193
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20308
21194
  };
20309
21195
  var changeGoodHandle = function changeGoodHandle(val) {
20310
- var _typeMap$type15;
21196
+ var _typeMap$type14;
20311
21197
  var newValue = _objectSpread2({}, value);
20312
- 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) {
20313
- var _typeMap$type16, _typeMap$type17;
20314
- 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;
20315
- 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;
21198
+ 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) {
21199
+ var _typeMap$type15, _typeMap$type16;
21200
+ 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;
21201
+ 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;
20316
21202
  return item;
20317
21203
  });
20318
21204
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20319
21205
  };
20320
21206
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
20321
- var _typeMap$type18, _value$typeMap$type$t2, _typeMap$type19, _value$typeMap$type$t3, _typeMap$type21;
21207
+ var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
20322
21208
  var newValue = _objectSpread2({}, value);
20323
- 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;
20324
- 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])) {
20325
- var _typeMap$type20;
20326
- 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)] = [];
20327
- } 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])) {
20328
- var _typeMap$type22;
20329
- 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({
21209
+ 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;
21210
+ 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])) {
21211
+ var _typeMap$type19;
21212
+ 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)] = [];
21213
+ } 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])) {
21214
+ var _typeMap$type21;
21215
+ 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({
20330
21216
  mode: isStrict,
20331
21217
  sysOrderNo: val
20332
21218
  });
@@ -20334,11 +21220,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
20334
21220
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20335
21221
  };
20336
21222
  var getGoodDetails = function getGoodDetails(_ref4) {
20337
- var _typeMap$type23, _typeMap$type24, _order$details;
21223
+ var _typeMap$type22, _typeMap$type23, _order$details;
20338
21224
  var mode = _ref4.mode,
20339
21225
  sysOrderNo = _ref4.sysOrderNo;
20340
- 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];
20341
- 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];
21226
+ 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];
21227
+ 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];
20342
21228
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
20343
21229
  return order.code === systemOrderNo;
20344
21230
  });
@@ -20349,19 +21235,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
20349
21235
  }) : goodDetails;
20350
21236
  };
20351
21237
  var handleModeChange = function handleModeChange(mode) {
20352
- var _value$typeMap$type$t4, _typeMap$type25, _typeMap$type26;
20353
- 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';
21238
+ var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
21239
+ 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';
20354
21240
  setIsStrict(mode);
20355
21241
  if (!isOriginalOrder) return;
20356
- 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({
21242
+ 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({
20357
21243
  mode: mode
20358
21244
  }))));
20359
21245
  };
20360
21246
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
20361
- var showChangeBtn = React.useMemo(function () {
20362
- var _typeMap$type27;
20363
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
20364
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
21247
+ 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];
21248
+ var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
21249
+ 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]);
20365
21250
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
20366
21251
  gutter: 8,
20367
21252
  wrap: true
@@ -20375,16 +21260,17 @@ var GyReturnGoods = function GyReturnGoods(props) {
20375
21260
  }
20376
21261
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
20377
21262
  style: {
20378
- marginBottom: '8px'
21263
+ marginBottom: '8px',
21264
+ width: '100%'
20379
21265
  },
20380
21266
  disabled: disabled,
20381
21267
  allowClear: false,
20382
- 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)],
21268
+ 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)],
20383
21269
  onChange: function onChange(val) {
20384
21270
  return changeSystemOrderHandle(val);
20385
21271
  },
20386
21272
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
20387
- }, ((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) {
21273
+ }, ((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) {
20388
21274
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
20389
21275
  key: item.billNo,
20390
21276
  value: item.billNo,
@@ -20400,12 +21286,13 @@ var GyReturnGoods = function GyReturnGoods(props) {
20400
21286
  }
20401
21287
  }, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
20402
21288
  style: {
20403
- marginBottom: '8px'
21289
+ marginBottom: '8px',
21290
+ width: '100%'
20404
21291
  },
20405
- disabled: disabled,
21292
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
20406
21293
  allowClear: false,
20407
21294
  options: reasonList,
20408
- 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)],
21295
+ 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)],
20409
21296
  onChange: function onChange(val) {
20410
21297
  return changeTypeHandle(val);
20411
21298
  }
@@ -20417,13 +21304,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
20417
21304
  canUpdateNumber: showChangeBtn,
20418
21305
  showChangeBtn: showChangeBtn,
20419
21306
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20420
- 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)],
21307
+ 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)],
20421
21308
  onChange: function onChange(val) {
20422
21309
  return changeGoodHandle(val);
20423
21310
  },
20424
21311
  onModeChange: handleModeChange,
20425
21312
  isStrict: isStrict,
20426
- showErpGoodsBtn: false,
21313
+ showErpGoodsBtn: showErpGoodsBtn,
21314
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20427
21315
  tradeGoods: {
20428
21316
  originDataSource: getGoodDetails({
20429
21317
  mode: isStrict
@@ -20454,6 +21342,7 @@ exports.ApaasUpload = ApaasUpload;
20454
21342
  exports.ApaasUploadAsync = index;
20455
21343
  exports.ApaasUploadFile = ApaasUploadFile;
20456
21344
  exports.ApaasUploadProAsync = index$1;
21345
+ exports.AsyncSelect = AsyncSelect;
20457
21346
  exports.BsE3Reissue = bsE3Reissue;
20458
21347
  exports.BsExchange = BsExchange;
20459
21348
  exports.BsGoods = BsGoods;
@@ -20505,5 +21394,6 @@ exports.erpFormValidator = erpFormValidator;
20505
21394
  exports.erpModalColumnsMap = index$2;
20506
21395
  exports.getGyColumns = getColumns$4;
20507
21396
  exports.getJstColumns = getColumns$5;
21397
+ exports.getKmColumns = getColumns$6;
20508
21398
  exports.getWdtColumns = getColumns$2;
20509
21399
  exports.getWlnColumns = getColumns$3;