@kmkf-fe-packages/services-components 2.0.50 → 2.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/OperationLog/index.d.ts +2 -1
- package/dist/esm/commonComponents/OperationLog/index.js +6 -2
- package/dist/esm/components/BS/common/BsHeaderChild.d.ts +4 -4
- package/dist/esm/components/BS/common/BsHeaderChild.js +8 -10
- package/dist/esm/components/BS/common/BsHeaderPic.d.ts +6 -6
- package/dist/esm/components/BS/common/BsHeaderPic.js +7 -16
- package/dist/esm/components/Common/index.d.ts +3 -2
- package/dist/esm/components/Common/index.js +187 -143
- package/dist/esm/components/Common/index.module.less +1 -0
- package/dist/esm/components/Picture/index.d.ts +5 -5
- package/dist/esm/components/Picture/index.js +19 -19
- package/dist/esm/components/PicturePro/PictureName.d.ts +30 -0
- package/dist/esm/components/PicturePro/PictureName.js +132 -0
- package/dist/esm/components/PicturePro/PictureUrl.d.ts +26 -0
- package/dist/esm/components/PicturePro/PictureUrl.js +93 -0
- package/dist/esm/components/PicturePro/index.d.ts +40 -0
- package/dist/esm/components/PicturePro/index.js +180 -0
- package/dist/esm/components/PicturePro/index.less +63 -0
- package/dist/esm/components/Public/Exchange/index.d.ts +1 -1
- package/dist/esm/components/Select/index.js +3 -0
- package/dist/esm/components/StatusSelect/index.js +4 -0
- package/dist/esm/components/TradeId/index.d.ts +10 -7
- package/dist/esm/components/TradeId/index.js +12 -12
- package/dist/esm/constant.d.ts +1 -0
- package/dist/esm/constant.js +14 -13
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +5 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/type.d.ts +14 -14
- package/package.json +4 -4
|
@@ -12,15 +12,16 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
12
12
|
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; }
|
|
13
13
|
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; } }
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Typography } from
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
15
|
+
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Typography } from 'antd';
|
|
16
|
+
import { DownloadOutlined } from '@ant-design/icons';
|
|
17
|
+
import React, { useState, useMemo } from 'react';
|
|
18
|
+
import { ExpressData, SendDataCenter } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
19
|
import { getAlipayBillReceipt } from "../../service/api";
|
|
19
|
-
import { CopyToClipboard } from
|
|
20
|
+
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
20
21
|
import styles from "./index.module.less";
|
|
21
22
|
import defaultImg from "./img/default-img.png";
|
|
22
23
|
import CopyText from "../../commonComponents/CopyText";
|
|
23
|
-
import { KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, msgTypeCh, getMapping, columnsGoodsList } from
|
|
24
|
+
import { KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, msgTypeCh, getMapping, columnsGoodsList } from '@kmkf-fe-packages/kmkf-utils';
|
|
24
25
|
import { getColumnsMap } from "./constants/columnsBaseInfoMap";
|
|
25
26
|
var Paragraph = Typography.Paragraph;
|
|
26
27
|
export var getFormItem = function getFormItem(_ref) {
|
|
@@ -40,7 +41,7 @@ export var getFormItem = function getFormItem(_ref) {
|
|
|
40
41
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
42
|
className: "form-item--wrap",
|
|
42
43
|
style: {
|
|
43
|
-
position:
|
|
44
|
+
position: 'relative'
|
|
44
45
|
}
|
|
45
46
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
46
47
|
name: name,
|
|
@@ -55,51 +56,51 @@ export var showImage = function showImage(_ref2) {
|
|
|
55
56
|
type = _ref2.type,
|
|
56
57
|
index = _ref2.index,
|
|
57
58
|
showHeader = _ref2.showHeader;
|
|
58
|
-
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !==
|
|
59
|
+
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
|
|
59
60
|
var mapping_itemCode = getMapping(columnsGoodsList);
|
|
60
61
|
return /*#__PURE__*/React.createElement("div", {
|
|
61
62
|
className: styles.goodImgBox,
|
|
62
63
|
key: index
|
|
63
|
-
}, type ===
|
|
64
|
+
}, type === 'itemCode' && !showHeader.includes('picUrl') ? null : (item === null || item === void 0 ? void 0 : item.platform) === 'taobao' ? /*#__PURE__*/React.createElement("a", {
|
|
64
65
|
target: "_blank",
|
|
65
|
-
href: item.numIid ? "https://item.taobao.com/item.htm?id=".concat(item.numIid) :
|
|
66
|
+
href: item.numIid ? "https://item.taobao.com/item.htm?id=".concat(item.numIid) : 'javascript:void(0);'
|
|
66
67
|
}, /*#__PURE__*/React.createElement("img", {
|
|
67
68
|
style: {
|
|
68
|
-
width:
|
|
69
|
-
height:
|
|
70
|
-
objectFit:
|
|
69
|
+
width: '40px',
|
|
70
|
+
height: '40px',
|
|
71
|
+
objectFit: 'contain'
|
|
71
72
|
},
|
|
72
73
|
src: picUrl
|
|
73
74
|
})) : /*#__PURE__*/React.createElement("img", {
|
|
74
75
|
style: {
|
|
75
|
-
width:
|
|
76
|
-
height:
|
|
77
|
-
objectFit:
|
|
76
|
+
width: '40px',
|
|
77
|
+
height: '40px',
|
|
78
|
+
objectFit: 'contain'
|
|
78
79
|
},
|
|
79
80
|
src: picUrl
|
|
80
81
|
}), /*#__PURE__*/React.createElement("div", {
|
|
81
82
|
className: styles.options,
|
|
82
83
|
onClick: function onClick() {
|
|
83
|
-
console.log(
|
|
84
|
+
console.log('show---', showHeader);
|
|
84
85
|
}
|
|
85
|
-
}, type ===
|
|
86
|
-
title:
|
|
86
|
+
}, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
87
|
+
title: '商品id',
|
|
87
88
|
text: item.numIid
|
|
88
|
-
}), type ===
|
|
89
|
-
return dataIndex !==
|
|
89
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(React.Fragment, null, showHeader.filter(function (dataIndex) {
|
|
90
|
+
return dataIndex !== 'picUrl';
|
|
90
91
|
}).map(function (dataIndex) {
|
|
91
92
|
return /*#__PURE__*/React.createElement(TextTool, {
|
|
92
93
|
title: mapping_itemCode[dataIndex],
|
|
93
94
|
text: item[dataIndex]
|
|
94
95
|
});
|
|
95
|
-
})), (type ===
|
|
96
|
-
title:
|
|
96
|
+
})), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
97
|
+
title: '供应商编码',
|
|
97
98
|
text: item.itemId || item.supplierItemOuterId
|
|
98
|
-
}), (type ===
|
|
99
|
-
title:
|
|
99
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
100
|
+
title: '供应商名称',
|
|
100
101
|
text: item.supplierName
|
|
101
|
-
}), type !==
|
|
102
|
-
title:
|
|
102
|
+
}), type !== 'itemCode' && item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
103
|
+
title: '规格',
|
|
103
104
|
text: item.propertiesName
|
|
104
105
|
})));
|
|
105
106
|
};
|
|
@@ -112,9 +113,9 @@ var TextTool = function TextTool(_ref3) {
|
|
|
112
113
|
title: text
|
|
113
114
|
}, /*#__PURE__*/React.createElement("div", {
|
|
114
115
|
style: {
|
|
115
|
-
overflow:
|
|
116
|
-
whiteSpace:
|
|
117
|
-
textOverflow:
|
|
116
|
+
overflow: 'hidden',
|
|
117
|
+
whiteSpace: 'nowrap',
|
|
118
|
+
textOverflow: 'ellipsis'
|
|
118
119
|
}
|
|
119
120
|
}, title, ":", text));
|
|
120
121
|
};
|
|
@@ -145,51 +146,51 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
145
146
|
title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
|
|
146
147
|
}, /*#__PURE__*/React.createElement("div", {
|
|
147
148
|
style: {
|
|
148
|
-
display:
|
|
149
|
-
flexWrap:
|
|
149
|
+
display: 'flex',
|
|
150
|
+
flexWrap: 'wrap'
|
|
150
151
|
}
|
|
151
152
|
}, allImage.map(function (i, index) {
|
|
152
153
|
return /*#__PURE__*/React.createElement("div", {
|
|
153
154
|
style: {
|
|
154
|
-
width:
|
|
155
|
+
width: '50%'
|
|
155
156
|
},
|
|
156
157
|
key: index
|
|
157
|
-
}, type ===
|
|
158
|
-
href: i.link || ((i === null || i === void 0 ? void 0 : i.platform) ===
|
|
158
|
+
}, type === 'itemCode' && !showHeader.includes('picUrl') ? null : /*#__PURE__*/React.createElement("a", {
|
|
159
|
+
href: i.link || ((i === null || i === void 0 ? void 0 : i.platform) === 'taobao' && i.numIid ? "https://item.taobao.com/item.htm?id=".concat(i.numIid) : 'javascript:void(0);'),
|
|
159
160
|
target: "__blank",
|
|
160
161
|
style: {
|
|
161
|
-
marginRight:
|
|
162
|
-
marginTop:
|
|
163
|
-
padding:
|
|
164
|
-
border:
|
|
165
|
-
display:
|
|
162
|
+
marginRight: '12px',
|
|
163
|
+
marginTop: '8px',
|
|
164
|
+
padding: '2px',
|
|
165
|
+
border: '1px dashed #ccc',
|
|
166
|
+
display: 'inline-block'
|
|
166
167
|
}
|
|
167
168
|
}, /*#__PURE__*/React.createElement("img", {
|
|
168
169
|
alt: "",
|
|
169
170
|
src: i.picUrl || defaultImg,
|
|
170
171
|
style: {
|
|
171
|
-
width:
|
|
172
|
-
height:
|
|
173
|
-
objectFit:
|
|
172
|
+
width: '72px',
|
|
173
|
+
height: '72px',
|
|
174
|
+
objectFit: 'contain'
|
|
174
175
|
}
|
|
175
|
-
})), /*#__PURE__*/React.createElement("div", null, type ===
|
|
176
|
-
title:
|
|
176
|
+
})), /*#__PURE__*/React.createElement("div", null, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
177
|
+
title: '商品id',
|
|
177
178
|
text: i.numIid
|
|
178
|
-
}), type ===
|
|
179
|
-
return dataIndex !==
|
|
179
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(React.Fragment, null, showHeader.filter(function (dataIndex) {
|
|
180
|
+
return dataIndex !== 'picUrl';
|
|
180
181
|
}).map(function (dataIndex) {
|
|
181
182
|
return /*#__PURE__*/React.createElement(TextTool, {
|
|
182
183
|
title: mapping_itemCode[dataIndex],
|
|
183
184
|
text: i[dataIndex]
|
|
184
185
|
});
|
|
185
|
-
})), (type ===
|
|
186
|
-
title:
|
|
186
|
+
})), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
187
|
+
title: '供应商编码',
|
|
187
188
|
text: i.itemId || i.supplierItemOuterId
|
|
188
|
-
}), (type ===
|
|
189
|
-
title:
|
|
189
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
190
|
+
title: '供应商名称',
|
|
190
191
|
text: i.supplierName
|
|
191
|
-
}), type !==
|
|
192
|
-
title:
|
|
192
|
+
}), type !== 'itemCode' && i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
193
|
+
title: '规格',
|
|
193
194
|
text: i.propertiesName
|
|
194
195
|
})));
|
|
195
196
|
}))));
|
|
@@ -199,14 +200,14 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
199
200
|
var _list$slice;
|
|
200
201
|
var list = _ref5.list,
|
|
201
202
|
_ref5$type = _ref5.type,
|
|
202
|
-
type = _ref5$type === void 0 ?
|
|
203
|
+
type = _ref5$type === void 0 ? '' : _ref5$type,
|
|
203
204
|
_ref5$showHeader = _ref5.showHeader,
|
|
204
205
|
showHeader = _ref5$showHeader === void 0 ? [] : _ref5$showHeader;
|
|
205
206
|
var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
|
|
206
207
|
var initShowTotal = 3;
|
|
207
208
|
var showHeaderMap = useMemo(function () {
|
|
208
|
-
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] ===
|
|
209
|
-
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) ===
|
|
209
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
|
|
210
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
210
211
|
var dataIndexList = [];
|
|
211
212
|
if (isStringArray) {
|
|
212
213
|
dataIndexList = showHeader;
|
|
@@ -221,7 +222,7 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
221
222
|
}, [showHeader]);
|
|
222
223
|
return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
223
224
|
style: {
|
|
224
|
-
display: type ===
|
|
225
|
+
display: type === 'itemSelect' ? 'flex' : 'block'
|
|
225
226
|
}
|
|
226
227
|
}, 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) {
|
|
227
228
|
return showImage({
|
|
@@ -240,12 +241,12 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
240
241
|
var content = function content(item, index) {
|
|
241
242
|
return /*#__PURE__*/React.createElement("div", {
|
|
242
243
|
style: {
|
|
243
|
-
maxHeight:
|
|
244
|
-
overflowY:
|
|
244
|
+
maxHeight: '300px',
|
|
245
|
+
overflowY: 'auto'
|
|
245
246
|
}
|
|
246
247
|
}, /*#__PURE__*/React.createElement("div", {
|
|
247
248
|
style: {
|
|
248
|
-
textAlign:
|
|
249
|
+
textAlign: 'center'
|
|
249
250
|
}
|
|
250
251
|
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React.createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
251
252
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -262,14 +263,14 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
262
263
|
list = _ref6$list === void 0 ? [] : _ref6$list,
|
|
263
264
|
type = _ref6.type,
|
|
264
265
|
_ref6$platformType = _ref6.platformType,
|
|
265
|
-
platformType = _ref6$platformType === void 0 ?
|
|
266
|
+
platformType = _ref6$platformType === void 0 ? 'default' : _ref6$platformType;
|
|
266
267
|
var getSendName = function getSendName(item) {
|
|
267
268
|
return SendDataCenter.getInstance(platformType).getSendNameByCode(item.sendName);
|
|
268
269
|
};
|
|
269
270
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
270
271
|
var logisticsCompany = item.logisticsCompany,
|
|
271
272
|
logisticsCompanyName = item.logisticsCompanyName;
|
|
272
|
-
var company = platformType ===
|
|
273
|
+
var company = platformType === 'gy' ? logisticsCompanyName : ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany);
|
|
273
274
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
|
274
275
|
content: content(item, index),
|
|
275
276
|
overlayStyle: {
|
|
@@ -278,23 +279,23 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
278
279
|
}, /*#__PURE__*/React.createElement("span", {
|
|
279
280
|
key: index,
|
|
280
281
|
style: {
|
|
281
|
-
color:
|
|
282
|
-
cursor:
|
|
282
|
+
color: '#1890ff',
|
|
283
|
+
cursor: 'pointer'
|
|
283
284
|
}
|
|
284
285
|
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? /*#__PURE__*/React.createElement(React.Fragment, null, company, "/", /*#__PURE__*/React.createElement(CopyText, {
|
|
285
286
|
text: item.logisticsCode
|
|
286
287
|
})) : company ? company : item.logisticsCode ? /*#__PURE__*/React.createElement(CopyText, {
|
|
287
288
|
text: item.logisticsCode
|
|
288
|
-
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join(
|
|
289
|
+
}) : null) : 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, getSendName(item)].join('/') : item.sendId ? item.sendId : getSendName(item)) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || '') : null));
|
|
289
290
|
}) : null;
|
|
290
291
|
};
|
|
291
292
|
export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
292
293
|
var _ref7$list = _ref7.list,
|
|
293
294
|
list = _ref7$list === void 0 ? [] : _ref7$list,
|
|
294
295
|
_ref7$showField = _ref7.showField,
|
|
295
|
-
showField = _ref7$showField === void 0 ?
|
|
296
|
+
showField = _ref7$showField === void 0 ? '' : _ref7$showField,
|
|
296
297
|
_ref7$platformType = _ref7.platformType,
|
|
297
|
-
platformType = _ref7$platformType === void 0 ?
|
|
298
|
+
platformType = _ref7$platformType === void 0 ? 'default' : _ref7$platformType;
|
|
298
299
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
299
300
|
var logisticsCompany = item.logisticsCompany;
|
|
300
301
|
var company = ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany);
|
|
@@ -306,10 +307,10 @@ export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
|
306
307
|
}, /*#__PURE__*/React.createElement("span", {
|
|
307
308
|
key: index,
|
|
308
309
|
style: {
|
|
309
|
-
color:
|
|
310
|
-
cursor:
|
|
310
|
+
color: '#1890ff',
|
|
311
|
+
cursor: 'pointer'
|
|
311
312
|
}
|
|
312
|
-
}, "\u5305\u88F9", ":")), showField ===
|
|
313
|
+
}, "\u5305\u88F9", ":")), showField === 'company' ? /*#__PURE__*/React.createElement("span", null, company ? company : null) : null, showField === 'code' ? /*#__PURE__*/React.createElement("span", null, item.logisticsCode ? /*#__PURE__*/React.createElement(CopyText, {
|
|
313
314
|
text: item.logisticsCode
|
|
314
315
|
}) : null) : null));
|
|
315
316
|
}) : null;
|
|
@@ -325,11 +326,11 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
325
326
|
isShowPopover = _ref8$isShowPopover === void 0 ? true : _ref8$isShowPopover;
|
|
326
327
|
var getContentData = function getContentData(item, index) {
|
|
327
328
|
if (item.platformId) return {
|
|
328
|
-
text:
|
|
329
|
+
text: '平台售后单号',
|
|
329
330
|
id: item.platformId
|
|
330
331
|
};
|
|
331
332
|
if (item.returnLogisticsCode) return {
|
|
332
|
-
text:
|
|
333
|
+
text: '物流单号',
|
|
333
334
|
id: item.returnLogisticsCode
|
|
334
335
|
};
|
|
335
336
|
return {
|
|
@@ -341,13 +342,13 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
341
342
|
var contentData = getContentData(item, index);
|
|
342
343
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
343
344
|
style: {
|
|
344
|
-
textAlign:
|
|
345
|
+
textAlign: 'center'
|
|
345
346
|
}
|
|
346
347
|
}, contentData.text, "\uFF1A", contentData.id));
|
|
347
348
|
};
|
|
348
349
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
349
350
|
var _options$find;
|
|
350
|
-
var valueKey =
|
|
351
|
+
var valueKey = '';
|
|
351
352
|
if (Array.isArray(initValueKey)) {
|
|
352
353
|
for (var _index = 0; _index < initValueKey.length; _index++) {
|
|
353
354
|
var itemKey = initValueKey[_index];
|
|
@@ -361,7 +362,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
361
362
|
}
|
|
362
363
|
var color = ((_options$find = options.find(function (it) {
|
|
363
364
|
return item[valueKey] === it.value;
|
|
364
|
-
})) === null || _options$find === void 0 ? void 0 : _options$find.color) ||
|
|
365
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.color) || '#000';
|
|
365
366
|
var currentOption = options.find(function (option) {
|
|
366
367
|
return item[valueKey] === option.value;
|
|
367
368
|
});
|
|
@@ -373,14 +374,14 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
373
374
|
}, /*#__PURE__*/React.createElement("span", {
|
|
374
375
|
key: index,
|
|
375
376
|
style: {
|
|
376
|
-
color:
|
|
377
|
-
cursor:
|
|
377
|
+
color: '#1890ff',
|
|
378
|
+
cursor: 'pointer'
|
|
378
379
|
}
|
|
379
380
|
}, "".concat(getContentData(item, index).text), ":")) : null, /*#__PURE__*/React.createElement("span", {
|
|
380
381
|
style: {
|
|
381
382
|
color: color
|
|
382
383
|
}
|
|
383
|
-
}, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) ||
|
|
384
|
+
}, 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", {
|
|
384
385
|
className: "c-red"
|
|
385
386
|
}, item.reason));
|
|
386
387
|
}) : null;
|
|
@@ -392,22 +393,22 @@ export var BsGoodImage = function BsGoodImage(_ref9) {
|
|
|
392
393
|
index = _ref9.index;
|
|
393
394
|
var picUrl = item.picUrl || defaultImg;
|
|
394
395
|
var keyMap = {
|
|
395
|
-
name:
|
|
396
|
-
code:
|
|
397
|
-
skuId:
|
|
398
|
-
money:
|
|
399
|
-
number:
|
|
400
|
-
share:
|
|
401
|
-
type:
|
|
396
|
+
name: 'bs名称',
|
|
397
|
+
code: 'bs编码',
|
|
398
|
+
skuId: 'bssku编码',
|
|
399
|
+
money: 'bs实付金额',
|
|
400
|
+
number: 'bs数量',
|
|
401
|
+
share: 'bs分摊价',
|
|
402
|
+
type: 'bs赠品类型'
|
|
402
403
|
};
|
|
403
404
|
return /*#__PURE__*/React.createElement("div", {
|
|
404
405
|
className: styles.goodImgBox,
|
|
405
406
|
key: index
|
|
406
407
|
}, /*#__PURE__*/React.createElement("img", {
|
|
407
408
|
style: {
|
|
408
|
-
width:
|
|
409
|
-
height:
|
|
410
|
-
objectFit:
|
|
409
|
+
width: '40px',
|
|
410
|
+
height: '40px',
|
|
411
|
+
objectFit: 'contain'
|
|
411
412
|
},
|
|
412
413
|
src: picUrl
|
|
413
414
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -429,11 +430,11 @@ export var BsExchangeList = function BsExchangeList(_ref10) {
|
|
|
429
430
|
return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
|
|
430
431
|
list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
|
|
431
432
|
showHeader: showHeader,
|
|
432
|
-
text:
|
|
433
|
+
text: '退回'
|
|
433
434
|
}), BsGoodsTable({
|
|
434
435
|
list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
|
|
435
436
|
showHeader: showHeader,
|
|
436
|
-
text:
|
|
437
|
+
text: '换出'
|
|
437
438
|
}));
|
|
438
439
|
}));
|
|
439
440
|
};
|
|
@@ -450,22 +451,22 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
450
451
|
var list = _ref11.list,
|
|
451
452
|
showHeader = _ref11.showHeader,
|
|
452
453
|
_ref11$text = _ref11.text,
|
|
453
|
-
text = _ref11$text === void 0 ?
|
|
454
|
+
text = _ref11$text === void 0 ? '' : _ref11$text,
|
|
454
455
|
type = _ref11.type;
|
|
455
456
|
//商品信息
|
|
456
457
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
457
|
-
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
458
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
458
459
|
return function (type) {
|
|
459
460
|
var _columnsMap$type;
|
|
460
461
|
var columnsMap = getColumnsMap({
|
|
461
462
|
text: text
|
|
462
463
|
});
|
|
463
|
-
return (_columnsMap$type = columnsMap[type]) !== null && _columnsMap$type !== void 0 ? _columnsMap$type : columnsMap[
|
|
464
|
+
return (_columnsMap$type = columnsMap[type]) !== null && _columnsMap$type !== void 0 ? _columnsMap$type : columnsMap['default'];
|
|
464
465
|
};
|
|
465
466
|
};
|
|
466
467
|
//商品信息
|
|
467
468
|
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
468
|
-
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
469
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
469
470
|
var COLUMNS_INFO = COLUMNS_MAP(text);
|
|
470
471
|
return COLUMNS_INFO(type);
|
|
471
472
|
};
|
|
@@ -475,8 +476,8 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
475
476
|
var newColumns = useMemo(function () {
|
|
476
477
|
var initBaseInfoColumns = GOODS_INFO_COLUMNS();
|
|
477
478
|
var baseInfoColumns = [];
|
|
478
|
-
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] ===
|
|
479
|
-
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) ===
|
|
479
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
|
|
480
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
480
481
|
if (isStringArray) {
|
|
481
482
|
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
482
483
|
return showHeader.includes(col.dataIndex);
|
|
@@ -492,9 +493,9 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
492
493
|
}).filter(Boolean);
|
|
493
494
|
}
|
|
494
495
|
var columnList = [{
|
|
495
|
-
dataIndex:
|
|
496
|
-
title:
|
|
497
|
-
align:
|
|
496
|
+
dataIndex: '',
|
|
497
|
+
title: '序号',
|
|
498
|
+
align: 'center',
|
|
498
499
|
ellipsis: true,
|
|
499
500
|
width: 50,
|
|
500
501
|
render: function render(val, record, index) {
|
|
@@ -506,14 +507,14 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
506
507
|
return /*#__PURE__*/React.createElement(Table, {
|
|
507
508
|
columns: newColumns,
|
|
508
509
|
dataSource: list,
|
|
509
|
-
rowKey:
|
|
510
|
+
rowKey: 'uuid',
|
|
510
511
|
size: "small",
|
|
511
512
|
pagination: false,
|
|
512
513
|
scroll: {
|
|
513
|
-
x:
|
|
514
|
+
x: '100%'
|
|
514
515
|
},
|
|
515
516
|
locale: {
|
|
516
|
-
emptyText:
|
|
517
|
+
emptyText: '暂无数据'
|
|
517
518
|
}
|
|
518
519
|
});
|
|
519
520
|
};
|
|
@@ -526,15 +527,15 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
526
527
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
527
528
|
visible = _useState4[0],
|
|
528
529
|
setVisible = _useState4[1];
|
|
529
|
-
var _useState5 = useState(
|
|
530
|
+
var _useState5 = useState(''),
|
|
530
531
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
531
532
|
fileUrl = _useState6[0],
|
|
532
533
|
setFileUrl = _useState6[1];
|
|
533
|
-
var _useState7 = useState(
|
|
534
|
+
var _useState7 = useState(''),
|
|
534
535
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
535
536
|
fileType = _useState8[0],
|
|
536
537
|
setFileType = _useState8[1];
|
|
537
|
-
var _useState9 = useState(
|
|
538
|
+
var _useState9 = useState(''),
|
|
538
539
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
539
540
|
fileName = _useState10[0],
|
|
540
541
|
setFileName = _useState10[1];
|
|
@@ -543,24 +544,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
543
544
|
downloading = _useState12[0],
|
|
544
545
|
setDownloading = _useState12[1];
|
|
545
546
|
var handleCancel = function handleCancel() {
|
|
546
|
-
setFileUrl(
|
|
547
|
-
setFileName(
|
|
547
|
+
setFileUrl('');
|
|
548
|
+
setFileName('');
|
|
548
549
|
setVisible(false);
|
|
549
550
|
setDownloading(false);
|
|
550
551
|
};
|
|
551
552
|
var onPreview = function onPreview(file) {
|
|
552
553
|
var _file$url;
|
|
553
|
-
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split(
|
|
554
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
554
555
|
var fileType = fileArr[fileArr.length - 1];
|
|
555
|
-
if ([
|
|
556
|
+
if (['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg'].includes(fileType.toLowerCase())) {
|
|
556
557
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
557
558
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
558
|
-
setFileType(
|
|
559
|
+
setFileType('pic');
|
|
559
560
|
setVisible(true);
|
|
560
|
-
} else if ([
|
|
561
|
+
} else if (['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'].includes(fileType.toLowerCase())) {
|
|
561
562
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
562
563
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
563
|
-
setFileType(
|
|
564
|
+
setFileType('video');
|
|
564
565
|
setVisible(true);
|
|
565
566
|
} else {
|
|
566
567
|
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
@@ -571,9 +572,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
571
572
|
fetch(url).then(function (res) {
|
|
572
573
|
return res.blob();
|
|
573
574
|
}).then(function (blob) {
|
|
574
|
-
var a = document.createElement(
|
|
575
|
+
var a = document.createElement('a');
|
|
575
576
|
document.body.appendChild(a);
|
|
576
|
-
a.style.display =
|
|
577
|
+
a.style.display = 'none';
|
|
577
578
|
var url = window.URL.createObjectURL(blob);
|
|
578
579
|
a.href = url;
|
|
579
580
|
a.download = name;
|
|
@@ -587,9 +588,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
587
588
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (item) {
|
|
588
589
|
return /*#__PURE__*/React.createElement("a", {
|
|
589
590
|
style: {
|
|
590
|
-
color:
|
|
591
|
-
cursor:
|
|
592
|
-
display:
|
|
591
|
+
color: '#1890ff',
|
|
592
|
+
cursor: 'pointer',
|
|
593
|
+
display: 'block'
|
|
593
594
|
},
|
|
594
595
|
onClick: function onClick(e) {
|
|
595
596
|
e.preventDefault();
|
|
@@ -611,20 +612,20 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
611
612
|
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
612
613
|
text: fileUrl,
|
|
613
614
|
onCopy: function onCopy() {
|
|
614
|
-
message.success(
|
|
615
|
+
message.success('复制成功');
|
|
615
616
|
}
|
|
616
617
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
617
618
|
type: "link"
|
|
618
|
-
}, "\u4E0B\u8F7D\u5730\u5740")), fileType ===
|
|
619
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
|
|
619
620
|
alt: "example",
|
|
620
621
|
style: {
|
|
621
|
-
width:
|
|
622
|
+
width: '100%'
|
|
622
623
|
},
|
|
623
624
|
src: fileUrl
|
|
624
625
|
}) : /*#__PURE__*/React.createElement("video", {
|
|
625
626
|
style: {
|
|
626
|
-
width:
|
|
627
|
-
height:
|
|
627
|
+
width: '100%',
|
|
628
|
+
height: '100%'
|
|
628
629
|
},
|
|
629
630
|
autoPlay: true,
|
|
630
631
|
controls: true,
|
|
@@ -644,18 +645,18 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
644
645
|
JST_SYSTEM_ORDER: JST_SYSTEM_ORDER_CONFIG.columns
|
|
645
646
|
};
|
|
646
647
|
var rowKeyMap = {
|
|
647
|
-
BS_SYSTEM_ORDER:
|
|
648
|
-
KM_SYSTEM_ORDER:
|
|
649
|
-
WLN_SYSTEM_ORDER:
|
|
650
|
-
WDT_SYSTEM_ORDER:
|
|
651
|
-
BS_E3_SYSTEM_ORDER:
|
|
652
|
-
GY_SYSTEM_ORDER:
|
|
653
|
-
JST_SYSTEM_ORDER:
|
|
648
|
+
BS_SYSTEM_ORDER: 'billNo',
|
|
649
|
+
KM_SYSTEM_ORDER: 'billNo',
|
|
650
|
+
WLN_SYSTEM_ORDER: 'billNo',
|
|
651
|
+
WDT_SYSTEM_ORDER: 'billNo',
|
|
652
|
+
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
653
|
+
GY_SYSTEM_ORDER: 'billNo',
|
|
654
|
+
JST_SYSTEM_ORDER: 'oId'
|
|
654
655
|
};
|
|
655
656
|
var rowSelection = {
|
|
656
657
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || ((value === null || value === void 0 ? void 0 : value.showOrderInfo) || []).reduce(function (prv, next) {
|
|
657
658
|
if (next.select) {
|
|
658
|
-
prv.push(next[rowKeyMap[type]] ||
|
|
659
|
+
prv.push(next[rowKeyMap[type]] || 'billNo');
|
|
659
660
|
}
|
|
660
661
|
return prv;
|
|
661
662
|
}, []),
|
|
@@ -671,14 +672,14 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
671
672
|
dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
|
|
672
673
|
columns: columnMap[type] || [],
|
|
673
674
|
rowSelection: rowSelection,
|
|
674
|
-
rowKey: rowKeyMap[type] ||
|
|
675
|
+
rowKey: rowKeyMap[type] || 'billNo',
|
|
675
676
|
size: "small",
|
|
676
677
|
pagination: false,
|
|
677
678
|
scroll: {
|
|
678
|
-
x:
|
|
679
|
+
x: '100%'
|
|
679
680
|
},
|
|
680
681
|
locale: {
|
|
681
|
-
emptyText:
|
|
682
|
+
emptyText: '暂无数据'
|
|
682
683
|
}
|
|
683
684
|
});
|
|
684
685
|
};
|
|
@@ -701,13 +702,13 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
701
702
|
var _options$find2;
|
|
702
703
|
return ((_options$find2 = options.find(function (innerItem) {
|
|
703
704
|
return value === innerItem.label || value === innerItem.oldValue;
|
|
704
|
-
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) ||
|
|
705
|
+
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) || '#000';
|
|
705
706
|
};
|
|
706
707
|
var detailContent = function detailContent(item) {
|
|
707
708
|
var _item$msgReceivers;
|
|
708
709
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
709
710
|
style: {
|
|
710
|
-
textAlign:
|
|
711
|
+
textAlign: 'left'
|
|
711
712
|
}
|
|
712
713
|
}, (_item$msgReceivers = item.msgReceivers) !== null && _item$msgReceivers !== void 0 && _item$msgReceivers.length ? item.msgReceivers.map(function (msgItem, index) {
|
|
713
714
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -723,22 +724,22 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
723
724
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", item.failReason)));
|
|
724
725
|
};
|
|
725
726
|
return /*#__PURE__*/React.createElement(Space, {
|
|
726
|
-
direction: !horizontal ?
|
|
727
|
+
direction: !horizontal ? 'vertical' : 'horizontal'
|
|
727
728
|
}, Array.isArray(list) ? (list || []).map(function (item, index) {
|
|
728
729
|
var _item$msgReceivers2;
|
|
729
730
|
var color = getColorByStatus(item[valueKey]);
|
|
730
731
|
var currentOption = options.find(function (option) {
|
|
731
732
|
return item[valueKey] === option.value;
|
|
732
733
|
});
|
|
733
|
-
var key = item.msgType ||
|
|
734
|
+
var key = item.msgType || 'ding';
|
|
734
735
|
var formatMsgContent = /*#__PURE__*/React.createElement("span", {
|
|
735
736
|
key: index
|
|
736
|
-
}, msgTypeCh[key], "-", item.ruleName ? "".concat(item.ruleName, "-") :
|
|
737
|
+
}, msgTypeCh[key], "-", item.ruleName ? "".concat(item.ruleName, "-") : '', currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || '');
|
|
737
738
|
return /*#__PURE__*/React.createElement("div", {
|
|
738
739
|
key: "wrap_".concat(index),
|
|
739
740
|
style: {
|
|
740
741
|
color: color,
|
|
741
|
-
cursor:
|
|
742
|
+
cursor: 'pointer'
|
|
742
743
|
}
|
|
743
744
|
}, (_item$msgReceivers2 = item.msgReceivers) !== null && _item$msgReceivers2 !== void 0 && _item$msgReceivers2.some(function (msgItem) {
|
|
744
745
|
return Array.isArray(failValue) ? failValue.includes(msgItem === null || msgItem === void 0 ? void 0 : msgItem.status) : (msgItem === null || msgItem === void 0 ? void 0 : msgItem.status) === failValue;
|
|
@@ -758,7 +759,7 @@ export var AlipayBill = function AlipayBill(props) {
|
|
|
758
759
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
759
760
|
visible = _useState14[0],
|
|
760
761
|
setVisible = _useState14[1];
|
|
761
|
-
var _useState15 = useState(
|
|
762
|
+
var _useState15 = useState(''),
|
|
762
763
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
763
764
|
msg = _useState16[0],
|
|
764
765
|
setMsg = _useState16[1];
|
|
@@ -783,7 +784,7 @@ export var AlipayBill = function AlipayBill(props) {
|
|
|
783
784
|
data = res.data, msg = res.message;
|
|
784
785
|
if (data) {
|
|
785
786
|
setHasUrl(true);
|
|
786
|
-
if ([
|
|
787
|
+
if (['fxg'].includes(platform)) {
|
|
787
788
|
setMsg(data);
|
|
788
789
|
setVisible(true);
|
|
789
790
|
} else {
|
|
@@ -810,8 +811,8 @@ export var AlipayBill = function AlipayBill(props) {
|
|
|
810
811
|
};
|
|
811
812
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
812
813
|
style: {
|
|
813
|
-
color:
|
|
814
|
-
cursor:
|
|
814
|
+
color: '#1890ff',
|
|
815
|
+
cursor: 'pointer'
|
|
815
816
|
},
|
|
816
817
|
onClick: voucherHandle
|
|
817
818
|
}, value), /*#__PURE__*/React.createElement(Modal, {
|
|
@@ -819,7 +820,50 @@ export var AlipayBill = function AlipayBill(props) {
|
|
|
819
820
|
visible: visible,
|
|
820
821
|
footer: false,
|
|
821
822
|
onCancel: closeHandle
|
|
822
|
-
}, [
|
|
823
|
+
}, ['fxg'].includes(platform) && hasUrl ? /*#__PURE__*/React.createElement("div", null, "\u8BF7\u590D\u5236\u94FE\u63A5\u5728\u6D4F\u89C8\u5668\u4E0A\u6253\u5F00\uFF0C\u94FE\u63A5\uFF1A", /*#__PURE__*/React.createElement(Paragraph, {
|
|
823
824
|
copyable: true
|
|
824
825
|
}, msg)) : msg));
|
|
826
|
+
};
|
|
827
|
+
export var RenderPicturePro = function RenderPicturePro(props) {
|
|
828
|
+
var list = props.list,
|
|
829
|
+
hostUrl = props.hostUrl;
|
|
830
|
+
var copyText = list.map(function (item) {
|
|
831
|
+
return item.name;
|
|
832
|
+
}).join(',');
|
|
833
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
834
|
+
className: "pictureProClient"
|
|
835
|
+
}, list.map(function (item) {
|
|
836
|
+
var finalImage = "".concat(/^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url, "?x-oss-process=image/resize,h_60,w_60");
|
|
837
|
+
var showImage = /^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url;
|
|
838
|
+
var downloadHandle = function downloadHandle() {
|
|
839
|
+
window.open("".concat(hostUrl, "/").concat(item.url));
|
|
840
|
+
};
|
|
841
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
842
|
+
key: item.url,
|
|
843
|
+
className: "pictureProBox"
|
|
844
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
845
|
+
className: "pictureProLeft"
|
|
846
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
847
|
+
src: finalImage,
|
|
848
|
+
preview: {
|
|
849
|
+
src: showImage
|
|
850
|
+
},
|
|
851
|
+
width: '100%',
|
|
852
|
+
height: '100%'
|
|
853
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
854
|
+
title: item.name
|
|
855
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
856
|
+
className: "pictureProText"
|
|
857
|
+
}, item.name)), /*#__PURE__*/React.createElement("div", {
|
|
858
|
+
className: "pictureProOperate"
|
|
859
|
+
}, /*#__PURE__*/React.createElement(DownloadOutlined, {
|
|
860
|
+
className: "downloadIcon",
|
|
861
|
+
onClick: downloadHandle
|
|
862
|
+
}))));
|
|
863
|
+
}), /*#__PURE__*/React.createElement(Paragraph, {
|
|
864
|
+
copyable: {
|
|
865
|
+
text: copyText
|
|
866
|
+
},
|
|
867
|
+
className: "copyText"
|
|
868
|
+
}, "\u590D\u5236"));
|
|
825
869
|
};
|