@kmkf-fe-packages/services-components 0.11.0-alpha.0 → 0.11.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare type getFormItemProps = {
3
3
  name: string;
4
4
  title: string;
@@ -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,17 +223,17 @@ 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
232
  export var BsExpressRender = function BsExpressRender(_ref7) {
233
233
  var _ref7$list = _ref7.list,
234
234
  list = _ref7$list === void 0 ? [] : _ref7$list,
235
235
  _ref7$showField = _ref7.showField,
236
- showField = _ref7$showField === void 0 ? "" : _ref7$showField;
236
+ showField = _ref7$showField === void 0 ? '' : _ref7$showField;
237
237
  return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
238
238
  var logisticsCompany = item.logisticsCompany;
239
239
  var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
@@ -245,10 +245,10 @@ export var BsExpressRender = function BsExpressRender(_ref7) {
245
245
  }, /*#__PURE__*/React.createElement("span", {
246
246
  key: index,
247
247
  style: {
248
- color: "#1890ff",
249
- cursor: "pointer"
248
+ color: '#1890ff',
249
+ cursor: 'pointer'
250
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));
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
252
  }) : null;
253
253
  };
254
254
  export var CommonOrderContent = function CommonOrderContent(_ref8) {
@@ -258,10 +258,11 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
258
258
  failValue = _ref8.failValue,
259
259
  _ref8$options = _ref8.options,
260
260
  options = _ref8$options === void 0 ? [] : _ref8$options;
261
+ console.log('CommonOrderContent', list);
261
262
  var orderContent = function orderContent(item, index) {
262
263
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
263
264
  style: {
264
- textAlign: "center"
265
+ textAlign: 'center'
265
266
  }
266
267
  }, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId));
267
268
  };
@@ -269,7 +270,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
269
270
  var _options$find;
270
271
  var color = ((_options$find = options.find(function (item) {
271
272
  return item[valueKey] === failValue;
272
- })) === null || _options$find === void 0 ? void 0 : _options$find.color) || "#000";
273
+ })) === null || _options$find === void 0 ? void 0 : _options$find.color) || '#000';
273
274
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
274
275
  content: orderContent(item, index),
275
276
  overlayStyle: {
@@ -278,14 +279,14 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
278
279
  }, /*#__PURE__*/React.createElement("span", {
279
280
  key: index,
280
281
  style: {
281
- color: "#1890ff",
282
- cursor: "pointer"
282
+ color: '#1890ff',
283
+ cursor: 'pointer'
283
284
  }
284
285
  }, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1), ":")), /*#__PURE__*/React.createElement("span", {
285
286
  style: {
286
287
  color: color
287
288
  }
288
- }, (item === null || item === void 0 ? void 0 : item[valueKey]) || "")), item.reason && /*#__PURE__*/React.createElement("div", {
289
+ }, (item === null || item === void 0 ? void 0 : item[valueKey]) || '')), item.reason && /*#__PURE__*/React.createElement("div", {
289
290
  className: "c-red"
290
291
  }, item.reason));
291
292
  }) : null;
@@ -297,22 +298,22 @@ export var BsGoodImage = function BsGoodImage(_ref9) {
297
298
  index = _ref9.index;
298
299
  var picUrl = item.picUrl || defaultImg;
299
300
  var keyMap = {
300
- name: "bs名称",
301
- code: "bs编码",
302
- skuId: "bssku编码",
303
- money: "bs实付金额",
304
- number: "bs数量",
305
- share: "bs分摊价",
306
- type: "bs赠品类型"
301
+ name: 'bs名称',
302
+ code: 'bs编码',
303
+ skuId: 'bssku编码',
304
+ money: 'bs实付金额',
305
+ number: 'bs数量',
306
+ share: 'bs分摊价',
307
+ type: 'bs赠品类型'
307
308
  };
308
309
  return /*#__PURE__*/React.createElement("div", {
309
310
  className: styles.goodImgBox,
310
311
  key: index
311
312
  }, /*#__PURE__*/React.createElement("img", {
312
313
  style: {
313
- width: "40px",
314
- height: "40px",
315
- objectFit: "contain"
314
+ width: '40px',
315
+ height: '40px',
316
+ objectFit: 'contain'
316
317
  },
317
318
  src: picUrl
318
319
  }), /*#__PURE__*/React.createElement("div", {
@@ -334,11 +335,11 @@ export var BsExchangeList = function BsExchangeList(_ref10) {
334
335
  return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
335
336
  list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
336
337
  showHeader: showHeader,
337
- text: "退回"
338
+ text: '退回'
338
339
  }), BsGoodsTable({
339
340
  list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
340
341
  showHeader: showHeader,
341
- text: "换出"
342
+ text: '换出'
342
343
  }));
343
344
  }));
344
345
  };
@@ -355,38 +356,38 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
355
356
  var list = _ref11.list,
356
357
  showHeader = _ref11.showHeader,
357
358
  _ref11$text = _ref11.text,
358
- text = _ref11$text === void 0 ? "" : _ref11$text;
359
+ text = _ref11$text === void 0 ? '' : _ref11$text;
359
360
  //商品信息
360
361
  var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
361
- var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
362
+ var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
362
363
  return [{
363
- dataIndex: "mark",
364
+ dataIndex: 'mark',
364
365
  title: "\u5546\u54C1\u6807\u8BB0",
365
- align: "center",
366
+ align: 'center',
366
367
  ellipsis: true,
367
368
  width: 100
368
369
  }, {
369
- dataIndex: "skuName",
370
+ dataIndex: 'skuName',
370
371
  title: "".concat(text, "sku\u540D\u79F0"),
371
- align: "center",
372
+ align: 'center',
372
373
  ellipsis: true,
373
374
  width: 200
374
375
  }, {
375
- dataIndex: "sku",
376
+ dataIndex: 'sku',
376
377
  title: "".concat(text, "sku\u7F16\u7801"),
377
- align: "center",
378
+ align: 'center',
378
379
  ellipsis: true,
379
380
  width: 100
380
381
  }, {
381
- dataIndex: "name",
382
+ dataIndex: 'name',
382
383
  title: "".concat(text, "\u540D\u79F0"),
383
- align: "center",
384
+ align: 'center',
384
385
  ellipsis: true,
385
386
  width: 200
386
387
  }, {
387
- dataIndex: "pic",
388
+ dataIndex: 'pic',
388
389
  title: "\u56FE\u7247",
389
- align: "center",
390
+ align: 'center',
390
391
  ellipsis: true,
391
392
  width: 100,
392
393
  render: function render(val) {
@@ -396,42 +397,42 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
396
397
  });
397
398
  }
398
399
  }, {
399
- dataIndex: "code",
400
+ dataIndex: 'code',
400
401
  title: "".concat(text, "\u7F16\u7801"),
401
- align: "center",
402
+ align: 'center',
402
403
  ellipsis: true,
403
404
  width: 100
404
405
  }, {
405
- dataIndex: "money",
406
+ dataIndex: 'money',
406
407
  title: "\u5B9E\u4ED8\u91D1\u989D",
407
- align: "center",
408
+ align: 'center',
408
409
  ellipsis: true,
409
410
  width: 100
410
411
  }, {
411
- dataIndex: "number",
412
+ dataIndex: 'number',
412
413
  title: "".concat(text, "\u6570\u91CF"),
413
- align: "center",
414
+ align: 'center',
414
415
  ellipsis: true,
415
416
  width: 100
416
417
  }, {
417
- dataIndex: "share",
418
+ dataIndex: 'share',
418
419
  title: "\u5206\u644A\u4EF7",
419
- align: "center",
420
+ align: 'center',
420
421
  ellipsis: true,
421
422
  width: 70
422
423
  }, {
423
- dataIndex: "type",
424
+ dataIndex: 'type',
424
425
  title: "\u8D60\u54C1\u7C7B\u578B",
425
- align: "center",
426
+ align: 'center',
426
427
  ellipsis: true,
427
428
  width: 100
428
429
  }];
429
430
  };
430
431
  var newColumns = useMemo(function () {
431
432
  var columnList = [{
432
- dataIndex: "",
433
- title: "序号",
434
- align: "center",
433
+ dataIndex: '',
434
+ title: '序号',
435
+ align: 'center',
435
436
  ellipsis: true,
436
437
  width: 50,
437
438
  render: function render(val, record, index) {
@@ -445,14 +446,14 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
445
446
  return /*#__PURE__*/React.createElement(Table, {
446
447
  columns: newColumns,
447
448
  dataSource: list,
448
- rowKey: "uuid",
449
+ rowKey: 'uuid',
449
450
  size: "small",
450
451
  pagination: false,
451
452
  scroll: {
452
- x: "100%"
453
+ x: '100%'
453
454
  },
454
455
  locale: {
455
- emptyText: "暂无数据"
456
+ emptyText: '暂无数据'
456
457
  }
457
458
  });
458
459
  };
@@ -465,15 +466,15 @@ export var FileRender = function FileRender(_ref12) {
465
466
  _useState4 = _slicedToArray(_useState3, 2),
466
467
  visible = _useState4[0],
467
468
  setVisible = _useState4[1];
468
- var _useState5 = useState(""),
469
+ var _useState5 = useState(''),
469
470
  _useState6 = _slicedToArray(_useState5, 2),
470
471
  fileUrl = _useState6[0],
471
472
  setFileUrl = _useState6[1];
472
- var _useState7 = useState(""),
473
+ var _useState7 = useState(''),
473
474
  _useState8 = _slicedToArray(_useState7, 2),
474
475
  fileType = _useState8[0],
475
476
  setFileType = _useState8[1];
476
- var _useState9 = useState(""),
477
+ var _useState9 = useState(''),
477
478
  _useState10 = _slicedToArray(_useState9, 2),
478
479
  fileName = _useState10[0],
479
480
  setFileName = _useState10[1];
@@ -482,24 +483,24 @@ export var FileRender = function FileRender(_ref12) {
482
483
  downloading = _useState12[0],
483
484
  setDownloading = _useState12[1];
484
485
  var handleCancel = function handleCancel() {
485
- setFileUrl("");
486
- setFileName("");
486
+ setFileUrl('');
487
+ setFileName('');
487
488
  setVisible(false);
488
489
  setDownloading(false);
489
490
  };
490
491
  var onPreview = function onPreview(file) {
491
492
  var _file$url;
492
- var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split(".");
493
+ var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
493
494
  var fileType = fileArr[fileArr.length - 1];
494
- if (["png", "jpg", "jpeg", "gif", "bmp", "svg"].includes(fileType.toLowerCase())) {
495
+ if (['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg'].includes(fileType.toLowerCase())) {
495
496
  setFileUrl(file === null || file === void 0 ? void 0 : file.url);
496
497
  setFileName(file === null || file === void 0 ? void 0 : file.name);
497
- setFileType("pic");
498
+ setFileType('pic');
498
499
  setVisible(true);
499
- } else if (["mp4", "avi", "mpeg", "asf", "mov", "3gp", "wmv", "rmvb"].includes(fileType.toLowerCase())) {
500
+ } else if (['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'].includes(fileType.toLowerCase())) {
500
501
  setFileUrl(file === null || file === void 0 ? void 0 : file.url);
501
502
  setFileName(file === null || file === void 0 ? void 0 : file.name);
502
- setFileType("video");
503
+ setFileType('video');
503
504
  setVisible(true);
504
505
  } else {
505
506
  window.open(file === null || file === void 0 ? void 0 : file.url);
@@ -510,9 +511,9 @@ export var FileRender = function FileRender(_ref12) {
510
511
  fetch(url).then(function (res) {
511
512
  return res.blob();
512
513
  }).then(function (blob) {
513
- var a = document.createElement("a");
514
+ var a = document.createElement('a');
514
515
  document.body.appendChild(a);
515
- a.style.display = "none";
516
+ a.style.display = 'none';
516
517
  var url = window.URL.createObjectURL(blob);
517
518
  a.href = url;
518
519
  a.download = name;
@@ -526,8 +527,8 @@ export var FileRender = function FileRender(_ref12) {
526
527
  return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (item) {
527
528
  return /*#__PURE__*/React.createElement("a", {
528
529
  style: {
529
- color: "#1890ff",
530
- cursor: "pointer",
530
+ color: '#1890ff',
531
+ cursor: 'pointer',
531
532
  display: 'block'
532
533
  },
533
534
  onClick: function onClick(e) {
@@ -550,20 +551,20 @@ export var FileRender = function FileRender(_ref12) {
550
551
  }, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
551
552
  text: fileUrl,
552
553
  onCopy: function onCopy() {
553
- message.success("复制成功");
554
+ message.success('复制成功');
554
555
  }
555
556
  }, /*#__PURE__*/React.createElement(Button, {
556
557
  type: "link"
557
- }, "\u4E0B\u8F7D\u5730\u5740")), fileType === "pic" ? /*#__PURE__*/React.createElement("img", {
558
+ }, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
558
559
  alt: "example",
559
560
  style: {
560
- width: "100%"
561
+ width: '100%'
561
562
  },
562
563
  src: fileUrl
563
564
  }) : /*#__PURE__*/React.createElement("video", {
564
565
  style: {
565
- width: "100%",
566
- height: "100%"
566
+ width: '100%',
567
+ height: '100%'
567
568
  },
568
569
  autoPlay: true,
569
570
  controls: true,
@@ -573,14 +574,14 @@ export var FileRender = function FileRender(_ref12) {
573
574
  export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
574
575
  var value = _ref13.value;
575
576
  var columns = [{
576
- dataIndex: "billType",
577
- title: "单据类型"
577
+ dataIndex: 'billType',
578
+ title: '单据类型'
578
579
  }, {
579
- dataIndex: "billNo",
580
- title: "系统订单号"
580
+ dataIndex: 'billNo',
581
+ title: '系统订单号'
581
582
  }, {
582
- dataIndex: "billTag",
583
- title: "标签"
583
+ dataIndex: 'billTag',
584
+ title: '标签'
584
585
  }];
585
586
  var rowSelection = {
586
587
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
@@ -596,14 +597,14 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
596
597
  dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
597
598
  columns: columns,
598
599
  rowSelection: rowSelection,
599
- rowKey: "billNo",
600
+ rowKey: 'billNo',
600
601
  size: "small",
601
602
  pagination: false,
602
603
  scroll: {
603
- x: "100%"
604
+ x: '100%'
604
605
  },
605
606
  locale: {
606
- emptyText: "暂无数据"
607
+ emptyText: '暂无数据'
607
608
  }
608
609
  });
609
610
  };
@@ -63,8 +63,8 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
63
63
  _defineProperty(this, "children", void 0);
64
64
  _defineProperty(this, "dataType", void 0);
65
65
  _defineProperty(this, "renderClient", function (record) {
66
- var _typeMap$_this$type;
67
- console.log('record', record, record === null || record === void 0 ? void 0 : record[_this.id]);
66
+ var _typeMap$_this$type, _typeMap$_this$type2;
67
+ console.log('record', record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)]);
68
68
  var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
69
69
  return !isNull(item);
70
70
  }) : false;
@@ -73,13 +73,14 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
73
73
  label: _this.name,
74
74
  value: /*#__PURE__*/React.createElement(CommonOrderContent, {
75
75
  list: record === null || record === void 0 ? void 0 : record[_this.id],
76
- valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey
76
+ valueKey: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.valueKey
77
77
  })
78
78
  }) : null;
79
79
  });
80
80
  _defineProperty(this, "renderPc", function (value, record) {
81
- var _typeMap$_this$type2, _typeMap$_this$type3, _typeMap$_this$type4;
82
- var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)];
81
+ var _typeMap$_this$type3, _typeMap$_this$type4, _typeMap$_this$type5;
82
+ var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.key)];
83
+ console.log('renderPc', typeMap, list);
83
84
  //兼容多个商品
84
85
  return /*#__PURE__*/React.createElement("span", {
85
86
  onClick: function onClick(e) {
@@ -87,30 +88,30 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
87
88
  }
88
89
  }, /*#__PURE__*/React.createElement(CommonOrderContent, {
89
90
  list: list,
90
- type: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.type,
91
- valueKey: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.valueKey
91
+ type: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.type,
92
+ valueKey: (_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.valueKey
92
93
  }));
93
94
  });
94
95
  _defineProperty(this, "renderLog", function (r) {
95
- var _typeMap$_this$type5;
96
- var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)];
96
+ var _typeMap$_this$type6;
97
+ var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
97
98
  if (isNull(list)) return null;
98
99
  return _this.renderPc(undefined, r);
99
100
  });
100
101
  _defineProperty(this, "getComponentValue", function (r) {
101
- var _typeMap$_this$type6;
102
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
102
+ var _typeMap$_this$type7;
103
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key)];
103
104
  });
104
105
  _defineProperty(this, "renderExport", function (value, record) {
105
- var _typeMap$_this$type7;
106
- var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key)];
106
+ var _typeMap$_this$type8;
107
+ var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key)];
107
108
  return (list || []).map(function (item) {
108
- var _typeMap$_this$type8;
109
- return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.valueKey];
109
+ var _typeMap$_this$type9;
110
+ return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.valueKey];
110
111
  }).join(',');
111
112
  });
112
113
  _defineProperty(this, "editRender", function (p) {
113
- var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type9;
114
+ var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type10;
114
115
  return /*#__PURE__*/React.createElement(GetFormItem, {
115
116
  title: _this.name,
116
117
  name: _this.id,
@@ -118,22 +119,22 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
118
119
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
119
120
  required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
120
121
  component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
121
- type: (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.type
122
+ type: (_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.type
122
123
  }))
123
124
  });
124
125
  });
125
126
  _defineProperty(this, "filterConfig", function (item) {
126
- var _typeMap$_this$type10;
127
+ var _typeMap$_this$type11;
127
128
  return {
128
129
  searchDefaultConditions: SYMBOL.like,
129
130
  type: item.type,
130
- id: "".concat(item.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.code),
131
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.code),
131
132
  name: "".concat(_this.name),
132
133
  filterComponentType: 'Input',
133
134
  filterFn: function filterFn(value) {
134
135
  return function (i) {
135
- var _typeMap$_this$type11;
136
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.code), value);
136
+ var _typeMap$_this$type12;
137
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.code), value);
137
138
  };
138
139
  }
139
140
  };
@@ -152,12 +153,12 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
152
153
  required: true,
153
154
  validator: function validator(_, value) {
154
155
  var hasNo = (value || []).some(function (item) {
155
- var _typeMap$_this$type12;
156
- return item[(_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.valueKey];
156
+ var _typeMap$_this$type13;
157
+ return item[(_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.valueKey];
157
158
  });
158
159
  if (!hasNo) {
159
- var _typeMap$_this$type13;
160
- return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.name)));
160
+ var _typeMap$_this$type14;
161
+ return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.name)));
161
162
  }
162
163
  return Promise.resolve();
163
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.11.0-alpha.0",
3
+ "version": "0.11.0-alpha.1",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "aeaa0dda1d182b6b2cfaf5b475f2cf77c65b4c5b"
43
+ "gitHead": "614c71916a44ee220c0cb036bb401aa2c3224e8f"
44
44
  }