@kmkf-fe-packages/basic-components 2.14.5 → 2.14.6-beta.0

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.
Files changed (2) hide show
  1. package/dist/index.esm.js +77 -38
  2. package/package.json +6 -4
package/dist/index.esm.js CHANGED
@@ -7996,6 +7996,7 @@ var ParseLogistics = function ParseLogistics(props) {
7996
7996
  onChange === null || onChange === void 0 ? void 0 : onChange(data);
7997
7997
  }).catch(function (e) {
7998
7998
  handleAIIdentify(fullAddress);
7999
+ console.log(e);
7999
8000
  }).finally(function () {
8000
8001
  setLoading(false);
8001
8002
  });
@@ -8023,6 +8024,7 @@ var ParseLogistics = function ParseLogistics(props) {
8023
8024
  }
8024
8025
  onChange === null || onChange === void 0 ? void 0 : onChange(data);
8025
8026
  }).catch(function (e) {
8027
+ console.log(e);
8026
8028
  message.error('识别失败,请输入正确的信息');
8027
8029
  }).finally(function () {
8028
8030
  setAiLoading(false);
@@ -12480,7 +12482,7 @@ var Goods = function Goods(props) {
12480
12482
  return querySkus({
12481
12483
  shopId: shopId,
12482
12484
  numIids: numIid
12483
- }).catch(function () {});
12485
+ }).catch(console.debug);
12484
12486
  case 5:
12485
12487
  res = _context3.sent;
12486
12488
  data = (res === null || res === void 0 ? void 0 : res.success) && (res === null || res === void 0 ? void 0 : res.data);
@@ -12864,7 +12866,7 @@ var GoodItem = function GoodItem(props) {
12864
12866
  return querySkus({
12865
12867
  shopId: shopId,
12866
12868
  numIids: numIid
12867
- }).catch(function () {});
12869
+ }).catch(console.debug);
12868
12870
  case 5:
12869
12871
  res = _context3.sent;
12870
12872
  data = (res === null || res === void 0 ? void 0 : res.success) && (res === null || res === void 0 ? void 0 : res.data);
@@ -13744,12 +13746,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
13744
13746
  latestData = data || [];
13745
13747
  LogisticsAddress.setaddressData(latestData);
13746
13748
  setLogisticsAddressData(latestData);
13747
- _context.next = 12;
13749
+ _context.next = 13;
13748
13750
  break;
13749
13751
  case 10:
13750
13752
  _context.prev = 10;
13751
13753
  _context.t0 = _context["catch"](0);
13752
- case 12:
13754
+ console.log(_context.t0);
13755
+ case 13:
13753
13756
  case "end":
13754
13757
  return _context.stop();
13755
13758
  }
@@ -13856,6 +13859,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13856
13859
  });
13857
13860
  }
13858
13861
  }
13862
+ console.log('newValue', newValue);
13859
13863
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue, type);
13860
13864
  };
13861
13865
  //智能识别回调
@@ -14472,14 +14476,21 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14472
14476
  }); // 1、初始值没有 传入值有请求快照
14473
14477
  // 2、初始值有 传入值有 其中有不一样的请求快照
14474
14478
  // 3、初始值有 传入值有 都一样的返回初始值
14479
+ console.log('list', initList, valueList, changeList);
14480
+ // console.log('old', initValue, value, changeValue);
14481
+ // console.log('一样', JSON.stringify(initList) !== JSON.stringify(valueList));
14482
+ // console.log(
14483
+ // '一样2',
14484
+ // JSON.stringify(changeList) !== JSON.stringify(valueList),
14485
+ // );
14475
14486
  if (!(!initList.length && !valueList.length)) {
14476
- _context.next = 7;
14487
+ _context.next = 8;
14477
14488
  break;
14478
14489
  }
14479
14490
  return _context.abrupt("return");
14480
- case 7:
14491
+ case 8:
14481
14492
  if (!(JSON.stringify(initList) === JSON.stringify(valueList))) {
14482
- _context.next = 13;
14493
+ _context.next = 14;
14483
14494
  break;
14484
14495
  }
14485
14496
  initSnapshotList = initValue.reduce(function (prv, next) {
@@ -14498,13 +14509,13 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14498
14509
  setNewValue(initValue);
14499
14510
  onChange(initValue);
14500
14511
  }
14501
- _context.next = 29;
14512
+ _context.next = 30;
14502
14513
  break;
14503
- case 13:
14514
+ case 14:
14504
14515
  if (!(
14505
14516
  //开启了物流快照才会获取快照信息
14506
14517
  hasSnapshot && JSON.stringify(initList) !== JSON.stringify(valueList) && JSON.stringify(changeList) !== JSON.stringify(valueList))) {
14507
- _context.next = 28;
14518
+ _context.next = 29;
14508
14519
  break;
14509
14520
  }
14510
14521
  hasSave.current = false;
@@ -14513,7 +14524,7 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14513
14524
  });
14514
14525
  listValue = cloneDeep(value);
14515
14526
  if (!hasValue) {
14516
- _context.next = 23;
14527
+ _context.next = 24;
14517
14528
  break;
14518
14529
  }
14519
14530
  requestList = valueList.map(function (item) {
@@ -14532,9 +14543,9 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14532
14543
  });
14533
14544
  }
14534
14545
  });
14535
- _context.next = 21;
14546
+ _context.next = 22;
14536
14547
  return Promise.allSettled(requestList);
14537
- case 21:
14548
+ case 22:
14538
14549
  requestValues = _context.sent;
14539
14550
  listValue = cloneDeep(value).map(function (item, index) {
14540
14551
  var _requestValues$index, _requestValues$index$, _requestValues$index$2;
@@ -14542,15 +14553,15 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14542
14553
  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
14543
14554
  });
14544
14555
  });
14545
- case 23:
14556
+ case 24:
14546
14557
  setChangeValue(listValue);
14547
14558
  setNewValue(listValue);
14548
14559
  onChange(listValue);
14549
- _context.next = 29;
14560
+ _context.next = 30;
14550
14561
  break;
14551
- case 28:
14552
- setNewValue(value);
14553
14562
  case 29:
14563
+ setNewValue(value);
14564
+ case 30:
14554
14565
  case "end":
14555
14566
  return _context.stop();
14556
14567
  }
@@ -14649,6 +14660,7 @@ var jstGoods = function jstGoods(props) {
14649
14660
  return item.sendId;
14650
14661
  })) {
14651
14662
  var orderNo = form === null || form === void 0 ? void 0 : form.getFieldValue('m3ap1EvEyd');
14663
+ console.log('发货仓走兜底处理-oldValue--', orderNo, cloneDeep(value));
14652
14664
  var newValue = cloneDeep(value).map(function (item) {
14653
14665
  if (item.sendSnapshotName || !item.sendId) return item;
14654
14666
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -14658,6 +14670,7 @@ var jstGoods = function jstGoods(props) {
14658
14670
  Monitor.automaticReport({
14659
14671
  message: "\u53D1\u8D27\u4ED3\u8D70\u515C\u5E95\u5904\u7406-".concat(orderNo || '', "-oldValue-").concat(JSON.stringify(cloneDeep(value)), ",newValue-").concat(JSON.stringify(cloneDeep(newValue)))
14660
14672
  });
14673
+ console.log('发货仓走兜底处理-newValue--', orderNo, cloneDeep(newValue));
14661
14674
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14662
14675
  }
14663
14676
  }, [JSON.stringify(value || []), type]);
@@ -19296,6 +19309,7 @@ var SearchHeader = function SearchHeader(_ref) {
19296
19309
  timeOptions = _ref.timeOptions,
19297
19310
  ShopList = _ref.ShopList,
19298
19311
  onSubmit = _ref.onSubmit;
19312
+ console.log('allFields', allFields);
19299
19313
  // const fixedFieldsOptions = useMemo(() => {
19300
19314
  // return allFields.filter(item => fixedFields?.includes(item.id));
19301
19315
  // }, [fixedFields, allFields]);
@@ -19551,7 +19565,9 @@ var WorkorderList = function WorkorderList(props, ref) {
19551
19565
  loading: false
19552
19566
  }));
19553
19567
  setWorkOrderList(newDataSource);
19554
- }).catch(function (error) {}));
19568
+ }).catch(function (error) {
19569
+ console.log('**** 获取表格数据错误', error);
19570
+ }));
19555
19571
  case 19:
19556
19572
  case "end":
19557
19573
  return _context.stop();
@@ -23838,6 +23854,7 @@ var getColumns$6 = function getColumns() {
23838
23854
  title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
23839
23855
  width: 100,
23840
23856
  validator: function validator(_rule, value, extraParams) {
23857
+ console.log('实际补发数量-extraParams', extraParams);
23841
23858
  if (!(extraParams === null || extraParams === void 0 ? void 0 : extraParams.quantityVerify)) return undefined;
23842
23859
  var title = '';
23843
23860
  if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
@@ -26614,7 +26631,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
26614
26631
  while (1) switch (_context2.prev = _context2.next) {
26615
26632
  case 0:
26616
26633
  if (!validSystemOrderFn) {
26617
- _context2.next = 6;
26634
+ _context2.next = 7;
26618
26635
  break;
26619
26636
  }
26620
26637
  _context2.next = 3;
@@ -26622,38 +26639,39 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
26622
26639
  case 3:
26623
26640
  flag = _context2.sent;
26624
26641
  if (!(flag === false)) {
26625
- _context2.next = 6;
26642
+ _context2.next = 7;
26626
26643
  break;
26627
26644
  }
26645
+ console.log('validSystemOrderFn校验不通过');
26628
26646
  return _context2.abrupt("return");
26629
- case 6:
26647
+ case 7:
26630
26648
  if (!validSystemOrder) {
26631
- _context2.next = 9;
26649
+ _context2.next = 10;
26632
26650
  break;
26633
26651
  }
26634
26652
  message.warning('请选择补发系统单');
26635
26653
  return _context2.abrupt("return");
26636
- case 9:
26654
+ case 10:
26637
26655
  if (!(getDataSourceAsync && (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || isReloadSelectTable))) {
26638
- _context2.next = 12;
26656
+ _context2.next = 13;
26639
26657
  break;
26640
26658
  }
26641
- _context2.next = 12;
26659
+ _context2.next = 13;
26642
26660
  return getDataSourceAsync();
26643
- case 12:
26661
+ case 13:
26644
26662
  if (!['KM_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS'].includes(type)) {
26645
- _context2.next = 15;
26663
+ _context2.next = 16;
26646
26664
  break;
26647
26665
  }
26648
- _context2.next = 15;
26666
+ _context2.next = 16;
26649
26667
  return getKmSupplier(dataSource);
26650
- case 15:
26668
+ case 16:
26651
26669
  setTradeGoodsVisible(true);
26652
26670
  // 补发直接传入的是systemNo
26653
26671
  if (isShowSelect && isReissueType) {
26654
26672
  setSelectSystemNo(selectedSystemOrders || []);
26655
26673
  }
26656
- case 17:
26674
+ case 18:
26657
26675
  case "end":
26658
26676
  return _context2.stop();
26659
26677
  }
@@ -26863,6 +26881,7 @@ var GoodItem$1 = function GoodItem(props) {
26863
26881
  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', 'DXD_GOODS', 'DXD_SUPPLIERS', 'TTX_GOODS', 'WLN_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
26864
26882
  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', 'WLN_REISSUE_GOODS'].includes(type) || false;
26865
26883
  var refModal = useRef();
26884
+ console.debug('表格数据', value);
26866
26885
  var handleDelete = function handleDelete(record, index) {
26867
26886
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
26868
26887
  var newList = _toConsumableArray(value).filter(function (item, i) {
@@ -27638,6 +27657,7 @@ var BsReissue = function BsReissue(props) {
27638
27657
  var _typeMap$type2;
27639
27658
  pubsub.subscribe("".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$type2 = typeMap[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.reissueSelectList), function (_, data) {
27640
27659
  var _typeMap$type3;
27660
+ console.log('reissueSelectList', data);
27641
27661
  if (disabled) return;
27642
27662
  var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
27643
27663
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
@@ -29658,6 +29678,7 @@ var OrderSubForm = function OrderSubForm(props) {
29658
29678
  manual = props.manual,
29659
29679
  correlationList = props.subConfig.correlationList,
29660
29680
  effects = props.effects;
29681
+ console.log('effects', effects);
29661
29682
  var valueRef = useRef(value);
29662
29683
  useEffect(function () {
29663
29684
  valueRef.current = value;
@@ -29854,7 +29875,7 @@ var OrderSubForm = function OrderSubForm(props) {
29854
29875
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
29855
29876
  allOrders: allOrders
29856
29877
  }));
29857
- }).catch(function () {}) : Promise.resolve();
29878
+ }).catch(console.debug) : Promise.resolve();
29858
29879
  };
29859
29880
  var getAllTradeGoodsDetails = function getAllTradeGoodsDetails() {
29860
29881
  var goodDetails = (value === null || value === void 0 ? void 0 : value.allOrders) || [];
@@ -31204,23 +31225,29 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
31204
31225
  var getDataSourceAsync = function getDataSourceAsync() {
31205
31226
  return new Promise(function (resolve) {
31206
31227
  pubsub.subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
31207
- var _componentMap$compTyp9;
31228
+ var _componentMap$compTyp9, _componentMap$compTyp10;
31208
31229
  resolve(data);
31230
+ console.log('getDataSourceAsync---111data--', data, getGoodDetails({
31231
+ returnGoodsValue: data,
31232
+ mode: isStrict,
31233
+ isAllOrders: componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp9 = componentMap$4[compType]) === null || _componentMap$compTyp9 === void 0 ? void 0 : _componentMap$compTyp9.isShowSelectTradeGoods
31234
+ }));
31209
31235
  setOriginDataSource(getGoodDetails({
31210
31236
  returnGoodsValue: data,
31211
- isAllOrders: componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp9 = componentMap$4[compType]) === null || _componentMap$compTyp9 === void 0 ? void 0 : _componentMap$compTyp9.isShowSelectTradeGoods,
31237
+ isAllOrders: componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp10 = componentMap$4[compType]) === null || _componentMap$compTyp10 === void 0 ? void 0 : _componentMap$compTyp10.isShowSelectTradeGoods,
31212
31238
  mode: isStrict
31213
31239
  }));
31214
31240
  });
31215
31241
  pubsub.publish(componentMap$4[compType].eventNameMap.returnGoodsSysorder, compType);
31216
31242
  });
31217
31243
  };
31244
+ console.log('aaa--', originDataSource);
31218
31245
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
31219
31246
  key: componentMap$4[compType].type
31220
31247
  }, props), {}, {
31221
31248
  validSystemOrderFn: function validSystemOrderFn() {
31222
- var _componentMap$compTyp10, _componentMap$compTyp11;
31223
- return (_componentMap$compTyp10 = (_componentMap$compTyp11 = componentMap$4[compType]).validSystemOrderFn) === null || _componentMap$compTyp10 === void 0 ? void 0 : _componentMap$compTyp10.call(_componentMap$compTyp11, form);
31249
+ var _componentMap$compTyp11, _componentMap$compTyp12;
31250
+ return (_componentMap$compTyp11 = (_componentMap$compTyp12 = componentMap$4[compType]).validSystemOrderFn) === null || _componentMap$compTyp11 === void 0 ? void 0 : _componentMap$compTyp11.call(_componentMap$compTyp12, form);
31224
31251
  },
31225
31252
  isReloadSelectTable: componentMap$4[compType].isReloadSelectTable,
31226
31253
  disabled: disabled,
@@ -34071,13 +34098,20 @@ var IdInputSelect = function IdInputSelect(props) {
34071
34098
  tradeId = form.getFieldValue('m3ap1EvEyd');
34072
34099
  skxReturnExpressCode = (_form$getFieldValue = form.getFieldValue('4487c6516b')) === null || _form$getFieldValue === void 0 ? void 0 : (_form$getFieldValue$ = _form$getFieldValue[0]) === null || _form$getFieldValue$ === void 0 ? void 0 : _form$getFieldValue$.logisticsCode;
34073
34100
  blurFrom = form.getFieldValue('skx_return_billNo_blur_from');
34101
+ console.log('asyncQueryData---', {
34102
+ skxReturnExpressCode: skxReturnExpressCode,
34103
+ blurFrom: blurFrom,
34104
+ tradeId: tradeId,
34105
+ tradeIdRef: tradeIdRef.current,
34106
+ form: form
34107
+ });
34074
34108
  if (!(type === 'SKX_OUTBOUND_NOTICE_NO' && !tradeId || type === 'SKX_RETURN_BILL_NO' && !tradeId && !skxReturnExpressCode)) {
34075
- _context3.next = 6;
34109
+ _context3.next = 7;
34076
34110
  break;
34077
34111
  }
34078
34112
  setDataSource([]);
34079
34113
  return _context3.abrupt("return");
34080
- case 6:
34114
+ case 7:
34081
34115
  setSpinning(true);
34082
34116
  // 判断是从哪个组件失焦,若是从[SKX]退换物流信息(TH)失焦,则根据物流单号查询,若是从订单号组件失焦,则根据订单号查询
34083
34117
  typeMap$6[type].asyncGetData(type === 'SKX_RETURN_BILL_NO' && blurFrom === '4487c6516b' ? {
@@ -34091,7 +34125,7 @@ var IdInputSelect = function IdInputSelect(props) {
34091
34125
  }).finally(function () {
34092
34126
  setSpinning(false);
34093
34127
  });
34094
- case 8:
34128
+ case 9:
34095
34129
  case "end":
34096
34130
  return _context3.stop();
34097
34131
  }
@@ -34183,6 +34217,11 @@ var IdInputSelect = function IdInputSelect(props) {
34183
34217
  }))));
34184
34218
  };
34185
34219
  var handleChange = function handleChange(val, isInput) {
34220
+ console.log('handleChange---', {
34221
+ val: val,
34222
+ value: value,
34223
+ isInput: isInput
34224
+ });
34186
34225
  var isReturnBillNoChange = type === 'SKX_RETURN_BILL_NO' && form.getFieldValue('skx_return_billNo_blur_from') === '4487c6516b';
34187
34226
  onChange === null || onChange === void 0 ? void 0 : onChange(val, value !== val && (!!isInput || isReturnBillNoChange));
34188
34227
  // 如果类型是[SKX]退换货单号,则根据blurFrom判断是从[SKX]退换物流信息(TH)失焦,则调用onBlur
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.14.5",
3
+ "version": "2.14.6-beta.0",
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": "2.14.5",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.14.6-beta.0",
24
24
  "ahooks": "^3.7.4",
25
25
  "ali-react-table": "2.6.1",
26
26
  "bignumber.js": "^9.1.2",
@@ -64,7 +64,9 @@
64
64
  "react": "^16.8.0"
65
65
  },
66
66
  "publishConfig": {
67
- "access": "public"
67
+ "access": "public",
68
+ "registry": "https://registry.npmjs.org/",
69
+ "tag": "beta"
68
70
  },
69
- "gitHead": "2c624bb991f3e6fc32e567c8c2cb7ebab371a6d7"
71
+ "gitHead": "d3a796f267d541bc8afcfb22e8b979a24a0c44a4"
70
72
  }