@kmkf-fe-packages/services-components 2.10.9-beta.8 → 2.10.9-beta.81

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 (88) hide show
  1. package/dist/esm/Hooks/useColumnsConfig.d.ts +1 -1
  2. package/dist/esm/Hooks/useColumnsConfig.js +1 -1
  3. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
  4. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +3 -2
  5. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +13 -12
  6. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +12 -9
  7. package/dist/esm/components/BS/BsExchange/index.d.ts +7 -0
  8. package/dist/esm/components/BS/BsExchange/index.js +6 -0
  9. package/dist/esm/components/BS/BsGoods/index.d.ts +7 -0
  10. package/dist/esm/components/BS/BsGoods/index.js +6 -0
  11. package/dist/esm/components/BS/BsLogistics/index.js +9 -0
  12. package/dist/esm/components/BS/BsReissue/index.d.ts +7 -0
  13. package/dist/esm/components/BS/BsReissue/index.js +6 -0
  14. package/dist/esm/components/BS/BsReturn/index.d.ts +7 -0
  15. package/dist/esm/components/BS/BsReturn/index.js +6 -0
  16. package/dist/esm/components/BS/BsSystemOrder/index.js +8 -4
  17. package/dist/esm/components/BS/common/expressCode.js +3 -0
  18. package/dist/esm/components/BS/common/expressCompany.js +3 -0
  19. package/dist/esm/components/BsE3/BsGoods/index.d.ts +7 -0
  20. package/dist/esm/components/BsE3/BsGoods/index.js +6 -0
  21. package/dist/esm/components/BsE3/BsReissueE3/index.d.ts +7 -0
  22. package/dist/esm/components/BsE3/BsReissueE3/index.js +6 -0
  23. package/dist/esm/components/Common/constants/columnsBaseInfoMap.d.ts +6 -0
  24. package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +18 -2
  25. package/dist/esm/components/Common/constants/wdt.js +13 -3
  26. package/dist/esm/components/Common/index.d.ts +1 -1
  27. package/dist/esm/components/Common/index.js +28 -9
  28. package/dist/esm/components/CommonHeaderGood/index.js +97 -42
  29. package/dist/esm/components/CommonMultiStatus/index.d.ts +4 -1
  30. package/dist/esm/components/CommonMultiStatus/index.js +123 -6
  31. package/dist/esm/components/GY/GyGoods/index.d.ts +7 -0
  32. package/dist/esm/components/GY/GyGoods/index.js +6 -0
  33. package/dist/esm/components/GY/GyReissue/index.d.ts +7 -0
  34. package/dist/esm/components/GY/GyReissue/index.js +7 -3
  35. package/dist/esm/components/GY/GyReturn/index.d.ts +7 -0
  36. package/dist/esm/components/GY/GyReturn/index.js +7 -3
  37. package/dist/esm/components/JST/JstSendGood/index.d.ts +2 -1
  38. package/dist/esm/components/JST/JstSendGood/index.js +16 -2
  39. package/dist/esm/components/JST/JstSupply/index.d.ts +1 -1
  40. package/dist/esm/components/JST/JstSupply/index.js +3 -0
  41. package/dist/esm/components/KM/KmExchange/index.d.ts +7 -0
  42. package/dist/esm/components/KM/KmExchange/index.js +6 -0
  43. package/dist/esm/components/KmErpSendGood/index.d.ts +1 -1
  44. package/dist/esm/components/KmErpSendGood/index.js +3 -0
  45. package/dist/esm/components/LogisticsInterception/index.d.ts +3 -0
  46. package/dist/esm/components/LogisticsInterception/index.js +14 -7
  47. package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.d.ts +42 -0
  48. package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.js +102 -0
  49. package/dist/esm/components/LogisticsMoreInterception/index.d.ts +2 -0
  50. package/dist/esm/components/LogisticsMoreInterception/index.js +19 -5
  51. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsCustomerCode.d.ts +39 -0
  52. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsCustomerCode.js +101 -0
  53. package/dist/esm/components/MsgStatus/index.d.ts +1 -1
  54. package/dist/esm/components/MsgStatus/index.js +19 -12
  55. package/dist/esm/components/MultSelect/index.d.ts +1 -0
  56. package/dist/esm/components/MultSelect/index.js +17 -10
  57. package/dist/esm/components/Public/AsyncSelect/index.js +23 -22
  58. package/dist/esm/components/Public/Exchange/index.d.ts +14 -7
  59. package/dist/esm/components/Public/Exchange/index.js +19 -15
  60. package/dist/esm/components/Public/Goods/index.js +31 -18
  61. package/dist/esm/components/Public/ReissueGoods/index.d.ts +7 -0
  62. package/dist/esm/components/Public/ReissueGoods/index.js +7 -3
  63. package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +1 -1
  64. package/dist/esm/components/Public/ReturnWarehouse/index.js +3 -0
  65. package/dist/esm/components/Reissue/Logistics/index.d.ts +1 -1
  66. package/dist/esm/components/Reissue/Logistics/index.js +3 -0
  67. package/dist/esm/components/Remark/index.d.ts +4 -1
  68. package/dist/esm/components/Remark/index.js +46 -9
  69. package/dist/esm/components/SKX/SkxGoods/index.d.ts +7 -0
  70. package/dist/esm/components/SKX/SkxGoods/index.js +6 -0
  71. package/dist/esm/components/Select/index.js +6 -0
  72. package/dist/esm/components/StatusSelect/index.d.ts +27 -1
  73. package/dist/esm/components/StatusSelect/index.js +44 -5
  74. package/dist/esm/components/WDT/WdtExchange/index.d.ts +7 -0
  75. package/dist/esm/components/WDT/WdtExchange/index.js +6 -0
  76. package/dist/esm/components/WDT/WdtGoods/index.d.ts +7 -0
  77. package/dist/esm/components/WDT/WdtGoods/index.js +6 -0
  78. package/dist/esm/components/WDT/WdtRessuie/index.d.ts +7 -0
  79. package/dist/esm/components/WDT/WdtRessuie/index.js +7 -3
  80. package/dist/esm/components/WDT/WdtReturn/index.d.ts +7 -0
  81. package/dist/esm/components/WDT/WdtReturn/index.js +6 -0
  82. package/dist/esm/constant.js +0 -3
  83. package/dist/esm/factory.d.ts +1 -1
  84. package/dist/esm/factory.js +17 -1
  85. package/dist/esm/service/api.d.ts +1 -0
  86. package/dist/esm/service/api.js +6 -0
  87. package/dist/esm/type.d.ts +2 -0
  88. package/package.json +4 -4
@@ -0,0 +1,42 @@
1
+ import { ALignType, ColumnConfig, ComponentInterface, PickOption, Record } from "../../type";
2
+ import React from "react";
3
+ declare class InterceptLogisticsCustomerCode implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ rules: any[];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ effects: ComponentInterface["effects"];
11
+ align: ALignType;
12
+ width: number;
13
+ isCombinationComponent: boolean;
14
+ formField: string;
15
+ canSort: boolean;
16
+ children: ComponentInterface[];
17
+ dataType: ComponentInterface["dataType"];
18
+ options: ComponentInterface["options"];
19
+ optionsMap: {
20
+ [key: string]: string;
21
+ };
22
+ constructor(options: PickOption);
23
+ getComponentValue: (record: Record) => string;
24
+ renderClient: (record: Record) => React.JSX.Element | null;
25
+ renderPc: (_value: any, record: Record) => string;
26
+ renderLog: (record: Record) => any;
27
+ renderExport: (_value: any, record: Record) => string;
28
+ editRender: () => null;
29
+ filterConfig: (item: ColumnConfig) => {
30
+ searchDefaultConditions: "in";
31
+ type: string;
32
+ id: string;
33
+ name: string;
34
+ filterComponentType: "MultipleSelect";
35
+ props: {
36
+ options: any[];
37
+ };
38
+ formatFilterValue: (value: string[]) => string[];
39
+ filterFn: (value: string[]) => (record: Record) => boolean;
40
+ };
41
+ }
42
+ export default InterceptLogisticsCustomerCode;
@@ -0,0 +1,102 @@
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ 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); } }
5
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
+ 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; }
8
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
9
+ 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); }
10
+ import React from "react";
11
+ import ItemView from "../../commonComponents/ItemView";
12
+ import { filterFn as _filterFn, getJdCustomerCodeOptions, isNull, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
13
+ import { SYMBOL } from "../../constant";
14
+ var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function InterceptLogisticsCustomerCode(options) {
15
+ var _this = this;
16
+ _classCallCheck(this, InterceptLogisticsCustomerCode);
17
+ _defineProperty(this, "name", void 0);
18
+ _defineProperty(this, "id", void 0);
19
+ _defineProperty(this, "sortField", void 0);
20
+ _defineProperty(this, "type", void 0);
21
+ _defineProperty(this, "rules", void 0);
22
+ _defineProperty(this, "componentConfig", void 0);
23
+ _defineProperty(this, "effects", void 0);
24
+ _defineProperty(this, "align", void 0);
25
+ _defineProperty(this, "width", void 0);
26
+ _defineProperty(this, "isCombinationComponent", void 0);
27
+ _defineProperty(this, "formField", void 0);
28
+ _defineProperty(this, "canSort", void 0);
29
+ _defineProperty(this, "children", void 0);
30
+ _defineProperty(this, "dataType", void 0);
31
+ _defineProperty(this, "options", void 0);
32
+ _defineProperty(this, "optionsMap", void 0);
33
+ _defineProperty(this, "getComponentValue", function (record) {
34
+ return _this.optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]];
35
+ });
36
+ _defineProperty(this, "renderClient", function (record) {
37
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
38
+ id: _this.id,
39
+ label: _this.name,
40
+ value: _this.optionsMap[record[_this.id]]
41
+ }) : null;
42
+ });
43
+ _defineProperty(this, "renderPc", function (_value, record) {
44
+ var _this$optionsMap$reco;
45
+ return (_this$optionsMap$reco = _this.optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]]) !== null && _this$optionsMap$reco !== void 0 ? _this$optionsMap$reco : "--";
46
+ });
47
+ _defineProperty(this, "renderLog", function (record) {
48
+ return isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? null : record[_this.id];
49
+ });
50
+ _defineProperty(this, "renderExport", function (_value, record) {
51
+ var _this$optionsMap$reco2;
52
+ return (_this$optionsMap$reco2 = _this.optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]]) !== null && _this$optionsMap$reco2 !== void 0 ? _this$optionsMap$reco2 : "--";
53
+ });
54
+ _defineProperty(this, "editRender", function () {
55
+ return null;
56
+ });
57
+ _defineProperty(this, "filterConfig", function (item) {
58
+ return {
59
+ searchDefaultConditions: SYMBOL.in,
60
+ type: item.type,
61
+ id: "".concat(item.id, "_interceptLogisticsCustomerCode"),
62
+ name: "".concat(item.name, "-\u5BA2\u6237\u7F16\u7801"),
63
+ filterComponentType: "MultipleSelect",
64
+ props: {
65
+ options: _this.options || []
66
+ },
67
+ formatFilterValue: function formatFilterValue(value) {
68
+ var _value$map;
69
+ return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (item) {
70
+ return item === null || item === void 0 ? void 0 : item.split(",");
71
+ })) === null || _value$map === void 0 ? void 0 : _value$map.flat();
72
+ },
73
+ filterFn: function filterFn(value) {
74
+ return function (record) {
75
+ var _value$map2, _value$map2$flat;
76
+ return value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (item) {
77
+ return item === null || item === void 0 ? void 0 : item.split(",");
78
+ })) === null || _value$map2 === void 0 ? void 0 : (_value$map2$flat = _value$map2.flat()) === null || _value$map2$flat === void 0 ? void 0 : _value$map2$flat.includes(_filterFn.filterTableListItemColumnValue(record, item.id, "interceptLogisticsCustomerCode"));
79
+ };
80
+ }
81
+ };
82
+ });
83
+ this.name = "客户编码";
84
+ this.id = "".concat(options.id, "_interceptLogisticsCustomerCode");
85
+ this.sortField = this.id;
86
+ this.formField = this.id;
87
+ this.type = options.type;
88
+ this.componentConfig = options.componentConfig;
89
+ this.rules = [];
90
+ this.align = "left";
91
+ this.width = 220;
92
+ this.isCombinationComponent = false;
93
+ this.canSort = true;
94
+ this.children = [];
95
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
96
+ this.dataType = "string";
97
+ this.options = getJdCustomerCodeOptions(LogisticsAddressData.getInstance().getAddressData() || []);
98
+ this.optionsMap = (this.options || []).reduce(function (cur, nxt) {
99
+ return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, nxt.value, nxt.label));
100
+ }, {});
101
+ });
102
+ export default InterceptLogisticsCustomerCode;
@@ -9,6 +9,7 @@ import InterceptStatus from "./InterceptStatus";
9
9
  import InterceptCode from "./interceptCode";
10
10
  import InterceptApiStatus from "./InterceptApiStatus";
11
11
  import Express from "./interceptCompany";
12
+ import InterceptLogisticsCustomerCode from "./interceptLogisticsCustomerCode";
12
13
  declare class Logistics implements ComponentInterface {
13
14
  name: string;
14
15
  columnHeader: string | JSX.Element;
@@ -23,6 +24,7 @@ declare class Logistics implements ComponentInterface {
23
24
  interceptApiStatus: InterceptApiStatus;
24
25
  interceptSenderMobile: InterceptSenderMobile;
25
26
  interceptSnapshot: InterceptSnapshot;
27
+ interceptLogisticsCustomerCode: InterceptLogisticsCustomerCode;
26
28
  isCombinationComponent: boolean;
27
29
  formField: string;
28
30
  canSort: boolean;
@@ -11,7 +11,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
11
11
  import React from "react";
12
12
  import { Space } from "antd";
13
13
  import { LogisticsMoreInterception } from "@kmkf-fe-packages/basic-components";
14
- import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData } from "@kmkf-fe-packages/kmkf-utils";
14
+ import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData, isJdLogisticsCompany } from "@kmkf-fe-packages/kmkf-utils";
15
15
  import ItemView from "../../commonComponents/ItemView";
16
16
  import GetFormItem from "../GetFormItem";
17
17
  import InterceptSenderMobile from "./interceptSenderMobile";
@@ -25,6 +25,7 @@ import Express from "./interceptCompany";
25
25
  import ColumnHeader from "./columnHeader";
26
26
  import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
27
27
  import CopyText from "../../commonComponents/CopyText";
28
+ import InterceptLogisticsCustomerCode from "./interceptLogisticsCustomerCode";
28
29
  // import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
29
30
  // import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
30
31
  var Logistics = /*#__PURE__*/_createClass(
@@ -49,6 +50,7 @@ function Logistics(options) {
49
50
  _defineProperty(this, "interceptApiStatus", void 0);
50
51
  _defineProperty(this, "interceptSenderMobile", void 0);
51
52
  _defineProperty(this, "interceptSnapshot", void 0);
53
+ _defineProperty(this, "interceptLogisticsCustomerCode", void 0);
52
54
  _defineProperty(this, "isCombinationComponent", void 0);
53
55
  _defineProperty(this, "formField", void 0);
54
56
  _defineProperty(this, "canSort", void 0);
@@ -75,7 +77,7 @@ function Logistics(options) {
75
77
  text: item.interceptCode
76
78
  })) : null, (_item$interceptAddres = item.interceptAddress) !== null && _item$interceptAddres !== void 0 && _item$interceptAddres.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", /*#__PURE__*/React.createElement(CopyText, {
77
79
  text: "".concat(addressText, "\n ").concat(item.interceptDetail, " ").concat(item.interceptReceiverName, "\n ").concat(item.interceptReceiverMobile)
78
- })) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
80
+ })) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsCustomerCode ? /*#__PURE__*/React.createElement("div", null, "\u5BA2\u6237\u7F16\u7801\uFF1A", item.interceptLogisticsCustomerCode) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
79
81
  modelWidth: 500,
80
82
  interceptCompany: item.interceptCompany,
81
83
  interceptCode: item.interceptCode,
@@ -128,7 +130,7 @@ function Logistics(options) {
128
130
  subKey: "logisticsInterceptCompanyList"
129
131
  })), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
130
132
  subKey: "logisticsInterceptCodeList"
131
- })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
133
+ })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptLogisticsCustomerCode.filterConfig(item)];
132
134
  });
133
135
  this.name = options.name;
134
136
  this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
@@ -150,6 +152,7 @@ function Logistics(options) {
150
152
  this.interceptApiStatus = new InterceptApiStatus(options);
151
153
  this.interceptSenderMobile = new InterceptSenderMobile(options);
152
154
  this.interceptSnapshot = new InterceptSnapshot(options);
155
+ this.interceptLogisticsCustomerCode = new InterceptLogisticsCustomerCode(options);
153
156
  // this.interceptLogisticsUserKCode = new InterceptLogisticsUserKCode(options);
154
157
  // this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(
155
158
  // options
@@ -165,7 +168,7 @@ function Logistics(options) {
165
168
  this.isCombinationComponent = true;
166
169
  this.canSort = false;
167
170
  this.dataType = "object";
168
- this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot
171
+ this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptLogisticsCustomerCode
169
172
  // this.interceptLogisticsUserKCode,
170
173
  // this.interceptLogisticsUserSecretKey,
171
174
  ];
@@ -179,7 +182,7 @@ function Logistics(options) {
179
182
  return Promise.reject(new Error("请填写物流信息"));
180
183
  }
181
184
  if (value.some(function (t) {
182
- return !(t !== null && t !== void 0 && t.interceptType);
185
+ return !isJdLogisticsCompany(t === null || t === void 0 ? void 0 : t.interceptCompany) && !(t !== null && t !== void 0 && t.interceptType);
183
186
  })) {
184
187
  return Promise.reject(new Error("请选择拦截类型"));
185
188
  }
@@ -220,6 +223,17 @@ function Logistics(options) {
220
223
  return Promise.resolve();
221
224
  }
222
225
  }] : [];
226
+ this.rules.unshift({
227
+ validator: function validator(_) {
228
+ var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
229
+ if (value.some(function (item) {
230
+ return isJdLogisticsCompany(item === null || item === void 0 ? void 0 : item.interceptCompany) && !(item !== null && item !== void 0 && item.interceptLogisticsCustomerCode);
231
+ })) {
232
+ return Promise.reject(new Error("请选择客户编码"));
233
+ }
234
+ return Promise.resolve();
235
+ }
236
+ });
223
237
  this.addressDateInstance = AddressData.getInstance();
224
238
  });
225
239
  export default Logistics;
@@ -0,0 +1,39 @@
1
+ import { ALignType, ColumnConfig, ComponentInterface, PickOption, Record } from "../../type";
2
+ declare class InterceptLogisticsCustomerCode implements ComponentInterface {
3
+ name: string;
4
+ id: string;
5
+ sortField: string;
6
+ type: string;
7
+ rules: any[];
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ effects: ComponentInterface["effects"];
10
+ align: ALignType;
11
+ width: number;
12
+ isCombinationComponent: boolean;
13
+ formField: string;
14
+ canSort: boolean;
15
+ children: ComponentInterface[];
16
+ dataType: ComponentInterface["dataType"];
17
+ options: ComponentInterface["options"];
18
+ constructor(options: PickOption);
19
+ getComponentValue: (record: Record) => any;
20
+ renderCustomerCodes: (record: Record) => any;
21
+ renderClient: () => null;
22
+ renderPc: (_value: any, record: Record) => any;
23
+ renderLog: () => null;
24
+ renderExport: (_value: any, record: Record) => any;
25
+ editRender: () => null;
26
+ filterConfig: (item: ColumnConfig) => {
27
+ searchDefaultConditions: "in";
28
+ type: string;
29
+ id: string;
30
+ name: string;
31
+ filterComponentType: "MultipleSelect";
32
+ props: {
33
+ options: any[];
34
+ };
35
+ formatFilterValue: (value: string[]) => string[];
36
+ filterFn: (value: string[]) => (record: Record) => boolean;
37
+ };
38
+ }
39
+ export default InterceptLogisticsCustomerCode;
@@ -0,0 +1,101 @@
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
+ import React from "react";
9
+ import { filterFn as _filterFn, getJdCustomerCodeOptions, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
10
+ import { SYMBOL } from "../../constant";
11
+ var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function InterceptLogisticsCustomerCode(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, InterceptLogisticsCustomerCode);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "sortField", void 0);
17
+ _defineProperty(this, "type", void 0);
18
+ _defineProperty(this, "rules", void 0);
19
+ _defineProperty(this, "componentConfig", void 0);
20
+ _defineProperty(this, "effects", void 0);
21
+ _defineProperty(this, "align", void 0);
22
+ _defineProperty(this, "width", void 0);
23
+ _defineProperty(this, "isCombinationComponent", void 0);
24
+ _defineProperty(this, "formField", void 0);
25
+ _defineProperty(this, "canSort", void 0);
26
+ _defineProperty(this, "children", void 0);
27
+ _defineProperty(this, "dataType", void 0);
28
+ _defineProperty(this, "options", void 0);
29
+ _defineProperty(this, "getComponentValue", function (record) {
30
+ return ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_logisticsInterceptList")]) || []).map(function (item) {
31
+ return item === null || item === void 0 ? void 0 : item.interceptLogisticsCustomerCode;
32
+ }).filter(Boolean).join(",");
33
+ });
34
+ _defineProperty(this, "renderCustomerCodes", function (record) {
35
+ var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_logisticsInterceptList")]) || [];
36
+ return list.map(function (item, index) {
37
+ return /*#__PURE__*/React.createElement("div", {
38
+ key: "".concat((item === null || item === void 0 ? void 0 : item.interceptCode) || "customer-code", "-").concat(index)
39
+ }, "\u5305\u88F9".concat(index + 1, ":"), (item === null || item === void 0 ? void 0 : item.interceptLogisticsCustomerCode) || "--");
40
+ });
41
+ });
42
+ _defineProperty(this, "renderClient", function () {
43
+ return null;
44
+ });
45
+ _defineProperty(this, "renderPc", function (_value, record) {
46
+ return _this.renderCustomerCodes(record);
47
+ });
48
+ _defineProperty(this, "renderLog", function () {
49
+ return null;
50
+ });
51
+ _defineProperty(this, "renderExport", function (_value, record) {
52
+ return _this.getComponentValue(record) || "--";
53
+ });
54
+ _defineProperty(this, "editRender", function () {
55
+ return null;
56
+ });
57
+ _defineProperty(this, "filterConfig", function (item) {
58
+ return {
59
+ searchDefaultConditions: SYMBOL.in,
60
+ type: item.type,
61
+ id: "".concat(item.id, "_logisticsInterceptCustomerCodeList"),
62
+ name: "".concat(item.name, "-\u5BA2\u6237\u7F16\u7801"),
63
+ filterComponentType: "MultipleSelect",
64
+ props: {
65
+ options: _this.options || []
66
+ },
67
+ formatFilterValue: function formatFilterValue(value) {
68
+ var _value$map;
69
+ return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (option) {
70
+ return option === null || option === void 0 ? void 0 : option.split(",");
71
+ })) === null || _value$map === void 0 ? void 0 : _value$map.flat();
72
+ },
73
+ filterFn: function filterFn(value) {
74
+ return function (record) {
75
+ var _value$map2, _value$map2$flat;
76
+ return value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (option) {
77
+ return option === null || option === void 0 ? void 0 : option.split(",");
78
+ })) === null || _value$map2 === void 0 ? void 0 : (_value$map2$flat = _value$map2.flat()) === null || _value$map2$flat === void 0 ? void 0 : _value$map2$flat.some(function (customerCode) {
79
+ return "".concat(_filterFn.filterTableListItemColumnValue(record, item.id, "logisticsInterceptCustomerCodeList")).split(",").includes(customerCode);
80
+ });
81
+ };
82
+ }
83
+ };
84
+ });
85
+ this.name = "客户编码";
86
+ this.id = options.id;
87
+ this.sortField = "".concat(options.id, "_logisticsInterceptCustomerCodeList");
88
+ this.formField = this.sortField;
89
+ this.type = options.type;
90
+ this.componentConfig = options.componentConfig;
91
+ this.rules = [];
92
+ this.align = "left";
93
+ this.width = 220;
94
+ this.isCombinationComponent = false;
95
+ this.canSort = true;
96
+ this.children = [];
97
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
98
+ this.dataType = "string";
99
+ this.options = getJdCustomerCodeOptions(LogisticsAddressData.getInstance().getAddressData() || []);
100
+ });
101
+ export default InterceptLogisticsCustomerCode;
@@ -21,7 +21,7 @@ declare class MsgStatus implements ComponentInterface {
21
21
  renderPc: (value: any, record: Record) => React.JSX.Element;
22
22
  renderLog: (r: Record) => React.JSX.Element | null;
23
23
  getComponentValue: (r: Record) => any;
24
- renderExport: (value: any, record: any) => any;
24
+ renderExport: (value: any, record: any) => string;
25
25
  editRender: (p: any) => React.JSX.Element;
26
26
  filterConfig: (item: ColumnConfig) => {
27
27
  searchDefaultConditions: "in";
@@ -16,6 +16,7 @@ import { MsgStatus as Status } from "@kmkf-fe-packages/basic-components";
16
16
  import ItemView from "../../commonComponents/ItemView";
17
17
  import { isNull, filterFn as _filterFn, msgTypeCh } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import { SYMBOL } from "../../constant";
19
+ import { isString } from "lodash";
19
20
  var typeMap = {
20
21
  MSG_STATUS: {
21
22
  options: [{
@@ -119,18 +120,24 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
119
120
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.key)];
120
121
  });
121
122
  _defineProperty(this, "renderExport", function (value, record) {
122
- var _typeMap$_this$type10;
123
- 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)];
124
- return (list || []).map(function (item) {
125
- var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type15;
126
- 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) {
127
- var _typeMap$_this$type14;
128
- return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
129
- });
130
- var key = item.msgType || "ding";
131
- var statusMsg = "".concat(msgTypeCh[key]).concat(item.ruleName ? "-".concat(item.ruleName) : "", ":").concat(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]) || "");
132
- return item.failReason ? "".concat(statusMsg, "\uFF0C\u5931\u8D25\u539F\u56E0\uFF1A").concat(item.failReason) : statusMsg;
133
- }).join(",");
123
+ var _record, _typeMap$_this$type10;
124
+ var list = (_record = 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)]) !== null && _record !== void 0 ? _record : [];
125
+ if (Array.isArray(list)) {
126
+ return list.map(function (item) {
127
+ var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type15;
128
+ 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) {
129
+ var _typeMap$_this$type14;
130
+ return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
131
+ });
132
+ var key = item.msgType || "ding";
133
+ var statusMsg = "".concat(msgTypeCh[key]).concat(item.ruleName ? "-".concat(item.ruleName) : "", ":").concat(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]) || "");
134
+ return item.failReason ? "".concat(statusMsg, "\uFF0C\u5931\u8D25\u539F\u56E0\uFF1A").concat(item.failReason) : statusMsg;
135
+ }).join(",");
136
+ }
137
+ if (isString(list)) {
138
+ return list;
139
+ }
140
+ return '';
134
141
  });
135
142
  _defineProperty(this, "editRender", function (p) {
136
143
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type16;
@@ -16,6 +16,7 @@ declare class BasicMultSelect implements ComponentInterface {
16
16
  standardDateType: ComponentInterface["standardDateType"];
17
17
  exampleValue: ComponentInterface["exampleValue"];
18
18
  constructor(options: PickOption);
19
+ getFieldKey: (type: string) => "jyAbnormalFlag" | "basicMultSelect";
19
20
  renderClient: (record: any) => React.JSX.Element | null;
20
21
  renderPc: (value: any, record: Record) => React.JSX.Element;
21
22
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -31,6 +31,9 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
31
31
  _defineProperty(this, "options", void 0);
32
32
  _defineProperty(this, "standardDateType", void 0);
33
33
  _defineProperty(this, "exampleValue", void 0);
34
+ _defineProperty(this, "getFieldKey", function (type) {
35
+ return type === "JY_ABNORMAL_FLAG" ? "jyAbnormalFlag" : "basicMultSelect";
36
+ });
34
37
  _defineProperty(this, "renderClient", function (record) {
35
38
  var _record$_this$id;
36
39
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -41,24 +44,26 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
41
44
  });
42
45
  _defineProperty(this, "renderPc", function (value, record) {
43
46
  var _record;
44
- if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")])) {
47
+ var fieldKey = _this.getFieldKey(_this.type);
48
+ if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(fieldKey)])) {
45
49
  return /*#__PURE__*/React.createElement("span", null, "--");
46
50
  }
47
- return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_basicMultSelect")]) === null || _record === void 0 ? void 0 : _record.join(","));
51
+ return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_").concat(fieldKey)]) === null || _record === void 0 ? void 0 : _record.join(","));
48
52
  });
49
53
  _defineProperty(this, "renderLog", function (r) {
50
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_basicMultSelect")])) return null;
54
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.getFieldKey(_this.type))])) return null;
51
55
  return _this.renderPc(undefined, r);
52
56
  });
53
57
  _defineProperty(this, "getComponentValue", function (r) {
54
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_basicMultSelect")];
58
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.getFieldKey(_this.type))];
55
59
  });
56
60
  _defineProperty(this, "renderExport", function (value, record) {
57
61
  var _record2;
58
- if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")])) {
62
+ var fieldKey = _this.getFieldKey(_this.type);
63
+ if (isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(fieldKey)])) {
59
64
  return "--";
60
65
  }
61
- return record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id, "_basicMultSelect")]) === null || _record2 === void 0 ? void 0 : _record2.join(",");
66
+ return record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id, "_").concat(fieldKey)]) === null || _record2 === void 0 ? void 0 : _record2.join(",");
62
67
  });
63
68
  _defineProperty(this, "editRender", function (p) {
64
69
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
@@ -77,10 +82,11 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
77
82
  });
78
83
  _defineProperty(this, "filterConfig", function (item) {
79
84
  var _item$config;
85
+ var fieldKey = _this.getFieldKey(item.type);
80
86
  return {
81
87
  searchDefaultConditions: SYMBOL.in,
82
88
  type: item.type,
83
- id: "".concat(item.id, "_basicMultSelect"),
89
+ id: "".concat(item.id, "_").concat(fieldKey),
84
90
  // 过滤组件id
85
91
  name: item.name,
86
92
  // 过滤组件名称
@@ -90,16 +96,17 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
90
96
  },
91
97
  filterFn: function filterFn(value) {
92
98
  return function (i) {
93
- return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "basicMultSelect")).length > 0;
99
+ return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, fieldKey)).length > 0;
94
100
  };
95
101
  }
96
102
  };
97
103
  });
98
104
  this.name = options.name;
99
105
  this.id = options.id;
100
- this.sortField = "".concat(options.id, "_basicMultSelect");
101
- this.formField = "".concat(options.id, "_basicMultSelect");
102
106
  this.type = options.type;
107
+ var _fieldKey = this.getFieldKey(options.type);
108
+ this.sortField = "".concat(options.id, "_").concat(_fieldKey);
109
+ this.formField = "".concat(options.id, "_").concat(_fieldKey);
103
110
  this.componentConfig = options.componentConfig;
104
111
  this.rules = [];
105
112
  this.isCombinationComponent = false;
@@ -14,7 +14,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
14
14
  import React from "react";
15
15
  import GetFormItem from "../../GetFormItem";
16
16
  import { AsyncSelect as BasicAsyncSelect } from "@kmkf-fe-packages/basic-components";
17
- import { isNull, servers } from "@kmkf-fe-packages/kmkf-utils";
17
+ import { servers } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import ItemView from "../../../commonComponents/ItemView";
19
19
  import { filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
20
20
  import { SYMBOL } from "../../../constant";
@@ -30,26 +30,6 @@ var typeMap = {
30
30
  name: "旺店通标签",
31
31
  mode: "multiple",
32
32
  api: servers.WDT.getTagsDataAsync,
33
- //旗舰版暂时限制最多选择一个
34
- maxSelectCount: function maxSelectCount() {
35
- var version = "flagship";
36
- try {
37
- var userInfo = JSON.parse(localStorage.getItem("reduxData_userInfo") || "{}");
38
- if (isNull(userInfo)) {
39
- version = "flagship";
40
- } else {
41
- var _userInfo$companyUser, _companyUserConfig, _companyUserConfig$pl, _companyUserConfig$pl2;
42
- var companyUserConfig = (_userInfo$companyUser = userInfo === null || userInfo === void 0 ? void 0 : userInfo.companyUserConfig) !== null && _userInfo$companyUser !== void 0 ? _userInfo$companyUser : {};
43
- if (typeof companyUserConfig === "string") {
44
- companyUserConfig = JSON.parse(companyUserConfig);
45
- }
46
- version = ((_companyUserConfig = companyUserConfig) === null || _companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl = _companyUserConfig.plugins) === null || _companyUserConfig$pl === void 0 ? void 0 : (_companyUserConfig$pl2 = _companyUserConfig$pl.wdt) === null || _companyUserConfig$pl2 === void 0 ? void 0 : _companyUserConfig$pl2.version) || "flagship";
47
- }
48
- } catch (error) {
49
- console.error(error);
50
- }
51
- if (version === "flagship") return 1;
52
- },
53
33
  handleOptions: function handleOptions(options) {
54
34
  var ext = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
55
35
  var _ext$componentConfig = ext.componentConfig,
@@ -63,6 +43,27 @@ var typeMap = {
63
43
  }
64
44
  }
65
45
  };
46
+ var getWdtVersion = function getWdtVersion() {
47
+ try {
48
+ var _userInfo$companyUser, _companyUserConfig, _companyUserConfig$pl, _companyUserConfig2, _companyUserConfig2$p, _companyUserConfig2$p2;
49
+ var userInfo = JSON.parse(localStorage.getItem("reduxData_userInfo") || "{}");
50
+ var companyUserConfig = (_userInfo$companyUser = userInfo === null || userInfo === void 0 ? void 0 : userInfo.companyUserConfig) !== null && _userInfo$companyUser !== void 0 ? _userInfo$companyUser : {};
51
+ if (typeof companyUserConfig === "string") {
52
+ companyUserConfig = JSON.parse(companyUserConfig);
53
+ }
54
+ console.log("wdt---", (_companyUserConfig = companyUserConfig) === null || _companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl = _companyUserConfig.plugins) === null || _companyUserConfig$pl === void 0 ? void 0 : _companyUserConfig$pl.wdt);
55
+ return ((_companyUserConfig2 = companyUserConfig) === null || _companyUserConfig2 === void 0 ? void 0 : (_companyUserConfig2$p = _companyUserConfig2.plugins) === null || _companyUserConfig2$p === void 0 ? void 0 : (_companyUserConfig2$p2 = _companyUserConfig2$p.wdt) === null || _companyUserConfig2$p2 === void 0 ? void 0 : _companyUserConfig2$p2.version) || "flagship";
56
+ } catch (error) {
57
+ console.error(error);
58
+ return "flagship";
59
+ }
60
+ };
61
+ var getWdtTagsMaxSelectCount = function getWdtTagsMaxSelectCount() {
62
+ var componentConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
63
+ if (componentConfig.selectMode === "single") return 1;
64
+ if (componentConfig.selectMode === "multiple") return undefined;
65
+ return getWdtVersion() === "flagship" ? 1 : undefined;
66
+ };
66
67
  var AsyncSelect = /*#__PURE__*/function () {
67
68
  // options: ComponentInterface["options"];
68
69
 
@@ -198,7 +199,7 @@ var AsyncSelect = /*#__PURE__*/function () {
198
199
  this.rules = [];
199
200
  this.align = "left";
200
201
  this.mode = (_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.mode;
201
- this.maxSelectCount = typeof ((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.maxSelectCount) === "function" ? typeMap[options.type].maxSelectCount() : (_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.maxSelectCount;
202
+ this.maxSelectCount = options.type === "WDT_TAGS" ? getWdtTagsMaxSelectCount(this.componentConfig) : typeof ((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.maxSelectCount) === "function" ? typeMap[options.type].maxSelectCount() : (_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.maxSelectCount;
202
203
  this.getOptionsAsync().then(function (list) {
203
204
  _this.asyncOptions = list;
204
205
  });