@kmkf-fe-packages/basic-components 2.10.9-beta.85 → 2.10.9-beta.87

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
@@ -8648,13 +8648,14 @@ var processLogisticsInterception = function processLogisticsInterception(getValu
8648
8648
  address = every(address, function (item) {
8649
8649
  return !item;
8650
8650
  }) ? [] : address;
8651
- var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey', 'interceptLogisticsCustomerCode'];
8651
+ var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey', 'interceptLogisticsCustomerCode', 'trajectoryLastUpdateTime', 'trajectoryLastLogisticsInfo'];
8652
8652
  var map = subFields.reduce(function (cur, nxt) {
8653
8653
  return _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
8654
8654
  }, {});
8655
8655
  return _defineProperty({}, nex.uniqueKey, _objectSpread2(_objectSpread2({}, map), {}, {
8656
8656
  interceptAddress: address,
8657
- interceptLogisticsApiStatus: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_interceptLogisticsApiStatus")), {})
8657
+ interceptLogisticsApiStatus: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_interceptLogisticsApiStatus")), {}),
8658
+ trajectoryApiStatus: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_trajectoryApiStatus")), {})
8658
8659
  }));
8659
8660
  };
8660
8661
  };
@@ -13565,9 +13566,25 @@ var Payment = function Payment(props) {
13565
13566
  var css_248z$9 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
13566
13567
  styleInject(css_248z$9);
13567
13568
 
13569
+ var getInterceptionTrajectoryQueryParams = function getInterceptionTrajectoryQueryParams(value, enabled, disabled) {
13570
+ if (!enabled || disabled) return null;
13571
+ var interceptCompany = value.interceptCompany,
13572
+ interceptCode = value.interceptCode,
13573
+ interceptSenderMobile = value.interceptSenderMobile;
13574
+ if (!interceptCompany || !interceptCode) return null;
13575
+ if (['SF', 'ZTO'].includes(interceptCompany) && !interceptSenderMobile) {
13576
+ return null;
13577
+ }
13578
+ return {
13579
+ mailNo: interceptCode,
13580
+ cpCode: interceptCompany,
13581
+ mobile: interceptSenderMobile
13582
+ };
13583
+ };
13584
+
13568
13585
  var Item = Form.Item;
13569
13586
  var LogisticsInterception = function LogisticsInterception(props) {
13570
- var _value$interceptLogis3, _value$interceptLogis4, _value$interceptLogis5;
13587
+ var _value$interceptLogis3, _value$interceptLogis4, _value$interceptLogis5, _value$trajectoryApiS, _value$trajectoryApiS2;
13571
13588
  var LogisticsAddress = LogisticsAddressData.getInstance();
13572
13589
  var address = AddressData.getInstance();
13573
13590
  var _props$value = props.value,
@@ -13588,7 +13605,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
13588
13605
  _props$showReason = props.showReason,
13589
13606
  showReason = _props$showReason === void 0 ? false : _props$showReason,
13590
13607
  _props$preCreateAndNo = props.preCreateAndNotModified,
13591
- preCreateAndNotModified = _props$preCreateAndNo === void 0 ? false : _props$preCreateAndNo;
13608
+ preCreateAndNotModified = _props$preCreateAndNo === void 0 ? false : _props$preCreateAndNo,
13609
+ _props$trajectoryApiS = props.trajectoryApiStatus,
13610
+ trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
13592
13611
  var _useState = useState(function () {
13593
13612
  return (value === null || value === void 0 ? void 0 : value.interceptCompany) || undefined;
13594
13613
  }),
@@ -13775,6 +13794,44 @@ var LogisticsInterception = function LogisticsInterception(props) {
13775
13794
  });
13776
13795
  return uk || undefined;
13777
13796
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany, value === null || value === void 0 ? void 0 : value.interceptAddress]);
13797
+ var searchTrajectory = function searchTrajectory(nextValue) {
13798
+ var params = getInterceptionTrajectoryQueryParams(nextValue, trajectoryApiStatus, disabled);
13799
+ if (!params) return;
13800
+ request$1({
13801
+ url: '/qy/logistics/logisticsTraceSearch',
13802
+ method: 'post',
13803
+ data: params
13804
+ }).then(function (res) {
13805
+ var result = res.result,
13806
+ success = res.success,
13807
+ data = res.data,
13808
+ msg = res.message;
13809
+ if (result === 100 || success) {
13810
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, nextValue), {}, {
13811
+ trajectoryApiStatus: (data === null || data === void 0 ? void 0 : data.apiStatusObject) || {
13812
+ status: '',
13813
+ reason: ''
13814
+ }
13815
+ }));
13816
+ return;
13817
+ }
13818
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, nextValue), {}, {
13819
+ trajectoryApiStatus: {
13820
+ status: '',
13821
+ reason: ''
13822
+ }
13823
+ }));
13824
+ msg && message.error(msg);
13825
+ }).catch(function (err) {
13826
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, nextValue), {}, {
13827
+ trajectoryApiStatus: {
13828
+ status: '',
13829
+ reason: ''
13830
+ }
13831
+ }));
13832
+ (err === null || err === void 0 ? void 0 : err.message) && message.error(err.message);
13833
+ });
13834
+ };
13778
13835
  //选择回调
13779
13836
  var changeHandle = function changeHandle(val, type) {
13780
13837
  var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
@@ -13836,7 +13893,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
13836
13893
  interceptLogisticsApiStatusReason: undefined,
13837
13894
  interceptLogisticsUserKCode: undefined,
13838
13895
  interceptLogisticsUserSecretKey: undefined,
13839
- interceptLogisticsCustomerCode: undefined
13896
+ interceptLogisticsCustomerCode: undefined,
13897
+ trajectoryApiStatus: {
13898
+ status: '',
13899
+ reason: ''
13900
+ },
13901
+ trajectoryLastUpdateTime: undefined,
13902
+ trajectoryLastLogisticsInfo: undefined
13840
13903
  });
13841
13904
  }
13842
13905
  if (type === 'interceptLogisticsApiStatus') {
@@ -13861,6 +13924,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
13861
13924
  }
13862
13925
  console.log('newValue', newValue);
13863
13926
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue, type);
13927
+ if (type === 'interceptCompany') {
13928
+ searchTrajectory(newValue);
13929
+ }
13864
13930
  };
13865
13931
  //智能识别回调
13866
13932
  var changeIdentify = function changeIdentify(val) {
@@ -13914,7 +13980,11 @@ var LogisticsInterception = function LogisticsInterception(props) {
13914
13980
  },
13915
13981
  onBlur: function onBlur(e) {
13916
13982
  var _e$target$value2;
13917
- return _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur((_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim(), 'interceptCode');
13983
+ var interceptCode = (_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim();
13984
+ _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(interceptCode, 'interceptCode');
13985
+ searchTrajectory(_objectSpread2(_objectSpread2({}, value), {}, {
13986
+ interceptCode: interceptCode
13987
+ }));
13918
13988
  },
13919
13989
  value: value === null || value === void 0 ? void 0 : value.interceptCode
13920
13990
  }))), /*#__PURE__*/React.createElement(Item, {
@@ -14025,6 +14095,12 @@ var LogisticsInterception = function LogisticsInterception(props) {
14025
14095
  onChange: function onChange(e) {
14026
14096
  var _e$target$value3;
14027
14097
  return changeHandle((_e$target$value3 = e.target.value) === null || _e$target$value3 === void 0 ? void 0 : _e$target$value3.trim(), 'interceptSenderMobile');
14098
+ },
14099
+ onBlur: function onBlur(e) {
14100
+ var _e$target$value4;
14101
+ return searchTrajectory(_objectSpread2(_objectSpread2({}, value), {}, {
14102
+ interceptSenderMobile: (_e$target$value4 = e.target.value) === null || _e$target$value4 === void 0 ? void 0 : _e$target$value4.trim()
14103
+ }));
14028
14104
  }
14029
14105
  })), /*#__PURE__*/React.createElement(Item, {
14030
14106
  label: '退回地址',
@@ -14083,8 +14159,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
14083
14159
  },
14084
14160
  placeholder: "\u5176\u4ED6",
14085
14161
  onChange: function onChange(e) {
14086
- var _e$target$value4;
14087
- return changeHandle((_e$target$value4 = e.target.value) === null || _e$target$value4 === void 0 ? void 0 : _e$target$value4.trim(), 'interceptLogisticsStatusOther');
14162
+ var _e$target$value5;
14163
+ return changeHandle((_e$target$value5 = e.target.value) === null || _e$target$value5 === void 0 ? void 0 : _e$target$value5.trim(), 'interceptLogisticsStatusOther');
14088
14164
  }
14089
14165
  })), /*#__PURE__*/React.createElement(Item, {
14090
14166
  label: '拦截状态',
@@ -14107,7 +14183,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
14107
14183
  value: '拦截失败'
14108
14184
  }]
14109
14185
  })), /*#__PURE__*/React.createElement(Item, {
14110
- label: '接口状态',
14186
+ label: '拦截接口状态',
14111
14187
  key: 'interceptLogisticsApiStatus'
14112
14188
  }, /*#__PURE__*/React.createElement(Select, {
14113
14189
  value: (value === null || value === void 0 ? void 0 : (_value$interceptLogis3 = value.interceptLogisticsApiStatus) === null || _value$interceptLogis3 === void 0 ? void 0 : _value$interceptLogis3.status) || null,
@@ -14115,7 +14191,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
14115
14191
  style: {
14116
14192
  width: '200px'
14117
14193
  },
14118
- placeholder: "\u63A5\u53E3\u72B6\u6001",
14194
+ placeholder: "\u62E6\u622A\u63A5\u53E3\u72B6\u6001",
14119
14195
  onChange: function onChange(val) {
14120
14196
  return changeHandle(val, 'interceptLogisticsApiStatus');
14121
14197
  },
@@ -14131,17 +14207,38 @@ var LogisticsInterception = function LogisticsInterception(props) {
14131
14207
  color: 'red'
14132
14208
  }
14133
14209
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : (_value$interceptLogis5 = value.interceptLogisticsApiStatus) === null || _value$interceptLogis5 === void 0 ? void 0 : _value$interceptLogis5.reason) : null), showReason && /*#__PURE__*/React.createElement(Item, {
14134
- label: '接口状态原因',
14210
+ label: '拦截接口状态原因',
14135
14211
  key: 'interceptLogisticsApiStatusReason'
14136
14212
  }, /*#__PURE__*/React.createElement(Input, {
14137
14213
  value: value === null || value === void 0 ? void 0 : value.interceptLogisticsApiStatusReason,
14138
14214
  disabled: true,
14139
- placeholder: "\u63A5\u53E3\u72B6\u6001\u539F\u56E0",
14215
+ placeholder: "\u62E6\u622A\u63A5\u53E3\u72B6\u6001\u539F\u56E0",
14140
14216
  onChange: function onChange(e) {
14141
- var _e$target$value5;
14142
- return changeHandle((_e$target$value5 = e.target.value) === null || _e$target$value5 === void 0 ? void 0 : _e$target$value5.trim(), 'interceptLogisticsApiStatusReason');
14217
+ var _e$target$value6;
14218
+ return changeHandle((_e$target$value6 = e.target.value) === null || _e$target$value6 === void 0 ? void 0 : _e$target$value6.trim(), 'interceptLogisticsApiStatusReason');
14143
14219
  }
14144
- })));
14220
+ })), trajectoryApiStatus && /*#__PURE__*/React.createElement(Item, {
14221
+ label: '物流轨迹接口状态',
14222
+ key: 'trajectoryApiStatus'
14223
+ }, /*#__PURE__*/React.createElement(Select, {
14224
+ value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.status) || null,
14225
+ disabled: true,
14226
+ style: {
14227
+ width: '200px'
14228
+ },
14229
+ placeholder: "\u7269\u6D41\u8F68\u8FF9\u63A5\u53E3\u72B6\u6001",
14230
+ options: [{
14231
+ label: '成功',
14232
+ value: '成功'
14233
+ }, {
14234
+ label: '失败',
14235
+ value: '失败'
14236
+ }]
14237
+ }), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.reason) ? /*#__PURE__*/React.createElement("div", {
14238
+ style: {
14239
+ color: 'red'
14240
+ }
14241
+ }, "\u5931\u8D25\u539F\u56E0\uFF1A", value.trajectoryApiStatus.reason) : null));
14145
14242
  };
14146
14243
 
14147
14244
  var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
@@ -20,6 +20,12 @@ interface LogisticsInterceptionValueType {
20
20
  interceptLogisticsUserKCode: string;
21
21
  interceptLogisticsUserSecretKey: string;
22
22
  interceptLogisticsCustomerCode: string;
23
+ trajectoryApiStatus: {
24
+ status: string;
25
+ reason: string;
26
+ };
27
+ trajectoryLastUpdateTime: string;
28
+ trajectoryLastLogisticsInfo: string;
23
29
  }
24
30
  interface LogisticsInterceptionProps {
25
31
  value: Partial<LogisticsInterceptionValueType>;
@@ -34,6 +40,7 @@ interface LogisticsInterceptionProps {
34
40
  onJumpPage?: (val: any) => void;
35
41
  preCreateAndNotModified?: boolean;
36
42
  interceptTypeDefaults?: Record<string, string>;
43
+ trajectoryApiStatus?: boolean;
37
44
  }
38
45
  declare const LogisticsInterception: (props: Partial<LogisticsInterceptionProps>) => React.JSX.Element;
39
46
  export default LogisticsInterception;
@@ -0,0 +1,10 @@
1
+ export interface InterceptionTrajectoryValue {
2
+ interceptCompany?: string;
3
+ interceptCode?: string;
4
+ interceptSenderMobile?: string;
5
+ }
6
+ export declare const getInterceptionTrajectoryQueryParams: (value: InterceptionTrajectoryValue, enabled: boolean, disabled: boolean) => {
7
+ mailNo: string;
8
+ cpCode: string;
9
+ mobile: string | undefined;
10
+ } | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.10.9-beta.85",
3
+ "version": "2.10.9-beta.87",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "22200427b6004f54ed2315f5758b21a85757336f"
69
+ "gitHead": "e2a82fcf9cfef7e2074cb16e35344c9b295bb333"
70
70
  }