@kmkf-fe-packages/services-components 1.25.0 → 1.25.2
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/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +4 -2
- package/dist/esm/components/BS/BsLogistics/index.js +8 -1
- package/dist/esm/components/BS/common/BsHeaderGood.js +13 -40
- package/dist/esm/components/BS/common/expressCode.js +4 -1
- package/dist/esm/components/BS/common/expressCompany.js +3 -0
- package/dist/esm/components/Common/index.d.ts +9 -2
- package/dist/esm/components/Common/index.js +27 -67
- package/dist/esm/components/EItemEnCode/index.d.ts +3 -1
- package/dist/esm/components/EItemEnCode/index.js +26 -29
- package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.d.ts +2 -2
- package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.js +3 -9
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +3 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/service/api.d.ts +2 -0
- package/dist/esm/service/api.js +12 -0
- package/package.json +4 -4
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
- package/dist/esm/components/Common/dist/index.js +0 -1525
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryBsE3LogisticsCompany" | "querySendData";
|
|
2
|
+
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryBsE3LogisticsCompany" | "querySendData" | "queryJSTLogisticsCompany" | "queryWLNLogisticsCompany";
|
|
3
3
|
declare const Global: ({ children, requestList, repeatRequestList, }: React.PropsWithChildren<{
|
|
4
4
|
requestList?: RequestType[] | undefined;
|
|
5
5
|
repeatRequestList?: Record<string, () => Promise<any>> | undefined;
|
|
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useEffect, useState } from "react";
|
|
17
17
|
import { Skeleton, Button, Alert, Space } from "antd";
|
|
18
|
-
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryBsE3LogisticsCompany, querySendData } from "../../service/api";
|
|
18
|
+
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryBsE3LogisticsCompany, querySendData, queryJSTLogisticsCompany, queryWLNLogisticsCompany } from "../../service/api";
|
|
19
19
|
import { servers } from "@kmkf-fe-packages/kmkf-utils";
|
|
20
20
|
var Global = function Global(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
@@ -44,7 +44,9 @@ var Global = function Global(_ref) {
|
|
|
44
44
|
queryWdtAddressData: servers.queryWdtAddressData,
|
|
45
45
|
queryWdtLogisticsCompany: queryWdtLogisticsCompany,
|
|
46
46
|
queryBsE3LogisticsCompany: queryBsE3LogisticsCompany,
|
|
47
|
-
querySendData: querySendData
|
|
47
|
+
querySendData: querySendData,
|
|
48
|
+
queryJSTLogisticsCompany: queryJSTLogisticsCompany,
|
|
49
|
+
queryWLNLogisticsCompany: queryWLNLogisticsCompany
|
|
48
50
|
};
|
|
49
51
|
mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
|
|
50
52
|
promises = [];
|
|
@@ -38,7 +38,7 @@ var typeMap = {
|
|
|
38
38
|
name: "万里牛",
|
|
39
39
|
company: "wlnLogisticsCompany",
|
|
40
40
|
code: "wlnLogisticsCode",
|
|
41
|
-
platformType: "
|
|
41
|
+
platformType: "wln"
|
|
42
42
|
},
|
|
43
43
|
WDT_LOGISTICS: {
|
|
44
44
|
key: "wdtLogisticsList",
|
|
@@ -46,6 +46,13 @@ var typeMap = {
|
|
|
46
46
|
company: "wdtLogisticsCompany",
|
|
47
47
|
code: "wdtLogisticsCode",
|
|
48
48
|
platformType: "wdt"
|
|
49
|
+
},
|
|
50
|
+
JST_LOGISTICS: {
|
|
51
|
+
key: "jstItemList",
|
|
52
|
+
name: "聚水潭",
|
|
53
|
+
company: "logisticsCompany",
|
|
54
|
+
code: "logisticsCode",
|
|
55
|
+
platformType: 'jst'
|
|
49
56
|
}
|
|
50
57
|
};
|
|
51
58
|
var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
@@ -21,6 +21,7 @@ import React from "react";
|
|
|
21
21
|
import ItemView from "../../../commonComponents/ItemView";
|
|
22
22
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
23
23
|
import { BsHeaderPic, BsHeaderChild, BsHeaderGoodPic } from "./index";
|
|
24
|
+
import { getMapping, columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
|
|
24
25
|
var HeaderMap = {
|
|
25
26
|
mark: {
|
|
26
27
|
component: BsHeaderChild,
|
|
@@ -46,6 +47,12 @@ var HeaderMap = {
|
|
|
46
47
|
key: "name",
|
|
47
48
|
width: 200
|
|
48
49
|
},
|
|
50
|
+
num: {
|
|
51
|
+
component: BsHeaderChild,
|
|
52
|
+
name: "商品数量",
|
|
53
|
+
key: "num",
|
|
54
|
+
width: 200
|
|
55
|
+
},
|
|
49
56
|
code: {
|
|
50
57
|
component: BsHeaderChild,
|
|
51
58
|
name: "编码",
|
|
@@ -215,15 +222,7 @@ var BsHeaderGods = /*#__PURE__*/function () {
|
|
|
215
222
|
this.isCombinationComponent = true;
|
|
216
223
|
this.canSort = false;
|
|
217
224
|
this.dataType = "string";
|
|
218
|
-
this.itemKey = options.type === "ITEM_ENCODE" ? {
|
|
219
|
-
title: "商品名称",
|
|
220
|
-
outerId: "商品编码",
|
|
221
|
-
picUrl: "图片",
|
|
222
|
-
numIid: "商品id",
|
|
223
|
-
skuId: "SKU ID",
|
|
224
|
-
outerSkuId: "SKU 编码",
|
|
225
|
-
propertiesName: "SKU 信息"
|
|
226
|
-
} : {
|
|
225
|
+
this.itemKey = options.type === "ITEM_ENCODE" ? getMapping(columnsGoodsList) : {
|
|
227
226
|
mark: "商品标记",
|
|
228
227
|
pic: "图片",
|
|
229
228
|
name: "名称",
|
|
@@ -238,36 +237,6 @@ var BsHeaderGods = /*#__PURE__*/function () {
|
|
|
238
237
|
expireDate: "有效期"
|
|
239
238
|
};
|
|
240
239
|
this.children = this.getChildren(options);
|
|
241
|
-
// [
|
|
242
|
-
// ...Object.keys(HeaderMap).reduce((prv: any, key: string) => {
|
|
243
|
-
// if (options?.componentConfig?.showHeader?.includes(key)) {
|
|
244
|
-
// prv.push(
|
|
245
|
-
// new HeaderMap[key].component({
|
|
246
|
-
// ...options,
|
|
247
|
-
// name: this.itemKey[key],
|
|
248
|
-
// id: `${options.id}_${HeaderMap[key].key}`,
|
|
249
|
-
// width: HeaderMap[key].width,
|
|
250
|
-
// })
|
|
251
|
-
// );
|
|
252
|
-
// }
|
|
253
|
-
// return prv;
|
|
254
|
-
// }, []),
|
|
255
|
-
// ...(options?.componentConfig?.showHeader || []).reduce(
|
|
256
|
-
// (prv: any, next: string) => {
|
|
257
|
-
// if (HeaderMap[next]) {
|
|
258
|
-
// prv.push(
|
|
259
|
-
// new HeaderMap[next].component({
|
|
260
|
-
// ...options,
|
|
261
|
-
// name: this.itemKey[next],
|
|
262
|
-
// id: `${options.id}_${HeaderMap[next].key}`,
|
|
263
|
-
// })
|
|
264
|
-
// );
|
|
265
|
-
// }
|
|
266
|
-
// return prv;
|
|
267
|
-
// },
|
|
268
|
-
// []
|
|
269
|
-
// ),
|
|
270
|
-
// ];
|
|
271
240
|
}
|
|
272
241
|
_createClass(BsHeaderGods, [{
|
|
273
242
|
key: "getChildren",
|
|
@@ -275,9 +244,13 @@ var BsHeaderGods = /*#__PURE__*/function () {
|
|
|
275
244
|
var _options$componentCon,
|
|
276
245
|
_this2 = this;
|
|
277
246
|
var showHeader = options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader;
|
|
247
|
+
var dataIndexList = [];
|
|
248
|
+
if (!Array.isArray(showHeader)) {
|
|
249
|
+
dataIndexList = Object.keys(this.itemKey);
|
|
250
|
+
showHeader = dataIndexList;
|
|
251
|
+
}
|
|
278
252
|
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
|
|
279
253
|
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
|
|
280
|
-
var dataIndexList = [];
|
|
281
254
|
if (isStringArray) {
|
|
282
255
|
dataIndexList = showHeader;
|
|
283
256
|
} else if (isObjectArray) {
|
|
@@ -26,7 +26,10 @@ var typeMap = {
|
|
|
26
26
|
key: "wlnLogisticsItem"
|
|
27
27
|
},
|
|
28
28
|
WDT_LOGISTICS: {
|
|
29
|
-
key:
|
|
29
|
+
key: "wdtLogisticsItem"
|
|
30
|
+
},
|
|
31
|
+
JST_LOGISTICS: {
|
|
32
|
+
key: "jstLogisticsItem"
|
|
30
33
|
}
|
|
31
34
|
};
|
|
32
35
|
var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
@@ -12,9 +12,16 @@ export declare const showImage: ({ item, type, index, showHeader, }: {
|
|
|
12
12
|
item: any;
|
|
13
13
|
type: string;
|
|
14
14
|
index: number;
|
|
15
|
-
showHeader:
|
|
15
|
+
showHeader: string[];
|
|
16
|
+
}) => React.JSX.Element;
|
|
17
|
+
export declare const ShowTotalImage: ({ total, allImage, type, showHeader, }: {
|
|
18
|
+
total: number;
|
|
19
|
+
allImage: {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}[];
|
|
22
|
+
type: string;
|
|
23
|
+
showHeader: string[];
|
|
16
24
|
}) => React.JSX.Element;
|
|
17
|
-
export declare const ShowTotalImage: ({ total, allImage, type, showHeader, }: any) => React.JSX.Element;
|
|
18
25
|
export declare const GoodImage: ({ list, type, showHeader }: any) => React.JSX.Element | null;
|
|
19
26
|
export declare const JstGoodImage: ({ list, type, platformType, }: any) => any;
|
|
20
27
|
export declare const BsExpressRender: ({ list, showField, platformType, }: any) => any;
|
|
@@ -21,6 +21,7 @@ import styles from "./index.module.less";
|
|
|
21
21
|
import defaultImg from "./img/default-img.png";
|
|
22
22
|
import CopyText from "../../commonComponents/CopyText";
|
|
23
23
|
import { KM_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
|
|
24
|
+
import { getMapping, columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
|
|
24
25
|
var Paragraph = Typography.Paragraph;
|
|
25
26
|
export var getFormItem = function getFormItem(_ref) {
|
|
26
27
|
var name = _ref.name,
|
|
@@ -55,23 +56,11 @@ export var showImage = function showImage(_ref2) {
|
|
|
55
56
|
index = _ref2.index,
|
|
56
57
|
showHeader = _ref2.showHeader;
|
|
57
58
|
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== "tabao" ? item.picUrl : item.picUrl + "_40x40.jpg" : defaultImg;
|
|
58
|
-
var
|
|
59
|
-
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
|
|
60
|
-
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
|
|
61
|
-
var dataIndexList = [];
|
|
62
|
-
if (isStringArray) {
|
|
63
|
-
dataIndexList = showHeader;
|
|
64
|
-
} else if (isObjectArray) {
|
|
65
|
-
dataIndexList = showHeader.map(function (item) {
|
|
66
|
-
return item.dataIndex;
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
return dataIndexList;
|
|
70
|
-
}, [showHeader]);
|
|
59
|
+
var mapping_itemCode = getMapping(columnsGoodsList);
|
|
71
60
|
return /*#__PURE__*/React.createElement("div", {
|
|
72
61
|
className: styles.goodImgBox,
|
|
73
62
|
key: index
|
|
74
|
-
}, type === "itemCode" && !
|
|
63
|
+
}, type === "itemCode" && !showHeader.includes("picUrl") ? null : (item === null || item === void 0 ? void 0 : item.platform) === "taobao" ? /*#__PURE__*/React.createElement("a", {
|
|
75
64
|
target: "_blank",
|
|
76
65
|
href: item.numIid ? "https://item.taobao.com/item.htm?id=".concat(item.numIid) : "javascript:void(0);"
|
|
77
66
|
}, /*#__PURE__*/React.createElement("img", {
|
|
@@ -89,28 +78,20 @@ export var showImage = function showImage(_ref2) {
|
|
|
89
78
|
},
|
|
90
79
|
src: picUrl
|
|
91
80
|
}), /*#__PURE__*/React.createElement("div", {
|
|
92
|
-
className: styles.options
|
|
81
|
+
className: styles.options,
|
|
82
|
+
onClick: function onClick() {
|
|
83
|
+
console.log("show---", showHeader);
|
|
84
|
+
}
|
|
93
85
|
}, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
|
|
94
86
|
title: "商品id",
|
|
95
87
|
text: item.numIid
|
|
96
|
-
}), type === "itemCode" && /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
title: "商品id",
|
|
104
|
-
text: item.numIid
|
|
105
|
-
}), showHeaderMap.includes("skuId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
106
|
-
title: "SKU ID",
|
|
107
|
-
text: item.skuId
|
|
108
|
-
}), showHeaderMap.includes("outerSkuId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
109
|
-
title: "SKU 编码",
|
|
110
|
-
text: item.outerSkuId
|
|
111
|
-
}), showHeaderMap.includes("propertiesName") && /*#__PURE__*/React.createElement(TextTool, {
|
|
112
|
-
title: "SKU 信息",
|
|
113
|
-
text: item.propertiesName
|
|
88
|
+
}), type === "itemCode" && /*#__PURE__*/React.createElement(React.Fragment, null, showHeader.filter(function (dataIndex) {
|
|
89
|
+
return dataIndex !== "picUrl";
|
|
90
|
+
}).map(function (dataIndex) {
|
|
91
|
+
return /*#__PURE__*/React.createElement(TextTool, {
|
|
92
|
+
title: mapping_itemCode[dataIndex],
|
|
93
|
+
text: item[dataIndex]
|
|
94
|
+
});
|
|
114
95
|
})), (type === "itemThird" || type === "jstItemThird") && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
115
96
|
title: "供应商编码",
|
|
116
97
|
text: item.itemId || item.supplierItemOuterId
|
|
@@ -149,19 +130,7 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
149
130
|
_useState2 = _slicedToArray(_useState, 2),
|
|
150
131
|
visible = _useState2[0],
|
|
151
132
|
setVisible = _useState2[1];
|
|
152
|
-
var
|
|
153
|
-
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
|
|
154
|
-
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
|
|
155
|
-
var dataIndexList = [];
|
|
156
|
-
if (isStringArray) {
|
|
157
|
-
dataIndexList = showHeader;
|
|
158
|
-
} else if (isObjectArray) {
|
|
159
|
-
dataIndexList = showHeader.map(function (item) {
|
|
160
|
-
return item.dataIndex;
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
return dataIndexList;
|
|
164
|
-
}, [showHeader]);
|
|
133
|
+
var mapping_itemCode = getMapping(columnsGoodsList);
|
|
165
134
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
166
135
|
type: "link",
|
|
167
136
|
onClick: function onClick() {
|
|
@@ -185,7 +154,7 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
185
154
|
width: "50%"
|
|
186
155
|
},
|
|
187
156
|
key: index
|
|
188
|
-
}, type === "itemCode" && !
|
|
157
|
+
}, type === "itemCode" && !showHeader.includes("picUrl") ? null : /*#__PURE__*/React.createElement("a", {
|
|
189
158
|
href: i.link || ((i === null || i === void 0 ? void 0 : i.platform) === "taobao" && i.numIid ? "https://item.taobao.com/item.htm?id=".concat(i.numIid) : "javascript:void(0);"),
|
|
190
159
|
target: "__blank",
|
|
191
160
|
style: {
|
|
@@ -206,24 +175,13 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
206
175
|
})), /*#__PURE__*/React.createElement("div", null, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
|
|
207
176
|
title: "商品id",
|
|
208
177
|
text: i.numIid
|
|
209
|
-
}), type === "itemCode" && /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
title: "商品id",
|
|
217
|
-
text: i.numIid
|
|
218
|
-
}), showHeaderMap.includes("skuId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
219
|
-
title: "SKU ID",
|
|
220
|
-
text: i.skuId
|
|
221
|
-
}), showHeaderMap.includes("outerSkuId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
222
|
-
title: "SKU 编码",
|
|
223
|
-
text: i.outerSkuId
|
|
224
|
-
}), showHeaderMap.includes("propertiesName") && /*#__PURE__*/React.createElement(TextTool, {
|
|
225
|
-
title: "SKU 信息",
|
|
226
|
-
text: i.propertiesName
|
|
178
|
+
}), type === "itemCode" && /*#__PURE__*/React.createElement(React.Fragment, null, showHeader.filter(function (dataIndex) {
|
|
179
|
+
return dataIndex !== "picUrl";
|
|
180
|
+
}).map(function (dataIndex) {
|
|
181
|
+
return /*#__PURE__*/React.createElement(TextTool, {
|
|
182
|
+
title: mapping_itemCode[dataIndex],
|
|
183
|
+
text: i[dataIndex]
|
|
184
|
+
});
|
|
227
185
|
})), (type === "itemThird" || type === "jstItemThird") && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
228
186
|
title: "供应商编码",
|
|
229
187
|
text: i.itemId || i.supplierItemOuterId
|
|
@@ -253,7 +211,9 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
253
211
|
if (isStringArray) {
|
|
254
212
|
dataIndexList = showHeader;
|
|
255
213
|
} else if (isObjectArray) {
|
|
256
|
-
dataIndexList = showHeader.
|
|
214
|
+
dataIndexList = showHeader.filter(function (item) {
|
|
215
|
+
return item.show !== false;
|
|
216
|
+
}).map(function (item) {
|
|
257
217
|
return item.dataIndex;
|
|
258
218
|
});
|
|
259
219
|
}
|
|
@@ -273,7 +233,7 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
273
233
|
}), total > initShowTotal && /*#__PURE__*/React.createElement(ShowTotalImage, {
|
|
274
234
|
total: total,
|
|
275
235
|
allImage: list,
|
|
276
|
-
showHeader:
|
|
236
|
+
showHeader: showHeaderMap,
|
|
277
237
|
type: type
|
|
278
238
|
})) : null;
|
|
279
239
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { BsHeaderGood } from "../BS/common/index";
|
|
4
|
+
import type { ShowHeaderObjType } from "../../type";
|
|
4
5
|
declare class EItemEncode implements ComponentInterface {
|
|
5
6
|
name: string;
|
|
6
7
|
id: string;
|
|
@@ -15,7 +16,7 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
15
16
|
children: ComponentInterface[];
|
|
16
17
|
goods: BsHeaderGood;
|
|
17
18
|
dataType: ComponentInterface["dataType"];
|
|
18
|
-
showHeader: string[];
|
|
19
|
+
showHeader: (string | ShowHeaderObjType)[];
|
|
19
20
|
platform?: ComponentInterface["platform"];
|
|
20
21
|
sortChildField: {
|
|
21
22
|
name: string;
|
|
@@ -25,6 +26,7 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
25
26
|
}[];
|
|
26
27
|
constructor(options: PickOption);
|
|
27
28
|
getSortChildFields: () => any;
|
|
29
|
+
getShowHeader: (showHeader: any) => any[];
|
|
28
30
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
29
31
|
renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
|
|
30
32
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -16,6 +16,7 @@ import { BsHeaderGood } from "../BS/common/index";
|
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
17
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { SYMBOL } from "../../constant";
|
|
19
|
+
import { columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
|
|
19
20
|
var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
20
21
|
var _this = this,
|
|
21
22
|
_this$componentConfig3,
|
|
@@ -38,23 +39,33 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
38
39
|
_defineProperty(this, "platform", void 0);
|
|
39
40
|
_defineProperty(this, "sortChildField", void 0);
|
|
40
41
|
_defineProperty(this, "getSortChildFields", function () {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
numIid: '商品id',
|
|
45
|
-
skuId: 'skuId',
|
|
46
|
-
outerSkuId: 'sku编码',
|
|
47
|
-
propertiesName: 'sku信息'
|
|
48
|
-
};
|
|
49
|
-
return Object.keys(mapping).map(function (item) {
|
|
42
|
+
return columnsGoodsList.filter(function (item) {
|
|
43
|
+
return !["picUrl", "num"].includes(item.dataIndex);
|
|
44
|
+
}).map(function (item) {
|
|
50
45
|
return {
|
|
51
|
-
name:
|
|
52
|
-
key: "".concat(_this.id, "_").concat(item),
|
|
46
|
+
name: item.title,
|
|
47
|
+
key: "".concat(_this.id, "_").concat(item.dataIndex),
|
|
53
48
|
dataType: "arrayObject",
|
|
54
|
-
disabled: !_this.showHeader.includes(item)
|
|
49
|
+
disabled: !_this.showHeader.includes(item.dataIndex)
|
|
55
50
|
};
|
|
56
51
|
});
|
|
57
52
|
});
|
|
53
|
+
_defineProperty(this, "getShowHeader", function (showHeader) {
|
|
54
|
+
if (!Array.isArray(showHeader)) {
|
|
55
|
+
return columnsGoodsList.map(function (item) {
|
|
56
|
+
return item.dataIndex;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
|
|
60
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
|
|
61
|
+
if (isStringArray) return showHeader;
|
|
62
|
+
if (isObjectArray) return showHeader.filter(function (item) {
|
|
63
|
+
return item.show !== false;
|
|
64
|
+
}).map(function (item) {
|
|
65
|
+
return item.dataIndex;
|
|
66
|
+
});
|
|
67
|
+
return [];
|
|
68
|
+
});
|
|
58
69
|
_defineProperty(this, "renderClient", function (record) {
|
|
59
70
|
if (isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
|
|
60
71
|
return /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -105,9 +116,9 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
105
116
|
required: false,
|
|
106
117
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
107
118
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
108
|
-
tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip :
|
|
119
|
+
tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : "",
|
|
109
120
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({
|
|
110
|
-
isSingleRow: _this.platform !==
|
|
121
|
+
isSingleRow: _this.platform !== "pc"
|
|
111
122
|
}, _this.componentConfig, {
|
|
112
123
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
113
124
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
|
@@ -134,21 +145,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
134
145
|
this.type = options.type;
|
|
135
146
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
136
147
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
137
|
-
this.showHeader = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader)
|
|
138
|
-
// 商品名称
|
|
139
|
-
"outerId",
|
|
140
|
-
// 商品编码
|
|
141
|
-
"picUrl",
|
|
142
|
-
// 图片
|
|
143
|
-
"numIid",
|
|
144
|
-
// 商品id
|
|
145
|
-
"skuId",
|
|
146
|
-
// skuId
|
|
147
|
-
"outerSkuId",
|
|
148
|
-
// sku编码
|
|
149
|
-
"propertiesName" // sku 信息
|
|
150
|
-
];
|
|
151
|
-
|
|
148
|
+
this.showHeader = this.getShowHeader((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader);
|
|
152
149
|
this.isCombinationComponent = true;
|
|
153
150
|
this.canSort = false;
|
|
154
151
|
this.goods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
-
declare class
|
|
4
|
+
declare class Logistics implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
sortField: string;
|
|
@@ -60,4 +60,4 @@ declare class JstLogistics implements ComponentInterface {
|
|
|
60
60
|
formatFilterValue?: undefined;
|
|
61
61
|
})[];
|
|
62
62
|
}
|
|
63
|
-
export default
|
|
63
|
+
export default Logistics;
|
|
@@ -16,12 +16,6 @@ import ItemView from "../../../commonComponents/ItemView";
|
|
|
16
16
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
import { SYMBOL, batchInput } from "../../../constant";
|
|
18
18
|
var typeMap = {
|
|
19
|
-
JST_LOGISTICS: {
|
|
20
|
-
key: "jstItemList",
|
|
21
|
-
name: "jst",
|
|
22
|
-
company: "logisticsCompany",
|
|
23
|
-
code: "logisticsCode"
|
|
24
|
-
},
|
|
25
19
|
REISSUE_LOGISTICS: {
|
|
26
20
|
key: "reissueLogisticsList",
|
|
27
21
|
name: "reissue",
|
|
@@ -29,14 +23,14 @@ var typeMap = {
|
|
|
29
23
|
code: "reissueLogisticsCode"
|
|
30
24
|
}
|
|
31
25
|
};
|
|
32
|
-
var
|
|
26
|
+
var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
|
|
33
27
|
var _this = this,
|
|
34
28
|
_typeMap$_options$typ,
|
|
35
29
|
_typeMap$_options$typ2,
|
|
36
30
|
_this$componentConfig8,
|
|
37
31
|
_this$componentConfig9,
|
|
38
32
|
_this$componentConfig10;
|
|
39
|
-
_classCallCheck(this,
|
|
33
|
+
_classCallCheck(this, Logistics);
|
|
40
34
|
_defineProperty(this, "name", void 0);
|
|
41
35
|
_defineProperty(this, "id", void 0);
|
|
42
36
|
_defineProperty(this, "sortField", void 0);
|
|
@@ -203,4 +197,4 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
|
|
|
203
197
|
this.expressDateInstance = ExpressData.getInstance((_this$componentConfig9 = this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : _this$componentConfig9.logistics);
|
|
204
198
|
this.sortChildField = this.getSortChildFields(((_this$componentConfig10 = this.componentConfig) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.showField) || "", _options);
|
|
205
199
|
});
|
|
206
|
-
export default
|
|
200
|
+
export default Logistics;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, 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, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, AfterSalesOrderId, BsE3Goods, BsE3Reissue, MemberLevel } 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) => BsLogistics | CommonSystemOrder | ItemEnCode | JstSendGood | MsgStatus | ReissueLogistics | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, ErpTradeId, 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,
|
|
2
2
|
// CommonTradeId,
|
|
3
3
|
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, AfterSalesOrderId, BsE3Goods, BsE3Reissue, MemberLevel } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
@@ -122,9 +122,8 @@ export var factory = function factory(type, options) {
|
|
|
122
122
|
return new CommonDataTime(options);
|
|
123
123
|
case "TEMPLATE_ID_INPUT":
|
|
124
124
|
return new TemplateSelect(options);
|
|
125
|
-
case "JST_LOGISTICS":
|
|
126
125
|
case "REISSUE_LOGISTICS":
|
|
127
|
-
return new
|
|
126
|
+
return new ReissueLogistics(options);
|
|
128
127
|
case "JST_ITEM_SELECT_THIRD":
|
|
129
128
|
return new JstItemSelect(options);
|
|
130
129
|
case "JST_SUPPLY":
|
|
@@ -171,6 +170,7 @@ export var factory = function factory(type, options) {
|
|
|
171
170
|
case "BS_E3_LOGISTICS":
|
|
172
171
|
case "WLN_LOGISTICS":
|
|
173
172
|
case "WDT_LOGISTICS":
|
|
173
|
+
case "JST_LOGISTICS":
|
|
174
174
|
return new BsLogistics(options);
|
|
175
175
|
case "FLOW_WORK_ORDER_ID_INPUT":
|
|
176
176
|
return new FlowWorkOrderId(options);
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export { default as SystemOrderNo } from "./components/SystemOrderNo";
|
|
|
34
34
|
export { default as Ordinary } from "./components/Ordinary";
|
|
35
35
|
export { default as ThirdItemSelect } from "./components/ThirdItemSelect";
|
|
36
36
|
export { default as Payment } from "./components/Payment";
|
|
37
|
-
export { default as
|
|
37
|
+
export { default as ReissueLogistics } from "./components/Reissue/Logistics";
|
|
38
38
|
export { default as JstItemSelect } from "./components/JST/JstItemSelect";
|
|
39
39
|
export { default as JstSendGood } from "./components/JST/JstSendGood";
|
|
40
40
|
export { default as JstSupply } from "./components/JST/JstSupply";
|
package/dist/esm/index.js
CHANGED
|
@@ -34,7 +34,7 @@ export { default as SystemOrderNo } from "./components/SystemOrderNo";
|
|
|
34
34
|
export { default as Ordinary } from "./components/Ordinary";
|
|
35
35
|
export { default as ThirdItemSelect } from "./components/ThirdItemSelect";
|
|
36
36
|
export { default as Payment } from "./components/Payment";
|
|
37
|
-
export { default as
|
|
37
|
+
export { default as ReissueLogistics } from "./components/Reissue/Logistics";
|
|
38
38
|
export { default as JstItemSelect } from "./components/JST/JstItemSelect";
|
|
39
39
|
export { default as JstSendGood } from "./components/JST/JstSendGood";
|
|
40
40
|
export { default as JstSupply } from "./components/JST/JstSupply";
|
|
@@ -8,6 +8,8 @@ export declare const queryLogisticsAddressData: () => Promise<void>;
|
|
|
8
8
|
export declare const queryAllLogisticsCompany: () => Promise<void>;
|
|
9
9
|
export declare const queryWdtLogisticsCompany: () => Promise<void>;
|
|
10
10
|
export declare const queryBsE3LogisticsCompany: () => Promise<void>;
|
|
11
|
+
export declare const queryJSTLogisticsCompany: () => Promise<void>;
|
|
12
|
+
export declare const queryWLNLogisticsCompany: () => Promise<void>;
|
|
11
13
|
export declare const querySendData: () => Promise<void>;
|
|
12
14
|
export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
|
|
13
15
|
export declare const queryLabel: () => Promise<any>;
|
package/dist/esm/service/api.js
CHANGED
|
@@ -266,6 +266,18 @@ export var queryBsE3LogisticsCompany = function queryBsE3LogisticsCompany() {
|
|
|
266
266
|
instance.expressData = data;
|
|
267
267
|
}).catch(console.log);
|
|
268
268
|
};
|
|
269
|
+
export var queryJSTLogisticsCompany = function queryJSTLogisticsCompany() {
|
|
270
|
+
var instance = ExpressData.getInstance('jst');
|
|
271
|
+
return servers.JST.getLogisticsDataAsync().then(function (data) {
|
|
272
|
+
instance.expressData = data;
|
|
273
|
+
}).catch(console.log);
|
|
274
|
+
};
|
|
275
|
+
export var queryWLNLogisticsCompany = function queryWLNLogisticsCompany() {
|
|
276
|
+
var instance = ExpressData.getInstance('wln');
|
|
277
|
+
return servers.WLN.getLogisticsDataAsync().then(function (data) {
|
|
278
|
+
instance.expressData = data;
|
|
279
|
+
}).catch(console.log);
|
|
280
|
+
};
|
|
269
281
|
export var querySendData = /*#__PURE__*/function () {
|
|
270
282
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
271
283
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.2",
|
|
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": "1.25.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.25.2",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.25.2",
|
|
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": "b4ff6dc6968a7982ce86c447e3b40b75b045c2c7",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|