@kmkf-fe-packages/services-components 2.10.9-beta.3 → 2.10.9-beta.31
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/esm/Hooks/useColumnsConfig.d.ts +1 -1
- package/dist/esm/Hooks/useColumnsConfig.js +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +3 -2
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +13 -12
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +12 -9
- package/dist/esm/components/BS/BsExchange/index.d.ts +7 -0
- package/dist/esm/components/BS/BsExchange/index.js +6 -0
- package/dist/esm/components/BS/BsGoods/index.d.ts +7 -0
- package/dist/esm/components/BS/BsGoods/index.js +6 -0
- package/dist/esm/components/BS/BsLogistics/index.js +9 -0
- package/dist/esm/components/BS/BsReissue/index.d.ts +7 -0
- package/dist/esm/components/BS/BsReissue/index.js +6 -0
- package/dist/esm/components/BS/BsReturn/index.d.ts +7 -0
- package/dist/esm/components/BS/BsReturn/index.js +6 -0
- package/dist/esm/components/BS/BsSystemOrder/index.js +3 -2
- package/dist/esm/components/BS/common/expressCode.js +3 -0
- package/dist/esm/components/BS/common/expressCompany.js +3 -0
- package/dist/esm/components/BsE3/BsGoods/index.d.ts +7 -0
- package/dist/esm/components/BsE3/BsGoods/index.js +6 -0
- package/dist/esm/components/BsE3/BsReissueE3/index.d.ts +7 -0
- package/dist/esm/components/BsE3/BsReissueE3/index.js +6 -0
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.d.ts +6 -0
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +18 -2
- package/dist/esm/components/Common/index.js +6 -3
- package/dist/esm/components/CommonHeaderGood/index.js +54 -35
- package/dist/esm/components/CommonMultiStatus/index.d.ts +4 -1
- package/dist/esm/components/CommonMultiStatus/index.js +61 -6
- package/dist/esm/components/GY/GyGoods/index.d.ts +7 -0
- package/dist/esm/components/GY/GyGoods/index.js +6 -0
- package/dist/esm/components/GY/GyReissue/index.d.ts +7 -0
- package/dist/esm/components/GY/GyReissue/index.js +6 -0
- package/dist/esm/components/GY/GyReturn/index.d.ts +7 -0
- package/dist/esm/components/GY/GyReturn/index.js +6 -0
- package/dist/esm/components/JST/JstSendGood/index.d.ts +2 -1
- package/dist/esm/components/JST/JstSendGood/index.js +16 -2
- package/dist/esm/components/JST/JstSupply/index.d.ts +1 -1
- package/dist/esm/components/JST/JstSupply/index.js +3 -0
- package/dist/esm/components/KM/KmExchange/index.d.ts +7 -0
- package/dist/esm/components/KM/KmExchange/index.js +6 -0
- package/dist/esm/components/KmErpSendGood/index.d.ts +1 -1
- package/dist/esm/components/KmErpSendGood/index.js +3 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +3 -0
- package/dist/esm/components/LogisticsInterception/index.js +14 -7
- package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.d.ts +39 -0
- package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.js +103 -0
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +2 -0
- package/dist/esm/components/LogisticsMoreInterception/index.js +19 -5
- package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsCustomerCode.d.ts +39 -0
- package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsCustomerCode.js +108 -0
- package/dist/esm/components/Public/Exchange/index.d.ts +7 -0
- package/dist/esm/components/Public/Exchange/index.js +6 -0
- package/dist/esm/components/Public/Goods/index.js +6 -12
- package/dist/esm/components/Public/ReissueGoods/index.d.ts +7 -0
- package/dist/esm/components/Public/ReissueGoods/index.js +6 -0
- package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +1 -1
- package/dist/esm/components/Public/ReturnWarehouse/index.js +3 -0
- package/dist/esm/components/Reissue/Logistics/index.d.ts +1 -1
- package/dist/esm/components/Reissue/Logistics/index.js +3 -0
- package/dist/esm/components/Remark/index.d.ts +4 -1
- package/dist/esm/components/Remark/index.js +36 -8
- package/dist/esm/components/SKX/SkxGoods/index.d.ts +7 -0
- package/dist/esm/components/SKX/SkxGoods/index.js +6 -0
- package/dist/esm/components/WDT/WdtExchange/index.d.ts +7 -0
- package/dist/esm/components/WDT/WdtExchange/index.js +6 -0
- package/dist/esm/components/WDT/WdtGoods/index.d.ts +7 -0
- package/dist/esm/components/WDT/WdtGoods/index.js +6 -0
- package/dist/esm/components/WDT/WdtRessuie/index.d.ts +7 -0
- package/dist/esm/components/WDT/WdtRessuie/index.js +6 -0
- package/dist/esm/components/WDT/WdtReturn/index.d.ts +7 -0
- package/dist/esm/components/WDT/WdtReturn/index.js +6 -0
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.js +10 -1
- package/dist/esm/service/api.d.ts +1 -0
- package/dist/esm/service/api.js +6 -0
- package/package.json +4 -4
|
@@ -99,6 +99,14 @@ var typeMap = {
|
|
|
99
99
|
sendName: "dxdSendName",
|
|
100
100
|
platformType: "dxd",
|
|
101
101
|
dataType: "weakenArray"
|
|
102
|
+
},
|
|
103
|
+
TTX_SEND_GOOD: {
|
|
104
|
+
key: "ttxSendGood",
|
|
105
|
+
name: "ttx",
|
|
106
|
+
sendId: "ttxSendId",
|
|
107
|
+
sendName: "ttxSendName",
|
|
108
|
+
platformType: "ttx",
|
|
109
|
+
dataType: "weakenArray"
|
|
102
110
|
}
|
|
103
111
|
};
|
|
104
112
|
var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
@@ -123,6 +131,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
123
131
|
_defineProperty(this, "children", void 0);
|
|
124
132
|
_defineProperty(this, "dataType", void 0);
|
|
125
133
|
_defineProperty(this, "format", void 0);
|
|
134
|
+
_defineProperty(this, "effects", void 0);
|
|
126
135
|
_defineProperty(this, "getSortChildFields", function (type, options, fieldType) {
|
|
127
136
|
var _typeMap$options$type, _typeMap$options$type2, _typeMap$options$type3;
|
|
128
137
|
var sendName = {
|
|
@@ -182,12 +191,15 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
182
191
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
183
192
|
var _typeMap$_this$type6;
|
|
184
193
|
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
|
|
194
|
+
if (!Array.isArray(list)) {
|
|
195
|
+
return '';
|
|
196
|
+
}
|
|
185
197
|
return (list || []).map(function (item) {
|
|
186
198
|
return [item === null || item === void 0 ? void 0 : item.sendId, SendDataCenter.getInstance(_this.type).getSendNameByCode(item === null || item === void 0 ? void 0 : item.sendName)].join("/");
|
|
187
199
|
}).join(",");
|
|
188
200
|
});
|
|
189
201
|
_defineProperty(this, "editRender", function (p) {
|
|
190
|
-
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type7;
|
|
202
|
+
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type7, _this$effects;
|
|
191
203
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
192
204
|
title: _this.name,
|
|
193
205
|
name: _this.id,
|
|
@@ -199,6 +211,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
199
211
|
component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
|
|
200
212
|
type: 3,
|
|
201
213
|
platformType: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.platformType,
|
|
214
|
+
form: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.form,
|
|
202
215
|
onlyShowFieldSelect: _this.componentConfig ? _this.componentConfig.showField === "sendName" : false
|
|
203
216
|
}))
|
|
204
217
|
});
|
|
@@ -232,7 +245,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
232
245
|
});
|
|
233
246
|
};
|
|
234
247
|
}
|
|
235
|
-
} : ["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "KM_SEND_GOOD", "GY_SEND_GOOD", "JY_SEND_GOOD", "JKY_SEND_GOOD", "DXD_SEND_GOOD"].includes(_this.type) ? {
|
|
248
|
+
} : ["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "KM_SEND_GOOD", "GY_SEND_GOOD", "JY_SEND_GOOD", "JKY_SEND_GOOD", "DXD_SEND_GOOD", "TTX_SEND_GOOD"].includes(_this.type) ? {
|
|
236
249
|
searchDefaultConditions: SYMBOL.in,
|
|
237
250
|
type: item.type,
|
|
238
251
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.sendName),
|
|
@@ -293,6 +306,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
293
306
|
this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "", _options, _options.type);
|
|
294
307
|
this.type = _options.type;
|
|
295
308
|
this.dataType = (_typeMap$_options$typ3 = typeMap[_options.type]) === null || _typeMap$_options$typ3 === void 0 ? void 0 : _typeMap$_options$typ3.dataType;
|
|
309
|
+
this.effects = _options === null || _options === void 0 ? void 0 : _options.effects;
|
|
296
310
|
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
297
311
|
required: true,
|
|
298
312
|
validator: function validator(_, value) {
|
|
@@ -25,7 +25,7 @@ declare class JstSupply implements ComponentInterface {
|
|
|
25
25
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
26
26
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
27
27
|
getComponentValue: (r: Record) => any;
|
|
28
|
-
renderExport: (value: any, record: any) =>
|
|
28
|
+
renderExport: (value: any, record: any) => string;
|
|
29
29
|
editRender: (p: any) => React.JSX.Element;
|
|
30
30
|
filterConfig: (item: ColumnConfig) => {
|
|
31
31
|
searchDefaultConditions: "like";
|
|
@@ -80,6 +80,9 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(_options) {
|
|
|
80
80
|
});
|
|
81
81
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
82
82
|
var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_jstItemList")]) || [];
|
|
83
|
+
if (!Array.isArray(list)) {
|
|
84
|
+
return '';
|
|
85
|
+
}
|
|
83
86
|
return list.map(function (item) {
|
|
84
87
|
return [item === null || item === void 0 ? void 0 : item.supplyId, item === null || item === void 0 ? void 0 : item.supplyName].join("/");
|
|
85
88
|
}).join(",");
|
|
@@ -14,8 +14,15 @@ declare class KmExchange implements ComponentInterface {
|
|
|
14
14
|
canSort: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
16
|
dataType: ComponentInterface["dataType"];
|
|
17
|
+
sortChildField: NonNullable<ComponentInterface["sortChildField"]>;
|
|
17
18
|
returnGoods: CommonHeaderGoods;
|
|
18
19
|
constructor(options: PickOption);
|
|
20
|
+
getSortChildFields: () => {
|
|
21
|
+
name: any;
|
|
22
|
+
key: string;
|
|
23
|
+
dataType: string;
|
|
24
|
+
conditionOptionsSetting: any;
|
|
25
|
+
}[];
|
|
19
26
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
27
|
renderPc: () => null;
|
|
21
28
|
renderLog: (r: Record) => React.JSX.Element;
|
|
@@ -17,6 +17,7 @@ import { SYMBOL } from "../../../constant";
|
|
|
17
17
|
// import { BsType, BsMemo } from "../../Bs/common";
|
|
18
18
|
import { CommonExchangeGoods, erpFormValidator } from "@kmkf-fe-packages/basic-components";
|
|
19
19
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
20
|
+
import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
|
|
20
21
|
var KmExchange = /*#__PURE__*/_createClass(function KmExchange(options) {
|
|
21
22
|
var _this = this,
|
|
22
23
|
_this$componentConfig6,
|
|
@@ -34,7 +35,11 @@ var KmExchange = /*#__PURE__*/_createClass(function KmExchange(options) {
|
|
|
34
35
|
_defineProperty(this, "canSort", void 0);
|
|
35
36
|
_defineProperty(this, "children", void 0);
|
|
36
37
|
_defineProperty(this, "dataType", void 0);
|
|
38
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
37
39
|
_defineProperty(this, "returnGoods", void 0);
|
|
40
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
41
|
+
return getGoodsSortChildFields(_this.type, _this.id);
|
|
42
|
+
});
|
|
38
43
|
_defineProperty(this, "renderClient", function (record) {
|
|
39
44
|
var _this$componentConfig;
|
|
40
45
|
var kmExchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_kmExchangeGoods")]) || "[]");
|
|
@@ -132,5 +137,6 @@ var KmExchange = /*#__PURE__*/_createClass(function KmExchange(options) {
|
|
|
132
137
|
}
|
|
133
138
|
}];
|
|
134
139
|
this.dataType = "object";
|
|
140
|
+
this.sortChildField = this.getSortChildFields();
|
|
135
141
|
});
|
|
136
142
|
export default KmExchange;
|
|
@@ -28,7 +28,7 @@ declare class JstSendGood implements ComponentInterface {
|
|
|
28
28
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
29
29
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
30
30
|
getComponentValue: (r: Record) => any;
|
|
31
|
-
renderExport: (value: any, record: any) =>
|
|
31
|
+
renderExport: (value: any, record: any) => string;
|
|
32
32
|
editRender: (p: any) => React.JSX.Element;
|
|
33
33
|
filterConfig: (item: ColumnConfig) => ({
|
|
34
34
|
searchDefaultConditions: "in";
|
|
@@ -85,6 +85,9 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
85
85
|
});
|
|
86
86
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
87
87
|
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.suffixKey)];
|
|
88
|
+
if (!Array.isArray(list)) {
|
|
89
|
+
return '';
|
|
90
|
+
}
|
|
88
91
|
return (list || []).map(function (item) {
|
|
89
92
|
return [item === null || item === void 0 ? void 0 : item.sendId, SendDataCenter.getInstance(_this.type).getSendNameByCode(item === null || item === void 0 ? void 0 : item.sendName)].join("/");
|
|
90
93
|
}).join(",");
|
|
@@ -11,6 +11,7 @@ import InterceptState from "./InterceptState";
|
|
|
11
11
|
import InterceptApiStatus from "./InterceptApiStatus";
|
|
12
12
|
import Express from "../Express";
|
|
13
13
|
import ExpressCode from "../ExpressCode";
|
|
14
|
+
import InterceptLogisticsCustomerCode from "./interceptLogisticsCustomerCode";
|
|
14
15
|
declare class Logistics implements ComponentInterface {
|
|
15
16
|
name: string;
|
|
16
17
|
columnHeader: string | JSX.Element;
|
|
@@ -25,6 +26,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
25
26
|
interceptApiStatus: InterceptApiStatus;
|
|
26
27
|
interceptSenderMobile: InterceptSenderMobile;
|
|
27
28
|
interceptApiStatusReason: InterceptApiStatusReason;
|
|
29
|
+
interceptLogisticsCustomerCode: InterceptLogisticsCustomerCode;
|
|
28
30
|
interceptSnapshot: InterceptSnapshot;
|
|
29
31
|
interceptState: InterceptState;
|
|
30
32
|
isCombinationComponent: boolean;
|
|
@@ -60,6 +62,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
60
62
|
interceptSnapshot: any;
|
|
61
63
|
interceptState: any;
|
|
62
64
|
interceptApiStatusReason: any;
|
|
65
|
+
interceptLogisticsCustomerCode: any;
|
|
63
66
|
};
|
|
64
67
|
renderPc: () => null;
|
|
65
68
|
renderExport: () => null;
|
|
@@ -10,7 +10,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
11
|
import React from "react";
|
|
12
12
|
import { LogisticsInterception } from "@kmkf-fe-packages/basic-components";
|
|
13
|
-
import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import { ExpressData, ExpressInterceptData, isJdLogisticsCompany, LogisticsAddressData, isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import GetFormItem from "../GetFormItem";
|
|
15
15
|
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
16
16
|
import InterceptApiStatusReason from "./interceptApiStatusReason";
|
|
@@ -23,6 +23,7 @@ import InterceptApiStatus from "./InterceptApiStatus";
|
|
|
23
23
|
import Express from "../Express";
|
|
24
24
|
import ExpressCode from "../ExpressCode";
|
|
25
25
|
import ColumnHeader from "./columnHeader";
|
|
26
|
+
import InterceptLogisticsCustomerCode from "./interceptLogisticsCustomerCode";
|
|
26
27
|
// import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
27
28
|
// import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
|
|
28
29
|
// import interceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
@@ -46,6 +47,7 @@ function Logistics(options) {
|
|
|
46
47
|
_defineProperty(this, "interceptApiStatus", void 0);
|
|
47
48
|
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
48
49
|
_defineProperty(this, "interceptApiStatusReason", void 0);
|
|
50
|
+
_defineProperty(this, "interceptLogisticsCustomerCode", void 0);
|
|
49
51
|
_defineProperty(this, "interceptSnapshot", void 0);
|
|
50
52
|
_defineProperty(this, "interceptState", void 0);
|
|
51
53
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
@@ -61,10 +63,10 @@ function Logistics(options) {
|
|
|
61
63
|
_defineProperty(this, "dataType", void 0);
|
|
62
64
|
_defineProperty(this, "isChange", void 0);
|
|
63
65
|
_defineProperty(this, "renderClient", function (record) {
|
|
64
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptApiStatus.renderClient(record), _this.interceptApiStatusReason.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record));
|
|
66
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptApiStatus.renderClient(record), _this.interceptApiStatusReason.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record), _this.interceptLogisticsCustomerCode.renderClient(record));
|
|
65
67
|
});
|
|
66
68
|
_defineProperty(this, "renderLog", function (record) {
|
|
67
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptApiStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatus.name, ":", " ", _this.interceptApiStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptApiStatusReason.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatusReason.name, ":", " ", _this.interceptApiStatusReason.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptState.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptState.name, ":", " ", _this.interceptState.renderLog(record))));
|
|
69
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsCustomerCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsCustomerCode.name, ":", " ", _this.interceptLogisticsCustomerCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptApiStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatus.name, ":", " ", _this.interceptApiStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptApiStatusReason.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatusReason.name, ":", " ", _this.interceptApiStatusReason.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptState.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptState.name, ":", " ", _this.interceptState.renderLog(record))));
|
|
68
70
|
});
|
|
69
71
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
70
72
|
return {
|
|
@@ -77,7 +79,8 @@ function Logistics(options) {
|
|
|
77
79
|
interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
|
|
78
80
|
interceptSnapshot: _this.interceptSnapshot.getComponentValue(r),
|
|
79
81
|
interceptState: _this.interceptState.getComponentValue(r),
|
|
80
|
-
interceptApiStatusReason: _this.interceptApiStatusReason.getComponentValue(r)
|
|
82
|
+
interceptApiStatusReason: _this.interceptApiStatusReason.getComponentValue(r),
|
|
83
|
+
interceptLogisticsCustomerCode: _this.interceptLogisticsCustomerCode.getComponentValue(r)
|
|
81
84
|
// interceptLogisticsUserKCode:
|
|
82
85
|
// this.interceptLogisticsUserKCode.getComponentValue(r),
|
|
83
86
|
// interceptLogisticsUserSecretKey:
|
|
@@ -133,7 +136,7 @@ function Logistics(options) {
|
|
|
133
136
|
subKey: "interceptCompany"
|
|
134
137
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
135
138
|
subKey: "interceptCode"
|
|
136
|
-
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptApiStatusReason.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)
|
|
139
|
+
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptApiStatusReason.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item), _this.interceptLogisticsCustomerCode.filterConfig(item)
|
|
137
140
|
// this.interceptLogisticsUserKCode.filterConfig(item),
|
|
138
141
|
// this.interceptLogisticsUserSecretKey.filterConfig(item),
|
|
139
142
|
];
|
|
@@ -159,6 +162,7 @@ function Logistics(options) {
|
|
|
159
162
|
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
160
163
|
this.interceptState = new InterceptState(options);
|
|
161
164
|
this.interceptApiStatusReason = new InterceptApiStatusReason(options);
|
|
165
|
+
this.interceptLogisticsCustomerCode = new InterceptLogisticsCustomerCode(options);
|
|
162
166
|
// this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(
|
|
163
167
|
// options,
|
|
164
168
|
// );
|
|
@@ -175,7 +179,7 @@ function Logistics(options) {
|
|
|
175
179
|
this.canSort = false;
|
|
176
180
|
this.dataType = "object";
|
|
177
181
|
this.isChange = false;
|
|
178
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptApiStatusReason, this.interceptSnapshot, this.interceptState
|
|
182
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptApiStatusReason, this.interceptSnapshot, this.interceptState, this.interceptLogisticsCustomerCode
|
|
179
183
|
// this.interceptLogisticsUserKCode,
|
|
180
184
|
// this.interceptLogisticsUserSecretKey,
|
|
181
185
|
];
|
|
@@ -186,7 +190,10 @@ function Logistics(options) {
|
|
|
186
190
|
if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && (!(value !== null && value !== void 0 && value.interceptCompany) || !value.interceptCode)) {
|
|
187
191
|
return Promise.reject(new Error("请填写物流信息"));
|
|
188
192
|
}
|
|
189
|
-
if ((
|
|
193
|
+
if (isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany) && !(value !== null && value !== void 0 && value.interceptLogisticsCustomerCode)) {
|
|
194
|
+
return Promise.reject(new Error("请选择客户编码"));
|
|
195
|
+
}
|
|
196
|
+
if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required && !isJdLogisticsCompany(value === null || value === void 0 ? void 0 : value.interceptCompany) && !(value !== null && value !== void 0 && value.interceptType)) {
|
|
190
197
|
return Promise.reject(new Error("请选择拦截类型"));
|
|
191
198
|
}
|
|
192
199
|
var showAddress = _this.expressInterceptData.getShowNewAddressMap()["".concat(value === null || value === void 0 ? void 0 : value.interceptType)];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ALignType, ColumnConfig, ComponentInterface, PickOption, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class InterceptLogisticsCustomerCode implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
|
+
align: ALignType;
|
|
12
|
+
width: number;
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
formField: string;
|
|
15
|
+
canSort: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
options: ComponentInterface["options"];
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getComponentValue: (record: Record) => any;
|
|
21
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (_value: any, record: Record) => any;
|
|
23
|
+
renderLog: (record: Record) => any;
|
|
24
|
+
renderExport: (_value: any, record: Record) => any;
|
|
25
|
+
editRender: () => null;
|
|
26
|
+
filterConfig: (item: ColumnConfig) => {
|
|
27
|
+
searchDefaultConditions: "in";
|
|
28
|
+
type: string;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
filterComponentType: "MultipleSelect";
|
|
32
|
+
props: {
|
|
33
|
+
options: any[];
|
|
34
|
+
};
|
|
35
|
+
formatFilterValue: (value: string[]) => string[];
|
|
36
|
+
filterFn: (value: string[]) => (record: Record) => boolean;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export default InterceptLogisticsCustomerCode;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
import React from "react";
|
|
9
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
+
import { filterFn as _filterFn, isNull, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
import { SYMBOL } from "../../constant";
|
|
12
|
+
var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function InterceptLogisticsCustomerCode(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, InterceptLogisticsCustomerCode);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "sortField", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", void 0);
|
|
20
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
21
|
+
_defineProperty(this, "effects", void 0);
|
|
22
|
+
_defineProperty(this, "align", void 0);
|
|
23
|
+
_defineProperty(this, "width", void 0);
|
|
24
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
+
_defineProperty(this, "formField", void 0);
|
|
26
|
+
_defineProperty(this, "canSort", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "options", void 0);
|
|
30
|
+
_defineProperty(this, "getComponentValue", function (record) {
|
|
31
|
+
return record === null || record === void 0 ? void 0 : record[_this.id];
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
34
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
|
+
id: _this.id,
|
|
36
|
+
label: _this.name,
|
|
37
|
+
value: record[_this.id]
|
|
38
|
+
}) : null;
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderPc", function (_value, record) {
|
|
41
|
+
var _record$_this$id;
|
|
42
|
+
return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "renderLog", function (record) {
|
|
45
|
+
return isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? null : record[_this.id];
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderExport", function (_value, record) {
|
|
48
|
+
var _record$_this$id2;
|
|
49
|
+
return (_record$_this$id2 = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id2 !== void 0 ? _record$_this$id2 : "--";
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "editRender", function () {
|
|
52
|
+
return null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
55
|
+
return {
|
|
56
|
+
searchDefaultConditions: SYMBOL.in,
|
|
57
|
+
type: item.type,
|
|
58
|
+
id: "".concat(item.id, "_interceptLogisticsCustomerCode"),
|
|
59
|
+
name: "".concat(item.name, "-\u5BA2\u6237\u7F16\u7801"),
|
|
60
|
+
filterComponentType: "MultipleSelect",
|
|
61
|
+
props: {
|
|
62
|
+
options: _this.options || []
|
|
63
|
+
},
|
|
64
|
+
formatFilterValue: function formatFilterValue(value) {
|
|
65
|
+
var _value$map;
|
|
66
|
+
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (item) {
|
|
67
|
+
return item === null || item === void 0 ? void 0 : item.split(",");
|
|
68
|
+
})) === null || _value$map === void 0 ? void 0 : _value$map.flat();
|
|
69
|
+
},
|
|
70
|
+
filterFn: function filterFn(value) {
|
|
71
|
+
return function (record) {
|
|
72
|
+
var _value$map2, _value$map2$flat;
|
|
73
|
+
return value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (item) {
|
|
74
|
+
return item === null || item === void 0 ? void 0 : item.split(",");
|
|
75
|
+
})) === null || _value$map2 === void 0 ? void 0 : (_value$map2$flat = _value$map2.flat()) === null || _value$map2$flat === void 0 ? void 0 : _value$map2$flat.includes(_filterFn.filterTableListItemColumnValue(record, item.id, "interceptLogisticsCustomerCode"));
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
this.name = "客户编码";
|
|
81
|
+
this.id = "".concat(options.id, "_interceptLogisticsCustomerCode");
|
|
82
|
+
this.sortField = this.id;
|
|
83
|
+
this.formField = this.id;
|
|
84
|
+
this.type = options.type;
|
|
85
|
+
this.componentConfig = options.componentConfig;
|
|
86
|
+
this.rules = [];
|
|
87
|
+
this.align = "left";
|
|
88
|
+
this.width = 220;
|
|
89
|
+
this.isCombinationComponent = false;
|
|
90
|
+
this.canSort = true;
|
|
91
|
+
this.children = [];
|
|
92
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
93
|
+
this.dataType = "string";
|
|
94
|
+
this.options = (LogisticsAddressData.getInstance().getAddressData() || []).filter(function (item) {
|
|
95
|
+
return item.cpCode === "JD" && item.customerCode;
|
|
96
|
+
}).map(function (item) {
|
|
97
|
+
return {
|
|
98
|
+
label: item.remark ? "".concat(item.customerCode, "\uFF08").concat(item.remark, "\uFF09") : item.customerCode,
|
|
99
|
+
value: item.customerCode
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
export default InterceptLogisticsCustomerCode;
|
|
@@ -9,6 +9,7 @@ import InterceptStatus from "./InterceptStatus";
|
|
|
9
9
|
import InterceptCode from "./interceptCode";
|
|
10
10
|
import InterceptApiStatus from "./InterceptApiStatus";
|
|
11
11
|
import Express from "./interceptCompany";
|
|
12
|
+
import InterceptLogisticsCustomerCode from "./interceptLogisticsCustomerCode";
|
|
12
13
|
declare class Logistics implements ComponentInterface {
|
|
13
14
|
name: string;
|
|
14
15
|
columnHeader: string | JSX.Element;
|
|
@@ -23,6 +24,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
23
24
|
interceptApiStatus: InterceptApiStatus;
|
|
24
25
|
interceptSenderMobile: InterceptSenderMobile;
|
|
25
26
|
interceptSnapshot: InterceptSnapshot;
|
|
27
|
+
interceptLogisticsCustomerCode: InterceptLogisticsCustomerCode;
|
|
26
28
|
isCombinationComponent: boolean;
|
|
27
29
|
formField: string;
|
|
28
30
|
canSort: boolean;
|
|
@@ -11,7 +11,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
11
11
|
import React from "react";
|
|
12
12
|
import { Space } from "antd";
|
|
13
13
|
import { LogisticsMoreInterception } from "@kmkf-fe-packages/basic-components";
|
|
14
|
-
import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData, isJdLogisticsCompany } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
15
|
import ItemView from "../../commonComponents/ItemView";
|
|
16
16
|
import GetFormItem from "../GetFormItem";
|
|
17
17
|
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
@@ -25,6 +25,7 @@ import Express from "./interceptCompany";
|
|
|
25
25
|
import ColumnHeader from "./columnHeader";
|
|
26
26
|
import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
|
|
27
27
|
import CopyText from "../../commonComponents/CopyText";
|
|
28
|
+
import InterceptLogisticsCustomerCode from "./interceptLogisticsCustomerCode";
|
|
28
29
|
// import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
|
|
29
30
|
// import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
|
|
30
31
|
var Logistics = /*#__PURE__*/_createClass(
|
|
@@ -49,6 +50,7 @@ function Logistics(options) {
|
|
|
49
50
|
_defineProperty(this, "interceptApiStatus", void 0);
|
|
50
51
|
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
51
52
|
_defineProperty(this, "interceptSnapshot", void 0);
|
|
53
|
+
_defineProperty(this, "interceptLogisticsCustomerCode", void 0);
|
|
52
54
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
53
55
|
_defineProperty(this, "formField", void 0);
|
|
54
56
|
_defineProperty(this, "canSort", void 0);
|
|
@@ -75,7 +77,7 @@ function Logistics(options) {
|
|
|
75
77
|
text: item.interceptCode
|
|
76
78
|
})) : null, (_item$interceptAddres = item.interceptAddress) !== null && _item$interceptAddres !== void 0 && _item$interceptAddres.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", /*#__PURE__*/React.createElement(CopyText, {
|
|
77
79
|
text: "".concat(addressText, "\n ").concat(item.interceptDetail, " ").concat(item.interceptReceiverName, "\n ").concat(item.interceptReceiverMobile)
|
|
78
|
-
})) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
|
|
80
|
+
})) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsCustomerCode ? /*#__PURE__*/React.createElement("div", null, "\u5BA2\u6237\u7F16\u7801\uFF1A", item.interceptLogisticsCustomerCode) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
|
|
79
81
|
modelWidth: 500,
|
|
80
82
|
interceptCompany: item.interceptCompany,
|
|
81
83
|
interceptCode: item.interceptCode,
|
|
@@ -128,7 +130,7 @@ function Logistics(options) {
|
|
|
128
130
|
subKey: "logisticsInterceptCompanyList"
|
|
129
131
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
130
132
|
subKey: "logisticsInterceptCodeList"
|
|
131
|
-
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
|
|
133
|
+
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptLogisticsCustomerCode.filterConfig(item)];
|
|
132
134
|
});
|
|
133
135
|
this.name = options.name;
|
|
134
136
|
this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
|
|
@@ -150,6 +152,7 @@ function Logistics(options) {
|
|
|
150
152
|
this.interceptApiStatus = new InterceptApiStatus(options);
|
|
151
153
|
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
152
154
|
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
155
|
+
this.interceptLogisticsCustomerCode = new InterceptLogisticsCustomerCode(options);
|
|
153
156
|
// this.interceptLogisticsUserKCode = new InterceptLogisticsUserKCode(options);
|
|
154
157
|
// this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(
|
|
155
158
|
// options
|
|
@@ -165,7 +168,7 @@ function Logistics(options) {
|
|
|
165
168
|
this.isCombinationComponent = true;
|
|
166
169
|
this.canSort = false;
|
|
167
170
|
this.dataType = "object";
|
|
168
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot
|
|
171
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptLogisticsCustomerCode
|
|
169
172
|
// this.interceptLogisticsUserKCode,
|
|
170
173
|
// this.interceptLogisticsUserSecretKey,
|
|
171
174
|
];
|
|
@@ -179,7 +182,7 @@ function Logistics(options) {
|
|
|
179
182
|
return Promise.reject(new Error("请填写物流信息"));
|
|
180
183
|
}
|
|
181
184
|
if (value.some(function (t) {
|
|
182
|
-
return !(t !== null && t !== void 0 && t.interceptType);
|
|
185
|
+
return !isJdLogisticsCompany(t === null || t === void 0 ? void 0 : t.interceptCompany) && !(t !== null && t !== void 0 && t.interceptType);
|
|
183
186
|
})) {
|
|
184
187
|
return Promise.reject(new Error("请选择拦截类型"));
|
|
185
188
|
}
|
|
@@ -220,6 +223,17 @@ function Logistics(options) {
|
|
|
220
223
|
return Promise.resolve();
|
|
221
224
|
}
|
|
222
225
|
}] : [];
|
|
226
|
+
this.rules.unshift({
|
|
227
|
+
validator: function validator(_) {
|
|
228
|
+
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
229
|
+
if (value.some(function (item) {
|
|
230
|
+
return isJdLogisticsCompany(item === null || item === void 0 ? void 0 : item.interceptCompany) && !(item !== null && item !== void 0 && item.interceptLogisticsCustomerCode);
|
|
231
|
+
})) {
|
|
232
|
+
return Promise.reject(new Error("请选择客户编码"));
|
|
233
|
+
}
|
|
234
|
+
return Promise.resolve();
|
|
235
|
+
}
|
|
236
|
+
});
|
|
223
237
|
this.addressDateInstance = AddressData.getInstance();
|
|
224
238
|
});
|
|
225
239
|
export default Logistics;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ALignType, ColumnConfig, ComponentInterface, PickOption, Record } from "../../type";
|
|
2
|
+
declare class InterceptLogisticsCustomerCode implements ComponentInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
id: string;
|
|
5
|
+
sortField: string;
|
|
6
|
+
type: string;
|
|
7
|
+
rules: any[];
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
effects: ComponentInterface["effects"];
|
|
10
|
+
align: ALignType;
|
|
11
|
+
width: number;
|
|
12
|
+
isCombinationComponent: boolean;
|
|
13
|
+
formField: string;
|
|
14
|
+
canSort: boolean;
|
|
15
|
+
children: ComponentInterface[];
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
|
+
options: ComponentInterface["options"];
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
getComponentValue: (record: Record) => any;
|
|
20
|
+
renderCustomerCodes: (record: Record) => any;
|
|
21
|
+
renderClient: () => null;
|
|
22
|
+
renderPc: (_value: any, record: Record) => any;
|
|
23
|
+
renderLog: () => null;
|
|
24
|
+
renderExport: (_value: any, record: Record) => any;
|
|
25
|
+
editRender: () => null;
|
|
26
|
+
filterConfig: (item: ColumnConfig) => {
|
|
27
|
+
searchDefaultConditions: "in";
|
|
28
|
+
type: string;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
filterComponentType: "MultipleSelect";
|
|
32
|
+
props: {
|
|
33
|
+
options: any[];
|
|
34
|
+
};
|
|
35
|
+
formatFilterValue: (value: string[]) => string[];
|
|
36
|
+
filterFn: (value: string[]) => (record: Record) => boolean;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export default InterceptLogisticsCustomerCode;
|