@kmkf-fe-packages/basic-components 2.13.6 → 2.14.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.
package/dist/index.esm.js
CHANGED
|
@@ -8646,13 +8646,14 @@ var processLogisticsInterception = function processLogisticsInterception(getValu
|
|
|
8646
8646
|
address = every(address, function (item) {
|
|
8647
8647
|
return !item;
|
|
8648
8648
|
}) ? [] : address;
|
|
8649
|
-
var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey', 'interceptLogisticsCustomerCode'];
|
|
8649
|
+
var subFields = ['interceptCompany', 'interceptCode', 'interceptType', 'interceptSenderMobile', 'interceptDetail', 'interceptReceiverName', 'interceptReceiverMobile', 'interceptLogisticsStatus', 'interceptLogisticsStatusOther', 'interceptLogisticsSnapshot', 'qySelfInterceptLogisticsStatus', 'interceptLogisticsUserKCode', 'interceptLogisticsUserSecretKey', 'interceptLogisticsCustomerCode', 'trajectoryLastUpdateTime', 'trajectoryLastLogisticsInfo'];
|
|
8650
8650
|
var map = subFields.reduce(function (cur, nxt) {
|
|
8651
8651
|
return _objectSpread2(_objectSpread2({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
|
|
8652
8652
|
}, {});
|
|
8653
8653
|
return _defineProperty({}, nex.uniqueKey, _objectSpread2(_objectSpread2({}, map), {}, {
|
|
8654
8654
|
interceptAddress: address,
|
|
8655
|
-
interceptLogisticsApiStatus: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_interceptLogisticsApiStatus")), {})
|
|
8655
|
+
interceptLogisticsApiStatus: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_interceptLogisticsApiStatus")), {}),
|
|
8656
|
+
trajectoryApiStatus: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_trajectoryApiStatus")), {})
|
|
8656
8657
|
}));
|
|
8657
8658
|
};
|
|
8658
8659
|
};
|
|
@@ -13563,9 +13564,25 @@ var Payment = function Payment(props) {
|
|
|
13563
13564
|
var css_248z$9 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
|
|
13564
13565
|
styleInject(css_248z$9);
|
|
13565
13566
|
|
|
13567
|
+
var getInterceptionTrajectoryQueryParams = function getInterceptionTrajectoryQueryParams(value, enabled, disabled) {
|
|
13568
|
+
if (!enabled || disabled) return null;
|
|
13569
|
+
var interceptCompany = value.interceptCompany,
|
|
13570
|
+
interceptCode = value.interceptCode,
|
|
13571
|
+
interceptSenderMobile = value.interceptSenderMobile;
|
|
13572
|
+
if (!interceptCompany || !interceptCode) return null;
|
|
13573
|
+
if (['SF', 'ZTO'].includes(interceptCompany) && !interceptSenderMobile) {
|
|
13574
|
+
return null;
|
|
13575
|
+
}
|
|
13576
|
+
return {
|
|
13577
|
+
mailNo: interceptCode,
|
|
13578
|
+
cpCode: interceptCompany,
|
|
13579
|
+
mobile: interceptSenderMobile
|
|
13580
|
+
};
|
|
13581
|
+
};
|
|
13582
|
+
|
|
13566
13583
|
var Item = Form.Item;
|
|
13567
13584
|
var LogisticsInterception = function LogisticsInterception(props) {
|
|
13568
|
-
var _value$interceptLogis3, _value$interceptLogis4, _value$interceptLogis5;
|
|
13585
|
+
var _value$interceptLogis3, _value$interceptLogis4, _value$interceptLogis5, _value$trajectoryApiS, _value$trajectoryApiS2;
|
|
13569
13586
|
var LogisticsAddress = LogisticsAddressData.getInstance();
|
|
13570
13587
|
var address = AddressData.getInstance();
|
|
13571
13588
|
var _props$value = props.value,
|
|
@@ -13586,7 +13603,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13586
13603
|
_props$showReason = props.showReason,
|
|
13587
13604
|
showReason = _props$showReason === void 0 ? false : _props$showReason,
|
|
13588
13605
|
_props$preCreateAndNo = props.preCreateAndNotModified,
|
|
13589
|
-
preCreateAndNotModified = _props$preCreateAndNo === void 0 ? false : _props$preCreateAndNo
|
|
13606
|
+
preCreateAndNotModified = _props$preCreateAndNo === void 0 ? false : _props$preCreateAndNo,
|
|
13607
|
+
_props$trajectoryApiS = props.trajectoryApiStatus,
|
|
13608
|
+
trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
|
|
13590
13609
|
var _useState = useState(function () {
|
|
13591
13610
|
return (value === null || value === void 0 ? void 0 : value.interceptCompany) || undefined;
|
|
13592
13611
|
}),
|
|
@@ -13772,6 +13791,44 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13772
13791
|
});
|
|
13773
13792
|
return uk || undefined;
|
|
13774
13793
|
}, [value === null || value === void 0 ? void 0 : value.interceptCompany, value === null || value === void 0 ? void 0 : value.interceptAddress]);
|
|
13794
|
+
var searchTrajectory = function searchTrajectory(nextValue) {
|
|
13795
|
+
var params = getInterceptionTrajectoryQueryParams(nextValue, trajectoryApiStatus, disabled);
|
|
13796
|
+
if (!params) return;
|
|
13797
|
+
request$1({
|
|
13798
|
+
url: '/qy/logistics/logisticsTraceSearch',
|
|
13799
|
+
method: 'post',
|
|
13800
|
+
data: params
|
|
13801
|
+
}).then(function (res) {
|
|
13802
|
+
var result = res.result,
|
|
13803
|
+
success = res.success,
|
|
13804
|
+
data = res.data,
|
|
13805
|
+
msg = res.message;
|
|
13806
|
+
if (result === 100 || success) {
|
|
13807
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, nextValue), {}, {
|
|
13808
|
+
trajectoryApiStatus: (data === null || data === void 0 ? void 0 : data.apiStatusObject) || {
|
|
13809
|
+
status: '',
|
|
13810
|
+
reason: ''
|
|
13811
|
+
}
|
|
13812
|
+
}));
|
|
13813
|
+
return;
|
|
13814
|
+
}
|
|
13815
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, nextValue), {}, {
|
|
13816
|
+
trajectoryApiStatus: {
|
|
13817
|
+
status: '',
|
|
13818
|
+
reason: ''
|
|
13819
|
+
}
|
|
13820
|
+
}));
|
|
13821
|
+
msg && message.error(msg);
|
|
13822
|
+
}).catch(function (err) {
|
|
13823
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, nextValue), {}, {
|
|
13824
|
+
trajectoryApiStatus: {
|
|
13825
|
+
status: '',
|
|
13826
|
+
reason: ''
|
|
13827
|
+
}
|
|
13828
|
+
}));
|
|
13829
|
+
(err === null || err === void 0 ? void 0 : err.message) && message.error(err.message);
|
|
13830
|
+
});
|
|
13831
|
+
};
|
|
13775
13832
|
//选择回调
|
|
13776
13833
|
var changeHandle = function changeHandle(val, type) {
|
|
13777
13834
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
|
|
@@ -13833,7 +13890,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13833
13890
|
interceptLogisticsApiStatusReason: undefined,
|
|
13834
13891
|
interceptLogisticsUserKCode: undefined,
|
|
13835
13892
|
interceptLogisticsUserSecretKey: undefined,
|
|
13836
|
-
interceptLogisticsCustomerCode: undefined
|
|
13893
|
+
interceptLogisticsCustomerCode: undefined,
|
|
13894
|
+
trajectoryApiStatus: {
|
|
13895
|
+
status: '',
|
|
13896
|
+
reason: ''
|
|
13897
|
+
},
|
|
13898
|
+
trajectoryLastUpdateTime: undefined,
|
|
13899
|
+
trajectoryLastLogisticsInfo: undefined
|
|
13837
13900
|
});
|
|
13838
13901
|
}
|
|
13839
13902
|
if (type === 'interceptLogisticsApiStatus') {
|
|
@@ -13857,6 +13920,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13857
13920
|
}
|
|
13858
13921
|
}
|
|
13859
13922
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, type);
|
|
13923
|
+
if (type === 'interceptCompany') {
|
|
13924
|
+
searchTrajectory(newValue);
|
|
13925
|
+
}
|
|
13860
13926
|
};
|
|
13861
13927
|
//智能识别回调
|
|
13862
13928
|
var changeIdentify = function changeIdentify(val) {
|
|
@@ -13910,7 +13976,11 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
13910
13976
|
},
|
|
13911
13977
|
onBlur: function onBlur(e) {
|
|
13912
13978
|
var _e$target$value2;
|
|
13913
|
-
|
|
13979
|
+
var interceptCode = (_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.trim();
|
|
13980
|
+
_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(interceptCode, 'interceptCode');
|
|
13981
|
+
searchTrajectory(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13982
|
+
interceptCode: interceptCode
|
|
13983
|
+
}));
|
|
13914
13984
|
},
|
|
13915
13985
|
value: value === null || value === void 0 ? void 0 : value.interceptCode
|
|
13916
13986
|
}))), /*#__PURE__*/React.createElement(Item, {
|
|
@@ -14021,6 +14091,12 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
14021
14091
|
onChange: function onChange(e) {
|
|
14022
14092
|
var _e$target$value3;
|
|
14023
14093
|
return changeHandle((_e$target$value3 = e.target.value) === null || _e$target$value3 === void 0 ? void 0 : _e$target$value3.trim(), 'interceptSenderMobile');
|
|
14094
|
+
},
|
|
14095
|
+
onBlur: function onBlur(e) {
|
|
14096
|
+
var _e$target$value4;
|
|
14097
|
+
return searchTrajectory(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
14098
|
+
interceptSenderMobile: (_e$target$value4 = e.target.value) === null || _e$target$value4 === void 0 ? void 0 : _e$target$value4.trim()
|
|
14099
|
+
}));
|
|
14024
14100
|
}
|
|
14025
14101
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
14026
14102
|
label: '退回地址',
|
|
@@ -14079,8 +14155,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
14079
14155
|
},
|
|
14080
14156
|
placeholder: "\u5176\u4ED6",
|
|
14081
14157
|
onChange: function onChange(e) {
|
|
14082
|
-
var _e$target$
|
|
14083
|
-
return changeHandle((_e$target$
|
|
14158
|
+
var _e$target$value5;
|
|
14159
|
+
return changeHandle((_e$target$value5 = e.target.value) === null || _e$target$value5 === void 0 ? void 0 : _e$target$value5.trim(), 'interceptLogisticsStatusOther');
|
|
14084
14160
|
}
|
|
14085
14161
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
14086
14162
|
label: '拦截状态',
|
|
@@ -14103,7 +14179,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
14103
14179
|
value: '拦截失败'
|
|
14104
14180
|
}]
|
|
14105
14181
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
14106
|
-
label: '
|
|
14182
|
+
label: '拦截接口状态',
|
|
14107
14183
|
key: 'interceptLogisticsApiStatus'
|
|
14108
14184
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
14109
14185
|
value: (value === null || value === void 0 ? void 0 : (_value$interceptLogis3 = value.interceptLogisticsApiStatus) === null || _value$interceptLogis3 === void 0 ? void 0 : _value$interceptLogis3.status) || null,
|
|
@@ -14111,7 +14187,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
14111
14187
|
style: {
|
|
14112
14188
|
width: '200px'
|
|
14113
14189
|
},
|
|
14114
|
-
placeholder: "\u63A5\u53E3\u72B6\u6001",
|
|
14190
|
+
placeholder: "\u62E6\u622A\u63A5\u53E3\u72B6\u6001",
|
|
14115
14191
|
onChange: function onChange(val) {
|
|
14116
14192
|
return changeHandle(val, 'interceptLogisticsApiStatus');
|
|
14117
14193
|
},
|
|
@@ -14127,17 +14203,38 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
14127
14203
|
color: 'red'
|
|
14128
14204
|
}
|
|
14129
14205
|
}, "\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, {
|
|
14130
|
-
label: '
|
|
14206
|
+
label: '拦截接口状态原因',
|
|
14131
14207
|
key: 'interceptLogisticsApiStatusReason'
|
|
14132
14208
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
14133
14209
|
value: value === null || value === void 0 ? void 0 : value.interceptLogisticsApiStatusReason,
|
|
14134
14210
|
disabled: true,
|
|
14135
|
-
placeholder: "\u63A5\u53E3\u72B6\u6001\u539F\u56E0",
|
|
14211
|
+
placeholder: "\u62E6\u622A\u63A5\u53E3\u72B6\u6001\u539F\u56E0",
|
|
14136
14212
|
onChange: function onChange(e) {
|
|
14137
|
-
var _e$target$
|
|
14138
|
-
return changeHandle((_e$target$
|
|
14213
|
+
var _e$target$value6;
|
|
14214
|
+
return changeHandle((_e$target$value6 = e.target.value) === null || _e$target$value6 === void 0 ? void 0 : _e$target$value6.trim(), 'interceptLogisticsApiStatusReason');
|
|
14139
14215
|
}
|
|
14140
|
-
}))
|
|
14216
|
+
})), trajectoryApiStatus && /*#__PURE__*/React.createElement(Item, {
|
|
14217
|
+
label: '物流轨迹接口状态',
|
|
14218
|
+
key: 'trajectoryApiStatus'
|
|
14219
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
14220
|
+
value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.status) || null,
|
|
14221
|
+
disabled: true,
|
|
14222
|
+
style: {
|
|
14223
|
+
width: '200px'
|
|
14224
|
+
},
|
|
14225
|
+
placeholder: "\u7269\u6D41\u8F68\u8FF9\u63A5\u53E3\u72B6\u6001",
|
|
14226
|
+
options: [{
|
|
14227
|
+
label: '成功',
|
|
14228
|
+
value: '成功'
|
|
14229
|
+
}, {
|
|
14230
|
+
label: '失败',
|
|
14231
|
+
value: '失败'
|
|
14232
|
+
}]
|
|
14233
|
+
}), (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", {
|
|
14234
|
+
style: {
|
|
14235
|
+
color: 'red'
|
|
14236
|
+
}
|
|
14237
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", value.trajectoryApiStatus.reason) : null));
|
|
14141
14238
|
};
|
|
14142
14239
|
|
|
14143
14240
|
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.
|
|
3
|
+
"version": "2.14.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.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.14.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": "
|
|
69
|
+
"gitHead": "e4da074c5fa8c3b114ebf9df59fa882616feb629"
|
|
70
70
|
}
|