@kmkf-fe-packages/basic-components 0.21.6-alpha.4 → 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/dist/index.esm.js CHANGED
@@ -9847,8 +9847,14 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9847
9847
  // '一样2',
9848
9848
  // JSON.stringify(changeList) !== JSON.stringify(valueList),
9849
9849
  // );
9850
+ if (!(!initList.length && !valueList.length)) {
9851
+ _context.next = 8;
9852
+ break;
9853
+ }
9854
+ return _context.abrupt("return");
9855
+ case 8:
9850
9856
  if (!(JSON.stringify(initList) === JSON.stringify(valueList))) {
9851
- _context.next = 12;
9857
+ _context.next = 14;
9852
9858
  break;
9853
9859
  }
9854
9860
  initSnapshotList = initValue.reduce(function (prv, next) {
@@ -9867,37 +9873,43 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9867
9873
  setNewValue(initValue);
9868
9874
  onChange(initValue);
9869
9875
  }
9870
- _context.next = 28;
9876
+ _context.next = 30;
9871
9877
  break;
9872
- case 12:
9878
+ case 14:
9873
9879
  if (!(
9874
9880
  //开启了物流快照才会获取快照信息
9875
9881
  hasSnapshot && JSON.stringify(initList) !== JSON.stringify(valueList) && JSON.stringify(changeList) !== JSON.stringify(valueList))) {
9876
- _context.next = 27;
9882
+ _context.next = 29;
9877
9883
  break;
9878
9884
  }
9879
9885
  hasSave.current = false;
9880
- hasValue = valueList.every(function (item) {
9886
+ hasValue = valueList.some(function (item) {
9881
9887
  return item.trajectoryCompany && item.trajectoryCode;
9882
9888
  });
9883
9889
  listValue = cloneDeep(value);
9884
9890
  if (!hasValue) {
9885
- _context.next = 22;
9891
+ _context.next = 24;
9886
9892
  break;
9887
9893
  }
9888
9894
  requestList = valueList.map(function (item) {
9889
- return extendRequest('/qy/logistics/logisticsTraceSearch', {
9890
- method: 'post',
9891
- data: {
9892
- mailNo: item.trajectoryCode,
9893
- cpCode: item.trajectoryCompany,
9894
- mobile: item.trajectoryPhone
9895
- }
9896
- });
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
+ }
9897
9909
  });
9898
- _context.next = 20;
9910
+ _context.next = 22;
9899
9911
  return Promise.allSettled(requestList);
9900
- case 20:
9912
+ case 22:
9901
9913
  requestValues = _context.sent;
9902
9914
  listValue = cloneDeep(value).map(function (item, index) {
9903
9915
  var _requestValues$index, _requestValues$index$, _requestValues$index$2;
@@ -9905,15 +9917,15 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9905
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
9906
9918
  });
9907
9919
  });
9908
- case 22:
9920
+ case 24:
9909
9921
  setChangeValue(listValue);
9910
9922
  setNewValue(listValue);
9911
9923
  onChange(listValue);
9912
- _context.next = 28;
9924
+ _context.next = 30;
9913
9925
  break;
9914
- case 27:
9926
+ case 29:
9915
9927
  setNewValue(value);
9916
- case 28:
9928
+ case 30:
9917
9929
  case "end":
9918
9930
  return _context.stop();
9919
9931
  }
package/dist/index.js CHANGED
@@ -9858,8 +9858,14 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9858
9858
  // '一样2',
9859
9859
  // JSON.stringify(changeList) !== JSON.stringify(valueList),
9860
9860
  // );
9861
+ if (!(!initList.length && !valueList.length)) {
9862
+ _context.next = 8;
9863
+ break;
9864
+ }
9865
+ return _context.abrupt("return");
9866
+ case 8:
9861
9867
  if (!(JSON.stringify(initList) === JSON.stringify(valueList))) {
9862
- _context.next = 12;
9868
+ _context.next = 14;
9863
9869
  break;
9864
9870
  }
9865
9871
  initSnapshotList = initValue.reduce(function (prv, next) {
@@ -9878,37 +9884,43 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9878
9884
  setNewValue(initValue);
9879
9885
  onChange(initValue);
9880
9886
  }
9881
- _context.next = 28;
9887
+ _context.next = 30;
9882
9888
  break;
9883
- case 12:
9889
+ case 14:
9884
9890
  if (!(
9885
9891
  //开启了物流快照才会获取快照信息
9886
9892
  hasSnapshot && JSON.stringify(initList) !== JSON.stringify(valueList) && JSON.stringify(changeList) !== JSON.stringify(valueList))) {
9887
- _context.next = 27;
9893
+ _context.next = 29;
9888
9894
  break;
9889
9895
  }
9890
9896
  hasSave.current = false;
9891
- hasValue = valueList.every(function (item) {
9897
+ hasValue = valueList.some(function (item) {
9892
9898
  return item.trajectoryCompany && item.trajectoryCode;
9893
9899
  });
9894
9900
  listValue = lodash.cloneDeep(value);
9895
9901
  if (!hasValue) {
9896
- _context.next = 22;
9902
+ _context.next = 24;
9897
9903
  break;
9898
9904
  }
9899
9905
  requestList = valueList.map(function (item) {
9900
- return extendRequest('/qy/logistics/logisticsTraceSearch', {
9901
- method: 'post',
9902
- data: {
9903
- mailNo: item.trajectoryCode,
9904
- cpCode: item.trajectoryCompany,
9905
- mobile: item.trajectoryPhone
9906
- }
9907
- });
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
+ }
9908
9920
  });
9909
- _context.next = 20;
9921
+ _context.next = 22;
9910
9922
  return Promise.allSettled(requestList);
9911
- case 20:
9923
+ case 22:
9912
9924
  requestValues = _context.sent;
9913
9925
  listValue = lodash.cloneDeep(value).map(function (item, index) {
9914
9926
  var _requestValues$index, _requestValues$index$, _requestValues$index$2;
@@ -9916,15 +9928,15 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
9916
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
9917
9929
  });
9918
9930
  });
9919
- case 22:
9931
+ case 24:
9920
9932
  setChangeValue(listValue);
9921
9933
  setNewValue(listValue);
9922
9934
  onChange(listValue);
9923
- _context.next = 28;
9935
+ _context.next = 30;
9924
9936
  break;
9925
- case 27:
9937
+ case 29:
9926
9938
  setNewValue(value);
9927
- case 28:
9939
+ case 30:
9928
9940
  case "end":
9929
9941
  return _context.stop();
9930
9942
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.21.6-alpha.4",
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.4",
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": "6e8607051c7505581ca51a0146ed1de51a94dd42"
65
+ "gitHead": "70403ea96f15ae50fca601163149eeff73d911eb"
66
66
  }