@kmkf-fe-packages/services-components 1.22.6 → 1.23.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.
@@ -11,9 +11,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
11
11
  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; }
12
12
  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; } }
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
15
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
16
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
17
  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; }
18
18
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
19
  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); }
@@ -23,7 +23,7 @@ import { isNull, BS_E3_BOOLEAN_STATUS_MAP } from "@kmkf-fe-packages/kmkf-utils";
23
23
  import { BsHeaderPic, BsHeaderChild } from "../BS/common";
24
24
  import ReissueGift from "../BsE3/ReissueGift";
25
25
  var GoodHeaderMap = {
26
- "WDT_GOODS": {
26
+ WDT_GOODS: {
27
27
  headerMap: {
28
28
  goodId: {
29
29
  component: BsHeaderChild,
@@ -106,7 +106,7 @@ var GoodHeaderMap = {
106
106
  },
107
107
  moneyKey: "orderPrice"
108
108
  },
109
- "WDT_RETURN_GOODS": {
109
+ WDT_RETURN_GOODS: {
110
110
  headerMap: {
111
111
  goodId: {
112
112
  component: BsHeaderChild,
@@ -175,8 +175,8 @@ var GoodHeaderMap = {
175
175
  width: 100,
176
176
  render: function render(val) {
177
177
  var typeMap = {
178
- '1': '单品',
179
- '2': '组合装'
178
+ "1": "单品",
179
+ "2": "组合装"
180
180
  };
181
181
  return /*#__PURE__*/React.createElement("span", null, typeMap[val]);
182
182
  }
@@ -197,7 +197,7 @@ var GoodHeaderMap = {
197
197
  },
198
198
  moneyKey: "returnPrice"
199
199
  },
200
- "WDT_EXCHANGE_GOODS": {
200
+ WDT_EXCHANGE_GOODS: {
201
201
  headerMap: {
202
202
  goodId: {
203
203
  component: BsHeaderChild,
@@ -260,8 +260,8 @@ var GoodHeaderMap = {
260
260
  width: 100,
261
261
  render: function render(val) {
262
262
  var typeMap = {
263
- '1': '单品',
264
- '2': '组合装'
263
+ "1": "单品",
264
+ "2": "组合装"
265
265
  };
266
266
  return /*#__PURE__*/React.createElement("span", null, typeMap[val]);
267
267
  }
@@ -288,7 +288,7 @@ var GoodHeaderMap = {
288
288
  },
289
289
  moneyKey: "exchangePrice"
290
290
  },
291
- "BS_E3_GOODS": {
291
+ BS_E3_GOODS: {
292
292
  headerMap: {
293
293
  sku: {
294
294
  component: BsHeaderChild,
@@ -452,7 +452,7 @@ var GoodHeaderMap = {
452
452
  },
453
453
  moneyKey: "payment"
454
454
  },
455
- "BS_E3_REISSUE_GOODS": {
455
+ BS_E3_REISSUE_GOODS: {
456
456
  headerMap: {
457
457
  sku: {
458
458
  component: BsHeaderChild,
@@ -572,88 +572,121 @@ var GoodHeaderMap = {
572
572
  moneyKey: "goodPrice"
573
573
  }
574
574
  };
575
- GoodHeaderMap['WDT_REISSUE_GOODS'] = GoodHeaderMap['WDT_GOODS'];
576
- var CommonHeaderGoods = /*#__PURE__*/_createClass(function CommonHeaderGoods(options) {
577
- var _this = this,
578
- _GoodHeaderMap$this$t;
579
- _classCallCheck(this, CommonHeaderGoods);
580
- _defineProperty(this, "name", void 0);
581
- _defineProperty(this, "id", void 0);
582
- _defineProperty(this, "sortField", void 0);
583
- _defineProperty(this, "type", void 0);
584
- _defineProperty(this, "componentConfig", void 0);
585
- _defineProperty(this, "align", void 0);
586
- _defineProperty(this, "width", void 0);
587
- _defineProperty(this, "isCombinationComponent", void 0);
588
- _defineProperty(this, "formField", void 0);
589
- _defineProperty(this, "canSort", void 0);
590
- _defineProperty(this, "children", void 0);
591
- _defineProperty(this, "dataType", void 0);
592
- _defineProperty(this, "itemKey", void 0);
593
- _defineProperty(this, "getParentId", function () {
594
- var _this$id$split = _this.id.split("_"),
595
- _this$id$split2 = _slicedToArray(_this$id$split, 3),
596
- key = _this$id$split2[0],
597
- name = _this$id$split2[1],
598
- code = _this$id$split2[2];
599
- return "".concat(key, "_").concat(name);
600
- });
601
- _defineProperty(this, "renderClient", function (record) {
602
- return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
603
- id: _this.id,
604
- label: _this.name,
605
- value: _this.getComponentValue(record)
606
- }) : null;
607
- });
608
- _defineProperty(this, "renderPc", function (value, record) {
609
- var _this$getComponentVal;
610
- return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
611
- });
612
- _defineProperty(this, "renderLog", function (r) {
613
- var id = _this.getParentId();
614
- if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
615
- return _this.renderPc(undefined, r);
616
- });
617
- _defineProperty(this, "getComponentValue", function (r) {
618
- var id = _this.getParentId();
619
- var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
620
- next[GoodHeaderMap[_this.type].moneyKey] && prv.push(next[GoodHeaderMap[_this.type].moneyKey]);
621
- return prv;
622
- }, []);
623
- return list.join(",");
624
- });
625
- _defineProperty(this, "renderExport", function (value, record) {
626
- var _this$getComponentVal2;
627
- return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
628
- });
629
- _defineProperty(this, "editRender", function () {
630
- return null;
631
- });
632
- _defineProperty(this, "filterConfig", function () {
633
- return [];
634
- });
635
- this.name = options.name;
636
- this.id = options.id;
637
- this.sortField = options.id;
638
- this.formField = options.id;
639
- this.type = options.type;
640
- this.componentConfig = options.componentConfig;
641
- this.align = "left";
642
- this.width = 200;
643
- this.isCombinationComponent = true;
644
- this.canSort = false;
645
- this.dataType = "string";
646
- this.itemKey = (_GoodHeaderMap$this$t = GoodHeaderMap[this.type]) === null || _GoodHeaderMap$this$t === void 0 ? void 0 : _GoodHeaderMap$this$t.itemKey;
647
- this.children = _toConsumableArray(Object.keys(GoodHeaderMap[this.type].headerMap).reduce(function (prv, key) {
648
- var _options$componentCon, _options$componentCon2;
649
- if (options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && (_options$componentCon2 = _options$componentCon.showHeader) !== null && _options$componentCon2 !== void 0 && _options$componentCon2.includes(key)) {
650
- prv.push(new GoodHeaderMap[_this.type].headerMap[key].component(_objectSpread(_objectSpread({}, options), {}, {
651
- name: _this.itemKey[key],
652
- id: "".concat(options.id, "_").concat(GoodHeaderMap[_this.type].headerMap[key].key),
653
- width: GoodHeaderMap[_this.type].headerMap[key].width
654
- })));
575
+ GoodHeaderMap["WDT_REISSUE_GOODS"] = GoodHeaderMap["WDT_GOODS"];
576
+ var CommonHeaderGoods = /*#__PURE__*/function () {
577
+ function CommonHeaderGoods(options) {
578
+ var _this = this,
579
+ _GoodHeaderMap$this$t;
580
+ _classCallCheck(this, CommonHeaderGoods);
581
+ _defineProperty(this, "name", void 0);
582
+ _defineProperty(this, "id", void 0);
583
+ _defineProperty(this, "sortField", void 0);
584
+ _defineProperty(this, "type", void 0);
585
+ _defineProperty(this, "componentConfig", void 0);
586
+ _defineProperty(this, "align", void 0);
587
+ _defineProperty(this, "width", void 0);
588
+ _defineProperty(this, "isCombinationComponent", void 0);
589
+ _defineProperty(this, "formField", void 0);
590
+ _defineProperty(this, "canSort", void 0);
591
+ _defineProperty(this, "children", void 0);
592
+ _defineProperty(this, "dataType", void 0);
593
+ _defineProperty(this, "itemKey", void 0);
594
+ _defineProperty(this, "getParentId", function () {
595
+ var _this$id$split = _this.id.split("_"),
596
+ _this$id$split2 = _slicedToArray(_this$id$split, 3),
597
+ key = _this$id$split2[0],
598
+ name = _this$id$split2[1],
599
+ code = _this$id$split2[2];
600
+ return "".concat(key, "_").concat(name);
601
+ });
602
+ _defineProperty(this, "renderClient", function (record) {
603
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
604
+ id: _this.id,
605
+ label: _this.name,
606
+ value: _this.getComponentValue(record)
607
+ }) : null;
608
+ });
609
+ _defineProperty(this, "renderPc", function (value, record) {
610
+ var _this$getComponentVal;
611
+ return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
612
+ });
613
+ _defineProperty(this, "renderLog", function (r) {
614
+ var id = _this.getParentId();
615
+ if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
616
+ return _this.renderPc(undefined, r);
617
+ });
618
+ _defineProperty(this, "getComponentValue", function (r) {
619
+ var id = _this.getParentId();
620
+ var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
621
+ next[GoodHeaderMap[_this.type].moneyKey] && prv.push(next[GoodHeaderMap[_this.type].moneyKey]);
622
+ return prv;
623
+ }, []);
624
+ return list.join(",");
625
+ });
626
+ _defineProperty(this, "renderExport", function (value, record) {
627
+ var _this$getComponentVal2;
628
+ return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
629
+ });
630
+ _defineProperty(this, "editRender", function () {
631
+ return null;
632
+ });
633
+ _defineProperty(this, "filterConfig", function () {
634
+ return [];
635
+ });
636
+ this.name = options.name;
637
+ this.id = options.id;
638
+ this.sortField = options.id;
639
+ this.formField = options.id;
640
+ this.type = options.type;
641
+ this.componentConfig = options.componentConfig;
642
+ this.align = "left";
643
+ this.width = 200;
644
+ this.isCombinationComponent = true;
645
+ this.canSort = false;
646
+ this.dataType = "string";
647
+ this.itemKey = (_GoodHeaderMap$this$t = GoodHeaderMap[this.type]) === null || _GoodHeaderMap$this$t === void 0 ? void 0 : _GoodHeaderMap$this$t.itemKey;
648
+ this.children = this.getChildren(options);
649
+ }
650
+ _createClass(CommonHeaderGoods, [{
651
+ key: "getChildren",
652
+ value: function getChildren(options) {
653
+ var _options$componentCon,
654
+ _this2 = this;
655
+ var showHeader = options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader;
656
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
657
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
658
+ var dataIndexList = [];
659
+ if (isStringArray) {
660
+ dataIndexList = showHeader;
661
+ } else if (isObjectArray) {
662
+ dataIndexList = showHeader.map(function (item) {
663
+ return item.dataIndex;
664
+ });
665
+ }
666
+ var getKeyIndex = function getKeyIndex(id) {
667
+ return dataIndexList.indexOf(id.split("_").pop() || "");
668
+ };
669
+ var list = _toConsumableArray(Object.keys(GoodHeaderMap[this.type].headerMap).reduce(function (prv, key) {
670
+ if (Array.isArray(showHeader) && (isStringArray && showHeader.includes(key) || isObjectArray && showHeader.filter(function (item) {
671
+ return item.show !== false;
672
+ }).map(function (item) {
673
+ return item.dataIndex;
674
+ }).includes(key))) {
675
+ prv.push(new GoodHeaderMap[_this2.type].headerMap[key].component(_objectSpread(_objectSpread({}, options), {}, {
676
+ name: _this2.itemKey[key],
677
+ id: "".concat(options.id, "_").concat(GoodHeaderMap[_this2.type].headerMap[key].key),
678
+ width: GoodHeaderMap[_this2.type].headerMap[key].width
679
+ })));
680
+ }
681
+ return prv;
682
+ }, []).sort(function (a, b) {
683
+ if (Array.isArray(showHeader)) {
684
+ return getKeyIndex(a.id) - getKeyIndex(b.id);
685
+ }
686
+ }));
687
+ return list;
655
688
  }
656
- return prv;
657
- }, []));
658
- });
689
+ }]);
690
+ return CommonHeaderGoods;
691
+ }();
659
692
  export default CommonHeaderGoods;
@@ -1,18 +1,18 @@
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 CommonMultiStatus implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface['componentConfig'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
10
  align: ALignType;
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface['dataType'];
15
+ dataType: ComponentInterface["dataType"];
16
16
  isSingleValue: boolean;
17
17
  constructor(options: PickOption);
18
18
  renderClient: (record: any) => React.JSX.Element | null;
@@ -8,104 +8,108 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  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; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  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); }
11
- import React from 'react';
12
- import some from 'lodash/some';
11
+ import React from "react";
12
+ import some from "lodash/some";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import { CommonOrderContent } from "../Common";
15
- import { CommonMultiStatus as Status } from '@kmkf-fe-packages/basic-components';
15
+ import { CommonMultiStatus as Status } from "@kmkf-fe-packages/basic-components";
16
16
  import ItemView from "../../commonComponents/ItemView";
17
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
17
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import { SYMBOL } from "../../constant";
19
19
  var typeMap = {
20
20
  RETURN_GOODS_STATUS: {
21
21
  options: [{
22
- value: '成功',
23
- label: '成功',
24
- color: '#52c41a'
22
+ value: "成功",
23
+ label: "成功",
24
+ color: "#52c41a"
25
25
  }, {
26
- value: '失败',
27
- label: '失败',
28
- color: '#ff4d4f'
26
+ value: "失败",
27
+ label: "失败",
28
+ color: "#ff4d4f"
29
29
  }],
30
- key: 'returnGoodsStatusList',
31
- code: 'returnGoodsStatusValue',
32
- name: '退货状态',
30
+ key: "returnGoodsStatusList",
31
+ code: "returnGoodsStatusValue",
32
+ name: "退货状态",
33
33
  type: 1,
34
- valueKey: 'status',
35
- idKey: 'systemOrderId',
36
- failValue: '失败'
34
+ valueKey: "status",
35
+ idKey: "systemOrderId",
36
+ failValue: "失败"
37
37
  },
38
38
  EXCHANGE_STATUS: {
39
39
  options: [{
40
- value: '成功',
41
- label: '成功',
42
- color: '#52c41a'
40
+ value: "成功",
41
+ label: "成功",
42
+ color: "#52c41a"
43
43
  }, {
44
- value: '失败',
45
- label: '失败',
46
- color: '#ff4d4f'
44
+ value: "失败",
45
+ label: "失败",
46
+ color: "#ff4d4f"
47
47
  }],
48
- key: 'exchangeReason',
49
- code: 'exchangeStatusValue',
50
- name: '换货状态',
48
+ key: "exchangeReason",
49
+ code: "exchangeStatusValue",
50
+ name: "换货状态",
51
51
  type: 1,
52
- valueKey: 'status',
53
- idKey: 'systemOrderId',
54
- failValue: '失败'
52
+ valueKey: "status",
53
+ idKey: "systemOrderId",
54
+ failValue: "失败"
55
55
  },
56
56
  WAREHOUSING_STATUS: {
57
57
  options: [{
58
- value: '2',
59
- label: '已入库',
60
- color: '#52c41a'
58
+ value: "2",
59
+ label: "已入库",
60
+ color: "#52c41a"
61
61
  }, {
62
- value: '1',
63
- label: '部分入库',
64
- color: '#e7780f'
62
+ value: "1",
63
+ label: "部分入库",
64
+ color: "#e7780f"
65
65
  }, {
66
- value: '0',
67
- label: '未入库',
68
- color: '#ff4d4f'
66
+ value: "0",
67
+ label: "未入库",
68
+ color: "#ff4d4f"
69
69
  }],
70
- key: 'inStockStatusItemList',
71
- code: 'inStockStatusList',
72
- name: '商品入库状态(勿填)',
70
+ key: "inStockStatusItemList",
71
+ code: "inStockStatusList",
72
+ name: "商品入库状态(勿填)",
73
73
  type: 2,
74
- valueKey: 'status',
75
- idKey: 'systemOrderId',
76
- failValue: '失败'
74
+ valueKey: "status",
75
+ idKey: "systemOrderId",
76
+ failValue: "失败",
77
+ dataType: "array_object"
77
78
  },
78
79
  BS_E3_WAREHOUSING_STATUS: {
79
80
  options: [{
80
- value: '2',
81
- label: '已入库',
82
- color: '#52c41a'
81
+ value: "2",
82
+ label: "已入库",
83
+ color: "#52c41a"
83
84
  }, {
84
- value: '1',
85
- label: '部分入库',
86
- color: '#e7780f'
85
+ value: "1",
86
+ label: "部分入库",
87
+ color: "#e7780f"
87
88
  }, {
88
- value: '0',
89
- label: '未入库',
90
- color: '#ff4d4f'
89
+ value: "0",
90
+ label: "未入库",
91
+ color: "#ff4d4f"
91
92
  }, {
92
- value: '3',
93
- label: '已退回给客户',
94
- color: '#1B5BF3'
93
+ value: "3",
94
+ label: "已退回给客户",
95
+ color: "#1B5BF3"
95
96
  }],
96
- key: 'bsE3InStockStatusItemList',
97
- code: 'bsE3InStockStatusList',
98
- name: '商品入库状态',
97
+ key: "bsE3InStockStatusItemList",
98
+ code: "bsE3InStockStatusList",
99
+ name: "商品入库状态",
99
100
  type: 2,
100
- valueKey: 'status',
101
- idKey: 'systemOrderId',
102
- failValue: '失败'
101
+ valueKey: "status",
102
+ idKey: "systemOrderId",
103
+ failValue: "失败",
104
+ dataType: "array_object"
103
105
  }
104
106
  };
105
107
  var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
106
108
  var _this = this,
107
109
  _typeMap$options$type,
108
110
  _typeMap$options$type2,
111
+ _typeMap$options$type3,
112
+ _typeMap$options$type4,
109
113
  _this$componentConfig5,
110
114
  _this$componentConfig6;
111
115
  _classCallCheck(this, CommonMultiStatus);
@@ -176,10 +180,10 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
176
180
  });
177
181
  if (_this.isSingleValue) {
178
182
  var _typeMap$_this$type15;
179
- return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || '';
183
+ return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || "";
180
184
  }
181
- return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.valueKey]) || '');
182
- }).join(',');
185
+ return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.valueKey]) || "");
186
+ }).join(",");
183
187
  });
184
188
  _defineProperty(this, "editRender", function (p) {
185
189
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type18;
@@ -190,7 +194,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
190
194
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
191
195
  display: p === null || p === void 0 ? void 0 : p.display,
192
196
  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,
193
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
197
+ tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
194
198
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
195
199
  type: (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.type,
196
200
  failValue: typeMap[_this.type].failValue
@@ -200,16 +204,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
200
204
  _defineProperty(this, "filterConfig", function (item) {
201
205
  var _typeMap$_this$type19, _item$templateConfig;
202
206
  return {
203
- searchDefaultConditions: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
207
+ searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
204
208
  type: item.type,
205
209
  id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code),
206
210
  name: "".concat(_this.name),
207
- filterComponentType: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? 'MultipleSelect' : 'SelectInput',
211
+ filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
208
212
  props: {
209
213
  options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
210
214
  fieldNames: {
211
- label: 'label',
212
- value: 'value'
215
+ label: "label",
216
+ value: "value"
213
217
  }
214
218
  },
215
219
  filterFn: function filterFn(value) {
@@ -218,8 +222,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
218
222
  return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.code), value);
219
223
  };
220
224
  },
221
- formatFilterValue: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? null : function (value) {
222
- if (value.type === 'keywords') {
225
+ formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
226
+ if (value.type === "keywords") {
223
227
  return value.keywords;
224
228
  } else {
225
229
  return value;
@@ -238,7 +242,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
238
242
  this.isCombinationComponent = false;
239
243
  this.canSort = false;
240
244
  this.children = [];
241
- this.dataType = 'object';
245
+ this.dataType = (_typeMap$options$type3 = (_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.dataType) !== null && _typeMap$options$type3 !== void 0 ? _typeMap$options$type3 : "object";
242
246
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
243
247
  required: true,
244
248
  validator: function validator(_, value) {
@@ -253,7 +257,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
253
257
  return Promise.resolve();
254
258
  }
255
259
  }] : [];
256
- this.align = 'left';
257
- this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === 'BS_E3_WAREHOUSING_STATUS';
260
+ this.align = "left";
261
+ this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === "BS_E3_WAREHOUSING_STATUS";
258
262
  });
259
263
  export default CommonMultiStatus;
@@ -1,3 +1,3 @@
1
1
  import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, AfterSalesOrderId, BsE3Goods, BsE3Reissue, MemberLevel } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsGoods | BsSystemOrder | BsE3Goods | BsE3Reissue | CommonMultiStatus | JstLogistics | JstSendGood | Label | MemberLevel | MsgStatus | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | AfterSalesOrderId;
3
+ export declare const factory: (type: string, options: PickOption) => BsGoods | BsSystemOrder | BsE3Goods | BsE3Reissue | CommonMultiStatus | JstSendGood | MemberLevel | MsgStatus | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSupply | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | AfterSalesOrderId;
@@ -1,6 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import type { FormInstance } from "antd";
3
3
  import { SYMBOL } from "./constant";
4
+ export declare type ShowHeaderObjType = {
5
+ title: string;
6
+ dataIndex: string;
7
+ show?: boolean;
8
+ };
4
9
  export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
5
10
  export declare type ALignType = "left" | "right" | "center";
6
11
  export declare type QuerySymbol = keyof typeof SYMBOL;
@@ -176,7 +181,7 @@ export interface ComponentInterface {
176
181
  */
177
182
  erpFlag?: boolean;
178
183
  reissueFlag?: boolean;
179
- showHeader?: string[];
184
+ showHeader?: (ShowHeaderObjType | string)[];
180
185
  reasonList?: any[];
181
186
  disabled?: boolean;
182
187
  config?: any;
@@ -270,7 +275,7 @@ export interface ComponentInterface {
270
275
  getComponentValue: (r: Record) => any;
271
276
  formDataTransform?: (r: any) => any;
272
277
  }
273
- export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width" | "flowTemplateKey" | "transformValue">;
278
+ export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width" | "flowTemplateKey" | "transformValue" | "renderExport">;
274
279
  export declare type ColumnConfig = {
275
280
  id: string;
276
281
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.22.6",
3
+ "version": "1.23.1",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "1.22.6",
25
- "@kmkf-fe-packages/kmkf-utils": "1.22.6",
24
+ "@kmkf-fe-packages/basic-components": "1.23.1",
25
+ "@kmkf-fe-packages/kmkf-utils": "1.23.0",
26
26
  "b64-to-blob": "^1.2.19",
27
27
  "html2canvas": "^1.4.1",
28
28
  "react-pdf-js": "^5.1.0"
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "295d7af78c1cba683897c4dc4f0fc8764ec2f465",
44
+ "gitHead": "194a57251ac83b99ad01b9bd215e94527aa740fa",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }