@kmkf-fe-packages/services-components 0.24.0-alpha.2 → 0.24.0-alpha.3
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/BsHeaderChild.js +1 -2
- package/dist/esm/components/BS/common/BsHeaderGood.js +2 -60
- package/dist/esm/components/BS/common/index.d.ts +0 -1
- package/dist/esm/components/BS/common/index.js +0 -1
- package/dist/esm/components/Common/index.d.ts +4 -12
- package/dist/esm/components/Common/index.js +228 -325
- package/dist/esm/components/EItemEnCode/index.d.ts +7 -10
- package/dist/esm/components/EItemEnCode/index.js +44 -68
- package/dist/esm/constant.js +6 -1
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +1 -2
- package/package.json +4 -4
- package/dist/esm/components/BS/common/BsHeaderGoodPic.d.ts +0 -27
- package/dist/esm/components/BS/common/BsHeaderGoodPic.js +0 -114
|
@@ -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,
|
|
@@ -44,60 +44,44 @@ export var getFormItem = function getFormItem(_ref) {
|
|
|
44
44
|
export var showImage = function showImage(_ref2) {
|
|
45
45
|
var item = _ref2.item,
|
|
46
46
|
type = _ref2.type,
|
|
47
|
-
index = _ref2.index
|
|
48
|
-
|
|
49
|
-
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== "tabao" ? item.picUrl : item.picUrl + "_40x40.jpg" : defaultImg;
|
|
47
|
+
index = _ref2.index;
|
|
48
|
+
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
|
|
50
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
51
50
|
className: styles.goodImgBox,
|
|
52
51
|
key: index
|
|
53
|
-
},
|
|
52
|
+
}, (item === null || item === void 0 ? void 0 : item.platform) === 'taobao' ? /*#__PURE__*/React.createElement("a", {
|
|
54
53
|
target: "_blank",
|
|
55
|
-
href:
|
|
54
|
+
href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
|
|
56
55
|
}, /*#__PURE__*/React.createElement("img", {
|
|
57
56
|
style: {
|
|
58
|
-
width:
|
|
59
|
-
height:
|
|
60
|
-
objectFit:
|
|
57
|
+
width: '40px',
|
|
58
|
+
height: '40px',
|
|
59
|
+
objectFit: 'contain'
|
|
61
60
|
},
|
|
62
61
|
src: picUrl
|
|
63
62
|
})) : /*#__PURE__*/React.createElement("img", {
|
|
64
63
|
style: {
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
67
|
-
objectFit:
|
|
64
|
+
width: '40px',
|
|
65
|
+
height: '40px',
|
|
66
|
+
objectFit: 'contain'
|
|
68
67
|
},
|
|
69
68
|
src: picUrl
|
|
70
69
|
}), /*#__PURE__*/React.createElement("div", {
|
|
71
70
|
className: styles.options
|
|
72
|
-
}, type ===
|
|
73
|
-
title:
|
|
71
|
+
}, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
72
|
+
title: '商品id',
|
|
74
73
|
text: item.numIid
|
|
75
|
-
}), type ===
|
|
76
|
-
title:
|
|
77
|
-
text: item.title
|
|
78
|
-
}), showHeader.includes("outerId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
79
|
-
title: "商品编码",
|
|
74
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
|
75
|
+
title: '商品编码',
|
|
80
76
|
text: item.outerId
|
|
81
|
-
}),
|
|
82
|
-
title:
|
|
83
|
-
text: item.numIid
|
|
84
|
-
}), showHeader.includes("skuId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
85
|
-
title: "SKU ID",
|
|
86
|
-
text: item.skuId
|
|
87
|
-
}), showHeader.includes("outerSkuId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
88
|
-
title: "SKU 编码",
|
|
89
|
-
text: item.outerSkuId
|
|
90
|
-
}), showHeader.includes("propertiesName") && /*#__PURE__*/React.createElement(TextTool, {
|
|
91
|
-
title: "SKU 信息",
|
|
92
|
-
text: item.propertiesName
|
|
93
|
-
})), (type === "itemThird" || type === "jstItemThird") && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
94
|
-
title: "供应商编码",
|
|
77
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
78
|
+
title: '供应商编码',
|
|
95
79
|
text: item.itemId || item.supplierItemOuterId
|
|
96
|
-
}), (type ===
|
|
97
|
-
title:
|
|
80
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
81
|
+
title: '供应商名称',
|
|
98
82
|
text: item.supplierName
|
|
99
|
-
}),
|
|
100
|
-
title:
|
|
83
|
+
}), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
84
|
+
title: '规格',
|
|
101
85
|
text: item.propertiesName
|
|
102
86
|
})));
|
|
103
87
|
};
|
|
@@ -110,9 +94,9 @@ var TextTool = function TextTool(_ref3) {
|
|
|
110
94
|
title: text
|
|
111
95
|
}, /*#__PURE__*/React.createElement("div", {
|
|
112
96
|
style: {
|
|
113
|
-
overflow:
|
|
114
|
-
whiteSpace:
|
|
115
|
-
textOverflow:
|
|
97
|
+
overflow: 'hidden',
|
|
98
|
+
whiteSpace: 'nowrap',
|
|
99
|
+
textOverflow: 'ellipsis'
|
|
116
100
|
}
|
|
117
101
|
}, title, ":", text));
|
|
118
102
|
};
|
|
@@ -121,9 +105,7 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
121
105
|
var total = _ref4.total,
|
|
122
106
|
_ref4$allImage = _ref4.allImage,
|
|
123
107
|
allImage = _ref4$allImage === void 0 ? [] : _ref4$allImage,
|
|
124
|
-
type = _ref4.type
|
|
125
|
-
_ref4$showHeader = _ref4.showHeader,
|
|
126
|
-
showHeader = _ref4$showHeader === void 0 ? [] : _ref4$showHeader;
|
|
108
|
+
type = _ref4.type;
|
|
127
109
|
var _useState = useState(false),
|
|
128
110
|
_useState2 = _slicedToArray(_useState, 2),
|
|
129
111
|
visible = _useState2[0],
|
|
@@ -142,62 +124,47 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
142
124
|
title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
|
|
143
125
|
}, /*#__PURE__*/React.createElement("div", {
|
|
144
126
|
style: {
|
|
145
|
-
display:
|
|
146
|
-
flexWrap:
|
|
127
|
+
display: 'flex',
|
|
128
|
+
flexWrap: 'wrap'
|
|
147
129
|
}
|
|
148
130
|
}, allImage.map(function (i, index) {
|
|
149
131
|
return /*#__PURE__*/React.createElement("div", {
|
|
150
132
|
style: {
|
|
151
|
-
width:
|
|
133
|
+
width: '50%'
|
|
152
134
|
},
|
|
153
135
|
key: index
|
|
154
|
-
},
|
|
155
|
-
href: i.link
|
|
136
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
137
|
+
href: i.link,
|
|
156
138
|
target: "__blank",
|
|
157
139
|
style: {
|
|
158
|
-
marginRight:
|
|
159
|
-
marginTop:
|
|
160
|
-
padding:
|
|
161
|
-
border:
|
|
162
|
-
display:
|
|
140
|
+
marginRight: '12px',
|
|
141
|
+
marginTop: '8px',
|
|
142
|
+
padding: '2px',
|
|
143
|
+
border: '1px dashed #ccc',
|
|
144
|
+
display: 'inline-block'
|
|
163
145
|
}
|
|
164
146
|
}, /*#__PURE__*/React.createElement("img", {
|
|
165
147
|
alt: "",
|
|
166
148
|
src: i.picUrl || defaultImg,
|
|
167
149
|
style: {
|
|
168
|
-
width:
|
|
169
|
-
height:
|
|
170
|
-
objectFit:
|
|
150
|
+
width: '72px',
|
|
151
|
+
height: '72px',
|
|
152
|
+
objectFit: 'contain'
|
|
171
153
|
}
|
|
172
|
-
})), /*#__PURE__*/React.createElement("div", null, type ===
|
|
173
|
-
title:
|
|
154
|
+
})), /*#__PURE__*/React.createElement("div", null, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
155
|
+
title: '商品id',
|
|
174
156
|
text: i.numIid
|
|
175
|
-
}), type ===
|
|
176
|
-
title:
|
|
177
|
-
text: i.title
|
|
178
|
-
}), showHeader.includes("outerId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
179
|
-
title: "商品编码",
|
|
157
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
|
158
|
+
title: '商品编码',
|
|
180
159
|
text: i.outerId
|
|
181
|
-
}),
|
|
182
|
-
title:
|
|
183
|
-
text: i.numIid
|
|
184
|
-
}), showHeader.includes("skuId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
185
|
-
title: "SKU ID",
|
|
186
|
-
text: i.skuId
|
|
187
|
-
}), showHeader.includes("outerSkuId") && /*#__PURE__*/React.createElement(TextTool, {
|
|
188
|
-
title: "SKU 编码",
|
|
189
|
-
text: i.outerSkuId
|
|
190
|
-
}), showHeader.includes("propertiesName") && /*#__PURE__*/React.createElement(TextTool, {
|
|
191
|
-
title: "SKU 信息",
|
|
192
|
-
text: i.propertiesName
|
|
193
|
-
})), (type === "itemThird" || type === "jstItemThird") && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
194
|
-
title: "供应商编码",
|
|
160
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
161
|
+
title: '供应商编码',
|
|
195
162
|
text: i.itemId || i.supplierItemOuterId
|
|
196
|
-
}), (type ===
|
|
197
|
-
title:
|
|
163
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
164
|
+
title: '供应商名称',
|
|
198
165
|
text: i.supplierName
|
|
199
|
-
}),
|
|
200
|
-
title:
|
|
166
|
+
}), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
167
|
+
title: '规格',
|
|
201
168
|
text: i.propertiesName
|
|
202
169
|
})));
|
|
203
170
|
}))));
|
|
@@ -207,33 +174,29 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
207
174
|
var _list$slice;
|
|
208
175
|
var list = _ref5.list,
|
|
209
176
|
_ref5$type = _ref5.type,
|
|
210
|
-
type = _ref5$type === void 0 ?
|
|
211
|
-
_ref5$showHeader = _ref5.showHeader,
|
|
212
|
-
showHeader = _ref5$showHeader === void 0 ? [] : _ref5$showHeader;
|
|
177
|
+
type = _ref5$type === void 0 ? '' : _ref5$type;
|
|
213
178
|
var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
|
|
214
179
|
var initShowTotal = 3;
|
|
215
180
|
return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
216
181
|
style: {
|
|
217
|
-
display: type ===
|
|
182
|
+
display: type === 'itemSelect' ? 'flex' : 'block'
|
|
218
183
|
}
|
|
219
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) {
|
|
220
185
|
return showImage({
|
|
221
186
|
item: item,
|
|
222
187
|
type: type,
|
|
223
|
-
index: index
|
|
224
|
-
showHeader: showHeader
|
|
188
|
+
index: index
|
|
225
189
|
});
|
|
226
190
|
}), total > initShowTotal && /*#__PURE__*/React.createElement(ShowTotalImage, {
|
|
227
191
|
total: total,
|
|
228
192
|
allImage: list,
|
|
229
|
-
showHeader: showHeader,
|
|
230
193
|
type: type
|
|
231
194
|
})) : null;
|
|
232
195
|
};
|
|
233
196
|
var content = function content(item, index) {
|
|
234
197
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
235
198
|
style: {
|
|
236
|
-
textAlign:
|
|
199
|
+
textAlign: 'center'
|
|
237
200
|
}
|
|
238
201
|
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
239
202
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -260,17 +223,17 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
260
223
|
}, /*#__PURE__*/React.createElement("span", {
|
|
261
224
|
key: index,
|
|
262
225
|
style: {
|
|
263
|
-
color:
|
|
264
|
-
cursor:
|
|
226
|
+
color: '#1890ff',
|
|
227
|
+
cursor: 'pointer'
|
|
265
228
|
}
|
|
266
|
-
}, "\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));
|
|
267
230
|
}) : null;
|
|
268
231
|
};
|
|
269
232
|
export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
270
233
|
var _ref7$list = _ref7.list,
|
|
271
234
|
list = _ref7$list === void 0 ? [] : _ref7$list,
|
|
272
235
|
_ref7$showField = _ref7.showField,
|
|
273
|
-
showField = _ref7$showField === void 0 ?
|
|
236
|
+
showField = _ref7$showField === void 0 ? '' : _ref7$showField;
|
|
274
237
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
275
238
|
var logisticsCompany = item.logisticsCompany;
|
|
276
239
|
var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
|
|
@@ -282,10 +245,10 @@ export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
|
282
245
|
}, /*#__PURE__*/React.createElement("span", {
|
|
283
246
|
key: index,
|
|
284
247
|
style: {
|
|
285
|
-
color:
|
|
286
|
-
cursor:
|
|
248
|
+
color: '#1890ff',
|
|
249
|
+
cursor: 'pointer'
|
|
287
250
|
}
|
|
288
|
-
}, "\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));
|
|
289
252
|
}) : null;
|
|
290
253
|
};
|
|
291
254
|
export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
@@ -298,7 +261,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
298
261
|
var orderContent = function orderContent(item, index) {
|
|
299
262
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
300
263
|
style: {
|
|
301
|
-
textAlign:
|
|
264
|
+
textAlign: 'center'
|
|
302
265
|
}
|
|
303
266
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId));
|
|
304
267
|
};
|
|
@@ -306,7 +269,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
306
269
|
var _options$find;
|
|
307
270
|
var color = ((_options$find = options.find(function (it) {
|
|
308
271
|
return item[valueKey] === it.value;
|
|
309
|
-
})) === null || _options$find === void 0 ? void 0 : _options$find.color) ||
|
|
272
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.color) || '#000';
|
|
310
273
|
var currentOption = options.find(function (option) {
|
|
311
274
|
return item[valueKey] === option.value;
|
|
312
275
|
});
|
|
@@ -318,14 +281,14 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
318
281
|
}, /*#__PURE__*/React.createElement("span", {
|
|
319
282
|
key: index,
|
|
320
283
|
style: {
|
|
321
|
-
color:
|
|
322
|
-
cursor:
|
|
284
|
+
color: '#1890ff',
|
|
285
|
+
cursor: 'pointer'
|
|
323
286
|
}
|
|
324
287
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1), ":")), /*#__PURE__*/React.createElement("span", {
|
|
325
288
|
style: {
|
|
326
289
|
color: color
|
|
327
290
|
}
|
|
328
|
-
}, 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", {
|
|
329
292
|
className: "c-red"
|
|
330
293
|
}, item.reason));
|
|
331
294
|
}) : null;
|
|
@@ -337,22 +300,22 @@ export var BsGoodImage = function BsGoodImage(_ref9) {
|
|
|
337
300
|
index = _ref9.index;
|
|
338
301
|
var picUrl = item.picUrl || defaultImg;
|
|
339
302
|
var keyMap = {
|
|
340
|
-
name:
|
|
341
|
-
code:
|
|
342
|
-
skuId:
|
|
343
|
-
money:
|
|
344
|
-
number:
|
|
345
|
-
share:
|
|
346
|
-
type:
|
|
303
|
+
name: 'bs名称',
|
|
304
|
+
code: 'bs编码',
|
|
305
|
+
skuId: 'bssku编码',
|
|
306
|
+
money: 'bs实付金额',
|
|
307
|
+
number: 'bs数量',
|
|
308
|
+
share: 'bs分摊价',
|
|
309
|
+
type: 'bs赠品类型'
|
|
347
310
|
};
|
|
348
311
|
return /*#__PURE__*/React.createElement("div", {
|
|
349
312
|
className: styles.goodImgBox,
|
|
350
313
|
key: index
|
|
351
314
|
}, /*#__PURE__*/React.createElement("img", {
|
|
352
315
|
style: {
|
|
353
|
-
width:
|
|
354
|
-
height:
|
|
355
|
-
objectFit:
|
|
316
|
+
width: '40px',
|
|
317
|
+
height: '40px',
|
|
318
|
+
objectFit: 'contain'
|
|
356
319
|
},
|
|
357
320
|
src: picUrl
|
|
358
321
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -374,11 +337,11 @@ export var BsExchangeList = function BsExchangeList(_ref10) {
|
|
|
374
337
|
return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
|
|
375
338
|
list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
|
|
376
339
|
showHeader: showHeader,
|
|
377
|
-
text:
|
|
340
|
+
text: '退回'
|
|
378
341
|
}), BsGoodsTable({
|
|
379
342
|
list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
|
|
380
343
|
showHeader: showHeader,
|
|
381
|
-
text:
|
|
344
|
+
text: '换出'
|
|
382
345
|
}));
|
|
383
346
|
}));
|
|
384
347
|
};
|
|
@@ -391,171 +354,111 @@ export var BsGoodPic = function BsGoodPic(list) {
|
|
|
391
354
|
});
|
|
392
355
|
});
|
|
393
356
|
};
|
|
394
|
-
var
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
},
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
357
|
+
export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
358
|
+
var list = _ref11.list,
|
|
359
|
+
showHeader = _ref11.showHeader,
|
|
360
|
+
_ref11$text = _ref11.text,
|
|
361
|
+
text = _ref11$text === void 0 ? '' : _ref11$text;
|
|
362
|
+
//商品信息
|
|
363
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
364
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
365
|
+
return [{
|
|
366
|
+
dataIndex: 'mark',
|
|
367
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
368
|
+
align: 'center',
|
|
369
|
+
ellipsis: true,
|
|
370
|
+
width: 100
|
|
371
|
+
}, {
|
|
372
|
+
dataIndex: 'skuName',
|
|
373
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
374
|
+
align: 'center',
|
|
375
|
+
ellipsis: true,
|
|
376
|
+
width: 200
|
|
377
|
+
}, {
|
|
378
|
+
dataIndex: 'sku',
|
|
379
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
380
|
+
align: 'center',
|
|
381
|
+
ellipsis: true,
|
|
382
|
+
width: 100
|
|
383
|
+
}, {
|
|
384
|
+
dataIndex: 'name',
|
|
385
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
386
|
+
align: 'center',
|
|
387
|
+
ellipsis: true,
|
|
388
|
+
width: 200
|
|
389
|
+
}, {
|
|
390
|
+
dataIndex: 'pic',
|
|
391
|
+
title: "\u56FE\u7247",
|
|
392
|
+
align: 'center',
|
|
393
|
+
ellipsis: true,
|
|
394
|
+
width: 100,
|
|
395
|
+
render: function render(val) {
|
|
396
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
397
|
+
width: 60,
|
|
398
|
+
src: val
|
|
399
|
+
});
|
|
426
400
|
}
|
|
427
|
-
}
|
|
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
|
+
}];
|
|
428
432
|
};
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
width: 200
|
|
456
|
-
}, {
|
|
457
|
-
dataIndex: "pic",
|
|
458
|
-
title: "\u56FE\u7247",
|
|
459
|
-
align: "center",
|
|
460
|
-
ellipsis: true,
|
|
461
|
-
width: 100,
|
|
462
|
-
render: function render(val) {
|
|
463
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
464
|
-
width: 60,
|
|
465
|
-
src: val
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
}, {
|
|
469
|
-
dataIndex: "code",
|
|
470
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
471
|
-
align: "center",
|
|
472
|
-
ellipsis: true,
|
|
473
|
-
width: 100
|
|
474
|
-
}, {
|
|
475
|
-
dataIndex: "money",
|
|
476
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
477
|
-
align: "center",
|
|
478
|
-
ellipsis: true,
|
|
479
|
-
width: 100
|
|
480
|
-
}, {
|
|
481
|
-
dataIndex: "number",
|
|
482
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
483
|
-
align: "center",
|
|
484
|
-
ellipsis: true,
|
|
485
|
-
width: 100
|
|
486
|
-
}, {
|
|
487
|
-
dataIndex: "share",
|
|
488
|
-
title: "\u5206\u644A\u4EF7",
|
|
489
|
-
align: "center",
|
|
490
|
-
ellipsis: true,
|
|
491
|
-
width: 70
|
|
492
|
-
}, {
|
|
493
|
-
dataIndex: "type",
|
|
494
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
495
|
-
align: "center",
|
|
496
|
-
ellipsis: true,
|
|
497
|
-
width: 100
|
|
498
|
-
}];
|
|
499
|
-
});
|
|
500
|
-
export var TBGoodTable = getTable(function () {
|
|
501
|
-
return [{
|
|
502
|
-
dataIndex: "title",
|
|
503
|
-
title: "商品名称",
|
|
504
|
-
align: "center",
|
|
505
|
-
ellipsis: true,
|
|
506
|
-
width: 200
|
|
507
|
-
}, {
|
|
508
|
-
dataIndex: "outerId",
|
|
509
|
-
title: "商品编码",
|
|
510
|
-
align: "center",
|
|
511
|
-
ellipsis: true,
|
|
512
|
-
width: 140
|
|
513
|
-
}, {
|
|
514
|
-
dataIndex: "picUrl",
|
|
515
|
-
title: "图片",
|
|
516
|
-
align: "center",
|
|
517
|
-
ellipsis: true,
|
|
518
|
-
width: 100,
|
|
519
|
-
render: function render(val) {
|
|
520
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
521
|
-
width: 60,
|
|
522
|
-
src: val
|
|
523
|
-
});
|
|
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: '暂无数据'
|
|
524
459
|
}
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
title: "商品id",
|
|
528
|
-
align: "center",
|
|
529
|
-
ellipsis: true,
|
|
530
|
-
width: 200
|
|
531
|
-
}, {
|
|
532
|
-
dataIndex: "skuId",
|
|
533
|
-
title: "SKU ID",
|
|
534
|
-
align: "center",
|
|
535
|
-
ellipsis: true,
|
|
536
|
-
width: 200
|
|
537
|
-
}, {
|
|
538
|
-
dataIndex: "outerSkuId",
|
|
539
|
-
title: "SKU 编码",
|
|
540
|
-
align: "center",
|
|
541
|
-
ellipsis: true,
|
|
542
|
-
width: 100
|
|
543
|
-
}, {
|
|
544
|
-
dataIndex: "propertiesName",
|
|
545
|
-
title: "SKU 信息",
|
|
546
|
-
align: "center",
|
|
547
|
-
ellipsis: true,
|
|
548
|
-
width: 200
|
|
549
|
-
}];
|
|
550
|
-
// title: '商品名称',
|
|
551
|
-
// outerId: '商品编码',
|
|
552
|
-
// picUrl: '图片',
|
|
553
|
-
// numIid: '商品id',
|
|
554
|
-
// skuId: 'SKU ID',
|
|
555
|
-
// outerSkuId: 'SKU 编码',
|
|
556
|
-
// propertiesName: 'SKU 信息',
|
|
557
|
-
});
|
|
558
|
-
|
|
460
|
+
});
|
|
461
|
+
};
|
|
559
462
|
export var FileRender = function FileRender(_ref12) {
|
|
560
463
|
var _ref12$fileList = _ref12.fileList,
|
|
561
464
|
fileList = _ref12$fileList === void 0 ? [] : _ref12$fileList,
|
|
@@ -565,15 +468,15 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
565
468
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
566
469
|
visible = _useState4[0],
|
|
567
470
|
setVisible = _useState4[1];
|
|
568
|
-
var _useState5 = useState(
|
|
471
|
+
var _useState5 = useState(''),
|
|
569
472
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
570
473
|
fileUrl = _useState6[0],
|
|
571
474
|
setFileUrl = _useState6[1];
|
|
572
|
-
var _useState7 = useState(
|
|
475
|
+
var _useState7 = useState(''),
|
|
573
476
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
574
477
|
fileType = _useState8[0],
|
|
575
478
|
setFileType = _useState8[1];
|
|
576
|
-
var _useState9 = useState(
|
|
479
|
+
var _useState9 = useState(''),
|
|
577
480
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
578
481
|
fileName = _useState10[0],
|
|
579
482
|
setFileName = _useState10[1];
|
|
@@ -582,24 +485,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
582
485
|
downloading = _useState12[0],
|
|
583
486
|
setDownloading = _useState12[1];
|
|
584
487
|
var handleCancel = function handleCancel() {
|
|
585
|
-
setFileUrl(
|
|
586
|
-
setFileName(
|
|
488
|
+
setFileUrl('');
|
|
489
|
+
setFileName('');
|
|
587
490
|
setVisible(false);
|
|
588
491
|
setDownloading(false);
|
|
589
492
|
};
|
|
590
493
|
var onPreview = function onPreview(file) {
|
|
591
494
|
var _file$url;
|
|
592
|
-
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split(
|
|
495
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
593
496
|
var fileType = fileArr[fileArr.length - 1];
|
|
594
|
-
if ([
|
|
497
|
+
if (['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg'].includes(fileType.toLowerCase())) {
|
|
595
498
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
596
499
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
597
|
-
setFileType(
|
|
500
|
+
setFileType('pic');
|
|
598
501
|
setVisible(true);
|
|
599
|
-
} else if ([
|
|
502
|
+
} else if (['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'].includes(fileType.toLowerCase())) {
|
|
600
503
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
601
504
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
602
|
-
setFileType(
|
|
505
|
+
setFileType('video');
|
|
603
506
|
setVisible(true);
|
|
604
507
|
} else {
|
|
605
508
|
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
@@ -610,9 +513,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
610
513
|
fetch(url).then(function (res) {
|
|
611
514
|
return res.blob();
|
|
612
515
|
}).then(function (blob) {
|
|
613
|
-
var a = document.createElement(
|
|
516
|
+
var a = document.createElement('a');
|
|
614
517
|
document.body.appendChild(a);
|
|
615
|
-
a.style.display =
|
|
518
|
+
a.style.display = 'none';
|
|
616
519
|
var url = window.URL.createObjectURL(blob);
|
|
617
520
|
a.href = url;
|
|
618
521
|
a.download = name;
|
|
@@ -626,9 +529,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
626
529
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (item) {
|
|
627
530
|
return /*#__PURE__*/React.createElement("a", {
|
|
628
531
|
style: {
|
|
629
|
-
color:
|
|
630
|
-
cursor:
|
|
631
|
-
display:
|
|
532
|
+
color: '#1890ff',
|
|
533
|
+
cursor: 'pointer',
|
|
534
|
+
display: 'block'
|
|
632
535
|
},
|
|
633
536
|
onClick: function onClick(e) {
|
|
634
537
|
e.preventDefault();
|
|
@@ -650,20 +553,20 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
650
553
|
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
651
554
|
text: fileUrl,
|
|
652
555
|
onCopy: function onCopy() {
|
|
653
|
-
message.success(
|
|
556
|
+
message.success('复制成功');
|
|
654
557
|
}
|
|
655
558
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
656
559
|
type: "link"
|
|
657
|
-
}, "\u4E0B\u8F7D\u5730\u5740")), fileType ===
|
|
560
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
|
|
658
561
|
alt: "example",
|
|
659
562
|
style: {
|
|
660
|
-
width:
|
|
563
|
+
width: '100%'
|
|
661
564
|
},
|
|
662
565
|
src: fileUrl
|
|
663
566
|
}) : /*#__PURE__*/React.createElement("video", {
|
|
664
567
|
style: {
|
|
665
|
-
width:
|
|
666
|
-
height:
|
|
568
|
+
width: '100%',
|
|
569
|
+
height: '100%'
|
|
667
570
|
},
|
|
668
571
|
autoPlay: true,
|
|
669
572
|
controls: true,
|
|
@@ -673,24 +576,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
673
576
|
export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
674
577
|
var value = _ref13.value,
|
|
675
578
|
type = _ref13.type;
|
|
676
|
-
var columns = type ===
|
|
677
|
-
dataIndex:
|
|
678
|
-
title:
|
|
579
|
+
var columns = type === 'WLN_SYSTEM_ORDER' ? [{
|
|
580
|
+
dataIndex: 'billType',
|
|
581
|
+
title: '单据类型'
|
|
679
582
|
}, {
|
|
680
|
-
dataIndex:
|
|
681
|
-
title:
|
|
583
|
+
dataIndex: 'billNo',
|
|
584
|
+
title: '系统订单号'
|
|
682
585
|
}, {
|
|
683
|
-
dataIndex:
|
|
684
|
-
title:
|
|
586
|
+
dataIndex: 'billTag',
|
|
587
|
+
title: '标签'
|
|
685
588
|
}] : [{
|
|
686
|
-
dataIndex:
|
|
687
|
-
title:
|
|
589
|
+
dataIndex: 'billType',
|
|
590
|
+
title: '订单类型'
|
|
688
591
|
}, {
|
|
689
|
-
dataIndex:
|
|
690
|
-
title:
|
|
592
|
+
dataIndex: 'billNo',
|
|
593
|
+
title: '系统订单号'
|
|
691
594
|
}, {
|
|
692
|
-
dataIndex:
|
|
693
|
-
title:
|
|
595
|
+
dataIndex: 'billTag',
|
|
596
|
+
title: '标记'
|
|
694
597
|
}];
|
|
695
598
|
var rowSelection = {
|
|
696
599
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || ((value === null || value === void 0 ? void 0 : value.showOrderInfo) || []).reduce(function (prv, next) {
|
|
@@ -711,14 +614,14 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
711
614
|
dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
|
|
712
615
|
columns: columns,
|
|
713
616
|
rowSelection: rowSelection,
|
|
714
|
-
rowKey:
|
|
617
|
+
rowKey: 'billNo',
|
|
715
618
|
size: "small",
|
|
716
619
|
pagination: false,
|
|
717
620
|
scroll: {
|
|
718
|
-
x:
|
|
621
|
+
x: '100%'
|
|
719
622
|
},
|
|
720
623
|
locale: {
|
|
721
|
-
emptyText:
|
|
624
|
+
emptyText: '暂无数据'
|
|
722
625
|
}
|
|
723
626
|
});
|
|
724
627
|
};
|
|
@@ -738,33 +641,33 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
738
641
|
_ref14$options = _ref14.options,
|
|
739
642
|
options = _ref14$options === void 0 ? [] : _ref14$options;
|
|
740
643
|
var msgTypeCh = {
|
|
741
|
-
ding:
|
|
742
|
-
wechat:
|
|
743
|
-
qq:
|
|
744
|
-
qywx:
|
|
644
|
+
ding: '钉钉',
|
|
645
|
+
wechat: '微信',
|
|
646
|
+
qq: 'QQ',
|
|
647
|
+
qywx: '企业微信'
|
|
745
648
|
};
|
|
746
649
|
var detailContent = function detailContent(item) {
|
|
747
650
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
748
651
|
style: {
|
|
749
|
-
textAlign:
|
|
652
|
+
textAlign: 'left'
|
|
750
653
|
}
|
|
751
654
|
}, /*#__PURE__*/React.createElement("div", null, item.ruleName)));
|
|
752
655
|
};
|
|
753
656
|
return /*#__PURE__*/React.createElement(Space, {
|
|
754
|
-
direction: !horizontal ?
|
|
657
|
+
direction: !horizontal ? 'vertical' : 'horizontal'
|
|
755
658
|
}, Array.isArray(list) ? (list || []).map(function (item, index) {
|
|
756
659
|
var _options$find2;
|
|
757
660
|
var color = ((_options$find2 = options.find(function (innerItem) {
|
|
758
661
|
return item[valueKey] === innerItem.label;
|
|
759
|
-
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) ||
|
|
662
|
+
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) || '#000';
|
|
760
663
|
var currentOption = options.find(function (option) {
|
|
761
664
|
return item[valueKey] === option.value;
|
|
762
665
|
});
|
|
763
|
-
var key = item.msgType ||
|
|
666
|
+
var key = item.msgType || 'ding';
|
|
764
667
|
return /*#__PURE__*/React.createElement("div", {
|
|
765
668
|
style: {
|
|
766
669
|
color: color,
|
|
767
|
-
cursor:
|
|
670
|
+
cursor: 'pointer'
|
|
768
671
|
}
|
|
769
672
|
}, /*#__PURE__*/React.createElement(Popover, {
|
|
770
673
|
content: detailContent(item),
|
|
@@ -773,6 +676,6 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
773
676
|
}
|
|
774
677
|
}, /*#__PURE__*/React.createElement("span", {
|
|
775
678
|
key: index
|
|
776
|
-
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) ||
|
|
679
|
+
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || '')));
|
|
777
680
|
}) : null);
|
|
778
681
|
};
|