@kmkf-fe-packages/services-components 0.8.18-alpha.8 → 0.8.19-alpha.0

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,
@@ -45,43 +45,43 @@ export var showImage = function showImage(_ref2) {
45
45
  var item = _ref2.item,
46
46
  type = _ref2.type,
47
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;
48
+ var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
49
49
  return /*#__PURE__*/React.createElement("div", {
50
50
  className: styles.goodImgBox,
51
51
  key: index
52
- }, (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", {
53
53
  target: "_blank",
54
54
  href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
55
55
  }, /*#__PURE__*/React.createElement("img", {
56
56
  style: {
57
- width: "40px",
58
- height: "40px",
59
- objectFit: "contain"
57
+ width: '40px',
58
+ height: '40px',
59
+ objectFit: 'contain'
60
60
  },
61
61
  src: picUrl
62
62
  })) : /*#__PURE__*/React.createElement("img", {
63
63
  style: {
64
- width: "40px",
65
- height: "40px",
66
- objectFit: "contain"
64
+ width: '40px',
65
+ height: '40px',
66
+ objectFit: 'contain'
67
67
  },
68
68
  src: picUrl
69
69
  }), /*#__PURE__*/React.createElement("div", {
70
70
  className: styles.options
71
- }, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
72
- title: "商品id",
71
+ }, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
72
+ title: '商品id',
73
73
  text: item.numIid
74
- }), type === "itemCode" && /*#__PURE__*/React.createElement(TextTool, {
75
- title: "商品编码",
74
+ }), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
75
+ title: '商品编码',
76
76
  text: item.outerId
77
- }), (type === "itemThird" || type === "jstItemThird") && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
78
- title: "供应商编码",
77
+ }), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
78
+ title: '供应商编码',
79
79
  text: item.itemId || item.supplierItemOuterId
80
- }), (type === "itemThird" || type === "jstItemThird") && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
81
- title: "供应商名称",
80
+ }), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
81
+ title: '供应商名称',
82
82
  text: item.supplierName
83
83
  }), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
84
- title: "规格",
84
+ title: '规格',
85
85
  text: item.propertiesName
86
86
  })));
87
87
  };
@@ -94,9 +94,9 @@ var TextTool = function TextTool(_ref3) {
94
94
  title: text
95
95
  }, /*#__PURE__*/React.createElement("div", {
96
96
  style: {
97
- overflow: "hidden",
98
- whiteSpace: "nowrap",
99
- textOverflow: "ellipsis"
97
+ overflow: 'hidden',
98
+ whiteSpace: 'nowrap',
99
+ textOverflow: 'ellipsis'
100
100
  }
101
101
  }, title, ":", text));
102
102
  };
@@ -124,47 +124,47 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
124
124
  title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
125
125
  }, /*#__PURE__*/React.createElement("div", {
126
126
  style: {
127
- display: "flex",
128
- flexWrap: "wrap"
127
+ display: 'flex',
128
+ flexWrap: 'wrap'
129
129
  }
130
130
  }, allImage.map(function (i, index) {
131
131
  return /*#__PURE__*/React.createElement("div", {
132
132
  style: {
133
- width: "50%"
133
+ width: '50%'
134
134
  },
135
135
  key: index
136
136
  }, /*#__PURE__*/React.createElement("a", {
137
137
  href: i.link,
138
138
  target: "__blank",
139
139
  style: {
140
- marginRight: "12px",
141
- marginTop: "8px",
142
- padding: "2px",
143
- border: "1px dashed #ccc",
144
- display: "inline-block"
140
+ marginRight: '12px',
141
+ marginTop: '8px',
142
+ padding: '2px',
143
+ border: '1px dashed #ccc',
144
+ display: 'inline-block'
145
145
  }
146
146
  }, /*#__PURE__*/React.createElement("img", {
147
147
  alt: "",
148
148
  src: i.picUrl || defaultImg,
149
149
  style: {
150
- width: "72px",
151
- height: "72px",
152
- objectFit: "contain"
150
+ width: '72px',
151
+ height: '72px',
152
+ objectFit: 'contain'
153
153
  }
154
- })), /*#__PURE__*/React.createElement("div", null, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
155
- title: "商品id",
154
+ })), /*#__PURE__*/React.createElement("div", null, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
155
+ title: '商品id',
156
156
  text: i.numIid
157
- }), type === "itemCode" && /*#__PURE__*/React.createElement(TextTool, {
158
- title: "商品编码",
157
+ }), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
158
+ title: '商品编码',
159
159
  text: i.outerId
160
- }), (type === "itemThird" || type === "jstItemThird") && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
161
- title: "供应商编码",
160
+ }), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
161
+ title: '供应商编码',
162
162
  text: i.itemId || i.supplierItemOuterId
163
- }), (type === "itemThird" || type === "jstItemThird") && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
164
- title: "供应商名称",
163
+ }), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
164
+ title: '供应商名称',
165
165
  text: i.supplierName
166
166
  }), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
167
- title: "规格",
167
+ title: '规格',
168
168
  text: i.propertiesName
169
169
  })));
170
170
  }))));
@@ -174,12 +174,12 @@ export var GoodImage = function GoodImage(_ref5) {
174
174
  var _list$slice;
175
175
  var list = _ref5.list,
176
176
  _ref5$type = _ref5.type,
177
- type = _ref5$type === void 0 ? "" : _ref5$type;
177
+ type = _ref5$type === void 0 ? '' : _ref5$type;
178
178
  var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
179
179
  var initShowTotal = 3;
180
180
  return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
181
181
  style: {
182
- display: type === "itemSelect" ? "flex" : "block"
182
+ display: type === 'itemSelect' ? 'flex' : 'block'
183
183
  }
184
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) {
185
185
  return showImage({
@@ -196,7 +196,7 @@ export var GoodImage = function GoodImage(_ref5) {
196
196
  var content = function content(item, index) {
197
197
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
198
198
  style: {
199
- textAlign: "center"
199
+ textAlign: 'center'
200
200
  }
201
201
  }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
202
202
  return /*#__PURE__*/React.createElement("div", {
@@ -223,23 +223,45 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
223
223
  }, /*#__PURE__*/React.createElement("span", {
224
224
  key: index,
225
225
  style: {
226
- color: "#1890ff",
227
- cursor: "pointer"
226
+ color: '#1890ff',
227
+ cursor: 'pointer'
228
228
  }
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));
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));
230
230
  }) : null;
231
231
  };
232
- export var CommonOrderContent = function CommonOrderContent(_ref7) {
232
+ export var BsExpressRender = function BsExpressRender(_ref7) {
233
233
  var _ref7$list = _ref7.list,
234
234
  list = _ref7$list === void 0 ? [] : _ref7$list,
235
- valueKey = _ref7.valueKey,
236
- failValue = _ref7.failValue,
237
- _ref7$options = _ref7.options,
238
- options = _ref7$options === void 0 ? [] : _ref7$options;
235
+ _ref7$showField = _ref7.showField,
236
+ showField = _ref7$showField === void 0 ? '' : _ref7$showField;
237
+ return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
238
+ var logisticsCompany = item.logisticsCompany;
239
+ var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
240
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
241
+ content: content(item, index),
242
+ overlayStyle: {
243
+ zIndex: 1080
244
+ }
245
+ }, /*#__PURE__*/React.createElement("span", {
246
+ key: index,
247
+ style: {
248
+ color: '#1890ff',
249
+ cursor: 'pointer'
250
+ }
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));
252
+ }) : null;
253
+ };
254
+ export var CommonOrderContent = function CommonOrderContent(_ref8) {
255
+ var _ref8$list = _ref8.list,
256
+ list = _ref8$list === void 0 ? [] : _ref8$list,
257
+ valueKey = _ref8.valueKey,
258
+ failValue = _ref8.failValue,
259
+ _ref8$options = _ref8.options,
260
+ options = _ref8$options === void 0 ? [] : _ref8$options;
239
261
  var orderContent = function orderContent(item, index) {
240
262
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
241
263
  style: {
242
- textAlign: "center"
264
+ textAlign: 'center'
243
265
  }
244
266
  }, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId));
245
267
  };
@@ -247,7 +269,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref7) {
247
269
  var _options$find;
248
270
  var color = ((_options$find = options.find(function (item) {
249
271
  return item[valueKey] === failValue;
250
- })) === null || _options$find === void 0 ? void 0 : _options$find.color) || "#000";
272
+ })) === null || _options$find === void 0 ? void 0 : _options$find.color) || '#000';
251
273
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
252
274
  content: orderContent(item, index),
253
275
  overlayStyle: {
@@ -256,39 +278,39 @@ export var CommonOrderContent = function CommonOrderContent(_ref7) {
256
278
  }, /*#__PURE__*/React.createElement("span", {
257
279
  key: index,
258
280
  style: {
259
- color: "#1890ff",
260
- cursor: "pointer"
281
+ color: '#1890ff',
282
+ cursor: 'pointer'
261
283
  }
262
284
  }, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1), ":")), /*#__PURE__*/React.createElement("span", {
263
285
  style: {
264
286
  color: color
265
287
  }
266
- }, (item === null || item === void 0 ? void 0 : item[valueKey]) || "")));
288
+ }, (item === null || item === void 0 ? void 0 : item[valueKey]) || '')));
267
289
  }) : null;
268
290
  };
269
291
 
270
292
  //bs商品展示 todo
271
- export var BsGoodImage = function BsGoodImage(_ref8) {
272
- var item = _ref8.item,
273
- index = _ref8.index;
293
+ export var BsGoodImage = function BsGoodImage(_ref9) {
294
+ var item = _ref9.item,
295
+ index = _ref9.index;
274
296
  var picUrl = item.picUrl || defaultImg;
275
297
  var keyMap = {
276
- name: "bs名称",
277
- code: "bs编码",
278
- skuId: "bssku编码",
279
- money: "bs实付金额",
280
- number: "bs数量",
281
- share: "bs分摊价",
282
- type: "bs赠品类型"
298
+ name: 'bs名称',
299
+ code: 'bs编码',
300
+ skuId: 'bssku编码',
301
+ money: 'bs实付金额',
302
+ number: 'bs数量',
303
+ share: 'bs分摊价',
304
+ type: 'bs赠品类型'
283
305
  };
284
306
  return /*#__PURE__*/React.createElement("div", {
285
307
  className: styles.goodImgBox,
286
308
  key: index
287
309
  }, /*#__PURE__*/React.createElement("img", {
288
310
  style: {
289
- width: "40px",
290
- height: "40px",
291
- objectFit: "contain"
311
+ width: '40px',
312
+ height: '40px',
313
+ objectFit: 'contain'
292
314
  },
293
315
  src: picUrl
294
316
  }), /*#__PURE__*/React.createElement("div", {
@@ -301,20 +323,20 @@ export var BsGoodImage = function BsGoodImage(_ref8) {
301
323
  })));
302
324
  };
303
325
  //bs换货 todo
304
- export var BsExchangeList = function BsExchangeList(_ref9) {
305
- var list = _ref9.list,
306
- showHeader = _ref9.showHeader;
326
+ export var BsExchangeList = function BsExchangeList(_ref10) {
327
+ var list = _ref10.list,
328
+ showHeader = _ref10.showHeader;
307
329
  return /*#__PURE__*/React.createElement("div", {
308
330
  className: styles.bsImgBox
309
331
  }, list.map(function (item) {
310
332
  return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
311
333
  list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
312
334
  showHeader: showHeader,
313
- text: "退回"
335
+ text: '退回'
314
336
  }), BsGoodsTable({
315
337
  list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
316
338
  showHeader: showHeader,
317
- text: "换出"
339
+ text: '换出'
318
340
  }));
319
341
  }));
320
342
  };
@@ -327,42 +349,42 @@ export var BsGoodPic = function BsGoodPic(list) {
327
349
  });
328
350
  });
329
351
  };
330
- export var BsGoodsTable = function BsGoodsTable(_ref10) {
331
- var list = _ref10.list,
332
- showHeader = _ref10.showHeader,
333
- _ref10$text = _ref10.text,
334
- text = _ref10$text === void 0 ? "" : _ref10$text;
352
+ export var BsGoodsTable = function BsGoodsTable(_ref11) {
353
+ var list = _ref11.list,
354
+ showHeader = _ref11.showHeader,
355
+ _ref11$text = _ref11.text,
356
+ text = _ref11$text === void 0 ? '' : _ref11$text;
335
357
  //商品信息
336
358
  var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
337
- var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
359
+ var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
338
360
  return [{
339
- dataIndex: "mark",
361
+ dataIndex: 'mark',
340
362
  title: "\u5546\u54C1\u6807\u8BB0",
341
- align: "center",
363
+ align: 'center',
342
364
  ellipsis: true,
343
365
  width: 100
344
366
  }, {
345
- dataIndex: "skuName",
367
+ dataIndex: 'skuName',
346
368
  title: "".concat(text, "sku\u540D\u79F0"),
347
- align: "center",
369
+ align: 'center',
348
370
  ellipsis: true,
349
371
  width: 200
350
372
  }, {
351
- dataIndex: "sku",
373
+ dataIndex: 'sku',
352
374
  title: "".concat(text, "sku\u7F16\u7801"),
353
- align: "center",
375
+ align: 'center',
354
376
  ellipsis: true,
355
377
  width: 100
356
378
  }, {
357
- dataIndex: "name",
379
+ dataIndex: 'name',
358
380
  title: "".concat(text, "\u540D\u79F0"),
359
- align: "center",
381
+ align: 'center',
360
382
  ellipsis: true,
361
383
  width: 200
362
384
  }, {
363
- dataIndex: "pic",
385
+ dataIndex: 'pic',
364
386
  title: "\u56FE\u7247",
365
- align: "center",
387
+ align: 'center',
366
388
  ellipsis: true,
367
389
  width: 100,
368
390
  render: function render(val) {
@@ -372,42 +394,42 @@ export var BsGoodsTable = function BsGoodsTable(_ref10) {
372
394
  });
373
395
  }
374
396
  }, {
375
- dataIndex: "code",
397
+ dataIndex: 'code',
376
398
  title: "".concat(text, "\u7F16\u7801"),
377
- align: "center",
399
+ align: 'center',
378
400
  ellipsis: true,
379
401
  width: 100
380
402
  }, {
381
- dataIndex: "money",
403
+ dataIndex: 'money',
382
404
  title: "\u5B9E\u4ED8\u91D1\u989D",
383
- align: "center",
405
+ align: 'center',
384
406
  ellipsis: true,
385
407
  width: 100
386
408
  }, {
387
- dataIndex: "number",
409
+ dataIndex: 'number',
388
410
  title: "".concat(text, "\u6570\u91CF"),
389
- align: "center",
411
+ align: 'center',
390
412
  ellipsis: true,
391
413
  width: 100
392
414
  }, {
393
- dataIndex: "share",
415
+ dataIndex: 'share',
394
416
  title: "\u5206\u644A\u4EF7",
395
- align: "center",
417
+ align: 'center',
396
418
  ellipsis: true,
397
419
  width: 70
398
420
  }, {
399
- dataIndex: "type",
421
+ dataIndex: 'type',
400
422
  title: "\u8D60\u54C1\u7C7B\u578B",
401
- align: "center",
423
+ align: 'center',
402
424
  ellipsis: true,
403
425
  width: 100
404
426
  }];
405
427
  };
406
428
  var newColumns = useMemo(function () {
407
429
  var columnList = [{
408
- dataIndex: "",
409
- title: "序号",
410
- align: "center",
430
+ dataIndex: '',
431
+ title: '序号',
432
+ align: 'center',
411
433
  ellipsis: true,
412
434
  width: 50,
413
435
  render: function render(val, record, index) {
@@ -421,54 +443,54 @@ export var BsGoodsTable = function BsGoodsTable(_ref10) {
421
443
  return /*#__PURE__*/React.createElement(Table, {
422
444
  columns: newColumns,
423
445
  dataSource: list,
424
- rowKey: "uuid",
446
+ rowKey: 'uuid',
425
447
  size: "small",
426
448
  pagination: false,
427
449
  scroll: {
428
- x: "100%"
450
+ x: '100%'
429
451
  },
430
452
  locale: {
431
- emptyText: "暂无数据"
453
+ emptyText: '暂无数据'
432
454
  }
433
455
  });
434
456
  };
435
- export var FileRender = function FileRender(_ref11) {
436
- var _ref11$fileList = _ref11.fileList,
437
- fileList = _ref11$fileList === void 0 ? [] : _ref11$fileList;
457
+ export var FileRender = function FileRender(_ref12) {
458
+ var _ref12$fileList = _ref12.fileList,
459
+ fileList = _ref12$fileList === void 0 ? [] : _ref12$fileList;
438
460
  var _useState3 = useState(false),
439
461
  _useState4 = _slicedToArray(_useState3, 2),
440
462
  visible = _useState4[0],
441
463
  setVisible = _useState4[1];
442
- var _useState5 = useState(""),
464
+ var _useState5 = useState(''),
443
465
  _useState6 = _slicedToArray(_useState5, 2),
444
466
  fileUrl = _useState6[0],
445
467
  setFileUrl = _useState6[1];
446
- var _useState7 = useState(""),
468
+ var _useState7 = useState(''),
447
469
  _useState8 = _slicedToArray(_useState7, 2),
448
470
  fileType = _useState8[0],
449
471
  setFileType = _useState8[1];
450
- var _useState9 = useState(""),
472
+ var _useState9 = useState(''),
451
473
  _useState10 = _slicedToArray(_useState9, 2),
452
474
  fileName = _useState10[0],
453
475
  setFileName = _useState10[1];
454
476
  var handleCancel = function handleCancel() {
455
- setFileUrl("");
456
- setFileName("");
477
+ setFileUrl('');
478
+ setFileName('');
457
479
  setVisible(false);
458
480
  };
459
481
  var onPreview = function onPreview(file) {
460
482
  var _file$url;
461
- var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split(".");
483
+ var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
462
484
  var fileType = fileArr[fileArr.length - 1];
463
- if (["png", "jpg", "jpeg", "gif", "bmp", "svg"].includes(fileType.toLowerCase())) {
485
+ if (['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg'].includes(fileType.toLowerCase())) {
464
486
  setFileUrl(file === null || file === void 0 ? void 0 : file.url);
465
487
  setFileName(file === null || file === void 0 ? void 0 : file.name);
466
- setFileType("pic");
488
+ setFileType('pic');
467
489
  setVisible(true);
468
- } else if (["mp4", "avi", "mpeg", "asf", "mov", "3gp", "wmv", "rmvb"].includes(fileType.toLowerCase())) {
490
+ } else if (['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'].includes(fileType.toLowerCase())) {
469
491
  setFileUrl(file === null || file === void 0 ? void 0 : file.url);
470
492
  setFileName(file === null || file === void 0 ? void 0 : file.name);
471
- setFileType("video");
493
+ setFileType('video');
472
494
  setVisible(true);
473
495
  } else {
474
496
  window.open(file === null || file === void 0 ? void 0 : file.url);
@@ -477,8 +499,8 @@ export var FileRender = function FileRender(_ref11) {
477
499
  return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (item) {
478
500
  return /*#__PURE__*/React.createElement("div", {
479
501
  style: {
480
- color: "#1890ff",
481
- cursor: "pointer"
502
+ color: '#1890ff',
503
+ cursor: 'pointer'
482
504
  },
483
505
  onClick: function onClick() {
484
506
  return onPreview(item);
@@ -492,37 +514,37 @@ export var FileRender = function FileRender(_ref11) {
492
514
  }, /*#__PURE__*/React.createElement(CopyToClipboard, {
493
515
  text: fileUrl,
494
516
  onCopy: function onCopy() {
495
- message.success("复制成功");
517
+ message.success('复制成功');
496
518
  }
497
519
  }, /*#__PURE__*/React.createElement(Button, {
498
520
  type: "link"
499
- }, "\u4E0B\u8F7D\u5730\u5740")), fileType === "pic" ? /*#__PURE__*/React.createElement("img", {
521
+ }, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
500
522
  alt: "example",
501
523
  style: {
502
- width: "100%"
524
+ width: '100%'
503
525
  },
504
526
  src: fileUrl
505
527
  }) : /*#__PURE__*/React.createElement("video", {
506
528
  style: {
507
- width: "100%",
508
- height: "100%"
529
+ width: '100%',
530
+ height: '100%'
509
531
  },
510
532
  autoPlay: true,
511
533
  controls: true,
512
534
  src: fileUrl
513
535
  })));
514
536
  };
515
- export var BsSystemOrderTable = function BsSystemOrderTable(_ref12) {
516
- var value = _ref12.value;
537
+ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
538
+ var value = _ref13.value;
517
539
  var columns = [{
518
- dataIndex: "billType",
519
- title: "单据类型"
540
+ dataIndex: 'billType',
541
+ title: '单据类型'
520
542
  }, {
521
- dataIndex: "billNo",
522
- title: "系统订单号"
543
+ dataIndex: 'billNo',
544
+ title: '系统订单号'
523
545
  }, {
524
- dataIndex: "billTag",
525
- title: "标签"
546
+ dataIndex: 'billTag',
547
+ title: '标签'
526
548
  }];
527
549
  var rowSelection = {
528
550
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
@@ -538,14 +560,14 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref12) {
538
560
  dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
539
561
  columns: columns,
540
562
  rowSelection: rowSelection,
541
- rowKey: "billNo",
563
+ rowKey: 'billNo',
542
564
  size: "small",
543
565
  pagination: false,
544
566
  scroll: {
545
- x: "100%"
567
+ x: '100%'
546
568
  },
547
569
  locale: {
548
- emptyText: "暂无数据"
570
+ emptyText: '暂无数据'
549
571
  }
550
572
  });
551
573
  };