@kmkf-fe-packages/services-components 0.21.4-alpha.5 → 0.22.0-alpha.0
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/components/BS/common/BsHeaderGood.js +59 -1
- package/dist/esm/components/Common/index.d.ts +8 -1
- package/dist/esm/components/Common/index.js +284 -220
- package/dist/esm/components/EItemEnCode/index.d.ts +5 -4
- package/dist/esm/components/EItemEnCode/index.js +42 -43
- package/dist/esm/components/Payment/PaymentAmount.d.ts +1 -2
- package/dist/esm/components/Payment/PaymentAmount.js +0 -5
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -81,7 +81,57 @@ var HeaderMap = {
|
|
|
81
81
|
name: "赠品类型",
|
|
82
82
|
key: "type",
|
|
83
83
|
width: 150
|
|
84
|
+
},
|
|
85
|
+
title: {
|
|
86
|
+
component: BsHeaderChild,
|
|
87
|
+
name: "商品名称",
|
|
88
|
+
key: "title",
|
|
89
|
+
width: 200
|
|
90
|
+
},
|
|
91
|
+
outerId: {
|
|
92
|
+
component: BsHeaderChild,
|
|
93
|
+
name: "商品编码",
|
|
94
|
+
key: "outerId",
|
|
95
|
+
width: 100
|
|
96
|
+
},
|
|
97
|
+
picUrl: {
|
|
98
|
+
component: BsHeaderPic,
|
|
99
|
+
name: "图片",
|
|
100
|
+
key: "picUrl",
|
|
101
|
+
width: 140
|
|
102
|
+
},
|
|
103
|
+
numIid: {
|
|
104
|
+
component: BsHeaderChild,
|
|
105
|
+
name: "商品id",
|
|
106
|
+
key: "numIid",
|
|
107
|
+
width: 100
|
|
108
|
+
},
|
|
109
|
+
skuId: {
|
|
110
|
+
component: BsHeaderChild,
|
|
111
|
+
name: "SKU ID",
|
|
112
|
+
key: "skuId",
|
|
113
|
+
width: 140
|
|
114
|
+
},
|
|
115
|
+
outerSkuId: {
|
|
116
|
+
component: BsHeaderChild,
|
|
117
|
+
name: "SKU 编码",
|
|
118
|
+
key: "outerSkuId",
|
|
119
|
+
width: 140
|
|
120
|
+
},
|
|
121
|
+
propertiesName: {
|
|
122
|
+
component: BsHeaderChild,
|
|
123
|
+
name: "SKU 信息",
|
|
124
|
+
key: "propertiesName",
|
|
125
|
+
width: 140
|
|
84
126
|
}
|
|
127
|
+
|
|
128
|
+
// title: '商品名称',
|
|
129
|
+
// outerId: '商品编码',
|
|
130
|
+
// picUrl: '图片',
|
|
131
|
+
// numIid: '商品id',
|
|
132
|
+
// skuId: 'SKU ID',
|
|
133
|
+
// outerSkuId: 'SKU 编码',
|
|
134
|
+
// propertiesName: 'SKU 信息',
|
|
85
135
|
};
|
|
86
136
|
var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
87
137
|
var _this = this;
|
|
@@ -152,7 +202,15 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
152
202
|
this.isCombinationComponent = true;
|
|
153
203
|
this.canSort = false;
|
|
154
204
|
this.dataType = "string";
|
|
155
|
-
this.itemKey = {
|
|
205
|
+
this.itemKey = options.type === 'ITEM_ENCODE' ? {
|
|
206
|
+
title: '商品名称',
|
|
207
|
+
outerId: '商品编码',
|
|
208
|
+
picUrl: '图片',
|
|
209
|
+
numIid: '商品id',
|
|
210
|
+
skuId: 'SKU ID',
|
|
211
|
+
outerSkuId: 'SKU 编码',
|
|
212
|
+
propertiesName: 'SKU 信息'
|
|
213
|
+
} : {
|
|
156
214
|
mark: "商品标记",
|
|
157
215
|
pic: "图片",
|
|
158
216
|
name: "名称",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
declare type getFormItemProps = {
|
|
3
3
|
name: string;
|
|
4
4
|
title: string;
|
|
@@ -27,6 +27,13 @@ export declare const BsGoodsTable: ({ list, showHeader, text, }: {
|
|
|
27
27
|
list: any[];
|
|
28
28
|
showHeader: string[];
|
|
29
29
|
text?: string | undefined;
|
|
30
|
+
type?: string | undefined;
|
|
31
|
+
}) => React.JSX.Element;
|
|
32
|
+
export declare const TBGoodTable: ({ list, showHeader, text, }: {
|
|
33
|
+
list: any[];
|
|
34
|
+
showHeader: string[];
|
|
35
|
+
text?: string | undefined;
|
|
36
|
+
type?: string | undefined;
|
|
30
37
|
}) => React.JSX.Element;
|
|
31
38
|
export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
|
|
32
39
|
export declare const BsSystemOrderTable: ({ value, type }: any) => React.JSX.Element;
|
|
@@ -8,10 +8,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
8
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
9
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message } from
|
|
12
|
-
import React, { useState, useMemo } from
|
|
13
|
-
import { ExpressData } from
|
|
14
|
-
import { CopyToClipboard } from
|
|
11
|
+
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message } from "antd";
|
|
12
|
+
import React, { useState, useMemo } from "react";
|
|
13
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { CopyToClipboard } from "react-copy-to-clipboard";
|
|
15
15
|
import styles from "./index.module.less";
|
|
16
16
|
import defaultImg from "./img/default-img.png";
|
|
17
17
|
export var getFormItem = function getFormItem(_ref) {
|
|
@@ -31,7 +31,7 @@ export var getFormItem = function getFormItem(_ref) {
|
|
|
31
31
|
return /*#__PURE__*/React.createElement("div", {
|
|
32
32
|
className: "form-item--wrap",
|
|
33
33
|
style: {
|
|
34
|
-
position:
|
|
34
|
+
position: "relative"
|
|
35
35
|
}
|
|
36
36
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
37
37
|
name: name,
|
|
@@ -45,43 +45,43 @@ export var showImage = function showImage(_ref2) {
|
|
|
45
45
|
var item = _ref2.item,
|
|
46
46
|
type = _ref2.type,
|
|
47
47
|
index = _ref2.index;
|
|
48
|
-
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !==
|
|
48
|
+
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== "tabao" ? item.picUrl : item.picUrl + "_40x40.jpg" : defaultImg;
|
|
49
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
50
50
|
className: styles.goodImgBox,
|
|
51
51
|
key: index
|
|
52
|
-
}, (item === null || item === void 0 ? void 0 : item.platform) ===
|
|
52
|
+
}, (item === null || item === void 0 ? void 0 : item.platform) === "taobao" ? /*#__PURE__*/React.createElement("a", {
|
|
53
53
|
target: "_blank",
|
|
54
54
|
href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
|
|
55
55
|
}, /*#__PURE__*/React.createElement("img", {
|
|
56
56
|
style: {
|
|
57
|
-
width:
|
|
58
|
-
height:
|
|
59
|
-
objectFit:
|
|
57
|
+
width: "40px",
|
|
58
|
+
height: "40px",
|
|
59
|
+
objectFit: "contain"
|
|
60
60
|
},
|
|
61
61
|
src: picUrl
|
|
62
62
|
})) : /*#__PURE__*/React.createElement("img", {
|
|
63
63
|
style: {
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
66
|
-
objectFit:
|
|
64
|
+
width: "40px",
|
|
65
|
+
height: "40px",
|
|
66
|
+
objectFit: "contain"
|
|
67
67
|
},
|
|
68
68
|
src: picUrl
|
|
69
69
|
}), /*#__PURE__*/React.createElement("div", {
|
|
70
70
|
className: styles.options
|
|
71
|
-
}, type ===
|
|
72
|
-
title:
|
|
71
|
+
}, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
|
|
72
|
+
title: "商品id",
|
|
73
73
|
text: item.numIid
|
|
74
|
-
}), type ===
|
|
75
|
-
title:
|
|
74
|
+
}), type === "itemCode" && /*#__PURE__*/React.createElement(TextTool, {
|
|
75
|
+
title: "商品编码",
|
|
76
76
|
text: item.outerId
|
|
77
|
-
}), (type ===
|
|
78
|
-
title:
|
|
77
|
+
}), (type === "itemThird" || type === "jstItemThird") && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
78
|
+
title: "供应商编码",
|
|
79
79
|
text: item.itemId || item.supplierItemOuterId
|
|
80
|
-
}), (type ===
|
|
81
|
-
title:
|
|
80
|
+
}), (type === "itemThird" || type === "jstItemThird") && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
81
|
+
title: "供应商名称",
|
|
82
82
|
text: item.supplierName
|
|
83
83
|
}), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
84
|
-
title:
|
|
84
|
+
title: "规格",
|
|
85
85
|
text: item.propertiesName
|
|
86
86
|
})));
|
|
87
87
|
};
|
|
@@ -94,9 +94,9 @@ var TextTool = function TextTool(_ref3) {
|
|
|
94
94
|
title: text
|
|
95
95
|
}, /*#__PURE__*/React.createElement("div", {
|
|
96
96
|
style: {
|
|
97
|
-
overflow:
|
|
98
|
-
whiteSpace:
|
|
99
|
-
textOverflow:
|
|
97
|
+
overflow: "hidden",
|
|
98
|
+
whiteSpace: "nowrap",
|
|
99
|
+
textOverflow: "ellipsis"
|
|
100
100
|
}
|
|
101
101
|
}, title, ":", text));
|
|
102
102
|
};
|
|
@@ -124,47 +124,47 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
124
124
|
title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
|
|
125
125
|
}, /*#__PURE__*/React.createElement("div", {
|
|
126
126
|
style: {
|
|
127
|
-
display:
|
|
128
|
-
flexWrap:
|
|
127
|
+
display: "flex",
|
|
128
|
+
flexWrap: "wrap"
|
|
129
129
|
}
|
|
130
130
|
}, allImage.map(function (i, index) {
|
|
131
131
|
return /*#__PURE__*/React.createElement("div", {
|
|
132
132
|
style: {
|
|
133
|
-
width:
|
|
133
|
+
width: "50%"
|
|
134
134
|
},
|
|
135
135
|
key: index
|
|
136
136
|
}, /*#__PURE__*/React.createElement("a", {
|
|
137
137
|
href: i.link,
|
|
138
138
|
target: "__blank",
|
|
139
139
|
style: {
|
|
140
|
-
marginRight:
|
|
141
|
-
marginTop:
|
|
142
|
-
padding:
|
|
143
|
-
border:
|
|
144
|
-
display:
|
|
140
|
+
marginRight: "12px",
|
|
141
|
+
marginTop: "8px",
|
|
142
|
+
padding: "2px",
|
|
143
|
+
border: "1px dashed #ccc",
|
|
144
|
+
display: "inline-block"
|
|
145
145
|
}
|
|
146
146
|
}, /*#__PURE__*/React.createElement("img", {
|
|
147
147
|
alt: "",
|
|
148
148
|
src: i.picUrl || defaultImg,
|
|
149
149
|
style: {
|
|
150
|
-
width:
|
|
151
|
-
height:
|
|
152
|
-
objectFit:
|
|
150
|
+
width: "72px",
|
|
151
|
+
height: "72px",
|
|
152
|
+
objectFit: "contain"
|
|
153
153
|
}
|
|
154
|
-
})), /*#__PURE__*/React.createElement("div", null, type ===
|
|
155
|
-
title:
|
|
154
|
+
})), /*#__PURE__*/React.createElement("div", null, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
|
|
155
|
+
title: "商品id",
|
|
156
156
|
text: i.numIid
|
|
157
|
-
}), type ===
|
|
158
|
-
title:
|
|
157
|
+
}), type === "itemCode" && /*#__PURE__*/React.createElement(TextTool, {
|
|
158
|
+
title: "商品编码",
|
|
159
159
|
text: i.outerId
|
|
160
|
-
}), (type ===
|
|
161
|
-
title:
|
|
160
|
+
}), (type === "itemThird" || type === "jstItemThird") && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
161
|
+
title: "供应商编码",
|
|
162
162
|
text: i.itemId || i.supplierItemOuterId
|
|
163
|
-
}), (type ===
|
|
164
|
-
title:
|
|
163
|
+
}), (type === "itemThird" || type === "jstItemThird") && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
164
|
+
title: "供应商名称",
|
|
165
165
|
text: i.supplierName
|
|
166
166
|
}), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
167
|
-
title:
|
|
167
|
+
title: "规格",
|
|
168
168
|
text: i.propertiesName
|
|
169
169
|
})));
|
|
170
170
|
}))));
|
|
@@ -174,12 +174,12 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
174
174
|
var _list$slice;
|
|
175
175
|
var list = _ref5.list,
|
|
176
176
|
_ref5$type = _ref5.type,
|
|
177
|
-
type = _ref5$type === void 0 ?
|
|
177
|
+
type = _ref5$type === void 0 ? "" : _ref5$type;
|
|
178
178
|
var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
|
|
179
179
|
var initShowTotal = 3;
|
|
180
180
|
return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
181
181
|
style: {
|
|
182
|
-
display: type ===
|
|
182
|
+
display: type === "itemSelect" ? "flex" : "block"
|
|
183
183
|
}
|
|
184
184
|
}, list === null || list === void 0 ? void 0 : (_list$slice = list.slice(0, initShowTotal)) === null || _list$slice === void 0 ? void 0 : _list$slice.map(function (item, index) {
|
|
185
185
|
return showImage({
|
|
@@ -196,7 +196,7 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
196
196
|
var content = function content(item, index) {
|
|
197
197
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
198
198
|
style: {
|
|
199
|
-
textAlign:
|
|
199
|
+
textAlign: "center"
|
|
200
200
|
}
|
|
201
201
|
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
202
202
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -223,17 +223,17 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
223
223
|
}, /*#__PURE__*/React.createElement("span", {
|
|
224
224
|
key: index,
|
|
225
225
|
style: {
|
|
226
|
-
color:
|
|
227
|
-
cursor:
|
|
226
|
+
color: "#1890ff",
|
|
227
|
+
cursor: "pointer"
|
|
228
228
|
}
|
|
229
|
-
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join(
|
|
229
|
+
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join("/") : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join("/") : item.sendId ? item.sendId : item.sendName) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || "") : null));
|
|
230
230
|
}) : null;
|
|
231
231
|
};
|
|
232
232
|
export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
233
233
|
var _ref7$list = _ref7.list,
|
|
234
234
|
list = _ref7$list === void 0 ? [] : _ref7$list,
|
|
235
235
|
_ref7$showField = _ref7.showField,
|
|
236
|
-
showField = _ref7$showField === void 0 ?
|
|
236
|
+
showField = _ref7$showField === void 0 ? "" : _ref7$showField;
|
|
237
237
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
238
238
|
var logisticsCompany = item.logisticsCompany;
|
|
239
239
|
var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
|
|
@@ -245,10 +245,10 @@ export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
|
245
245
|
}, /*#__PURE__*/React.createElement("span", {
|
|
246
246
|
key: index,
|
|
247
247
|
style: {
|
|
248
|
-
color:
|
|
249
|
-
cursor:
|
|
248
|
+
color: "#1890ff",
|
|
249
|
+
cursor: "pointer"
|
|
250
250
|
}
|
|
251
|
-
}, "\u5305\u88F9", ":")), showField ===
|
|
251
|
+
}, "\u5305\u88F9", ":")), showField === "company" ? /*#__PURE__*/React.createElement("span", null, company ? company : null) : null, showField === "code" ? /*#__PURE__*/React.createElement("span", null, item.logisticsCode ? item.logisticsCode : null) : null));
|
|
252
252
|
}) : null;
|
|
253
253
|
};
|
|
254
254
|
export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
@@ -261,7 +261,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
261
261
|
var orderContent = function orderContent(item, index) {
|
|
262
262
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
263
263
|
style: {
|
|
264
|
-
textAlign:
|
|
264
|
+
textAlign: "center"
|
|
265
265
|
}
|
|
266
266
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId));
|
|
267
267
|
};
|
|
@@ -269,7 +269,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
269
269
|
var _options$find;
|
|
270
270
|
var color = ((_options$find = options.find(function (it) {
|
|
271
271
|
return item[valueKey] === it.value;
|
|
272
|
-
})) === null || _options$find === void 0 ? void 0 : _options$find.color) ||
|
|
272
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.color) || "#000";
|
|
273
273
|
var currentOption = options.find(function (option) {
|
|
274
274
|
return item[valueKey] === option.value;
|
|
275
275
|
});
|
|
@@ -281,14 +281,14 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
281
281
|
}, /*#__PURE__*/React.createElement("span", {
|
|
282
282
|
key: index,
|
|
283
283
|
style: {
|
|
284
|
-
color:
|
|
285
|
-
cursor:
|
|
284
|
+
color: "#1890ff",
|
|
285
|
+
cursor: "pointer"
|
|
286
286
|
}
|
|
287
287
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1), ":")), /*#__PURE__*/React.createElement("span", {
|
|
288
288
|
style: {
|
|
289
289
|
color: color
|
|
290
290
|
}
|
|
291
|
-
}, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) ||
|
|
291
|
+
}, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "")), item.reason && (item === null || item === void 0 ? void 0 : item[valueKey]) !== "成功" && /*#__PURE__*/React.createElement("div", {
|
|
292
292
|
className: "c-red"
|
|
293
293
|
}, item.reason));
|
|
294
294
|
}) : null;
|
|
@@ -300,22 +300,22 @@ export var BsGoodImage = function BsGoodImage(_ref9) {
|
|
|
300
300
|
index = _ref9.index;
|
|
301
301
|
var picUrl = item.picUrl || defaultImg;
|
|
302
302
|
var keyMap = {
|
|
303
|
-
name:
|
|
304
|
-
code:
|
|
305
|
-
skuId:
|
|
306
|
-
money:
|
|
307
|
-
number:
|
|
308
|
-
share:
|
|
309
|
-
type:
|
|
303
|
+
name: "bs名称",
|
|
304
|
+
code: "bs编码",
|
|
305
|
+
skuId: "bssku编码",
|
|
306
|
+
money: "bs实付金额",
|
|
307
|
+
number: "bs数量",
|
|
308
|
+
share: "bs分摊价",
|
|
309
|
+
type: "bs赠品类型"
|
|
310
310
|
};
|
|
311
311
|
return /*#__PURE__*/React.createElement("div", {
|
|
312
312
|
className: styles.goodImgBox,
|
|
313
313
|
key: index
|
|
314
314
|
}, /*#__PURE__*/React.createElement("img", {
|
|
315
315
|
style: {
|
|
316
|
-
width:
|
|
317
|
-
height:
|
|
318
|
-
objectFit:
|
|
316
|
+
width: "40px",
|
|
317
|
+
height: "40px",
|
|
318
|
+
objectFit: "contain"
|
|
319
319
|
},
|
|
320
320
|
src: picUrl
|
|
321
321
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -337,11 +337,11 @@ export var BsExchangeList = function BsExchangeList(_ref10) {
|
|
|
337
337
|
return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
|
|
338
338
|
list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
|
|
339
339
|
showHeader: showHeader,
|
|
340
|
-
text:
|
|
340
|
+
text: "退回"
|
|
341
341
|
}), BsGoodsTable({
|
|
342
342
|
list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
|
|
343
343
|
showHeader: showHeader,
|
|
344
|
-
text:
|
|
344
|
+
text: "换出"
|
|
345
345
|
}));
|
|
346
346
|
}));
|
|
347
347
|
};
|
|
@@ -354,111 +354,175 @@ export var BsGoodPic = function BsGoodPic(list) {
|
|
|
354
354
|
});
|
|
355
355
|
});
|
|
356
356
|
};
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
},
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
ellipsis: true,
|
|
394
|
-
width: 100,
|
|
395
|
-
render: function render(val) {
|
|
396
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
397
|
-
width: 60,
|
|
398
|
-
src: val
|
|
399
|
-
});
|
|
357
|
+
var getTable = function getTable(GOODS_INFO_COLUMNS) {
|
|
358
|
+
return function (_ref11) {
|
|
359
|
+
var list = _ref11.list,
|
|
360
|
+
showHeader = _ref11.showHeader,
|
|
361
|
+
_ref11$text = _ref11.text,
|
|
362
|
+
text = _ref11$text === void 0 ? "" : _ref11$text;
|
|
363
|
+
var newColumns = useMemo(function () {
|
|
364
|
+
var columnList = [{
|
|
365
|
+
dataIndex: "",
|
|
366
|
+
title: "序号",
|
|
367
|
+
align: "center",
|
|
368
|
+
ellipsis: true,
|
|
369
|
+
width: 50,
|
|
370
|
+
render: function render(val, record, index) {
|
|
371
|
+
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
372
|
+
}
|
|
373
|
+
}].concat(_toConsumableArray(GOODS_INFO_COLUMNS(text).filter(function (t) {
|
|
374
|
+
return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
|
|
375
|
+
})));
|
|
376
|
+
return columnList;
|
|
377
|
+
}, [showHeader, list]);
|
|
378
|
+
console.log('**** ', {
|
|
379
|
+
newColumns: newColumns,
|
|
380
|
+
list: list
|
|
381
|
+
});
|
|
382
|
+
return /*#__PURE__*/React.createElement(Table, {
|
|
383
|
+
columns: newColumns,
|
|
384
|
+
dataSource: list,
|
|
385
|
+
rowKey: "uuid",
|
|
386
|
+
size: "small",
|
|
387
|
+
pagination: false,
|
|
388
|
+
scroll: {
|
|
389
|
+
x: "100%"
|
|
390
|
+
},
|
|
391
|
+
locale: {
|
|
392
|
+
emptyText: "暂无数据"
|
|
400
393
|
}
|
|
401
|
-
}
|
|
402
|
-
dataIndex: 'code',
|
|
403
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
404
|
-
align: 'center',
|
|
405
|
-
ellipsis: true,
|
|
406
|
-
width: 100
|
|
407
|
-
}, {
|
|
408
|
-
dataIndex: 'money',
|
|
409
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
410
|
-
align: 'center',
|
|
411
|
-
ellipsis: true,
|
|
412
|
-
width: 100
|
|
413
|
-
}, {
|
|
414
|
-
dataIndex: 'number',
|
|
415
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
416
|
-
align: 'center',
|
|
417
|
-
ellipsis: true,
|
|
418
|
-
width: 100
|
|
419
|
-
}, {
|
|
420
|
-
dataIndex: 'share',
|
|
421
|
-
title: "\u5206\u644A\u4EF7",
|
|
422
|
-
align: 'center',
|
|
423
|
-
ellipsis: true,
|
|
424
|
-
width: 70
|
|
425
|
-
}, {
|
|
426
|
-
dataIndex: 'type',
|
|
427
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
428
|
-
align: 'center',
|
|
429
|
-
ellipsis: true,
|
|
430
|
-
width: 100
|
|
431
|
-
}];
|
|
394
|
+
});
|
|
432
395
|
};
|
|
433
|
-
var newColumns = useMemo(function () {
|
|
434
|
-
var columnList = [{
|
|
435
|
-
dataIndex: '',
|
|
436
|
-
title: '序号',
|
|
437
|
-
align: 'center',
|
|
438
|
-
ellipsis: true,
|
|
439
|
-
width: 50,
|
|
440
|
-
render: function render(val, record, index) {
|
|
441
|
-
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
442
|
-
}
|
|
443
|
-
}].concat(_toConsumableArray(GOODS_INFO_COLUMNS(text).filter(function (t) {
|
|
444
|
-
return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
|
|
445
|
-
})));
|
|
446
|
-
return columnList;
|
|
447
|
-
}, [showHeader, list]);
|
|
448
|
-
return /*#__PURE__*/React.createElement(Table, {
|
|
449
|
-
columns: newColumns,
|
|
450
|
-
dataSource: list,
|
|
451
|
-
rowKey: 'uuid',
|
|
452
|
-
size: "small",
|
|
453
|
-
pagination: false,
|
|
454
|
-
scroll: {
|
|
455
|
-
x: '100%'
|
|
456
|
-
},
|
|
457
|
-
locale: {
|
|
458
|
-
emptyText: '暂无数据'
|
|
459
|
-
}
|
|
460
|
-
});
|
|
461
396
|
};
|
|
397
|
+
export var BsGoodsTable = getTable(function () {
|
|
398
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
399
|
+
return [{
|
|
400
|
+
dataIndex: "mark",
|
|
401
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
402
|
+
align: "center",
|
|
403
|
+
ellipsis: true,
|
|
404
|
+
width: 100
|
|
405
|
+
}, {
|
|
406
|
+
dataIndex: "skuName",
|
|
407
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
408
|
+
align: "center",
|
|
409
|
+
ellipsis: true,
|
|
410
|
+
width: 200
|
|
411
|
+
}, {
|
|
412
|
+
dataIndex: "sku",
|
|
413
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
414
|
+
align: "center",
|
|
415
|
+
ellipsis: true,
|
|
416
|
+
width: 100
|
|
417
|
+
}, {
|
|
418
|
+
dataIndex: "name",
|
|
419
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
420
|
+
align: "center",
|
|
421
|
+
ellipsis: true,
|
|
422
|
+
width: 200
|
|
423
|
+
}, {
|
|
424
|
+
dataIndex: "pic",
|
|
425
|
+
title: "\u56FE\u7247",
|
|
426
|
+
align: "center",
|
|
427
|
+
ellipsis: true,
|
|
428
|
+
width: 100,
|
|
429
|
+
render: function render(val) {
|
|
430
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
431
|
+
width: 60,
|
|
432
|
+
src: val
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
}, {
|
|
436
|
+
dataIndex: "code",
|
|
437
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
438
|
+
align: "center",
|
|
439
|
+
ellipsis: true,
|
|
440
|
+
width: 100
|
|
441
|
+
}, {
|
|
442
|
+
dataIndex: "money",
|
|
443
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
444
|
+
align: "center",
|
|
445
|
+
ellipsis: true,
|
|
446
|
+
width: 100
|
|
447
|
+
}, {
|
|
448
|
+
dataIndex: "number",
|
|
449
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
450
|
+
align: "center",
|
|
451
|
+
ellipsis: true,
|
|
452
|
+
width: 100
|
|
453
|
+
}, {
|
|
454
|
+
dataIndex: "share",
|
|
455
|
+
title: "\u5206\u644A\u4EF7",
|
|
456
|
+
align: "center",
|
|
457
|
+
ellipsis: true,
|
|
458
|
+
width: 70
|
|
459
|
+
}, {
|
|
460
|
+
dataIndex: "type",
|
|
461
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
462
|
+
align: "center",
|
|
463
|
+
ellipsis: true,
|
|
464
|
+
width: 100
|
|
465
|
+
}];
|
|
466
|
+
});
|
|
467
|
+
export var TBGoodTable = getTable(function () {
|
|
468
|
+
return [{
|
|
469
|
+
dataIndex: "title",
|
|
470
|
+
title: '商品名称',
|
|
471
|
+
align: "center",
|
|
472
|
+
ellipsis: true,
|
|
473
|
+
width: 200
|
|
474
|
+
}, {
|
|
475
|
+
dataIndex: "outerId",
|
|
476
|
+
title: '商品编码',
|
|
477
|
+
align: "center",
|
|
478
|
+
ellipsis: true,
|
|
479
|
+
width: 140
|
|
480
|
+
}, {
|
|
481
|
+
dataIndex: "picUrl",
|
|
482
|
+
title: '图片',
|
|
483
|
+
align: "center",
|
|
484
|
+
ellipsis: true,
|
|
485
|
+
width: 100,
|
|
486
|
+
render: function render(val) {
|
|
487
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
488
|
+
width: 60,
|
|
489
|
+
src: val
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
}, {
|
|
493
|
+
dataIndex: "numIid",
|
|
494
|
+
title: '商品id',
|
|
495
|
+
align: "center",
|
|
496
|
+
ellipsis: true,
|
|
497
|
+
width: 200
|
|
498
|
+
}, {
|
|
499
|
+
dataIndex: "skuId",
|
|
500
|
+
title: 'SKU ID',
|
|
501
|
+
align: "center",
|
|
502
|
+
ellipsis: true,
|
|
503
|
+
width: 200
|
|
504
|
+
}, {
|
|
505
|
+
dataIndex: "outerSkuId",
|
|
506
|
+
title: 'SKU 编码',
|
|
507
|
+
align: "center",
|
|
508
|
+
ellipsis: true,
|
|
509
|
+
width: 100
|
|
510
|
+
}, {
|
|
511
|
+
dataIndex: "propertiesName",
|
|
512
|
+
title: 'SKU 信息',
|
|
513
|
+
align: "center",
|
|
514
|
+
ellipsis: true,
|
|
515
|
+
width: 200
|
|
516
|
+
}];
|
|
517
|
+
// title: '商品名称',
|
|
518
|
+
// outerId: '商品编码',
|
|
519
|
+
// picUrl: '图片',
|
|
520
|
+
// numIid: '商品id',
|
|
521
|
+
// skuId: 'SKU ID',
|
|
522
|
+
// outerSkuId: 'SKU 编码',
|
|
523
|
+
// propertiesName: 'SKU 信息',
|
|
524
|
+
});
|
|
525
|
+
|
|
462
526
|
export var FileRender = function FileRender(_ref12) {
|
|
463
527
|
var _ref12$fileList = _ref12.fileList,
|
|
464
528
|
fileList = _ref12$fileList === void 0 ? [] : _ref12$fileList,
|
|
@@ -468,15 +532,15 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
468
532
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
469
533
|
visible = _useState4[0],
|
|
470
534
|
setVisible = _useState4[1];
|
|
471
|
-
var _useState5 = useState(
|
|
535
|
+
var _useState5 = useState(""),
|
|
472
536
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
473
537
|
fileUrl = _useState6[0],
|
|
474
538
|
setFileUrl = _useState6[1];
|
|
475
|
-
var _useState7 = useState(
|
|
539
|
+
var _useState7 = useState(""),
|
|
476
540
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
477
541
|
fileType = _useState8[0],
|
|
478
542
|
setFileType = _useState8[1];
|
|
479
|
-
var _useState9 = useState(
|
|
543
|
+
var _useState9 = useState(""),
|
|
480
544
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
481
545
|
fileName = _useState10[0],
|
|
482
546
|
setFileName = _useState10[1];
|
|
@@ -485,24 +549,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
485
549
|
downloading = _useState12[0],
|
|
486
550
|
setDownloading = _useState12[1];
|
|
487
551
|
var handleCancel = function handleCancel() {
|
|
488
|
-
setFileUrl(
|
|
489
|
-
setFileName(
|
|
552
|
+
setFileUrl("");
|
|
553
|
+
setFileName("");
|
|
490
554
|
setVisible(false);
|
|
491
555
|
setDownloading(false);
|
|
492
556
|
};
|
|
493
557
|
var onPreview = function onPreview(file) {
|
|
494
558
|
var _file$url;
|
|
495
|
-
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split(
|
|
559
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split(".");
|
|
496
560
|
var fileType = fileArr[fileArr.length - 1];
|
|
497
|
-
if ([
|
|
561
|
+
if (["png", "jpg", "jpeg", "gif", "bmp", "svg"].includes(fileType.toLowerCase())) {
|
|
498
562
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
499
563
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
500
|
-
setFileType(
|
|
564
|
+
setFileType("pic");
|
|
501
565
|
setVisible(true);
|
|
502
|
-
} else if ([
|
|
566
|
+
} else if (["mp4", "avi", "mpeg", "asf", "mov", "3gp", "wmv", "rmvb"].includes(fileType.toLowerCase())) {
|
|
503
567
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
504
568
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
505
|
-
setFileType(
|
|
569
|
+
setFileType("video");
|
|
506
570
|
setVisible(true);
|
|
507
571
|
} else {
|
|
508
572
|
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
@@ -513,9 +577,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
513
577
|
fetch(url).then(function (res) {
|
|
514
578
|
return res.blob();
|
|
515
579
|
}).then(function (blob) {
|
|
516
|
-
var a = document.createElement(
|
|
580
|
+
var a = document.createElement("a");
|
|
517
581
|
document.body.appendChild(a);
|
|
518
|
-
a.style.display =
|
|
582
|
+
a.style.display = "none";
|
|
519
583
|
var url = window.URL.createObjectURL(blob);
|
|
520
584
|
a.href = url;
|
|
521
585
|
a.download = name;
|
|
@@ -529,9 +593,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
529
593
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (item) {
|
|
530
594
|
return /*#__PURE__*/React.createElement("a", {
|
|
531
595
|
style: {
|
|
532
|
-
color:
|
|
533
|
-
cursor:
|
|
534
|
-
display:
|
|
596
|
+
color: "#1890ff",
|
|
597
|
+
cursor: "pointer",
|
|
598
|
+
display: "block"
|
|
535
599
|
},
|
|
536
600
|
onClick: function onClick(e) {
|
|
537
601
|
e.preventDefault();
|
|
@@ -553,20 +617,20 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
553
617
|
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
554
618
|
text: fileUrl,
|
|
555
619
|
onCopy: function onCopy() {
|
|
556
|
-
message.success(
|
|
620
|
+
message.success("复制成功");
|
|
557
621
|
}
|
|
558
622
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
559
623
|
type: "link"
|
|
560
|
-
}, "\u4E0B\u8F7D\u5730\u5740")), fileType ===
|
|
624
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === "pic" ? /*#__PURE__*/React.createElement("img", {
|
|
561
625
|
alt: "example",
|
|
562
626
|
style: {
|
|
563
|
-
width:
|
|
627
|
+
width: "100%"
|
|
564
628
|
},
|
|
565
629
|
src: fileUrl
|
|
566
630
|
}) : /*#__PURE__*/React.createElement("video", {
|
|
567
631
|
style: {
|
|
568
|
-
width:
|
|
569
|
-
height:
|
|
632
|
+
width: "100%",
|
|
633
|
+
height: "100%"
|
|
570
634
|
},
|
|
571
635
|
autoPlay: true,
|
|
572
636
|
controls: true,
|
|
@@ -576,24 +640,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
576
640
|
export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
577
641
|
var value = _ref13.value,
|
|
578
642
|
type = _ref13.type;
|
|
579
|
-
var columns = type ===
|
|
580
|
-
dataIndex:
|
|
581
|
-
title:
|
|
643
|
+
var columns = type === "WLN_SYSTEM_ORDER" ? [{
|
|
644
|
+
dataIndex: "billType",
|
|
645
|
+
title: "单据类型"
|
|
582
646
|
}, {
|
|
583
|
-
dataIndex:
|
|
584
|
-
title:
|
|
647
|
+
dataIndex: "billNo",
|
|
648
|
+
title: "系统订单号"
|
|
585
649
|
}, {
|
|
586
|
-
dataIndex:
|
|
587
|
-
title:
|
|
650
|
+
dataIndex: "billTag",
|
|
651
|
+
title: "标签"
|
|
588
652
|
}] : [{
|
|
589
|
-
dataIndex:
|
|
590
|
-
title:
|
|
653
|
+
dataIndex: "billType",
|
|
654
|
+
title: "订单类型"
|
|
591
655
|
}, {
|
|
592
|
-
dataIndex:
|
|
593
|
-
title:
|
|
656
|
+
dataIndex: "billNo",
|
|
657
|
+
title: "系统订单号"
|
|
594
658
|
}, {
|
|
595
|
-
dataIndex:
|
|
596
|
-
title:
|
|
659
|
+
dataIndex: "billTag",
|
|
660
|
+
title: "标记"
|
|
597
661
|
}];
|
|
598
662
|
var rowSelection = {
|
|
599
663
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || ((value === null || value === void 0 ? void 0 : value.showOrderInfo) || []).reduce(function (prv, next) {
|
|
@@ -614,14 +678,14 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
614
678
|
dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
|
|
615
679
|
columns: columns,
|
|
616
680
|
rowSelection: rowSelection,
|
|
617
|
-
rowKey:
|
|
681
|
+
rowKey: "billNo",
|
|
618
682
|
size: "small",
|
|
619
683
|
pagination: false,
|
|
620
684
|
scroll: {
|
|
621
|
-
x:
|
|
685
|
+
x: "100%"
|
|
622
686
|
},
|
|
623
687
|
locale: {
|
|
624
|
-
emptyText:
|
|
688
|
+
emptyText: "暂无数据"
|
|
625
689
|
}
|
|
626
690
|
});
|
|
627
691
|
};
|
|
@@ -641,33 +705,33 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
641
705
|
_ref14$options = _ref14.options,
|
|
642
706
|
options = _ref14$options === void 0 ? [] : _ref14$options;
|
|
643
707
|
var msgTypeCh = {
|
|
644
|
-
ding:
|
|
645
|
-
wechat:
|
|
646
|
-
qq:
|
|
647
|
-
qywx:
|
|
708
|
+
ding: "钉钉",
|
|
709
|
+
wechat: "微信",
|
|
710
|
+
qq: "QQ",
|
|
711
|
+
qywx: "企业微信"
|
|
648
712
|
};
|
|
649
713
|
var detailContent = function detailContent(item) {
|
|
650
714
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
651
715
|
style: {
|
|
652
|
-
textAlign:
|
|
716
|
+
textAlign: "left"
|
|
653
717
|
}
|
|
654
718
|
}, /*#__PURE__*/React.createElement("div", null, item.ruleName)));
|
|
655
719
|
};
|
|
656
720
|
return /*#__PURE__*/React.createElement(Space, {
|
|
657
|
-
direction: !horizontal ?
|
|
721
|
+
direction: !horizontal ? "vertical" : "horizontal"
|
|
658
722
|
}, Array.isArray(list) ? (list || []).map(function (item, index) {
|
|
659
723
|
var _options$find2;
|
|
660
724
|
var color = ((_options$find2 = options.find(function (innerItem) {
|
|
661
725
|
return item[valueKey] === innerItem.label;
|
|
662
|
-
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) ||
|
|
726
|
+
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) || "#000";
|
|
663
727
|
var currentOption = options.find(function (option) {
|
|
664
728
|
return item[valueKey] === option.value;
|
|
665
729
|
});
|
|
666
|
-
var key = item.msgType ||
|
|
730
|
+
var key = item.msgType || "ding";
|
|
667
731
|
return /*#__PURE__*/React.createElement("div", {
|
|
668
732
|
style: {
|
|
669
733
|
color: color,
|
|
670
|
-
cursor:
|
|
734
|
+
cursor: "pointer"
|
|
671
735
|
}
|
|
672
736
|
}, /*#__PURE__*/React.createElement(Popover, {
|
|
673
737
|
content: detailContent(item),
|
|
@@ -676,6 +740,6 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
676
740
|
}
|
|
677
741
|
}, /*#__PURE__*/React.createElement("span", {
|
|
678
742
|
key: index
|
|
679
|
-
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) ||
|
|
743
|
+
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "")));
|
|
680
744
|
}) : null);
|
|
681
745
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { BsHeaderGood } from "../BS/common/index";
|
|
3
4
|
declare class EItemEncode implements ComponentInterface {
|
|
4
5
|
name: string;
|
|
5
6
|
id: string;
|
|
@@ -13,12 +14,13 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
13
14
|
canSort: boolean;
|
|
14
15
|
children: ComponentInterface[];
|
|
15
16
|
dataType: ComponentInterface['dataType'];
|
|
17
|
+
goods: BsHeaderGood;
|
|
16
18
|
constructor(options: PickOption);
|
|
17
19
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
-
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
|
|
19
21
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
22
|
getComponentValue: (r: Record) => any;
|
|
21
|
-
renderExport: (
|
|
23
|
+
renderExport: () => null;
|
|
22
24
|
editRender: (p: any) => React.JSX.Element;
|
|
23
25
|
filterConfig: (item: ColumnConfig) => {
|
|
24
26
|
searchDefaultConditions: "like";
|
|
@@ -26,7 +28,6 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
26
28
|
id: string;
|
|
27
29
|
name: string;
|
|
28
30
|
filterComponentType: "Input";
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
+
}[];
|
|
31
32
|
}
|
|
32
33
|
export default EItemEncode;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
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; }
|
|
2
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
5
|
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); } }
|
|
4
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -9,13 +11,14 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
9
11
|
import React from 'react';
|
|
10
12
|
import GetFormItem from "../GetFormItem";
|
|
11
13
|
import ItemEncode from "./ItemEncode";
|
|
12
|
-
import {
|
|
14
|
+
import { TBGoodTable } from "../Common";
|
|
15
|
+
import { BsHeaderGood } from "../BS/common/index";
|
|
13
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
14
|
-
import { isNull
|
|
17
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
15
18
|
import { SYMBOL } from "../../constant";
|
|
16
19
|
var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
17
20
|
var _this = this,
|
|
18
|
-
_this$
|
|
21
|
+
_this$componentConfig4;
|
|
19
22
|
_classCallCheck(this, EItemEncode);
|
|
20
23
|
_defineProperty(this, "name", void 0);
|
|
21
24
|
_defineProperty(this, "id", void 0);
|
|
@@ -29,45 +32,45 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
29
32
|
_defineProperty(this, "canSort", void 0);
|
|
30
33
|
_defineProperty(this, "children", void 0);
|
|
31
34
|
_defineProperty(this, "dataType", void 0);
|
|
35
|
+
_defineProperty(this, "goods", void 0);
|
|
32
36
|
_defineProperty(this, "renderClient", function (record) {
|
|
33
|
-
|
|
37
|
+
var _this$componentConfig;
|
|
38
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
34
39
|
id: _this.id,
|
|
35
40
|
label: _this.name,
|
|
36
|
-
value: /*#__PURE__*/React.createElement(
|
|
37
|
-
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
38
|
-
|
|
41
|
+
value: /*#__PURE__*/React.createElement(TBGoodTable, {
|
|
42
|
+
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [],
|
|
43
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
39
44
|
})
|
|
40
|
-
}) : null;
|
|
45
|
+
})) : null;
|
|
41
46
|
});
|
|
42
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
list: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")],
|
|
53
|
-
type: "itemCode"
|
|
54
|
-
}));
|
|
48
|
+
var _this$componentConfig2;
|
|
49
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
50
|
+
id: _this.id,
|
|
51
|
+
label: _this.name,
|
|
52
|
+
value: /*#__PURE__*/React.createElement(TBGoodTable, {
|
|
53
|
+
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [],
|
|
54
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
55
|
+
})
|
|
56
|
+
})) : null;
|
|
55
57
|
});
|
|
56
58
|
_defineProperty(this, "renderLog", function (r) {
|
|
59
|
+
var _this$componentConfig3;
|
|
57
60
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")])) return null;
|
|
58
|
-
return
|
|
61
|
+
return /*#__PURE__*/React.createElement(TBGoodTable, {
|
|
62
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")]) || [],
|
|
63
|
+
showHeader: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader) || []
|
|
64
|
+
});
|
|
59
65
|
});
|
|
60
66
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
61
67
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")];
|
|
62
68
|
});
|
|
63
|
-
_defineProperty(this, "renderExport", function (
|
|
64
|
-
|
|
65
|
-
return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
|
|
66
|
-
return item.outerId;
|
|
67
|
-
}).join(' ');
|
|
69
|
+
_defineProperty(this, "renderExport", function () {
|
|
70
|
+
return null;
|
|
68
71
|
});
|
|
69
72
|
_defineProperty(this, "editRender", function (p) {
|
|
70
|
-
var _this$effects, _this$effects2;
|
|
73
|
+
var _this$effects, _this$effects2, _this$effects3;
|
|
71
74
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
72
75
|
title: _this.name,
|
|
73
76
|
name: _this.id,
|
|
@@ -77,29 +80,21 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
77
80
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({}, _this.componentConfig, {
|
|
78
81
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
79
82
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
|
83
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
80
84
|
width: "90%"
|
|
81
85
|
}))
|
|
82
86
|
});
|
|
83
87
|
});
|
|
84
88
|
_defineProperty(this, "filterConfig", function (item) {
|
|
85
|
-
return {
|
|
89
|
+
return [{
|
|
86
90
|
searchDefaultConditions: SYMBOL.like,
|
|
87
91
|
type: item.type,
|
|
88
92
|
id: "".concat(item.id, "_itemList"),
|
|
89
93
|
// 过滤组件id
|
|
90
94
|
name: item.name,
|
|
91
95
|
// 过滤组件名称
|
|
92
|
-
filterComponentType:
|
|
93
|
-
|
|
94
|
-
return function (i) {
|
|
95
|
-
var _ref2;
|
|
96
|
-
return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, 'itemList') || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
|
|
97
|
-
var _String;
|
|
98
|
-
return item !== null && item !== void 0 && item.outerId ? (_String = String(item === null || item === void 0 ? void 0 : item.outerId)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
};
|
|
96
|
+
filterComponentType: "Input"
|
|
97
|
+
}];
|
|
103
98
|
});
|
|
104
99
|
this.name = options.name;
|
|
105
100
|
this.id = options.id;
|
|
@@ -108,10 +103,14 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
108
103
|
this.type = options.type;
|
|
109
104
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
110
105
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
111
|
-
this.isCombinationComponent =
|
|
106
|
+
this.isCombinationComponent = true;
|
|
112
107
|
this.canSort = false;
|
|
113
|
-
this.
|
|
114
|
-
|
|
108
|
+
this.goods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
109
|
+
id: "".concat(options.id, "_itemList"),
|
|
110
|
+
name: "商品信息"
|
|
111
|
+
}));
|
|
112
|
+
this.children = [this.goods];
|
|
113
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
115
114
|
required: true,
|
|
116
115
|
validator: function validator(_, value) {
|
|
117
116
|
if (!value || !value.length) {
|
|
@@ -121,7 +120,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
121
120
|
return !item.outerId;
|
|
122
121
|
});
|
|
123
122
|
if (hasNotId) {
|
|
124
|
-
return Promise.reject(new Error('
|
|
123
|
+
return Promise.reject(new Error('商品异常: 商品编码缺失'));
|
|
125
124
|
}
|
|
126
125
|
return Promise.resolve();
|
|
127
126
|
}
|
|
@@ -6,7 +6,7 @@ declare class PaymentAmount implements ComponentInterface {
|
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
10
|
align: ALignType;
|
|
11
11
|
width: number;
|
|
12
12
|
isCombinationComponent: boolean;
|
|
@@ -36,6 +36,5 @@ declare class PaymentAmount implements ComponentInterface {
|
|
|
36
36
|
formatFilterValue: (val: Array<number | null>) => (number | null)[];
|
|
37
37
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
38
38
|
};
|
|
39
|
-
formDataTransform: (value: string) => string;
|
|
40
39
|
}
|
|
41
40
|
export default PaymentAmount;
|
|
@@ -130,11 +130,6 @@ var PaymentAmount = /*#__PURE__*/_createClass(function PaymentAmount(options) {
|
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
});
|
|
133
|
-
_defineProperty(this, "formDataTransform", function (value) {
|
|
134
|
-
var isNumber = new RegExp(/^[+-]?\d+(\.\d+)?$/);
|
|
135
|
-
// const isInt = new RegExp(/^(\-?)\d+$/)
|
|
136
|
-
return isNumber.test(value) ? Number(value).toFixed(2) : value;
|
|
137
|
-
});
|
|
138
133
|
this.name = '打款金额';
|
|
139
134
|
this.id = "".concat(options.id, "_enterprisePaymentRefundFee");
|
|
140
135
|
this.sortField = "".concat(options.id, "_enterprisePaymentRefundFee");
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, 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, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus } 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) => BsPosting | MsgStatus | BasicPosting | StatusSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0-alpha.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^0.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.21.4-alpha.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.22.0-alpha.0",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.21.4-alpha.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "ccf5fcc75612341a2bcb781de13344036ea369cd",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|