@kmkf-fe-packages/services-components 1.22.1-beta.4 → 1.22.1-beta.41

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 (42) hide show
  1. package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
  2. package/dist/esm/commonComponents/GlobalContext/index.js +4 -2
  3. package/dist/esm/commonComponents/ShopList/index.d.ts +2 -1
  4. package/dist/esm/commonComponents/ShopList/index.js +5 -5
  5. package/dist/esm/components/BS/BsGoods/index.js +6 -2
  6. package/dist/esm/components/BS/BsLogistics/index.js +8 -1
  7. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +5 -5
  8. package/dist/esm/components/BS/BsSystemOrder/index.js +37 -15
  9. package/dist/esm/components/BS/common/BsHeaderChild.d.ts +6 -4
  10. package/dist/esm/components/BS/common/BsHeaderChild.js +20 -9
  11. package/dist/esm/components/BS/common/BsHeaderGood.d.ts +1 -0
  12. package/dist/esm/components/BS/common/BsHeaderGood.js +151 -101
  13. package/dist/esm/components/BS/common/expressCode.js +4 -1
  14. package/dist/esm/components/BS/common/expressCompany.js +3 -0
  15. package/dist/esm/components/BsE3/BsGoods/index.js +1 -1
  16. package/dist/esm/components/BsE3/BsReissueE3/index.js +1 -1
  17. package/dist/esm/components/Common/index.d.ts +6 -5
  18. package/dist/esm/components/Common/index.js +532 -364
  19. package/dist/esm/components/CommonHeaderGood/index.d.ts +1 -0
  20. package/dist/esm/components/CommonHeaderGood/index.js +126 -93
  21. package/dist/esm/components/CommonMultiStatus/index.d.ts +5 -4
  22. package/dist/esm/components/CommonMultiStatus/index.js +98 -65
  23. package/dist/esm/components/CommonSystemOrder/index.d.ts +4 -4
  24. package/dist/esm/components/CommonSystemOrder/index.js +25 -25
  25. package/dist/esm/components/EItemEnCode/index.d.ts +2 -1
  26. package/dist/esm/components/EItemEnCode/index.js +28 -29
  27. package/dist/esm/components/JST/JstSendGood/index.js +1 -1
  28. package/dist/esm/components/MemberLevel/index.d.ts +35 -0
  29. package/dist/esm/components/MemberLevel/index.js +119 -0
  30. package/dist/esm/components/Payment/PaymentAmount.d.ts +0 -1
  31. package/dist/esm/components/Payment/PaymentAmount.js +0 -4
  32. package/dist/esm/components/Radio/index.js +3 -2
  33. package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.d.ts +2 -2
  34. package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.js +3 -9
  35. package/dist/esm/factory.d.ts +2 -2
  36. package/dist/esm/factory.js +7 -4
  37. package/dist/esm/index.d.ts +2 -1
  38. package/dist/esm/index.js +2 -1
  39. package/dist/esm/service/api.d.ts +2 -0
  40. package/dist/esm/service/api.js +12 -0
  41. package/dist/esm/type.d.ts +7 -2
  42. package/package.json +4 -4
@@ -15,6 +15,7 @@ declare class CommonHeaderGoods implements ComponentInterface {
15
15
  dataType: ComponentInterface["dataType"];
16
16
  itemKey: any;
17
17
  constructor(options: PickOption);
18
+ getChildren(options: PickOption): any[];
18
19
  getParentId: () => string;
19
20
  renderClient: (record: any) => React.JSX.Element | null;
20
21
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
@@ -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,19 @@
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
+ 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;
@@ -8,79 +8,110 @@ 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"
78
+ },
79
+ BS_E3_WAREHOUSING_STATUS: {
80
+ options: [{
81
+ value: "2",
82
+ label: "已入库",
83
+ color: "#52c41a"
84
+ }, {
85
+ value: "1",
86
+ label: "部分入库",
87
+ color: "#e7780f"
88
+ }, {
89
+ value: "0",
90
+ label: "未入库",
91
+ color: "#ff4d4f"
92
+ }, {
93
+ value: "3",
94
+ label: "已退回给客户",
95
+ color: "#1B5BF3"
96
+ }],
97
+ key: "bsE3InStockStatusItemList",
98
+ code: "bsE3InStockStatusList",
99
+ name: "商品入库状态",
100
+ type: 2,
101
+ valueKey: "status",
102
+ idKey: "systemOrderId",
103
+ failValue: "失败",
104
+ dataType: "array_object"
77
105
  }
78
106
  };
79
107
  var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
80
108
  var _this = this,
81
109
  _typeMap$options$type,
82
110
  _typeMap$options$type2,
83
- _this$componentConfig8;
111
+ _typeMap$options$type3,
112
+ _typeMap$options$type4,
113
+ _this$componentConfig5,
114
+ _this$componentConfig6;
84
115
  _classCallCheck(this, CommonMultiStatus);
85
116
  _defineProperty(this, "name", void 0);
86
117
  _defineProperty(this, "id", void 0);
@@ -94,8 +125,9 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
94
125
  _defineProperty(this, "canSort", void 0);
95
126
  _defineProperty(this, "children", void 0);
96
127
  _defineProperty(this, "dataType", void 0);
128
+ _defineProperty(this, "isSingleValue", void 0);
97
129
  _defineProperty(this, "renderClient", function (record) {
98
- var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3, _this$componentConfig;
130
+ var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3;
99
131
  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
132
  return !isNull(item);
101
133
  }) : false;
@@ -107,12 +139,12 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
107
139
  valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey,
108
140
  failValue: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.failValue,
109
141
  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"
142
+ isShowPopover: !_this.isSingleValue
111
143
  })
112
144
  }) : null;
113
145
  });
114
146
  _defineProperty(this, "renderPc", function (value, record) {
115
- var _typeMap$_this$type4, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7, _this$componentConfig2;
147
+ var _typeMap$_this$type4, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7;
116
148
  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
149
  //兼容多个商品
118
150
  return /*#__PURE__*/React.createElement("span", {
@@ -124,7 +156,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
124
156
  valueKey: (_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.valueKey,
125
157
  failValue: (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.failValue,
126
158
  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"
159
+ isShowPopover: !_this.isSingleValue
128
160
  }));
129
161
  });
130
162
  _defineProperty(this, "renderLog", function (r) {
@@ -141,28 +173,28 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
141
173
  var _typeMap$_this$type10;
142
174
  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
175
  return (list || []).map(function (item) {
144
- var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _this$componentConfig3, _typeMap$_this$type16, _typeMap$_this$type17;
176
+ var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type16, _typeMap$_this$type17;
145
177
  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
178
  var _typeMap$_this$type14;
147
179
  return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
148
180
  });
149
- if (((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.belongType) === "wdt") {
181
+ if (_this.isSingleValue) {
150
182
  var _typeMap$_this$type15;
151
- 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]) || "";
152
184
  }
153
- 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]) || '');
154
- }).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(",");
155
187
  });
156
188
  _defineProperty(this, "editRender", function (p) {
157
- var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7, _typeMap$_this$type18;
189
+ var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type18;
158
190
  return /*#__PURE__*/React.createElement(GetFormItem, {
159
191
  title: _this.name,
160
192
  name: _this.id,
161
193
  rules: _this.rules,
162
194
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
163
195
  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 : '',
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,
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 : "",
166
198
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
167
199
  type: (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.type,
168
200
  failValue: typeMap[_this.type].failValue
@@ -172,16 +204,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
172
204
  _defineProperty(this, "filterConfig", function (item) {
173
205
  var _typeMap$_this$type19, _item$templateConfig;
174
206
  return {
175
- searchDefaultConditions: _this.type === 'WAREHOUSING_STATUS' ? SYMBOL.in : SYMBOL.like,
207
+ searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
176
208
  type: item.type,
177
209
  id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code),
178
210
  name: "".concat(_this.name),
179
- filterComponentType: _this.type === 'WAREHOUSING_STATUS' ? 'MultipleSelect' : 'SelectInput',
211
+ filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
180
212
  props: {
181
213
  options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
182
214
  fieldNames: {
183
- label: 'label',
184
- value: 'value'
215
+ label: "label",
216
+ value: "value"
185
217
  }
186
218
  },
187
219
  filterFn: function filterFn(value) {
@@ -190,8 +222,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
190
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);
191
223
  };
192
224
  },
193
- formatFilterValue: _this.type === 'WAREHOUSING_STATUS' ? null : function (value) {
194
- if (value.type === 'keywords') {
225
+ formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
226
+ if (value.type === "keywords") {
195
227
  return value.keywords;
196
228
  } else {
197
229
  return value;
@@ -210,8 +242,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
210
242
  this.isCombinationComponent = false;
211
243
  this.canSort = false;
212
244
  this.children = [];
213
- this.dataType = 'object';
214
- this.rules = (_this$componentConfig8 = this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.required ? [{
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";
246
+ this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
215
247
  required: true,
216
248
  validator: function validator(_, value) {
217
249
  var hasNo = (value || []).some(function (item) {
@@ -225,6 +257,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
225
257
  return Promise.resolve();
226
258
  }
227
259
  }] : [];
228
- this.align = 'left';
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";
229
262
  });
230
263
  export default CommonMultiStatus;
@@ -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 CommonSystemOrder 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
  constructor(options: PickOption);
17
17
  renderClient: (record: any) => React.JSX.Element | null;
18
18
  renderPc: (value: any, record: Record) => React.JSX.Element;