@kmkf-fe-packages/services-components 0.15.1-alpha.2 → 0.15.1-alpha.4
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.
|
@@ -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 (item) {
|
|
271
271
|
return item[valueKey] === failValue;
|
|
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
|
};
|
|
@@ -358,38 +358,38 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
358
358
|
var list = _ref11.list,
|
|
359
359
|
showHeader = _ref11.showHeader,
|
|
360
360
|
_ref11$text = _ref11.text,
|
|
361
|
-
text = _ref11$text === void 0 ?
|
|
361
|
+
text = _ref11$text === void 0 ? '' : _ref11$text;
|
|
362
362
|
//商品信息
|
|
363
363
|
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
364
|
-
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
364
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
365
365
|
return [{
|
|
366
|
-
dataIndex:
|
|
366
|
+
dataIndex: 'mark',
|
|
367
367
|
title: "\u5546\u54C1\u6807\u8BB0",
|
|
368
|
-
align:
|
|
368
|
+
align: 'center',
|
|
369
369
|
ellipsis: true,
|
|
370
370
|
width: 100
|
|
371
371
|
}, {
|
|
372
|
-
dataIndex:
|
|
372
|
+
dataIndex: 'skuName',
|
|
373
373
|
title: "".concat(text, "sku\u540D\u79F0"),
|
|
374
|
-
align:
|
|
374
|
+
align: 'center',
|
|
375
375
|
ellipsis: true,
|
|
376
376
|
width: 200
|
|
377
377
|
}, {
|
|
378
|
-
dataIndex:
|
|
378
|
+
dataIndex: 'sku',
|
|
379
379
|
title: "".concat(text, "sku\u7F16\u7801"),
|
|
380
|
-
align:
|
|
380
|
+
align: 'center',
|
|
381
381
|
ellipsis: true,
|
|
382
382
|
width: 100
|
|
383
383
|
}, {
|
|
384
|
-
dataIndex:
|
|
384
|
+
dataIndex: 'name',
|
|
385
385
|
title: "".concat(text, "\u540D\u79F0"),
|
|
386
|
-
align:
|
|
386
|
+
align: 'center',
|
|
387
387
|
ellipsis: true,
|
|
388
388
|
width: 200
|
|
389
389
|
}, {
|
|
390
|
-
dataIndex:
|
|
390
|
+
dataIndex: 'pic',
|
|
391
391
|
title: "\u56FE\u7247",
|
|
392
|
-
align:
|
|
392
|
+
align: 'center',
|
|
393
393
|
ellipsis: true,
|
|
394
394
|
width: 100,
|
|
395
395
|
render: function render(val) {
|
|
@@ -399,42 +399,42 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
}, {
|
|
402
|
-
dataIndex:
|
|
402
|
+
dataIndex: 'code',
|
|
403
403
|
title: "".concat(text, "\u7F16\u7801"),
|
|
404
|
-
align:
|
|
404
|
+
align: 'center',
|
|
405
405
|
ellipsis: true,
|
|
406
406
|
width: 100
|
|
407
407
|
}, {
|
|
408
|
-
dataIndex:
|
|
408
|
+
dataIndex: 'money',
|
|
409
409
|
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
410
|
-
align:
|
|
410
|
+
align: 'center',
|
|
411
411
|
ellipsis: true,
|
|
412
412
|
width: 100
|
|
413
413
|
}, {
|
|
414
|
-
dataIndex:
|
|
414
|
+
dataIndex: 'number',
|
|
415
415
|
title: "".concat(text, "\u6570\u91CF"),
|
|
416
|
-
align:
|
|
416
|
+
align: 'center',
|
|
417
417
|
ellipsis: true,
|
|
418
418
|
width: 100
|
|
419
419
|
}, {
|
|
420
|
-
dataIndex:
|
|
420
|
+
dataIndex: 'share',
|
|
421
421
|
title: "\u5206\u644A\u4EF7",
|
|
422
|
-
align:
|
|
422
|
+
align: 'center',
|
|
423
423
|
ellipsis: true,
|
|
424
424
|
width: 70
|
|
425
425
|
}, {
|
|
426
|
-
dataIndex:
|
|
426
|
+
dataIndex: 'type',
|
|
427
427
|
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
428
|
-
align:
|
|
428
|
+
align: 'center',
|
|
429
429
|
ellipsis: true,
|
|
430
430
|
width: 100
|
|
431
431
|
}];
|
|
432
432
|
};
|
|
433
433
|
var newColumns = useMemo(function () {
|
|
434
434
|
var columnList = [{
|
|
435
|
-
dataIndex:
|
|
436
|
-
title:
|
|
437
|
-
align:
|
|
435
|
+
dataIndex: '',
|
|
436
|
+
title: '序号',
|
|
437
|
+
align: 'center',
|
|
438
438
|
ellipsis: true,
|
|
439
439
|
width: 50,
|
|
440
440
|
render: function render(val, record, index) {
|
|
@@ -448,14 +448,14 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
448
448
|
return /*#__PURE__*/React.createElement(Table, {
|
|
449
449
|
columns: newColumns,
|
|
450
450
|
dataSource: list,
|
|
451
|
-
rowKey:
|
|
451
|
+
rowKey: 'uuid',
|
|
452
452
|
size: "small",
|
|
453
453
|
pagination: false,
|
|
454
454
|
scroll: {
|
|
455
|
-
x:
|
|
455
|
+
x: '100%'
|
|
456
456
|
},
|
|
457
457
|
locale: {
|
|
458
|
-
emptyText:
|
|
458
|
+
emptyText: '暂无数据'
|
|
459
459
|
}
|
|
460
460
|
});
|
|
461
461
|
};
|
|
@@ -468,15 +468,15 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
468
468
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
469
469
|
visible = _useState4[0],
|
|
470
470
|
setVisible = _useState4[1];
|
|
471
|
-
var _useState5 = useState(
|
|
471
|
+
var _useState5 = useState(''),
|
|
472
472
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
473
473
|
fileUrl = _useState6[0],
|
|
474
474
|
setFileUrl = _useState6[1];
|
|
475
|
-
var _useState7 = useState(
|
|
475
|
+
var _useState7 = useState(''),
|
|
476
476
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
477
477
|
fileType = _useState8[0],
|
|
478
478
|
setFileType = _useState8[1];
|
|
479
|
-
var _useState9 = useState(
|
|
479
|
+
var _useState9 = useState(''),
|
|
480
480
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
481
481
|
fileName = _useState10[0],
|
|
482
482
|
setFileName = _useState10[1];
|
|
@@ -485,24 +485,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
485
485
|
downloading = _useState12[0],
|
|
486
486
|
setDownloading = _useState12[1];
|
|
487
487
|
var handleCancel = function handleCancel() {
|
|
488
|
-
setFileUrl(
|
|
489
|
-
setFileName(
|
|
488
|
+
setFileUrl('');
|
|
489
|
+
setFileName('');
|
|
490
490
|
setVisible(false);
|
|
491
491
|
setDownloading(false);
|
|
492
492
|
};
|
|
493
493
|
var onPreview = function onPreview(file) {
|
|
494
494
|
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(
|
|
495
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
496
496
|
var fileType = fileArr[fileArr.length - 1];
|
|
497
|
-
if ([
|
|
497
|
+
if (['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg'].includes(fileType.toLowerCase())) {
|
|
498
498
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
499
499
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
500
|
-
setFileType(
|
|
500
|
+
setFileType('pic');
|
|
501
501
|
setVisible(true);
|
|
502
|
-
} else if ([
|
|
502
|
+
} else if (['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'].includes(fileType.toLowerCase())) {
|
|
503
503
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
504
504
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
505
|
-
setFileType(
|
|
505
|
+
setFileType('video');
|
|
506
506
|
setVisible(true);
|
|
507
507
|
} else {
|
|
508
508
|
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
@@ -513,9 +513,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
513
513
|
fetch(url).then(function (res) {
|
|
514
514
|
return res.blob();
|
|
515
515
|
}).then(function (blob) {
|
|
516
|
-
var a = document.createElement(
|
|
516
|
+
var a = document.createElement('a');
|
|
517
517
|
document.body.appendChild(a);
|
|
518
|
-
a.style.display =
|
|
518
|
+
a.style.display = 'none';
|
|
519
519
|
var url = window.URL.createObjectURL(blob);
|
|
520
520
|
a.href = url;
|
|
521
521
|
a.download = name;
|
|
@@ -529,9 +529,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
529
529
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (item) {
|
|
530
530
|
return /*#__PURE__*/React.createElement("a", {
|
|
531
531
|
style: {
|
|
532
|
-
color:
|
|
533
|
-
cursor:
|
|
534
|
-
display:
|
|
532
|
+
color: '#1890ff',
|
|
533
|
+
cursor: 'pointer',
|
|
534
|
+
display: 'block'
|
|
535
535
|
},
|
|
536
536
|
onClick: function onClick(e) {
|
|
537
537
|
e.preventDefault();
|
|
@@ -553,20 +553,20 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
553
553
|
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
554
554
|
text: fileUrl,
|
|
555
555
|
onCopy: function onCopy() {
|
|
556
|
-
message.success(
|
|
556
|
+
message.success('复制成功');
|
|
557
557
|
}
|
|
558
558
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
559
559
|
type: "link"
|
|
560
|
-
}, "\u4E0B\u8F7D\u5730\u5740")), fileType ===
|
|
560
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
|
|
561
561
|
alt: "example",
|
|
562
562
|
style: {
|
|
563
|
-
width:
|
|
563
|
+
width: '100%'
|
|
564
564
|
},
|
|
565
565
|
src: fileUrl
|
|
566
566
|
}) : /*#__PURE__*/React.createElement("video", {
|
|
567
567
|
style: {
|
|
568
|
-
width:
|
|
569
|
-
height:
|
|
568
|
+
width: '100%',
|
|
569
|
+
height: '100%'
|
|
570
570
|
},
|
|
571
571
|
autoPlay: true,
|
|
572
572
|
controls: true,
|
|
@@ -576,24 +576,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
576
576
|
export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
577
577
|
var value = _ref13.value,
|
|
578
578
|
type = _ref13.type;
|
|
579
|
-
var columns = type ===
|
|
580
|
-
dataIndex:
|
|
581
|
-
title:
|
|
579
|
+
var columns = type === 'WLN_SYSTEM_ORDER' ? [{
|
|
580
|
+
dataIndex: 'billType',
|
|
581
|
+
title: '单据类型'
|
|
582
582
|
}, {
|
|
583
|
-
dataIndex:
|
|
584
|
-
title:
|
|
583
|
+
dataIndex: 'billNo',
|
|
584
|
+
title: '系统订单号'
|
|
585
585
|
}, {
|
|
586
|
-
dataIndex:
|
|
587
|
-
title:
|
|
586
|
+
dataIndex: 'billTag',
|
|
587
|
+
title: '标签'
|
|
588
588
|
}] : [{
|
|
589
|
-
dataIndex:
|
|
590
|
-
title:
|
|
589
|
+
dataIndex: 'billType',
|
|
590
|
+
title: '订单类型'
|
|
591
591
|
}, {
|
|
592
|
-
dataIndex:
|
|
593
|
-
title:
|
|
592
|
+
dataIndex: 'billNo',
|
|
593
|
+
title: '系统订单号'
|
|
594
594
|
}, {
|
|
595
|
-
dataIndex:
|
|
596
|
-
title:
|
|
595
|
+
dataIndex: 'billTag',
|
|
596
|
+
title: '标记'
|
|
597
597
|
}];
|
|
598
598
|
var rowSelection = {
|
|
599
599
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || ((value === null || value === void 0 ? void 0 : value.showOrderInfo) || []).reduce(function (prv, next) {
|
|
@@ -614,17 +614,23 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
614
614
|
dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
|
|
615
615
|
columns: columns,
|
|
616
616
|
rowSelection: rowSelection,
|
|
617
|
-
rowKey:
|
|
617
|
+
rowKey: 'billNo',
|
|
618
618
|
size: "small",
|
|
619
619
|
pagination: false,
|
|
620
620
|
scroll: {
|
|
621
|
-
x:
|
|
621
|
+
x: '100%'
|
|
622
622
|
},
|
|
623
623
|
locale: {
|
|
624
|
-
emptyText:
|
|
624
|
+
emptyText: '暂无数据'
|
|
625
625
|
}
|
|
626
626
|
});
|
|
627
627
|
};
|
|
628
|
+
// interface MsgItemType {
|
|
629
|
+
// msgRuleId: string
|
|
630
|
+
// msgType: string
|
|
631
|
+
// ruleName: string
|
|
632
|
+
// status: string
|
|
633
|
+
// }
|
|
628
634
|
export var MsgContent = function MsgContent(_ref14) {
|
|
629
635
|
var _ref14$horizontal = _ref14.horizontal,
|
|
630
636
|
horizontal = _ref14$horizontal === void 0 ? true : _ref14$horizontal,
|
|
@@ -635,17 +641,17 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
635
641
|
_ref14$options = _ref14.options,
|
|
636
642
|
options = _ref14$options === void 0 ? [] : _ref14$options;
|
|
637
643
|
var msgTypeCh = {
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
644
|
+
ding: '钉钉',
|
|
645
|
+
wechat: '微信',
|
|
646
|
+
qq: 'QQ',
|
|
647
|
+
qywx: '企业微信'
|
|
642
648
|
};
|
|
643
|
-
var detailContent = function detailContent(item
|
|
649
|
+
var detailContent = function detailContent(item) {
|
|
644
650
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
645
651
|
style: {
|
|
646
|
-
textAlign:
|
|
652
|
+
textAlign: 'left'
|
|
647
653
|
}
|
|
648
|
-
}, /*#__PURE__*/React.createElement("div", null, item.ruleName)
|
|
654
|
+
}, /*#__PURE__*/React.createElement("div", null, item.ruleName)));
|
|
649
655
|
};
|
|
650
656
|
return /*#__PURE__*/React.createElement(Space, {
|
|
651
657
|
direction: !horizontal ? 'vertical' : 'horizontal'
|
|
@@ -653,30 +659,23 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
653
659
|
var _options$find2;
|
|
654
660
|
var color = ((_options$find2 = options.find(function (innerItem) {
|
|
655
661
|
return item[valueKey] === innerItem.label;
|
|
656
|
-
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) ||
|
|
662
|
+
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) || '#000';
|
|
657
663
|
var currentOption = options.find(function (option) {
|
|
658
664
|
return item[valueKey] === option.value;
|
|
659
665
|
});
|
|
660
666
|
var key = item.msgType || 'ding';
|
|
661
667
|
return /*#__PURE__*/React.createElement("div", {
|
|
662
668
|
style: {
|
|
663
|
-
color: color
|
|
669
|
+
color: color,
|
|
670
|
+
cursor: 'pointer'
|
|
664
671
|
}
|
|
665
|
-
},
|
|
666
|
-
content: detailContent(item
|
|
672
|
+
}, /*#__PURE__*/React.createElement(Popover, {
|
|
673
|
+
content: detailContent(item),
|
|
667
674
|
overlayStyle: {
|
|
668
|
-
zIndex:
|
|
675
|
+
zIndex: 9999
|
|
669
676
|
}
|
|
670
677
|
}, /*#__PURE__*/React.createElement("span", {
|
|
671
|
-
key: index
|
|
672
|
-
|
|
673
|
-
cursor: "pointer"
|
|
674
|
-
}
|
|
675
|
-
}, msgTypeCh[key], "-"), /*#__PURE__*/React.createElement("span", null, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "")) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
676
|
-
key: index,
|
|
677
|
-
style: {
|
|
678
|
-
cursor: "pointer"
|
|
679
|
-
}
|
|
680
|
-
}, msgTypeCh[key], "-"), /*#__PURE__*/React.createElement("span", null, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "")));
|
|
678
|
+
key: index
|
|
679
|
+
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || '')));
|
|
681
680
|
}) : null);
|
|
682
681
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.15.1-alpha.
|
|
3
|
+
"version": "0.15.1-alpha.4",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "b3ce1d500118ce1c96310e38d68fe91047af4774",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|