@kmkf-fe-packages/services-components 1.6.0-beta.8 → 1.7.0

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 (98) hide show
  1. package/README.md +1 -3
  2. package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
  3. package/dist/esm/commonComponents/GlobalContext/index.js +1 -1
  4. package/dist/esm/components/ActualPayment/index.js +1 -1
  5. package/dist/esm/components/Address/index.js +1 -1
  6. package/dist/esm/components/AfterSalesOrderId/index.js +1 -1
  7. package/dist/esm/components/Alipay/index.js +1 -1
  8. package/dist/esm/components/AlipayAccount/index.js +1 -1
  9. package/dist/esm/components/AlipayName/index.js +1 -1
  10. package/dist/esm/components/BS/BsExchange/index.js +1 -1
  11. package/dist/esm/components/BS/BsGoods/index.js +1 -1
  12. package/dist/esm/components/BS/BsLogistics/index.js +1 -1
  13. package/dist/esm/components/BS/BsPosting/index.js +1 -1
  14. package/dist/esm/components/BS/BsReissue/index.js +1 -1
  15. package/dist/esm/components/BS/BsReturn/index.js +1 -1
  16. package/dist/esm/components/BS/BsSystemOrder/index.js +1 -1
  17. package/dist/esm/components/BS/DeliveryNo/index.js +1 -1
  18. package/dist/esm/components/BuyerNick/index.js +1 -1
  19. package/dist/esm/components/Calculation/index.js +1 -1
  20. package/dist/esm/components/Cascader/index.js +1 -1
  21. package/dist/esm/components/Checkbox/index.js +1 -1
  22. package/dist/esm/components/Common/index.js +2 -2
  23. package/dist/esm/components/CommonInput/index.js +1 -1
  24. package/dist/esm/components/CommonMultiStatus/index.js +1 -1
  25. package/dist/esm/components/CommonSystemOrder/index.js +1 -1
  26. package/dist/esm/components/CommonTradeId/index.js +1 -1
  27. package/dist/esm/components/DataTime/index.js +1 -1
  28. package/dist/esm/components/EItemEnCode/index.js +1 -1
  29. package/dist/esm/components/EItemId/index.js +1 -1
  30. package/dist/esm/components/EItemSelect/index.js +1 -1
  31. package/dist/esm/components/ErpTradeId/index.js +1 -1
  32. package/dist/esm/components/Express/index.js +1 -1
  33. package/dist/esm/components/ExpressCode/index.js +1 -1
  34. package/dist/esm/components/File/index.js +1 -1
  35. package/dist/esm/components/FlowMarkSelect/index.js +1 -1
  36. package/dist/esm/components/FlowStatusSelect/index.js +1 -1
  37. package/dist/esm/components/FlowTag/index.js +1 -1
  38. package/dist/esm/components/FlowWorkOrderId/index.js +1 -1
  39. package/dist/esm/components/FlowWorkOrderStatus/index.js +1 -1
  40. package/dist/esm/components/Grade/index.js +1 -1
  41. package/dist/esm/components/Input/index.js +1 -1
  42. package/dist/esm/components/JST/JstItemSelect/index.js +1 -1
  43. package/dist/esm/components/JST/JstLogistics/index.js +1 -1
  44. package/dist/esm/components/JST/JstSendGood/index.js +1 -1
  45. package/dist/esm/components/JST/JstSupply/index.js +1 -1
  46. package/dist/esm/components/KmErpSendGood/index.js +1 -1
  47. package/dist/esm/components/Label/index.js +1 -1
  48. package/dist/esm/components/Logistics/index.js +1 -1
  49. package/dist/esm/components/LogisticsInterception/InterceptAddress.js +1 -1
  50. package/dist/esm/components/LogisticsInterception/index.js +1 -1
  51. package/dist/esm/components/LogisticsMoreInterception/index.js +1 -1
  52. package/dist/esm/components/LogisticsMoreTrajectory/index.js +1 -1
  53. package/dist/esm/components/LogisticsTrajectory/index.js +1 -1
  54. package/dist/esm/components/MsgStatus/index.js +1 -1
  55. package/dist/esm/components/MultSelect/index.js +1 -1
  56. package/dist/esm/components/Ordinary/OrdinaryHeader.js +1 -1
  57. package/dist/esm/components/Ordinary/OrdinaryMoney.js +1 -1
  58. package/dist/esm/components/Ordinary/OrdinarySerial.js +1 -1
  59. package/dist/esm/components/Ordinary/index.js +1 -1
  60. package/dist/esm/components/Payment/AlipayNick.js +1 -1
  61. package/dist/esm/components/Payment/AlipayNo.js +1 -1
  62. package/dist/esm/components/Payment/AlipayTime.js +1 -1
  63. package/dist/esm/components/Payment/BuyerNick.js +1 -1
  64. package/dist/esm/components/Payment/PaymentAmount.js +1 -1
  65. package/dist/esm/components/Payment/PaymentTid.js +1 -1
  66. package/dist/esm/components/Payment/index.js +1 -1
  67. package/dist/esm/components/PaymentVoucherCode/index.js +1 -1
  68. package/dist/esm/components/Picture/index.js +1 -1
  69. package/dist/esm/components/PostIng/index.js +1 -1
  70. package/dist/esm/components/Radio/index.js +1 -1
  71. package/dist/esm/components/Rate/index.js +1 -1
  72. package/dist/esm/components/ReceiverAddress/index.js +1 -1
  73. package/dist/esm/components/ReceiverMobile/index.js +1 -1
  74. package/dist/esm/components/ReceiverName/index.js +1 -1
  75. package/dist/esm/components/Remark/index.js +1 -1
  76. package/dist/esm/components/ReturnLogistics/index.js +1 -1
  77. package/dist/esm/components/Select/index.js +1 -1
  78. package/dist/esm/components/ShopName/index.js +1 -1
  79. package/dist/esm/components/StatusSelect/index.js +1 -1
  80. package/dist/esm/components/SystemOrderNo/index.js +1 -1
  81. package/dist/esm/components/TextArea/index.js +1 -1
  82. package/dist/esm/components/ThirdItemSelect/index.js +1 -1
  83. package/dist/esm/components/TradeDateTime/index.js +1 -1
  84. package/dist/esm/components/TradeId/index.js +1 -1
  85. package/dist/esm/components/WDT/WdtExchange/index.js +1 -1
  86. package/dist/esm/components/WDT/WdtGoods/index.js +1 -1
  87. package/dist/esm/components/WDT/WdtRessuie/index.js +1 -1
  88. package/dist/esm/components/WDT/WdtReturn/index.js +1 -1
  89. package/dist/esm/components/WLN/WlnGoods/index.js +1 -1
  90. package/dist/esm/components/WorkOrderId/index.js +1 -1
  91. package/dist/esm/factory.d.ts +2 -2
  92. package/dist/esm/factory.js +4 -5
  93. package/dist/esm/index.d.ts +0 -1
  94. package/dist/esm/index.js +0 -1
  95. package/dist/esm/type.d.ts +22 -22
  96. package/package.json +6 -6
  97. package/dist/esm/components/SubForm/index.d.ts +0 -34
  98. package/dist/esm/components/SubForm/index.js +0 -189
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { FormInstance } from "antd";
3
- import { SYMBOL } from "./constant";
4
- export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
5
- export declare type ALignType = "left" | "right" | "center";
2
+ import type { FormInstance } from 'antd';
3
+ import { SYMBOL } from './constant';
4
+ export declare type DataType = 'string' | 'number' | 'array' | 'dateArray' | 'date' | 'tradeId';
5
+ export declare type ALignType = 'left' | 'right' | 'center';
6
6
  export declare type QuerySymbol = keyof typeof SYMBOL;
7
7
  export declare type Record = {
8
8
  [props in string]: any;
@@ -27,7 +27,7 @@ export declare type FilterConfigType = {
27
27
  filterFn?: (p: any) => (r: Record) => unknown;
28
28
  formatFilterValue?: (p: any) => any;
29
29
  };
30
- export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate" | "SelectInput";
30
+ export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' | 'Cascader' | 'ShopList' | 'Rate' | 'SelectInput';
31
31
  export interface ComponentInterface {
32
32
  id: string;
33
33
  sortField: string;
@@ -47,8 +47,8 @@ export interface ComponentInterface {
47
47
  rules?: any[];
48
48
  width?: number;
49
49
  align?: ALignType;
50
- dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
51
- format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup";
50
+ dataType: 'string' | 'number' | 'boolean' | 'array' | 'range' | 'object';
51
+ format?: 'dateTime' | 'date' | 'time' | 'cascader' | 'shopInput' | 'staffGroup';
52
52
  options?: Array<any>;
53
53
  templateId?: string;
54
54
  flowTemplateKey?: string;
@@ -65,6 +65,10 @@ export interface ComponentInterface {
65
65
  * @description 组件描述信息
66
66
  */
67
67
  tooltip?: string;
68
+ /**
69
+ * @description 是否开启组件描述信息
70
+ */
71
+ showTooltip?: boolean;
68
72
  /**
69
73
  * @description 是否拆列头-针对收寄信息组件
70
74
  */
@@ -84,7 +88,7 @@ export interface ComponentInterface {
84
88
  /**
85
89
  * @description 显示字段名称
86
90
  */
87
- showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder" | "logisticsCompany" | "logisticsCode";
91
+ showField?: 'EXPRESS_COMPANY' | 'EXPRESS_WAYBILL_CODE' | 'EXPRESS_SNAPSHOT' | 'all' | 'bs' | 'workOrder' | 'logisticsCompany' | 'logisticsCode';
88
92
  /**
89
93
  * @description 是否选择SKU
90
94
  */
@@ -104,7 +108,7 @@ export interface ComponentInterface {
104
108
  /**
105
109
  * @description 备注状态
106
110
  */
107
- associatedType?: "APPEND";
111
+ associatedType?: 'APPEND';
108
112
  isAssociated?: boolean;
109
113
  isShowFlag?: boolean;
110
114
  /**
@@ -145,7 +149,7 @@ export interface ComponentInterface {
145
149
  * @description 时间初始值
146
150
  */
147
151
  dateTime?: string;
148
- dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
152
+ dateType?: 'DATE' | 'DATE_TIME' | 'DATE_RANGE' | 'DATE_TIME_RANGE';
149
153
  maxSize?: number;
150
154
  basicGrade?: number;
151
155
  range?: number;
@@ -173,15 +177,11 @@ export interface ComponentInterface {
173
177
  rulesOptions?: Array<any>;
174
178
  selectRules?: Array<string>;
175
179
  logistics?: string;
176
- subConfig?: {
177
- correlationList?: any;
178
- flowStatus?: string[];
179
- flowTemplateKey?: any;
180
- nodeId?: string;
181
- workOrderTemplateId?: string;
180
+ belongType?: string;
181
+ repeatConfig?: {
182
+ repeatRange: string;
183
+ repeatComponents: any[];
182
184
  };
183
- needFilterShopByPermission?: boolean;
184
- tableHeader?: any;
185
185
  };
186
186
  effects?: {
187
187
  queryWorkOrderDetail?: (r: Record) => void;
@@ -255,13 +255,13 @@ export interface ComponentInterface {
255
255
  getComponentValue: (r: Record) => any;
256
256
  formDataTransform?: (r: any) => any;
257
257
  }
258
- export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width" | "flowTemplateKey">;
258
+ export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects' | 'columnHeader' | 'templateId' | 'workOrderUniqueKey' | 'platform' | 'parentName' | 'width' | 'flowTemplateKey'>;
259
259
  export declare type ColumnConfig = {
260
260
  id: string;
261
261
  name: string;
262
262
  type: string;
263
263
  subKey?: string;
264
- mode?: "multiple";
265
- config?: ComponentInterface["componentConfig"];
266
- templateConfig?: ComponentInterface["componentConfig"];
264
+ mode?: 'multiple';
265
+ config?: ComponentInterface['componentConfig'];
266
+ templateConfig?: ComponentInterface['componentConfig'];
267
267
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.6.0-beta.8",
3
+ "version": "1.7.0",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "scripts": {
10
+ "sync": "yarn build && yalc push",
10
11
  "build": "yarn run lint && father build",
11
12
  "lint": "eslint '**/*.{ts,tsx}'",
12
- "lint:fix": "eslint --fix '**/*.{ts,tsx}'",
13
- "sync": "yarn build && yalc push"
13
+ "lint:fix": "eslint --fix '**/*.{ts,tsx}'"
14
14
  },
15
15
  "lint-staged": {
16
16
  "*.{js,jsx,less,md,json}": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "1.6.0-beta.8",
25
- "@kmkf-fe-packages/kmkf-utils": "1.6.0-beta.0"
24
+ "@kmkf-fe-packages/basic-components": "1.7.0",
25
+ "@kmkf-fe-packages/kmkf-utils": "1.7.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@typescript-eslint/eslint-plugin": "^5.59.2",
@@ -38,7 +38,7 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "aed67694931e1a241ff4b4a2a7ee719aad5e05d5",
41
+ "gitHead": "2994578e8b3158fd2b05e9909be0f0d2f2c50daa",
42
42
  "gitHooks": {
43
43
  "pre-commit": "lint-staged"
44
44
  }
@@ -1,34 +0,0 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
3
- declare class SubForm implements ComponentInterface {
4
- name: string;
5
- id: string;
6
- sortField: string;
7
- type: string;
8
- rules: any[];
9
- componentConfig: ComponentInterface["componentConfig"];
10
- isCombinationComponent: boolean;
11
- formField: string;
12
- canSort: boolean;
13
- children: ComponentInterface[];
14
- dataType: ComponentInterface["dataType"];
15
- templateId?: string;
16
- workOrderUniqueKey?: string;
17
- constructor(options: PickOption);
18
- getNewTableHeader: () => any;
19
- renderTabel: (list: any) => React.JSX.Element;
20
- renderPc: () => null;
21
- renderLog: (r: Record) => React.JSX.Element | null;
22
- getComponentValue: (r: Record) => any;
23
- renderExport: () => null;
24
- renderClient: (record: Record) => React.JSX.Element | null;
25
- editRender: (p: any) => React.JSX.Element;
26
- filterConfig: (item: ColumnConfig) => {
27
- searchDefaultConditions: "like";
28
- type: string;
29
- id: string;
30
- name: string;
31
- filterComponentType: "Input";
32
- }[];
33
- }
34
- export default SubForm;
@@ -1,189 +0,0 @@
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
- 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."); }
4
- 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); }
5
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
- 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; }
8
- 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; }
9
- 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; }
10
- 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); } }
11
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
- 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; }
14
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
- 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); }
16
- import React from "react";
17
- import { Table } from "antd";
18
- import { SubForm as SubFormComponent } from "@kmkf-fe-packages/basic-components";
19
- import Input from "../Input";
20
- import TextArea from "../TextArea";
21
- import BsHeaderChild from "../BS/common/BsHeaderChild";
22
- import GetFormItem from "../GetFormItem";
23
- import ItemView from "../../commonComponents/ItemView";
24
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
25
- import { SYMBOL } from "../../constant";
26
- var WidgetMap = {
27
- INPUT: Input,
28
- TEXTAREA: TextArea
29
- };
30
- var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
31
- var _this = this,
32
- _this$componentConfig9;
33
- _classCallCheck(this, SubForm);
34
- _defineProperty(this, "name", void 0);
35
- _defineProperty(this, "id", void 0);
36
- _defineProperty(this, "sortField", void 0);
37
- _defineProperty(this, "type", void 0);
38
- _defineProperty(this, "rules", void 0);
39
- _defineProperty(this, "componentConfig", void 0);
40
- _defineProperty(this, "isCombinationComponent", void 0);
41
- _defineProperty(this, "formField", void 0);
42
- _defineProperty(this, "canSort", void 0);
43
- _defineProperty(this, "children", void 0);
44
- _defineProperty(this, "dataType", void 0);
45
- _defineProperty(this, "templateId", void 0);
46
- _defineProperty(this, "workOrderUniqueKey", void 0);
47
- _defineProperty(this, "getNewTableHeader", function () {
48
- var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
49
- return (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : (_this$componentConfig2 = _this$componentConfig.subConfig) === null || _this$componentConfig2 === void 0 ? void 0 : (_this$componentConfig3 = _this$componentConfig2.correlationList) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.map(function (item) {
50
- var _this$componentConfig4;
51
- var t = ((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tableHeader.find(function (v) {
52
- return v.key === item.key;
53
- })) || {
54
- isShow: true,
55
- isEdit: false,
56
- isRequired: false,
57
- isNumber: false,
58
- precision: "nolimit",
59
- width: 150
60
- };
61
- return _objectSpread(_objectSpread({}, item), t);
62
- });
63
- });
64
- _defineProperty(this, "renderTabel", function (list) {
65
- var _ref, _ref$filter;
66
- var columns = [{
67
- dataIndex: "",
68
- title: "序号",
69
- align: "center",
70
- ellipsis: true,
71
- width: 50,
72
- render: function render(val, record, index) {
73
- return /*#__PURE__*/React.createElement("span", null, index + 1);
74
- }
75
- }].concat(_toConsumableArray(((_ref = _this.getNewTableHeader() || []) === null || _ref === void 0 ? void 0 : (_ref$filter = _ref.filter(function (t) {
76
- return t.isShow;
77
- })) === null || _ref$filter === void 0 ? void 0 : _ref$filter.map(function (item) {
78
- return {
79
- dataIndex: item.key,
80
- title: item.name,
81
- align: "center",
82
- ellipsis: true,
83
- width: item.width,
84
- render: function render(val) {
85
- return /*#__PURE__*/React.createElement("span", null, val);
86
- }
87
- };
88
- })) || []));
89
- return /*#__PURE__*/React.createElement(Table, {
90
- columns: columns,
91
- dataSource: list,
92
- rowKey: "uuid",
93
- size: "small",
94
- pagination: false,
95
- scroll: {
96
- x: "100%"
97
- },
98
- locale: {
99
- emptyText: "暂无数据"
100
- }
101
- });
102
- });
103
- _defineProperty(this, "renderPc", function () {
104
- return null;
105
- });
106
- _defineProperty(this, "renderLog", function (r) {
107
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")])) return null;
108
- return _this.renderTabel(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")]);
109
- });
110
- _defineProperty(this, "getComponentValue", function (r) {
111
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")];
112
- });
113
- _defineProperty(this, "renderExport", function () {
114
- return null;
115
- });
116
- _defineProperty(this, "renderClient", function (record) {
117
- return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
118
- id: _this.id,
119
- label: _this.name,
120
- value: _this.renderTabel(record === null || record === void 0 ? void 0 : record["".concat(_this.id)])
121
- }) : null;
122
- });
123
- _defineProperty(this, "editRender", function (p) {
124
- var _this$componentConfig5, _this$componentConfig6, _this$componentConfig7, _this$componentConfig8;
125
- return /*#__PURE__*/React.createElement(GetFormItem, {
126
- title: _this.name,
127
- name: _this.id,
128
- rules: _this.rules,
129
- hidden: p === null || p === void 0 ? void 0 : p.hidden,
130
- display: p === null || p === void 0 ? void 0 : p.display,
131
- required: (_this$componentConfig5 = (_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required) !== null && _this$componentConfig5 !== void 0 ? _this$componentConfig5 : false,
132
- tooltip: (_this$componentConfig7 = (_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.tooltip) !== null && _this$componentConfig7 !== void 0 ? _this$componentConfig7 : "",
133
- component: /*#__PURE__*/React.createElement(SubFormComponent, _this.componentConfig)
134
- });
135
- });
136
- _defineProperty(this, "filterConfig", function (item) {
137
- return [{
138
- searchDefaultConditions: SYMBOL.like,
139
- type: item.type,
140
- id: "".concat(item.id, "_productList"),
141
- // 过滤组件id
142
- name: item.name,
143
- // 过滤组件名称
144
- filterComponentType: "Input"
145
- }];
146
- });
147
- this.name = options.name;
148
- this.id = options.id;
149
- this.sortField = "".concat(options.id, "_productList");
150
- this.formField = "".concat(options.id, "_productList");
151
- this.type = options.type;
152
- this.templateId = options.templateId;
153
- this.componentConfig = options.componentConfig;
154
- this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
155
- this.rules = [{
156
- required: (_this$componentConfig9 = this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : _this$componentConfig9.required,
157
- validator: function validator(_, value) {
158
- var _this$componentConfig10, _this$componentConfig11;
159
- var result = (_this$componentConfig10 = _this.componentConfig) === null || _this$componentConfig10 === void 0 ? void 0 : (_this$componentConfig11 = _this$componentConfig10.tableHeader) === null || _this$componentConfig11 === void 0 ? void 0 : _this$componentConfig11.reduce(function (prv, next) {
160
- if (next.isRequired && next.isShow && !next.isEdit) {
161
- prv[next.key] = "".concat(next.name, "\u4E0D\u80FD\u4E3A\u7A7A");
162
- }
163
- return prv;
164
- }, {});
165
- var msg = (value || []).reduce(function (prv, next) {
166
- Object.keys(next).forEach(function (key) {
167
- if (result[key] && !next[key]) {
168
- prv = result[key];
169
- }
170
- });
171
- return prv;
172
- }, "");
173
- if (msg) {
174
- return Promise.reject(new Error(msg));
175
- }
176
- return Promise.resolve();
177
- }
178
- }];
179
- this.isCombinationComponent = true;
180
- this.canSort = false;
181
- this.children = (this.getNewTableHeader() || []).map(function (item) {
182
- return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
183
- name: item.name,
184
- id: "".concat(options.id, "_productList_").concat(item.key)
185
- }));
186
- });
187
- this.dataType = "object";
188
- });
189
- export default SubForm;