@kmkf-fe-packages/services-components 2.2.44-beta.8 → 2.2.44-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 (43) hide show
  1. package/dist/esm/Hooks/useColumnsConfig.d.ts +1 -1
  2. package/dist/esm/Hooks/useColumnsConfig.js +2 -2
  3. package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +52 -0
  4. package/dist/esm/commonComponents/GlobalContext/index.js +52 -19
  5. package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +180 -0
  6. package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +186 -0
  7. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +11 -10
  8. package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +2 -1
  9. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +4 -2
  10. package/dist/esm/components/BS/BsGoods/dist/index.js +113 -0
  11. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +8 -0
  12. package/dist/esm/components/BS/BsSystemOrder/index.js +43 -8
  13. package/dist/esm/components/BS/common/BsHeaderPic.js +4 -1
  14. package/dist/esm/components/BS/common/BsMemo.js +1 -0
  15. package/dist/esm/components/BS/common/BsType.js +1 -0
  16. package/dist/esm/components/BS/common/SystemOrderNo.js +1 -0
  17. package/dist/esm/components/Cascader/index.d.ts +8 -6
  18. package/dist/esm/components/Cascader/index.js +26 -22
  19. package/dist/esm/components/Common/dist/index.js +1019 -0
  20. package/dist/esm/components/Common/index.d.ts +1 -1
  21. package/dist/esm/components/Common/index.js +4 -3
  22. package/dist/esm/components/CommonHeaderGood/index.js +47 -3
  23. package/dist/esm/components/CommonMultiStatus/index.js +73 -36
  24. package/dist/esm/components/KM/KmExchange/index.d.ts +35 -0
  25. package/dist/esm/components/KM/KmExchange/index.js +136 -0
  26. package/dist/esm/components/Logistics/index.d.ts +1 -0
  27. package/dist/esm/components/Logistics/index.js +10 -0
  28. package/dist/esm/components/Payment/index.d.ts +13 -12
  29. package/dist/esm/components/Payment/index.js +31 -11
  30. package/dist/esm/components/PicturePro/index.d.ts +9 -0
  31. package/dist/esm/components/PicturePro/index.js +17 -0
  32. package/dist/esm/components/Public/Goods/index.d.ts +9 -0
  33. package/dist/esm/components/Public/Goods/index.js +23 -2
  34. package/dist/esm/components/Public/ReissueGoods/index.js +23 -5
  35. package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +51 -0
  36. package/dist/esm/components/Public/ReturnWarehouse/index.js +203 -0
  37. package/dist/esm/components/ReceiverAddress/index.d.ts +7 -6
  38. package/dist/esm/components/ReceiverAddress/index.js +41 -27
  39. package/dist/esm/factory.d.ts +2 -2
  40. package/dist/esm/factory.js +7 -1
  41. package/dist/esm/index.d.ts +2 -0
  42. package/dist/esm/index.js +2 -0
  43. package/package.json +4 -4
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+
3
+ var __assign = this && this.__assign || function () {
4
+ __assign = Object.assign || function (t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ exports.__esModule = true;
14
+ var react_1 = require("react");
15
+ var GetFormItem_1 = require("../../GetFormItem");
16
+ var Common_1 = require("../../Common");
17
+ var index_1 = require("../common/index");
18
+ var ItemView_1 = require("../../../commonComponents/ItemView");
19
+ var kmkf_utils_1 = require("@kmkf-fe-packages/kmkf-utils");
20
+ var basic_components_1 = require("@kmkf-fe-packages/basic-components");
21
+ var constant_1 = require("../../../constant");
22
+ var BsGoods = /** @class */function () {
23
+ function BsGoods(options) {
24
+ var _this = this;
25
+ var _a;
26
+ this.renderClient = function (record) {
27
+ var _a, _b;
28
+ console.log("in renderclient");
29
+ return !kmkf_utils_1.isNull(record === null || record === void 0 ? void 0 : record["" + _this.id]) ? react_1["default"].createElement(react_1["default"].Fragment, null, react_1["default"].createElement(ItemView_1["default"], {
30
+ id: _this.id,
31
+ label: _this.name,
32
+ value: react_1["default"].createElement(Common_1.BsGoodsTable, {
33
+ list: ((_a = record === null || record === void 0 ? void 0 : record["" + _this.id]) === null || _a === void 0 ? void 0 : _a.bsGoods) || [],
34
+ showHeader: ((_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.showHeader) || []
35
+ })
36
+ })) : null;
37
+ };
38
+ this.renderPc = function () {
39
+ return null;
40
+ };
41
+ this.renderLog = function (r) {
42
+ var _a;
43
+ console.log("in renderclient");
44
+ if (kmkf_utils_1.isNull(r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"])) return null;
45
+ return react_1["default"].createElement(Common_1.BsGoodsTable, {
46
+ list: (r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"]) || [],
47
+ showHeader: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showHeader) || []
48
+ });
49
+ };
50
+ this.getComponentValue = function (r) {
51
+ return r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"];
52
+ };
53
+ this.renderExport = function () {
54
+ return null;
55
+ };
56
+ this.editRender = function (p) {
57
+ var _a, _b, _c, _d, _e, _f;
58
+ console.log("in renderclient");
59
+ return react_1["default"].createElement(GetFormItem_1["default"], {
60
+ title: _this.name,
61
+ name: _this.id,
62
+ rules: _this.rules,
63
+ required: false,
64
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
65
+ display: p === null || p === void 0 ? void 0 : p.display,
66
+ tooltip: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showTooltip) ? (_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.tooltip : "",
67
+ component: react_1["default"].createElement(basic_components_1.BsGoods, __assign({}, _this.componentConfig, {
68
+ maxLength: ((_c = _this.componentConfig) === null || _c === void 0 ? void 0 : _c.maxLength) || 20,
69
+ shopId: (_d = _this.effects) === null || _d === void 0 ? void 0 : _d.shopId,
70
+ shopList: ((_e = _this.effects) === null || _e === void 0 ? void 0 : _e.shopList) || [],
71
+ companyKey: (_f = _this.effects) === null || _f === void 0 ? void 0 : _f.companyKey,
72
+ width: "90%"
73
+ }))
74
+ });
75
+ };
76
+ this.filterConfig = function (item) {
77
+ return [{
78
+ searchDefaultConditions: constant_1.SYMBOL.like,
79
+ type: item.type,
80
+ id: item.id + "_bsGoods",
81
+ name: item.name,
82
+ filterComponentType: "Input"
83
+ }];
84
+ };
85
+ this.name = options.name;
86
+ this.id = options.id;
87
+ this.sortField = options.id + "_bsGoods";
88
+ this.formField = options.id + "_bsGoods";
89
+ this.type = options.type;
90
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
91
+ this.isCombinationComponent = true;
92
+ this.canSort = false;
93
+ this.bsGoods = new index_1.BsHeaderGood(__assign(__assign({}, options), {
94
+ id: options.id + "_bsGoods",
95
+ name: "商品信息"
96
+ }));
97
+ this.children = [this.bsGoods];
98
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
99
+ this.rules = ((_a = this === null || this === void 0 ? void 0 : this.componentConfig) === null || _a === void 0 ? void 0 : _a.required) ? [{
100
+ required: true,
101
+ validator: function validator(_, value) {
102
+ var _a;
103
+ if (!value || !((_a = value === null || value === void 0 ? void 0 : value.bsGoods) === null || _a === void 0 ? void 0 : _a.length)) {
104
+ return Promise.reject(new Error("请选择bs商品"));
105
+ }
106
+ return Promise.resolve();
107
+ }
108
+ }] : [];
109
+ this.dataType = "object";
110
+ }
111
+ return BsGoods;
112
+ }();
113
+ exports["default"] = BsGoods;
@@ -13,7 +13,15 @@ declare class BsSystemOrder implements ComponentInterface {
13
13
  canSort: boolean;
14
14
  dataType: ComponentInterface["dataType"];
15
15
  children: ComponentInterface[];
16
+ sortChildField: {
17
+ name: string;
18
+ key: string;
19
+ dataType: string;
20
+ [key: string]: any;
21
+ }[];
22
+ compoundConfig: ComponentInterface["compoundConfig"];
16
23
  constructor(options: PickOption);
24
+ getSortChildFields: () => any;
17
25
  renderClient: (record: any) => React.JSX.Element | null;
18
26
  renderPc: () => null;
19
27
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -2,6 +2,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2
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
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
4
  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); }
5
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
9
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
+ 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; }
5
11
  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); } }
6
12
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
13
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -34,7 +40,9 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
34
40
  _getSystemShowHead,
35
41
  _typeMap$options$type,
36
42
  _options$componentCon,
37
- _this$componentConfig5;
43
+ _this$componentConfig6,
44
+ _typeMap$options$type2,
45
+ _typeMap$options$type3;
38
46
  _classCallCheck(this, BsSystemOrder);
39
47
  _defineProperty(this, "name", void 0);
40
48
  _defineProperty(this, "id", void 0);
@@ -48,15 +56,40 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
48
56
  _defineProperty(this, "canSort", void 0);
49
57
  _defineProperty(this, "dataType", void 0);
50
58
  _defineProperty(this, "children", void 0);
59
+ _defineProperty(this, "sortChildField", void 0);
60
+ _defineProperty(this, "compoundConfig", void 0);
61
+ _defineProperty(this, "getSortChildFields", function () {
62
+ var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3, _this$componentConfig;
63
+ return [{
64
+ name: "绑定订单号",
65
+ key: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.orderNo,
66
+ dataType: "string"
67
+ }, {
68
+ name: "选中系统订单号",
69
+ key: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.selectId,
70
+ dataType: "array"
71
+ }].concat(_toConsumableArray(getSystemShowHead({
72
+ columns: ((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.columns) || [],
73
+ showHeader: (_this === null || _this === void 0 ? void 0 : (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
74
+ }).filter(function (item) {
75
+ return !["picUrl"].includes(item.dataIndex);
76
+ }).map(function (item) {
77
+ return {
78
+ name: item.title,
79
+ key: "".concat(_this.id, "_").concat(item.dataIndex),
80
+ dataType: "arrayObject"
81
+ };
82
+ })));
83
+ });
51
84
  _defineProperty(this, "renderClient", function (record) {
52
- var _this$componentConfig;
85
+ var _this$componentConfig2;
53
86
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
54
87
  id: _this.id,
55
88
  label: _this.name,
56
89
  value: /*#__PURE__*/React.createElement(BsSystemOrderTable, {
57
90
  value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)],
58
91
  type: _this.type,
59
- showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
92
+ showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
60
93
  })
61
94
  })) : null;
62
95
  });
@@ -64,7 +97,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
64
97
  return null;
65
98
  });
66
99
  _defineProperty(this, "renderLog", function (r) {
67
- var _this$componentConfig2;
100
+ var _this$componentConfig3;
68
101
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)])) return null;
69
102
  return /*#__PURE__*/React.createElement(BsSystemOrderTable, {
70
103
  value: {
@@ -72,7 +105,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
72
105
  selectIds: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].selectId)]
73
106
  },
74
107
  type: _this.type,
75
- showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
108
+ showHeader: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader) || []
76
109
  });
77
110
  });
78
111
  _defineProperty(this, "getComponentValue", function (r) {
@@ -82,7 +115,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
82
115
  return null;
83
116
  });
84
117
  _defineProperty(this, "editRender", function (p) {
85
- var _this$componentConfig3, _this$componentConfig4;
118
+ var _this$componentConfig4, _this$componentConfig5;
86
119
  return /*#__PURE__*/React.createElement(GetFormItem, {
87
120
  title: _this.name,
88
121
  name: _this.id,
@@ -90,7 +123,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
90
123
  required: false,
91
124
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
92
125
  display: p === null || p === void 0 ? void 0 : p.display,
93
- 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 : "",
126
+ tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : "",
94
127
  component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
95
128
  onChange: p === null || p === void 0 ? void 0 : p.onChange,
96
129
  type: _this.type
@@ -132,7 +165,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
132
165
  }));
133
166
  })) || [];
134
167
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
135
- this.rules = this !== null && this !== void 0 && (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
168
+ this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
136
169
  required: true,
137
170
  validator: function validator(_, value) {
138
171
  var _value$selectIds;
@@ -143,5 +176,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
143
176
  }
144
177
  }] : [];
145
178
  this.dataType = "object";
179
+ this.sortChildField = this.getSortChildFields();
180
+ this.compoundConfig = (_typeMap$options$type2 = typeMap[options.type]) !== null && _typeMap$options$type2 !== void 0 && _typeMap$options$type2.compoundConfig ? (_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.compoundConfig(options.id) : [];
146
181
  });
147
182
  export default BsSystemOrder;
@@ -52,8 +52,11 @@ var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
52
52
  }) : null;
53
53
  });
54
54
  _defineProperty(this, "renderPc", function (value, record) {
55
+ var _picValue$split;
55
56
  var picValue = _this.getComponentValue(record);
56
- var imgList = picValue ? picValue === null || picValue === void 0 ? void 0 : picValue.split(",") : [];
57
+ var imgList = picValue ? picValue === null || picValue === void 0 ? void 0 : (_picValue$split = picValue.split(",http")) === null || _picValue$split === void 0 ? void 0 : _picValue$split.map(function (url, index) {
58
+ return index !== 0 ? "http".concat(url) : url;
59
+ }) : [];
57
60
  return BsGoodPic(imgList);
58
61
  });
59
62
  _defineProperty(this, "renderLog", function (r) {
@@ -26,6 +26,7 @@ var componentType = {
26
26
  JST_REISSUE_GOODS: "jstReissueType",
27
27
  JST_RETURN_GOODS: "jstReturnType",
28
28
  KM_REISSUE_GOODS: "kmReissueType",
29
+ KM_RETURN_GOODS: "kmReturnType",
29
30
  JY_REISSUE_GOODS: "jyReissueType",
30
31
  JKY_REISSUE_GOODS: "jkyReissueType"
31
32
  };
@@ -27,6 +27,7 @@ var componentType = {
27
27
  JST_REISSUE_GOODS: "jstReissueType",
28
28
  JST_RETURN_GOODS: "jstReturnType",
29
29
  KM_REISSUE_GOODS: "kmReissueType",
30
+ KM_RETURN_GOODS: "kmReturnType",
30
31
  JY_REISSUE_GOODS: "jyReissueType",
31
32
  JKY_REISSUE_GOODS: "jkyReissueType"
32
33
  };
@@ -22,6 +22,7 @@ var componentType = {
22
22
  JST_REISSUE_GOODS: "jstSystemOrderNo",
23
23
  JST_RETURN_GOODS: "jstSystemOrderNo",
24
24
  KM_REISSUE_GOODS: "kmSystemOrderNo",
25
+ KM_RETURN_GOODS: "kmSystemOrderNo",
25
26
  JY_REISSUE_GOODS: "jySystemOrderNo",
26
27
  JKY_REISSUE_GOODS: "jkySystemOrderNo"
27
28
  };
@@ -1,19 +1,21 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
3
  declare class BasicCascader 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
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
13
13
  children: ComponentInterface[];
14
- dataType: ComponentInterface["dataType"];
15
- format: ComponentInterface["format"];
16
- options: ComponentInterface["options"];
14
+ dataType: ComponentInterface['dataType'];
15
+ format: ComponentInterface['format'];
16
+ options: ComponentInterface['options'];
17
+ exampleValue?: string;
18
+ standardDateType: ComponentInterface['standardDateType'];
17
19
  constructor(options: PickOption);
18
20
  /**
19
21
  * 通过值计算展示内容
@@ -6,13 +6,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
- import React from "react";
10
- import { Cascader } from "antd";
11
- import intersection from "lodash/intersection";
9
+ import React from 'react';
10
+ import { Cascader } from 'antd';
11
+ import intersection from 'lodash/intersection';
12
12
  import GetFormItem from "../GetFormItem";
13
- import { findLabelBySelectValue, transMultSelectOptions, tree } from "@kmkf-fe-packages/kmkf-utils";
13
+ import { findLabelBySelectValue, transMultSelectOptions, tree } from '@kmkf-fe-packages/kmkf-utils';
14
14
  import ItemView from "../../commonComponents/ItemView";
15
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
16
16
  import { SYMBOL } from "../../constant";
17
17
  var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
18
18
  var _this = this,
@@ -31,11 +31,13 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
31
31
  _defineProperty(this, "dataType", void 0);
32
32
  _defineProperty(this, "format", void 0);
33
33
  _defineProperty(this, "options", void 0);
34
+ _defineProperty(this, "exampleValue", void 0);
35
+ _defineProperty(this, "standardDateType", void 0);
34
36
  _defineProperty(this, "getValues", function (value) {
35
37
  var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
36
38
  return (_findLabelBySelectVal = findLabelBySelectValue(value, (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
37
39
  return i.label;
38
- })) === null || _findLabelBySelectVal2 === void 0 ? void 0 : _findLabelBySelectVal2.join(",");
40
+ })) === null || _findLabelBySelectVal2 === void 0 ? void 0 : _findLabelBySelectVal2.join(',');
39
41
  });
40
42
  _defineProperty(this, "renderClient", function (record) {
41
43
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -51,7 +53,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
51
53
  }
52
54
  return /*#__PURE__*/React.createElement("span", null, (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) || []) === null || _ref === void 0 ? void 0 : (_ref$map = _ref.map(function (item) {
53
55
  return item === null || item === void 0 ? void 0 : item.label;
54
- })) === null || _ref$map === void 0 ? void 0 : _ref$map.join(","));
56
+ })) === null || _ref$map === void 0 ? void 0 : _ref$map.join(','));
55
57
  // return (
56
58
  // <span>
57
59
  // {findLabelBySelectValue(
@@ -75,11 +77,11 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
75
77
  _defineProperty(this, "renderExport", function (value, record) {
76
78
  var _ref2, _ref2$map;
77
79
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) === undefined) {
78
- return "--";
80
+ return '--';
79
81
  }
80
82
  return (_ref2 = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) || []) === null || _ref2 === void 0 ? void 0 : (_ref2$map = _ref2.map(function (item) {
81
83
  return item === null || item === void 0 ? void 0 : item.label;
82
- })) === null || _ref2$map === void 0 ? void 0 : _ref2$map.join(",");
84
+ })) === null || _ref2$map === void 0 ? void 0 : _ref2$map.join(',');
83
85
  // return findLabelBySelectValue(
84
86
  // (record?.[`${this.id}_multSelect`] || [])?.map(
85
87
  // (item: any) => item.actived
@@ -98,14 +100,14 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
98
100
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
99
101
  required: (_this$componentConfig2 = (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required) !== null && _this$componentConfig2 !== void 0 ? _this$componentConfig2 : false,
100
102
  display: p === null || p === void 0 ? void 0 : p.display,
101
- tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : "",
103
+ tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : '',
102
104
  component: /*#__PURE__*/React.createElement(Cascader, _extends({}, _this.componentConfig, {
103
105
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
104
106
  options: transMultSelectOptions(((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.options) || []),
105
107
  fieldNames: {
106
- label: "label",
107
- value: "actived",
108
- children: "children"
108
+ label: 'label',
109
+ value: 'actived',
110
+ children: 'children'
109
111
  },
110
112
  showSearch: true,
111
113
  onChange: p === null || p === void 0 ? void 0 : p.onChange
@@ -122,26 +124,26 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
122
124
  // 过滤组件id
123
125
  name: item.name,
124
126
  // 过滤组件名称
125
- filterComponentType: "Cascader",
127
+ filterComponentType: 'Cascader',
126
128
  props: {
127
129
  options: options,
128
130
  multiple: true,
129
- maxTagCount: "responsive",
131
+ maxTagCount: 'responsive',
130
132
  fieldNames: {
131
- label: "label",
132
- value: "actived",
133
- children: "children"
133
+ label: 'label',
134
+ value: 'actived',
135
+ children: 'children'
134
136
  }
135
137
  },
136
138
  filterFn: function filterFn(value) {
137
139
  return function (i) {
138
- return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "basicMultSelect")).length > 0;
140
+ return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
139
141
  };
140
142
  },
141
143
  formatFilterValue: function formatFilterValue(val) {
142
144
  if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
143
145
  return val.map(function (item) {
144
- var node = tree.findNodeByValue(options, "actived", item[item.length - 1]);
146
+ var node = tree.findNodeByValue(options, 'actived', item[item.length - 1]);
145
147
  if (node) {
146
148
  var label = node.label,
147
149
  actived = node.actived;
@@ -165,9 +167,11 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
165
167
  this.children = [];
166
168
  this.isCombinationComponent = false;
167
169
  this.canSort = true;
168
- this.dataType = "array";
169
- this.format = "cascader";
170
+ this.dataType = 'array';
171
+ this.format = 'cascader';
170
172
  this.options = ((_this$componentConfig7 = this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.options) || [];
173
+ this.standardDateType = 'Array';
174
+ this.exampleValue = '[{"label":"卖家补偿","actived":3},{"label":"麦基修改","actived":"3-1"}]';
171
175
  }
172
176
 
173
177
  /**