@kmkf-fe-packages/basic-components 0.21.6-alpha.3 → 0.21.6-alpha.5

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/README.md CHANGED
@@ -17,5 +17,4 @@ yarn start
17
17
  - business 快麦工单业务组件
18
18
  - common 公共组件
19
19
  - config 公共方法
20
- - assets 静态资源
21
- -
20
+ - assets 静态资源
package/dist/index.esm.js CHANGED
@@ -9230,7 +9230,9 @@ var Payment = function Payment(props) {
9230
9230
  shopList = props.shopList,
9231
9231
  onChange = props.onChange,
9232
9232
  onSearch = props.onSearch,
9233
- _onBlur = props.onBlur;
9233
+ _onBlur = props.onBlur,
9234
+ _props$replaceValueCh = props.replaceValueCh,
9235
+ replaceValueCh = _props$replaceValueCh === void 0 ? {} : _props$replaceValueCh;
9234
9236
  useEffect(function () {
9235
9237
  var platformList = ['TAOBAO', 'FXG'];
9236
9238
  var showBuyerId = (shopList || []).some(function (item) {
@@ -9307,7 +9309,11 @@ var Payment = function Payment(props) {
9307
9309
  onBlur: function onBlur(e) {
9308
9310
  return _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, item.name);
9309
9311
  }
9310
- }));
9312
+ }), (replaceValueCh === null || replaceValueCh === void 0 ? void 0 : replaceValueCh[item.name]) && /*#__PURE__*/React.createElement("p", {
9313
+ style: {
9314
+ color: '#e99d42'
9315
+ }
9316
+ }, replaceValueCh === null || replaceValueCh === void 0 ? void 0 : replaceValueCh[item.name]));
9311
9317
  }));
9312
9318
  };
9313
9319
 
@@ -9784,11 +9790,12 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9784
9790
  });
9785
9791
  var initHandle = /*#__PURE__*/function () {
9786
9792
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
9787
- var initValue, value, initList, valueList, changeList, initSnapshotList, valueSnapshotList, hasValue, listValue, requestList, requestValues;
9793
+ var initValue, value, hasSnapshot, initList, valueList, changeList, initSnapshotList, valueSnapshotList, hasValue, listValue, requestList, requestValues;
9788
9794
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9789
9795
  while (1) switch (_context.prev = _context.next) {
9790
9796
  case 0:
9791
9797
  initValue = _ref.initValue, value = _ref.value;
9798
+ hasSnapshot = showField && showField.includes('snapshot');
9792
9799
  initList = initValue.map(function (item) {
9793
9800
  if (item.trajectoryCompany === 'SF') {
9794
9801
  return {
@@ -9840,8 +9847,14 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9840
9847
  // '一样2',
9841
9848
  // JSON.stringify(changeList) !== JSON.stringify(valueList),
9842
9849
  // );
9850
+ if (!(!initList.length && !valueList.length)) {
9851
+ _context.next = 8;
9852
+ break;
9853
+ }
9854
+ return _context.abrupt("return");
9855
+ case 8:
9843
9856
  if (!(JSON.stringify(initList) === JSON.stringify(valueList))) {
9844
- _context.next = 11;
9857
+ _context.next = 14;
9845
9858
  break;
9846
9859
  }
9847
9860
  initSnapshotList = initValue.reduce(function (prv, next) {
@@ -9860,35 +9873,43 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9860
9873
  setNewValue(initValue);
9861
9874
  onChange(initValue);
9862
9875
  }
9863
- _context.next = 24;
9876
+ _context.next = 30;
9864
9877
  break;
9865
- case 11:
9866
- if (!(JSON.stringify(initList) !== JSON.stringify(valueList) && JSON.stringify(changeList) !== JSON.stringify(valueList))) {
9867
- _context.next = 24;
9878
+ case 14:
9879
+ if (!(
9880
+ //开启了物流快照才会获取快照信息
9881
+ hasSnapshot && JSON.stringify(initList) !== JSON.stringify(valueList) && JSON.stringify(changeList) !== JSON.stringify(valueList))) {
9882
+ _context.next = 29;
9868
9883
  break;
9869
9884
  }
9870
9885
  hasSave.current = false;
9871
- hasValue = valueList.every(function (item) {
9886
+ hasValue = valueList.some(function (item) {
9872
9887
  return item.trajectoryCompany && item.trajectoryCode;
9873
9888
  });
9874
9889
  listValue = cloneDeep(value);
9875
9890
  if (!hasValue) {
9876
- _context.next = 21;
9891
+ _context.next = 24;
9877
9892
  break;
9878
9893
  }
9879
9894
  requestList = valueList.map(function (item) {
9880
- return extendRequest('/qy/logistics/logisticsTraceSearch', {
9881
- method: 'post',
9882
- data: {
9883
- mailNo: item.trajectoryCode,
9884
- cpCode: item.trajectoryCompany,
9885
- mobile: item.trajectoryPhone
9886
- }
9887
- });
9895
+ if (item.trajectoryCode && item.trajectoryCompany) {
9896
+ return extendRequest('/qy/logistics/logisticsTraceSearch', {
9897
+ method: 'post',
9898
+ data: {
9899
+ mailNo: item.trajectoryCode,
9900
+ cpCode: item.trajectoryCompany,
9901
+ mobile: item.trajectoryPhone
9902
+ }
9903
+ });
9904
+ } else {
9905
+ return new Promise(function (resolve) {
9906
+ resolve({});
9907
+ });
9908
+ }
9888
9909
  });
9889
- _context.next = 19;
9910
+ _context.next = 22;
9890
9911
  return Promise.allSettled(requestList);
9891
- case 19:
9912
+ case 22:
9892
9913
  requestValues = _context.sent;
9893
9914
  listValue = cloneDeep(value).map(function (item, index) {
9894
9915
  var _requestValues$index, _requestValues$index$, _requestValues$index$2;
@@ -9896,11 +9917,15 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9896
9917
  trajectorySnapshot: (_requestValues$index = requestValues[index]) === null || _requestValues$index === void 0 ? void 0 : (_requestValues$index$ = _requestValues$index.value) === null || _requestValues$index$ === void 0 ? void 0 : (_requestValues$index$2 = _requestValues$index$.data) === null || _requestValues$index$2 === void 0 ? void 0 : _requestValues$index$2.logisticsStatusDesc
9897
9918
  });
9898
9919
  });
9899
- case 21:
9920
+ case 24:
9900
9921
  setChangeValue(listValue);
9901
9922
  setNewValue(listValue);
9902
9923
  onChange(listValue);
9903
- case 24:
9924
+ _context.next = 30;
9925
+ break;
9926
+ case 29:
9927
+ setNewValue(value);
9928
+ case 30:
9904
9929
  case "end":
9905
9930
  return _context.stop();
9906
9931
  }
@@ -10810,9 +10835,10 @@ var BsGoods = function BsGoods(props) {
10810
10835
  };
10811
10836
  setTableSelect(['2', '4'].includes(data.val));
10812
10837
  if (['1', '3'].includes(data.val)) {
10813
- var _valueRef$current;
10838
+ var _valueRef$current, _valueRef$current2;
10814
10839
  pubsub.publish('selectListReturn', {
10815
10840
  list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current.bsGoods) || []),
10841
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode,
10816
10842
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
10817
10843
  });
10818
10844
  }
@@ -10827,13 +10853,14 @@ var BsGoods = function BsGoods(props) {
10827
10853
  };
10828
10854
  setTableSelect(['2', '4'].includes(data.val));
10829
10855
  if (['1', '3'].includes(data.val)) {
10830
- var _valueRef$current2;
10856
+ var _valueRef$current3, _valueRef$current4;
10831
10857
  // console.log(
10832
10858
  // 'goods-reissueSelectListReturn',
10833
10859
  // valueRef?.current?.bsGoods,
10834
10860
  // );
10835
10861
  pubsub.publish('reissueSelectListReturn', {
10836
- list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.bsGoods) || []),
10862
+ list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3.bsGoods) || []),
10863
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4.shopCode,
10837
10864
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
10838
10865
  });
10839
10866
  }
@@ -10848,9 +10875,10 @@ var BsGoods = function BsGoods(props) {
10848
10875
  };
10849
10876
  setTableSelect(['2', '4'].includes(data.val));
10850
10877
  if (['1', '3'].includes(data.val)) {
10851
- var _valueRef$current3;
10878
+ var _valueRef$current5, _valueRef$current6;
10852
10879
  pubsub.publish('returnSelectListReturn', {
10853
- list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3.bsGoods) || []),
10880
+ list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5.bsGoods) || []),
10881
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
10854
10882
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
10855
10883
  });
10856
10884
  }
@@ -10866,7 +10894,7 @@ var BsGoods = function BsGoods(props) {
10866
10894
  };
10867
10895
  }, [disabled]);
10868
10896
  var _onSelect = function onSelect(list) {
10869
- var _withInfo$current, _withInfo$current2;
10897
+ var _withInfo$current, _withInfo$current2, _valueRef$current7;
10870
10898
  if (disabled) return;
10871
10899
  var newList = cloneDeep(list);
10872
10900
  var typeMap = {
@@ -10882,6 +10910,7 @@ var BsGoods = function BsGoods(props) {
10882
10910
  item.canDelete = true;
10883
10911
  return item;
10884
10912
  }),
10913
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
10885
10914
  goodValue: withInfo.current.goodValue
10886
10915
  });
10887
10916
  };
@@ -10959,6 +10988,7 @@ var BsExchange = function BsExchange(props) {
10959
10988
  if (disabled) return;
10960
10989
  var newDataList = cloneDeep((data === null || data === void 0 ? void 0 : data.list) || []);
10961
10990
  onChange(_objectSpread2(_objectSpread2({}, data.goodValue), {}, {
10991
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode,
10962
10992
  bsExchangeReturnGoods: getListHandle(newDataList, valueRef.current)
10963
10993
  }));
10964
10994
  });
@@ -10969,6 +10999,7 @@ var BsExchange = function BsExchange(props) {
10969
10999
  var newValue = _objectSpread2({}, data.goodValue);
10970
11000
  var newDataList = cloneDeep((data === null || data === void 0 ? void 0 : data.list) || []);
10971
11001
  onChange(_objectSpread2(_objectSpread2({}, newValue), {}, {
11002
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode,
10972
11003
  bsExchangeReturnGoods: getListHandle(newDataList, newValue)
10973
11004
  }));
10974
11005
  });
@@ -11162,7 +11193,9 @@ var BsReissue = function BsReissue(props) {
11162
11193
  pubsub.subscribe('reissueSelectList', function (_, data) {
11163
11194
  // console.log('reissueSelectList', data);
11164
11195
  if (disabled) return;
11165
- var newValue = _objectSpread2({}, data.goodValue);
11196
+ var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
11197
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode
11198
+ });
11166
11199
  newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
11167
11200
  item.money = 0;
11168
11201
  item.share = 0;
@@ -11176,7 +11209,9 @@ var BsReissue = function BsReissue(props) {
11176
11209
  pubsub.subscribe('reissueSelectListReturn', function (_, data) {
11177
11210
  // console.log('reissueSelectListReturn', data);
11178
11211
  if (disabled) return;
11179
- var newValue = _objectSpread2({}, data.goodValue);
11212
+ var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
11213
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode
11214
+ });
11180
11215
  newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
11181
11216
  item.money = 0;
11182
11217
  item.share = 0;
@@ -11269,7 +11304,9 @@ var BsReturnGoods = function BsReturnGoods(props) {
11269
11304
  pubsub.subscribe('returnSelectList', function (_, data) {
11270
11305
  // console.log('returnSelectList', data);
11271
11306
  if (disabled) return;
11272
- var newValue = _objectSpread2({}, data.goodValue);
11307
+ var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
11308
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode
11309
+ });
11273
11310
  newValue.bsReturnGoods = (data === null || data === void 0 ? void 0 : data.list) || [];
11274
11311
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
11275
11312
  });
@@ -11278,7 +11315,9 @@ var BsReturnGoods = function BsReturnGoods(props) {
11278
11315
  pubsub.subscribe('returnSelectListReturn', function (_, data) {
11279
11316
  // console.log('returnSelectListReturn', data);
11280
11317
  if (disabled) return;
11281
- var newValue = _objectSpread2({}, data.goodValue);
11318
+ var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
11319
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode
11320
+ });
11282
11321
  newValue.bsReturnGoods = (data === null || data === void 0 ? void 0 : data.list) || [];
11283
11322
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
11284
11323
  });
package/dist/index.js CHANGED
@@ -9241,7 +9241,9 @@ var Payment = function Payment(props) {
9241
9241
  shopList = props.shopList,
9242
9242
  onChange = props.onChange,
9243
9243
  onSearch = props.onSearch,
9244
- _onBlur = props.onBlur;
9244
+ _onBlur = props.onBlur,
9245
+ _props$replaceValueCh = props.replaceValueCh,
9246
+ replaceValueCh = _props$replaceValueCh === void 0 ? {} : _props$replaceValueCh;
9245
9247
  React.useEffect(function () {
9246
9248
  var platformList = ['TAOBAO', 'FXG'];
9247
9249
  var showBuyerId = (shopList || []).some(function (item) {
@@ -9318,7 +9320,11 @@ var Payment = function Payment(props) {
9318
9320
  onBlur: function onBlur(e) {
9319
9321
  return _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, item.name);
9320
9322
  }
9321
- }));
9323
+ }), (replaceValueCh === null || replaceValueCh === void 0 ? void 0 : replaceValueCh[item.name]) && /*#__PURE__*/React__default['default'].createElement("p", {
9324
+ style: {
9325
+ color: '#e99d42'
9326
+ }
9327
+ }, replaceValueCh === null || replaceValueCh === void 0 ? void 0 : replaceValueCh[item.name]));
9322
9328
  }));
9323
9329
  };
9324
9330
 
@@ -9795,11 +9801,12 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9795
9801
  });
9796
9802
  var initHandle = /*#__PURE__*/function () {
9797
9803
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
9798
- var initValue, value, initList, valueList, changeList, initSnapshotList, valueSnapshotList, hasValue, listValue, requestList, requestValues;
9804
+ var initValue, value, hasSnapshot, initList, valueList, changeList, initSnapshotList, valueSnapshotList, hasValue, listValue, requestList, requestValues;
9799
9805
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9800
9806
  while (1) switch (_context.prev = _context.next) {
9801
9807
  case 0:
9802
9808
  initValue = _ref.initValue, value = _ref.value;
9809
+ hasSnapshot = showField && showField.includes('snapshot');
9803
9810
  initList = initValue.map(function (item) {
9804
9811
  if (item.trajectoryCompany === 'SF') {
9805
9812
  return {
@@ -9851,8 +9858,14 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9851
9858
  // '一样2',
9852
9859
  // JSON.stringify(changeList) !== JSON.stringify(valueList),
9853
9860
  // );
9861
+ if (!(!initList.length && !valueList.length)) {
9862
+ _context.next = 8;
9863
+ break;
9864
+ }
9865
+ return _context.abrupt("return");
9866
+ case 8:
9854
9867
  if (!(JSON.stringify(initList) === JSON.stringify(valueList))) {
9855
- _context.next = 11;
9868
+ _context.next = 14;
9856
9869
  break;
9857
9870
  }
9858
9871
  initSnapshotList = initValue.reduce(function (prv, next) {
@@ -9871,35 +9884,43 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9871
9884
  setNewValue(initValue);
9872
9885
  onChange(initValue);
9873
9886
  }
9874
- _context.next = 24;
9887
+ _context.next = 30;
9875
9888
  break;
9876
- case 11:
9877
- if (!(JSON.stringify(initList) !== JSON.stringify(valueList) && JSON.stringify(changeList) !== JSON.stringify(valueList))) {
9878
- _context.next = 24;
9889
+ case 14:
9890
+ if (!(
9891
+ //开启了物流快照才会获取快照信息
9892
+ hasSnapshot && JSON.stringify(initList) !== JSON.stringify(valueList) && JSON.stringify(changeList) !== JSON.stringify(valueList))) {
9893
+ _context.next = 29;
9879
9894
  break;
9880
9895
  }
9881
9896
  hasSave.current = false;
9882
- hasValue = valueList.every(function (item) {
9897
+ hasValue = valueList.some(function (item) {
9883
9898
  return item.trajectoryCompany && item.trajectoryCode;
9884
9899
  });
9885
9900
  listValue = lodash.cloneDeep(value);
9886
9901
  if (!hasValue) {
9887
- _context.next = 21;
9902
+ _context.next = 24;
9888
9903
  break;
9889
9904
  }
9890
9905
  requestList = valueList.map(function (item) {
9891
- return extendRequest('/qy/logistics/logisticsTraceSearch', {
9892
- method: 'post',
9893
- data: {
9894
- mailNo: item.trajectoryCode,
9895
- cpCode: item.trajectoryCompany,
9896
- mobile: item.trajectoryPhone
9897
- }
9898
- });
9906
+ if (item.trajectoryCode && item.trajectoryCompany) {
9907
+ return extendRequest('/qy/logistics/logisticsTraceSearch', {
9908
+ method: 'post',
9909
+ data: {
9910
+ mailNo: item.trajectoryCode,
9911
+ cpCode: item.trajectoryCompany,
9912
+ mobile: item.trajectoryPhone
9913
+ }
9914
+ });
9915
+ } else {
9916
+ return new Promise(function (resolve) {
9917
+ resolve({});
9918
+ });
9919
+ }
9899
9920
  });
9900
- _context.next = 19;
9921
+ _context.next = 22;
9901
9922
  return Promise.allSettled(requestList);
9902
- case 19:
9923
+ case 22:
9903
9924
  requestValues = _context.sent;
9904
9925
  listValue = lodash.cloneDeep(value).map(function (item, index) {
9905
9926
  var _requestValues$index, _requestValues$index$, _requestValues$index$2;
@@ -9907,11 +9928,15 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9907
9928
  trajectorySnapshot: (_requestValues$index = requestValues[index]) === null || _requestValues$index === void 0 ? void 0 : (_requestValues$index$ = _requestValues$index.value) === null || _requestValues$index$ === void 0 ? void 0 : (_requestValues$index$2 = _requestValues$index$.data) === null || _requestValues$index$2 === void 0 ? void 0 : _requestValues$index$2.logisticsStatusDesc
9908
9929
  });
9909
9930
  });
9910
- case 21:
9931
+ case 24:
9911
9932
  setChangeValue(listValue);
9912
9933
  setNewValue(listValue);
9913
9934
  onChange(listValue);
9914
- case 24:
9935
+ _context.next = 30;
9936
+ break;
9937
+ case 29:
9938
+ setNewValue(value);
9939
+ case 30:
9915
9940
  case "end":
9916
9941
  return _context.stop();
9917
9942
  }
@@ -10821,9 +10846,10 @@ var BsGoods = function BsGoods(props) {
10821
10846
  };
10822
10847
  setTableSelect(['2', '4'].includes(data.val));
10823
10848
  if (['1', '3'].includes(data.val)) {
10824
- var _valueRef$current;
10849
+ var _valueRef$current, _valueRef$current2;
10825
10850
  pubsub__default['default'].publish('selectListReturn', {
10826
10851
  list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current.bsGoods) || []),
10852
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode,
10827
10853
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
10828
10854
  });
10829
10855
  }
@@ -10838,13 +10864,14 @@ var BsGoods = function BsGoods(props) {
10838
10864
  };
10839
10865
  setTableSelect(['2', '4'].includes(data.val));
10840
10866
  if (['1', '3'].includes(data.val)) {
10841
- var _valueRef$current2;
10867
+ var _valueRef$current3, _valueRef$current4;
10842
10868
  // console.log(
10843
10869
  // 'goods-reissueSelectListReturn',
10844
10870
  // valueRef?.current?.bsGoods,
10845
10871
  // );
10846
10872
  pubsub__default['default'].publish('reissueSelectListReturn', {
10847
- list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.bsGoods) || []),
10873
+ list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3.bsGoods) || []),
10874
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4.shopCode,
10848
10875
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
10849
10876
  });
10850
10877
  }
@@ -10859,9 +10886,10 @@ var BsGoods = function BsGoods(props) {
10859
10886
  };
10860
10887
  setTableSelect(['2', '4'].includes(data.val));
10861
10888
  if (['1', '3'].includes(data.val)) {
10862
- var _valueRef$current3;
10889
+ var _valueRef$current5, _valueRef$current6;
10863
10890
  pubsub__default['default'].publish('returnSelectListReturn', {
10864
- list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3.bsGoods) || []),
10891
+ list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5.bsGoods) || []),
10892
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
10865
10893
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
10866
10894
  });
10867
10895
  }
@@ -10877,7 +10905,7 @@ var BsGoods = function BsGoods(props) {
10877
10905
  };
10878
10906
  }, [disabled]);
10879
10907
  var _onSelect = function onSelect(list) {
10880
- var _withInfo$current, _withInfo$current2;
10908
+ var _withInfo$current, _withInfo$current2, _valueRef$current7;
10881
10909
  if (disabled) return;
10882
10910
  var newList = lodash.cloneDeep(list);
10883
10911
  var typeMap = {
@@ -10893,6 +10921,7 @@ var BsGoods = function BsGoods(props) {
10893
10921
  item.canDelete = true;
10894
10922
  return item;
10895
10923
  }),
10924
+ shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
10896
10925
  goodValue: withInfo.current.goodValue
10897
10926
  });
10898
10927
  };
@@ -10970,6 +10999,7 @@ var BsExchange = function BsExchange(props) {
10970
10999
  if (disabled) return;
10971
11000
  var newDataList = lodash.cloneDeep((data === null || data === void 0 ? void 0 : data.list) || []);
10972
11001
  onChange(_objectSpread2(_objectSpread2({}, data.goodValue), {}, {
11002
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode,
10973
11003
  bsExchangeReturnGoods: getListHandle(newDataList, valueRef.current)
10974
11004
  }));
10975
11005
  });
@@ -10980,6 +11010,7 @@ var BsExchange = function BsExchange(props) {
10980
11010
  var newValue = _objectSpread2({}, data.goodValue);
10981
11011
  var newDataList = lodash.cloneDeep((data === null || data === void 0 ? void 0 : data.list) || []);
10982
11012
  onChange(_objectSpread2(_objectSpread2({}, newValue), {}, {
11013
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode,
10983
11014
  bsExchangeReturnGoods: getListHandle(newDataList, newValue)
10984
11015
  }));
10985
11016
  });
@@ -11173,7 +11204,9 @@ var BsReissue = function BsReissue(props) {
11173
11204
  pubsub__default['default'].subscribe('reissueSelectList', function (_, data) {
11174
11205
  // console.log('reissueSelectList', data);
11175
11206
  if (disabled) return;
11176
- var newValue = _objectSpread2({}, data.goodValue);
11207
+ var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
11208
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode
11209
+ });
11177
11210
  newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
11178
11211
  item.money = 0;
11179
11212
  item.share = 0;
@@ -11187,7 +11220,9 @@ var BsReissue = function BsReissue(props) {
11187
11220
  pubsub__default['default'].subscribe('reissueSelectListReturn', function (_, data) {
11188
11221
  // console.log('reissueSelectListReturn', data);
11189
11222
  if (disabled) return;
11190
- var newValue = _objectSpread2({}, data.goodValue);
11223
+ var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
11224
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode
11225
+ });
11191
11226
  newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
11192
11227
  item.money = 0;
11193
11228
  item.share = 0;
@@ -11280,7 +11315,9 @@ var BsReturnGoods = function BsReturnGoods(props) {
11280
11315
  pubsub__default['default'].subscribe('returnSelectList', function (_, data) {
11281
11316
  // console.log('returnSelectList', data);
11282
11317
  if (disabled) return;
11283
- var newValue = _objectSpread2({}, data.goodValue);
11318
+ var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
11319
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode
11320
+ });
11284
11321
  newValue.bsReturnGoods = (data === null || data === void 0 ? void 0 : data.list) || [];
11285
11322
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
11286
11323
  });
@@ -11289,7 +11326,9 @@ var BsReturnGoods = function BsReturnGoods(props) {
11289
11326
  pubsub__default['default'].subscribe('returnSelectListReturn', function (_, data) {
11290
11327
  // console.log('returnSelectListReturn', data);
11291
11328
  if (disabled) return;
11292
- var newValue = _objectSpread2({}, data.goodValue);
11329
+ var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
11330
+ shopCode: data === null || data === void 0 ? void 0 : data.shopCode
11331
+ });
11293
11332
  newValue.bsReturnGoods = (data === null || data === void 0 ? void 0 : data.list) || [];
11294
11333
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
11295
11334
  });
@@ -10,6 +10,9 @@ export interface PaymentProps {
10
10
  onChange: (value: any) => void;
11
11
  onSearch: (value: any) => void;
12
12
  onBlur: (value: any, type: string) => void;
13
+ replaceValueCh?: {
14
+ [key: string]: string;
15
+ };
13
16
  }
14
17
  declare const Payment: (props: Partial<PaymentProps>) => React.JSX.Element;
15
18
  export default Payment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.21.6-alpha.3",
3
+ "version": "0.21.6-alpha.5",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "^0.21.6-alpha.3",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.21.6-alpha.5",
24
24
  "ahooks": "^3.7.8",
25
25
  "lodash": "^4.17.21",
26
26
  "pubsub-js": "^1.9.4",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "82b6320bc9ae14f532b5aa543d0e6040900c5d78"
65
+ "gitHead": "70403ea96f15ae50fca601163149eeff73d911eb"
66
66
  }