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