@kmkf-fe-packages/services-components 0.29.0 → 0.29.1-rc.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/README.md +0 -1
- package/dist/esm/commonComponents/CopyText/index.d.ts +6 -0
- package/dist/esm/commonComponents/CopyText/index.js +12 -0
- package/dist/esm/commonComponents/PlatBuyer/index.d.ts +1 -1
- package/dist/esm/commonComponents/PlatBuyer/index.js +4 -17
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +1 -1
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +18 -15
- package/dist/esm/components/Common/index.d.ts +1 -1
- package/dist/esm/components/Common/index.js +182 -175
- package/dist/esm/components/CommonTradeId/index.d.ts +5 -6
- package/dist/esm/components/CommonTradeId/index.js +12 -25
- package/dist/esm/components/ExpressCode/index.d.ts +2 -2
- package/dist/esm/components/ExpressCode/index.js +6 -4
- package/dist/esm/components/FlowWorkOrderId/index.d.ts +2 -3
- package/dist/esm/components/FlowWorkOrderId/index.js +4 -18
- package/dist/esm/components/LogisticsInterception/InterceptState.d.ts +37 -0
- package/dist/esm/components/LogisticsInterception/InterceptState.js +89 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +4 -16
- package/dist/esm/components/LogisticsInterception/index.js +11 -6
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +13 -13
- package/dist/esm/components/LogisticsMoreInterception/index.js +14 -14
- package/dist/esm/components/LogisticsMoreInterception/{interceptItem.d.ts → interceptCode.d.ts} +2 -2
- package/dist/esm/components/LogisticsMoreInterception/{interceptItem.js → interceptCode.js} +7 -4
- package/dist/esm/components/Payment/PaymentTid.d.ts +1 -2
- package/dist/esm/components/Payment/PaymentTid.js +4 -18
- package/dist/esm/components/TradeId/index.d.ts +0 -1
- package/dist/esm/components/TradeId/index.js +4 -18
- package/dist/esm/components/WorkOrderId/index.d.ts +2 -3
- package/dist/esm/components/WorkOrderId/index.js +4 -18
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +1 -4
- package/dist/esm/index.d.ts +3 -3
- package/package.json +4 -4
|
@@ -12,13 +12,14 @@ 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 React, { useState, useMemo } from
|
|
17
|
-
import { ExpressData } from
|
|
15
|
+
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Typography } from 'antd';
|
|
16
|
+
import React, { useState, useMemo } from 'react';
|
|
17
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
18
|
import { getAlipayBillReceipt } from "../../service/api";
|
|
19
|
-
import { CopyToClipboard } from
|
|
19
|
+
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
20
20
|
import styles from "./index.module.less";
|
|
21
21
|
import defaultImg from "./img/default-img.png";
|
|
22
|
+
import CopyText from "../../commonComponents/CopyText";
|
|
22
23
|
var Paragraph = Typography.Paragraph;
|
|
23
24
|
export var getFormItem = function getFormItem(_ref) {
|
|
24
25
|
var name = _ref.name,
|
|
@@ -37,7 +38,7 @@ export var getFormItem = function getFormItem(_ref) {
|
|
|
37
38
|
return /*#__PURE__*/React.createElement("div", {
|
|
38
39
|
className: "form-item--wrap",
|
|
39
40
|
style: {
|
|
40
|
-
position:
|
|
41
|
+
position: 'relative'
|
|
41
42
|
}
|
|
42
43
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
43
44
|
name: name,
|
|
@@ -52,58 +53,58 @@ export var showImage = function showImage(_ref2) {
|
|
|
52
53
|
type = _ref2.type,
|
|
53
54
|
index = _ref2.index,
|
|
54
55
|
showHeader = _ref2.showHeader;
|
|
55
|
-
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !==
|
|
56
|
+
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
|
|
56
57
|
return /*#__PURE__*/React.createElement("div", {
|
|
57
58
|
className: styles.goodImgBox,
|
|
58
59
|
key: index
|
|
59
|
-
}, type ===
|
|
60
|
+
}, type === 'itemCode' && !showHeader.includes('picUrl') ? null : (item === null || item === void 0 ? void 0 : item.platform) === 'taobao' ? /*#__PURE__*/React.createElement("a", {
|
|
60
61
|
target: "_blank",
|
|
61
|
-
href: item.numIid ? "https://item.taobao.com/item.htm?id=".concat(item.numIid) :
|
|
62
|
+
href: item.numIid ? "https://item.taobao.com/item.htm?id=".concat(item.numIid) : 'javascript:void(0);'
|
|
62
63
|
}, /*#__PURE__*/React.createElement("img", {
|
|
63
64
|
style: {
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
66
|
-
objectFit:
|
|
65
|
+
width: '40px',
|
|
66
|
+
height: '40px',
|
|
67
|
+
objectFit: 'contain'
|
|
67
68
|
},
|
|
68
69
|
src: picUrl
|
|
69
70
|
})) : /*#__PURE__*/React.createElement("img", {
|
|
70
71
|
style: {
|
|
71
|
-
width:
|
|
72
|
-
height:
|
|
73
|
-
objectFit:
|
|
72
|
+
width: '40px',
|
|
73
|
+
height: '40px',
|
|
74
|
+
objectFit: 'contain'
|
|
74
75
|
},
|
|
75
76
|
src: picUrl
|
|
76
77
|
}), /*#__PURE__*/React.createElement("div", {
|
|
77
78
|
className: styles.options
|
|
78
|
-
}, type ===
|
|
79
|
-
title:
|
|
79
|
+
}, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
80
|
+
title: '商品id',
|
|
80
81
|
text: item.numIid
|
|
81
|
-
}), type ===
|
|
82
|
-
title:
|
|
82
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(React.Fragment, null, showHeader.includes('title') && /*#__PURE__*/React.createElement(TextTool, {
|
|
83
|
+
title: '商品名称',
|
|
83
84
|
text: item.title
|
|
84
|
-
}), showHeader.includes(
|
|
85
|
-
title:
|
|
85
|
+
}), showHeader.includes('outerId') && /*#__PURE__*/React.createElement(TextTool, {
|
|
86
|
+
title: '商品编码',
|
|
86
87
|
text: item.outerId
|
|
87
|
-
}), showHeader.includes(
|
|
88
|
-
title:
|
|
88
|
+
}), showHeader.includes('numIid') && /*#__PURE__*/React.createElement(TextTool, {
|
|
89
|
+
title: '商品id',
|
|
89
90
|
text: item.numIid
|
|
90
|
-
}), showHeader.includes(
|
|
91
|
-
title:
|
|
91
|
+
}), showHeader.includes('skuId') && /*#__PURE__*/React.createElement(TextTool, {
|
|
92
|
+
title: 'SKU ID',
|
|
92
93
|
text: item.skuId
|
|
93
|
-
}), showHeader.includes(
|
|
94
|
-
title:
|
|
94
|
+
}), showHeader.includes('outerSkuId') && /*#__PURE__*/React.createElement(TextTool, {
|
|
95
|
+
title: 'SKU 编码',
|
|
95
96
|
text: item.outerSkuId
|
|
96
|
-
}), showHeader.includes(
|
|
97
|
-
title:
|
|
97
|
+
}), showHeader.includes('propertiesName') && /*#__PURE__*/React.createElement(TextTool, {
|
|
98
|
+
title: 'SKU 信息',
|
|
98
99
|
text: item.propertiesName
|
|
99
|
-
})), (type ===
|
|
100
|
-
title:
|
|
100
|
+
})), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
101
|
+
title: '供应商编码',
|
|
101
102
|
text: item.itemId || item.supplierItemOuterId
|
|
102
|
-
}), (type ===
|
|
103
|
-
title:
|
|
103
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
104
|
+
title: '供应商名称',
|
|
104
105
|
text: item.supplierName
|
|
105
|
-
}), type !==
|
|
106
|
-
title:
|
|
106
|
+
}), type !== 'itemCode' && item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
107
|
+
title: '规格',
|
|
107
108
|
text: item.propertiesName
|
|
108
109
|
})));
|
|
109
110
|
};
|
|
@@ -116,9 +117,9 @@ var TextTool = function TextTool(_ref3) {
|
|
|
116
117
|
title: text
|
|
117
118
|
}, /*#__PURE__*/React.createElement("div", {
|
|
118
119
|
style: {
|
|
119
|
-
overflow:
|
|
120
|
-
whiteSpace:
|
|
121
|
-
textOverflow:
|
|
120
|
+
overflow: 'hidden',
|
|
121
|
+
whiteSpace: 'nowrap',
|
|
122
|
+
textOverflow: 'ellipsis'
|
|
122
123
|
}
|
|
123
124
|
}, title, ":", text));
|
|
124
125
|
};
|
|
@@ -148,62 +149,62 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
148
149
|
title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
|
|
149
150
|
}, /*#__PURE__*/React.createElement("div", {
|
|
150
151
|
style: {
|
|
151
|
-
display:
|
|
152
|
-
flexWrap:
|
|
152
|
+
display: 'flex',
|
|
153
|
+
flexWrap: 'wrap'
|
|
153
154
|
}
|
|
154
155
|
}, allImage.map(function (i, index) {
|
|
155
156
|
return /*#__PURE__*/React.createElement("div", {
|
|
156
157
|
style: {
|
|
157
|
-
width:
|
|
158
|
+
width: '50%'
|
|
158
159
|
},
|
|
159
160
|
key: index
|
|
160
|
-
}, type ===
|
|
161
|
-
href: i.link || ((i === null || i === void 0 ? void 0 : i.platform) ===
|
|
161
|
+
}, type === 'itemCode' && !showHeader.includes('picUrl') ? null : /*#__PURE__*/React.createElement("a", {
|
|
162
|
+
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);'),
|
|
162
163
|
target: "__blank",
|
|
163
164
|
style: {
|
|
164
|
-
marginRight:
|
|
165
|
-
marginTop:
|
|
166
|
-
padding:
|
|
167
|
-
border:
|
|
168
|
-
display:
|
|
165
|
+
marginRight: '12px',
|
|
166
|
+
marginTop: '8px',
|
|
167
|
+
padding: '2px',
|
|
168
|
+
border: '1px dashed #ccc',
|
|
169
|
+
display: 'inline-block'
|
|
169
170
|
}
|
|
170
171
|
}, /*#__PURE__*/React.createElement("img", {
|
|
171
172
|
alt: "",
|
|
172
173
|
src: i.picUrl || defaultImg,
|
|
173
174
|
style: {
|
|
174
|
-
width:
|
|
175
|
-
height:
|
|
176
|
-
objectFit:
|
|
175
|
+
width: '72px',
|
|
176
|
+
height: '72px',
|
|
177
|
+
objectFit: 'contain'
|
|
177
178
|
}
|
|
178
|
-
})), /*#__PURE__*/React.createElement("div", null, type ===
|
|
179
|
-
title:
|
|
179
|
+
})), /*#__PURE__*/React.createElement("div", null, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
180
|
+
title: '商品id',
|
|
180
181
|
text: i.numIid
|
|
181
|
-
}), type ===
|
|
182
|
-
title:
|
|
182
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(React.Fragment, null, showHeader.includes('title') && /*#__PURE__*/React.createElement(TextTool, {
|
|
183
|
+
title: '商品名称',
|
|
183
184
|
text: i.title
|
|
184
|
-
}), showHeader.includes(
|
|
185
|
-
title:
|
|
185
|
+
}), showHeader.includes('outerId') && /*#__PURE__*/React.createElement(TextTool, {
|
|
186
|
+
title: '商品编码',
|
|
186
187
|
text: i.outerId
|
|
187
|
-
}), showHeader.includes(
|
|
188
|
-
title:
|
|
188
|
+
}), showHeader.includes('numIid') && /*#__PURE__*/React.createElement(TextTool, {
|
|
189
|
+
title: '商品id',
|
|
189
190
|
text: i.numIid
|
|
190
|
-
}), showHeader.includes(
|
|
191
|
-
title:
|
|
191
|
+
}), showHeader.includes('skuId') && /*#__PURE__*/React.createElement(TextTool, {
|
|
192
|
+
title: 'SKU ID',
|
|
192
193
|
text: i.skuId
|
|
193
|
-
}), showHeader.includes(
|
|
194
|
-
title:
|
|
194
|
+
}), showHeader.includes('outerSkuId') && /*#__PURE__*/React.createElement(TextTool, {
|
|
195
|
+
title: 'SKU 编码',
|
|
195
196
|
text: i.outerSkuId
|
|
196
|
-
}), showHeader.includes(
|
|
197
|
-
title:
|
|
197
|
+
}), showHeader.includes('propertiesName') && /*#__PURE__*/React.createElement(TextTool, {
|
|
198
|
+
title: 'SKU 信息',
|
|
198
199
|
text: i.propertiesName
|
|
199
|
-
})), (type ===
|
|
200
|
-
title:
|
|
200
|
+
})), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
201
|
+
title: '供应商编码',
|
|
201
202
|
text: i.itemId || i.supplierItemOuterId
|
|
202
|
-
}), (type ===
|
|
203
|
-
title:
|
|
203
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
204
|
+
title: '供应商名称',
|
|
204
205
|
text: i.supplierName
|
|
205
|
-
}), type !==
|
|
206
|
-
title:
|
|
206
|
+
}), type !== 'itemCode' && i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
207
|
+
title: '规格',
|
|
207
208
|
text: i.propertiesName
|
|
208
209
|
})));
|
|
209
210
|
}))));
|
|
@@ -213,14 +214,14 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
213
214
|
var _list$slice;
|
|
214
215
|
var list = _ref5.list,
|
|
215
216
|
_ref5$type = _ref5.type,
|
|
216
|
-
type = _ref5$type === void 0 ?
|
|
217
|
+
type = _ref5$type === void 0 ? '' : _ref5$type,
|
|
217
218
|
_ref5$showHeader = _ref5.showHeader,
|
|
218
219
|
showHeader = _ref5$showHeader === void 0 ? [] : _ref5$showHeader;
|
|
219
220
|
var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
|
|
220
221
|
var initShowTotal = 3;
|
|
221
222
|
return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
222
223
|
style: {
|
|
223
|
-
display: type ===
|
|
224
|
+
display: type === 'itemSelect' ? 'flex' : 'block'
|
|
224
225
|
}
|
|
225
226
|
}, 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) {
|
|
226
227
|
return showImage({
|
|
@@ -239,7 +240,7 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
239
240
|
var content = function content(item, index) {
|
|
240
241
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
241
242
|
style: {
|
|
242
|
-
textAlign:
|
|
243
|
+
textAlign: 'center'
|
|
243
244
|
}
|
|
244
245
|
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
245
246
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -266,17 +267,21 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
266
267
|
}, /*#__PURE__*/React.createElement("span", {
|
|
267
268
|
key: index,
|
|
268
269
|
style: {
|
|
269
|
-
color:
|
|
270
|
-
cursor:
|
|
270
|
+
color: '#1890ff',
|
|
271
|
+
cursor: 'pointer'
|
|
271
272
|
}
|
|
272
|
-
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ?
|
|
273
|
+
}, "\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, {
|
|
274
|
+
text: item.logisticsCode
|
|
275
|
+
})) : company ? company : /*#__PURE__*/React.createElement(CopyText, {
|
|
276
|
+
text: item.logisticsCode
|
|
277
|
+
})) : 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));
|
|
273
278
|
}) : null;
|
|
274
279
|
};
|
|
275
280
|
export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
276
281
|
var _ref7$list = _ref7.list,
|
|
277
282
|
list = _ref7$list === void 0 ? [] : _ref7$list,
|
|
278
283
|
_ref7$showField = _ref7.showField,
|
|
279
|
-
showField = _ref7$showField === void 0 ?
|
|
284
|
+
showField = _ref7$showField === void 0 ? '' : _ref7$showField;
|
|
280
285
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
281
286
|
var logisticsCompany = item.logisticsCompany;
|
|
282
287
|
var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
|
|
@@ -288,10 +293,12 @@ export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
|
288
293
|
}, /*#__PURE__*/React.createElement("span", {
|
|
289
294
|
key: index,
|
|
290
295
|
style: {
|
|
291
|
-
color:
|
|
292
|
-
cursor:
|
|
296
|
+
color: '#1890ff',
|
|
297
|
+
cursor: 'pointer'
|
|
293
298
|
}
|
|
294
|
-
}, "\u5305\u88F9", ":")), showField ===
|
|
299
|
+
}, "\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, {
|
|
300
|
+
text: item.logisticsCode
|
|
301
|
+
}) : null) : null));
|
|
295
302
|
}) : null;
|
|
296
303
|
};
|
|
297
304
|
export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
@@ -304,7 +311,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
304
311
|
var orderContent = function orderContent(item, index) {
|
|
305
312
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
306
313
|
style: {
|
|
307
|
-
textAlign:
|
|
314
|
+
textAlign: 'center'
|
|
308
315
|
}
|
|
309
316
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId));
|
|
310
317
|
};
|
|
@@ -312,7 +319,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
312
319
|
var _options$find;
|
|
313
320
|
var color = ((_options$find = options.find(function (it) {
|
|
314
321
|
return item[valueKey] === it.value;
|
|
315
|
-
})) === null || _options$find === void 0 ? void 0 : _options$find.color) ||
|
|
322
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.color) || '#000';
|
|
316
323
|
var currentOption = options.find(function (option) {
|
|
317
324
|
return item[valueKey] === option.value;
|
|
318
325
|
});
|
|
@@ -324,14 +331,14 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
324
331
|
}, /*#__PURE__*/React.createElement("span", {
|
|
325
332
|
key: index,
|
|
326
333
|
style: {
|
|
327
|
-
color:
|
|
328
|
-
cursor:
|
|
334
|
+
color: '#1890ff',
|
|
335
|
+
cursor: 'pointer'
|
|
329
336
|
}
|
|
330
337
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1), ":")), /*#__PURE__*/React.createElement("span", {
|
|
331
338
|
style: {
|
|
332
339
|
color: color
|
|
333
340
|
}
|
|
334
|
-
}, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) ||
|
|
341
|
+
}, 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", {
|
|
335
342
|
className: "c-red"
|
|
336
343
|
}, item.reason));
|
|
337
344
|
}) : null;
|
|
@@ -343,22 +350,22 @@ export var BsGoodImage = function BsGoodImage(_ref9) {
|
|
|
343
350
|
index = _ref9.index;
|
|
344
351
|
var picUrl = item.picUrl || defaultImg;
|
|
345
352
|
var keyMap = {
|
|
346
|
-
name:
|
|
347
|
-
code:
|
|
348
|
-
skuId:
|
|
349
|
-
money:
|
|
350
|
-
number:
|
|
351
|
-
share:
|
|
352
|
-
type:
|
|
353
|
+
name: 'bs名称',
|
|
354
|
+
code: 'bs编码',
|
|
355
|
+
skuId: 'bssku编码',
|
|
356
|
+
money: 'bs实付金额',
|
|
357
|
+
number: 'bs数量',
|
|
358
|
+
share: 'bs分摊价',
|
|
359
|
+
type: 'bs赠品类型'
|
|
353
360
|
};
|
|
354
361
|
return /*#__PURE__*/React.createElement("div", {
|
|
355
362
|
className: styles.goodImgBox,
|
|
356
363
|
key: index
|
|
357
364
|
}, /*#__PURE__*/React.createElement("img", {
|
|
358
365
|
style: {
|
|
359
|
-
width:
|
|
360
|
-
height:
|
|
361
|
-
objectFit:
|
|
366
|
+
width: '40px',
|
|
367
|
+
height: '40px',
|
|
368
|
+
objectFit: 'contain'
|
|
362
369
|
},
|
|
363
370
|
src: picUrl
|
|
364
371
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -380,11 +387,11 @@ export var BsExchangeList = function BsExchangeList(_ref10) {
|
|
|
380
387
|
return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
|
|
381
388
|
list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
|
|
382
389
|
showHeader: showHeader,
|
|
383
|
-
text:
|
|
390
|
+
text: '退回'
|
|
384
391
|
}), BsGoodsTable({
|
|
385
392
|
list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
|
|
386
393
|
showHeader: showHeader,
|
|
387
|
-
text:
|
|
394
|
+
text: '换出'
|
|
388
395
|
}));
|
|
389
396
|
}));
|
|
390
397
|
};
|
|
@@ -412,21 +419,21 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
412
419
|
switch (type) {
|
|
413
420
|
case 'ITEM_ENCODE':
|
|
414
421
|
columns = [{
|
|
415
|
-
dataIndex:
|
|
416
|
-
title:
|
|
417
|
-
align:
|
|
422
|
+
dataIndex: 'title',
|
|
423
|
+
title: '商品名称',
|
|
424
|
+
align: 'center',
|
|
418
425
|
ellipsis: true,
|
|
419
426
|
width: 200
|
|
420
427
|
}, {
|
|
421
|
-
dataIndex:
|
|
422
|
-
title:
|
|
423
|
-
align:
|
|
428
|
+
dataIndex: 'outerId',
|
|
429
|
+
title: '商品编码',
|
|
430
|
+
align: 'center',
|
|
424
431
|
ellipsis: true,
|
|
425
432
|
width: 140
|
|
426
433
|
}, {
|
|
427
|
-
dataIndex:
|
|
428
|
-
title:
|
|
429
|
-
align:
|
|
434
|
+
dataIndex: 'picUrl',
|
|
435
|
+
title: '图片',
|
|
436
|
+
align: 'center',
|
|
430
437
|
ellipsis: true,
|
|
431
438
|
width: 100,
|
|
432
439
|
render: function render(val) {
|
|
@@ -436,27 +443,27 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
436
443
|
});
|
|
437
444
|
}
|
|
438
445
|
}, {
|
|
439
|
-
dataIndex:
|
|
440
|
-
title:
|
|
441
|
-
align:
|
|
446
|
+
dataIndex: 'numIid',
|
|
447
|
+
title: '商品id',
|
|
448
|
+
align: 'center',
|
|
442
449
|
ellipsis: true,
|
|
443
450
|
width: 200
|
|
444
451
|
}, {
|
|
445
|
-
dataIndex:
|
|
446
|
-
title:
|
|
447
|
-
align:
|
|
452
|
+
dataIndex: 'skuId',
|
|
453
|
+
title: 'SKU ID',
|
|
454
|
+
align: 'center',
|
|
448
455
|
ellipsis: true,
|
|
449
456
|
width: 200
|
|
450
457
|
}, {
|
|
451
|
-
dataIndex:
|
|
452
|
-
title:
|
|
453
|
-
align:
|
|
458
|
+
dataIndex: 'outerSkuId',
|
|
459
|
+
title: 'SKU 编码',
|
|
460
|
+
align: 'center',
|
|
454
461
|
ellipsis: true,
|
|
455
462
|
width: 100
|
|
456
463
|
}, {
|
|
457
|
-
dataIndex:
|
|
458
|
-
title:
|
|
459
|
-
align:
|
|
464
|
+
dataIndex: 'propertiesName',
|
|
465
|
+
title: 'SKU 信息',
|
|
466
|
+
align: 'center',
|
|
460
467
|
ellipsis: true,
|
|
461
468
|
width: 200
|
|
462
469
|
}];
|
|
@@ -636,7 +643,7 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
636
643
|
return COLUMNS_INFO(type);
|
|
637
644
|
};
|
|
638
645
|
// const GOODS_INFO_COLUMNS = (text = '') => {
|
|
639
|
-
// return
|
|
646
|
+
// return
|
|
640
647
|
// }
|
|
641
648
|
var newColumns = useMemo(function () {
|
|
642
649
|
var columnList = [{
|
|
@@ -676,15 +683,15 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
676
683
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
677
684
|
visible = _useState4[0],
|
|
678
685
|
setVisible = _useState4[1];
|
|
679
|
-
var _useState5 = useState(
|
|
686
|
+
var _useState5 = useState(''),
|
|
680
687
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
681
688
|
fileUrl = _useState6[0],
|
|
682
689
|
setFileUrl = _useState6[1];
|
|
683
|
-
var _useState7 = useState(
|
|
690
|
+
var _useState7 = useState(''),
|
|
684
691
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
685
692
|
fileType = _useState8[0],
|
|
686
693
|
setFileType = _useState8[1];
|
|
687
|
-
var _useState9 = useState(
|
|
694
|
+
var _useState9 = useState(''),
|
|
688
695
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
689
696
|
fileName = _useState10[0],
|
|
690
697
|
setFileName = _useState10[1];
|
|
@@ -693,24 +700,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
693
700
|
downloading = _useState12[0],
|
|
694
701
|
setDownloading = _useState12[1];
|
|
695
702
|
var handleCancel = function handleCancel() {
|
|
696
|
-
setFileUrl(
|
|
697
|
-
setFileName(
|
|
703
|
+
setFileUrl('');
|
|
704
|
+
setFileName('');
|
|
698
705
|
setVisible(false);
|
|
699
706
|
setDownloading(false);
|
|
700
707
|
};
|
|
701
708
|
var onPreview = function onPreview(file) {
|
|
702
709
|
var _file$url;
|
|
703
|
-
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split(
|
|
710
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
704
711
|
var fileType = fileArr[fileArr.length - 1];
|
|
705
|
-
if ([
|
|
712
|
+
if (['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg'].includes(fileType.toLowerCase())) {
|
|
706
713
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
707
714
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
708
|
-
setFileType(
|
|
715
|
+
setFileType('pic');
|
|
709
716
|
setVisible(true);
|
|
710
|
-
} else if ([
|
|
717
|
+
} else if (['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'].includes(fileType.toLowerCase())) {
|
|
711
718
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
712
719
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
713
|
-
setFileType(
|
|
720
|
+
setFileType('video');
|
|
714
721
|
setVisible(true);
|
|
715
722
|
} else {
|
|
716
723
|
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
@@ -721,9 +728,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
721
728
|
fetch(url).then(function (res) {
|
|
722
729
|
return res.blob();
|
|
723
730
|
}).then(function (blob) {
|
|
724
|
-
var a = document.createElement(
|
|
731
|
+
var a = document.createElement('a');
|
|
725
732
|
document.body.appendChild(a);
|
|
726
|
-
a.style.display =
|
|
733
|
+
a.style.display = 'none';
|
|
727
734
|
var url = window.URL.createObjectURL(blob);
|
|
728
735
|
a.href = url;
|
|
729
736
|
a.download = name;
|
|
@@ -737,9 +744,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
737
744
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (item) {
|
|
738
745
|
return /*#__PURE__*/React.createElement("a", {
|
|
739
746
|
style: {
|
|
740
|
-
color:
|
|
741
|
-
cursor:
|
|
742
|
-
display:
|
|
747
|
+
color: '#1890ff',
|
|
748
|
+
cursor: 'pointer',
|
|
749
|
+
display: 'block'
|
|
743
750
|
},
|
|
744
751
|
onClick: function onClick(e) {
|
|
745
752
|
e.preventDefault();
|
|
@@ -761,20 +768,20 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
761
768
|
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
762
769
|
text: fileUrl,
|
|
763
770
|
onCopy: function onCopy() {
|
|
764
|
-
message.success(
|
|
771
|
+
message.success('复制成功');
|
|
765
772
|
}
|
|
766
773
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
767
774
|
type: "link"
|
|
768
|
-
}, "\u4E0B\u8F7D\u5730\u5740")), fileType ===
|
|
775
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
|
|
769
776
|
alt: "example",
|
|
770
777
|
style: {
|
|
771
|
-
width:
|
|
778
|
+
width: '100%'
|
|
772
779
|
},
|
|
773
780
|
src: fileUrl
|
|
774
781
|
}) : /*#__PURE__*/React.createElement("video", {
|
|
775
782
|
style: {
|
|
776
|
-
width:
|
|
777
|
-
height:
|
|
783
|
+
width: '100%',
|
|
784
|
+
height: '100%'
|
|
778
785
|
},
|
|
779
786
|
autoPlay: true,
|
|
780
787
|
controls: true,
|
|
@@ -786,34 +793,34 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
786
793
|
type = _ref13.type;
|
|
787
794
|
var columnMap = {
|
|
788
795
|
BS_SYSTEM_ORDER: [{
|
|
789
|
-
dataIndex:
|
|
790
|
-
title:
|
|
796
|
+
dataIndex: 'billType',
|
|
797
|
+
title: '订单类型'
|
|
791
798
|
}, {
|
|
792
|
-
dataIndex:
|
|
793
|
-
title:
|
|
799
|
+
dataIndex: 'billNo',
|
|
800
|
+
title: '系统订单号'
|
|
794
801
|
}, {
|
|
795
|
-
dataIndex:
|
|
796
|
-
title:
|
|
802
|
+
dataIndex: 'billTag',
|
|
803
|
+
title: '标记'
|
|
797
804
|
}],
|
|
798
805
|
WLN_SYSTEM_ORDER: [{
|
|
799
|
-
dataIndex:
|
|
800
|
-
title:
|
|
806
|
+
dataIndex: 'billType',
|
|
807
|
+
title: '单据类型'
|
|
801
808
|
}, {
|
|
802
|
-
dataIndex:
|
|
803
|
-
title:
|
|
809
|
+
dataIndex: 'billNo',
|
|
810
|
+
title: '系统订单号'
|
|
804
811
|
}, {
|
|
805
|
-
dataIndex:
|
|
806
|
-
title:
|
|
812
|
+
dataIndex: 'billTag',
|
|
813
|
+
title: '标签'
|
|
807
814
|
}],
|
|
808
815
|
WDT_SYSTEM_ORDER: [{
|
|
809
|
-
dataIndex:
|
|
810
|
-
title:
|
|
816
|
+
dataIndex: 'billType',
|
|
817
|
+
title: '订单类型'
|
|
811
818
|
}, {
|
|
812
|
-
dataIndex:
|
|
813
|
-
title:
|
|
819
|
+
dataIndex: 'billNo',
|
|
820
|
+
title: '系统订单号'
|
|
814
821
|
}, {
|
|
815
|
-
dataIndex:
|
|
816
|
-
title:
|
|
822
|
+
dataIndex: 'billTag',
|
|
823
|
+
title: '订单标签'
|
|
817
824
|
}]
|
|
818
825
|
};
|
|
819
826
|
var rowSelection = {
|
|
@@ -835,14 +842,14 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
835
842
|
dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
|
|
836
843
|
columns: columnMap[type] || [],
|
|
837
844
|
rowSelection: rowSelection,
|
|
838
|
-
rowKey:
|
|
845
|
+
rowKey: 'billNo',
|
|
839
846
|
size: "small",
|
|
840
847
|
pagination: false,
|
|
841
848
|
scroll: {
|
|
842
|
-
x:
|
|
849
|
+
x: '100%'
|
|
843
850
|
},
|
|
844
851
|
locale: {
|
|
845
|
-
emptyText:
|
|
852
|
+
emptyText: '暂无数据'
|
|
846
853
|
}
|
|
847
854
|
});
|
|
848
855
|
};
|
|
@@ -862,33 +869,33 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
862
869
|
_ref14$options = _ref14.options,
|
|
863
870
|
options = _ref14$options === void 0 ? [] : _ref14$options;
|
|
864
871
|
var msgTypeCh = {
|
|
865
|
-
ding:
|
|
866
|
-
wechat:
|
|
867
|
-
qq:
|
|
868
|
-
qywx:
|
|
872
|
+
ding: '钉钉',
|
|
873
|
+
wechat: '微信',
|
|
874
|
+
qq: 'QQ',
|
|
875
|
+
qywx: '企业微信'
|
|
869
876
|
};
|
|
870
877
|
var detailContent = function detailContent(item) {
|
|
871
878
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
872
879
|
style: {
|
|
873
|
-
textAlign:
|
|
880
|
+
textAlign: 'left'
|
|
874
881
|
}
|
|
875
882
|
}, /*#__PURE__*/React.createElement("div", null, item.ruleName)));
|
|
876
883
|
};
|
|
877
884
|
return /*#__PURE__*/React.createElement(Space, {
|
|
878
|
-
direction: !horizontal ?
|
|
885
|
+
direction: !horizontal ? 'vertical' : 'horizontal'
|
|
879
886
|
}, Array.isArray(list) ? (list || []).map(function (item, index) {
|
|
880
887
|
var _options$find2;
|
|
881
888
|
var color = ((_options$find2 = options.find(function (innerItem) {
|
|
882
889
|
return item[valueKey] === innerItem.label;
|
|
883
|
-
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) ||
|
|
890
|
+
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) || '#000';
|
|
884
891
|
var currentOption = options.find(function (option) {
|
|
885
892
|
return item[valueKey] === option.value;
|
|
886
893
|
});
|
|
887
|
-
var key = item.msgType ||
|
|
894
|
+
var key = item.msgType || 'ding';
|
|
888
895
|
return /*#__PURE__*/React.createElement("div", {
|
|
889
896
|
style: {
|
|
890
897
|
color: color,
|
|
891
|
-
cursor:
|
|
898
|
+
cursor: 'pointer'
|
|
892
899
|
}
|
|
893
900
|
}, /*#__PURE__*/React.createElement(Popover, {
|
|
894
901
|
content: detailContent(item),
|
|
@@ -897,7 +904,7 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
897
904
|
}
|
|
898
905
|
}, /*#__PURE__*/React.createElement("span", {
|
|
899
906
|
key: index
|
|
900
|
-
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) ||
|
|
907
|
+
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || '')));
|
|
901
908
|
}) : null);
|
|
902
909
|
};
|
|
903
910
|
//获取付款凭证
|
|
@@ -908,7 +915,7 @@ export var AlipayBill = function AlipayBill(props) {
|
|
|
908
915
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
909
916
|
visible = _useState14[0],
|
|
910
917
|
setVisible = _useState14[1];
|
|
911
|
-
var _useState15 = useState(
|
|
918
|
+
var _useState15 = useState(''),
|
|
912
919
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
913
920
|
msg = _useState16[0],
|
|
914
921
|
setMsg = _useState16[1];
|
|
@@ -933,7 +940,7 @@ export var AlipayBill = function AlipayBill(props) {
|
|
|
933
940
|
data = res.data, msg = res.message;
|
|
934
941
|
if (data) {
|
|
935
942
|
setHasUrl(true);
|
|
936
|
-
if ([
|
|
943
|
+
if (['fxg'].includes(platform)) {
|
|
937
944
|
setMsg(data);
|
|
938
945
|
setVisible(true);
|
|
939
946
|
} else {
|
|
@@ -960,8 +967,8 @@ export var AlipayBill = function AlipayBill(props) {
|
|
|
960
967
|
};
|
|
961
968
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
962
969
|
style: {
|
|
963
|
-
color:
|
|
964
|
-
cursor:
|
|
970
|
+
color: '#1890ff',
|
|
971
|
+
cursor: 'pointer'
|
|
965
972
|
},
|
|
966
973
|
onClick: voucherHandle
|
|
967
974
|
}, value), /*#__PURE__*/React.createElement(Modal, {
|
|
@@ -969,7 +976,7 @@ export var AlipayBill = function AlipayBill(props) {
|
|
|
969
976
|
visible: visible,
|
|
970
977
|
footer: false,
|
|
971
978
|
onCancel: closeHandle
|
|
972
|
-
}, [
|
|
979
|
+
}, ['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, {
|
|
973
980
|
copyable: true
|
|
974
981
|
}, msg)) : msg));
|
|
975
982
|
};
|