@kmkf-fe-packages/basic-components 2.2.44-beta.9 → 2.2.45

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,7 +3,7 @@ import { Cascader, DatePicker, Image, InputNumber, Input, Select, Upload, messag
3
3
  import { EyeOutlined, DeleteOutlined, CloseOutlined, PlusSquareOutlined, MinusCircleFilled, PlusCircleFilled, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, UpOutlined, DownOutlined, PlusOutlined, VideoCameraTwoTone } 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, JstAddressData, JkyAddressData, request as request$1, ExpressData, isNull, imgResize, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, kmSkuTypeMap, hasAddNullComponent, SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, findLabelBySelectValue, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterJyOrders, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, filterJkyOrders, JKY_ORDER_TYPE_MAP, JKY_ORDER_STATUS_MAP, filterKmOrders, getSystemShowHead, 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, JY_SYSTEM_ORDER_CONFIG, JKY_SYSTEM_ORDER_CONFIG, WDT_RETURN_BILL_NO_CONFIG, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, updateJyGoodsHandle, updateJkyGoodsHandle, updateWdtAftersaleGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, JstAddressData, request as request$1, ExpressData, isNull, imgResize, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, kmSkuTypeMap, hasAddNullComponent, SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, findLabelBySelectValue, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterJyOrders, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, filterKmOrders, getSystemShowHead, 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, JY_SYSTEM_ORDER_CONFIG, WDT_RETURN_BILL_NO_CONFIG, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, updateJyGoodsHandle, updateWdtAftersaleGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
7
7
  import every from 'lodash/every';
8
8
  import maxBy from 'lodash/maxBy';
9
9
  import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject as reject$1, intersection, isEmpty } from 'lodash';
@@ -7758,8 +7758,7 @@ var Province = function Province(props) {
7758
7758
  wdt: WdtAddressData.getInstance(),
7759
7759
  gy: GyAddressData.getInstance(),
7760
7760
  km: AddressData.getInstance(),
7761
- jst: JstAddressData.getInstance(),
7762
- jky: JkyAddressData.getInstance()
7761
+ jst: JstAddressData.getInstance()
7763
7762
  };
7764
7763
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
7765
7764
  options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
@@ -8455,10 +8454,7 @@ var processLogisticsTrajectory = function processLogisticsTrajectory(getValue) {
8455
8454
  var map = subFields.reduce(function (cur, nxt) {
8456
8455
  return nxt === 'trajectoryApiStatus' ? _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_trajectoryApiStatus")), {}))) : _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
8457
8456
  }, {});
8458
- var mapChild = subFields.reduce(function (cur, nxt) {
8459
- return nxt === 'trajectoryApiStatus' ? _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey, "_trajectoryApiStatus"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_trajectoryApiStatus")), {}))) : _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey, "_").concat(nxt), getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
8460
- }, {});
8461
- return _objectSpread2(_defineProperty({}, nex.uniqueKey, map), mapChild);
8457
+ return _defineProperty({}, nex.uniqueKey, map);
8462
8458
  };
8463
8459
  };
8464
8460
  var processLogisticsTrajectoryMore = function processLogisticsTrajectoryMore(getValue) {
@@ -8482,12 +8478,12 @@ var processItemSelectThird = function processItemSelectThird(getValue) {
8482
8478
  };
8483
8479
  var processEnterPrisePayment = function processEnterPrisePayment(getValue) {
8484
8480
  return function (nex, config) {
8485
- var _ref33;
8481
+ var _ref34;
8486
8482
  var subFields = ['enterprisePaymentAlipayNick', 'enterprisePaymentAlipayNo', 'enterprisePaymentBuyerNick', 'enterprisePaymentBuyerOpenUid', 'enterprisePaymentRefundFee', 'enterprisePaymentStatus', 'enterprisePaymentTid'];
8487
8483
  var map = subFields.reduce(function (cur, nxt) {
8488
8484
  return _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
8489
8485
  }, {});
8490
- return _ref33 = {}, _defineProperty(_ref33, nex.uniqueKey, map), _defineProperty(_ref33, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"))), _defineProperty(_ref33, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"))), _defineProperty(_ref33, "".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"))), _defineProperty(_ref33, "".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"))), _defineProperty(_ref33, "".concat(nex.uniqueKey, "_enterprisePaymentStatus"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentStatus"))), _defineProperty(_ref33, "".concat(nex.uniqueKey, "_enterprisePaymentTime"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTime"))), _defineProperty(_ref33, "".concat(nex.uniqueKey, "_enterprisePaymentTid"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTid"))), _ref33;
8486
+ return _ref34 = {}, _defineProperty(_ref34, nex.uniqueKey, map), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentStatus"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentStatus"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentTime"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTime"))), _defineProperty(_ref34, "".concat(nex.uniqueKey, "_enterprisePaymentTid"), getValue("".concat(nex.uniqueKey, "_enterprisePaymentTid"))), _ref34;
8491
8487
  };
8492
8488
  };
8493
8489
  var processJstLogistics = function processJstLogistics(getValue) {
@@ -9250,14 +9246,14 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
9250
9246
  };
9251
9247
  var processLabel = function processLabel(getValue) {
9252
9248
  return function (nex, config) {
9253
- var _ref73;
9254
- return _ref73 = {}, _defineProperty(_ref73, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref73, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref73;
9249
+ var _ref74;
9250
+ return _ref74 = {}, _defineProperty(_ref74, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref74, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref74;
9255
9251
  };
9256
9252
  };
9257
9253
  var processMemberLevel = function processMemberLevel(getValue) {
9258
9254
  return function (nex, config) {
9259
- var _ref74;
9260
- return _ref74 = {}, _defineProperty(_ref74, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref74, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref74;
9255
+ var _ref75;
9256
+ return _ref75 = {}, _defineProperty(_ref75, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref75, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref75;
9261
9257
  };
9262
9258
  };
9263
9259
  var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
@@ -9552,6 +9548,7 @@ var FileRender = function FileRender(_ref) {
9552
9548
  cursor: 'pointer'
9553
9549
  },
9554
9550
  onClick: function onClick(e) {
9551
+ console.log('onPreview');
9555
9552
  e.preventDefault();
9556
9553
  onPreview(item);
9557
9554
  },
@@ -9647,9 +9644,6 @@ var PictureRender = function PictureRender(_ref2) {
9647
9644
  }));
9648
9645
  }));
9649
9646
  };
9650
- var LogisticsCompanyRender = function LogisticsCompanyRender(value) {
9651
- return ExpressData.getInstance().getExpressNameByCode(value) || value;
9652
- };
9653
9647
  var MultipleSelectRender = function MultipleSelectRender(_ref5) {
9654
9648
  var _ref5$value = _ref5.value,
9655
9649
  value = _ref5$value === void 0 ? [] : _ref5$value;
@@ -9684,16 +9678,6 @@ var renderMap = {
9684
9678
  });
9685
9679
  }
9686
9680
  };
9687
- var renderSplitMap = {
9688
- //物流轨迹-物流公司
9689
- jbCFrJV4m7_trajectoryCompany: function jbCFrJV4m7_trajectoryCompany(value) {
9690
- return LogisticsCompanyRender(value);
9691
- },
9692
- //退货物流-物流公司
9693
- '0qFEv9GEyd_returnLogisticsCompany': function qFEv9GEyd_returnLogisticsCompany(value) {
9694
- return LogisticsCompanyRender(value);
9695
- }
9696
- };
9697
9681
  var EditPictureRender = function EditPictureRender(_ref6) {
9698
9682
  var _ref6$val = _ref6.val,
9699
9683
  val = _ref6$val === void 0 ? [] : _ref6$val,
@@ -9789,6 +9773,7 @@ var EditFileRender = function EditFileRender(_ref7) {
9789
9773
  var EditRenderMap = {
9790
9774
  INPUT: function INPUT(_ref8) {
9791
9775
  var val = _ref8.val,
9776
+ record = _ref8.record,
9792
9777
  index = _ref8.index,
9793
9778
  t = _ref8.t,
9794
9779
  updateHandle = _ref8.updateHandle,
@@ -9817,6 +9802,7 @@ var EditRenderMap = {
9817
9802
  },
9818
9803
  TEXTAREA: function TEXTAREA(_ref9) {
9819
9804
  var val = _ref9.val,
9805
+ record = _ref9.record,
9820
9806
  index = _ref9.index,
9821
9807
  t = _ref9.t,
9822
9808
  updateHandle = _ref9.updateHandle,
@@ -9845,6 +9831,7 @@ var EditRenderMap = {
9845
9831
  },
9846
9832
  PICTURE: function PICTURE(_ref10) {
9847
9833
  var val = _ref10.val,
9834
+ record = _ref10.record,
9848
9835
  index = _ref10.index,
9849
9836
  t = _ref10.t,
9850
9837
  updateHandle = _ref10.updateHandle,
@@ -9862,6 +9849,7 @@ var EditRenderMap = {
9862
9849
  },
9863
9850
  FILE: function FILE(_ref11) {
9864
9851
  var val = _ref11.val,
9852
+ record = _ref11.record,
9865
9853
  index = _ref11.index,
9866
9854
  t = _ref11.t,
9867
9855
  updateHandle = _ref11.updateHandle,
@@ -9879,6 +9867,7 @@ var EditRenderMap = {
9879
9867
  },
9880
9868
  RADIO: function RADIO(_ref12) {
9881
9869
  var val = _ref12.val,
9870
+ record = _ref12.record,
9882
9871
  index = _ref12.index,
9883
9872
  t = _ref12.t,
9884
9873
  updateHandle = _ref12.updateHandle,
@@ -9901,6 +9890,7 @@ var EditRenderMap = {
9901
9890
  },
9902
9891
  SELECT: function SELECT(_ref13) {
9903
9892
  var val = _ref13.val,
9893
+ record = _ref13.record,
9904
9894
  index = _ref13.index,
9905
9895
  t = _ref13.t,
9906
9896
  updateHandle = _ref13.updateHandle,
@@ -9923,6 +9913,7 @@ var EditRenderMap = {
9923
9913
  },
9924
9914
  CHECKBOX: function CHECKBOX(_ref14) {
9925
9915
  var val = _ref14.val,
9916
+ record = _ref14.record,
9926
9917
  index = _ref14.index,
9927
9918
  t = _ref14.t,
9928
9919
  updateHandle = _ref14.updateHandle,
@@ -9944,6 +9935,7 @@ var EditRenderMap = {
9944
9935
  },
9945
9936
  BASIC_MULT_SELECT: function BASIC_MULT_SELECT(_ref15) {
9946
9937
  var val = _ref15.val,
9938
+ record = _ref15.record,
9947
9939
  index = _ref15.index,
9948
9940
  t = _ref15.t,
9949
9941
  updateHandle = _ref15.updateHandle,
@@ -9962,57 +9954,6 @@ var EditRenderMap = {
9962
9954
  return updateHandle(e, index, t.key);
9963
9955
  }
9964
9956
  }));
9965
- },
9966
- DEFAULT: function DEFAULT(_ref16) {
9967
- var val = _ref16.val,
9968
- index = _ref16.index,
9969
- t = _ref16.t,
9970
- updateHandle = _ref16.updateHandle,
9971
- disabled = _ref16.disabled;
9972
- return !t.isEdit && !disabled ? /*#__PURE__*/React.createElement(Input, {
9973
- allowClear: true,
9974
- style: {
9975
- width: '100%'
9976
- },
9977
- value: val,
9978
- onChange: function onChange(e) {
9979
- var _e$target3;
9980
- return updateHandle(e === null || e === void 0 ? void 0 : (_e$target3 = e.target) === null || _e$target3 === void 0 ? void 0 : _e$target3.value, index, t.key);
9981
- }
9982
- }) : /*#__PURE__*/React.createElement("div", null, val);
9983
- }
9984
- };
9985
- var EditSplitRenderMap = {
9986
- jbCFrJV4m7_trajectoryCompany: function jbCFrJV4m7_trajectoryCompany(_ref17) {
9987
- var val = _ref17.val,
9988
- index = _ref17.index,
9989
- t = _ref17.t,
9990
- updateHandle = _ref17.updateHandle,
9991
- disabled = _ref17.disabled;
9992
- return /*#__PURE__*/React.createElement(ApaasLogistics, {
9993
- value: val,
9994
- allowClear: true,
9995
- onChange: function onChange(e) {
9996
- return updateHandle(e, index, t.key);
9997
- },
9998
- disabled: t.isEdit || disabled
9999
- });
10000
- },
10001
- //退货物流-物流公司
10002
- '0qFEv9GEyd_returnLogisticsCompany': function qFEv9GEyd_returnLogisticsCompany(_ref18) {
10003
- var val = _ref18.val,
10004
- index = _ref18.index,
10005
- t = _ref18.t,
10006
- updateHandle = _ref18.updateHandle,
10007
- disabled = _ref18.disabled;
10008
- return /*#__PURE__*/React.createElement(ApaasLogistics, {
10009
- value: val,
10010
- allowClear: true,
10011
- onChange: function onChange(e) {
10012
- return updateHandle(e, index, t.key);
10013
- },
10014
- disabled: t.isEdit || disabled
10015
- });
10016
9957
  }
10017
9958
  };
10018
9959
 
@@ -10040,7 +9981,6 @@ function HoverTableRowDeleteIcon(_ref) {
10040
9981
  }
10041
9982
 
10042
9983
  var WidgetMap = {
10043
- TRADE_ID_INPUT: 'tradeId',
10044
9984
  INPUT: 'input',
10045
9985
  TEXTAREA: 'textarea',
10046
9986
  PICTURE: 'picture',
@@ -10067,8 +10007,8 @@ var SubForm = function SubForm(props) {
10067
10007
  tableHeader = props.tableHeader,
10068
10008
  disabled = props.disabled,
10069
10009
  platform = props.platform,
10070
- maxCount = props.maxCount,
10071
- manual = props.manual;
10010
+ manual = props.manual,
10011
+ maxCount = props.maxCount;
10072
10012
  var ref = useRef(null);
10073
10013
  var isRequest = useRef(false);
10074
10014
  var _useState = useState(false),
@@ -10143,6 +10083,7 @@ var SubForm = function SubForm(props) {
10143
10083
  return deleteHandle(record.uuid);
10144
10084
  }
10145
10085
  });
10086
+ // return <div style={{ width: 25 }}>{index + 1}</div>;
10146
10087
  }
10147
10088
  }].concat(_toConsumableArray(newTableHeader.map(function (t) {
10148
10089
  return {
@@ -10155,41 +10096,27 @@ var SubForm = function SubForm(props) {
10155
10096
  ellipsis: true,
10156
10097
  width: t.width,
10157
10098
  render: function render(val, record, index) {
10158
- if (EditRenderMap[t.workOrderComponentType]) {
10159
- return EditRenderMap[t.workOrderComponentType]({
10160
- val: val,
10161
- record: record,
10162
- index: index,
10163
- t: t,
10164
- updateHandle: updateHandle,
10165
- disabled: disabled,
10166
- componentDto: componentDtoList.find(function (item) {
10167
- return item.uniqueKey === t.key;
10168
- }),
10169
- platform: platform
10170
- });
10171
- } else if (EditSplitRenderMap[t.key]) {
10172
- return EditSplitRenderMap[t.key]({
10173
- val: val,
10174
- index: index,
10175
- t: t,
10176
- updateHandle: updateHandle,
10177
- disabled: disabled
10178
- });
10179
- } else {
10180
- return EditRenderMap['DEFAULT']({
10181
- val: val,
10182
- record: record,
10183
- index: index,
10184
- t: t,
10185
- updateHandle: updateHandle,
10186
- disabled: disabled,
10187
- componentDto: componentDtoList.find(function (item) {
10188
- return item.uniqueKey === t.key;
10189
- }),
10190
- platform: platform
10191
- });
10192
- }
10099
+ return EditRenderMap[t.workOrderComponentType] ? EditRenderMap[t.workOrderComponentType]({
10100
+ val: val,
10101
+ record: record,
10102
+ index: index,
10103
+ t: t,
10104
+ updateHandle: updateHandle,
10105
+ disabled: disabled,
10106
+ componentDto: componentDtoList.find(function (item) {
10107
+ return item.uniqueKey === t.key;
10108
+ }),
10109
+ platform: platform
10110
+ }) : /*#__PURE__*/React.createElement(Input, {
10111
+ style: {
10112
+ width: '100%'
10113
+ },
10114
+ value: val,
10115
+ onChange: function onChange(e) {
10116
+ var _e$target;
10117
+ return updateHandle(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value, index, t.key);
10118
+ }
10119
+ });
10193
10120
  }
10194
10121
  };
10195
10122
  })), [disabled ? {} : {
@@ -10239,10 +10166,6 @@ var SubForm = function SubForm(props) {
10239
10166
  item.render = function (val) {
10240
10167
  return renderMap[t.workOrderComponentType](val, platform);
10241
10168
  };
10242
- } else if (renderSplitMap[t.key]) {
10243
- item.render = function (val) {
10244
- return renderSplitMap[t.key](val);
10245
- };
10246
10169
  }
10247
10170
  return item;
10248
10171
  })));
@@ -10257,11 +10180,7 @@ var SubForm = function SubForm(props) {
10257
10180
  if (['PICTURE', 'FILE', 'BASIC_MULT_SELECT', 'CHECKBOX'].includes(next.workOrderComponentType)) {
10258
10181
  item.defaultValue = [];
10259
10182
  }
10260
- if (!['LOGISTICS_TRAJECTORY', 'RETURN_LOGISTICS_SELECT'].includes(next.workOrderComponentType)) {
10261
- prv["".concat(next.key, "_").concat(WidgetMap[next.workOrderComponentType])] = item;
10262
- } else {
10263
- prv["".concat(next.key)] = item;
10264
- }
10183
+ prv["".concat(next.key, "_").concat(WidgetMap[next.workOrderComponentType])] = item;
10265
10184
  return prv;
10266
10185
  }, {});
10267
10186
  }, [newTableHeader]);
@@ -10278,7 +10197,7 @@ var SubForm = function SubForm(props) {
10278
10197
  }).map(function (item) {
10279
10198
  return {
10280
10199
  label: item.name,
10281
- value: WidgetMap[item.workOrderComponentType] ? "".concat(item.key, "_").concat(WidgetMap[item.workOrderComponentType]) : item.key
10200
+ value: "".concat(item.key, "_").concat(WidgetMap[item.workOrderComponentType])
10282
10201
  };
10283
10202
  });
10284
10203
  setSelectKey(options === null || options === void 0 ? void 0 : (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value);
@@ -10320,7 +10239,6 @@ var SubForm = function SubForm(props) {
10320
10239
  _ref2$componentList,
10321
10240
  componentList,
10322
10241
  params,
10323
- queryComponents,
10324
10242
  res,
10325
10243
  data,
10326
10244
  success,
@@ -10353,25 +10271,15 @@ var SubForm = function SubForm(props) {
10353
10271
  }]
10354
10272
  };
10355
10273
  if (selectKey && inputValue) {
10356
- queryComponents = [{
10274
+ params.queryComponents = [{
10357
10275
  key: 'flowStatus',
10358
10276
  symbol: 'in',
10359
10277
  value: flowStatus
10278
+ }, {
10279
+ key: selectKey,
10280
+ symbol: 'in',
10281
+ value: [inputValue]
10360
10282
  }];
10361
- if (['0qFEv9GEyd_returnLogisticsCode', 'jbCFrJV4m7_trajectoryCode'].includes(selectKey)) {
10362
- queryComponents.push({
10363
- key: selectKey,
10364
- symbol: 'like',
10365
- value: inputValue
10366
- });
10367
- } else {
10368
- queryComponents.push({
10369
- key: selectKey,
10370
- symbol: 'in',
10371
- value: [inputValue]
10372
- });
10373
- }
10374
- params.queryComponents = queryComponents;
10375
10283
  }
10376
10284
  _context.next = 7;
10377
10285
  return extendRequest('/qy/view/workOrderList', {
@@ -10567,21 +10475,7 @@ var SubForm = function SubForm(props) {
10567
10475
  placement: "bottom",
10568
10476
  visible: open,
10569
10477
  onVisibleChange: handleOpenChange
10570
- }, ['0qFEv9GEyd_returnLogisticsCompany', 'jbCFrJV4m7_trajectoryCompany'].includes(selectKey) ? /*#__PURE__*/React.createElement(ApaasLogistics, {
10571
- value: undefined,
10572
- onChange: function onChange(val) {
10573
- onChangeInput(val);
10574
- },
10575
- placeholder: "\u8BF7\u9009\u62E9\u7269\u6D41\u516C\u53F8",
10576
- showSearch: true,
10577
- allowClear: true,
10578
- style: {
10579
- width: '180px'
10580
- },
10581
- filterOption: function filterOption(input, option) {
10582
- return option.label.includes(input);
10583
- }
10584
- }) : /*#__PURE__*/React.createElement(Input, {
10478
+ }, /*#__PURE__*/React.createElement(Input, {
10585
10479
  placeholder: "\u8F93\u5165\u5173\u952E\u8BCD\u67E5\u8BE2",
10586
10480
  allowClear: true,
10587
10481
  onChange: function onChange(e) {
@@ -13557,7 +13451,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
13557
13451
  if (disabled) {
13558
13452
  return;
13559
13453
  }
13560
- if (['KYE', 'SF', 'ZTO'].includes(newCompany) && !(newCompany && trajectoryCode && trajectoryPhone)) {
13454
+ if (['SF', 'ZTO'].includes(newCompany) && !(newCompany && trajectoryCode && trajectoryPhone)) {
13561
13455
  return;
13562
13456
  } else if (!(newCompany && trajectoryCode)) {
13563
13457
  return;
@@ -13693,7 +13587,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
13693
13587
  value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
13694
13588
  });
13695
13589
  };
13696
- return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), ['SF', 'ZTO', 'KYE'].includes(value === null || value === void 0 ? void 0 : value.trajectoryCompany) ? LogisticsPhone(value === null || value === void 0 ? void 0 : value.trajectoryCompany) : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
13590
+ return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), ['SF', 'ZTO'].includes(value === null || value === void 0 ? void 0 : value.trajectoryCompany) ? LogisticsPhone(value === null || value === void 0 ? void 0 : value.trajectoryCompany) : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
13697
13591
  };
13698
13592
 
13699
13593
  var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
@@ -13949,7 +13843,7 @@ var jstGoods = function jstGoods(props) {
13949
13843
  changeIndex = _useState2[0],
13950
13844
  setChangeIndex = _useState2[1]; //选中的包裹
13951
13845
  var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
13952
- var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst', 'jy', 'jky'].includes(platformType);
13846
+ var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst', 'jy'].includes(platformType);
13953
13847
  var expressDateInstance = ExpressData.getInstance(platformType);
13954
13848
  var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
13955
13849
  useEffect(function () {
@@ -15321,223 +15215,6 @@ var jyColumns = [{
15321
15215
  }
15322
15216
  }];
15323
15217
 
15324
- var jkyColumns = [{
15325
- dataIndex: 'goodsNo',
15326
- title: "\u8D27\u54C1\u7F16\u53F7",
15327
- align: 'center',
15328
- ellipsis: true,
15329
- width: 150,
15330
- render: renderTextEllipsis
15331
- }, {
15332
- dataIndex: 'goodsName',
15333
- title: "\u8D27\u54C1\u540D\u79F0",
15334
- align: 'center',
15335
- ellipsis: true,
15336
- width: 150,
15337
- render: renderTextEllipsis
15338
- }, {
15339
- dataIndex: 'goodsId',
15340
- title: "\u8D27\u54C1ID",
15341
- align: 'center',
15342
- ellipsis: true,
15343
- width: 150,
15344
- render: renderTextEllipsis
15345
- }, {
15346
- dataIndex: 'barcode',
15347
- title: "\u8D27\u54C1\u6761\u7801",
15348
- align: 'center',
15349
- ellipsis: true,
15350
- width: 150,
15351
- render: renderTextEllipsis
15352
- }, {
15353
- dataIndex: 'specName',
15354
- title: "\u89C4\u683C\u540D\u79F0",
15355
- align: 'center',
15356
- ellipsis: true,
15357
- width: 150,
15358
- render: renderTextEllipsis
15359
- }, {
15360
- dataIndex: 'specId',
15361
- title: "\u89C4\u683CID",
15362
- align: 'center',
15363
- ellipsis: true,
15364
- width: 150,
15365
- render: renderTextEllipsis
15366
- }, {
15367
- dataIndex: 'skuImgUrl',
15368
- title: "\u89C4\u683C\u56FE\u7247",
15369
- align: 'center',
15370
- ellipsis: true,
15371
- width: 150,
15372
- render: function render(val) {
15373
- return /*#__PURE__*/React.createElement("img", {
15374
- style: {
15375
- width: '30px',
15376
- height: '30px',
15377
- objectFit: 'contain'
15378
- },
15379
- src: val
15380
- });
15381
- }
15382
- }, {
15383
- dataIndex: 'sellCount',
15384
- title: "\u6570\u91CF",
15385
- width: 100,
15386
- render: function render(val) {
15387
- return /*#__PURE__*/React.createElement("span", null, val);
15388
- }
15389
- }, {
15390
- dataIndex: 'actualSendCount',
15391
- title: "\u5B9E\u53D1\u6570\u91CF",
15392
- width: 150,
15393
- render: renderTextEllipsis
15394
- }, {
15395
- dataIndex: 'sellPrice',
15396
- title: "\u5355\u4EF7",
15397
- width: 150,
15398
- render: function render(val) {
15399
- return val || val === 0 ? Number(val).toFixed(2) : '';
15400
- }
15401
- }, {
15402
- dataIndex: 'sellTotal',
15403
- title: "\u91D1\u989D",
15404
- width: 150
15405
- }, {
15406
- dataIndex: 'discountTotal',
15407
- title: "\u62B5\u6263\u91D1\u989D",
15408
- width: 150
15409
- }, {
15410
- dataIndex: 'shareFavourableFee',
15411
- title: "\u5206\u644A\u91D1\u989D",
15412
- width: 150
15413
- }, {
15414
- dataIndex: 'shareFavourableAfterFee',
15415
- title: "\u5206\u644A\u540E\u91D1\u989D",
15416
- width: 150
15417
- }, {
15418
- dataIndex: 'customerPrice',
15419
- title: "\u7EC8\u7AEF\u9500\u552E\u5355\u4EF7",
15420
- width: 150
15421
- }, {
15422
- dataIndex: 'customerTotal',
15423
- title: "\u7EC8\u7AEF\u9500\u552E\u91D1\u989D",
15424
- width: 150
15425
- }, {
15426
- dataIndex: 'divideSellTotal',
15427
- title: "\u5B9E\u4ED8\u91D1\u989D",
15428
- width: 150
15429
- }, {
15430
- dataIndex: 'isGift',
15431
- title: "\u662F\u5426\u8D60\u54C1",
15432
- width: 150,
15433
- render: function render(val) {
15434
- return /*#__PURE__*/React.createElement("span", null, val === '1' ? '是' : '否');
15435
- }
15436
- }, {
15437
- dataIndex: 'isFit',
15438
- title: "\u662F\u5426\u7EC4\u5408\u88C5",
15439
- width: 150,
15440
- render: function render(val) {
15441
- return /*#__PURE__*/React.createElement("span", null, val === '1' ? '是' : '否');
15442
- }
15443
- }, {
15444
- dataIndex: 'isPresell',
15445
- title: "\u662F\u5426\u9884\u552E\u8D27\u54C1",
15446
- width: 150,
15447
- render: function render(val) {
15448
- return /*#__PURE__*/React.createElement("span", null, val === '1' ? '是' : '否');
15449
- }
15450
- }, {
15451
- dataIndex: 'brandName',
15452
- title: "\u54C1\u724C",
15453
- align: 'center',
15454
- ellipsis: true,
15455
- width: 200,
15456
- render: renderTextEllipsis
15457
- }, {
15458
- dataIndex: 'cateName',
15459
- title: "\u8D27\u54C1\u7C7B\u522B",
15460
- align: 'center',
15461
- ellipsis: true,
15462
- width: 150,
15463
- render: renderTextEllipsis
15464
- }, {
15465
- dataIndex: 'goodsTags',
15466
- title: "\u8D27\u54C1\u6807\u7B7E",
15467
- align: 'center',
15468
- ellipsis: true,
15469
- width: 250,
15470
- render: renderTextEllipsis
15471
- }, {
15472
- dataIndex: 'goodsMemo',
15473
- title: "\u8D27\u54C1\u5907\u6CE8",
15474
- align: 'center',
15475
- ellipsis: true,
15476
- width: 250,
15477
- render: renderTextEllipsis
15478
- }, {
15479
- dataIndex: 'tradeGoodsNo',
15480
- title: "\u4EA4\u6613\u8D27\u54C1\u7F16\u53F7",
15481
- align: 'center',
15482
- ellipsis: true,
15483
- width: 250,
15484
- render: renderTextEllipsis
15485
- }, {
15486
- dataIndex: 'tradeGoodsName',
15487
- title: "\u4EA4\u6613\u8D27\u54C1\u540D\u79F0",
15488
- ellipsis: true,
15489
- width: 250,
15490
- render: renderTextEllipsis
15491
- }, {
15492
- dataIndex: 'tradeGoodsSpec',
15493
- title: "\u4EA4\u6613\u89C4\u683C\u540D\u79F0",
15494
- ellipsis: true,
15495
- width: 250,
15496
- render: renderTextEllipsis
15497
- }, {
15498
- dataIndex: 'sourceSubtradeNo',
15499
- title: "\u7F51\u5E97\u5B50\u8BA2\u5355\u53F7",
15500
- ellipsis: true,
15501
- width: 250,
15502
- render: renderTextEllipsis
15503
- }, {
15504
- dataIndex: 'platGoodsId',
15505
- title: "\u5E73\u53F0\u5546\u54C1ID",
15506
- ellipsis: true,
15507
- width: 250,
15508
- render: renderTextEllipsis
15509
- }, {
15510
- dataIndex: 'subTradeId',
15511
- title: "\u5546\u54C1\u660E\u7EC6ID",
15512
- ellipsis: true,
15513
- width: 250,
15514
- render: renderTextEllipsis
15515
- }, {
15516
- dataIndex: 'batchNo',
15517
- title: "\u6279\u6B21\u53F7",
15518
- ellipsis: true,
15519
- width: 250,
15520
- render: renderTextEllipsis
15521
- }, {
15522
- dataIndex: 'sendCount',
15523
- title: "\u6279\u6B21\u6570\u91CF",
15524
- ellipsis: true,
15525
- width: 250,
15526
- render: renderTextEllipsis
15527
- }, {
15528
- dataIndex: 'productDate',
15529
- title: "\u751F\u4EA7\u65E5\u671F",
15530
- ellipsis: true,
15531
- width: 250,
15532
- render: renderTextEllipsis
15533
- }, {
15534
- dataIndex: 'expireDate',
15535
- title: "\u5230\u671F\u65E5\u671F",
15536
- ellipsis: true,
15537
- width: 250,
15538
- render: renderTextEllipsis
15539
- }];
15540
-
15541
15218
  var getColumnsMap = function getColumnsMap() {
15542
15219
  return cloneDeep({
15543
15220
  gy: gyColumns,
@@ -15545,8 +15222,7 @@ var getColumnsMap = function getColumnsMap() {
15545
15222
  wdt: wdtColumns,
15546
15223
  bse3: bse3Columns,
15547
15224
  km: kmColumns,
15548
- jy: jyColumns,
15549
- jky: jkyColumns
15225
+ jy: jyColumns
15550
15226
  });
15551
15227
  };
15552
15228
  var getColumnsBaseInfo = function getColumnsBaseInfo() {
@@ -18775,249 +18451,6 @@ var JyGoodsModal = function JyGoodsModal(props, ref) {
18775
18451
  };
18776
18452
  var JyGoodsModal$1 = /*#__PURE__*/forwardRef(JyGoodsModal);
18777
18453
 
18778
- var getTableData$6 = function getTableData(_ref, formData) {
18779
- var current = _ref.current,
18780
- pageSize = _ref.pageSize;
18781
- return extendRequest('/qy/gdfw/product/product/page', {
18782
- method: 'post',
18783
- data: _objectSpread2({
18784
- pageSize: pageSize,
18785
- pageNo: current,
18786
- platform: 'JY_ERP'
18787
- }, formData)
18788
- }).then(function (res) {
18789
- var _res$data = res.data,
18790
- _res$data$productSkuL = _res$data.productSkuList,
18791
- productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
18792
- _res$data$total = _res$data.total,
18793
- total = _res$data$total === void 0 ? 0 : _res$data$total;
18794
- var newProducts = productSkuList.map(function (item, index) {
18795
- return _objectSpread2({}, item);
18796
- });
18797
- return {
18798
- total: total,
18799
- list: newProducts
18800
- };
18801
- });
18802
- };
18803
- var searchFormData$5 = [{
18804
- label: '规格名称',
18805
- name: 'skuName',
18806
- dataIndex: 'specName'
18807
- }, {
18808
- label: '规格编码',
18809
- name: 'skuCode',
18810
- dataIndex: 'specNo'
18811
- }, {
18812
- label: '商品名称',
18813
- name: 'goodName'
18814
- }, {
18815
- label: '商品编码',
18816
- name: 'goodNo'
18817
- }];
18818
- var GoodList$6 = function GoodList(props, ref) {
18819
- var _useState = useState([]),
18820
- _useState2 = _slicedToArray(_useState, 2),
18821
- selectList = _useState2[0],
18822
- setSelect = _useState2[1];
18823
- var _useState3 = useState([]),
18824
- _useState4 = _slicedToArray(_useState3, 2),
18825
- selectIds = _useState4[0],
18826
- setSelectIds = _useState4[1];
18827
- var _useGetColumns = useGetColumns('jky'),
18828
- _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
18829
- columns = _useGetColumns2[0],
18830
- showColumnsDataIndexList = _useGetColumns2[1],
18831
- loading = _useGetColumns2[2];
18832
- useImperativeHandle(ref, function () {
18833
- return {
18834
- getSelectGoodList: function getSelectGoodList() {
18835
- return selectList;
18836
- }
18837
- };
18838
- });
18839
- var _Form$useForm = Form.useForm(),
18840
- _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
18841
- form = _Form$useForm2[0];
18842
- var _useAntdTable = useAntdTable(getTableData$6, {
18843
- defaultPageSize: 10,
18844
- form: form
18845
- }),
18846
- tableProps = _useAntdTable.tableProps,
18847
- search = _useAntdTable.search,
18848
- params = _useAntdTable.params;
18849
- var submit = search.submit,
18850
- reset = search.reset;
18851
- var rowSelection = {
18852
- selectedRowKeys: selectIds,
18853
- fixed: true,
18854
- onSelect: function onSelect(record, selected) {
18855
- if (selected) {
18856
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
18857
- setSelect([].concat(_toConsumableArray(selectList), [record]));
18858
- } else {
18859
- setSelectIds(selectIds.filter(function (t) {
18860
- return t !== record.id;
18861
- }));
18862
- setSelect(selectList.filter(function (t) {
18863
- return t.id !== record.id;
18864
- }));
18865
- }
18866
- },
18867
- onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
18868
- if (selected) {
18869
- setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
18870
- return t.id;
18871
- }))));
18872
- setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
18873
- } else {
18874
- setSelectIds(difference(selectIds, changeRows.map(function (t) {
18875
- return t.id;
18876
- })));
18877
- var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
18878
- return arrVal.id !== othVal.id;
18879
- });
18880
- setSelect(list);
18881
- }
18882
- },
18883
- getCheckboxProps: function getCheckboxProps(record) {
18884
- var options = {
18885
- disabled: (props.selectedRows || []).map(function (row) {
18886
- return row.id || row.specId;
18887
- }).includes(record.id || record.specId),
18888
- name: record.id
18889
- };
18890
- return options;
18891
- }
18892
- };
18893
- var showTable = function showTable() {
18894
- var handleDelete = function handleDelete(record) {
18895
- setSelectIds(selectIds.filter(function (t) {
18896
- return t !== record.id;
18897
- }));
18898
- setSelect(selectList.filter(function (t) {
18899
- return t.id !== record.id;
18900
- }));
18901
- };
18902
- var showColumns = [{
18903
- dataIndex: '',
18904
- title: "\u64CD\u4F5C",
18905
- ellipsis: true,
18906
- width: 100,
18907
- render: function render(val, record) {
18908
- return /*#__PURE__*/React.createElement(Button, {
18909
- type: "link",
18910
- onClick: function onClick() {
18911
- return handleDelete(record);
18912
- }
18913
- }, "\u5220\u9664");
18914
- }
18915
- }].concat(takeRight(columns, columns.length - 1));
18916
- return selectList.length ? /*#__PURE__*/React.createElement("div", {
18917
- style: {
18918
- width: '100%',
18919
- maxWidth: '387px'
18920
- }
18921
- }, /*#__PURE__*/React.createElement(Table, {
18922
- columns: showColumns,
18923
- rowKey: 'id',
18924
- dataSource: selectList,
18925
- scroll: {
18926
- x: '100%',
18927
- y: 250
18928
- },
18929
- pagination: {
18930
- size: 'small',
18931
- total: selectIds.length,
18932
- pageSize: 10,
18933
- showSizeChanger: false
18934
- }
18935
- })) : null;
18936
- };
18937
- return /*#__PURE__*/React.createElement(Skeleton, {
18938
- active: true,
18939
- loading: loading
18940
- }, /*#__PURE__*/React.createElement(SearchForm, {
18941
- searchFormData: searchFormData$5,
18942
- form: form,
18943
- showColumnsDataIndexList: showColumnsDataIndexList,
18944
- submit: submit,
18945
- reset: reset
18946
- }), /*#__PURE__*/React.createElement("div", {
18947
- style: {
18948
- marginTop: '4px'
18949
- }
18950
- }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
18951
- className: "GoodModalColumns",
18952
- rowSelection: rowSelection,
18953
- rowKey: "id",
18954
- columns: columns,
18955
- scroll: {
18956
- x: '100%',
18957
- y: 250
18958
- },
18959
- size: "small"
18960
- }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
18961
- getPopupContainer: function getPopupContainer(triggerNode) {
18962
- return triggerNode.parentElement;
18963
- },
18964
- content: showTable(),
18965
- title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
18966
- }, /*#__PURE__*/React.createElement(Button, {
18967
- danger: true,
18968
- type: "text"
18969
- }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
18970
- };
18971
- var JkyGoodsList = /*#__PURE__*/forwardRef(GoodList$6);
18972
-
18973
- var JkyGoodsModal = function JkyGoodsModal(props, ref) {
18974
- useImperativeHandle(ref, function () {
18975
- return {
18976
- open: function open(shopCode) {
18977
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
18978
- setVisible(true);
18979
- setSelectedRows(options.value || []);
18980
- }
18981
- };
18982
- });
18983
- var onSubmit = props.onSubmit,
18984
- width = props.width;
18985
- var _useState = useState(false),
18986
- _useState2 = _slicedToArray(_useState, 2),
18987
- visible = _useState2[0],
18988
- setVisible = _useState2[1];
18989
- var _useState3 = useState([]),
18990
- _useState4 = _slicedToArray(_useState3, 2),
18991
- selectedRows = _useState4[0],
18992
- setSelectedRows = _useState4[1];
18993
- var jkyGoodsListRef = useRef(null);
18994
- var _onCancel = function onCancel() {
18995
- setVisible(false);
18996
- };
18997
- var onOk = function onOk() {
18998
- var _jkyGoodsListRef$curr;
18999
- var selectedList = ((_jkyGoodsListRef$curr = jkyGoodsListRef.current) === null || _jkyGoodsListRef$curr === void 0 ? void 0 : _jkyGoodsListRef$curr.getSelectGoodList()) || [];
19000
- onSubmit(selectedList);
19001
- _onCancel();
19002
- };
19003
- return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
19004
- title: '选择商品',
19005
- okText: '确认',
19006
- cancelText: '取消',
19007
- visible: visible,
19008
- width: width || 850,
19009
- onCancel: function onCancel() {
19010
- _onCancel();
19011
- },
19012
- onOk: onOk,
19013
- wrapClassName: "goodModal"
19014
- }, /*#__PURE__*/React.createElement(JkyGoodsList, {
19015
- ref: jkyGoodsListRef,
19016
- selectedRows: selectedRows
19017
- })));
19018
- };
19019
- var JkyGoodsModal$1 = /*#__PURE__*/forwardRef(JkyGoodsModal);
19020
-
19021
18454
  var getColumns = function getColumns(_ref) {
19022
18455
  var _ref$text = _ref.text,
19023
18456
  disabled = _ref.disabled,
@@ -19603,8 +19036,7 @@ var getColumns$2 = function getColumns(_ref) {
19603
19036
  title: "\u5E73\u53F0\u89C4\u683CID",
19604
19037
  width: 180,
19605
19038
  align: 'center',
19606
- ellipsis: true,
19607
- render: renderTextEllipsis
19039
+ ellipsis: true
19608
19040
  }, {
19609
19041
  dataIndex: 'brandName',
19610
19042
  title: "\u54C1\u724C\u540D\u79F0",
@@ -19738,8 +19170,7 @@ var getColumns$2 = function getColumns(_ref) {
19738
19170
  title: "\u5E73\u53F0\u89C4\u683CID",
19739
19171
  width: 180,
19740
19172
  align: 'center',
19741
- ellipsis: true,
19742
- render: renderTextEllipsis
19173
+ ellipsis: true
19743
19174
  }, {
19744
19175
  dataIndex: 'brandName',
19745
19176
  title: "\u54C1\u724C\u540D\u79F0",
@@ -19878,8 +19309,7 @@ var getColumns$2 = function getColumns(_ref) {
19878
19309
  title: "\u5E73\u53F0\u89C4\u683CID",
19879
19310
  width: 180,
19880
19311
  align: 'center',
19881
- ellipsis: true,
19882
- render: renderTextEllipsis
19312
+ ellipsis: true
19883
19313
  }, {
19884
19314
  dataIndex: 'brandName',
19885
19315
  title: "\u54C1\u724C\u540D\u79F0",
@@ -20056,8 +19486,7 @@ var getColumns$2 = function getColumns(_ref) {
20056
19486
  title: "\u5E73\u53F0\u89C4\u683CID",
20057
19487
  width: 180,
20058
19488
  align: 'center',
20059
- ellipsis: true,
20060
- render: renderTextEllipsis
19489
+ ellipsis: true
20061
19490
  }, {
20062
19491
  dataIndex: 'brandName',
20063
19492
  title: "\u54C1\u724C\u540D\u79F0",
@@ -21009,7 +20438,7 @@ var getColumns$5 = function getColumns() {
21009
20438
  ellipsis: true,
21010
20439
  align: 'center',
21011
20440
  render: function render(val, record, index) {
21012
- return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
20441
+ return (record.qty || 0) * (+record.salePrice || 0);
21013
20442
  }
21014
20443
  }, {
21015
20444
  dataIndex: 'batchId',
@@ -21297,7 +20726,7 @@ var getColumns$5 = function getColumns() {
21297
20726
  dataIndex: 'saleAmount',
21298
20727
  title: '总金额',
21299
20728
  render: function render(val, record) {
21300
- return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
20729
+ return (record.qty || 0) * (+record.salePrice || 0);
21301
20730
  }
21302
20731
  }, {
21303
20732
  dataIndex: 'batchId',
@@ -21412,7 +20841,7 @@ var getColumns$5 = function getColumns() {
21412
20841
  dataIndex: 'saleAmount',
21413
20842
  title: '总金额',
21414
20843
  render: function render(val, record) {
21415
- return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
20844
+ return (record.qty || 0) * (+record.salePrice || 0);
21416
20845
  }
21417
20846
  }, {
21418
20847
  dataIndex: 'isGift',
@@ -21677,10 +21106,9 @@ var getColumns$6 = function getColumns(_ref) {
21677
21106
  title: "\u5546\u54C1\u56FE\u7247",
21678
21107
  width: 100,
21679
21108
  render: function render(val) {
21680
- var imgUrl = (val === null || val === void 0 ? void 0 : val.startsWith('http')) ? val : "https://erp.superboss.cc".concat(val);
21681
21109
  return /*#__PURE__*/React.createElement(Image, {
21682
21110
  width: 30,
21683
- src: imgUrl
21111
+ src: val
21684
21112
  });
21685
21113
  }
21686
21114
  }, {
@@ -21729,16 +21157,6 @@ var getColumns$6 = function getColumns(_ref) {
21729
21157
  title: "\u5546\u54C1\u7C7B\u578B",
21730
21158
  width: 150,
21731
21159
  render: renderTextEllipsis
21732
- }, {
21733
- dataIndex: 'supplierName',
21734
- title: "\u4F9B\u5E94\u5546\u540D\u79F0",
21735
- width: 150,
21736
- render: renderTextEllipsis
21737
- }, {
21738
- dataIndex: 'supplierCode',
21739
- title: "\u4F9B\u5E94\u5546\u7F16\u7801",
21740
- width: 150,
21741
- render: renderTextEllipsis
21742
21160
  }].map(function (item) {
21743
21161
  return _objectSpread2(_objectSpread2({}, item), {}, {
21744
21162
  align: 'center',
@@ -21866,25 +21284,14 @@ var getColumns$6 = function getColumns(_ref) {
21866
21284
  title: "\u5546\u54C1\u7C7B\u578B",
21867
21285
  width: 150,
21868
21286
  render: renderTextEllipsis
21869
- }, {
21870
- dataIndex: 'supplierName',
21871
- title: "\u4F9B\u5E94\u5546\u540D\u79F0",
21872
- width: 150,
21873
- render: renderTextEllipsis
21874
- }, {
21875
- dataIndex: 'supplierCode',
21876
- title: "\u4F9B\u5E94\u5546\u7F16\u7801",
21877
- width: 150,
21878
- render: renderTextEllipsis
21879
21287
  }, {
21880
21288
  dataIndex: 'sysPicPath',
21881
21289
  title: "\u5546\u54C1\u56FE\u7247",
21882
21290
  width: 100,
21883
21291
  render: function render(val) {
21884
- var imgUrl = (val === null || val === void 0 ? void 0 : val.startsWith('http')) ? val : "https://erp.superboss.cc".concat(val);
21885
21292
  return /*#__PURE__*/React.createElement(Image, {
21886
21293
  width: 30,
21887
- src: imgUrl
21294
+ src: val
21888
21295
  });
21889
21296
  }
21890
21297
  }].map(function (item) {
@@ -21959,7 +21366,23 @@ var getColumns$7 = function getColumns(_ref) {
21959
21366
  ellipsis: true,
21960
21367
  width: 150,
21961
21368
  render: renderTextEllipsis
21962
- }, {
21369
+ },
21370
+ // {
21371
+ // dataIndex: 'goodsName',
21372
+ // title: `货品名称`,
21373
+ // width: 250,
21374
+ // },
21375
+ // {
21376
+ // dataIndex: 'goodsCode',
21377
+ // title: `货品编号`,
21378
+ // width: 200,
21379
+ // },
21380
+ // {
21381
+ // dataIndex: 'goodsId',
21382
+ // title: `货品ID`,
21383
+ // width: 150,
21384
+ // },
21385
+ {
21963
21386
  dataIndex: 'goodsClass',
21964
21387
  title: "\u8D27\u54C1\u7C7B\u522B",
21965
21388
  width: 150,
@@ -22296,12 +21719,6 @@ var getColumns$7 = function getColumns(_ref) {
22296
21719
  width: 150,
22297
21720
  render: function render(val, record, index) {
22298
21721
  return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
22299
- dropdownStyle: {
22300
- zIndex: 2000
22301
- },
22302
- getPopupContainer: function getPopupContainer() {
22303
- return document.body;
22304
- },
22305
21722
  value: val,
22306
21723
  onChange: function onChange(value) {
22307
21724
  updateHandle(value, index, 'bfit');
@@ -22331,12 +21748,6 @@ var getColumns$7 = function getColumns(_ref) {
22331
21748
  width: 150,
22332
21749
  render: function render(val, record, index) {
22333
21750
  return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
22334
- dropdownStyle: {
22335
- zIndex: 2000
22336
- },
22337
- getPopupContainer: function getPopupContainer() {
22338
- return document.body;
22339
- },
22340
21751
  value: val,
22341
21752
  onChange: function onChange(value) {
22342
21753
  updateHandle(value, index, 'gift');
@@ -22401,518 +21812,16 @@ var getColumns$8 = function getColumns(_ref) {
22401
21812
  };
22402
21813
  };
22403
21814
 
22404
- var isNumberOrNumberString$3 = function isNumberOrNumberString(value) {
22405
- if (typeof value === 'number') return true;
22406
- if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
22407
- return false;
22408
- };
22409
- function toNum$5(value) {
22410
- if (typeof value === 'string') {
22411
- return value ? +value : void 0;
22412
- }
22413
- if (typeof value === 'number') {
22414
- return value;
22415
- }
22416
- return void 0;
22417
- }
22418
21815
  var getColumns$9 = function getColumns(_ref) {
22419
21816
  var _ref$text = _ref.text,
21817
+ text = _ref$text === void 0 ? '' : _ref$text,
22420
21818
  disabled = _ref.disabled,
22421
- updateHandle = _ref.updateHandle,
22422
- updateDataHandle = _ref.updateDataHandle;
21819
+ updateHandle = _ref.updateHandle;
22423
21820
  return {
22424
- //吉客云商品信息
22425
- JKY_GOODS: [{
22426
- dataIndex: 'goodsNo',
22427
- title: "\u8D27\u54C1\u7F16\u53F7",
22428
- align: 'center',
22429
- ellipsis: true,
22430
- width: 150,
22431
- render: renderTextEllipsis
22432
- }, {
22433
- dataIndex: 'goodsName',
22434
- title: "\u8D27\u54C1\u540D\u79F0",
22435
- align: 'center',
22436
- ellipsis: true,
22437
- width: 150,
22438
- render: renderTextEllipsis
22439
- }, {
22440
- dataIndex: 'goodsId',
22441
- title: "\u8D27\u54C1ID",
22442
- align: 'center',
22443
- ellipsis: true,
22444
- width: 150,
22445
- render: renderTextEllipsis
22446
- }, {
22447
- dataIndex: 'barcode',
22448
- title: "\u8D27\u54C1\u6761\u7801",
22449
- align: 'center',
22450
- ellipsis: true,
22451
- width: 150,
22452
- render: renderTextEllipsis
22453
- }, {
22454
- dataIndex: 'specName',
22455
- title: "\u89C4\u683C\u540D\u79F0",
22456
- align: 'center',
22457
- ellipsis: true,
22458
- width: 150,
22459
- render: renderTextEllipsis
22460
- }, {
22461
- dataIndex: 'specId',
22462
- title: "\u89C4\u683CID",
22463
- align: 'center',
22464
- ellipsis: true,
22465
- width: 150,
22466
- render: renderTextEllipsis
22467
- }, {
22468
- dataIndex: 'skuImgUrl',
22469
- title: "\u89C4\u683C\u56FE\u7247",
22470
- align: 'center',
22471
- ellipsis: true,
22472
- width: 150,
22473
- render: function render(val) {
22474
- return /*#__PURE__*/React.createElement(ApaasImage, {
22475
- width: 30,
22476
- src: val
22477
- });
22478
- }
22479
- }, {
22480
- dataIndex: 'sellCount',
22481
- title: "\u6570\u91CF",
22482
- width: 100,
22483
- render: function render(val, record, index) {
22484
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
22485
- style: {
22486
- width: 70
22487
- },
22488
- value: val,
22489
- min: 1,
22490
- precision: 0,
22491
- onChange: function onChange(num) {
22492
- updateDataHandle({
22493
- sellCount: num,
22494
- sellTotal: num && isNumberOrNumberString$3(record.sellPrice) ? num * record.sellPrice : null
22495
- }, index);
22496
- }
22497
- }) : /*#__PURE__*/React.createElement("span", null, val);
22498
- }
22499
- }, {
22500
- dataIndex: 'actualSendCount',
22501
- title: "\u5B9E\u53D1\u6570\u91CF",
22502
- width: 150,
22503
- render: renderTextEllipsis
22504
- }, {
22505
- dataIndex: 'sellPrice',
22506
- title: "\u5355\u4EF7",
22507
- width: 150,
22508
- render: function render(val, record, index) {
22509
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
22510
- style: {
22511
- width: 130
22512
- },
22513
- value: val,
22514
- min: 0,
22515
- precision: 2,
22516
- onChange: function onChange(num) {
22517
- updateDataHandle({
22518
- sellPrice: num,
22519
- sellTotal: num && isNumberOrNumberString$3(record.sellCount) ? num * record.sellCount : null
22520
- }, index);
22521
- }
22522
- }) : /*#__PURE__*/React.createElement("span", null, val);
22523
- }
22524
- }, {
22525
- dataIndex: 'sellTotal',
22526
- title: "\u91D1\u989D",
22527
- width: 150
22528
- }, {
22529
- dataIndex: 'discountTotal',
22530
- title: "\u62B5\u6263\u91D1\u989D",
22531
- width: 150
22532
- }, {
22533
- dataIndex: 'shareFavourableFee',
22534
- title: "\u5206\u644A\u91D1\u989D",
22535
- width: 150
22536
- }, {
22537
- dataIndex: 'shareFavourableAfterFee',
22538
- title: "\u5206\u644A\u540E\u91D1\u989D",
22539
- width: 150
22540
- }, {
22541
- dataIndex: 'customerPrice',
22542
- title: "\u7EC8\u7AEF\u9500\u552E\u5355\u4EF7",
22543
- width: 150
22544
- }, {
22545
- dataIndex: 'customerTotal',
22546
- title: "\u7EC8\u7AEF\u9500\u552E\u91D1\u989D",
22547
- width: 150
22548
- }, {
22549
- dataIndex: 'divideSellTotal',
22550
- title: "\u5B9E\u4ED8\u91D1\u989D",
22551
- width: 150
22552
- }, {
22553
- dataIndex: 'isGift',
22554
- title: "\u662F\u5426\u8D60\u54C1",
22555
- width: 150,
22556
- render: function render(val, record, index) {
22557
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
22558
- dropdownStyle: {
22559
- zIndex: 2000
22560
- },
22561
- getPopupContainer: function getPopupContainer() {
22562
- return document.body;
22563
- },
22564
- value: val,
22565
- onChange: function onChange(value) {
22566
- updateHandle(value, index, 'isGift');
22567
- },
22568
- options: [{
22569
- label: '是',
22570
- value: '1'
22571
- }, {
22572
- label: '否',
22573
- value: '0'
22574
- }]
22575
- }) : /*#__PURE__*/React.createElement("span", null, val === '1' ? '是' : '否');
22576
- }
22577
- }, {
22578
- dataIndex: 'isFit',
22579
- title: "\u662F\u5426\u7EC4\u5408\u88C5",
22580
- width: 150,
22581
- render: function render(val, record, index) {
22582
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
22583
- dropdownStyle: {
22584
- zIndex: 2000
22585
- },
22586
- getPopupContainer: function getPopupContainer() {
22587
- return document.body;
22588
- },
22589
- value: val,
22590
- onChange: function onChange(value) {
22591
- updateHandle(value, index, 'isFit');
22592
- },
22593
- options: [{
22594
- label: '是',
22595
- value: '1'
22596
- }, {
22597
- label: '否',
22598
- value: '0'
22599
- }]
22600
- }) : /*#__PURE__*/React.createElement("span", null, val === '1' ? '是' : '否');
22601
- }
22602
- }, {
22603
- dataIndex: 'isPresell',
22604
- title: "\u662F\u5426\u9884\u552E\u8D27\u54C1",
22605
- width: 150,
22606
- render: function render(val, record, index) {
22607
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
22608
- dropdownStyle: {
22609
- zIndex: 2000
22610
- },
22611
- getPopupContainer: function getPopupContainer() {
22612
- return document.body;
22613
- },
22614
- value: val,
22615
- onChange: function onChange(value) {
22616
- updateHandle(value, index, 'isPresell');
22617
- },
22618
- options: [{
22619
- label: '是',
22620
- value: '1'
22621
- }, {
22622
- label: '否',
22623
- value: '0'
22624
- }]
22625
- }) : /*#__PURE__*/React.createElement("span", null, val === '1' ? '是' : '否');
22626
- }
22627
- }, {
22628
- dataIndex: 'brandName',
22629
- title: "\u54C1\u724C",
22630
- align: 'center',
22631
- ellipsis: true,
22632
- width: 200,
22633
- render: renderTextEllipsis
22634
- }, {
22635
- dataIndex: 'cateName',
22636
- title: "\u8D27\u54C1\u7C7B\u522B",
22637
- align: 'center',
22638
- ellipsis: true,
22639
- width: 150,
22640
- render: renderTextEllipsis
22641
- }, {
22642
- dataIndex: 'goodsTags',
22643
- title: "\u8D27\u54C1\u6807\u7B7E",
22644
- align: 'center',
22645
- ellipsis: true,
22646
- width: 250,
22647
- render: renderTextEllipsis
22648
- }, {
22649
- dataIndex: 'goodsMemo',
22650
- title: "\u8D27\u54C1\u5907\u6CE8",
22651
- align: 'center',
22652
- ellipsis: true,
22653
- width: 250,
22654
- render: renderTextEllipsis
22655
- }, {
22656
- dataIndex: 'tradeGoodsNo',
22657
- title: "\u4EA4\u6613\u8D27\u54C1\u7F16\u53F7",
22658
- align: 'center',
22659
- ellipsis: true,
22660
- width: 250,
22661
- render: renderTextEllipsis
22662
- }, {
22663
- dataIndex: 'tradeGoodsName',
22664
- title: "\u4EA4\u6613\u8D27\u54C1\u540D\u79F0",
22665
- ellipsis: true,
22666
- width: 250,
22667
- render: renderTextEllipsis
22668
- }, {
22669
- dataIndex: 'tradeGoodsSpec',
22670
- title: "\u4EA4\u6613\u89C4\u683C\u540D\u79F0",
22671
- ellipsis: true,
22672
- width: 250,
22673
- render: renderTextEllipsis
22674
- }, {
22675
- dataIndex: 'sourceSubtradeNo',
22676
- title: "\u7F51\u5E97\u5B50\u8BA2\u5355\u53F7",
22677
- ellipsis: true,
22678
- width: 250,
22679
- render: renderTextEllipsis
22680
- }, {
22681
- dataIndex: 'platGoodsId',
22682
- title: "\u5E73\u53F0\u5546\u54C1ID",
22683
- ellipsis: true,
22684
- width: 250,
22685
- render: renderTextEllipsis
22686
- }, {
22687
- dataIndex: 'subTradeId',
22688
- title: "\u5546\u54C1\u660E\u7EC6ID",
22689
- ellipsis: true,
22690
- width: 250,
22691
- render: renderTextEllipsis
22692
- }, {
22693
- dataIndex: 'batchNo',
22694
- title: "\u6279\u6B21\u53F7",
22695
- ellipsis: true,
22696
- width: 250,
22697
- render: renderTextEllipsis
22698
- }, {
22699
- dataIndex: 'sendCount',
22700
- title: "\u6279\u6B21\u6570\u91CF",
22701
- ellipsis: true,
22702
- width: 250,
22703
- render: renderTextEllipsis
22704
- }, {
22705
- dataIndex: 'productDate',
22706
- title: "\u751F\u4EA7\u65E5\u671F",
22707
- ellipsis: true,
22708
- width: 250,
22709
- render: renderTextEllipsis
22710
- }, {
22711
- dataIndex: 'expireDate',
22712
- title: "\u5230\u671F\u65E5\u671F",
22713
- ellipsis: true,
22714
- width: 250,
22715
- render: renderTextEllipsis
22716
- }].map(function (item) {
22717
- return _objectSpread2(_objectSpread2({}, item), {}, {
22718
- align: 'center',
22719
- ellipsis: true
22720
- });
22721
- }),
22722
- // 吉客云补发商品信息
22723
- JKY_REISSUE_GOODS: [{
22724
- dataIndex: 'goodsNo',
22725
- title: "\u8D27\u54C1\u7F16\u53F7",
22726
- align: 'center',
22727
- ellipsis: true,
22728
- width: 150,
22729
- render: renderTextEllipsis
22730
- }, {
22731
- dataIndex: 'goodsName',
22732
- title: "\u8D27\u54C1\u540D\u79F0",
22733
- align: 'center',
22734
- ellipsis: true,
22735
- width: 150,
22736
- render: renderTextEllipsis
22737
- }, {
22738
- dataIndex: 'goodsId',
22739
- title: "\u8D27\u54C1ID",
22740
- align: 'center',
22741
- ellipsis: true,
22742
- width: 150,
22743
- render: renderTextEllipsis
22744
- }, {
22745
- dataIndex: 'barcode',
22746
- title: "\u8D27\u54C1\u6761\u7801",
22747
- align: 'center',
22748
- ellipsis: true,
22749
- width: 150,
22750
- render: renderTextEllipsis
22751
- }, {
22752
- dataIndex: 'specName',
22753
- title: "\u89C4\u683C\u540D\u79F0",
22754
- align: 'center',
22755
- ellipsis: true,
22756
- width: 150,
22757
- render: renderTextEllipsis
22758
- }, {
22759
- dataIndex: 'specId',
22760
- title: "\u89C4\u683CID",
22761
- align: 'center',
22762
- ellipsis: true,
22763
- width: 150,
22764
- render: renderTextEllipsis
22765
- }, {
22766
- dataIndex: 'skuImgUrl',
22767
- title: "\u89C4\u683C\u56FE\u7247",
22768
- width: 150,
22769
- render: function render(val) {
22770
- return /*#__PURE__*/React.createElement(ApaasImage, {
22771
- width: 30,
22772
- src: val
22773
- });
22774
- }
22775
- }, {
22776
- dataIndex: 'sellCount',
22777
- title: "\u53D1\u8D27\u6570\u91CF",
22778
- width: 100,
22779
- validator: function validator(_rule, value) {
22780
- var goodsName = '';
22781
- if (((value === null || value === void 0 ? void 0 : value.jkyReissueGoods) || []).some(function (goods) {
22782
- var qty = toNum$5(goods === null || goods === void 0 ? void 0 : goods.sellCount);
22783
- var res = typeof qty === 'number' ? qty < 1 : true;
22784
- if (res) {
22785
- goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodsName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodsName, "]") : '';
22786
- }
22787
- return res;
22788
- })) {
22789
- return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
22790
- }
22791
- },
22792
- render: function render(val, record, index) {
22793
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
22794
- style: {
22795
- width: 70
22796
- },
22797
- value: val,
22798
- min: 1,
22799
- precision: 0,
22800
- onChange: function onChange(num) {
22801
- updateDataHandle({
22802
- sellCount: num,
22803
- sellTotal: num && isNumberOrNumberString$3(record.sellPrice) ? num * record.sellPrice : null
22804
- }, index);
22805
- }
22806
- }) : /*#__PURE__*/React.createElement("span", null, val);
22807
- }
22808
- }, {
22809
- dataIndex: 'sellPrice',
22810
- title: "\u5355\u4EF7",
22811
- width: 150,
22812
- render: function render(val, record, index) {
22813
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
22814
- style: {
22815
- width: 130
22816
- },
22817
- value: val,
22818
- min: 0,
22819
- precision: 2,
22820
- onChange: function onChange(num) {
22821
- updateDataHandle({
22822
- sellPrice: num,
22823
- sellTotal: num && isNumberOrNumberString$3(record.sellCount) ? num * record.sellCount : null
22824
- }, index);
22825
- }
22826
- }) : /*#__PURE__*/React.createElement("span", null, val);
22827
- }
22828
- }, {
22829
- dataIndex: 'sellTotal',
22830
- title: "\u603B\u91D1\u989D",
22831
- width: 150,
22832
- render: function render(val, record, index) {
22833
- if ((typeof record.sellCount === 'number' || record.sellCount) && (typeof record.sellPrice === 'number' || record.sellPrice)) {
22834
- return record.sellCount * record.sellPrice;
22835
- }
22836
- return '';
22837
- }
22838
- }, {
22839
- dataIndex: 'reason',
22840
- title: "\u9000\u6362\u539F\u56E0",
22841
- width: 250,
22842
- render: function render(val, record, index) {
22843
- return !disabled ? /*#__PURE__*/React.createElement(ApaasInput, {
22844
- onChange: function onChange(value) {
22845
- updateHandle(value, index, 'reason');
22846
- }
22847
- }) : /*#__PURE__*/React.createElement("span", null, val);
22848
- }
22849
- }, {
22850
- dataIndex: 'isGift',
22851
- title: "\u662F\u5426\u8D60\u54C1",
22852
- width: 150,
22853
- render: function render(val, record, index) {
22854
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
22855
- value: val,
22856
- onChange: function onChange(value) {
22857
- updateHandle(value, index, 'isGift');
22858
- },
22859
- options: [{
22860
- label: '是',
22861
- value: '1'
22862
- }, {
22863
- label: '否',
22864
- value: '0'
22865
- }]
22866
- }) : /*#__PURE__*/React.createElement("span", null, val === '1' ? '是' : '否');
22867
- }
22868
- }, {
22869
- dataIndex: 'isFit',
22870
- title: "\u662F\u5426\u7EC4\u5408\u88C5",
22871
- width: 150,
22872
- render: function render(val, record, index) {
22873
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
22874
- value: val,
22875
- onChange: function onChange(value) {
22876
- updateHandle(value, index, 'isFit');
22877
- },
22878
- options: [{
22879
- label: '是',
22880
- value: 'True'
22881
- }, {
22882
- label: '否',
22883
- value: 'False'
22884
- }]
22885
- }) : /*#__PURE__*/React.createElement("span", null, val === 'True' ? '是' : '否');
22886
- }
22887
- }, {
22888
- dataIndex: 'brandName',
22889
- title: "\u54C1\u724C",
22890
- width: 150,
22891
- render: renderTextEllipsis
22892
- }, {
22893
- dataIndex: 'cateName',
22894
- title: "\u8D27\u54C1\u7C7B\u522B",
22895
- width: 150,
22896
- render: renderTextEllipsis
22897
- }].map(function (item) {
22898
- return _objectSpread2(_objectSpread2({}, item), {}, {
22899
- align: 'center',
22900
- ellipsis: true
22901
- });
22902
- })
22903
- };
22904
- };
22905
-
22906
- var getColumns$a = function getColumns(_ref) {
22907
- var _ref$text = _ref.text,
22908
- text = _ref$text === void 0 ? '' : _ref$text,
22909
- disabled = _ref.disabled,
22910
- updateHandle = _ref.updateHandle;
22911
- return {
22912
- //bs商品信息
22913
- default: [{
22914
- dataIndex: 'mark',
22915
- title: "\u5546\u54C1\u6807\u8BB0",
21821
+ //bs商品信息
21822
+ default: [{
21823
+ dataIndex: 'mark',
21824
+ title: "\u5546\u54C1\u6807\u8BB0",
22916
21825
  align: 'center',
22917
21826
  ellipsis: true,
22918
21827
  width: 70,
@@ -23020,7 +21929,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
23020
21929
  disabled = _ref.disabled,
23021
21930
  updateHandle = _ref.updateHandle,
23022
21931
  updateDataHandle = _ref.updateDataHandle;
23023
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
21932
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
23024
21933
  text: text,
23025
21934
  disabled: disabled,
23026
21935
  updateHandle: updateHandle
@@ -23058,13 +21967,8 @@ var getColumnsMap$1 = function getColumnsMap(args) {
23058
21967
  text: text,
23059
21968
  disabled: disabled,
23060
21969
  updateHandle: updateHandle
23061
- })), getColumns$9({
23062
- text: text,
23063
- disabled: disabled,
23064
- updateHandle: updateHandle,
23065
- updateDataHandle: updateDataHandle
23066
21970
  })), {}, {
23067
- default: getColumns$a({
21971
+ default: getColumns$9({
23068
21972
  text: text,
23069
21973
  disabled: disabled,
23070
21974
  updateHandle: updateHandle
@@ -23211,9 +22115,6 @@ var isErpType = {
23211
22115
  },
23212
22116
  isJy: function isJy(type) {
23213
22117
  return ['JY_GOODS', 'JY_REISSUE_GOODS'].includes(type);
23214
- },
23215
- isJky: function isJky(type) {
23216
- return ['JKY_GOODS', 'JKY_REISSUE_GOODS'].includes(type);
23217
22118
  }
23218
22119
  };
23219
22120
  var processGoods$1 = function processGoods(_ref) {
@@ -23500,8 +22401,6 @@ var GoodsModalMap = {
23500
22401
  KM_REISSUE_GOODS: KmGoodsModal,
23501
22402
  JY_GOODS: JyGoodsModal$1,
23502
22403
  JY_REISSUE_GOODS: JyGoodsModal$1,
23503
- JKY_GOODS: JkyGoodsModal$1,
23504
- JKY_REISSUE_GOODS: JkyGoodsModal$1,
23505
22404
  OTHER_GOODS: GoodsModal$2
23506
22405
  };
23507
22406
  var systemOrderNoMap = {
@@ -23514,8 +22413,6 @@ var systemOrderNoMap = {
23514
22413
  WLN_GOODS: 'tradeNo',
23515
22414
  JY_GOODS: 'tradeNo',
23516
22415
  JY_REISSUE_GOODS: 'tradeNo',
23517
- JKY_GOODS: 'tradeNo',
23518
- JKY_REISSUE_GOODS: 'tradeNo',
23519
22416
  KM_REISSUE_GOODS: 'sid',
23520
22417
  JST_REISSUE_GOODS: 'oId',
23521
22418
  GY_REISSUE_GOODS: 'code',
@@ -23551,81 +22448,23 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
23551
22448
  _useState4 = _slicedToArray(_useState3, 2),
23552
22449
  tradeGoodsVisible = _useState4[0],
23553
22450
  setTradeGoodsVisible = _useState4[1];
23554
- var getKmSupplier = /*#__PURE__*/function () {
23555
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dataSource) {
23556
- var _dataSource$filter;
23557
- var systemItemIds, supplierMap;
23558
- return _regeneratorRuntime().wrap(function _callee$(_context) {
23559
- while (1) switch (_context.prev = _context.next) {
23560
- case 0:
23561
- systemItemIds = dataSource === null || dataSource === void 0 ? void 0 : dataSource.filter(function (item) {
23562
- return item === null || item === void 0 ? void 0 : item.sysItemId;
23563
- }).map(function (item) {
23564
- return (item === null || item === void 0 ? void 0 : item.sysSkuId) == '-1' ? item === null || item === void 0 ? void 0 : item.sysItemId : "".concat(item === null || item === void 0 ? void 0 : item.sysItemId, "-").concat(item === null || item === void 0 ? void 0 : item.sysSkuId);
23565
- });
23566
- _context.next = 3;
23567
- return servers.KM.getSupplierSingleton(systemItemIds);
23568
- case 3:
23569
- supplierMap = _context.sent;
23570
- dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$filter = dataSource.filter(function (item) {
23571
- return item === null || item === void 0 ? void 0 : item.sysItemId;
23572
- })) === null || _dataSource$filter === void 0 ? void 0 : _dataSource$filter.forEach(function (item) {
23573
- var key = (item === null || item === void 0 ? void 0 : item.sysSkuId) == '-1' ? item === null || item === void 0 ? void 0 : item.sysItemId : "".concat(item === null || item === void 0 ? void 0 : item.sysItemId, "-").concat(item === null || item === void 0 ? void 0 : item.sysSkuId);
23574
- var supplierInfo = supplierMap.get(key);
23575
- item.supplierCode = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierCode;
23576
- item.supplierName = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierName;
23577
- });
23578
- case 5:
23579
- case "end":
23580
- return _context.stop();
23581
- }
23582
- }, _callee);
23583
- }));
23584
- return function getKmSupplier(_x) {
23585
- return _ref2.apply(this, arguments);
23586
- };
23587
- }();
23588
- var openModal = /*#__PURE__*/function () {
23589
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
23590
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
23591
- while (1) switch (_context2.prev = _context2.next) {
23592
- case 0:
23593
- if (!validSystemOrder) {
23594
- _context2.next = 3;
23595
- break;
23596
- }
23597
- message.warning('请选择补发系统单');
23598
- return _context2.abrupt("return");
23599
- case 3:
23600
- if (!(getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length))) {
23601
- _context2.next = 6;
23602
- break;
23603
- }
23604
- _context2.next = 6;
23605
- return getDataSourceAsync();
23606
- case 6:
23607
- if (!['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
23608
- _context2.next = 9;
23609
- break;
23610
- }
23611
- _context2.next = 9;
23612
- return getKmSupplier(dataSource);
23613
- case 9:
23614
- setTradeGoodsVisible(true);
23615
- // 补发直接传入的是systemNo
23616
- if (isShowSelect && isReissueType) {
23617
- setSelectSystemNo(selectedSystemOrders || []);
23618
- }
23619
- case 11:
23620
- case "end":
23621
- return _context2.stop();
23622
- }
23623
- }, _callee2);
23624
- }));
23625
- return function openModal() {
23626
- return _ref3.apply(this, arguments);
23627
- };
23628
- }();
22451
+ var openModal = function openModal() {
22452
+ if (validSystemOrder) {
22453
+ message.warning('请选择补发系统单');
22454
+ return;
22455
+ }
22456
+ if (getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length)) {
22457
+ getDataSourceAsync().then(function () {
22458
+ setTradeGoodsVisible(true);
22459
+ });
22460
+ } else {
22461
+ setTradeGoodsVisible(true);
22462
+ }
22463
+ // 补发直接传入的是systemNo
22464
+ if (isShowSelect && isReissueType) {
22465
+ setSelectSystemNo(selectedSystemOrders || []);
22466
+ }
22467
+ };
23629
22468
  var closeModal = function closeModal() {
23630
22469
  return setTradeGoodsVisible(false);
23631
22470
  };
@@ -23694,7 +22533,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
23694
22533
  }
23695
22534
  }, isShowSelect && /*#__PURE__*/React.createElement(Row, {
23696
22535
  style: {
23697
- marginBottom: '12px'
22536
+ marginBottom: '20px'
23698
22537
  }
23699
22538
  }, /*#__PURE__*/React.createElement(Col, {
23700
22539
  span: 12
@@ -23748,9 +22587,6 @@ var getButtonText = function getButtonText() {
23748
22587
  if (['JY_GOODS', 'JY_REISSUE_GOODS'].includes(type)) {
23749
22588
  return '选择巨益ERP商品';
23750
22589
  }
23751
- if (['JKY_GOODS', 'JKY_REISSUE_GOODS'].includes(type)) {
23752
- return '选择吉客云ERP商品';
23753
- }
23754
22590
  return '选择商品';
23755
22591
  };
23756
22592
  var GoodItem$1 = function GoodItem(props) {
@@ -23808,8 +22644,8 @@ var GoodItem$1 = function GoodItem(props) {
23808
22644
  var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
23809
22645
  var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
23810
22646
  // 判断是否为是否展示系统单筛选项
23811
- var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'JKY_GOODS', 'JKY_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
23812
- var isReissueType = type && ['GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'JY_REISSUE_GOODS', 'JKY_REISSUE_GOODS'].includes(type) || false;
22647
+ var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
22648
+ var isReissueType = type && ['GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'JY_REISSUE_GOODS'].includes(type) || false;
23813
22649
  var refModal = useRef();
23814
22650
  console.debug('表格数据', value);
23815
22651
  var handleDelete = function handleDelete(record, index) {
@@ -23900,8 +22736,6 @@ var GoodItem$1 = function GoodItem(props) {
23900
22736
  case 'KM_REISSUE_GOODS':
23901
22737
  case 'JY_GOODS':
23902
22738
  case 'JY_REISSUE_GOODS':
23903
- case 'JKY_GOODS':
23904
- case 'JKY_REISSUE_GOODS':
23905
22739
  case 'SKX_GOODS':
23906
22740
  case 'SKX_RETURN_GOODS':
23907
22741
  {
@@ -23949,9 +22783,9 @@ var GoodItem$1 = function GoodItem(props) {
23949
22783
  var COLUMNS_INFO = COLUMNS_MAP(text);
23950
22784
  return COLUMNS_INFO(type);
23951
22785
  };
23952
- var getShowFilterColumns = useCallback(function (_ref4) {
23953
- var showHeader = _ref4.showHeader,
23954
- initBaseInfoColumns = _ref4.initBaseInfoColumns;
22786
+ var getShowFilterColumns = useCallback(function (_ref2) {
22787
+ var showHeader = _ref2.showHeader,
22788
+ initBaseInfoColumns = _ref2.initBaseInfoColumns;
23955
22789
  var baseInfoColumns = [];
23956
22790
  var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
23957
22791
  var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
@@ -25106,7 +23940,7 @@ var jyUtils = {
25106
23940
  };
25107
23941
 
25108
23942
  var singletonMap$7 = new Map();
25109
- var getJkyOrderListSingleton = function getJkyOrderListSingleton(orderNo) {
23943
+ var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
25110
23944
  if (!singletonMap$7.has(orderNo)) {
25111
23945
  var p = new Promise(function (resolve, reject) {
25112
23946
  var doReject = function doReject(err) {
@@ -25114,50 +23948,6 @@ var getJkyOrderListSingleton = function getJkyOrderListSingleton(orderNo) {
25114
23948
  singletonMap$7.delete(orderNo);
25115
23949
  reject(err);
25116
23950
  };
25117
- extendRequest('/qy/gdfw/jky/erp/trade/fullInfo', {
25118
- method: 'post',
25119
- data: {
25120
- billNo: orderNo
25121
- }
25122
- }).then(function (res) {
25123
- if (res === null || res === void 0 ? void 0 : res.success) {
25124
- var _res$data, _res$data$tradeOrderD, _res$data3;
25125
- if (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$tradeOrderD = _res$data.tradeOrderDetails) === null || _res$data$tradeOrderD === void 0 ? void 0 : _res$data$tradeOrderD.length) {
25126
- var _filterJkyOrders, _res$data2;
25127
- res.data.trades = (_filterJkyOrders = filterJkyOrders(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.tradeOrderDetails, orderNo)) === null || _filterJkyOrders === void 0 ? void 0 : _filterJkyOrders.map(function (item) {
25128
- return _objectSpread2(_objectSpread2({}, item), {}, {
25129
- tradeType: JKY_ORDER_TYPE_MAP[item.tradeType],
25130
- tradeStatus: JKY_ORDER_STATUS_MAP[item.tradeStatus]
25131
- });
25132
- });
25133
- }
25134
- resolve(((_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.trades) || []);
25135
- // 延迟10秒清除,保证订单的时效性
25136
- setTimeout(function () {
25137
- singletonMap$7.delete(orderNo);
25138
- }, 1000 * 10);
25139
- } else {
25140
- doReject(res);
25141
- }
25142
- }).catch(doReject);
25143
- });
25144
- singletonMap$7.set(orderNo, p);
25145
- }
25146
- return singletonMap$7.get(orderNo);
25147
- };
25148
- var jkyUtils = {
25149
- getJkyOrderListSingleton: getJkyOrderListSingleton
25150
- };
25151
-
25152
- var singletonMap$8 = new Map();
25153
- var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
25154
- if (!singletonMap$8.has(orderNo)) {
25155
- var p = new Promise(function (resolve, reject) {
25156
- var doReject = function doReject(err) {
25157
- // 清空掉错误的请求记录
25158
- singletonMap$8.delete(orderNo);
25159
- reject(err);
25160
- };
25161
23951
  extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
25162
23952
  method: 'post',
25163
23953
  data: {
@@ -25181,16 +23971,16 @@ var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
25181
23971
  }
25182
23972
  // 延迟10秒清除,保证订单的时效性
25183
23973
  setTimeout(function () {
25184
- singletonMap$8.delete(orderNo);
23974
+ singletonMap$7.delete(orderNo);
25185
23975
  }, 1000 * 10);
25186
23976
  } else {
25187
23977
  doReject(data);
25188
23978
  }
25189
23979
  }).catch(doReject);
25190
23980
  });
25191
- singletonMap$8.set(orderNo, p);
23981
+ singletonMap$7.set(orderNo, p);
25192
23982
  }
25193
- return singletonMap$8.get(orderNo);
23983
+ return singletonMap$7.get(orderNo);
25194
23984
  };
25195
23985
  var kmUtils = {
25196
23986
  getOrderListSingleton: getOrderListSingleton$2
@@ -25207,7 +23997,6 @@ var columnsMap = {
25207
23997
  GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns,
25208
23998
  JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG.columns,
25209
23999
  JY_SYSTEM_ORDER: JY_SYSTEM_ORDER_CONFIG.columns,
25210
- JKY_SYSTEM_ORDER: JKY_SYSTEM_ORDER_CONFIG.columns,
25211
24000
  WDT_RETURN_BILL_NO: WDT_RETURN_BILL_NO_CONFIG.columns
25212
24001
  };
25213
24002
  var rowKeyMap = {
@@ -25219,7 +24008,6 @@ var rowKeyMap = {
25219
24008
  GY_SYSTEM_ORDER: 'billNo',
25220
24009
  JST_SYSTEM_ORDER: 'oId',
25221
24010
  JY_SYSTEM_ORDER: 'tradeNo',
25222
- JKY_SYSTEM_ORDER: 'tradeNo',
25223
24011
  WDT_RETURN_BILL_NO: 'refundNo'
25224
24012
  };
25225
24013
  var index$2 = (function (props) {
@@ -25234,6 +24022,7 @@ var index$2 = (function (props) {
25234
24022
  useEffect(function () {
25235
24023
  var _value$orders, _value$showOrderInfo;
25236
24024
  valueRef.current = value;
24025
+ console.log('value77777777', value);
25237
24026
  if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length) && !onceRef.current) {
25238
24027
  onceRef.current = true;
25239
24028
  if (type === 'BS_SYSTEM_ORDER') {
@@ -25252,8 +24041,6 @@ var index$2 = (function (props) {
25252
24041
  getJstOrderList(value.orderNo);
25253
24042
  } else if (type === 'JY_SYSTEM_ORDER') {
25254
24043
  getJyOrderList(value.orderNo);
25255
- } else if (type === 'JKY_SYSTEM_ORDER') {
25256
- getJkyOrderList(value.orderNo);
25257
24044
  }
25258
24045
  }
25259
24046
  }, [value, type]);
@@ -25518,31 +24305,6 @@ var index$2 = (function (props) {
25518
24305
  return _ref10.apply(this, arguments);
25519
24306
  };
25520
24307
  }();
25521
- var getJkyOrderList = /*#__PURE__*/function () {
25522
- var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(orderNo) {
25523
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
25524
- while (1) switch (_context9.prev = _context9.next) {
25525
- case 0:
25526
- jkyUtils.getJkyOrderListSingleton(orderNo).then(function (data) {
25527
- var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
25528
- return getIsPlatformCodesIncludeOrderNos(item.platformCode, orderNo);
25529
- });
25530
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
25531
- orders: trades,
25532
- showOrderInfo: trades
25533
- }));
25534
- });
25535
- onceRef.current = false;
25536
- case 2:
25537
- case "end":
25538
- return _context9.stop();
25539
- }
25540
- }, _callee9);
25541
- }));
25542
- return function getJkyOrderList(_x9) {
25543
- return _ref12.apply(this, arguments);
25544
- };
25545
- }();
25546
24308
  var rowSelection = {
25547
24309
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
25548
24310
  fixed: true,
@@ -25967,16 +24729,16 @@ var orderSubFormConstants = {
25967
24729
  };
25968
24730
 
25969
24731
  var getSelectWidgetMap$1 = orderSubFormConstants.getSelectWidgetMap;
25970
- var singletonMap$9 = new Map();
24732
+ var singletonMap$8 = new Map();
25971
24733
  var getOrderListSingleton$3 = function getOrderListSingleton(parmas) {
25972
24734
  var orderNo = parmas.orderNo,
25973
24735
  shopId = parmas.shopId;
25974
24736
  var key = "".concat(orderNo, "-").concat(shopId);
25975
- if (!singletonMap$9.has(key)) {
24737
+ if (!singletonMap$8.has(key)) {
25976
24738
  var p = new Promise(function (resolve, reject) {
25977
24739
  var doReject = function doReject(err) {
25978
24740
  // 清空掉错误的请求记录
25979
- singletonMap$9.delete(key);
24741
+ singletonMap$8.delete(key);
25980
24742
  reject(err);
25981
24743
  };
25982
24744
  extendRequest('/qy/gdfw/order/subOrderItemsDetail', {
@@ -25992,16 +24754,16 @@ var getOrderListSingleton$3 = function getOrderListSingleton(parmas) {
25992
24754
  }
25993
24755
  // 延迟10秒清除,保证订单的时效性
25994
24756
  setTimeout(function () {
25995
- singletonMap$9.delete(key);
24757
+ singletonMap$8.delete(key);
25996
24758
  }, 1000 * 10);
25997
24759
  } else {
25998
24760
  doReject(data);
25999
24761
  }
26000
24762
  }).catch(doReject);
26001
24763
  });
26002
- singletonMap$9.set(key, p);
24764
+ singletonMap$8.set(key, p);
26003
24765
  }
26004
- return singletonMap$9.get(key);
24766
+ return singletonMap$8.get(key);
26005
24767
  };
26006
24768
  var renderEditItem = function renderEditItem(_ref) {
26007
24769
  var item = _ref.item,
@@ -26434,9 +25196,6 @@ var isErpType$1 = {
26434
25196
  },
26435
25197
  isJy: function isJy(type) {
26436
25198
  return ['JY_GOODS'].includes(type);
26437
- },
26438
- isJky: function isJky(type) {
26439
- return ['JKY_GOODS'].includes(type);
26440
25199
  }
26441
25200
  };
26442
25201
  var processAllOrders = function processAllOrders(_ref) {
@@ -26737,32 +25496,6 @@ var componentMap$2 = {
26737
25496
  },
26738
25497
  getOrderList: jyUtils.getJyOrderListSingleton
26739
25498
  },
26740
- JKY_GOODS: {
26741
- type: 'jky',
26742
- key: 'jkyGoods',
26743
- name: '吉客云',
26744
- orderNo: 'tradeNo',
26745
- goodDetailOrderNo: 'tradeNo',
26746
- eventNameMap: {
26747
- // pubsub 事件
26748
- type: 'jkyType',
26749
- updateGoodsHandle: updateJkyGoodsHandle,
26750
- selectListReturn: 'jkySelectListReturn',
26751
- selectList: 'jkySelectList',
26752
- reissueSelectList: 'jkyReissueSelectList',
26753
- reissueSelectListReturn: 'jkyReissueSelectListReturn',
26754
- reissueDeleteGood: 'jkyReissueDeleteGood',
26755
- changeShopCode: 'jkyChangeShopCode',
26756
- reissueType: 'jkyReissueType',
26757
- returnType: 'jkyReturnType',
26758
- returnSelectListReturn: 'jkyReturnSelectListReturn',
26759
- returnSelectList: 'jkyReturnSelectList',
26760
- deleteGood: 'jkyDeleteGood',
26761
- returnDeleteGood: 'jkyReturnDeleteGood',
26762
- exchangeDeleteGood: 'jkyExchangeDeleteGood'
26763
- },
26764
- getOrderList: jkyUtils.getJkyOrderListSingleton
26765
- },
26766
25499
  WDT_AFTERSALE_GOODS: {
26767
25500
  type: 'wdtAftersale',
26768
25501
  key: 'wdtAftersaleGoods',
@@ -26794,7 +25527,7 @@ var componentMap$2 = {
26794
25527
  }
26795
25528
  };
26796
25529
  var CommonGoods = function CommonGoods(props) {
26797
- var _withInfo$current3, _withInfo$current4, _componentMap$compTyp6;
25530
+ var _componentMap$compTyp5, _withInfo$current3, _withInfo$current4, _componentMap$compTyp7;
26798
25531
  var value = props.value,
26799
25532
  disabled = props.disabled,
26800
25533
  onChange = props.onChange,
@@ -26810,10 +25543,6 @@ var CommonGoods = function CommonGoods(props) {
26810
25543
  _useState2 = _slicedToArray(_useState, 2),
26811
25544
  tableSelect = _useState2[0],
26812
25545
  setTableSelect = _useState2[1];
26813
- var _useState3 = useState([]),
26814
- _useState4 = _slicedToArray(_useState3, 2),
26815
- originDataSource = _useState4[0],
26816
- setOriginDataSource = _useState4[1];
26817
25546
  var withInfo = useRef(null);
26818
25547
  var valueRef = useRef(null);
26819
25548
  var tokens = useRef([]);
@@ -26825,93 +25554,10 @@ var CommonGoods = function CommonGoods(props) {
26825
25554
  compType.indexOf('WDT') > -1 && getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
26826
25555
  }
26827
25556
  }, [value]);
26828
- var sysItemIdMap = useMemo(function () {
26829
- var map = {};
26830
- if (compType.indexOf('KM') > -1) {
26831
- var _value$kmGoods, _value$kmGoods$filter;
26832
- value === null || value === void 0 ? void 0 : (_value$kmGoods = value.kmGoods) === null || _value$kmGoods === void 0 ? void 0 : (_value$kmGoods$filter = _value$kmGoods.filter(function (item) {
26833
- return item === null || item === void 0 ? void 0 : item.sysItemId;
26834
- })) === null || _value$kmGoods$filter === void 0 ? void 0 : _value$kmGoods$filter.forEach(function (item) {
26835
- var key = item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
26836
- map[key] = item;
26837
- });
26838
- }
26839
- return map;
26840
- }, [value === null || value === void 0 ? void 0 : value.kmGoods]);
26841
- // 用于跟踪已经处理过的 sysItemId,避免重复处理
26842
- var processedSysItemIdsRef = useRef(new Set());
26843
- useEffect(function () {
26844
- var fetchSupplier = /*#__PURE__*/function () {
26845
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(sysItemIds) {
26846
- var _currentValue$kmGoods;
26847
- var needFetchIds, supplierMap, hasChange, currentValue, kmGoods;
26848
- return _regeneratorRuntime().wrap(function _callee$(_context) {
26849
- while (1) switch (_context.prev = _context.next) {
26850
- case 0:
26851
- if (sysItemIds.length) {
26852
- _context.next = 2;
26853
- break;
26854
- }
26855
- return _context.abrupt("return");
26856
- case 2:
26857
- // 过滤出还没有供应商信息的 sysItemId
26858
- needFetchIds = sysItemIds.filter(function (id) {
26859
- var item = sysItemIdMap[id];
26860
- return item && (!item.supplierCode || !item.supplierName);
26861
- });
26862
- if (needFetchIds.length) {
26863
- _context.next = 5;
26864
- break;
26865
- }
26866
- return _context.abrupt("return");
26867
- case 5:
26868
- _context.next = 7;
26869
- return servers.KM.getSupplierSingleton(needFetchIds);
26870
- case 7:
26871
- supplierMap = _context.sent;
26872
- // 检查是否有实际变化,避免不必要的更新
26873
- hasChange = false;
26874
- currentValue = valueRef.current;
26875
- kmGoods = currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$kmGoods = currentValue.kmGoods) === null || _currentValue$kmGoods === void 0 ? void 0 : _currentValue$kmGoods.map(function (item) {
26876
- var supplierInfo = supplierMap.get(item.sysItemId);
26877
- var newSupplierCode = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierCode;
26878
- var newSupplierName = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierName;
26879
- // 如果供应商信息有变化,标记需要更新
26880
- if (newSupplierCode && item.supplierCode !== newSupplierCode || newSupplierName && item.supplierName !== newSupplierName) {
26881
- hasChange = true;
26882
- // 标记已处理
26883
- processedSysItemIdsRef.current.add(item.sysItemId);
26884
- return _objectSpread2(_objectSpread2({}, item), {}, {
26885
- supplierCode: newSupplierCode || item.supplierCode,
26886
- supplierName: newSupplierName || item.supplierName
26887
- });
26888
- }
26889
- return item;
26890
- }); // 只在有实际变化时才更新
26891
- if (hasChange && kmGoods) {
26892
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, currentValue), {}, {
26893
- kmGoods: kmGoods
26894
- }));
26895
- }
26896
- case 12:
26897
- case "end":
26898
- return _context.stop();
26899
- }
26900
- }, _callee);
26901
- }));
26902
- return function fetchSupplier(_x) {
26903
- return _ref.apply(this, arguments);
26904
- };
26905
- }();
26906
- var sysItemIds = Object.keys(sysItemIdMap);
26907
- if (sysItemIds === null || sysItemIds === void 0 ? void 0 : sysItemIds.length) {
26908
- fetchSupplier(sysItemIds);
26909
- }
26910
- }, [sysItemIdMap]);
26911
25557
  var getWdtOrderList = /*#__PURE__*/function () {
26912
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
26913
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
26914
- while (1) switch (_context2.prev = _context2.next) {
25558
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
25559
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
25560
+ while (1) switch (_context.prev = _context.next) {
26915
25561
  case 0:
26916
25562
  wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
26917
25563
  var orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (trade) {
@@ -26924,12 +25570,12 @@ var CommonGoods = function CommonGoods(props) {
26924
25570
  });
26925
25571
  case 1:
26926
25572
  case "end":
26927
- return _context2.stop();
25573
+ return _context.stop();
26928
25574
  }
26929
- }, _callee2);
25575
+ }, _callee);
26930
25576
  }));
26931
- return function getWdtOrderList(_x2) {
26932
- return _ref2.apply(this, arguments);
25577
+ return function getWdtOrderList(_x) {
25578
+ return _ref.apply(this, arguments);
26933
25579
  };
26934
25580
  }();
26935
25581
  useEffect(function () {
@@ -27035,8 +25681,8 @@ var CommonGoods = function CommonGoods(props) {
27035
25681
  mode: isStrict
27036
25682
  }))));
27037
25683
  };
27038
- var getGoodDetails = function getGoodDetails(_ref3) {
27039
- var mode = _ref3.mode;
25684
+ var getGoodDetails = function getGoodDetails(_ref2) {
25685
+ var mode = _ref2.mode;
27040
25686
  var updateHandle = componentMap$2[compType].eventNameMap['updateGoodsHandle'];
27041
25687
  if (!updateHandle) return [];
27042
25688
  var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.orders) || [], {
@@ -27049,115 +25695,44 @@ var CommonGoods = function CommonGoods(props) {
27049
25695
  }) : goodDetails;
27050
25696
  };
27051
25697
  // 找到该订单号下所有商品
27052
- var getAllTradeGoodsDetails = /*#__PURE__*/function () {
27053
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref4) {
27054
- var mode, updateHandle, goodDetails, orderNo;
27055
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
27056
- while (1) switch (_context3.prev = _context3.next) {
27057
- case 0:
27058
- mode = _ref4.mode;
27059
- updateHandle = componentMap$2[compType].eventNameMap['updateGoodsHandle'];
27060
- if (updateHandle) {
27061
- _context3.next = 4;
27062
- break;
27063
- }
27064
- return _context3.abrupt("return", []);
27065
- case 4:
27066
- goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.allOrders) || [], {
27067
- orderBackGoodsLevel: props.orderBackGoodsLevel
27068
- });
27069
- orderNo = value === null || value === void 0 ? void 0 : value.orderNo; // if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(compType)) {
27070
- // await getKmSupplier(goodDetails);
27071
- // }
27072
- return _context3.abrupt("return", mode ? goodDetails.filter(function (goodItem) {
27073
- var _componentMap$compTyp2;
27074
- return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp2 = componentMap$2[compType]) === null || _componentMap$compTyp2 === void 0 ? void 0 : _componentMap$compTyp2.goodDetailOrderNo]) === orderNo;
27075
- }) : goodDetails);
27076
- case 7:
27077
- case "end":
27078
- return _context3.stop();
27079
- }
27080
- }, _callee3);
27081
- }));
27082
- return function getAllTradeGoodsDetails(_x3) {
27083
- return _ref5.apply(this, arguments);
27084
- };
27085
- }();
27086
- // 异步获取 originDataSource
27087
- useEffect(function () {
27088
- var fetchOriginDataSource = /*#__PURE__*/function () {
27089
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
27090
- var data;
27091
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
27092
- while (1) switch (_context4.prev = _context4.next) {
27093
- case 0:
27094
- _context4.next = 2;
27095
- return getAllTradeGoodsDetails({
27096
- mode: value === null || value === void 0 ? void 0 : value.isStrict
27097
- });
27098
- case 2:
27099
- data = _context4.sent;
27100
- setOriginDataSource(Array.isArray(data) ? data : []);
27101
- case 4:
27102
- case "end":
27103
- return _context4.stop();
27104
- }
27105
- }, _callee4);
27106
- }));
27107
- return function fetchOriginDataSource() {
27108
- return _ref6.apply(this, arguments);
27109
- };
27110
- }();
27111
- fetchOriginDataSource();
27112
- }, [value === null || value === void 0 ? void 0 : value.allOrders, value === null || value === void 0 ? void 0 : value.isStrict, value === null || value === void 0 ? void 0 : value.orderNo, compType]);
27113
- var selectedGoodsChange = /*#__PURE__*/function () {
27114
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(skuList) {
27115
- var _valueRef$current9, _componentMap$compTyp3, _componentMap$compTyp4, _uniqBy;
27116
- var newValue, isStrict, originTradeGoodList, currentSelectGoodList;
27117
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
27118
- while (1) switch (_context5.prev = _context5.next) {
27119
- case 0:
27120
- newValue = _objectSpread2({}, valueRef.current);
27121
- isStrict = valueRef.current.isStrict; // 原订单商品
27122
- _context5.next = 4;
27123
- return getAllTradeGoodsDetails({
27124
- mode: isStrict
27125
- });
27126
- case 4:
27127
- _context5.t0 = _context5.sent;
27128
- if (_context5.t0) {
27129
- _context5.next = 7;
27130
- break;
27131
- }
27132
- _context5.t0 = [];
27133
- case 7:
27134
- originTradeGoodList = _context5.t0;
27135
- // 当前选中的所有商品【包含了原订单+商品库】
27136
- currentSelectGoodList = ((_valueRef$current9 = valueRef.current) === null || _valueRef$current9 === void 0 ? void 0 : _valueRef$current9["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp3 = componentMap$2[compType]) === null || _componentMap$compTyp3 === void 0 ? void 0 : _componentMap$compTyp3.key)]) || [];
27137
- newValue["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$2[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
27138
- return skuList.includes(item.uuid);
27139
- });
27140
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
27141
- case 11:
27142
- case "end":
27143
- return _context5.stop();
27144
- }
27145
- }, _callee5);
27146
- }));
27147
- return function selectedGoodsChange(_x4) {
27148
- return _ref7.apply(this, arguments);
27149
- };
27150
- }();
25698
+ var getAllTradeGoodsDetails = function getAllTradeGoodsDetails(_ref3) {
25699
+ var mode = _ref3.mode;
25700
+ var updateHandle = componentMap$2[compType].eventNameMap['updateGoodsHandle'];
25701
+ console.log('value?.allOrders', value, (value === null || value === void 0 ? void 0 : value.allOrders) || []);
25702
+ if (!updateHandle) return [];
25703
+ var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.allOrders) || [], {
25704
+ orderBackGoodsLevel: props.orderBackGoodsLevel
25705
+ });
25706
+ var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
25707
+ return mode ? goodDetails.filter(function (goodItem) {
25708
+ var _componentMap$compTyp2;
25709
+ return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp2 = componentMap$2[compType]) === null || _componentMap$compTyp2 === void 0 ? void 0 : _componentMap$compTyp2.goodDetailOrderNo]) === orderNo;
25710
+ }) : goodDetails;
25711
+ };
25712
+ var selectedGoodsChange = useCallback(function (skuList) {
25713
+ var _componentMap$compTyp3, _componentMap$compTyp4, _uniqBy;
25714
+ var newValue = _objectSpread2({}, value);
25715
+ var isStrict = value.isStrict;
25716
+ // 原订单商品
25717
+ var originTradeGoodList = getAllTradeGoodsDetails({
25718
+ mode: isStrict
25719
+ }) || [];
25720
+ // 当前选中的所有商品【包含了原订单+商品库】
25721
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp3 = componentMap$2[compType]) === null || _componentMap$compTyp3 === void 0 ? void 0 : _componentMap$compTyp3.key)]) || [];
25722
+ newValue["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$2[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
25723
+ return skuList.includes(item.uuid);
25724
+ });
25725
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
25726
+ }, [value === null || value === void 0 ? void 0 : value["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp5 = componentMap$2[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.key)], value === null || value === void 0 ? void 0 : value.isStrict]);
27151
25727
  // 商品信息组件暂存后 重新编辑,此时需要重新获取订单下所有系统自订单的商品信息
27152
25728
  var getDataSourceAsync = function getDataSourceAsync() {
27153
- var _componentMap$compTyp5;
27154
- return (value === null || value === void 0 ? void 0 : value.orderNo) ? (_componentMap$compTyp5 = componentMap$2[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.getOrderList(value === null || value === void 0 ? void 0 : value.orderNo).then(function (data) {
25729
+ var _componentMap$compTyp6;
25730
+ return (value === null || value === void 0 ? void 0 : value.orderNo) ? (_componentMap$compTyp6 = componentMap$2[compType]) === null || _componentMap$compTyp6 === void 0 ? void 0 : _componentMap$compTyp6.getOrderList(value === null || value === void 0 ? void 0 : value.orderNo).then(function (data) {
27155
25731
  var list = processAllOrders({
27156
25732
  data: data,
27157
25733
  orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
27158
25734
  type: compType
27159
25735
  });
27160
- console.log('getDataSourceAsync', list);
27161
25736
  onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
27162
25737
  allOrders: list || []
27163
25738
  }));
@@ -27185,9 +25760,11 @@ var CommonGoods = function CommonGoods(props) {
27185
25760
  isStrict: value === null || value === void 0 ? void 0 : value.isStrict,
27186
25761
  systemOrders: value === null || value === void 0 ? void 0 : value.allOrders,
27187
25762
  selectedSystemOrders: value === null || value === void 0 ? void 0 : value.orders,
27188
- showChangeBtn: (_componentMap$compTyp6 = componentMap$2[compType]) === null || _componentMap$compTyp6 === void 0 ? void 0 : _componentMap$compTyp6.showChangeBtn,
25763
+ showChangeBtn: (_componentMap$compTyp7 = componentMap$2[compType]) === null || _componentMap$compTyp7 === void 0 ? void 0 : _componentMap$compTyp7.showChangeBtn,
27189
25764
  tradeGoods: {
27190
- originDataSource: originDataSource,
25765
+ originDataSource: getAllTradeGoodsDetails({
25766
+ mode: value === null || value === void 0 ? void 0 : value.isStrict
25767
+ }),
27191
25768
  getDataSourceAsync: getDataSourceAsync,
27192
25769
  selectedGoodsChange: selectedGoodsChange
27193
25770
  }
@@ -27844,26 +26421,10 @@ var typeMap$2 = {
27844
26421
  outerOiIdKey: '',
27845
26422
  goodDetailsKey: 'subOrderDetails',
27846
26423
  isShowSelectTradeGoods: true
27847
- },
27848
- JKY_REISSUE_GOODS: {
27849
- compType: '补发',
27850
- key: 'jkyReissueGoods',
27851
- typeName: 'jkyReissueType',
27852
- systemOrder: 'jkySystemOrder',
27853
- systemOrderNo: 'jkySystemOrderNo',
27854
- getOrderList: jkyUtils.getJkyOrderListSingleton,
27855
- updateGoodsHandle: updateJkyGoodsHandle,
27856
- alwaysShowChooseErpGoodsBtn: true,
27857
- orderTypeKey: 'orderType',
27858
- oIdKey: 'tradeNo',
27859
- outerOiIdKey: '',
27860
- goodDetailsKey: 'subOrderDetails',
27861
- isShowSelectTradeGoods: true,
27862
- showModeBtn: true
27863
26424
  }
27864
26425
  };
27865
26426
  var PublicReissue = function PublicReissue(props) {
27866
- var _typeMap$type36, _typeMap$type42, _typeMap$type43, _typeMap$type44, _typeMap$type45, _value$typeMap$type$s8, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50, _typeMap$type51, _typeMap$type52, _typeMap$type53, _value$typeMap$type$s9, _typeMap$type54, _typeMap$type55, _typeMap$type56, _typeMap$type57;
26427
+ var _typeMap$type36, _typeMap$type42, _typeMap$type43, _typeMap$type44, _typeMap$type45, _value$typeMap$type$s8, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _typeMap$type50, _typeMap$type51, _typeMap$type52, _value$typeMap$type$s9, _typeMap$type53, _typeMap$type54, _typeMap$type55, _typeMap$type56;
27867
26428
  var value = props.value,
27868
26429
  onChange = props.onChange,
27869
26430
  _props$reasonList = props.reasonList,
@@ -27979,95 +26540,12 @@ var PublicReissue = function PublicReissue(props) {
27979
26540
  mode: mode
27980
26541
  }))));
27981
26542
  };
27982
- var sysItemIdMap = useMemo(function () {
27983
- var map = {};
27984
- if (type === 'KM_REISSUE_GOODS') {
27985
- var _value$kmReissueGoods, _value$kmReissueGoods2;
27986
- value === null || value === void 0 ? void 0 : (_value$kmReissueGoods = value.kmReissueGoods) === null || _value$kmReissueGoods === void 0 ? void 0 : (_value$kmReissueGoods2 = _value$kmReissueGoods.filter(function (item) {
27987
- return item === null || item === void 0 ? void 0 : item.sysItemId;
27988
- })) === null || _value$kmReissueGoods2 === void 0 ? void 0 : _value$kmReissueGoods2.forEach(function (item) {
27989
- var key = item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
27990
- map[key] = item;
27991
- });
27992
- }
27993
- return map;
27994
- }, [value === null || value === void 0 ? void 0 : value.kmReissueGoods]);
27995
- // 用于跟踪已经处理过的 sysItemId,避免重复处理
27996
- var processedSysItemIdsRef = useRef(new Set());
27997
- useEffect(function () {
27998
- var fetchSupplier = /*#__PURE__*/function () {
27999
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(sysItemIds) {
28000
- var _currentValue$kmReiss;
28001
- var needFetchIds, supplierMap, hasChange, currentValue, kmReissueGoods;
28002
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
28003
- while (1) switch (_context2.prev = _context2.next) {
28004
- case 0:
28005
- if (sysItemIds.length) {
28006
- _context2.next = 2;
28007
- break;
28008
- }
28009
- return _context2.abrupt("return");
28010
- case 2:
28011
- // 过滤出还没有供应商信息的 sysItemId
28012
- needFetchIds = sysItemIds.filter(function (id) {
28013
- var item = sysItemIdMap[id];
28014
- return item && (!item.supplierCode || !item.supplierName);
28015
- });
28016
- if (needFetchIds.length) {
28017
- _context2.next = 5;
28018
- break;
28019
- }
28020
- return _context2.abrupt("return");
28021
- case 5:
28022
- _context2.next = 7;
28023
- return servers.KM.getSupplierSingleton(needFetchIds);
28024
- case 7:
28025
- supplierMap = _context2.sent;
28026
- // 检查是否有实际变化,避免不必要的更新
28027
- hasChange = false;
28028
- currentValue = valueRef.current;
28029
- kmReissueGoods = currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$kmReiss = currentValue.kmReissueGoods) === null || _currentValue$kmReiss === void 0 ? void 0 : _currentValue$kmReiss.map(function (item) {
28030
- var supplierInfo = supplierMap.get(item.sysItemId);
28031
- var newSupplierCode = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierCode;
28032
- var newSupplierName = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierName;
28033
- // 如果供应商信息有变化,标记需要更新
28034
- if (newSupplierCode && item.supplierCode !== newSupplierCode || newSupplierName && item.supplierName !== newSupplierName) {
28035
- hasChange = true;
28036
- // 标记已处理
28037
- processedSysItemIdsRef.current.add(item.sysItemId);
28038
- return _objectSpread2(_objectSpread2({}, item), {}, {
28039
- supplierCode: newSupplierCode || item.supplierCode,
28040
- supplierName: newSupplierName || item.supplierName
28041
- });
28042
- }
28043
- return item;
28044
- }); // 只在有实际变化时才更新
28045
- if (hasChange && kmReissueGoods) {
28046
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, currentValue), {}, {
28047
- kmReissueGoods: kmReissueGoods
28048
- }));
28049
- }
28050
- case 12:
28051
- case "end":
28052
- return _context2.stop();
28053
- }
28054
- }, _callee2);
28055
- }));
28056
- return function fetchSupplier(_x2) {
28057
- return _ref4.apply(this, arguments);
28058
- };
28059
- }();
28060
- var sysItemIds = Object.keys(sysItemIdMap);
28061
- if (sysItemIds === null || sysItemIds === void 0 ? void 0 : sysItemIds.length) {
28062
- fetchSupplier(sysItemIds);
28063
- }
28064
- }, [sysItemIdMap]);
28065
- var getGoodDetails = function getGoodDetails(_ref5) {
26543
+ var getGoodDetails = function getGoodDetails(_ref4) {
28066
26544
  var _typeMap$type18, _typeMap$type19, _value$typeMap$type$s6, _typeMap$type20, _typeMap$type21, _typeMap$type22, _typeMap$type23, _typeMap$type24;
28067
- var mode = _ref5.mode,
28068
- sysOrderNo = _ref5.sysOrderNo,
28069
- _ref5$isAllOrders = _ref5.isAllOrders,
28070
- isAllOrders = _ref5$isAllOrders === void 0 ? false : _ref5$isAllOrders;
26545
+ var mode = _ref4.mode,
26546
+ sysOrderNo = _ref4.sysOrderNo,
26547
+ _ref4$isAllOrders = _ref4.isAllOrders,
26548
+ isAllOrders = _ref4$isAllOrders === void 0 ? false : _ref4$isAllOrders;
28071
26549
  var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrder];
28072
26550
  var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.systemOrderNo];
28073
26551
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
@@ -28085,10 +26563,6 @@ var PublicReissue = function PublicReissue(props) {
28085
26563
  orderRest = {
28086
26564
  canEdit: true
28087
26565
  };
28088
- } else if (['JKY_REISSUE_GOODS'].includes(type)) {
28089
- orderRest = {
28090
- canEdit: true
28091
- };
28092
26566
  }
28093
26567
  var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orders) || [] : order ? [order] : [];
28094
26568
  var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
@@ -28230,17 +26704,17 @@ var PublicReissue = function PublicReissue(props) {
28230
26704
  return changeGoodHandle(val);
28231
26705
  },
28232
26706
  onModeChange: handleModeChange,
28233
- showModeBtn: !!(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.showModeBtn),
26707
+ showModeBtn: false,
28234
26708
  isStrict: isStrict,
28235
- isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.isShowSelectTradeGoods,
28236
- systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
28237
- selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.systemOrderNo)]] : [],
26709
+ isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.isShowSelectTradeGoods,
26710
+ systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
26711
+ selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.systemOrderNo)]] : [],
28238
26712
  tradeGoods: {
28239
26713
  originDataSource: getGoodDetails({
28240
26714
  mode: isStrict,
28241
- isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type56 = typeMap$2[type]) === null || _typeMap$type56 === void 0 ? void 0 : _typeMap$type56.isShowSelectTradeGoods
26715
+ isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.isShowSelectTradeGoods
28242
26716
  }),
28243
- uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type57 = typeMap$2[type]) === null || _typeMap$type57 === void 0 ? void 0 : _typeMap$type57.uniqueKey) || 'uuid',
26717
+ uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type56 = typeMap$2[type]) === null || _typeMap$type56 === void 0 ? void 0 : _typeMap$type56.uniqueKey) || 'uuid',
28244
26718
  selectedGoodsChange: selectedGoodsChange
28245
26719
  }
28246
26720
  })));
@@ -28983,7 +27457,7 @@ var MsgStatus = function MsgStatus(props) {
28983
27457
  onClick: function onClick() {
28984
27458
  return setChangeIndex(index);
28985
27459
  }
28986
- }, msgTypeCh[key] || key, item.ruleName);
27460
+ }, msgTypeCh[key], item.ruleName);
28987
27461
  }))) : null, type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
28988
27462
  showSearch: true,
28989
27463
  value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
@@ -29561,7 +28035,7 @@ var GyReissue = function GyReissue(props) {
29561
28035
  span: 12
29562
28036
  },
29563
28037
  sm: {
29564
- span: 4
28038
+ span: 6
29565
28039
  }
29566
28040
  }, /*#__PURE__*/React.createElement(Cascader, {
29567
28041
  style: {
@@ -29864,7 +28338,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
29864
28338
  span: 12
29865
28339
  },
29866
28340
  sm: {
29867
- span: 4
28341
+ span: 6
29868
28342
  }
29869
28343
  }, /*#__PURE__*/React.createElement(Cascader, {
29870
28344
  style: {
@@ -30537,8 +29011,7 @@ var SYSTEM_ORDER_COLUMNS_MAP = {
30537
29011
  GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns,
30538
29012
  JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG.columns,
30539
29013
  JY_SYSTEM_ORDER: JY_SYSTEM_ORDER_CONFIG.columns,
30540
- JKY_SYSTEM_ORDER: JKY_SYSTEM_ORDER_CONFIG.columns,
30541
29014
  WDT_RETURN_BILL_NO: WDT_RETURN_BILL_NO_CONFIG.columns
30542
29015
  };
30543
29016
 
30544
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasImage, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync$1 as ApaasUploadAsync, ApaasUploadFile, index as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$2 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$3 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, OrderSubForm, utils as OrderSubFormUtils, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, SYSTEM_ORDER_COLUMNS_MAP, ShopNameSelect as ShopName, SkxGoods, IdInputSelect as SkxIdInputSelect, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$1 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$9 as getJkyColumns, getColumns$5 as getJstColumns, getColumns$7 as getJyColumns, getColumns$6 as getKmColumns, getColumns$8 as getSkxColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns, orderSubFormConstants, renderMap, renderSplitMap };
29017
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasImage, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync$1 as ApaasUploadAsync, ApaasUploadFile, index as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$2 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$3 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, OrderSubForm, utils as OrderSubFormUtils, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, SYSTEM_ORDER_COLUMNS_MAP, ShopNameSelect as ShopName, SkxGoods, IdInputSelect as SkxIdInputSelect, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$1 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$7 as getJyColumns, getColumns$6 as getKmColumns, getColumns$8 as getSkxColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns, orderSubFormConstants, renderMap };