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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -3,8 +3,8 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
3
3
  import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
- import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, servers, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
7
- import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isEqual, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, servers, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
10
10
  import pubsub from 'pubsub-js';
@@ -10962,7 +10962,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
10962
10962
  }
10963
10963
  })), /*#__PURE__*/React.createElement(Item, {
10964
10964
  label: '发件人手机号',
10965
- required: true,
10965
+ // required={true}
10966
10966
  key: 'interceptSenderMobile',
10967
10967
  hidden: !showSenderMobile
10968
10968
  }, /*#__PURE__*/React.createElement(Input, {
@@ -11142,7 +11142,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11142
11142
  _props$value = props.value,
11143
11143
  value = _props$value === void 0 ? {} : _props$value,
11144
11144
  disabled = props.disabled,
11145
- onChange = props.onChange;
11145
+ onChange = props.onChange,
11146
+ _props$isSingle = props.isSingle,
11147
+ isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
11148
+ _props$trajectoryApiS = props.trajectoryApiStatus,
11149
+ trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
11146
11150
  var handleInputChange = function handleInputChange(e, type) {
11147
11151
  var val = e.target.value;
11148
11152
  typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
@@ -11153,13 +11157,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11153
11157
  }));
11154
11158
  handleSearchSnapshot(val);
11155
11159
  };
11160
+ var handleStatusChange = function handleStatusChange(val) {
11161
+ var _value$trajectoryApiS;
11162
+ var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
11163
+ trajectoryApiStatus: {
11164
+ status: val,
11165
+ reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
11166
+ }
11167
+ });
11168
+ onChange(newVal);
11169
+ };
11156
11170
  var handleSearchSnapshot = function handleSearchSnapshot(company) {
11157
11171
  var trajectoryCompany = value.trajectoryCompany,
11158
11172
  trajectoryCode = value.trajectoryCode,
11159
11173
  trajectoryPhone = value.trajectoryPhone;
11160
11174
  var newCompany = company ? company : trajectoryCompany;
11161
11175
  //不展示拦截状态不请求
11162
- if (!(showField && showField.includes('snapshot'))) {
11176
+ if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
11163
11177
  return;
11164
11178
  }
11165
11179
  if (disabled) {
@@ -11184,13 +11198,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11184
11198
  data = res.data,
11185
11199
  msg = res.message;
11186
11200
  if (result === 100 || success) {
11187
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11188
- trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
11201
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
11189
11202
  trajectoryCompany: newCompany
11190
- }));
11203
+ });
11204
+ if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
11205
+ if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
11206
+ onChange(newValue);
11191
11207
  } else {
11192
11208
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11193
11209
  trajectorySnapshot: '',
11210
+ trajectoryApiStatus: {
11211
+ reason: '',
11212
+ status: ''
11213
+ },
11194
11214
  trajectoryCompany: newCompany
11195
11215
  }));
11196
11216
  msg && message.error(msg);
@@ -11199,6 +11219,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11199
11219
  } catch (err) {
11200
11220
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11201
11221
  trajectorySnapshot: '',
11222
+ trajectoryApiStatus: {
11223
+ reason: '',
11224
+ status: ''
11225
+ },
11202
11226
  trajectoryCompany: newCompany
11203
11227
  }));
11204
11228
  (err === null || err === void 0 ? void 0 : err.message) && message.error(err === null || err === void 0 ? void 0 : err.message);
@@ -11252,6 +11276,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11252
11276
  }
11253
11277
  });
11254
11278
  };
11279
+ // 接口状态
11280
+ var LogisticsApiStatus = function LogisticsApiStatus() {
11281
+ var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
11282
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
11283
+ value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
11284
+ disabled: true,
11285
+ style: {
11286
+ width: '100%',
11287
+ marginTop: '8px'
11288
+ },
11289
+ placeholder: "\u63A5\u53E3\u72B6\u6001",
11290
+ onChange: handleStatusChange,
11291
+ options: [{
11292
+ label: '成功',
11293
+ value: '成功'
11294
+ }, {
11295
+ label: '失败',
11296
+ value: '失败'
11297
+ }]
11298
+ }), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS3 = value.trajectoryApiStatus) === null || _value$trajectoryApiS3 === void 0 ? void 0 : _value$trajectoryApiS3.reason) ? /*#__PURE__*/React.createElement("div", {
11299
+ style: {
11300
+ color: 'red'
11301
+ }
11302
+ }, "\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);
11303
+ };
11255
11304
  //物流快照
11256
11305
  var LogisticsSnapshot = function LogisticsSnapshot() {
11257
11306
  return /*#__PURE__*/React.createElement(Input, {
@@ -11266,7 +11315,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11266
11315
  value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
11267
11316
  });
11268
11317
  };
11269
- return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
11318
+ return /*#__PURE__*/React.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.createElement(LogisticsSnapshot, null) : null);
11270
11319
  };
11271
11320
 
11272
11321
  var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
@@ -11479,7 +11528,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
11479
11528
  disabled: disabled,
11480
11529
  onChange: function onChange(val) {
11481
11530
  return handleChange(val, changeIndex);
11482
- }
11531
+ },
11532
+ isSingle: false
11483
11533
  }));
11484
11534
  };
11485
11535
 
@@ -11502,7 +11552,7 @@ var typeInitValueMap = {
11502
11552
  }]
11503
11553
  };
11504
11554
  var jstGoods = function jstGoods(props) {
11505
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9;
11555
+ 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;
11506
11556
  var _props$value = props.value,
11507
11557
  value = _props$value === void 0 ? [] : _props$value,
11508
11558
  onChange = props.onChange,
@@ -11520,8 +11570,8 @@ var jstGoods = function jstGoods(props) {
11520
11570
  setChangeIndex = _useState2[1]; //选中的包裹
11521
11571
  var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
11522
11572
  var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
11573
+ var expressDateInstance = ExpressData.getInstance(platformType);
11523
11574
  var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
11524
- var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
11525
11575
  useEffect(function () {
11526
11576
  //没有值塞个默认值
11527
11577
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
@@ -11604,59 +11654,51 @@ var jstGoods = function jstGoods(props) {
11604
11654
  return setChangeIndex(index);
11605
11655
  }
11606
11656
  }, "\u5305\u88F9".concat(index + 1)));
11607
- }))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, _objectSpread2(_objectSpread2({
11608
- type: logisticsType,
11657
+ }))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
11609
11658
  disabled: disabled,
11610
11659
  placeholder: "\u7269\u6D41\u516C\u53F8",
11611
11660
  onChange: function onChange(val) {
11612
- if (logisticsType === 'input') {
11613
- changeInputHandle(null, 'logisticsCompany');
11614
- changeInputHandle(val, 'logisticsCompanyName');
11615
- } else {
11616
- changeInputHandle(val, 'logisticsCompany');
11617
- }
11661
+ changeInputHandle(val, 'logisticsCompany');
11618
11662
  },
11619
- value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
11620
- }, logisticsType === 'input' ? {} : {
11663
+ 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'],
11621
11664
  showSearch: true,
11622
11665
  dropdownMatchSelectWidth: false,
11623
11666
  filterOption: function filterOption(input, option) {
11624
11667
  return option.label.includes(input);
11625
- }
11626
- }), {}, {
11668
+ },
11627
11669
  style: {
11628
11670
  minWidth: '100px',
11629
11671
  maxWidth: '180px'
11630
11672
  },
11631
11673
  platformType: platformType
11632
- })) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
11674
+ }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
11633
11675
  disabled: disabled,
11634
11676
  placeholder: "\u7269\u6D41\u5355\u53F7",
11635
11677
  onChange: function onChange(e) {
11636
11678
  return changeInputHandle(e.target.value, 'logisticsCode');
11637
11679
  },
11638
- value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.logisticsCode
11680
+ value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
11639
11681
  }) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
11640
11682
  disabled: disabled,
11641
11683
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
11642
11684
  onChange: function onChange(e) {
11643
11685
  return changeInputHandle(e.target.value, 'supplyId');
11644
11686
  },
11645
- value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.supplyId
11687
+ value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
11646
11688
  }), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
11647
11689
  disabled: disabled,
11648
11690
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
11649
11691
  onChange: function onChange(e) {
11650
11692
  return changeInputHandle(e.target.value, 'supplyName');
11651
11693
  },
11652
- value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.supplyName
11694
+ value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
11653
11695
  })) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
11654
11696
  disabled: disabled,
11655
11697
  placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
11656
11698
  onChange: function onChange(e) {
11657
11699
  return changeInputHandle(e.target.value, 'sendId');
11658
11700
  },
11659
- value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
11701
+ value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
11660
11702
  }), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
11661
11703
  style: {
11662
11704
  minWidth: '100px',
@@ -11667,7 +11709,7 @@ var jstGoods = function jstGoods(props) {
11667
11709
  showSearch: true,
11668
11710
  options: sendOptions,
11669
11711
  filterOption: filterOption,
11670
- 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,
11712
+ 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,
11671
11713
  onChange: function onChange(value, option) {
11672
11714
  return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
11673
11715
  }
@@ -11677,14 +11719,14 @@ var jstGoods = function jstGoods(props) {
11677
11719
  onChange: function onChange(e) {
11678
11720
  return changeInputHandle(e.target.value, 'sendName');
11679
11721
  },
11680
- value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
11722
+ value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
11681
11723
  }))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
11682
11724
  disabled: disabled,
11683
11725
  placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
11684
11726
  onChange: function onChange(e) {
11685
11727
  return changeInputHandle(e.target.value, 'deliveryNo');
11686
11728
  },
11687
- value: (_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendName
11729
+ value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
11688
11730
  })) : null) : null);
11689
11731
  };
11690
11732
 
@@ -12251,7 +12293,7 @@ var gyColumns = [{
12251
12293
  }, {
12252
12294
  dataIndex: 'specNo',
12253
12295
  title: 'SKU编码',
12254
- width: 200,
12296
+ width: 150,
12255
12297
  ellipsis: true
12256
12298
  }, {
12257
12299
  dataIndex: 'goodName',
@@ -12262,11 +12304,11 @@ var gyColumns = [{
12262
12304
  dataIndex: 'goodShortName',
12263
12305
  title: "\u5546\u54C1\u7B80\u79F0",
12264
12306
  ellipsis: true,
12265
- width: 250
12307
+ width: 150
12266
12308
  }, {
12267
12309
  dataIndex: 'goodNo',
12268
12310
  title: '商品编码',
12269
- width: 200,
12311
+ width: 150,
12270
12312
  ellipsis: true
12271
12313
  }, {
12272
12314
  dataIndex: 'goodPicUrl',
@@ -12539,12 +12581,144 @@ var bse3Columns = [{
12539
12581
  width: 100
12540
12582
  }];
12541
12583
 
12584
+ var getYesOrNo = function getYesOrNo(val) {
12585
+ if (!isBoolean(val)) return null;
12586
+ return val ? '是' : '否';
12587
+ };
12588
+ var kmColumns = [{
12589
+ dataIndex: 'goodName',
12590
+ title: '商品名称',
12591
+ width: 250,
12592
+ ellipsis: true
12593
+ }, {
12594
+ dataIndex: 'goodNo',
12595
+ title: '商品编码',
12596
+ width: 150,
12597
+ ellipsis: true
12598
+ }, {
12599
+ dataIndex: 'goodId',
12600
+ title: '商品ID',
12601
+ width: 200,
12602
+ ellipsis: true
12603
+ }, {
12604
+ dataIndex: 'goodPicUrl',
12605
+ title: "\u5546\u54C1\u56FE\u7247",
12606
+ width: 150,
12607
+ render: function render(val) {
12608
+ return /*#__PURE__*/React.createElement(Image, {
12609
+ width: 60,
12610
+ src: val
12611
+ });
12612
+ }
12613
+ }, {
12614
+ dataIndex: 'goodShortName',
12615
+ title: '商品简称',
12616
+ width: 200,
12617
+ ellipsis: true
12618
+ }, {
12619
+ dataIndex: 'goodBarcode',
12620
+ title: '商品条码',
12621
+ width: 200,
12622
+ ellipsis: true
12623
+ }, {
12624
+ dataIndex: 'brandName',
12625
+ title: "\u54C1\u724C\u540D\u79F0",
12626
+ ellipsis: true,
12627
+ width: 150
12628
+ }, {
12629
+ dataIndex: 'skuType',
12630
+ title: "\u5546\u54C1\u7C7B\u578B",
12631
+ ellipsis: true,
12632
+ width: 150
12633
+ }, {
12634
+ dataIndex: 'specName',
12635
+ title: "SKU\u540D\u79F0",
12636
+ ellipsis: true,
12637
+ width: 150
12638
+ }, {
12639
+ dataIndex: 'specNo',
12640
+ title: "SKU\u7F16\u7801",
12641
+ ellipsis: true,
12642
+ width: 150
12643
+ }, {
12644
+ dataIndex: 'specId',
12645
+ title: "SKU ID",
12646
+ ellipsis: true,
12647
+ width: 150
12648
+ }, {
12649
+ dataIndex: 'propertiesValue',
12650
+ title: "\u89C4\u683C\u503C",
12651
+ ellipsis: true,
12652
+ width: 150
12653
+ }, {
12654
+ dataIndex: 'skuShortTitle',
12655
+ title: "\u89C4\u683C\u7B80\u79F0",
12656
+ ellipsis: true,
12657
+ width: 150
12658
+ }, {
12659
+ dataIndex: 'specBarcode',
12660
+ title: "\u89C4\u683C\u6761\u7801",
12661
+ ellipsis: true,
12662
+ width: 150
12663
+ }, {
12664
+ dataIndex: 'specImgUrl',
12665
+ title: "SKU \u56FE\u7247",
12666
+ ellipsis: true,
12667
+ width: 150,
12668
+ render: function render(val) {
12669
+ return /*#__PURE__*/React.createElement(Image, {
12670
+ width: 60,
12671
+ src: val
12672
+ });
12673
+ }
12674
+ }, {
12675
+ dataIndex: 'isGift',
12676
+ title: "\u662F\u5426\u8D60\u54C1",
12677
+ ellipsis: true,
12678
+ width: 150,
12679
+ render: function render(val) {
12680
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
12681
+ }
12682
+ }, {
12683
+ dataIndex: 'isVirtual',
12684
+ title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
12685
+ ellipsis: true,
12686
+ width: 150,
12687
+ render: function render(val) {
12688
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
12689
+ }
12690
+ }, {
12691
+ dataIndex: 'isSkuItem',
12692
+ title: "\u662F\u5426\u542B\u6709SKU",
12693
+ ellipsis: true,
12694
+ width: 150,
12695
+ render: function render(val) {
12696
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
12697
+ }
12698
+ }, {
12699
+ dataIndex: 'marketPrice',
12700
+ title: "\u5E02\u573A\u4EF7",
12701
+ ellipsis: true,
12702
+ width: 150
12703
+ }, {
12704
+ dataIndex: 'retailPrice',
12705
+ title: "\u96F6\u552E\u4EF7",
12706
+ ellipsis: true,
12707
+ width: 150
12708
+ }, {
12709
+ dataIndex: 'costPrice',
12710
+ title: "\u6210\u672C\u4EF7",
12711
+ ellipsis: true,
12712
+ width: 150
12713
+ }];
12714
+
12542
12715
  var getColumnsMap = function getColumnsMap() {
12543
12716
  return cloneDeep({
12544
12717
  gy: gyColumns,
12545
12718
  jst: jstColumns,
12546
12719
  wdt: wdtColumns,
12547
- bse3: bse3Columns
12720
+ bse3: bse3Columns,
12721
+ km: kmColumns
12548
12722
  });
12549
12723
  };
12550
12724
  var getColumnsBaseInfo = function getColumnsBaseInfo() {
@@ -12599,9 +12773,7 @@ var useGetColumns = (function (type) {
12599
12773
  loading = _useState4[0],
12600
12774
  setLoading = _useState4[1];
12601
12775
  var showColumnsDataIndexList = useMemo(function () {
12602
- return columns.filter(function (item) {
12603
- return Object.hasOwn(item, 'dataIndex');
12604
- }).map(function (item) {
12776
+ return columns.map(function (item) {
12605
12777
  return item.dataIndex;
12606
12778
  });
12607
12779
  }, [columns]);
@@ -13496,23 +13668,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
13496
13668
  };
13497
13669
  var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
13498
13670
 
13671
+ var rowCheckKey = 'id';
13499
13672
  var getTableData$3 = function getTableData(_ref, formData) {
13500
13673
  var current = _ref.current,
13501
13674
  pageSize = _ref.pageSize;
13502
- var data = {
13503
- goodShortName: formData.goodShortName || null,
13504
- skuName: formData.skuName || null,
13505
- skuCode: formData.skuCode || null,
13506
- goodName: formData.goodName || null,
13507
- goodNo: formData.goodNo || null
13508
- };
13509
13675
  return extendRequest('/qy/gdfw/product/product/page', {
13510
13676
  method: 'post',
13511
13677
  data: _objectSpread2({
13512
13678
  pageSize: pageSize,
13513
13679
  pageNo: current,
13514
- platform: 'GY_ERP'
13515
- }, data)
13680
+ platform: 'KM_ERP'
13681
+ }, formData)
13516
13682
  }).then(function (res) {
13517
13683
  var _res$data = res.data,
13518
13684
  _res$data$productSkuL = _res$data.productSkuList,
@@ -13529,22 +13695,19 @@ var getTableData$3 = function getTableData(_ref, formData) {
13529
13695
  });
13530
13696
  };
13531
13697
  var searchFormData$2 = [{
13532
- label: '商品简称',
13533
- name: 'goodShortName'
13698
+ label: '商品名称',
13699
+ name: 'goodName'
13534
13700
  }, {
13535
- label: '商品sku名称',
13701
+ label: '商品编码',
13702
+ name: 'goodNo'
13703
+ }, {
13704
+ label: 'SKU名称',
13536
13705
  name: 'skuName',
13537
13706
  dataIndex: 'specName'
13538
13707
  }, {
13539
- label: '商品sku编码',
13708
+ label: 'SKU编码',
13540
13709
  name: 'skuCode',
13541
13710
  dataIndex: 'specNo'
13542
- }, {
13543
- label: '商品名称',
13544
- name: 'goodName'
13545
- }, {
13546
- label: '商品编码',
13547
- name: 'goodNo'
13548
13711
  }];
13549
13712
  var GoodList$3 = function GoodList(props, ref) {
13550
13713
  var _useState = useState([]),
@@ -13555,7 +13718,7 @@ var GoodList$3 = function GoodList(props, ref) {
13555
13718
  _useState4 = _slicedToArray(_useState3, 2),
13556
13719
  selectIds = _useState4[0],
13557
13720
  setSelectIds = _useState4[1];
13558
- var _useGetColumns = useGetColumns('gy'),
13721
+ var _useGetColumns = useGetColumns('km'),
13559
13722
  _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13560
13723
  columns = _useGetColumns2[0],
13561
13724
  showColumnsDataIndexList = _useGetColumns2[1],
@@ -13584,41 +13747,50 @@ var GoodList$3 = function GoodList(props, ref) {
13584
13747
  fixed: true,
13585
13748
  onSelect: function onSelect(record, selected) {
13586
13749
  if (selected) {
13587
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
13750
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
13588
13751
  setSelect([].concat(_toConsumableArray(selectList), [record]));
13589
13752
  } else {
13590
13753
  setSelectIds(selectIds.filter(function (t) {
13591
- return t !== record.id;
13754
+ return t !== record[rowCheckKey];
13592
13755
  }));
13593
13756
  setSelect(selectList.filter(function (t) {
13594
- return t.id !== record.id;
13757
+ return t[rowCheckKey] !== record[rowCheckKey];
13595
13758
  }));
13596
13759
  }
13597
13760
  },
13598
13761
  onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
13599
13762
  if (selected) {
13600
13763
  setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
13601
- return t.id;
13764
+ return t[rowCheckKey];
13602
13765
  }))));
13603
13766
  setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
13604
13767
  } else {
13605
13768
  setSelectIds(difference(selectIds, changeRows.map(function (t) {
13606
- return t.id;
13769
+ return t[rowCheckKey];
13607
13770
  })));
13608
13771
  var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
13609
- return arrVal.id !== othVal.id;
13772
+ return arrVal[rowCheckKey] !== othVal[rowCheckKey];
13610
13773
  });
13611
13774
  setSelect(list);
13612
13775
  }
13776
+ },
13777
+ getCheckboxProps: function getCheckboxProps(record) {
13778
+ var options = {
13779
+ disabled: (props.selectedRows || []).map(function (row) {
13780
+ return row[rowCheckKey] || row.skuId;
13781
+ }).includes(record[rowCheckKey] || record.skuId),
13782
+ name: record[rowCheckKey]
13783
+ };
13784
+ return options;
13613
13785
  }
13614
13786
  };
13615
13787
  var showTable = function showTable() {
13616
13788
  var handleDelete = function handleDelete(record) {
13617
13789
  setSelectIds(selectIds.filter(function (t) {
13618
- return t !== record.id;
13790
+ return t !== record[rowCheckKey];
13619
13791
  }));
13620
13792
  setSelect(selectList.filter(function (t) {
13621
- return t.id !== record.id;
13793
+ return t[rowCheckKey] !== record[rowCheckKey];
13622
13794
  }));
13623
13795
  };
13624
13796
  var showColumns = [{
@@ -13642,7 +13814,7 @@ var GoodList$3 = function GoodList(props, ref) {
13642
13814
  }
13643
13815
  }, /*#__PURE__*/React.createElement(Table, {
13644
13816
  columns: showColumns,
13645
- rowKey: 'id',
13817
+ rowKey: rowCheckKey,
13646
13818
  dataSource: selectList,
13647
13819
  scroll: {
13648
13820
  x: '100%',
@@ -13671,7 +13843,7 @@ var GoodList$3 = function GoodList(props, ref) {
13671
13843
  }
13672
13844
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
13673
13845
  rowSelection: rowSelection,
13674
- rowKey: "id",
13846
+ rowKey: rowCheckKey,
13675
13847
  columns: columns,
13676
13848
  scroll: {
13677
13849
  x: '100%',
@@ -13688,13 +13860,15 @@ var GoodList$3 = function GoodList(props, ref) {
13688
13860
  type: "text"
13689
13861
  }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
13690
13862
  };
13691
- var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$3);
13863
+ var ErpGoodsList = /*#__PURE__*/forwardRef(GoodList$3);
13692
13864
 
13693
- var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13865
+ var ErpGoodsModal = function ErpGoodsModal(props, ref) {
13694
13866
  useImperativeHandle(ref, function () {
13695
13867
  return {
13696
- open: function open() {
13868
+ open: function open(shopCode) {
13869
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13697
13870
  setVisible(true);
13871
+ setSelectedRows(options.value || []);
13698
13872
  }
13699
13873
  };
13700
13874
  });
@@ -13704,13 +13878,17 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13704
13878
  _useState2 = _slicedToArray(_useState, 2),
13705
13879
  visible = _useState2[0],
13706
13880
  setVisible = _useState2[1];
13707
- var gyGoodsListRef = useRef(null);
13881
+ var _useState3 = useState([]),
13882
+ _useState4 = _slicedToArray(_useState3, 2),
13883
+ selectedRows = _useState4[0],
13884
+ setSelectedRows = _useState4[1];
13885
+ var erpGoodsListRef = useRef(null);
13708
13886
  var _onCancel = function onCancel() {
13709
13887
  setVisible(false);
13710
13888
  };
13711
13889
  var onOk = function onOk() {
13712
- var _gyGoodsListRef$curre;
13713
- var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
13890
+ var _erpGoodsListRef$curr;
13891
+ var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
13714
13892
  onSubmit(selectedList);
13715
13893
  _onCancel();
13716
13894
  };
@@ -13725,84 +13903,320 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13725
13903
  },
13726
13904
  onOk: onOk,
13727
13905
  wrapClassName: "goodModal"
13728
- }, /*#__PURE__*/React.createElement(GyGoodsList$1, {
13729
- ref: gyGoodsListRef
13906
+ }, /*#__PURE__*/React.createElement(ErpGoodsList, {
13907
+ ref: erpGoodsListRef,
13908
+ selectedRows: selectedRows
13730
13909
  })));
13731
13910
  };
13732
- var GyGoodsModal$2 = /*#__PURE__*/forwardRef(GyGoodsModal$1);
13911
+ var KmGoodsModal = /*#__PURE__*/forwardRef(ErpGoodsModal);
13733
13912
 
13734
- var getColumns = function getColumns(_ref) {
13735
- var _ref$text = _ref.text,
13736
- disabled = _ref.disabled,
13737
- updateHandle = _ref.updateHandle;
13738
- return {
13739
- //百胜E3补发商品
13740
- BS_E3_REISSUE_GOODS: [{
13741
- dataIndex: 'sku',
13742
- title: "SKU",
13743
- width: 150
13744
- }, {
13745
- dataIndex: 'skuId',
13746
- title: "SKU ID",
13747
- width: 150
13748
- }, {
13749
- dataIndex: 'goodsName',
13750
- title: "\u5546\u54C1\u540D\u79F0",
13751
- width: 150
13752
- }, {
13753
- dataIndex: 'goodsShortName',
13754
- title: "\u5546\u54C1\u7B80\u79F0",
13755
- width: 150
13756
- }, {
13757
- dataIndex: 'picPath',
13758
- title: "\u5546\u54C1\u56FE\u7247",
13759
- width: 150,
13760
- render: function render(val) {
13761
- return /*#__PURE__*/React.createElement(Image, {
13762
- width: 60,
13763
- src: val
13764
- });
13765
- }
13766
- }, {
13767
- dataIndex: 'goodsSn',
13768
- title: "\u8D27\u53F7",
13769
- width: 150
13770
- }, {
13771
- dataIndex: 'goodsId',
13772
- title: "\u8D27\u53F7ID",
13773
- width: 150
13774
- }, {
13775
- dataIndex: 'colorName',
13776
- title: "\u989C\u8272\u540D\u79F0",
13777
- width: 150
13778
- }, {
13779
- dataIndex: 'colorCode',
13780
- title: "\u989C\u8272\u4EE3\u7801",
13781
- width: 150
13782
- }, {
13783
- dataIndex: 'sizeName',
13784
- title: "\u5C3A\u7801\u540D\u79F0",
13785
- width: 150
13786
- }, {
13787
- dataIndex: 'sizeCode',
13788
- title: "\u5C3A\u7801\u4EE3\u7801",
13789
- width: 150
13790
- }, {
13791
- dataIndex: 'brandName',
13792
- title: "\u54C1\u724C\u540D\u79F0",
13793
- width: 150
13794
- }, {
13795
- dataIndex: 'goodsNumber',
13796
- title: "\u5546\u54C1\u6570\u91CF",
13797
- width: 150
13798
- }, {
13799
- dataIndex: 'goodsPrice',
13800
- title: "\u5546\u54C1\u5355\u4EF7",
13801
- width: 150
13802
- }, {
13803
- dataIndex: 'shopPrice',
13804
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13805
- width: 150
13913
+ var getTableData$4 = function getTableData(_ref, formData) {
13914
+ var current = _ref.current,
13915
+ pageSize = _ref.pageSize;
13916
+ var data = {
13917
+ goodShortName: formData.goodShortName || null,
13918
+ skuName: formData.skuName || null,
13919
+ skuCode: formData.skuCode || null,
13920
+ goodName: formData.goodName || null,
13921
+ goodNo: formData.goodNo || null
13922
+ };
13923
+ return extendRequest('/qy/gdfw/product/product/page', {
13924
+ method: 'post',
13925
+ data: _objectSpread2({
13926
+ pageSize: pageSize,
13927
+ pageNo: current,
13928
+ platform: 'GY_ERP'
13929
+ }, data)
13930
+ }).then(function (res) {
13931
+ var _res$data = res.data,
13932
+ _res$data$productSkuL = _res$data.productSkuList,
13933
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
13934
+ _res$data$total = _res$data.total,
13935
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
13936
+ var newProducts = productSkuList.map(function (item, index) {
13937
+ return _objectSpread2({}, item);
13938
+ });
13939
+ return {
13940
+ total: total,
13941
+ list: newProducts
13942
+ };
13943
+ });
13944
+ };
13945
+ var searchFormData$3 = [{
13946
+ label: '商品简称',
13947
+ name: 'goodShortName'
13948
+ }, {
13949
+ label: '商品sku名称',
13950
+ name: 'skuName',
13951
+ dataIndex: 'specName'
13952
+ }, {
13953
+ label: '商品sku编码',
13954
+ name: 'skuCode',
13955
+ dataIndex: 'specNo'
13956
+ }, {
13957
+ label: '商品名称',
13958
+ name: 'goodName'
13959
+ }, {
13960
+ label: '商品编码',
13961
+ name: 'goodNo'
13962
+ }];
13963
+ var GoodList$4 = function GoodList(props, ref) {
13964
+ var _useState = useState([]),
13965
+ _useState2 = _slicedToArray(_useState, 2),
13966
+ selectList = _useState2[0],
13967
+ setSelect = _useState2[1];
13968
+ var _useState3 = useState([]),
13969
+ _useState4 = _slicedToArray(_useState3, 2),
13970
+ selectIds = _useState4[0],
13971
+ setSelectIds = _useState4[1];
13972
+ var _useGetColumns = useGetColumns('gy'),
13973
+ _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13974
+ columns = _useGetColumns2[0],
13975
+ showColumnsDataIndexList = _useGetColumns2[1],
13976
+ loading = _useGetColumns2[2];
13977
+ useImperativeHandle(ref, function () {
13978
+ return {
13979
+ getSelectGoodList: function getSelectGoodList() {
13980
+ return selectList;
13981
+ }
13982
+ };
13983
+ });
13984
+ var _Form$useForm = Form.useForm(),
13985
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13986
+ form = _Form$useForm2[0];
13987
+ var _useAntdTable = useAntdTable(getTableData$4, {
13988
+ defaultPageSize: 10,
13989
+ form: form
13990
+ }),
13991
+ tableProps = _useAntdTable.tableProps,
13992
+ search = _useAntdTable.search,
13993
+ params = _useAntdTable.params;
13994
+ var submit = search.submit,
13995
+ reset = search.reset;
13996
+ var rowSelection = {
13997
+ selectedRowKeys: selectIds,
13998
+ fixed: true,
13999
+ onSelect: function onSelect(record, selected) {
14000
+ if (selected) {
14001
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
14002
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
14003
+ } else {
14004
+ setSelectIds(selectIds.filter(function (t) {
14005
+ return t !== record.id;
14006
+ }));
14007
+ setSelect(selectList.filter(function (t) {
14008
+ return t.id !== record.id;
14009
+ }));
14010
+ }
14011
+ },
14012
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
14013
+ if (selected) {
14014
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
14015
+ return t.id;
14016
+ }))));
14017
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
14018
+ } else {
14019
+ setSelectIds(difference(selectIds, changeRows.map(function (t) {
14020
+ return t.id;
14021
+ })));
14022
+ var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
14023
+ return arrVal.id !== othVal.id;
14024
+ });
14025
+ setSelect(list);
14026
+ }
14027
+ }
14028
+ };
14029
+ var showTable = function showTable() {
14030
+ var handleDelete = function handleDelete(record) {
14031
+ setSelectIds(selectIds.filter(function (t) {
14032
+ return t !== record.id;
14033
+ }));
14034
+ setSelect(selectList.filter(function (t) {
14035
+ return t.id !== record.id;
14036
+ }));
14037
+ };
14038
+ var showColumns = [{
14039
+ dataIndex: '',
14040
+ title: "\u64CD\u4F5C",
14041
+ ellipsis: true,
14042
+ width: 100,
14043
+ render: function render(val, record) {
14044
+ return /*#__PURE__*/React.createElement(Button, {
14045
+ type: "link",
14046
+ onClick: function onClick() {
14047
+ return handleDelete(record);
14048
+ }
14049
+ }, "\u5220\u9664");
14050
+ }
14051
+ }].concat(takeRight(columns, columns.length - 1));
14052
+ return selectList.length ? /*#__PURE__*/React.createElement("div", {
14053
+ style: {
14054
+ width: '100%',
14055
+ maxWidth: '387px'
14056
+ }
14057
+ }, /*#__PURE__*/React.createElement(Table, {
14058
+ columns: showColumns,
14059
+ rowKey: 'id',
14060
+ dataSource: selectList,
14061
+ scroll: {
14062
+ x: '100%',
14063
+ y: 250
14064
+ },
14065
+ pagination: {
14066
+ size: 'small',
14067
+ total: selectIds.length,
14068
+ pageSize: 10,
14069
+ showSizeChanger: false
14070
+ }
14071
+ })) : null;
14072
+ };
14073
+ return /*#__PURE__*/React.createElement(Skeleton, {
14074
+ active: true,
14075
+ loading: loading
14076
+ }, /*#__PURE__*/React.createElement(SearchForm, {
14077
+ searchFormData: searchFormData$3,
14078
+ form: form,
14079
+ showColumnsDataIndexList: showColumnsDataIndexList,
14080
+ submit: submit,
14081
+ reset: reset
14082
+ }), /*#__PURE__*/React.createElement("div", {
14083
+ style: {
14084
+ marginTop: '4px'
14085
+ }
14086
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
14087
+ rowSelection: rowSelection,
14088
+ rowKey: "id",
14089
+ columns: columns,
14090
+ scroll: {
14091
+ x: '100%',
14092
+ y: 250
14093
+ }
14094
+ }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
14095
+ getPopupContainer: function getPopupContainer(triggerNode) {
14096
+ return triggerNode.parentElement;
14097
+ },
14098
+ content: showTable(),
14099
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
14100
+ }, /*#__PURE__*/React.createElement(Button, {
14101
+ danger: true,
14102
+ type: "text"
14103
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
14104
+ };
14105
+ var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$4);
14106
+
14107
+ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
14108
+ useImperativeHandle(ref, function () {
14109
+ return {
14110
+ open: function open() {
14111
+ setVisible(true);
14112
+ }
14113
+ };
14114
+ });
14115
+ var onSubmit = props.onSubmit,
14116
+ width = props.width;
14117
+ var _useState = useState(false),
14118
+ _useState2 = _slicedToArray(_useState, 2),
14119
+ visible = _useState2[0],
14120
+ setVisible = _useState2[1];
14121
+ var gyGoodsListRef = useRef(null);
14122
+ var _onCancel = function onCancel() {
14123
+ setVisible(false);
14124
+ };
14125
+ var onOk = function onOk() {
14126
+ var _gyGoodsListRef$curre;
14127
+ var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
14128
+ onSubmit(selectedList);
14129
+ _onCancel();
14130
+ };
14131
+ return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
14132
+ title: '选择商品',
14133
+ okText: '确认',
14134
+ cancelText: '取消',
14135
+ visible: visible,
14136
+ width: width || 850,
14137
+ onCancel: function onCancel() {
14138
+ _onCancel();
14139
+ },
14140
+ onOk: onOk,
14141
+ wrapClassName: "goodModal"
14142
+ }, /*#__PURE__*/React.createElement(GyGoodsList$1, {
14143
+ ref: gyGoodsListRef
14144
+ })));
14145
+ };
14146
+ var GyGoodsModal$2 = /*#__PURE__*/forwardRef(GyGoodsModal$1);
14147
+
14148
+ var getColumns = function getColumns(_ref) {
14149
+ var _ref$text = _ref.text,
14150
+ disabled = _ref.disabled,
14151
+ updateHandle = _ref.updateHandle;
14152
+ return {
14153
+ //百胜E3补发商品
14154
+ BS_E3_REISSUE_GOODS: [{
14155
+ dataIndex: 'sku',
14156
+ title: "SKU",
14157
+ width: 150
14158
+ }, {
14159
+ dataIndex: 'skuId',
14160
+ title: "SKU ID",
14161
+ width: 150
14162
+ }, {
14163
+ dataIndex: 'goodsName',
14164
+ title: "\u5546\u54C1\u540D\u79F0",
14165
+ width: 150
14166
+ }, {
14167
+ dataIndex: 'goodsShortName',
14168
+ title: "\u5546\u54C1\u7B80\u79F0",
14169
+ width: 150
14170
+ }, {
14171
+ dataIndex: 'picPath',
14172
+ title: "\u5546\u54C1\u56FE\u7247",
14173
+ width: 150,
14174
+ render: function render(val) {
14175
+ return /*#__PURE__*/React.createElement(Image, {
14176
+ width: 60,
14177
+ src: val
14178
+ });
14179
+ }
14180
+ }, {
14181
+ dataIndex: 'goodsSn',
14182
+ title: "\u8D27\u53F7",
14183
+ width: 150
14184
+ }, {
14185
+ dataIndex: 'goodsId',
14186
+ title: "\u8D27\u53F7ID",
14187
+ width: 150
14188
+ }, {
14189
+ dataIndex: 'colorName',
14190
+ title: "\u989C\u8272\u540D\u79F0",
14191
+ width: 150
14192
+ }, {
14193
+ dataIndex: 'colorCode',
14194
+ title: "\u989C\u8272\u4EE3\u7801",
14195
+ width: 150
14196
+ }, {
14197
+ dataIndex: 'sizeName',
14198
+ title: "\u5C3A\u7801\u540D\u79F0",
14199
+ width: 150
14200
+ }, {
14201
+ dataIndex: 'sizeCode',
14202
+ title: "\u5C3A\u7801\u4EE3\u7801",
14203
+ width: 150
14204
+ }, {
14205
+ dataIndex: 'brandName',
14206
+ title: "\u54C1\u724C\u540D\u79F0",
14207
+ width: 150
14208
+ }, {
14209
+ dataIndex: 'goodsNumber',
14210
+ title: "\u5546\u54C1\u6570\u91CF",
14211
+ width: 150
14212
+ }, {
14213
+ dataIndex: 'goodsPrice',
14214
+ title: "\u5546\u54C1\u5355\u4EF7",
14215
+ width: 150
14216
+ }, {
14217
+ dataIndex: 'shopPrice',
14218
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
14219
+ width: 150
13806
14220
  }, {
13807
14221
  dataIndex: 'isGift',
13808
14222
  title: "\u662F\u5426\u8D60\u54C1",
@@ -14437,6 +14851,10 @@ var getColumns$2 = function getColumns(_ref) {
14437
14851
  label: '组合装',
14438
14852
  value: '2'
14439
14853
  }];
14854
+ var typeMap = {
14855
+ '1': '单品',
14856
+ '2': '组合装'
14857
+ };
14440
14858
  return !disabled ? /*#__PURE__*/React.createElement(Select, {
14441
14859
  style: {
14442
14860
  width: 70
@@ -14446,7 +14864,7 @@ var getColumns$2 = function getColumns(_ref) {
14446
14864
  onChange: function onChange(value) {
14447
14865
  return updateHandle(value, index, 'type');
14448
14866
  }
14449
- }) : /*#__PURE__*/React.createElement("span", null, val);
14867
+ }) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
14450
14868
  }
14451
14869
  }],
14452
14870
  //旺店通换出商品信息
@@ -14558,6 +14976,10 @@ var getColumns$2 = function getColumns(_ref) {
14558
14976
  label: '组合装',
14559
14977
  value: '2'
14560
14978
  }];
14979
+ var typeMap = {
14980
+ '1': '单品',
14981
+ '2': '组合装'
14982
+ };
14561
14983
  return !disabled ? /*#__PURE__*/React.createElement(Select, {
14562
14984
  style: {
14563
14985
  width: 70
@@ -14567,13 +14989,13 @@ var getColumns$2 = function getColumns(_ref) {
14567
14989
  onChange: function onChange(value) {
14568
14990
  return updateHandle(value, index, 'type');
14569
14991
  }
14570
- }) : /*#__PURE__*/React.createElement("span", null, val);
14992
+ }) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
14571
14993
  }
14572
14994
  }]
14573
14995
  };
14574
14996
  };
14575
14997
 
14576
- var getYesOrNo = function getYesOrNo(val) {
14998
+ var getYesOrNo$1 = function getYesOrNo(val) {
14577
14999
  if (isNull(val)) return null;
14578
15000
  return val ? '是' : '否';
14579
15001
  };
@@ -14711,7 +15133,7 @@ var getColumns$3 = function getColumns(_ref) {
14711
15133
  label: '否',
14712
15134
  value: false
14713
15135
  }]
14714
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
15136
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
14715
15137
  },
14716
15138
  width: 100
14717
15139
  }]
@@ -14723,7 +15145,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
14723
15145
  if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
14724
15146
  return false;
14725
15147
  };
14726
- var getYesOrNo$1 = function getYesOrNo(val) {
15148
+ var getYesOrNo$2 = function getYesOrNo(val) {
14727
15149
  if (isNull(val)) return null;
14728
15150
  return val ? '是' : '否';
14729
15151
  };
@@ -14833,7 +15255,7 @@ var getColumns$4 = function getColumns(_ref) {
14833
15255
  title: "\u662F\u5426\u53D6\u6D88",
14834
15256
  width: 150,
14835
15257
  render: function render(val) {
14836
- return /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
15258
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
14837
15259
  }
14838
15260
  }, {
14839
15261
  dataIndex: 'isGift',
@@ -14852,7 +15274,7 @@ var getColumns$4 = function getColumns(_ref) {
14852
15274
  label: '否',
14853
15275
  value: 0
14854
15276
  }]
14855
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
15277
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
14856
15278
  }
14857
15279
  }, {
14858
15280
  dataIndex: 'skuNote',
@@ -14972,7 +15394,7 @@ var getColumns$4 = function getColumns(_ref) {
14972
15394
  label: '否',
14973
15395
  value: 0
14974
15396
  }]
14975
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
15397
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
14976
15398
  }
14977
15399
  }].map(function (item) {
14978
15400
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -15096,7 +15518,7 @@ var getColumns$4 = function getColumns(_ref) {
15096
15518
  label: '否',
15097
15519
  value: 0
15098
15520
  }]
15099
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
15521
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
15100
15522
  }
15101
15523
  }].map(function (item) {
15102
15524
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -15218,7 +15640,7 @@ var getColumns$5 = function getColumns() {
15218
15640
  ellipsis: true,
15219
15641
  align: 'center',
15220
15642
  render: function render(val, record, index) {
15221
- return (record.qty || 0) * (+record.salePrice || 0);
15643
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15222
15644
  }
15223
15645
  }, {
15224
15646
  dataIndex: 'batchId',
@@ -15494,7 +15916,7 @@ var getColumns$5 = function getColumns() {
15494
15916
  dataIndex: 'saleAmount',
15495
15917
  title: '总金额',
15496
15918
  render: function render(val, record) {
15497
- return (record.qty || 0) * (+record.salePrice || 0);
15919
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15498
15920
  }
15499
15921
  }, {
15500
15922
  dataIndex: 'batchId',
@@ -15541,53 +15963,282 @@ var getColumns$5 = function getColumns() {
15541
15963
  dataIndex: 'name',
15542
15964
  title: '商品名称'
15543
15965
  }, {
15544
- dataIndex: 'skuId',
15545
- title: '商品编码'
15966
+ dataIndex: 'skuId',
15967
+ title: '商品编码'
15968
+ }, {
15969
+ dataIndex: 'iId',
15970
+ title: '款式编码'
15971
+ }, {
15972
+ dataIndex: 'pic',
15973
+ title: '商品图片',
15974
+ width: 100,
15975
+ render: function render(val) {
15976
+ return /*#__PURE__*/React.createElement(Image, {
15977
+ width: 60,
15978
+ src: val
15979
+ });
15980
+ }
15981
+ }, {
15982
+ dataIndex: 'propertiesValue',
15983
+ title: '规格值'
15984
+ }, {
15985
+ dataIndex: 'saleBasePrice',
15986
+ title: '原价',
15987
+ render: function render(price) {
15988
+ return price || price === 0 ? Number(price).toFixed(2) : '';
15989
+ }
15990
+ }, {
15991
+ dataIndex: 'salePrice',
15992
+ title: '单价',
15993
+ width: 120,
15994
+ render: function render(val, record, index) {
15995
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15996
+ style: {
15997
+ width: 70
15998
+ },
15999
+ value: val,
16000
+ min: 0,
16001
+ precision: 2,
16002
+ onChange: function onChange(num) {
16003
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
16004
+ }
16005
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
16006
+ }
16007
+ }, {
16008
+ dataIndex: 'qty',
16009
+ title: '数量',
16010
+ width: 100,
16011
+ render: function render(val, record, index) {
16012
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16013
+ style: {
16014
+ width: 70
16015
+ },
16016
+ value: val,
16017
+ min: 1,
16018
+ precision: 0,
16019
+ onChange: function onChange(num) {
16020
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
16021
+ }
16022
+ }) : /*#__PURE__*/React.createElement("span", null, val);
16023
+ }
16024
+ }, {
16025
+ dataIndex: 'saleAmount',
16026
+ title: '总金额',
16027
+ render: function render(val, record) {
16028
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
16029
+ }
16030
+ }, {
16031
+ dataIndex: 'isGift',
16032
+ title: '是否赠品',
16033
+ width: 100,
16034
+ render: function render(val, record, index) {
16035
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
16036
+ value: val,
16037
+ onChange: function onChange(value) {
16038
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
16039
+ },
16040
+ options: [{
16041
+ label: '是',
16042
+ value: true
16043
+ }, {
16044
+ label: '否',
16045
+ value: false
16046
+ }]
16047
+ }) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
16048
+ }
16049
+ }, {
16050
+ dataIndex: 'remark',
16051
+ title: '备注',
16052
+ render: function render(val, record, index) {
16053
+ return !disabled ? /*#__PURE__*/React.createElement(Input, {
16054
+ style: {
16055
+ width: 70
16056
+ },
16057
+ value: val,
16058
+ onChange: function onChange(e) {
16059
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
16060
+ }
16061
+ }) : /*#__PURE__*/React.createElement("span", null, val);
16062
+ }
16063
+ }].map(fillAttrs)
16064
+ };
16065
+ };
16066
+
16067
+ function toNum$2(value) {
16068
+ if (typeof value === 'string') {
16069
+ return value ? +value : void 0;
16070
+ }
16071
+ if (typeof value === 'number') {
16072
+ return value;
16073
+ }
16074
+ return void 0;
16075
+ }
16076
+ var getColumns$6 = function getColumns(_ref) {
16077
+ var _ref$text = _ref.text,
16078
+ disabled = _ref.disabled,
16079
+ updateHandle = _ref.updateHandle;
16080
+ return {
16081
+ KM_GOODS: [{
16082
+ dataIndex: 'sysSkuPropertiesName',
16083
+ title: "\u89C4\u683C\u540D\u79F0",
16084
+ width: 250
16085
+ }, {
16086
+ dataIndex: 'sysTitle',
16087
+ title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
16088
+ width: 150
16089
+ }, {
16090
+ dataIndex: 'title',
16091
+ title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
16092
+ width: 150
16093
+ }, {
16094
+ dataIndex: 'shortTitle',
16095
+ title: "\u5546\u54C1\u7B80\u79F0",
16096
+ width: 150
16097
+ }, {
16098
+ dataIndex: 'sysOuterId',
16099
+ title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
16100
+ width: 150
16101
+ }, {
16102
+ dataIndex: 'outerId',
16103
+ title: "\u5546\u5BB6\u7F16\u7801",
16104
+ width: 150
16105
+ }, {
16106
+ dataIndex: 'skuSysId',
16107
+ title: "\u7CFB\u7EDF\u89C4\u683CID",
16108
+ width: 150
16109
+ }, {
16110
+ dataIndex: 'itemSysId',
16111
+ title: "\u7CFB\u7EDF\u5546\u54C1ID",
16112
+ width: 150
16113
+ }, {
16114
+ dataIndex: 'sysPicPath',
16115
+ title: "\u5546\u54C1\u56FE\u7247",
16116
+ width: 100,
16117
+ render: function render(val) {
16118
+ return /*#__PURE__*/React.createElement(Image, {
16119
+ width: 60,
16120
+ src: val
16121
+ });
16122
+ }
16123
+ }, {
16124
+ dataIndex: 'num',
16125
+ title: "\u6570\u91CF",
16126
+ width: 100,
16127
+ render: function render(val, record, index) {
16128
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16129
+ style: {
16130
+ width: 70
16131
+ },
16132
+ value: val,
16133
+ min: 1,
16134
+ precision: 0,
16135
+ onChange: function onChange(num) {
16136
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
16137
+ }
16138
+ }) : /*#__PURE__*/React.createElement("span", null, val);
16139
+ }
16140
+ }, {
16141
+ dataIndex: 'payment',
16142
+ title: "\u5B9E\u4ED8\u91D1\u989D",
16143
+ width: 150,
16144
+ render: function render(val, record, index) {
16145
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16146
+ style: {
16147
+ width: 130
16148
+ },
16149
+ value: val,
16150
+ min: 0,
16151
+ precision: 2,
16152
+ onChange: function onChange(num) {
16153
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
16154
+ }
16155
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
16156
+ }
16157
+ }, {
16158
+ dataIndex: 'price',
16159
+ title: "\u5546\u54C1\u9500\u552E\u4EF7",
16160
+ width: 150,
16161
+ render: function render(val) {
16162
+ return val || val === 0 ? Number(val).toFixed(2) : '';
16163
+ }
16164
+ }, {
16165
+ dataIndex: 'type',
16166
+ title: "\u5546\u54C1\u7C7B\u578B",
16167
+ width: 150
16168
+ }].map(function (item) {
16169
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16170
+ align: 'center',
16171
+ ellipsis: true
16172
+ });
16173
+ }),
16174
+ KM_REISSUE_GOODS: [{
16175
+ dataIndex: 'sysSkuPropertiesName',
16176
+ title: "\u89C4\u683C\u540D\u79F0",
16177
+ width: 250
16178
+ }, {
16179
+ dataIndex: 'sysTitle',
16180
+ title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
16181
+ width: 150
16182
+ }, {
16183
+ dataIndex: 'shortTitle',
16184
+ title: "\u5546\u54C1\u7B80\u79F0",
16185
+ width: 150
16186
+ }, {
16187
+ dataIndex: 'title',
16188
+ title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
16189
+ width: 150
15546
16190
  }, {
15547
- dataIndex: 'iId',
15548
- title: '款式编码'
16191
+ dataIndex: 'outerId',
16192
+ title: "\u5546\u5BB6\u7F16\u7801",
16193
+ width: 150
15549
16194
  }, {
15550
- dataIndex: 'pic',
15551
- title: '商品图片',
15552
- width: 100,
15553
- render: function render(val) {
15554
- return /*#__PURE__*/React.createElement(Image, {
15555
- width: 60,
15556
- src: val
15557
- });
15558
- }
16195
+ dataIndex: 'sysOuterId',
16196
+ title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
16197
+ width: 150
15559
16198
  }, {
15560
- dataIndex: 'propertiesValue',
15561
- title: '规格值'
16199
+ dataIndex: 'itemSysId',
16200
+ title: "\u7CFB\u7EDF\u5546\u54C1ID",
16201
+ width: 150
15562
16202
  }, {
15563
- dataIndex: 'saleBasePrice',
15564
- title: '原价',
15565
- render: function render(price) {
15566
- return price || price === 0 ? Number(price).toFixed(2) : '';
15567
- }
16203
+ dataIndex: 'skuSysId',
16204
+ title: "\u7CFB\u7EDF\u89C4\u683CID",
16205
+ width: 150
15568
16206
  }, {
15569
- dataIndex: 'salePrice',
15570
- title: '单价',
15571
- width: 120,
16207
+ dataIndex: 'realNum',
16208
+ title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
16209
+ width: 100,
16210
+ validator: function validator(_rule, value) {
16211
+ var title = '';
16212
+ if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
16213
+ var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
16214
+ var res = typeof realNum === 'number' ? realNum < 1 : true;
16215
+ if (res) {
16216
+ title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
16217
+ }
16218
+ return res;
16219
+ })) {
16220
+ return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
16221
+ }
16222
+ },
15572
16223
  render: function render(val, record, index) {
15573
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16224
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15574
16225
  style: {
15575
16226
  width: 70
15576
16227
  },
15577
16228
  value: val,
15578
- min: 0,
15579
- precision: 2,
16229
+ min: 1,
16230
+ precision: 0,
15580
16231
  onChange: function onChange(num) {
15581
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
16232
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
15582
16233
  }
15583
- }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
16234
+ }) : /*#__PURE__*/React.createElement("span", null, val);
15584
16235
  }
15585
16236
  }, {
15586
- dataIndex: 'qty',
15587
- title: '数量',
16237
+ dataIndex: 'desiredNum',
16238
+ title: "\u5E94\u8865\u53D1\u6570\u91CF",
15588
16239
  width: 100,
15589
16240
  render: function render(val, record, index) {
15590
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16241
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15591
16242
  style: {
15592
16243
  width: 70
15593
16244
  },
@@ -15595,54 +16246,55 @@ var getColumns$5 = function getColumns() {
15595
16246
  min: 1,
15596
16247
  precision: 0,
15597
16248
  onChange: function onChange(num) {
15598
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
16249
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
15599
16250
  }
15600
16251
  }) : /*#__PURE__*/React.createElement("span", null, val);
15601
16252
  }
15602
16253
  }, {
15603
- dataIndex: 'saleAmount',
15604
- title: '总金额',
15605
- render: function render(val, record) {
15606
- return (record.qty || 0) * (+record.salePrice || 0);
15607
- }
15608
- }, {
15609
- dataIndex: 'isGift',
15610
- title: '是否赠品',
15611
- width: 100,
15612
- render: function render(val, record, index) {
15613
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
15614
- value: val,
15615
- onChange: function onChange(value) {
15616
- updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(value, index, 'isGift');
15617
- },
15618
- options: [{
15619
- label: '是',
15620
- value: true
15621
- }, {
15622
- label: '否',
15623
- value: false
15624
- }]
15625
- }) : /*#__PURE__*/React.createElement("span", null, typeof val !== 'boolean' ? '' : val ? '是' : '否');
15626
- }
16254
+ dataIndex: 'price',
16255
+ title: "\u5546\u54C1\u9500\u552E\u4EF7",
16256
+ width: 150
15627
16257
  }, {
15628
- dataIndex: 'remark',
15629
- title: '备注',
16258
+ dataIndex: 'payment',
16259
+ title: "\u5B9E\u4ED8\u91D1\u989D",
16260
+ width: 150,
15630
16261
  render: function render(val, record, index) {
15631
- return !disabled ? /*#__PURE__*/React.createElement(Input, {
16262
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15632
16263
  style: {
15633
- width: 70
16264
+ width: 130
15634
16265
  },
15635
16266
  value: val,
15636
- onChange: function onChange(e) {
15637
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(e.target.value, index, 'remark');
16267
+ min: 0,
16268
+ precision: 2,
16269
+ onChange: function onChange(num) {
16270
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
15638
16271
  }
15639
16272
  }) : /*#__PURE__*/React.createElement("span", null, val);
15640
16273
  }
15641
- }].map(fillAttrs)
16274
+ }, {
16275
+ dataIndex: 'type',
16276
+ title: "\u5546\u54C1\u7C7B\u578B",
16277
+ width: 150
16278
+ }, {
16279
+ dataIndex: 'sysPicPath',
16280
+ title: "\u5546\u54C1\u56FE\u7247",
16281
+ width: 100,
16282
+ render: function render(val) {
16283
+ return /*#__PURE__*/React.createElement(Image, {
16284
+ width: 60,
16285
+ src: val
16286
+ });
16287
+ }
16288
+ }].map(function (item) {
16289
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16290
+ align: 'center',
16291
+ ellipsis: true
16292
+ });
16293
+ })
15642
16294
  };
15643
16295
  };
15644
16296
 
15645
- var getColumns$6 = function getColumns(_ref) {
16297
+ var getColumns$7 = function getColumns(_ref) {
15646
16298
  var _ref$text = _ref.text,
15647
16299
  text = _ref$text === void 0 ? '' : _ref$text,
15648
16300
  disabled = _ref.disabled,
@@ -15755,7 +16407,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15755
16407
  disabled = _ref.disabled,
15756
16408
  updateHandle = _ref.updateHandle,
15757
16409
  updateDataHandle = _ref.updateDataHandle;
15758
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
16410
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
15759
16411
  text: text,
15760
16412
  disabled: disabled,
15761
16413
  updateHandle: updateHandle
@@ -15780,8 +16432,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15780
16432
  text: text,
15781
16433
  disabled: disabled,
15782
16434
  updateHandle: updateHandle
16435
+ })), getColumns$6({
16436
+ text: text,
16437
+ disabled: disabled,
16438
+ updateHandle: updateHandle
15783
16439
  })), {}, {
15784
- default: getColumns$6({
16440
+ default: getColumns$7({
15785
16441
  text: text,
15786
16442
  disabled: disabled,
15787
16443
  updateHandle: updateHandle
@@ -15933,6 +16589,231 @@ function HoverTableRowDeleteIcon(_ref) {
15933
16589
  })));
15934
16590
  }
15935
16591
 
16592
+ var isErpType = {
16593
+ isWdt: function isWdt(type) {
16594
+ return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
16595
+ },
16596
+ isBsE3: function isBsE3(type) {
16597
+ return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
16598
+ },
16599
+ isGy: function isGy(type) {
16600
+ return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
16601
+ },
16602
+ isJst: function isJst(type) {
16603
+ return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
16604
+ },
16605
+ isKm: function isKm(type) {
16606
+ return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
16607
+ }
16608
+ };
16609
+ var processGoods = function processGoods(_ref) {
16610
+ var list = _ref.list,
16611
+ type = _ref.type,
16612
+ canUpdateNumber = _ref.canUpdateNumber;
16613
+ var newList = [];
16614
+ // 根据商品类型处理数据
16615
+ if (isErpType.isWdt(type)) {
16616
+ newList = processWdtGoods({
16617
+ list: list,
16618
+ type: type,
16619
+ canUpdateNumber: canUpdateNumber
16620
+ });
16621
+ } else if (isErpType.isBsE3(type)) {
16622
+ newList = processBsE3Goods({
16623
+ list: list,
16624
+ type: type,
16625
+ canUpdateNumber: canUpdateNumber
16626
+ });
16627
+ } else if (isErpType.isGy(type)) {
16628
+ newList = processGyGoods({
16629
+ list: list,
16630
+ type: type,
16631
+ canUpdateNumber: canUpdateNumber
16632
+ });
16633
+ } else if (isErpType.isJst(type)) {
16634
+ newList = processJstGoods({
16635
+ list: list,
16636
+ type: type,
16637
+ canUpdateNumber: canUpdateNumber
16638
+ });
16639
+ } else if (isErpType.isKm(type)) {
16640
+ newList = processKmGoods({
16641
+ list: list,
16642
+ type: type,
16643
+ canUpdateNumber: canUpdateNumber
16644
+ });
16645
+ } else {
16646
+ newList = processDefaultGoods({
16647
+ list: list,
16648
+ type: type,
16649
+ canUpdateNumber: canUpdateNumber
16650
+ });
16651
+ }
16652
+ return newList;
16653
+ };
16654
+ // 处理不同类型的商品数据
16655
+ var processWdtGoods = function processWdtGoods(_ref2) {
16656
+ var list = _ref2.list,
16657
+ type = _ref2.type,
16658
+ canUpdateNumber = _ref2.canUpdateNumber;
16659
+ return list.map(function (item) {
16660
+ var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
16661
+ uuid: uuid(),
16662
+ canDelete: true,
16663
+ num: 1,
16664
+ orderPrice: 0,
16665
+ sharePrice: 0,
16666
+ canUpdateNumber: canUpdateNumber
16667
+ });
16668
+ // 特殊处理换货商品
16669
+ if (type === 'WDT_EXCHANGE_GOODS') {
16670
+ processedItem.price = item.retailPrice;
16671
+ processedItem.type = '1';
16672
+ }
16673
+ return processedItem;
16674
+ });
16675
+ };
16676
+ var processBsE3Goods = function processBsE3Goods(_ref3) {
16677
+ var list = _ref3.list,
16678
+ canUpdateNumber = _ref3.canUpdateNumber;
16679
+ return list.map(function (item) {
16680
+ var specNo = item.specNo,
16681
+ specId = item.specId,
16682
+ goodName = item.goodName,
16683
+ goodShortName = item.goodShortName,
16684
+ goodPicUrl = item.goodPicUrl,
16685
+ goodNo = item.goodNo,
16686
+ goodId = item.goodId,
16687
+ retailPrice = item.retailPrice;
16688
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16689
+ sku: specNo,
16690
+ skuId: specId,
16691
+ goodsName: goodName,
16692
+ goodsShortName: goodShortName,
16693
+ picPath: goodPicUrl,
16694
+ goodsSn: goodNo,
16695
+ goodsId: goodId,
16696
+ goodsPrice: retailPrice,
16697
+ shopPrice: retailPrice,
16698
+ sharePayment: '',
16699
+ sharePrice: '',
16700
+ payment: '',
16701
+ tcSku: '',
16702
+ tcGoodsNumber: '',
16703
+ taoCanSingleSl: '',
16704
+ isGift: '',
16705
+ uuid: uuid(),
16706
+ canDelete: true,
16707
+ canEdit: true,
16708
+ goodsNumber: 1,
16709
+ canUpdateNumber: canUpdateNumber
16710
+ });
16711
+ });
16712
+ };
16713
+ var processGyGoods = function processGyGoods(_ref4) {
16714
+ var list = _ref4.list;
16715
+ return list.map(function (item) {
16716
+ var goodName = item.goodName,
16717
+ goodShortName = item.goodShortName,
16718
+ goodNo = item.goodNo,
16719
+ specName = item.specName,
16720
+ specNo = item.specNo,
16721
+ retailPrice = item.retailPrice;
16722
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16723
+ uuid: uuid(),
16724
+ canDelete: true,
16725
+ canEdit: true,
16726
+ qty: 1,
16727
+ goodName: goodName,
16728
+ goodShortName: goodShortName,
16729
+ goodNo: goodNo,
16730
+ specName: specName,
16731
+ specNo: specNo,
16732
+ originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
16733
+ originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
16734
+ });
16735
+ });
16736
+ };
16737
+ var processJstGoods = function processJstGoods(_ref5) {
16738
+ var list = _ref5.list;
16739
+ return list.map(function (item) {
16740
+ return {
16741
+ name: item.goodName,
16742
+ skuId: item.goodNo,
16743
+ iId: item.styleCode,
16744
+ pic: item.goodPicUrl,
16745
+ propertiesValue: item.propertiesValue,
16746
+ saleBasePrice: item.retailPrice,
16747
+ salePrice: item.retailPrice,
16748
+ remark: '',
16749
+ uuid: uuid(),
16750
+ canDelete: true,
16751
+ canEdit: true,
16752
+ qty: 1
16753
+ };
16754
+ });
16755
+ };
16756
+ var processKmGoods = function processKmGoods(_ref6) {
16757
+ var list = _ref6.list,
16758
+ type = _ref6.type;
16759
+ var initParamsMap = {
16760
+ KM_GOODS: {
16761
+ num: 1
16762
+ },
16763
+ KM_REISSUE_GOODS: {
16764
+ realNum: 1,
16765
+ desiredNum: 1
16766
+ }
16767
+ };
16768
+ return list.map(function (item) {
16769
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16770
+ sysSkuPropertiesName: item.specName,
16771
+ sysTitle: item.goodName,
16772
+ title: null,
16773
+ shortTitle: item.goodShortName,
16774
+ sysOuterId: item.goodNo,
16775
+ outerId: item.goodNo,
16776
+ skuSysId: item.specId,
16777
+ itemSysId: item.goodId,
16778
+ sysPicPath: item.goodPicUrl,
16779
+ payment: null,
16780
+ price: item.retailPrice,
16781
+ type: null,
16782
+ uuid: uuid(),
16783
+ canDelete: true,
16784
+ canEdit: true
16785
+ }, initParamsMap[type] || {});
16786
+ });
16787
+ };
16788
+ var processDefaultGoods = function processDefaultGoods(_ref7) {
16789
+ var list = _ref7.list,
16790
+ canUpdateNumber = _ref7.canUpdateNumber;
16791
+ return list.map(function (item) {
16792
+ var goodsId = item.goodsId,
16793
+ name = item.name,
16794
+ code = item.code,
16795
+ skuCode = item.skuCode,
16796
+ marketPrice = item.marketPrice,
16797
+ skuName = item.skuName;
16798
+ return {
16799
+ id: goodsId,
16800
+ mark: '是',
16801
+ pic: '',
16802
+ skuName: skuName,
16803
+ name: name,
16804
+ code: code,
16805
+ sku: skuCode,
16806
+ money: marketPrice || 0,
16807
+ share: marketPrice || 0,
16808
+ number: 1,
16809
+ type: '',
16810
+ uuid: uuid(),
16811
+ canDelete: true,
16812
+ canUpdateNumber: canUpdateNumber
16813
+ };
16814
+ });
16815
+ };
16816
+
15936
16817
  var GoodsModalMap = {
15937
16818
  WDT_REISSUE_GOODS: WdtGoodsModal,
15938
16819
  WDT_GOODS: WdtGoodsModal,
@@ -15942,10 +16823,13 @@ var GoodsModalMap = {
15942
16823
  BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
15943
16824
  GY_GOODS: GyGoodsModal$2,
15944
16825
  GY_REISSUE_GOODS: GyGoodsModal$2,
16826
+ GY_RETURN_GOODS: GyGoodsModal$2,
15945
16827
  JST_GOODS: JstGoodsModal,
15946
16828
  JST_REISSUE_GOODS: JstGoodsModal,
15947
16829
  JST_RETURN_GOODS: JstGoodsModal,
15948
16830
  JST_EXCHANGE_GOODS: JstGoodsModal,
16831
+ KM_GOODS: KmGoodsModal,
16832
+ KM_REISSUE_GOODS: KmGoodsModal,
15949
16833
  OTHER_GOODS: GoodsModal$2
15950
16834
  };
15951
16835
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
@@ -15979,7 +16863,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
15979
16863
  return item === null || item === void 0 ? void 0 : item[uniqueKey];
15980
16864
  }));
15981
16865
  var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
15982
- console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
16866
+ // console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
15983
16867
  onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
15984
16868
  };
15985
16869
  var rowSelection = {
@@ -16008,13 +16892,16 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
16008
16892
  };
16009
16893
  var getButtonText = function getButtonText() {
16010
16894
  var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
16895
+ if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
16896
+ return '选择快麦ERP商品';
16897
+ }
16011
16898
  if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
16012
16899
  return '选择百胜ERP商品';
16013
16900
  }
16014
16901
  if (['WDT_REISSUE_GOODS'].includes(type)) {
16015
16902
  return '选择旺店通商品';
16016
16903
  }
16017
- if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16904
+ if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
16018
16905
  return '选择管易ERP商品';
16019
16906
  }
16020
16907
  if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
@@ -16151,6 +17038,8 @@ var GoodItem$1 = function GoodItem(props) {
16151
17038
  case 'JST_RETURN_GOODS':
16152
17039
  case 'GY_REISSUE_GOODS':
16153
17040
  case 'GY_RETURN_GOODS':
17041
+ case 'KM_GOODS':
17042
+ case 'KM_REISSUE_GOODS':
16154
17043
  {
16155
17044
  columns = getColumnsMap$1({
16156
17045
  text: text,
@@ -16268,120 +17157,11 @@ var GoodItem$1 = function GoodItem(props) {
16268
17157
  }].concat(_toConsumableArray(columns));
16269
17158
  }, []);
16270
17159
  var onSubmit = function onSubmit(list) {
16271
- var newList = [];
16272
- if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
16273
- newList = list.map(function (item) {
16274
- item.uuid = uuid();
16275
- item.canDelete = true;
16276
- item.num = 1;
16277
- item.orderPrice = 0;
16278
- item.sharePrice = 0;
16279
- item.canUpdateNumber = canUpdateNumber;
16280
- if (type === 'WDT_EXCHANGE_GOODS') {
16281
- item.price = item.retailPrice;
16282
- item.type = '1';
16283
- }
16284
- return item;
16285
- });
16286
- } else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
16287
- newList = list.map(function (item) {
16288
- var specNo = item.specNo,
16289
- specId = item.specId,
16290
- goodName = item.goodName,
16291
- goodShortName = item.goodShortName,
16292
- goodPicUrl = item.goodPicUrl,
16293
- goodNo = item.goodNo,
16294
- goodId = item.goodId,
16295
- retailPrice = item.retailPrice;
16296
- return _objectSpread2(_objectSpread2({}, item), {}, {
16297
- sku: specNo,
16298
- skuId: specId,
16299
- goodsName: goodName,
16300
- goodsShortName: goodShortName,
16301
- picPath: goodPicUrl,
16302
- goodsSn: goodNo,
16303
- goodsId: goodId,
16304
- goodsPrice: retailPrice,
16305
- shopPrice: retailPrice,
16306
- sharePayment: '',
16307
- sharePrice: '',
16308
- payment: '',
16309
- tcSku: '',
16310
- tcGoodsNumber: '',
16311
- taoCanSingleSl: '',
16312
- isGift: '',
16313
- uuid: uuid(),
16314
- canDelete: true,
16315
- canEdit: true,
16316
- goodsNumber: 1,
16317
- canUpdateNumber: canUpdateNumber
16318
- });
16319
- });
16320
- } else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16321
- newList = list.map(function (item) {
16322
- var goodName = item.goodName,
16323
- goodShortName = item.goodShortName,
16324
- goodNo = item.goodNo,
16325
- specName = item.specName,
16326
- specNo = item.specNo,
16327
- retailPrice = item.retailPrice;
16328
- return _objectSpread2(_objectSpread2({}, item), {}, {
16329
- uuid: uuid(),
16330
- canDelete: true,
16331
- canEdit: true,
16332
- qty: 1,
16333
- goodName: goodName,
16334
- goodShortName: goodShortName,
16335
- goodNo: goodNo,
16336
- specName: specName,
16337
- specNo: specNo,
16338
- originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
16339
- originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
16340
- });
16341
- });
16342
- } else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
16343
- newList = list.map(function (item) {
16344
- return {
16345
- name: item.goodName,
16346
- skuId: item.goodNo,
16347
- iId: item.styleCode,
16348
- pic: item.goodPicUrl,
16349
- propertiesValue: item.propertiesValue,
16350
- saleBasePrice: item.retailPrice,
16351
- salePrice: item.retailPrice,
16352
- remark: '',
16353
- uuid: uuid(),
16354
- canDelete: true,
16355
- canEdit: true,
16356
- qty: 1
16357
- };
16358
- });
16359
- } else {
16360
- newList = list.map(function (item) {
16361
- var goodsId = item.goodsId,
16362
- name = item.name,
16363
- code = item.code,
16364
- skuCode = item.skuCode,
16365
- marketPrice = item.marketPrice,
16366
- skuName = item.skuName;
16367
- return {
16368
- id: goodsId,
16369
- mark: '是',
16370
- pic: '',
16371
- skuName: skuName,
16372
- name: name,
16373
- code: code,
16374
- sku: skuCode,
16375
- money: marketPrice || 0,
16376
- share: marketPrice || 0,
16377
- number: 1,
16378
- type: '',
16379
- uuid: uuid(),
16380
- canDelete: true,
16381
- canUpdateNumber: canUpdateNumber
16382
- };
16383
- });
16384
- }
17160
+ var newList = processGoods({
17161
+ list: list,
17162
+ canUpdateNumber: canUpdateNumber,
17163
+ type: type
17164
+ });
16385
17165
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
16386
17166
  };
16387
17167
  var onSelectChange = function onSelectChange(newSelectedRowKeys) {
@@ -17095,10 +17875,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
17095
17875
  var _data$data, _data$data$trades;
17096
17876
  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) {
17097
17877
  data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
17878
+ var _tradeStatusMap$data$;
17098
17879
  return _objectSpread2(_objectSpread2({}, item), {}, {
17099
17880
  billNo: item.tradeNo,
17100
17881
  billType: WDT_ORDER_TYPE_MAP[item.tradeType],
17101
- billTag: item.tagName
17882
+ billTag: item.tagName,
17883
+ tradeStatusValue: tradeStatusMap === null || tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
17102
17884
  });
17103
17885
  });
17104
17886
  }
@@ -17341,7 +18123,6 @@ var index$3 = (function (props) {
17341
18123
  } else if (type === 'BS_E3_SYSTEM_ORDER') {
17342
18124
  getBsE3OrderList(value.orderNo);
17343
18125
  } else if (type === 'GY_SYSTEM_ORDER') {
17344
- console.log('触发gy--getGyOrderList--1');
17345
18126
  getGyOrderList(value.orderNo);
17346
18127
  } else if (type === 'JST_SYSTEM_ORDER') {
17347
18128
  getJstOrderList(value.orderNo);
@@ -17455,11 +18236,13 @@ var index$3 = (function (props) {
17455
18236
  showOrderInfo: trades.map(function (_ref4) {
17456
18237
  var billNo = _ref4.billNo,
17457
18238
  billType = _ref4.billType,
17458
- billTag = _ref4.billTag;
18239
+ billTag = _ref4.billTag,
18240
+ tradeStatusValue = _ref4.tradeStatusValue;
17459
18241
  return {
17460
18242
  billNo: billNo,
17461
18243
  billType: billType,
17462
- billTag: billTag
18244
+ billTag: billTag,
18245
+ tradeStatusValue: tradeStatusValue
17463
18246
  };
17464
18247
  })
17465
18248
  }));
@@ -17769,6 +18552,31 @@ var componentMap$1 = {
17769
18552
  returnDeleteGood: 'jstReturnDeleteGood',
17770
18553
  exchangeDeleteGood: 'jstExchangeDeleteGood'
17771
18554
  }
18555
+ },
18556
+ KM_GOODS: {
18557
+ type: 'km',
18558
+ key: 'kmGoods',
18559
+ name: '快麦',
18560
+ orderNo: 'tid',
18561
+ goodDetailOrderNo: 'originalDealCode',
18562
+ eventNameMap: {
18563
+ // pubsub 事件
18564
+ type: 'kmType',
18565
+ updateGoodsHandle: updateKmGoodsHandle,
18566
+ selectListReturn: 'kmSelectListReturn',
18567
+ selectList: 'kmSelectList',
18568
+ reissueSelectList: 'kmReissueSelectList',
18569
+ reissueSelectListReturn: 'kmReissueSelectListReturn',
18570
+ reissueDeleteGood: 'kmReissueDeleteGood',
18571
+ changeShopCode: 'kmChangeShopCode',
18572
+ reissueType: 'kmReissueType',
18573
+ returnType: 'kmReturnType',
18574
+ returnSelectListReturn: 'kmReturnSelectListReturn',
18575
+ returnSelectList: 'kmReturnSelectList',
18576
+ deleteGood: 'kmDeleteGood',
18577
+ returnDeleteGood: 'kmReturnDeleteGood',
18578
+ exchangeDeleteGood: 'kmExchangeDeleteGood'
18579
+ }
17772
18580
  }
17773
18581
  };
17774
18582
  var CommonGoods = function CommonGoods(props) {
@@ -17777,7 +18585,7 @@ var CommonGoods = function CommonGoods(props) {
17777
18585
  disabled = props.disabled,
17778
18586
  onChange = props.onChange,
17779
18587
  compType = props.type;
17780
- console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
18588
+ // console.log('value?.orders', value?.orders);
17781
18589
  // 合并单订单会包含","
17782
18590
  var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
17783
18591
  var _order$componentMap$c;
@@ -17930,7 +18738,9 @@ var CommonGoods = function CommonGoods(props) {
17930
18738
  var getGoodDetails = function getGoodDetails(_ref2) {
17931
18739
  var mode = _ref2.mode;
17932
18740
  var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
17933
- var goodDetails = updateHandle(value.orders || []);
18741
+ var goodDetails = updateHandle(value.orders || [], {
18742
+ orderBackGoodsLevel: props.orderBackGoodsLevel
18743
+ });
17934
18744
  var orderNo = value.orderNo;
17935
18745
  return mode ? goodDetails.filter(function (goodItem) {
17936
18746
  var _componentMap$compTyp;
@@ -17984,7 +18794,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
17984
18794
  _props$reasonList = props.reasonList,
17985
18795
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17986
18796
  disabled = props.disabled,
17987
- compType = props.type;
18797
+ compType = props.type,
18798
+ isSettingConfig = props.isSettingConfig;
17988
18799
  var valueRef = useRef({});
17989
18800
  useEffect(function () {
17990
18801
  var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
@@ -18076,7 +18887,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
18076
18887
  var newValue = _objectSpread2({}, value);
18077
18888
  newValue[componentMap$2[compType].returnTypeKey] = val;
18078
18889
  newValue[componentMap$2[compType].valueKey] = [];
18079
- if (['2'].includes(val[0])) {
18890
+ if (isSettingConfig || ['2'].includes(val[0])) {
18080
18891
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18081
18892
  valueRef.current = newValue;
18082
18893
  }
@@ -18098,7 +18909,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
18098
18909
  style: {
18099
18910
  marginBottom: '8px'
18100
18911
  },
18101
- disabled: disabled,
18912
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
18102
18913
  allowClear: false,
18103
18914
  options: reasonList,
18104
18915
  value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
@@ -18280,7 +19091,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
18280
19091
  })));
18281
19092
  };
18282
19093
 
18283
- var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
19094
+ var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
18284
19095
  var typeMap$1 = {
18285
19096
  WDT_REISSUE_GOODS: {
18286
19097
  key: 'wdtReissueGoods',
@@ -18301,13 +19112,14 @@ var typeMap$1 = {
18301
19112
  }
18302
19113
  };
18303
19114
  var wdtReissue = function wdtReissue(props) {
18304
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
19115
+ var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
18305
19116
  var value = props.value,
18306
19117
  onChange = props.onChange,
18307
19118
  _props$reasonList = props.reasonList,
18308
19119
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
18309
19120
  disabled = props.disabled,
18310
19121
  type = props.type,
19122
+ isSettingConfig = props.isSettingConfig,
18311
19123
  other = _objectWithoutProperties(props, _excluded$i);
18312
19124
  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) {
18313
19125
  var _order$srcTid;
@@ -18371,11 +19183,13 @@ var wdtReissue = function wdtReissue(props) {
18371
19183
  var showOrderInfo = orders.map(function (_ref2) {
18372
19184
  var billNo = _ref2.billNo,
18373
19185
  billType = _ref2.billType,
18374
- billTag = _ref2.billTag;
19186
+ billTag = _ref2.billTag,
19187
+ tradeStatusValue = _ref2.tradeStatusValue;
18375
19188
  return {
18376
19189
  billNo: billNo,
18377
19190
  billType: billType,
18378
- billTag: billTag
19191
+ billTag: billTag,
19192
+ tradeStatusValue: tradeStatusValue
18379
19193
  };
18380
19194
  });
18381
19195
  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]) || {}), {}, {
@@ -18458,7 +19272,7 @@ var wdtReissue = function wdtReissue(props) {
18458
19272
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18459
19273
  };
18460
19274
  var selectedGoodsChange = useCallback(function (skuList) {
18461
- var _typeMap$type21, _typeMap$type22, _uniqBy, _typeMap$type23;
19275
+ var _typeMap$type21, _typeMap$type22, _uniqBy;
18462
19276
  var newValue = _objectSpread2({}, value);
18463
19277
  // 原订单商品
18464
19278
  var originTradeGoodList = getGoodDetails({
@@ -18469,14 +19283,14 @@ var wdtReissue = function wdtReissue(props) {
18469
19283
  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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
18470
19284
  return skuList.includes(item.uuid);
18471
19285
  });
18472
- 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)]);
19286
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
18473
19287
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18474
- }, [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]);
19288
+ }, [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]);
18475
19289
  //显示选择商品按钮 原单换不显示选择商品
18476
19290
  var showChangeBtn = useMemo(function () {
18477
- var _typeMap$type25;
18478
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
18479
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
19291
+ var _typeMap$type24;
19292
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
19293
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
18480
19294
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
18481
19295
  gutter: 8,
18482
19296
  wrap: true
@@ -18490,16 +19304,17 @@ var wdtReissue = function wdtReissue(props) {
18490
19304
  }
18491
19305
  }, /*#__PURE__*/React.createElement(Select, {
18492
19306
  style: {
18493
- marginBottom: '8px'
19307
+ marginBottom: '8px',
19308
+ width: '100%'
18494
19309
  },
18495
19310
  disabled: disabled,
18496
19311
  allowClear: false,
18497
- 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)],
19312
+ 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)],
18498
19313
  onChange: function onChange(val) {
18499
19314
  return changeSystemOrderHandle(val);
18500
19315
  },
18501
19316
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
18502
- }, ((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) {
19317
+ }, ((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) {
18503
19318
  return /*#__PURE__*/React.createElement(Select.Option, {
18504
19319
  key: item.billNo,
18505
19320
  value: item.billNo,
@@ -18515,12 +19330,13 @@ var wdtReissue = function wdtReissue(props) {
18515
19330
  }
18516
19331
  }, /*#__PURE__*/React.createElement(Cascader, {
18517
19332
  style: {
18518
- marginBottom: '8px'
19333
+ marginBottom: '8px',
19334
+ width: '100%'
18519
19335
  },
18520
- disabled: disabled,
19336
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
18521
19337
  allowClear: false,
18522
19338
  options: reasonList,
18523
- 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)],
19339
+ 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)],
18524
19340
  onChange: function onChange(val) {
18525
19341
  return changeTypeHandle(val);
18526
19342
  }
@@ -18532,7 +19348,7 @@ var wdtReissue = function wdtReissue(props) {
18532
19348
  canUpdateNumber: showChangeBtn,
18533
19349
  showChangeBtn: showChangeBtn,
18534
19350
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
18535
- 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)],
19351
+ 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)],
18536
19352
  onChange: function onChange(val) {
18537
19353
  return changeGoodHandle(val);
18538
19354
  },
@@ -18548,7 +19364,7 @@ var wdtReissue = function wdtReissue(props) {
18548
19364
  })));
18549
19365
  };
18550
19366
 
18551
- var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
19367
+ var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
18552
19368
  var typeMap$2 = {
18553
19369
  JST_REISSUE_GOODS: {
18554
19370
  compType: '补发',
@@ -18563,7 +19379,9 @@ var typeMap$2 = {
18563
19379
  orderTypeKey: 'orderType',
18564
19380
  oIdKey: 'oId',
18565
19381
  outerOiIdKey: '',
18566
- goodDetailsKey: 'items'
19382
+ goodDetailsKey: 'items',
19383
+ mergeIdenticalGoods: jstMergeIdenticalGoods,
19384
+ uniqueKey: 'uuid'
18567
19385
  },
18568
19386
  JST_RETURN_GOODS: {
18569
19387
  compType: '退货',
@@ -18579,6 +19397,8 @@ var typeMap$2 = {
18579
19397
  oIdKey: 'oId',
18580
19398
  outerOiIdKey: '',
18581
19399
  goodDetailsKey: 'items',
19400
+ mergeIdenticalGoods: jstMergeIdenticalGoods,
19401
+ uniqueKey: 'uuid',
18582
19402
  eventNameMap: {
18583
19403
  // pubsub 事件
18584
19404
  exchangeCopyGood: 'jstExchangeCopyGood',
@@ -18586,16 +19406,32 @@ var typeMap$2 = {
18586
19406
  returnGoodsSysorder: 'jstReturnGoodsSysorder',
18587
19407
  returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
18588
19408
  }
19409
+ },
19410
+ KM_REISSUE_GOODS: {
19411
+ compType: '补发',
19412
+ key: 'kmReissueGoods',
19413
+ typeName: 'kmReissueType',
19414
+ systemOrder: 'kmSystemOrder',
19415
+ systemOrderNo: 'kmSystemOrderNo',
19416
+ getOrderList: kmUtils.getOrderListSingleton,
19417
+ updateGoodsHandle: updateKmGoodsHandle,
19418
+ alwaysShowChooseErpGoodsBtn: true,
19419
+ orderTypeKey: 'orderType',
19420
+ oIdKey: 'billNo',
19421
+ outerOiIdKey: '',
19422
+ goodDetailsKey: 'subOrders',
19423
+ uniqueKey: 'id'
18589
19424
  }
18590
19425
  };
18591
19426
  var PublicReissue = function PublicReissue(props) {
18592
- 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;
19427
+ 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;
18593
19428
  var value = props.value,
18594
19429
  onChange = props.onChange,
18595
19430
  _props$reasonList = props.reasonList,
18596
19431
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
18597
19432
  disabled = props.disabled,
18598
19433
  type = props.type,
19434
+ isSettingConfig = props.isSettingConfig,
18599
19435
  other = _objectWithoutProperties(props, _excluded$j);
18600
19436
  var getOrderFlag = useRef(false);
18601
19437
  var _useState = useState(false),
@@ -18702,7 +19538,7 @@ var PublicReissue = function PublicReissue(props) {
18702
19538
  }))));
18703
19539
  };
18704
19540
  var getGoodDetails = function getGoodDetails(_ref4) {
18705
- var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
19541
+ var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
18706
19542
  var mode = _ref4.mode,
18707
19543
  sysOrderNo = _ref4.sysOrderNo;
18708
19544
  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];
@@ -18710,37 +19546,47 @@ var PublicReissue = function PublicReissue(props) {
18710
19546
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
18711
19547
  return order[typeMap$2[type].oIdKey] === systemOrderNo;
18712
19548
  });
18713
- var goodDetails = jstMergeIdenticalGoods((order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length) ? (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], true) : []);
19549
+ var orderRest = undefined;
19550
+ if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
19551
+ orderRest = true;
19552
+ } else if (type === 'KM_REISSUE_GOODS') {
19553
+ orderRest = {
19554
+ orderBackGoodsLevel: props.orderBackGoodsLevel,
19555
+ canEdit: true
19556
+ };
19557
+ }
19558
+ 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) : [];
18714
19559
  var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
18715
- return mode ? goodDetails.filter(function (goodItem) {
19560
+ var list = mode ? goodDetails.filter(function (goodItem) {
18716
19561
  return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
18717
19562
  }) : goodDetails;
19563
+ return list;
18718
19564
  };
18719
19565
  var changeGoodHandle = function changeGoodHandle(val) {
18720
- var _typeMap$type20;
19566
+ var _typeMap$type21;
18721
19567
  var newValue = _objectSpread2({}, value);
18722
- 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 || [];
19568
+ 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 || [];
18723
19569
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18724
19570
  };
18725
19571
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
18726
- var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
19572
+ var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
18727
19573
  var newValue = _objectSpread2({}, value);
18728
- 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;
18729
- 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) {
18730
- var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
18731
- 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) || [];
19574
+ 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;
19575
+ 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) {
19576
+ var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
19577
+ 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) || [];
18732
19578
  var targetOrder = val && orders.find(function (oItem) {
18733
- var _typeMap$type24;
18734
- return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
19579
+ var _typeMap$type25;
19580
+ return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
18735
19581
  });
18736
- 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];
18737
- }
18738
- 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])) {
18739
- var _typeMap$type28;
18740
- 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)] = [];
18741
- } 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])) {
18742
- var _typeMap$type30;
18743
- 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({
19582
+ 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];
19583
+ }
19584
+ 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])) {
19585
+ var _typeMap$type29;
19586
+ 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)] = [];
19587
+ } 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])) {
19588
+ var _typeMap$type31;
19589
+ 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({
18744
19590
  mode: isStrict,
18745
19591
  sysOrderNo: val
18746
19592
  });
@@ -18748,25 +19594,26 @@ var PublicReissue = function PublicReissue(props) {
18748
19594
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18749
19595
  };
18750
19596
  //显示选择商品按钮
18751
- 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]);
19597
+ 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]);
18752
19598
  var selectedGoodsChange = useCallback(function (skuList) {
18753
- var _typeMap$type32, _typeMap$type33, _uniqBy;
19599
+ var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
18754
19600
  var newValue = _objectSpread2({}, value);
18755
19601
  // 原订单商品
18756
19602
  var originTradeGoodList = getGoodDetails({
18757
19603
  mode: isStrict
18758
19604
  }) || [];
18759
19605
  // 当前选中的所有商品【包含了原订单+商品库】
18760
- 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)]) || [];
18761
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
18762
- return skuList.includes(item.uuid);
19606
+ 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)]) || [];
19607
+ 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 = 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) {
19608
+ var _typeMap$type36;
19609
+ 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]);
18763
19610
  });
18764
19611
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18765
- }, [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]);
19612
+ }, [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]);
18766
19613
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
18767
19614
  gutter: 8,
18768
19615
  wrap: true,
18769
- 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())
19616
+ 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())
18770
19617
  }, /*#__PURE__*/React.createElement(Col, {
18771
19618
  className: "gutter-row",
18772
19619
  xs: {
@@ -18777,16 +19624,17 @@ var PublicReissue = function PublicReissue(props) {
18777
19624
  }
18778
19625
  }, /*#__PURE__*/React.createElement(Select, {
18779
19626
  style: {
18780
- marginBottom: '8px'
19627
+ marginBottom: '8px',
19628
+ width: '100%'
18781
19629
  },
18782
19630
  disabled: disabled,
18783
19631
  allowClear: false,
18784
- 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)],
19632
+ 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)],
18785
19633
  onChange: function onChange(val) {
18786
19634
  return changeSystemOrderHandle(val);
18787
19635
  },
18788
- 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")
18789
- }, ((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) {
19636
+ 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")
19637
+ }, ((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) {
18790
19638
  return /*#__PURE__*/React.createElement(Select.Option, {
18791
19639
  key: item[typeMap$2[type].oIdKey],
18792
19640
  value: item[typeMap$2[type].oIdKey],
@@ -18802,16 +19650,17 @@ var PublicReissue = function PublicReissue(props) {
18802
19650
  }
18803
19651
  }, /*#__PURE__*/React.createElement(Cascader, {
18804
19652
  style: {
18805
- marginBottom: '8px'
19653
+ marginBottom: '8px',
19654
+ width: '100%'
18806
19655
  },
18807
- disabled: disabled,
19656
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
18808
19657
  allowClear: false,
18809
19658
  options: reasonList,
18810
- 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)],
19659
+ 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)],
18811
19660
  onChange: function onChange(val) {
18812
19661
  return changeTypeHandle(val);
18813
19662
  }
18814
- })), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.systemOrderBillType) && /*#__PURE__*/React.createElement(Col, {
19663
+ })), (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.createElement(Col, {
18815
19664
  className: "gutter-row",
18816
19665
  xs: {
18817
19666
  span: 11
@@ -18820,7 +19669,7 @@ var PublicReissue = function PublicReissue(props) {
18820
19669
  span: 6
18821
19670
  }
18822
19671
  }, /*#__PURE__*/React.createElement(Input, {
18823
- 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)],
19672
+ 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)],
18824
19673
  disabled: disabled,
18825
19674
  readOnly: true
18826
19675
  }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
@@ -18830,10 +19679,10 @@ var PublicReissue = function PublicReissue(props) {
18830
19679
  disabled: disabled,
18831
19680
  canUpdateNumber: showChangeBtn,
18832
19681
  showChangeBtn: showChangeBtn,
18833
- 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,
18834
- 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,
19682
+ 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,
19683
+ 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,
18835
19684
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
18836
- 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)],
19685
+ 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)],
18837
19686
  onChange: function onChange(val) {
18838
19687
  return changeGoodHandle(val);
18839
19688
  },
@@ -18844,6 +19693,7 @@ var PublicReissue = function PublicReissue(props) {
18844
19693
  originDataSource: getGoodDetails({
18845
19694
  mode: isStrict
18846
19695
  }),
19696
+ 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',
18847
19697
  selectedGoodsChange: selectedGoodsChange
18848
19698
  }
18849
19699
  })));
@@ -19604,6 +20454,39 @@ var MsgStatus = function MsgStatus(props) {
19604
20454
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
19605
20455
  };
19606
20456
 
20457
+ var _excluded$n = ["showOnly", "getOptionsAsync"];
20458
+ var AsyncSelect = function AsyncSelect(props) {
20459
+ var _props$showOnly = props.showOnly,
20460
+ showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
20461
+ getOptionsAsync = props.getOptionsAsync,
20462
+ otherProps = _objectWithoutProperties(props, _excluded$n);
20463
+ var _React$useState = React.useState([]),
20464
+ _React$useState2 = _slicedToArray(_React$useState, 2),
20465
+ data = _React$useState2[0],
20466
+ setData = _React$useState2[1];
20467
+ React.useEffect(function () {
20468
+ getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
20469
+ setData(list);
20470
+ });
20471
+ }, []);
20472
+ var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
20473
+ if (showOnly) {
20474
+ var selectedItem = options.find(function (option) {
20475
+ return option.value === props.value;
20476
+ });
20477
+ return selectedItem ? selectedItem.label : props.value;
20478
+ }
20479
+ return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
20480
+ showSearch: true,
20481
+ filterOption: function filterOption(input, option) {
20482
+ return option.label.includes(input);
20483
+ },
20484
+ notFoundContent: null
20485
+ }, otherProps), {}, {
20486
+ options: options
20487
+ }));
20488
+ };
20489
+
19607
20490
  var CalculationInput = function CalculationInput(props) {
19608
20491
  var _props$config = props.config,
19609
20492
  config = _props$config === void 0 ? {} : _props$config;
@@ -19622,7 +20505,7 @@ var CalculationInput = function CalculationInput(props) {
19622
20505
  }, config === null || config === void 0 ? void 0 : config.unit));
19623
20506
  };
19624
20507
 
19625
- var _excluded$n = ["value", "onChange", "reasonList", "disabled", "type"];
20508
+ var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
19626
20509
  var typeMap$3 = {
19627
20510
  BS_E3_REISSUE_GOODS: {
19628
20511
  key: 'bsE3ReissueGoods',
@@ -19640,7 +20523,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
19640
20523
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
19641
20524
  disabled = props.disabled,
19642
20525
  type = props.type,
19643
- other = _objectWithoutProperties(props, _excluded$n);
20526
+ isSettingConfig = props.isSettingConfig,
20527
+ other = _objectWithoutProperties(props, _excluded$o);
19644
20528
  var getOrderFlag = useRef(false);
19645
20529
  var valueRef = useRef(null);
19646
20530
  var _useState = useState(false),
@@ -19800,7 +20684,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
19800
20684
  }
19801
20685
  }, /*#__PURE__*/React.createElement(Select, {
19802
20686
  style: {
19803
- marginBottom: '8px'
20687
+ marginBottom: '8px',
20688
+ width: '100%'
19804
20689
  },
19805
20690
  disabled: disabled,
19806
20691
  allowClear: false,
@@ -19825,9 +20710,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
19825
20710
  }
19826
20711
  }, /*#__PURE__*/React.createElement(Cascader, {
19827
20712
  style: {
19828
- marginBottom: '8px'
20713
+ marginBottom: '8px',
20714
+ width: '100%'
19829
20715
  },
19830
- disabled: disabled,
20716
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
19831
20717
  allowClear: false,
19832
20718
  options: reasonList,
19833
20719
  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)],
@@ -19858,7 +20744,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
19858
20744
  })));
19859
20745
  };
19860
20746
 
19861
- var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type"],
20747
+ var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
19862
20748
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
19863
20749
  var typeMap$4 = {
19864
20750
  GY_REISSUE_GOODS: {
@@ -19880,14 +20766,15 @@ var typeMap$4 = {
19880
20766
  }
19881
20767
  };
19882
20768
  var GyReissue = function GyReissue(props) {
19883
- var _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
20769
+ var _typeMap$type27, _typeMap$type28, _typeMap$type29, _systemOrder$orders, _typeMap$type30, _value$typeMap$type$s5, _typeMap$type31, _typeMap$type32, _typeMap$type33;
19884
20770
  var value = props.value,
19885
20771
  onChange = props.onChange,
19886
20772
  _props$reasonList = props.reasonList,
19887
20773
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
19888
20774
  disabled = props.disabled,
19889
20775
  type = props.type,
19890
- other = _objectWithoutProperties(props, _excluded$o);
20776
+ isSettingConfig = props.isSettingConfig,
20777
+ other = _objectWithoutProperties(props, _excluded$p);
19891
20778
  // const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
19892
20779
  // order?.platformCode?.includes(';'),
19893
20780
  // );
@@ -20035,7 +20922,7 @@ var GyReissue = function GyReissue(props) {
20035
20922
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20036
20923
  };
20037
20924
  var selectedGoodsChange = useCallback(function (skuList) {
20038
- var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
20925
+ var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
20039
20926
  pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
20040
20927
  var newValue = _objectSpread2({}, valueRef.current || {});
20041
20928
  // 原订单商品
@@ -20047,21 +20934,15 @@ var GyReissue = function GyReissue(props) {
20047
20934
  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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
20048
20935
  return skuList.includes(item.uuid);
20049
20936
  });
20050
- 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)]);
20937
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
20051
20938
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20052
20939
  pushGyLog('afterSelectedGoodsChange', newValue);
20053
- }, [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]);
20940
+ }, [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]);
20054
20941
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
20055
- var showChangeBtn = useMemo(function () {
20056
- var _typeMap$type29;
20057
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
20058
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
20059
- return /*#__PURE__*/React.createElement("div", {
20060
- id: "TEST_GY",
20061
- onClick: function onClick() {
20062
- console.log('TEST_GY', value);
20063
- }
20064
- }, /*#__PURE__*/React.createElement(Row, {
20942
+ 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];
20943
+ 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]);
20944
+ var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
20945
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
20065
20946
  gutter: 8,
20066
20947
  wrap: true
20067
20948
  }, /*#__PURE__*/React.createElement(Col, {
@@ -20074,16 +20955,17 @@ var GyReissue = function GyReissue(props) {
20074
20955
  }
20075
20956
  }, /*#__PURE__*/React.createElement(Select, {
20076
20957
  style: {
20077
- marginBottom: '8px'
20958
+ marginBottom: '8px',
20959
+ width: '100%'
20078
20960
  },
20079
20961
  disabled: disabled,
20080
20962
  allowClear: false,
20081
- 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)],
20963
+ 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)],
20082
20964
  onChange: function onChange(val) {
20083
20965
  return changeSystemOrderHandle(val);
20084
20966
  },
20085
20967
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
20086
- }, ((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) {
20968
+ }, ((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) {
20087
20969
  return /*#__PURE__*/React.createElement(Select.Option, {
20088
20970
  key: item.billNo,
20089
20971
  value: item.billNo,
@@ -20099,12 +20981,13 @@ var GyReissue = function GyReissue(props) {
20099
20981
  }
20100
20982
  }, /*#__PURE__*/React.createElement(Cascader, {
20101
20983
  style: {
20102
- marginBottom: '8px'
20984
+ marginBottom: '8px',
20985
+ width: '100%'
20103
20986
  },
20104
- disabled: disabled,
20987
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
20105
20988
  allowClear: false,
20106
20989
  options: reasonList,
20107
- 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)],
20990
+ 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)],
20108
20991
  onChange: function onChange(val) {
20109
20992
  return changeTypeHandle(val);
20110
20993
  }
@@ -20115,8 +20998,10 @@ var GyReissue = function GyReissue(props) {
20115
20998
  disabled: disabled,
20116
20999
  canUpdateNumber: showChangeBtn,
20117
21000
  showChangeBtn: showChangeBtn,
21001
+ showErpGoodsBtn: showErpGoodsBtn,
21002
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20118
21003
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20119
- 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)],
21004
+ 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)],
20120
21005
  onChange: function onChange(val) {
20121
21006
  return changeGoodHandle(val);
20122
21007
  },
@@ -20131,7 +21016,7 @@ var GyReissue = function GyReissue(props) {
20131
21016
  })));
20132
21017
  };
20133
21018
 
20134
- var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type"],
21019
+ var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
20135
21020
  _excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
20136
21021
  var typeMap$5 = {
20137
21022
  GY_RETURN_GOODS: {
@@ -20153,14 +21038,15 @@ var typeMap$5 = {
20153
21038
  }
20154
21039
  };
20155
21040
  var GyReturnGoods = function GyReturnGoods(props) {
20156
- var _typeMap$type10, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
21041
+ var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
20157
21042
  var value = props.value,
20158
21043
  onChange = props.onChange,
20159
21044
  _props$reasonList = props.reasonList,
20160
21045
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
20161
21046
  disabled = props.disabled,
20162
21047
  type = props.type,
20163
- other = _objectWithoutProperties(props, _excluded$p);
21048
+ isSettingConfig = props.isSettingConfig,
21049
+ other = _objectWithoutProperties(props, _excluded$q);
20164
21050
  var valueRef = useRef({});
20165
21051
  var getOrderFlag = useRef(false);
20166
21052
  var _useState = useState(false),
@@ -20261,7 +21147,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20261
21147
  };
20262
21148
  }();
20263
21149
  var selectedGoodsChange = useCallback(function (skuList) {
20264
- var _typeMap$type7, _typeMap$type8, _uniqBy, _typeMap$type9;
21150
+ var _typeMap$type7, _typeMap$type8, _uniqBy;
20265
21151
  var newValue = _objectSpread2({}, value);
20266
21152
  // 原订单商品
20267
21153
  var originTradeGoodList = getGoodDetails({
@@ -20272,49 +21158,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
20272
21158
  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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
20273
21159
  return skuList.includes(item.uuid);
20274
21160
  });
20275
- 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)]);
21161
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
20276
21162
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20277
- }, [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]);
21163
+ }, [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]);
20278
21164
  var changeTypeHandle = function changeTypeHandle(val) {
20279
- var _value$typeMap$type$t, _typeMap$type11, _typeMap$type12;
21165
+ var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
20280
21166
  var typeName = val === null || val === void 0 ? void 0 : val[0];
20281
- 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;
21167
+ 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;
20282
21168
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
20283
21169
  var newValue = _objectSpread2({}, value);
20284
- newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
21170
+ newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
20285
21171
  if (typeName === '1') {
20286
- var _typeMap$type13;
20287
- newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
21172
+ var _typeMap$type12;
21173
+ newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
20288
21174
  mode: isStrict
20289
21175
  });
20290
21176
  } else if (typeName === '2') {
20291
- var _typeMap$type14;
21177
+ var _typeMap$type13;
20292
21178
  // 切换到非原单,清空列表
20293
- newValue[(_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
21179
+ newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
20294
21180
  }
20295
21181
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20296
21182
  };
20297
21183
  var changeGoodHandle = function changeGoodHandle(val) {
20298
- var _typeMap$type15;
21184
+ var _typeMap$type14;
20299
21185
  var newValue = _objectSpread2({}, value);
20300
- 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) {
20301
- var _typeMap$type16, _typeMap$type17;
20302
- 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;
20303
- 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;
21186
+ 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) {
21187
+ var _typeMap$type15, _typeMap$type16;
21188
+ 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;
21189
+ 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;
20304
21190
  return item;
20305
21191
  });
20306
21192
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20307
21193
  };
20308
21194
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
20309
- var _typeMap$type18, _value$typeMap$type$t2, _typeMap$type19, _value$typeMap$type$t3, _typeMap$type21;
21195
+ var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
20310
21196
  var newValue = _objectSpread2({}, value);
20311
- 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;
20312
- 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])) {
20313
- var _typeMap$type20;
20314
- 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)] = [];
20315
- } 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])) {
20316
- var _typeMap$type22;
20317
- 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({
21197
+ 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;
21198
+ 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])) {
21199
+ var _typeMap$type19;
21200
+ 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)] = [];
21201
+ } 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])) {
21202
+ var _typeMap$type21;
21203
+ 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({
20318
21204
  mode: isStrict,
20319
21205
  sysOrderNo: val
20320
21206
  });
@@ -20322,11 +21208,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
20322
21208
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20323
21209
  };
20324
21210
  var getGoodDetails = function getGoodDetails(_ref4) {
20325
- var _typeMap$type23, _typeMap$type24, _order$details;
21211
+ var _typeMap$type22, _typeMap$type23, _order$details;
20326
21212
  var mode = _ref4.mode,
20327
21213
  sysOrderNo = _ref4.sysOrderNo;
20328
- 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];
20329
- 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];
21214
+ 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];
21215
+ 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];
20330
21216
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
20331
21217
  return order.code === systemOrderNo;
20332
21218
  });
@@ -20337,19 +21223,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
20337
21223
  }) : goodDetails;
20338
21224
  };
20339
21225
  var handleModeChange = function handleModeChange(mode) {
20340
- var _value$typeMap$type$t4, _typeMap$type25, _typeMap$type26;
20341
- 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';
21226
+ var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
21227
+ 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';
20342
21228
  setIsStrict(mode);
20343
21229
  if (!isOriginalOrder) return;
20344
- 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({
21230
+ 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({
20345
21231
  mode: mode
20346
21232
  }))));
20347
21233
  };
20348
21234
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
20349
- var showChangeBtn = useMemo(function () {
20350
- var _typeMap$type27;
20351
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
20352
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
21235
+ 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];
21236
+ var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
21237
+ 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]);
20353
21238
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
20354
21239
  gutter: 8,
20355
21240
  wrap: true
@@ -20363,16 +21248,17 @@ var GyReturnGoods = function GyReturnGoods(props) {
20363
21248
  }
20364
21249
  }, /*#__PURE__*/React.createElement(Select, {
20365
21250
  style: {
20366
- marginBottom: '8px'
21251
+ marginBottom: '8px',
21252
+ width: '100%'
20367
21253
  },
20368
21254
  disabled: disabled,
20369
21255
  allowClear: false,
20370
- 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)],
21256
+ 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)],
20371
21257
  onChange: function onChange(val) {
20372
21258
  return changeSystemOrderHandle(val);
20373
21259
  },
20374
21260
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
20375
- }, ((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) {
21261
+ }, ((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) {
20376
21262
  return /*#__PURE__*/React.createElement(Select.Option, {
20377
21263
  key: item.billNo,
20378
21264
  value: item.billNo,
@@ -20388,12 +21274,13 @@ var GyReturnGoods = function GyReturnGoods(props) {
20388
21274
  }
20389
21275
  }, /*#__PURE__*/React.createElement(Cascader, {
20390
21276
  style: {
20391
- marginBottom: '8px'
21277
+ marginBottom: '8px',
21278
+ width: '100%'
20392
21279
  },
20393
- disabled: disabled,
21280
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
20394
21281
  allowClear: false,
20395
21282
  options: reasonList,
20396
- 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)],
21283
+ 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)],
20397
21284
  onChange: function onChange(val) {
20398
21285
  return changeTypeHandle(val);
20399
21286
  }
@@ -20405,13 +21292,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
20405
21292
  canUpdateNumber: showChangeBtn,
20406
21293
  showChangeBtn: showChangeBtn,
20407
21294
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20408
- 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)],
21295
+ 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)],
20409
21296
  onChange: function onChange(val) {
20410
21297
  return changeGoodHandle(val);
20411
21298
  },
20412
21299
  onModeChange: handleModeChange,
20413
21300
  isStrict: isStrict,
20414
- showErpGoodsBtn: false,
21301
+ showErpGoodsBtn: showErpGoodsBtn,
21302
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20415
21303
  tradeGoods: {
20416
21304
  originDataSource: getGoodDetails({
20417
21305
  mode: isStrict
@@ -20421,4 +21309,4 @@ var GyReturnGoods = function GyReturnGoods(props) {
20421
21309
  })));
20422
21310
  };
20423
21311
 
20424
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
21312
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$6 as getKmColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };