@kmkf-fe-packages/services-components 0.24.0-alpha.2 → 0.24.0-alpha.6

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