@kmkf-fe-packages/basic-components 2.9.1-beta.15 → 2.9.1-beta.16

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
@@ -7819,6 +7819,7 @@ var ParseLogistics = function ParseLogistics(props) {
7819
7819
  onChange === null || onChange === void 0 ? void 0 : onChange(data);
7820
7820
  }).catch(function (e) {
7821
7821
  handleAIIdentify(fullAddress);
7822
+ console.log(e);
7822
7823
  }).finally(function () {
7823
7824
  setLoading(false);
7824
7825
  });
@@ -7842,6 +7843,7 @@ var ParseLogistics = function ParseLogistics(props) {
7842
7843
  var data = res.data;
7843
7844
  onChange === null || onChange === void 0 ? void 0 : onChange(data);
7844
7845
  }).catch(function (e) {
7846
+ console.log(e);
7845
7847
  message.error('识别失败,请输入正确的信息');
7846
7848
  }).finally(function () {
7847
7849
  setAiLoading(false);
@@ -12074,7 +12076,7 @@ var Goods = function Goods(props) {
12074
12076
  return querySkus({
12075
12077
  shopId: shopId,
12076
12078
  numIids: numIid
12077
- }).catch(function () {});
12079
+ }).catch(console.debug);
12078
12080
  case 5:
12079
12081
  res = _context3.sent;
12080
12082
  data = (res === null || res === void 0 ? void 0 : res.success) && (res === null || res === void 0 ? void 0 : res.data);
@@ -12458,7 +12460,7 @@ var GoodItem = function GoodItem(props) {
12458
12460
  return querySkus({
12459
12461
  shopId: shopId,
12460
12462
  numIids: numIid
12461
- }).catch(function () {});
12463
+ }).catch(console.debug);
12462
12464
  case 5:
12463
12465
  res = _context3.sent;
12464
12466
  data = (res === null || res === void 0 ? void 0 : res.success) && (res === null || res === void 0 ? void 0 : res.data);
@@ -13400,6 +13402,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
13400
13402
  });
13401
13403
  }
13402
13404
  }
13405
+ console.log('newValue', newValue);
13403
13406
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue, type);
13404
13407
  };
13405
13408
  //智能识别回调
@@ -13982,14 +13985,21 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
13982
13985
  }); // 1、初始值没有 传入值有请求快照
13983
13986
  // 2、初始值有 传入值有 其中有不一样的请求快照
13984
13987
  // 3、初始值有 传入值有 都一样的返回初始值
13988
+ console.log('list', initList, valueList, changeList);
13989
+ // console.log('old', initValue, value, changeValue);
13990
+ // console.log('一样', JSON.stringify(initList) !== JSON.stringify(valueList));
13991
+ // console.log(
13992
+ // '一样2',
13993
+ // JSON.stringify(changeList) !== JSON.stringify(valueList),
13994
+ // );
13985
13995
  if (!(!initList.length && !valueList.length)) {
13986
- _context.next = 7;
13996
+ _context.next = 8;
13987
13997
  break;
13988
13998
  }
13989
13999
  return _context.abrupt("return");
13990
- case 7:
14000
+ case 8:
13991
14001
  if (!(JSON.stringify(initList) === JSON.stringify(valueList))) {
13992
- _context.next = 13;
14002
+ _context.next = 14;
13993
14003
  break;
13994
14004
  }
13995
14005
  initSnapshotList = initValue.reduce(function (prv, next) {
@@ -14008,13 +14018,13 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14008
14018
  setNewValue(initValue);
14009
14019
  onChange(initValue);
14010
14020
  }
14011
- _context.next = 29;
14021
+ _context.next = 30;
14012
14022
  break;
14013
- case 13:
14023
+ case 14:
14014
14024
  if (!(
14015
14025
  //开启了物流快照才会获取快照信息
14016
14026
  hasSnapshot && JSON.stringify(initList) !== JSON.stringify(valueList) && JSON.stringify(changeList) !== JSON.stringify(valueList))) {
14017
- _context.next = 28;
14027
+ _context.next = 29;
14018
14028
  break;
14019
14029
  }
14020
14030
  hasSave.current = false;
@@ -14023,7 +14033,7 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14023
14033
  });
14024
14034
  listValue = cloneDeep(value);
14025
14035
  if (!hasValue) {
14026
- _context.next = 23;
14036
+ _context.next = 24;
14027
14037
  break;
14028
14038
  }
14029
14039
  requestList = valueList.map(function (item) {
@@ -14042,9 +14052,9 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14042
14052
  });
14043
14053
  }
14044
14054
  });
14045
- _context.next = 21;
14055
+ _context.next = 22;
14046
14056
  return Promise.allSettled(requestList);
14047
- case 21:
14057
+ case 22:
14048
14058
  requestValues = _context.sent;
14049
14059
  listValue = cloneDeep(value).map(function (item, index) {
14050
14060
  var _requestValues$index, _requestValues$index$, _requestValues$index$2;
@@ -14052,15 +14062,15 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
14052
14062
  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
14053
14063
  });
14054
14064
  });
14055
- case 23:
14065
+ case 24:
14056
14066
  setChangeValue(listValue);
14057
14067
  setNewValue(listValue);
14058
14068
  onChange(listValue);
14059
- _context.next = 29;
14069
+ _context.next = 30;
14060
14070
  break;
14061
- case 28:
14062
- setNewValue(value);
14063
14071
  case 29:
14072
+ setNewValue(value);
14073
+ case 30:
14064
14074
  case "end":
14065
14075
  return _context.stop();
14066
14076
  }
@@ -16234,7 +16244,7 @@ var GoodList = function GoodList(props, ref) {
16234
16244
  } else {
16235
16245
  reject$1(res);
16236
16246
  }
16237
- }).catch(function () {});
16247
+ }).catch(console.error);
16238
16248
  };
16239
16249
  getMore();
16240
16250
  };
@@ -18293,6 +18303,7 @@ var SearchHeader = function SearchHeader(_ref) {
18293
18303
  timeOptions = _ref.timeOptions,
18294
18304
  ShopList = _ref.ShopList,
18295
18305
  onSubmit = _ref.onSubmit;
18306
+ console.log('allFields', allFields);
18296
18307
  // const fixedFieldsOptions = useMemo(() => {
18297
18308
  // return allFields.filter(item => fixedFields?.includes(item.id));
18298
18309
  // }, [fixedFields, allFields]);
@@ -18548,7 +18559,9 @@ var WorkorderList = function WorkorderList(props, ref) {
18548
18559
  loading: false
18549
18560
  }));
18550
18561
  setWorkOrderList(newDataSource);
18551
- }).catch(function (error) {}));
18562
+ }).catch(function (error) {
18563
+ console.log('**** 获取表格数据错误', error);
18564
+ }));
18552
18565
  case 19:
18553
18566
  case "end":
18554
18567
  return _context.stop();
@@ -22872,6 +22885,7 @@ var getColumns$6 = function getColumns() {
22872
22885
  title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
22873
22886
  width: 100,
22874
22887
  validator: function validator(_rule, value, extraParams) {
22888
+ console.log('实际补发数量-extraParams', extraParams);
22875
22889
  if (!(extraParams === null || extraParams === void 0 ? void 0 : extraParams.quantityVerify)) return undefined;
22876
22890
  var title = '';
22877
22891
  if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
@@ -25146,7 +25160,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
25146
25160
  while (1) switch (_context2.prev = _context2.next) {
25147
25161
  case 0:
25148
25162
  if (!validSystemOrderFn) {
25149
- _context2.next = 6;
25163
+ _context2.next = 7;
25150
25164
  break;
25151
25165
  }
25152
25166
  _context2.next = 3;
@@ -25154,38 +25168,39 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
25154
25168
  case 3:
25155
25169
  flag = _context2.sent;
25156
25170
  if (!(flag === false)) {
25157
- _context2.next = 6;
25171
+ _context2.next = 7;
25158
25172
  break;
25159
25173
  }
25174
+ console.log('validSystemOrderFn校验不通过');
25160
25175
  return _context2.abrupt("return");
25161
- case 6:
25176
+ case 7:
25162
25177
  if (!validSystemOrder) {
25163
- _context2.next = 9;
25178
+ _context2.next = 10;
25164
25179
  break;
25165
25180
  }
25166
25181
  message.warning('请选择补发系统单');
25167
25182
  return _context2.abrupt("return");
25168
- case 9:
25183
+ case 10:
25169
25184
  if (!(getDataSourceAsync && (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || isReloadSelectTable))) {
25170
- _context2.next = 12;
25185
+ _context2.next = 13;
25171
25186
  break;
25172
25187
  }
25173
- _context2.next = 12;
25188
+ _context2.next = 13;
25174
25189
  return getDataSourceAsync();
25175
- case 12:
25190
+ case 13:
25176
25191
  if (!['KM_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS'].includes(type)) {
25177
- _context2.next = 15;
25192
+ _context2.next = 16;
25178
25193
  break;
25179
25194
  }
25180
- _context2.next = 15;
25195
+ _context2.next = 16;
25181
25196
  return getKmSupplier(dataSource);
25182
- case 15:
25197
+ case 16:
25183
25198
  setTradeGoodsVisible(true);
25184
25199
  // 补发直接传入的是systemNo
25185
25200
  if (isShowSelect && isReissueType) {
25186
25201
  setSelectSystemNo(selectedSystemOrders || []);
25187
25202
  }
25188
- case 17:
25203
+ case 18:
25189
25204
  case "end":
25190
25205
  return _context2.stop();
25191
25206
  }
@@ -25387,6 +25402,7 @@ var GoodItem$1 = function GoodItem(props) {
25387
25402
  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;
25388
25403
  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;
25389
25404
  var refModal = useRef();
25405
+ console.debug('表格数据', value);
25390
25406
  var handleDelete = function handleDelete(record, index) {
25391
25407
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
25392
25408
  var newList = _toConsumableArray(value).filter(function (item, i) {
@@ -26167,6 +26183,7 @@ var BsReissue = function BsReissue(props) {
26167
26183
  var _typeMap$type2;
26168
26184
  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) {
26169
26185
  var _typeMap$type3;
26186
+ console.log('reissueSelectList', data);
26170
26187
  if (disabled) return;
26171
26188
  var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
26172
26189
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
@@ -27972,6 +27989,7 @@ var OrderSubForm = function OrderSubForm(props) {
27972
27989
  manual = props.manual,
27973
27990
  correlationList = props.subConfig.correlationList,
27974
27991
  effects = props.effects;
27992
+ console.log('effects', effects);
27975
27993
  var valueRef = useRef(value);
27976
27994
  useEffect(function () {
27977
27995
  valueRef.current = value;
@@ -28168,7 +28186,7 @@ var OrderSubForm = function OrderSubForm(props) {
28168
28186
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
28169
28187
  allOrders: allOrders
28170
28188
  }));
28171
- }).catch(function () {}) : Promise.resolve();
28189
+ }).catch(console.debug) : Promise.resolve();
28172
28190
  };
28173
28191
  var getAllTradeGoodsDetails = function getAllTradeGoodsDetails() {
28174
28192
  var goodDetails = (value === null || value === void 0 ? void 0 : value.allOrders) || [];
@@ -29403,23 +29421,29 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29403
29421
  var getDataSourceAsync = function getDataSourceAsync() {
29404
29422
  return new Promise(function (resolve) {
29405
29423
  pubsub.subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
29406
- var _componentMap$compTyp9;
29424
+ var _componentMap$compTyp9, _componentMap$compTyp10;
29407
29425
  resolve(data);
29426
+ console.log('getDataSourceAsync---111data--', data, getGoodDetails({
29427
+ returnGoodsValue: data,
29428
+ mode: isStrict,
29429
+ 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
29430
+ }));
29408
29431
  setOriginDataSource(getGoodDetails({
29409
29432
  returnGoodsValue: data,
29410
- 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,
29433
+ 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,
29411
29434
  mode: isStrict
29412
29435
  }));
29413
29436
  });
29414
29437
  pubsub.publish(componentMap$4[compType].eventNameMap.returnGoodsSysorder, compType);
29415
29438
  });
29416
29439
  };
29440
+ console.log('aaa--', originDataSource);
29417
29441
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
29418
29442
  key: componentMap$4[compType].type
29419
29443
  }, props), {}, {
29420
29444
  validSystemOrderFn: function validSystemOrderFn() {
29421
- var _componentMap$compTyp10, _componentMap$compTyp11;
29422
- return (_componentMap$compTyp10 = (_componentMap$compTyp11 = componentMap$4[compType]).validSystemOrderFn) === null || _componentMap$compTyp10 === void 0 ? void 0 : _componentMap$compTyp10.call(_componentMap$compTyp11, form);
29445
+ var _componentMap$compTyp11, _componentMap$compTyp12;
29446
+ return (_componentMap$compTyp11 = (_componentMap$compTyp12 = componentMap$4[compType]).validSystemOrderFn) === null || _componentMap$compTyp11 === void 0 ? void 0 : _componentMap$compTyp11.call(_componentMap$compTyp12, form);
29423
29447
  },
29424
29448
  isReloadSelectTable: componentMap$4[compType].isReloadSelectTable,
29425
29449
  disabled: disabled,
@@ -32270,13 +32294,20 @@ var IdInputSelect = function IdInputSelect(props) {
32270
32294
  tradeId = form.getFieldValue('m3ap1EvEyd');
32271
32295
  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;
32272
32296
  blurFrom = form.getFieldValue('skx_return_billNo_blur_from');
32297
+ console.log('asyncQueryData---', {
32298
+ skxReturnExpressCode: skxReturnExpressCode,
32299
+ blurFrom: blurFrom,
32300
+ tradeId: tradeId,
32301
+ tradeIdRef: tradeIdRef.current,
32302
+ form: form
32303
+ });
32273
32304
  if (!(type === 'SKX_OUTBOUND_NOTICE_NO' && !tradeId || type === 'SKX_RETURN_BILL_NO' && !tradeId && !skxReturnExpressCode)) {
32274
- _context3.next = 6;
32305
+ _context3.next = 7;
32275
32306
  break;
32276
32307
  }
32277
32308
  setDataSource([]);
32278
32309
  return _context3.abrupt("return");
32279
- case 6:
32310
+ case 7:
32280
32311
  setSpinning(true);
32281
32312
  // 判断是从哪个组件失焦,若是从[SKX]退换物流信息(TH)失焦,则根据物流单号查询,若是从订单号组件失焦,则根据订单号查询
32282
32313
  typeMap$6[type].asyncGetData(type === 'SKX_RETURN_BILL_NO' && blurFrom === '4487c6516b' ? {
@@ -32290,7 +32321,7 @@ var IdInputSelect = function IdInputSelect(props) {
32290
32321
  }).finally(function () {
32291
32322
  setSpinning(false);
32292
32323
  });
32293
- case 8:
32324
+ case 9:
32294
32325
  case "end":
32295
32326
  return _context3.stop();
32296
32327
  }
@@ -32382,6 +32413,11 @@ var IdInputSelect = function IdInputSelect(props) {
32382
32413
  }))));
32383
32414
  };
32384
32415
  var handleChange = function handleChange(val, isInput) {
32416
+ console.log('handleChange---', {
32417
+ val: val,
32418
+ value: value,
32419
+ isInput: isInput
32420
+ });
32385
32421
  var isReturnBillNoChange = type === 'SKX_RETURN_BILL_NO' && form.getFieldValue('skx_return_billNo_blur_from') === '4487c6516b';
32386
32422
  onChange === null || onChange === void 0 ? void 0 : onChange(val, value !== val && (!!isInput || isReturnBillNoChange));
32387
32423
  // 如果类型是[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.9.1-beta.15",
3
+ "version": "2.9.1-beta.16",
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.9.1-beta.15",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.9.1-beta.16",
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": "0a90cf25939d9096bb5585a7518d1483161569f5"
69
+ "gitHead": "0d4c65d4544173d9f760d4677cc695763cf78792"
70
70
  }