@kmkf-fe-packages/basic-components 2.10.5 → 2.10.6

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 +73 -37
  2. package/package.json +3 -3
package/dist/index.esm.js CHANGED
@@ -7863,6 +7863,7 @@ var ParseLogistics = function ParseLogistics(props) {
7863
7863
  onChange === null || onChange === void 0 ? void 0 : onChange(data);
7864
7864
  }).catch(function (e) {
7865
7865
  handleAIIdentify(fullAddress);
7866
+ console.log(e);
7866
7867
  }).finally(function () {
7867
7868
  setLoading(false);
7868
7869
  });
@@ -7886,6 +7887,7 @@ var ParseLogistics = function ParseLogistics(props) {
7886
7887
  var data = res.data;
7887
7888
  onChange === null || onChange === void 0 ? void 0 : onChange(data);
7888
7889
  }).catch(function (e) {
7890
+ console.log(e);
7889
7891
  message.error('识别失败,请输入正确的信息');
7890
7892
  }).finally(function () {
7891
7893
  setAiLoading(false);
@@ -12116,7 +12118,7 @@ var Goods = function Goods(props) {
12116
12118
  return querySkus({
12117
12119
  shopId: shopId,
12118
12120
  numIids: numIid
12119
- }).catch(function () {});
12121
+ }).catch(console.debug);
12120
12122
  case 5:
12121
12123
  res = _context3.sent;
12122
12124
  data = (res === null || res === void 0 ? void 0 : res.success) && (res === null || res === void 0 ? void 0 : res.data);
@@ -12500,7 +12502,7 @@ var GoodItem = function GoodItem(props) {
12500
12502
  return querySkus({
12501
12503
  shopId: shopId,
12502
12504
  numIids: numIid
12503
- }).catch(function () {});
12505
+ }).catch(console.debug);
12504
12506
  case 5:
12505
12507
  res = _context3.sent;
12506
12508
  data = (res === null || res === void 0 ? void 0 : res.success) && (res === null || res === void 0 ? void 0 : res.data);
@@ -13442,6 +13444,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13442
13444
  });
13443
13445
  }
13444
13446
  }
13447
+ console.log('newValue', newValue);
13445
13448
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue, type);
13446
13449
  };
13447
13450
  //智能识别回调
@@ -14024,14 +14027,21 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14024
14027
  }); // 1、初始值没有 传入值有请求快照
14025
14028
  // 2、初始值有 传入值有 其中有不一样的请求快照
14026
14029
  // 3、初始值有 传入值有 都一样的返回初始值
14030
+ console.log('list', initList, valueList, changeList);
14031
+ // console.log('old', initValue, value, changeValue);
14032
+ // console.log('一样', JSON.stringify(initList) !== JSON.stringify(valueList));
14033
+ // console.log(
14034
+ // '一样2',
14035
+ // JSON.stringify(changeList) !== JSON.stringify(valueList),
14036
+ // );
14027
14037
  if (!(!initList.length && !valueList.length)) {
14028
- _context.next = 7;
14038
+ _context.next = 8;
14029
14039
  break;
14030
14040
  }
14031
14041
  return _context.abrupt("return");
14032
- case 7:
14042
+ case 8:
14033
14043
  if (!(JSON.stringify(initList) === JSON.stringify(valueList))) {
14034
- _context.next = 13;
14044
+ _context.next = 14;
14035
14045
  break;
14036
14046
  }
14037
14047
  initSnapshotList = initValue.reduce(function (prv, next) {
@@ -14050,13 +14060,13 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14050
14060
  setNewValue(initValue);
14051
14061
  onChange(initValue);
14052
14062
  }
14053
- _context.next = 29;
14063
+ _context.next = 30;
14054
14064
  break;
14055
- case 13:
14065
+ case 14:
14056
14066
  if (!(
14057
14067
  //开启了物流快照才会获取快照信息
14058
14068
  hasSnapshot && JSON.stringify(initList) !== JSON.stringify(valueList) && JSON.stringify(changeList) !== JSON.stringify(valueList))) {
14059
- _context.next = 28;
14069
+ _context.next = 29;
14060
14070
  break;
14061
14071
  }
14062
14072
  hasSave.current = false;
@@ -14065,7 +14075,7 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14065
14075
  });
14066
14076
  listValue = cloneDeep(value);
14067
14077
  if (!hasValue) {
14068
- _context.next = 23;
14078
+ _context.next = 24;
14069
14079
  break;
14070
14080
  }
14071
14081
  requestList = valueList.map(function (item) {
@@ -14084,9 +14094,9 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14084
14094
  });
14085
14095
  }
14086
14096
  });
14087
- _context.next = 21;
14097
+ _context.next = 22;
14088
14098
  return Promise.allSettled(requestList);
14089
- case 21:
14099
+ case 22:
14090
14100
  requestValues = _context.sent;
14091
14101
  listValue = cloneDeep(value).map(function (item, index) {
14092
14102
  var _requestValues$index, _requestValues$index$, _requestValues$index$2;
@@ -14094,15 +14104,15 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14094
14104
  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
14095
14105
  });
14096
14106
  });
14097
- case 23:
14107
+ case 24:
14098
14108
  setChangeValue(listValue);
14099
14109
  setNewValue(listValue);
14100
14110
  onChange(listValue);
14101
- _context.next = 29;
14111
+ _context.next = 30;
14102
14112
  break;
14103
- case 28:
14104
- setNewValue(value);
14105
14113
  case 29:
14114
+ setNewValue(value);
14115
+ case 30:
14106
14116
  case "end":
14107
14117
  return _context.stop();
14108
14118
  }
@@ -16272,7 +16282,7 @@ var GoodList = function GoodList(props, ref) {
16272
16282
  } else {
16273
16283
  reject$1(res);
16274
16284
  }
16275
- }).catch(function () {});
16285
+ }).catch(console.error);
16276
16286
  };
16277
16287
  getMore();
16278
16288
  };
@@ -18323,6 +18333,7 @@ var SearchHeader = function SearchHeader(_ref) {
18323
18333
  timeOptions = _ref.timeOptions,
18324
18334
  ShopList = _ref.ShopList,
18325
18335
  onSubmit = _ref.onSubmit;
18336
+ console.log('allFields', allFields);
18326
18337
  // const fixedFieldsOptions = useMemo(() => {
18327
18338
  // return allFields.filter(item => fixedFields?.includes(item.id));
18328
18339
  // }, [fixedFields, allFields]);
@@ -18578,7 +18589,9 @@ var WorkorderList = function WorkorderList(props, ref) {
18578
18589
  loading: false
18579
18590
  }));
18580
18591
  setWorkOrderList(newDataSource);
18581
- }).catch(function (error) {}));
18592
+ }).catch(function (error) {
18593
+ console.log('**** 获取表格数据错误', error);
18594
+ }));
18582
18595
  case 19:
18583
18596
  case "end":
18584
18597
  return _context.stop();
@@ -22897,6 +22910,7 @@ var getColumns$6 = function getColumns() {
22897
22910
  title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
22898
22911
  width: 100,
22899
22912
  validator: function validator(_rule, value, extraParams) {
22913
+ console.log('实际补发数量-extraParams', extraParams);
22900
22914
  if (!(extraParams === null || extraParams === void 0 ? void 0 : extraParams.quantityVerify)) return undefined;
22901
22915
  var title = '';
22902
22916
  if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
@@ -25171,7 +25185,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
25171
25185
  while (1) switch (_context2.prev = _context2.next) {
25172
25186
  case 0:
25173
25187
  if (!validSystemOrderFn) {
25174
- _context2.next = 6;
25188
+ _context2.next = 7;
25175
25189
  break;
25176
25190
  }
25177
25191
  _context2.next = 3;
@@ -25179,38 +25193,39 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
25179
25193
  case 3:
25180
25194
  flag = _context2.sent;
25181
25195
  if (!(flag === false)) {
25182
- _context2.next = 6;
25196
+ _context2.next = 7;
25183
25197
  break;
25184
25198
  }
25199
+ console.log('validSystemOrderFn校验不通过');
25185
25200
  return _context2.abrupt("return");
25186
- case 6:
25201
+ case 7:
25187
25202
  if (!validSystemOrder) {
25188
- _context2.next = 9;
25203
+ _context2.next = 10;
25189
25204
  break;
25190
25205
  }
25191
25206
  message.warning('请选择补发系统单');
25192
25207
  return _context2.abrupt("return");
25193
- case 9:
25208
+ case 10:
25194
25209
  if (!(getDataSourceAsync && (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || isReloadSelectTable))) {
25195
- _context2.next = 12;
25210
+ _context2.next = 13;
25196
25211
  break;
25197
25212
  }
25198
- _context2.next = 12;
25213
+ _context2.next = 13;
25199
25214
  return getDataSourceAsync();
25200
- case 12:
25215
+ case 13:
25201
25216
  if (!['KM_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS'].includes(type)) {
25202
- _context2.next = 15;
25217
+ _context2.next = 16;
25203
25218
  break;
25204
25219
  }
25205
- _context2.next = 15;
25220
+ _context2.next = 16;
25206
25221
  return getKmSupplier(dataSource);
25207
- case 15:
25222
+ case 16:
25208
25223
  setTradeGoodsVisible(true);
25209
25224
  // 补发直接传入的是systemNo
25210
25225
  if (isShowSelect && isReissueType) {
25211
25226
  setSelectSystemNo(selectedSystemOrders || []);
25212
25227
  }
25213
- case 17:
25228
+ case 18:
25214
25229
  case "end":
25215
25230
  return _context2.stop();
25216
25231
  }
@@ -25412,6 +25427,7 @@ var GoodItem$1 = function GoodItem(props) {
25412
25427
  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', '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;
25413
25428
  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;
25414
25429
  var refModal = useRef();
25430
+ console.debug('表格数据', value);
25415
25431
  var handleDelete = function handleDelete(record, index) {
25416
25432
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
25417
25433
  var newList = _toConsumableArray(value).filter(function (item, i) {
@@ -26192,6 +26208,7 @@ var BsReissue = function BsReissue(props) {
26192
26208
  var _typeMap$type2;
26193
26209
  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) {
26194
26210
  var _typeMap$type3;
26211
+ console.log('reissueSelectList', data);
26195
26212
  if (disabled) return;
26196
26213
  var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
26197
26214
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
@@ -27997,6 +28014,7 @@ var OrderSubForm = function OrderSubForm(props) {
27997
28014
  manual = props.manual,
27998
28015
  correlationList = props.subConfig.correlationList,
27999
28016
  effects = props.effects;
28017
+ console.log('effects', effects);
28000
28018
  var valueRef = useRef(value);
28001
28019
  useEffect(function () {
28002
28020
  valueRef.current = value;
@@ -28193,7 +28211,7 @@ var OrderSubForm = function OrderSubForm(props) {
28193
28211
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
28194
28212
  allOrders: allOrders
28195
28213
  }));
28196
- }).catch(function () {}) : Promise.resolve();
28214
+ }).catch(console.debug) : Promise.resolve();
28197
28215
  };
28198
28216
  var getAllTradeGoodsDetails = function getAllTradeGoodsDetails() {
28199
28217
  var goodDetails = (value === null || value === void 0 ? void 0 : value.allOrders) || [];
@@ -29428,23 +29446,29 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29428
29446
  var getDataSourceAsync = function getDataSourceAsync() {
29429
29447
  return new Promise(function (resolve) {
29430
29448
  pubsub.subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
29431
- var _componentMap$compTyp9;
29449
+ var _componentMap$compTyp9, _componentMap$compTyp10;
29432
29450
  resolve(data);
29451
+ console.log('getDataSourceAsync---111data--', data, getGoodDetails({
29452
+ returnGoodsValue: data,
29453
+ mode: isStrict,
29454
+ 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
29455
+ }));
29433
29456
  setOriginDataSource(getGoodDetails({
29434
29457
  returnGoodsValue: data,
29435
- 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,
29458
+ 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,
29436
29459
  mode: isStrict
29437
29460
  }));
29438
29461
  });
29439
29462
  pubsub.publish(componentMap$4[compType].eventNameMap.returnGoodsSysorder, compType);
29440
29463
  });
29441
29464
  };
29465
+ console.log('aaa--', originDataSource);
29442
29466
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
29443
29467
  key: componentMap$4[compType].type
29444
29468
  }, props), {}, {
29445
29469
  validSystemOrderFn: function validSystemOrderFn() {
29446
- var _componentMap$compTyp10, _componentMap$compTyp11;
29447
- return (_componentMap$compTyp10 = (_componentMap$compTyp11 = componentMap$4[compType]).validSystemOrderFn) === null || _componentMap$compTyp10 === void 0 ? void 0 : _componentMap$compTyp10.call(_componentMap$compTyp11, form);
29470
+ var _componentMap$compTyp11, _componentMap$compTyp12;
29471
+ return (_componentMap$compTyp11 = (_componentMap$compTyp12 = componentMap$4[compType]).validSystemOrderFn) === null || _componentMap$compTyp11 === void 0 ? void 0 : _componentMap$compTyp11.call(_componentMap$compTyp12, form);
29448
29472
  },
29449
29473
  isReloadSelectTable: componentMap$4[compType].isReloadSelectTable,
29450
29474
  disabled: disabled,
@@ -32295,13 +32319,20 @@ var IdInputSelect = function IdInputSelect(props) {
32295
32319
  tradeId = form.getFieldValue('m3ap1EvEyd');
32296
32320
  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;
32297
32321
  blurFrom = form.getFieldValue('skx_return_billNo_blur_from');
32322
+ console.log('asyncQueryData---', {
32323
+ skxReturnExpressCode: skxReturnExpressCode,
32324
+ blurFrom: blurFrom,
32325
+ tradeId: tradeId,
32326
+ tradeIdRef: tradeIdRef.current,
32327
+ form: form
32328
+ });
32298
32329
  if (!(type === 'SKX_OUTBOUND_NOTICE_NO' && !tradeId || type === 'SKX_RETURN_BILL_NO' && !tradeId && !skxReturnExpressCode)) {
32299
- _context3.next = 6;
32330
+ _context3.next = 7;
32300
32331
  break;
32301
32332
  }
32302
32333
  setDataSource([]);
32303
32334
  return _context3.abrupt("return");
32304
- case 6:
32335
+ case 7:
32305
32336
  setSpinning(true);
32306
32337
  // 判断是从哪个组件失焦,若是从[SKX]退换物流信息(TH)失焦,则根据物流单号查询,若是从订单号组件失焦,则根据订单号查询
32307
32338
  typeMap$6[type].asyncGetData(type === 'SKX_RETURN_BILL_NO' && blurFrom === '4487c6516b' ? {
@@ -32315,7 +32346,7 @@ var IdInputSelect = function IdInputSelect(props) {
32315
32346
  }).finally(function () {
32316
32347
  setSpinning(false);
32317
32348
  });
32318
- case 8:
32349
+ case 9:
32319
32350
  case "end":
32320
32351
  return _context3.stop();
32321
32352
  }
@@ -32407,6 +32438,11 @@ var IdInputSelect = function IdInputSelect(props) {
32407
32438
  }))));
32408
32439
  };
32409
32440
  var handleChange = function handleChange(val, isInput) {
32441
+ console.log('handleChange---', {
32442
+ val: val,
32443
+ value: value,
32444
+ isInput: isInput
32445
+ });
32410
32446
  var isReturnBillNoChange = type === 'SKX_RETURN_BILL_NO' && form.getFieldValue('skx_return_billNo_blur_from') === '4487c6516b';
32411
32447
  onChange === null || onChange === void 0 ? void 0 : onChange(val, value !== val && (!!isInput || isReturnBillNoChange));
32412
32448
  // 如果类型是[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.10.5",
3
+ "version": "2.10.6",
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.10.5",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.10.6",
24
24
  "ahooks": "^3.7.4",
25
25
  "ali-react-table": "2.6.1",
26
26
  "bignumber.js": "^9.1.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "bb8d17f40a7854b3d3a494c4c90233386a81c15c"
69
+ "gitHead": "8e459352f1aa0e95d05e48a4bf4bb9d9d947b032"
70
70
  }