@kmkf-fe-packages/services-components 1.22.1-beta.3 → 1.22.1-beta.30

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.
Files changed (33) hide show
  1. package/dist/esm/commonComponents/ShopList/index.d.ts +2 -1
  2. package/dist/esm/commonComponents/ShopList/index.js +5 -5
  3. package/dist/esm/components/BS/BsGoods/dist/index.js +113 -0
  4. package/dist/esm/components/BS/BsGoods/index.js +6 -2
  5. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +5 -5
  6. package/dist/esm/components/BS/BsSystemOrder/index.js +37 -15
  7. package/dist/esm/components/BS/common/BsHeaderChild.d.ts +6 -4
  8. package/dist/esm/components/BS/common/BsHeaderChild.js +20 -9
  9. package/dist/esm/components/BS/common/BsHeaderGood.d.ts +1 -0
  10. package/dist/esm/components/BS/common/BsHeaderGood.js +178 -101
  11. package/dist/esm/components/BsE3/BsGoods/index.js +1 -1
  12. package/dist/esm/components/BsE3/BsReissueE3/index.js +1 -1
  13. package/dist/esm/components/Common/dist/index.js +1525 -0
  14. package/dist/esm/components/Common/index.d.ts +6 -5
  15. package/dist/esm/components/Common/index.js +502 -361
  16. package/dist/esm/components/CommonHeaderGood/index copy.d.ts +27 -0
  17. package/dist/esm/components/CommonHeaderGood/index copy.js +659 -0
  18. package/dist/esm/components/CommonHeaderGood/index.d.ts +1 -0
  19. package/dist/esm/components/CommonHeaderGood/index.js +126 -93
  20. package/dist/esm/components/CommonMultiStatus/index.d.ts +1 -0
  21. package/dist/esm/components/CommonMultiStatus/index.js +43 -14
  22. package/dist/esm/components/JST/JstSendGood/index.js +1 -1
  23. package/dist/esm/components/MemberLevel/index.d.ts +35 -0
  24. package/dist/esm/components/MemberLevel/index.js +119 -0
  25. package/dist/esm/components/Payment/PaymentAmount.d.ts +0 -1
  26. package/dist/esm/components/Payment/PaymentAmount.js +0 -4
  27. package/dist/esm/components/Radio/index.js +3 -2
  28. package/dist/esm/factory.d.ts +2 -2
  29. package/dist/esm/factory.js +4 -1
  30. package/dist/esm/index.d.ts +1 -0
  31. package/dist/esm/index.js +1 -0
  32. package/dist/esm/type.d.ts +7 -2
  33. package/package.json +4 -4
@@ -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;
@@ -13,6 +13,7 @@ declare class CommonMultiStatus implements ComponentInterface {
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
15
  dataType: ComponentInterface['dataType'];
16
+ isSingleValue: boolean;
16
17
  constructor(options: PickOption);
17
18
  renderClient: (record: any) => React.JSX.Element | null;
18
19
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -74,13 +74,40 @@ var typeMap = {
74
74
  valueKey: 'status',
75
75
  idKey: 'systemOrderId',
76
76
  failValue: '失败'
77
+ },
78
+ BS_E3_WAREHOUSING_STATUS: {
79
+ options: [{
80
+ value: '2',
81
+ label: '已入库',
82
+ color: '#52c41a'
83
+ }, {
84
+ value: '1',
85
+ label: '部分入库',
86
+ color: '#e7780f'
87
+ }, {
88
+ value: '0',
89
+ label: '未入库',
90
+ color: '#ff4d4f'
91
+ }, {
92
+ value: '3',
93
+ label: '已退回给客户',
94
+ color: '#1B5BF3'
95
+ }],
96
+ key: 'bsE3InStockStatusItemList',
97
+ code: 'bsE3InStockStatusList',
98
+ name: '商品入库状态',
99
+ type: 2,
100
+ valueKey: 'status',
101
+ idKey: 'systemOrderId',
102
+ failValue: '失败'
77
103
  }
78
104
  };
79
105
  var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
80
106
  var _this = this,
81
107
  _typeMap$options$type,
82
108
  _typeMap$options$type2,
83
- _this$componentConfig8;
109
+ _this$componentConfig5,
110
+ _this$componentConfig6;
84
111
  _classCallCheck(this, CommonMultiStatus);
85
112
  _defineProperty(this, "name", void 0);
86
113
  _defineProperty(this, "id", void 0);
@@ -94,8 +121,9 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
94
121
  _defineProperty(this, "canSort", void 0);
95
122
  _defineProperty(this, "children", void 0);
96
123
  _defineProperty(this, "dataType", void 0);
124
+ _defineProperty(this, "isSingleValue", void 0);
97
125
  _defineProperty(this, "renderClient", function (record) {
98
- var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3, _this$componentConfig;
126
+ var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3;
99
127
  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) {
100
128
  return !isNull(item);
101
129
  }) : false;
@@ -107,12 +135,12 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
107
135
  valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey,
108
136
  failValue: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.failValue,
109
137
  options: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.options,
110
- isShowPopover: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.belongType) !== "wdt"
138
+ isShowPopover: !_this.isSingleValue
111
139
  })
112
140
  }) : null;
113
141
  });
114
142
  _defineProperty(this, "renderPc", function (value, record) {
115
- var _typeMap$_this$type4, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7, _this$componentConfig2;
143
+ var _typeMap$_this$type4, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7;
116
144
  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)];
117
145
  //兼容多个商品
118
146
  return /*#__PURE__*/React.createElement("span", {
@@ -124,7 +152,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
124
152
  valueKey: (_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.valueKey,
125
153
  failValue: (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.failValue,
126
154
  options: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.options,
127
- isShowPopover: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.belongType) !== "wdt"
155
+ isShowPopover: !_this.isSingleValue
128
156
  }));
129
157
  });
130
158
  _defineProperty(this, "renderLog", function (r) {
@@ -141,12 +169,12 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
141
169
  var _typeMap$_this$type10;
142
170
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
143
171
  return (list || []).map(function (item) {
144
- var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _this$componentConfig3, _typeMap$_this$type16, _typeMap$_this$type17;
172
+ var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type16, _typeMap$_this$type17;
145
173
  var currentOption = (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : (_typeMap$_this$type12 = _typeMap$_this$type11.options) === null || _typeMap$_this$type12 === void 0 ? void 0 : (_typeMap$_this$type13 = _typeMap$_this$type12.find) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.call(_typeMap$_this$type12, function (option) {
146
174
  var _typeMap$_this$type14;
147
175
  return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
148
176
  });
149
- if (((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.belongType) === "wdt") {
177
+ if (_this.isSingleValue) {
150
178
  var _typeMap$_this$type15;
151
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]) || '';
152
180
  }
@@ -154,15 +182,15 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
154
182
  }).join(',');
155
183
  });
156
184
  _defineProperty(this, "editRender", function (p) {
157
- var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7, _typeMap$_this$type18;
185
+ var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type18;
158
186
  return /*#__PURE__*/React.createElement(GetFormItem, {
159
187
  title: _this.name,
160
188
  name: _this.id,
161
189
  rules: _this.rules,
162
190
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
163
191
  display: p === null || p === void 0 ? void 0 : p.display,
164
- required: (_this$componentConfig4 = (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.required) !== null && _this$componentConfig4 !== void 0 ? _this$componentConfig4 : false,
165
- tooltip: (_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.showTooltip ? (_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.tooltip : '',
192
+ 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 : '',
166
194
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
167
195
  type: (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.type,
168
196
  failValue: typeMap[_this.type].failValue
@@ -172,11 +200,11 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
172
200
  _defineProperty(this, "filterConfig", function (item) {
173
201
  var _typeMap$_this$type19, _item$templateConfig;
174
202
  return {
175
- searchDefaultConditions: _this.type === 'WAREHOUSING_STATUS' ? SYMBOL.in : SYMBOL.like,
203
+ searchDefaultConditions: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
176
204
  type: item.type,
177
205
  id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code),
178
206
  name: "".concat(_this.name),
179
- filterComponentType: _this.type === 'WAREHOUSING_STATUS' ? 'MultipleSelect' : 'SelectInput',
207
+ filterComponentType: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? 'MultipleSelect' : 'SelectInput',
180
208
  props: {
181
209
  options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
182
210
  fieldNames: {
@@ -190,7 +218,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
190
218
  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);
191
219
  };
192
220
  },
193
- formatFilterValue: _this.type === 'WAREHOUSING_STATUS' ? null : function (value) {
221
+ formatFilterValue: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? null : function (value) {
194
222
  if (value.type === 'keywords') {
195
223
  return value.keywords;
196
224
  } else {
@@ -211,7 +239,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
211
239
  this.canSort = false;
212
240
  this.children = [];
213
241
  this.dataType = 'object';
214
- this.rules = (_this$componentConfig8 = this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.required ? [{
242
+ this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
215
243
  required: true,
216
244
  validator: function validator(_, value) {
217
245
  var hasNo = (value || []).some(function (item) {
@@ -226,5 +254,6 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
226
254
  }
227
255
  }] : [];
228
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';
229
258
  });
230
259
  export default CommonMultiStatus;
@@ -160,7 +160,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
160
160
  });
161
161
  _defineProperty(this, "filterConfig", function (item) {
162
162
  var _typeMap$_this$type8, _typeMap$_this$type9, _typeMap$_this$type11;
163
- return [_this.type === 'WDT_SEND_GOOD' || _this.type === 'BS_E3_SEND_GOOD' ? {
163
+ return [_this.type === 'WDT_SEND_GOOD' || _this.type === 'BS_E3_SEND_GOOD' || _this.type === 'KM_SEND_GOOD' ? {
164
164
  searchDefaultConditions: SYMBOL.in,
165
165
  type: item.type,
166
166
  id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.sendName),
@@ -0,0 +1,35 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
+ declare class MemberLevel implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ rules: any[];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ isCombinationComponent: boolean;
11
+ formField: string;
12
+ canSort: boolean;
13
+ children: ComponentInterface[];
14
+ dataType: ComponentInterface["dataType"];
15
+ options: ComponentInterface["options"];
16
+ constructor(options: PickOption);
17
+ getComponentValue: (r: Record) => any;
18
+ editRender: (p: any) => React.JSX.Element;
19
+ renderClient: (record: any) => React.JSX.Element | null;
20
+ renderPc: (value: any, record: Record) => React.JSX.Element;
21
+ renderLog: (r: Record) => React.JSX.Element | null;
22
+ renderExport: (value: any, record: Record) => any;
23
+ filterConfig: (item: ColumnConfig) => {
24
+ searchDefaultConditions: "in";
25
+ type: string;
26
+ id: string;
27
+ name: string;
28
+ filterComponentType: "MultipleSelect";
29
+ props: {
30
+ options: any;
31
+ };
32
+ filterFn: (value: string) => (i: Record) => boolean;
33
+ };
34
+ }
35
+ export default MemberLevel;
@@ -0,0 +1,119 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ 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); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ 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; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ 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); }
8
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
9
+ import React from "react";
10
+ import { Select } from "antd";
11
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
12
+ import intersection from "lodash/intersection";
13
+ import GetFormItem from "../GetFormItem";
14
+ import ItemView from "../../commonComponents/ItemView";
15
+ import { SYMBOL } from "../../constant";
16
+ var EditRenderItem = function EditRenderItem(props) {
17
+ var value = props.value;
18
+ return /*#__PURE__*/React.createElement(Select, _extends({}, props, {
19
+ value: value,
20
+ mode: "multiple"
21
+ }));
22
+ };
23
+ var MemberLevel = /*#__PURE__*/_createClass(function MemberLevel(options) {
24
+ var _this = this,
25
+ _this$componentConfig5;
26
+ _classCallCheck(this, MemberLevel);
27
+ _defineProperty(this, "name", void 0);
28
+ _defineProperty(this, "id", void 0);
29
+ _defineProperty(this, "sortField", void 0);
30
+ _defineProperty(this, "type", void 0);
31
+ _defineProperty(this, "rules", void 0);
32
+ _defineProperty(this, "componentConfig", void 0);
33
+ _defineProperty(this, "isCombinationComponent", void 0);
34
+ _defineProperty(this, "formField", void 0);
35
+ _defineProperty(this, "canSort", void 0);
36
+ _defineProperty(this, "children", void 0);
37
+ _defineProperty(this, "dataType", void 0);
38
+ _defineProperty(this, "options", void 0);
39
+ _defineProperty(this, "getComponentValue", function (r) {
40
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_memberLevel")];
41
+ });
42
+ _defineProperty(this, "editRender", function (p) {
43
+ var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
44
+ return /*#__PURE__*/React.createElement(GetFormItem, {
45
+ title: _this.name,
46
+ name: _this.id,
47
+ rules: _this.rules,
48
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
49
+ display: p === null || p === void 0 ? void 0 : p.display,
50
+ 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,
51
+ 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 : "",
52
+ component: /*#__PURE__*/React.createElement(EditRenderItem, _extends({}, _this.componentConfig, {
53
+ placeholder: "\u8BF7\u9009\u62E9\u4F1A\u5458\u7B49\u7EA7",
54
+ showSearch: true,
55
+ onChange: p === null || p === void 0 ? void 0 : p.onChange,
56
+ options: _this.options,
57
+ optionFilterProp: "label"
58
+ }))
59
+ });
60
+ });
61
+ _defineProperty(this, "renderClient", function (record) {
62
+ var _record;
63
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
64
+ id: _this.id,
65
+ label: _this.name,
66
+ value: record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_memberLevel")]) === null || _record === void 0 ? void 0 : _record.join("、")
67
+ }) : null;
68
+ });
69
+ _defineProperty(this, "renderPc", function (value, record) {
70
+ var _record2;
71
+ if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_memberLevel")])) {
72
+ return /*#__PURE__*/React.createElement("span", null, "--");
73
+ }
74
+ return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id, "_memberLevel")]) === null || _record2 === void 0 ? void 0 : _record2.join("、"));
75
+ });
76
+ _defineProperty(this, "renderLog", function (r) {
77
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_memberLevel")])) return null;
78
+ return _this.renderPc(undefined, r);
79
+ });
80
+ _defineProperty(this, "renderExport", function (value, record) {
81
+ var _record3;
82
+ if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_memberLevel")])) {
83
+ return "--";
84
+ }
85
+ return record === null || record === void 0 ? void 0 : (_record3 = record["".concat(_this.id, "_memberLevel")]) === null || _record3 === void 0 ? void 0 : _record3.join("、");
86
+ });
87
+ _defineProperty(this, "filterConfig", function (item) {
88
+ return {
89
+ searchDefaultConditions: SYMBOL.in,
90
+ type: item.type,
91
+ id: "".concat(item.id, "_memberLevel"),
92
+ // 过滤组件id
93
+ name: item.name,
94
+ // 过滤组件名称
95
+ filterComponentType: "MultipleSelect",
96
+ props: {
97
+ options: _this.options || []
98
+ },
99
+ filterFn: function filterFn(value) {
100
+ return function (i) {
101
+ return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "memberLevel")).length > 0;
102
+ };
103
+ }
104
+ };
105
+ });
106
+ this.name = options.name;
107
+ this.id = options.id;
108
+ this.sortField = options.id;
109
+ this.formField = "".concat(options.id, "_memberLevel");
110
+ this.type = options.type;
111
+ this.componentConfig = options.componentConfig;
112
+ this.rules = [];
113
+ this.isCombinationComponent = false;
114
+ this.canSort = false;
115
+ this.children = [];
116
+ this.dataType = "array";
117
+ this.options = ((_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.options) || [];
118
+ });
119
+ export default MemberLevel;
@@ -36,6 +36,5 @@ declare class PaymentAmount implements ComponentInterface {
36
36
  formatFilterValue: (val: Array<number | null>) => (number | null)[];
37
37
  filterFn: (value: string) => (i: Record) => boolean;
38
38
  };
39
- formDataTransform: (value: string) => string | number;
40
39
  }
41
40
  export default PaymentAmount;
@@ -132,10 +132,6 @@ var PaymentAmount = /*#__PURE__*/_createClass(function PaymentAmount(options) {
132
132
  }
133
133
  };
134
134
  });
135
- _defineProperty(this, "formDataTransform", function (value) {
136
- var isNumber = new RegExp(/^[+-]?\d+(\.\d+)?$/);
137
- return isNumber.test(value) ? Number(value) : value;
138
- });
139
135
  this.name = '打款金额';
140
136
  this.id = "".concat(options.id, "_enterprisePaymentRefundFee");
141
137
  this.sortField = "".concat(options.id, "_enterprisePaymentRefundFee");