@kmkf-fe-packages/services-components 2.10.24 → 2.10.26
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/components/CommonMultiStatus/index.js +62 -0
- package/dist/esm/components/JST/JstSendGood/index.js +1 -1
- 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 +42 -0
- package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.js +102 -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 +101 -0
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.js +2 -0
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import LogisticsInterception from "../components/LogisticsInterception";
|
|
2
2
|
import LogisticsMoreInterception from "../components/LogisticsMoreInterception";
|
|
3
|
-
export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/BS/BsLogistics").default | import("../components/BS/BsSystemOrder").default | import("../components/CommonMultiStatus").default | import("../components/JST/JstSendGood").default | LogisticsInterception | LogisticsMoreInterception | import("../components/Public/Goods").default | import("../components/
|
|
3
|
+
export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/BS/BsLogistics").default | import("../components/BS/BsSystemOrder").default | import("../components/CommonMultiStatus").default | import("../components/JST/JstSendGood").default | LogisticsInterception | LogisticsMoreInterception | import("../components/Public/Goods").default | import("../components/Input").default | import("../components/TypeInput").default | import("../components/Address").default | import("../components/Cascader").default | import("../components/Checkbox").default | import("../components/DataTime").default | import("../components/Select").default | import("../components/SelectOption").default | import("../components/Radio").default | import("../components/TextArea").default | import("../components/Picture").default | import("../components/PicturePro").default | import("../components/MultSelect").default | import("../components/Grade").default | import("../components/Rate").default | import("../components/File").default | import("../components/PostIng").default | import("../components/SubForm").default | import("../components/CommonDataTime").default | import("../components/TradeId").default | import("../components/ShopName").default | import("../components/BuyerNick").default | import("../components/ReceiverName").default | import("../components/ReceiverMobile").default | import("../components/ReceiverAddress").default | import("../components/TradeDateTime").default | import("../components/Logistics").default | import("../components/ReturnLogistics").default | import("../components/ActualPayment").default | import("../components/Remark").default | import("../components/Alipay").default | import("../components/EItemSelect").default | import("../components/EItemId").default | import("../components/EItemEnCode").default | import("../components/SystemOrderNo").default | import("../components/Ordinary").default | import("../components/ThirdItemSelect").default | import("../components/Payment").default | import("../components/Reissue/Logistics").default | import("../components/JST/JstItemSelect").default | import("../components/JST/JstSupply").default | import("../components/BS/BsGoods").default | import("../components/BsE3/BsGoods").default | import("../components/Public/ReissueGoods").default | import("../components/Public/Exchange").default | import("../components/BsE3/BsReissueE3").default | import("../components/BS/BsExchange").default | import("../components/BS/BsReissue").default | import("../components/BS/BsReturn").default | import("../components/FlowStatusSelect").default | import("../components/FlowMarkSelect").default | import("../components/FlowTag").default | import("../components/TemplateSelect").default | import("../components/WorkOrderId").default | import("../components/LogisticsTrajectory").default | import("../components/LogisticsMoreTrajectory").default | import("../components/PlatForm").default | import("../components/ShopInput").default | import("../components/Submitter").default | import("../components/PrevSubmitter").default | import("../components/FlowCreator").default | import("../components/Handler").default | import("../components/CompletedUser").default | import("../components/FlowWorkOrderId").default | import("../components/StatusSelect").default | import("../components/Calculation").default | import("../components/CommonSystemOrder").default | import("../components/NodeDeadLine").default | import("../components/HandlerDeadLine").default | import("../components/NodeStayDuration").default | import("../components/BS/BsPosting").default | import("../components/NodeInput").default | import("../components/FlowWorkOrderStatus").default | import("../components/MsgStatus").default | import("../components/WDT/WdtGoods").default | import("../components/WDT/WdtRessuie").default | import("../components/WDT/WdtReturn").default | import("../components/WDT/WdtExchange").default | import("../components/WDT/WdtShopSelect").default | import("../components/DXD/DxdShopSelect").default | import("../components/KM/KmVideo").default | import("../components/CommonInput").default | import("../components/PaymentVoucherCode").default | import("../components/Label").default | import("../components/MemberLevel").default | import("../components/AfterSalesOrderId").default | import("../components/Public/ReturnWarehouse").default | import("../components/GY/GyGoods").default | import("../components/KM/KmExchange").default | import("../components/GY/GyReissue").default | import("../components/GY/GyReturn").default | import("../components/Public/AsyncSelect").default | import("../components/SKX/SkxIdInputSelect").default | import("../components/SKX/SkxGoods").default | import("../components/OrderSubForm").default | import("../components/FlowOverallStatusSelect").default;
|
|
4
4
|
export declare const useColumnsConfig: ({ queryWorkOrderDetail, flatTemplateList, shopList, sortState, onChangeSort, handleReset, handleSubmit, handleChangeSingleWorkOrderMark, userList, tbAppKey, isShare, openSingleColumnsFilter, openSingleColumnsSort, }: {
|
|
5
5
|
queryWorkOrderDetail?: ((p: any) => void) | undefined;
|
|
6
6
|
flatTemplateList?: any;
|
|
@@ -134,6 +134,37 @@ var typeMap = {
|
|
|
134
134
|
failValue: "失败",
|
|
135
135
|
dataType: "array_object"
|
|
136
136
|
},
|
|
137
|
+
WDT_WAREHOUSING_STATUS_V2: {
|
|
138
|
+
options: [{
|
|
139
|
+
value: "0",
|
|
140
|
+
label: "无需入库",
|
|
141
|
+
color: "#333333"
|
|
142
|
+
}, {
|
|
143
|
+
value: "1",
|
|
144
|
+
label: "未入库",
|
|
145
|
+
color: "#ff4d4f"
|
|
146
|
+
}, {
|
|
147
|
+
value: "2",
|
|
148
|
+
label: "部分入库",
|
|
149
|
+
color: "#e7780f"
|
|
150
|
+
}, {
|
|
151
|
+
value: "3",
|
|
152
|
+
label: "已入库",
|
|
153
|
+
color: "#52c41a"
|
|
154
|
+
}, {
|
|
155
|
+
value: "4",
|
|
156
|
+
label: "已入库-多收",
|
|
157
|
+
color: "#e7780f"
|
|
158
|
+
}],
|
|
159
|
+
key: "wdtInStockStatusV2ItemList",
|
|
160
|
+
code: "wdtInStockStatusV2List",
|
|
161
|
+
name: "旺店通商品入库状态V2",
|
|
162
|
+
type: 2,
|
|
163
|
+
valueKey: "status",
|
|
164
|
+
idKey: "systemOrderId",
|
|
165
|
+
failValue: "失败",
|
|
166
|
+
dataType: "array_object"
|
|
167
|
+
},
|
|
137
168
|
DXD_WAREHOUSING_STATUS: {
|
|
138
169
|
options: [{
|
|
139
170
|
value: "1",
|
|
@@ -291,6 +322,37 @@ var typeMap = {
|
|
|
291
322
|
idKey: "systemOrderId",
|
|
292
323
|
failValue: "失败",
|
|
293
324
|
dataType: "array_object"
|
|
325
|
+
},
|
|
326
|
+
JY_WAREHOUSING_STATUS: {
|
|
327
|
+
options: [{
|
|
328
|
+
value: "0",
|
|
329
|
+
label: "无需入库",
|
|
330
|
+
color: "#333333"
|
|
331
|
+
}, {
|
|
332
|
+
value: "1",
|
|
333
|
+
label: "未入库",
|
|
334
|
+
color: "#ff4d4f"
|
|
335
|
+
}, {
|
|
336
|
+
value: "2",
|
|
337
|
+
label: "部分入库",
|
|
338
|
+
color: "#e7780f"
|
|
339
|
+
}, {
|
|
340
|
+
value: "3",
|
|
341
|
+
label: "已入库",
|
|
342
|
+
color: "#52c41a"
|
|
343
|
+
}, {
|
|
344
|
+
value: "4",
|
|
345
|
+
label: "已入库-多收",
|
|
346
|
+
color: "#e7780f"
|
|
347
|
+
}],
|
|
348
|
+
key: "jyInStockStatusItemList",
|
|
349
|
+
code: "jyInStockStatusList",
|
|
350
|
+
name: "巨益商品入库状态",
|
|
351
|
+
type: 2,
|
|
352
|
+
valueKey: "status",
|
|
353
|
+
idKey: "sourceTradeNo",
|
|
354
|
+
failValue: "失败",
|
|
355
|
+
dataType: "array_object"
|
|
294
356
|
}
|
|
295
357
|
};
|
|
296
358
|
var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
|
|
@@ -192,7 +192,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
192
192
|
var _typeMap$_this$type6;
|
|
193
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
194
|
if (!Array.isArray(list)) {
|
|
195
|
-
return
|
|
195
|
+
return "";
|
|
196
196
|
}
|
|
197
197
|
return (list || []).map(function (item) {
|
|
198
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("/");
|
|
@@ -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: string;
|
|
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,42 @@
|
|
|
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
|
+
optionsMap: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
constructor(options: PickOption);
|
|
23
|
+
getComponentValue: (record: Record) => string;
|
|
24
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
25
|
+
renderPc: (_value: any, record: Record) => string;
|
|
26
|
+
renderLog: (record: Record) => any;
|
|
27
|
+
renderExport: (_value: any, record: Record) => string;
|
|
28
|
+
editRender: () => null;
|
|
29
|
+
filterConfig: (item: ColumnConfig) => {
|
|
30
|
+
searchDefaultConditions: "in";
|
|
31
|
+
type: string;
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
filterComponentType: "MultipleSelect";
|
|
35
|
+
props: {
|
|
36
|
+
options: any[];
|
|
37
|
+
};
|
|
38
|
+
formatFilterValue: (value: string[]) => string[];
|
|
39
|
+
filterFn: (value: string[]) => (record: Record) => boolean;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export default InterceptLogisticsCustomerCode;
|
|
@@ -0,0 +1,102 @@
|
|
|
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
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; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
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); }
|
|
10
|
+
import React from "react";
|
|
11
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
12
|
+
import { filterFn as _filterFn, getJdCustomerCodeOptions, isNull, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import { SYMBOL } from "../../constant";
|
|
14
|
+
var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function InterceptLogisticsCustomerCode(options) {
|
|
15
|
+
var _this = this;
|
|
16
|
+
_classCallCheck(this, InterceptLogisticsCustomerCode);
|
|
17
|
+
_defineProperty(this, "name", void 0);
|
|
18
|
+
_defineProperty(this, "id", void 0);
|
|
19
|
+
_defineProperty(this, "sortField", void 0);
|
|
20
|
+
_defineProperty(this, "type", void 0);
|
|
21
|
+
_defineProperty(this, "rules", void 0);
|
|
22
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
23
|
+
_defineProperty(this, "effects", void 0);
|
|
24
|
+
_defineProperty(this, "align", void 0);
|
|
25
|
+
_defineProperty(this, "width", void 0);
|
|
26
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
27
|
+
_defineProperty(this, "formField", void 0);
|
|
28
|
+
_defineProperty(this, "canSort", void 0);
|
|
29
|
+
_defineProperty(this, "children", void 0);
|
|
30
|
+
_defineProperty(this, "dataType", void 0);
|
|
31
|
+
_defineProperty(this, "options", void 0);
|
|
32
|
+
_defineProperty(this, "optionsMap", void 0);
|
|
33
|
+
_defineProperty(this, "getComponentValue", function (record) {
|
|
34
|
+
return _this.optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]];
|
|
35
|
+
});
|
|
36
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
37
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
38
|
+
id: _this.id,
|
|
39
|
+
label: _this.name,
|
|
40
|
+
value: _this.optionsMap[record[_this.id]]
|
|
41
|
+
}) : null;
|
|
42
|
+
});
|
|
43
|
+
_defineProperty(this, "renderPc", function (_value, record) {
|
|
44
|
+
var _this$optionsMap$reco;
|
|
45
|
+
return (_this$optionsMap$reco = _this.optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]]) !== null && _this$optionsMap$reco !== void 0 ? _this$optionsMap$reco : "--";
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderLog", function (record) {
|
|
48
|
+
return isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? null : record[_this.id];
|
|
49
|
+
});
|
|
50
|
+
_defineProperty(this, "renderExport", function (_value, record) {
|
|
51
|
+
var _this$optionsMap$reco2;
|
|
52
|
+
return (_this$optionsMap$reco2 = _this.optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]]) !== null && _this$optionsMap$reco2 !== void 0 ? _this$optionsMap$reco2 : "--";
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "editRender", function () {
|
|
55
|
+
return null;
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
58
|
+
return {
|
|
59
|
+
searchDefaultConditions: SYMBOL.in,
|
|
60
|
+
type: item.type,
|
|
61
|
+
id: "".concat(item.id, "_interceptLogisticsCustomerCode"),
|
|
62
|
+
name: "".concat(item.name, "-\u5BA2\u6237\u7F16\u7801"),
|
|
63
|
+
filterComponentType: "MultipleSelect",
|
|
64
|
+
props: {
|
|
65
|
+
options: _this.options || []
|
|
66
|
+
},
|
|
67
|
+
formatFilterValue: function formatFilterValue(value) {
|
|
68
|
+
var _value$map;
|
|
69
|
+
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (item) {
|
|
70
|
+
return item === null || item === void 0 ? void 0 : item.split(",");
|
|
71
|
+
})) === null || _value$map === void 0 ? void 0 : _value$map.flat();
|
|
72
|
+
},
|
|
73
|
+
filterFn: function filterFn(value) {
|
|
74
|
+
return function (record) {
|
|
75
|
+
var _value$map2, _value$map2$flat;
|
|
76
|
+
return value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (item) {
|
|
77
|
+
return item === null || item === void 0 ? void 0 : item.split(",");
|
|
78
|
+
})) === 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"));
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
this.name = "客户编码";
|
|
84
|
+
this.id = "".concat(options.id, "_interceptLogisticsCustomerCode");
|
|
85
|
+
this.sortField = this.id;
|
|
86
|
+
this.formField = this.id;
|
|
87
|
+
this.type = options.type;
|
|
88
|
+
this.componentConfig = options.componentConfig;
|
|
89
|
+
this.rules = [];
|
|
90
|
+
this.align = "left";
|
|
91
|
+
this.width = 220;
|
|
92
|
+
this.isCombinationComponent = false;
|
|
93
|
+
this.canSort = true;
|
|
94
|
+
this.children = [];
|
|
95
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
96
|
+
this.dataType = "string";
|
|
97
|
+
this.options = getJdCustomerCodeOptions(LogisticsAddressData.getInstance().getAddressData() || []);
|
|
98
|
+
this.optionsMap = (this.options || []).reduce(function (cur, nxt) {
|
|
99
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, nxt.value, nxt.label));
|
|
100
|
+
}, {});
|
|
101
|
+
});
|
|
102
|
+
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;
|
|
@@ -0,0 +1,101 @@
|
|
|
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 { filterFn as _filterFn, getJdCustomerCodeOptions, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
|
+
import { SYMBOL } from "../../constant";
|
|
11
|
+
var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function InterceptLogisticsCustomerCode(options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
_classCallCheck(this, InterceptLogisticsCustomerCode);
|
|
14
|
+
_defineProperty(this, "name", void 0);
|
|
15
|
+
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "sortField", void 0);
|
|
17
|
+
_defineProperty(this, "type", void 0);
|
|
18
|
+
_defineProperty(this, "rules", void 0);
|
|
19
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
20
|
+
_defineProperty(this, "effects", void 0);
|
|
21
|
+
_defineProperty(this, "align", void 0);
|
|
22
|
+
_defineProperty(this, "width", void 0);
|
|
23
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
24
|
+
_defineProperty(this, "formField", void 0);
|
|
25
|
+
_defineProperty(this, "canSort", void 0);
|
|
26
|
+
_defineProperty(this, "children", void 0);
|
|
27
|
+
_defineProperty(this, "dataType", void 0);
|
|
28
|
+
_defineProperty(this, "options", void 0);
|
|
29
|
+
_defineProperty(this, "getComponentValue", function (record) {
|
|
30
|
+
return ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_logisticsInterceptList")]) || []).map(function (item) {
|
|
31
|
+
return item === null || item === void 0 ? void 0 : item.interceptLogisticsCustomerCode;
|
|
32
|
+
}).filter(Boolean).join(",");
|
|
33
|
+
});
|
|
34
|
+
_defineProperty(this, "renderCustomerCodes", function (record) {
|
|
35
|
+
var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_logisticsInterceptList")]) || [];
|
|
36
|
+
return list.map(function (item, index) {
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
key: "".concat((item === null || item === void 0 ? void 0 : item.interceptCode) || "customer-code", "-").concat(index)
|
|
39
|
+
}, "\u5305\u88F9".concat(index + 1, ":"), (item === null || item === void 0 ? void 0 : item.interceptLogisticsCustomerCode) || "--");
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
_defineProperty(this, "renderClient", function () {
|
|
43
|
+
return null;
|
|
44
|
+
});
|
|
45
|
+
_defineProperty(this, "renderPc", function (_value, record) {
|
|
46
|
+
return _this.renderCustomerCodes(record);
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderLog", function () {
|
|
49
|
+
return null;
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "renderExport", function (_value, record) {
|
|
52
|
+
return _this.getComponentValue(record) || "--";
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "editRender", function () {
|
|
55
|
+
return null;
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
58
|
+
return {
|
|
59
|
+
searchDefaultConditions: SYMBOL.in,
|
|
60
|
+
type: item.type,
|
|
61
|
+
id: "".concat(item.id, "_logisticsInterceptCustomerCodeList"),
|
|
62
|
+
name: "".concat(item.name, "-\u5BA2\u6237\u7F16\u7801"),
|
|
63
|
+
filterComponentType: "MultipleSelect",
|
|
64
|
+
props: {
|
|
65
|
+
options: _this.options || []
|
|
66
|
+
},
|
|
67
|
+
formatFilterValue: function formatFilterValue(value) {
|
|
68
|
+
var _value$map;
|
|
69
|
+
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (option) {
|
|
70
|
+
return option === null || option === void 0 ? void 0 : option.split(",");
|
|
71
|
+
})) === null || _value$map === void 0 ? void 0 : _value$map.flat();
|
|
72
|
+
},
|
|
73
|
+
filterFn: function filterFn(value) {
|
|
74
|
+
return function (record) {
|
|
75
|
+
var _value$map2, _value$map2$flat;
|
|
76
|
+
return value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (option) {
|
|
77
|
+
return option === null || option === void 0 ? void 0 : option.split(",");
|
|
78
|
+
})) === null || _value$map2 === void 0 ? void 0 : (_value$map2$flat = _value$map2.flat()) === null || _value$map2$flat === void 0 ? void 0 : _value$map2$flat.some(function (customerCode) {
|
|
79
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(record, item.id, "logisticsInterceptCustomerCodeList")).split(",").includes(customerCode);
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
this.name = "客户编码";
|
|
86
|
+
this.id = options.id;
|
|
87
|
+
this.sortField = "".concat(options.id, "_logisticsInterceptCustomerCodeList");
|
|
88
|
+
this.formField = this.sortField;
|
|
89
|
+
this.type = options.type;
|
|
90
|
+
this.componentConfig = options.componentConfig;
|
|
91
|
+
this.rules = [];
|
|
92
|
+
this.align = "left";
|
|
93
|
+
this.width = 220;
|
|
94
|
+
this.isCombinationComponent = false;
|
|
95
|
+
this.canSort = true;
|
|
96
|
+
this.children = [];
|
|
97
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
98
|
+
this.dataType = "string";
|
|
99
|
+
this.options = getJdCustomerCodeOptions(LogisticsAddressData.getInstance().getAddressData() || []);
|
|
100
|
+
});
|
|
101
|
+
export default InterceptLogisticsCustomerCode;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, DxdShopSelect, KmVideo, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm, FlowOverallStatusSelect, ReturnWarehouse, KmExchange } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => CommonMultiStatus | JstSendGood | LogisticsInterception | LogisticsMoreInterception | AsyncSelect | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | DxdShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
|
package/dist/esm/factory.js
CHANGED
|
@@ -262,12 +262,14 @@ export var factory = function factory(type, options) {
|
|
|
262
262
|
case "WAREHOUSING_STATUS":
|
|
263
263
|
case "BS_E3_WAREHOUSING_STATUS":
|
|
264
264
|
case "WDT_WAREHOUSING_STATUS":
|
|
265
|
+
case "WDT_WAREHOUSING_STATUS_V2":
|
|
265
266
|
case "DXD_WAREHOUSING_STATUS":
|
|
266
267
|
case "WLN_WAREHOUSING_STATUS":
|
|
267
268
|
case "JKY_WAREHOUSING_STATUS":
|
|
268
269
|
case "JST_WAREHOUSING_STATUS":
|
|
269
270
|
case "KM_WAREHOUSING_STATUS":
|
|
270
271
|
case "TTX_WAREHOUSING_STATUS":
|
|
272
|
+
case "JY_WAREHOUSING_STATUS":
|
|
271
273
|
return new CommonMultiStatus(options, {
|
|
272
274
|
isWarehousingStatus: true
|
|
273
275
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.26",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.10.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.10.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.10.26",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.10.26",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "d0315b90561ff4faaf2ce31799c45a3167ecb367",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|