@kmkf-fe-packages/services-components 0.7.15-alpha.70 → 0.7.15-alpha.72

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,9 +8,9 @@ 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 } from 'antd';
12
- import React, { useState, useMemo } from 'react';
13
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
11
+ import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table } from "antd";
12
+ import React, { useState, useMemo } from "react";
13
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
14
14
  import styles from "./index.module.less";
15
15
  import defaultImg from "./img/default-img.png";
16
16
  export var getFormItem = function getFormItem(_ref) {
@@ -30,7 +30,7 @@ export var getFormItem = function getFormItem(_ref) {
30
30
  return /*#__PURE__*/React.createElement("div", {
31
31
  className: "form-item--wrap",
32
32
  style: {
33
- position: 'relative'
33
+ position: "relative"
34
34
  }
35
35
  }, /*#__PURE__*/React.createElement(Form.Item, {
36
36
  name: name,
@@ -44,43 +44,43 @@ export var showImage = function showImage(_ref2) {
44
44
  var item = _ref2.item,
45
45
  type = _ref2.type,
46
46
  index = _ref2.index;
47
- var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
47
+ var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== "tabao" ? item.picUrl : item.picUrl + "_40x40.jpg" : defaultImg;
48
48
  return /*#__PURE__*/React.createElement("div", {
49
49
  className: styles.goodImgBox,
50
50
  key: index
51
- }, (item === null || item === void 0 ? void 0 : item.platform) === 'taobao' ? /*#__PURE__*/React.createElement("a", {
51
+ }, (item === null || item === void 0 ? void 0 : item.platform) === "taobao" ? /*#__PURE__*/React.createElement("a", {
52
52
  target: "_blank",
53
53
  href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
54
54
  }, /*#__PURE__*/React.createElement("img", {
55
55
  style: {
56
- width: '40px',
57
- height: '40px',
58
- objectFit: 'contain'
56
+ width: "40px",
57
+ height: "40px",
58
+ objectFit: "contain"
59
59
  },
60
60
  src: picUrl
61
61
  })) : /*#__PURE__*/React.createElement("img", {
62
62
  style: {
63
- width: '40px',
64
- height: '40px',
65
- objectFit: 'contain'
63
+ width: "40px",
64
+ height: "40px",
65
+ objectFit: "contain"
66
66
  },
67
67
  src: picUrl
68
68
  }), /*#__PURE__*/React.createElement("div", {
69
69
  className: styles.options
70
- }, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
71
- title: '商品id',
70
+ }, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
71
+ title: "商品id",
72
72
  text: item.numIid
73
- }), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
74
- title: '商品编码',
73
+ }), type === "itemCode" && /*#__PURE__*/React.createElement(TextTool, {
74
+ title: "商品编码",
75
75
  text: item.outerId
76
- }), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
77
- title: '供应商编码',
76
+ }), (type === "itemThird" || type === "jstItemThird") && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
77
+ title: "供应商编码",
78
78
  text: item.itemId || item.supplierItemOuterId
79
- }), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
80
- title: '供应商名称',
79
+ }), (type === "itemThird" || type === "jstItemThird") && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
80
+ title: "供应商名称",
81
81
  text: item.supplierName
82
82
  }), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
83
- title: '规格',
83
+ title: "规格",
84
84
  text: item.propertiesName
85
85
  })));
86
86
  };
@@ -93,9 +93,9 @@ var TextTool = function TextTool(_ref3) {
93
93
  title: text
94
94
  }, /*#__PURE__*/React.createElement("div", {
95
95
  style: {
96
- overflow: 'hidden',
97
- whiteSpace: 'nowrap',
98
- textOverflow: 'ellipsis'
96
+ overflow: "hidden",
97
+ whiteSpace: "nowrap",
98
+ textOverflow: "ellipsis"
99
99
  }
100
100
  }, title, ":", text));
101
101
  };
@@ -123,47 +123,47 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
123
123
  title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
124
124
  }, /*#__PURE__*/React.createElement("div", {
125
125
  style: {
126
- display: 'flex',
127
- flexWrap: 'wrap'
126
+ display: "flex",
127
+ flexWrap: "wrap"
128
128
  }
129
129
  }, allImage.map(function (i, index) {
130
130
  return /*#__PURE__*/React.createElement("div", {
131
131
  style: {
132
- width: '50%'
132
+ width: "50%"
133
133
  },
134
134
  key: index
135
135
  }, /*#__PURE__*/React.createElement("a", {
136
136
  href: i.link,
137
137
  target: "__blank",
138
138
  style: {
139
- marginRight: '12px',
140
- marginTop: '8px',
141
- padding: '2px',
142
- border: '1px dashed #ccc',
143
- display: 'inline-block'
139
+ marginRight: "12px",
140
+ marginTop: "8px",
141
+ padding: "2px",
142
+ border: "1px dashed #ccc",
143
+ display: "inline-block"
144
144
  }
145
145
  }, /*#__PURE__*/React.createElement("img", {
146
146
  alt: "",
147
147
  src: i.picUrl || defaultImg,
148
148
  style: {
149
- width: '72px',
150
- height: '72px',
151
- objectFit: 'contain'
149
+ width: "72px",
150
+ height: "72px",
151
+ objectFit: "contain"
152
152
  }
153
- })), /*#__PURE__*/React.createElement("div", null, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
154
- title: '商品id',
153
+ })), /*#__PURE__*/React.createElement("div", null, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
154
+ title: "商品id",
155
155
  text: i.numIid
156
- }), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
157
- title: '商品编码',
156
+ }), type === "itemCode" && /*#__PURE__*/React.createElement(TextTool, {
157
+ title: "商品编码",
158
158
  text: i.outerId
159
- }), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
160
- title: '供应商编码',
159
+ }), (type === "itemThird" || type === "jstItemThird") && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
160
+ title: "供应商编码",
161
161
  text: i.itemId || i.supplierItemOuterId
162
- }), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
163
- title: '供应商名称',
162
+ }), (type === "itemThird" || type === "jstItemThird") && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
163
+ title: "供应商名称",
164
164
  text: i.supplierName
165
165
  }), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
166
- title: '规格',
166
+ title: "规格",
167
167
  text: i.propertiesName
168
168
  })));
169
169
  }))));
@@ -173,12 +173,12 @@ export var GoodImage = function GoodImage(_ref5) {
173
173
  var _list$slice;
174
174
  var list = _ref5.list,
175
175
  _ref5$type = _ref5.type,
176
- type = _ref5$type === void 0 ? '' : _ref5$type;
176
+ type = _ref5$type === void 0 ? "" : _ref5$type;
177
177
  var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
178
178
  var initShowTotal = 3;
179
179
  return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
180
180
  style: {
181
- display: type === 'itemSelect' ? 'flex' : 'block'
181
+ display: type === "itemSelect" ? "flex" : "block"
182
182
  }
183
183
  }, 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) {
184
184
  return showImage({
@@ -195,7 +195,7 @@ export var GoodImage = function GoodImage(_ref5) {
195
195
  var content = function content(item, index) {
196
196
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
197
197
  style: {
198
- textAlign: 'center'
198
+ textAlign: "center"
199
199
  }
200
200
  }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
201
201
  return /*#__PURE__*/React.createElement("div", {
@@ -222,10 +222,10 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
222
222
  }, /*#__PURE__*/React.createElement("span", {
223
223
  key: index,
224
224
  style: {
225
- color: '#1890ff',
226
- cursor: 'pointer'
225
+ color: "#1890ff",
226
+ cursor: "pointer"
227
227
  }
228
- }, "\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));
228
+ }, "\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));
229
229
  }) : null;
230
230
  };
231
231
  //bs商品展示 todo
@@ -234,22 +234,22 @@ export var BsGoodImage = function BsGoodImage(_ref7) {
234
234
  index = _ref7.index;
235
235
  var picUrl = item.picUrl || defaultImg;
236
236
  var keyMap = {
237
- name: 'bs名称',
238
- code: 'bs编码',
239
- skuId: 'bssku编码',
240
- money: 'bs实付金额',
241
- number: 'bs数量',
242
- share: 'bs分摊价',
243
- type: 'bs赠品类型'
237
+ name: "bs名称",
238
+ code: "bs编码",
239
+ skuId: "bssku编码",
240
+ money: "bs实付金额",
241
+ number: "bs数量",
242
+ share: "bs分摊价",
243
+ type: "bs赠品类型"
244
244
  };
245
245
  return /*#__PURE__*/React.createElement("div", {
246
246
  className: styles.goodImgBox,
247
247
  key: index
248
248
  }, /*#__PURE__*/React.createElement("img", {
249
249
  style: {
250
- width: '40px',
251
- height: '40px',
252
- objectFit: 'contain'
250
+ width: "40px",
251
+ height: "40px",
252
+ objectFit: "contain"
253
253
  },
254
254
  src: picUrl
255
255
  }), /*#__PURE__*/React.createElement("div", {
@@ -271,11 +271,11 @@ export var BsExchangeList = function BsExchangeList(_ref8) {
271
271
  return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
272
272
  list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
273
273
  showHeader: showHeader,
274
- text: '退回'
274
+ text: "退回"
275
275
  }), BsGoodsTable({
276
276
  list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
277
277
  showHeader: showHeader,
278
- text: '换出'
278
+ text: "换出"
279
279
  }));
280
280
  }));
281
281
  };
@@ -292,14 +292,14 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
292
292
  var list = _ref9.list,
293
293
  showHeader = _ref9.showHeader,
294
294
  _ref9$text = _ref9.text,
295
- text = _ref9$text === void 0 ? '' : _ref9$text;
295
+ text = _ref9$text === void 0 ? "" : _ref9$text;
296
296
  //商品信息
297
297
  var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
298
- var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
298
+ var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
299
299
  return [{
300
- dataIndex: 'pic',
300
+ dataIndex: "pic",
301
301
  title: "\u56FE\u7247",
302
- align: 'center',
302
+ align: "center",
303
303
  ellipsis: true,
304
304
  width: 100,
305
305
  render: function render(val) {
@@ -309,57 +309,54 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
309
309
  });
310
310
  }
311
311
  }, {
312
- dataIndex: 'name',
312
+ dataIndex: "name",
313
313
  title: "".concat(text, "\u540D\u79F0"),
314
- align: 'center',
314
+ align: "center",
315
315
  ellipsis: true,
316
316
  width: 100
317
317
  }, {
318
- dataIndex: 'code',
318
+ dataIndex: "code",
319
319
  title: "".concat(text, "\u7F16\u7801"),
320
- align: 'center',
320
+ align: "center",
321
321
  ellipsis: true,
322
322
  width: 100
323
323
  }, {
324
- dataIndex: 'sku',
324
+ dataIndex: "sku",
325
325
  title: "".concat(text, "sku\u7F16\u7801"),
326
- align: 'center',
326
+ align: "center",
327
327
  ellipsis: true,
328
328
  width: 100
329
329
  }, {
330
- dataIndex: 'money',
330
+ dataIndex: "money",
331
331
  title: "\u5B9E\u4ED8\u91D1\u989D",
332
- align: 'center',
332
+ align: "center",
333
333
  ellipsis: true,
334
334
  width: 100
335
335
  }, {
336
- dataIndex: 'number',
336
+ dataIndex: "number",
337
337
  title: "".concat(text, "\u6570\u91CF"),
338
- align: 'center',
338
+ align: "center",
339
339
  ellipsis: true,
340
- width: 100,
341
- render: function render(val, record, index) {
342
- return /*#__PURE__*/React.createElement("span", null, val);
343
- }
340
+ width: 100
344
341
  }, {
345
- dataIndex: 'share',
342
+ dataIndex: "share",
346
343
  title: "\u5206\u644A\u4EF7",
347
- align: 'center',
344
+ align: "center",
348
345
  ellipsis: true,
349
346
  width: 70
350
347
  }, {
351
- dataIndex: 'type',
348
+ dataIndex: "type",
352
349
  title: "\u8D60\u54C1\u7C7B\u578B",
353
- align: 'center',
350
+ align: "center",
354
351
  ellipsis: true,
355
352
  width: 100
356
353
  }];
357
354
  };
358
355
  var newColumns = useMemo(function () {
359
356
  var columnList = [{
360
- dataIndex: '',
361
- title: '序号',
362
- align: 'center',
357
+ dataIndex: "",
358
+ title: "序号",
359
+ align: "center",
363
360
  ellipsis: true,
364
361
  width: 50,
365
362
  render: function render(val, record, index) {
@@ -373,14 +370,14 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
373
370
  return /*#__PURE__*/React.createElement(Table, {
374
371
  columns: newColumns,
375
372
  dataSource: list,
376
- rowKey: 'id',
373
+ rowKey: "uuid",
377
374
  size: "small",
378
375
  pagination: false,
379
376
  scroll: {
380
- x: '100%'
377
+ x: "100%"
381
378
  },
382
379
  locale: {
383
- emptyText: '暂无数据'
380
+ emptyText: "暂无数据"
384
381
  }
385
382
  });
386
383
  };
@@ -49,7 +49,7 @@ var ErpTradeId = /*#__PURE__*/_createClass(function ErpTradeId(options) {
49
49
  }
50
50
  }, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")], /*#__PURE__*/React.createElement("span", {
51
51
  onClick: function onClick(e) {
52
- _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
52
+ _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]);
53
53
  e.stopPropagation();
54
54
  }
55
55
  }, /*#__PURE__*/React.createElement("span", {
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
3
  declare class JstSendGood implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -12,13 +12,13 @@ declare class JstSendGood implements ComponentInterface {
12
12
  }[];
13
13
  type: string;
14
14
  rules: any[];
15
- componentConfig: ComponentInterface['componentConfig'];
15
+ componentConfig: ComponentInterface["componentConfig"];
16
16
  align: ALignType;
17
17
  isCombinationComponent: boolean;
18
18
  formField: string;
19
19
  canSort: boolean;
20
20
  children: ComponentInterface[];
21
- dataType: ComponentInterface['dataType'];
21
+ dataType: ComponentInterface["dataType"];
22
22
  constructor(options: PickOption);
23
23
  renderClient: (record: Record) => React.JSX.Element | null;
24
24
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -6,28 +6,34 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
- import React from 'react';
10
- import some from 'lodash/some';
9
+ import React from "react";
10
+ import some from "lodash/some";
11
11
  import GetFormItem from "../../GetFormItem";
12
12
  import { JstGoodImage } from "../../Common";
13
- import { JstGoods } from '@kmkf-fe-packages/basic-components';
13
+ import { JstGoods } from "@kmkf-fe-packages/basic-components";
14
14
  import ItemView from "../../../commonComponents/ItemView";
15
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
15
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  var typeMap = {
18
18
  JST_SEND_GOOD: {
19
- key: 'jstItemList',
20
- name: 'jst'
19
+ key: "jstItemList",
20
+ name: "jst",
21
+ sendId: "sendId",
22
+ sendName: "sendName"
21
23
  },
22
24
  BS_SEND_GOOD: {
23
- key: 'bsSendGood',
24
- name: 'bs'
25
+ key: "bsSendGood",
26
+ name: "bs",
27
+ sendId: "bsSendId",
28
+ sendName: "bsSendName"
25
29
  }
26
30
  };
27
31
  var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
28
32
  var _this = this,
29
33
  _typeMap$options$type,
30
34
  _typeMap$options$type2,
35
+ _typeMap$options$type3,
36
+ _typeMap$options$type4,
31
37
  _this$componentConfig;
32
38
  _classCallCheck(this, JstSendGood);
33
39
  _defineProperty(this, "name", void 0);
@@ -83,8 +89,8 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
83
89
  var _typeMap$_this$type4;
84
90
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
85
91
  return (list || []).map(function (item) {
86
- return [item === null || item === void 0 ? void 0 : item.sendId, item === null || item === void 0 ? void 0 : item.sendName].join('/');
87
- }).join(',');
92
+ return [item === null || item === void 0 ? void 0 : item.sendId, item === null || item === void 0 ? void 0 : item.sendName].join("/");
93
+ }).join(",");
88
94
  });
89
95
  _defineProperty(this, "editRender", function (p) {
90
96
  return /*#__PURE__*/React.createElement(GetFormItem, {
@@ -99,17 +105,17 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
99
105
  });
100
106
  });
101
107
  _defineProperty(this, "filterConfig", function (item) {
102
- var _typeMap$_this$type5, _typeMap$_this$type7;
108
+ var _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type8, _typeMap$_this$type9;
103
109
  return [{
104
110
  searchDefaultConditions: SYMBOL.like,
105
111
  type: item.type,
106
- id: "".concat(item.id, "_sendName"),
107
- name: "".concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.name, "\u53D1\u8D27\u4ED3\u540D\u79F0"),
108
- filterComponentType: 'Input',
112
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.sendName),
113
+ name: "".concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.name, "\u53D1\u8D27\u4ED3\u540D\u79F0"),
114
+ filterComponentType: "Input",
109
115
  filterFn: function filterFn(value) {
110
116
  return function (i) {
111
- var _ref, _typeMap$_this$type6;
112
- return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key) || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
117
+ var _ref, _typeMap$_this$type7;
118
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key) || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
113
119
  var _String;
114
120
  var name = item !== null && item !== void 0 && item.sendName ? (_String = String(item === null || item === void 0 ? void 0 : item.sendName)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
115
121
  return name;
@@ -119,13 +125,13 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
119
125
  }, {
120
126
  searchDefaultConditions: SYMBOL.like,
121
127
  type: item.type,
122
- id: "".concat(item.id, "_sendId"),
123
- name: "".concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.name, "\u53D1\u8D27\u4ED3\u7F16\u7801"),
124
- filterComponentType: 'Input',
128
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.sendId),
129
+ name: "".concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.name, "\u53D1\u8D27\u4ED3\u7F16\u7801"),
130
+ filterComponentType: "Input",
125
131
  filterFn: function filterFn(value) {
126
132
  return function (i) {
127
- var _ref2, _typeMap$_this$type8;
128
- return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
133
+ var _ref2, _typeMap$_this$type10;
134
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
129
135
  var _String2;
130
136
  var id = item !== null && item !== void 0 && item.sendId ? (_String2 = String(item === null || item === void 0 ? void 0 : item.sendId)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
131
137
  return id;
@@ -139,28 +145,28 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
139
145
  this.sortField = "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.key);
140
146
  this.formField = "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.key);
141
147
  this.sortChildField = [{
142
- name: '发货仓名称',
143
- key: "".concat(options.id, "_sendName"),
144
- dataType: 'string'
148
+ name: "发货仓名称",
149
+ key: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.sendName),
150
+ dataType: "string"
145
151
  }, {
146
- name: '发货仓编码',
147
- key: "".concat(options.id, "_sendId"),
148
- dataType: 'string'
152
+ name: "发货仓编码",
153
+ key: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.sendId),
154
+ dataType: "string"
149
155
  }];
150
156
  this.type = options.type;
151
157
  this.componentConfig = options.componentConfig;
152
- this.dataType = 'object';
158
+ this.dataType = "object";
153
159
  this.rules = (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
154
160
  required: true,
155
161
  validator: function validator(_, value) {
156
162
  if (!value || !value.length) {
157
- return Promise.reject(new Error('请选择宝贝'));
163
+ return Promise.reject(new Error("请选择宝贝"));
158
164
  }
159
165
  var hasNo = (value || []).some(function (item) {
160
166
  var _this$componentConfig2, _this$componentConfig3;
161
- if (['sendName'].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showField) || '')) {
167
+ if (["sendName"].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showField) || "")) {
162
168
  return item.sendName;
163
- } else if (['sendId'].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '')) {
169
+ } else if (["sendId"].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "")) {
164
170
  return item.sendId;
165
171
  } else {
166
172
  return item.sendId && item.sendName;
@@ -172,7 +178,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
172
178
  return Promise.resolve();
173
179
  }
174
180
  }] : [];
175
- this.align = 'left';
181
+ this.align = "left";
176
182
  this.isCombinationComponent = false;
177
183
  this.canSort = false;
178
184
  this.children = [];
@@ -53,7 +53,7 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
53
53
  }
54
54
  }, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")], /*#__PURE__*/React.createElement("span", {
55
55
  onClick: function onClick(e) {
56
- _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
56
+ _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]);
57
57
  e.stopPropagation();
58
58
  }
59
59
  }, /*#__PURE__*/React.createElement("span", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.7.15-alpha.70",
3
+ "version": "0.7.15-alpha.72",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -26,8 +26,8 @@
26
26
  "father": "^4.1.7"
27
27
  },
28
28
  "dependencies": {
29
- "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.70",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.70"
29
+ "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.71",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.71"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@ant-design/icons": "^4.7.0",
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "acde6f0a59a6e1516cea8fc29870bbc58d74d0a7"
43
+ "gitHead": "6e19b12cdda654c71127314ea323bcd714f6d299"
44
44
  }