@kmkf-fe-packages/services-components 2.0.55 → 2.0.57

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