@kmkf-fe-packages/services-components 0.7.8 → 0.7.10

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 (132) hide show
  1. package/dist/esm/components/ActualPayment/index.d.ts +11 -1
  2. package/dist/esm/components/ActualPayment/index.js +65 -2
  3. package/dist/esm/components/Address/index.d.ts +21 -3
  4. package/dist/esm/components/Address/index.js +35 -3
  5. package/dist/esm/components/Alipay/index.d.ts +3 -0
  6. package/dist/esm/components/Alipay/index.js +4 -0
  7. package/dist/esm/components/AlipayAccount/index.d.ts +3 -0
  8. package/dist/esm/components/AlipayAccount/index.js +6 -0
  9. package/dist/esm/components/AlipayName/index.d.ts +3 -0
  10. package/dist/esm/components/AlipayName/index.js +6 -0
  11. package/dist/esm/components/BuyerNick/index.d.ts +3 -0
  12. package/dist/esm/components/BuyerNick/index.js +6 -0
  13. package/dist/esm/components/Cascader/index.d.ts +12 -1
  14. package/dist/esm/components/Cascader/index.js +35 -8
  15. package/dist/esm/components/Checkbox/index.d.ts +6 -1
  16. package/dist/esm/components/Checkbox/index.js +13 -5
  17. package/dist/esm/components/CommonDataTime/index.d.ts +6 -2
  18. package/dist/esm/components/CommonDataTime/index.js +23 -4
  19. package/dist/esm/components/CompletedUser/index.d.ts +9 -4
  20. package/dist/esm/components/CompletedUser/index.js +9 -1
  21. package/dist/esm/components/DataTime/index.d.ts +3 -8
  22. package/dist/esm/components/DataTime/index.js +25 -4
  23. package/dist/esm/components/EItemEnCode/index.d.ts +3 -0
  24. package/dist/esm/components/EItemEnCode/index.js +7 -1
  25. package/dist/esm/components/EItemId/index.d.ts +3 -0
  26. package/dist/esm/components/EItemId/index.js +7 -1
  27. package/dist/esm/components/EItemSelect/index.d.ts +2 -0
  28. package/dist/esm/components/EItemSelect/index.js +4 -0
  29. package/dist/esm/components/ErpTradeId/index.d.ts +4 -0
  30. package/dist/esm/components/ErpTradeId/index.js +10 -1
  31. package/dist/esm/components/Express/index.d.ts +6 -1
  32. package/dist/esm/components/Express/index.js +9 -1
  33. package/dist/esm/components/ExpressCode/index.d.ts +3 -0
  34. package/dist/esm/components/ExpressCode/index.js +6 -0
  35. package/dist/esm/components/FlowStatusSelect/index.d.ts +9 -4
  36. package/dist/esm/components/FlowStatusSelect/index.js +14 -6
  37. package/dist/esm/components/Grade/index.d.ts +2 -0
  38. package/dist/esm/components/Grade/index.js +4 -0
  39. package/dist/esm/components/Handler/index.d.ts +9 -4
  40. package/dist/esm/components/Handler/index.js +9 -1
  41. package/dist/esm/components/Input/index.d.ts +3 -0
  42. package/dist/esm/components/Input/index.js +7 -1
  43. package/dist/esm/components/JstItemSelect/index.d.ts +3 -0
  44. package/dist/esm/components/JstItemSelect/index.js +23 -15
  45. package/dist/esm/components/JstLogistics/index.d.ts +8 -2
  46. package/dist/esm/components/JstLogistics/index.js +10 -1
  47. package/dist/esm/components/JstSendGood/index.d.ts +3 -0
  48. package/dist/esm/components/JstSendGood/index.js +7 -0
  49. package/dist/esm/components/JstSupply/index.d.ts +3 -0
  50. package/dist/esm/components/JstSupply/index.js +7 -0
  51. package/dist/esm/components/Logistics/index.d.ts +7 -1
  52. package/dist/esm/components/Logistics/index.js +4 -0
  53. package/dist/esm/components/LogisticsInterception/InterceptAddress.d.ts +3 -1
  54. package/dist/esm/components/LogisticsInterception/InterceptAddress.js +4 -0
  55. package/dist/esm/components/LogisticsInterception/InterceptStatus.d.ts +11 -5
  56. package/dist/esm/components/LogisticsInterception/InterceptStatus.js +18 -4
  57. package/dist/esm/components/LogisticsInterception/InterceptType.d.ts +11 -5
  58. package/dist/esm/components/LogisticsInterception/InterceptType.js +18 -4
  59. package/dist/esm/components/LogisticsInterception/index.d.ts +15 -5
  60. package/dist/esm/components/LogisticsInterception/index.js +4 -0
  61. package/dist/esm/components/LogisticsInterception/interceptSenderMobile.d.ts +2 -0
  62. package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +4 -0
  63. package/dist/esm/components/MultSelect/index.d.ts +6 -1
  64. package/dist/esm/components/MultSelect/index.js +10 -2
  65. package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +3 -0
  66. package/dist/esm/components/Ordinary/OrdinaryHeader.js +9 -3
  67. package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +11 -1
  68. package/dist/esm/components/Ordinary/OrdinaryMoney.js +67 -4
  69. package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +3 -0
  70. package/dist/esm/components/Ordinary/OrdinarySerial.js +6 -0
  71. package/dist/esm/components/Ordinary/index.d.ts +19 -2
  72. package/dist/esm/components/Ordinary/index.js +4 -0
  73. package/dist/esm/components/Payment/AlipayNick.d.ts +3 -0
  74. package/dist/esm/components/Payment/AlipayNick.js +6 -0
  75. package/dist/esm/components/Payment/AlipayNo.d.ts +3 -0
  76. package/dist/esm/components/Payment/AlipayNo.js +6 -0
  77. package/dist/esm/components/Payment/AlipayTime.d.ts +6 -2
  78. package/dist/esm/components/Payment/AlipayTime.js +25 -8
  79. package/dist/esm/components/Payment/BuyerNick.d.ts +3 -0
  80. package/dist/esm/components/Payment/BuyerNick.js +6 -0
  81. package/dist/esm/components/Payment/PaymentAmount.d.ts +11 -1
  82. package/dist/esm/components/Payment/PaymentAmount.js +64 -1
  83. package/dist/esm/components/Payment/PaymentStatus.d.ts +9 -4
  84. package/dist/esm/components/Payment/PaymentStatus.js +9 -1
  85. package/dist/esm/components/Payment/PaymentTid.d.ts +4 -0
  86. package/dist/esm/components/Payment/PaymentTid.js +9 -0
  87. package/dist/esm/components/Payment/index.d.ts +41 -4
  88. package/dist/esm/components/Payment/index.js +4 -0
  89. package/dist/esm/components/Picture/index.d.ts +2 -0
  90. package/dist/esm/components/Picture/index.js +4 -0
  91. package/dist/esm/components/PlatForm/index.d.ts +4 -1
  92. package/dist/esm/components/PlatForm/index.js +6 -0
  93. package/dist/esm/components/Radio/index.d.ts +6 -1
  94. package/dist/esm/components/Radio/index.js +13 -5
  95. package/dist/esm/components/Rate/index.d.ts +2 -0
  96. package/dist/esm/components/Rate/index.js +4 -0
  97. package/dist/esm/components/ReceiverAddress/index.d.ts +3 -1
  98. package/dist/esm/components/ReceiverAddress/index.js +4 -0
  99. package/dist/esm/components/ReceiverMobile/index.d.ts +3 -0
  100. package/dist/esm/components/ReceiverMobile/index.js +7 -1
  101. package/dist/esm/components/ReceiverName/index.d.ts +3 -0
  102. package/dist/esm/components/ReceiverName/index.js +7 -1
  103. package/dist/esm/components/Remark/index.d.ts +3 -0
  104. package/dist/esm/components/Remark/index.js +7 -1
  105. package/dist/esm/components/ReturnLogistics/index.d.ts +7 -1
  106. package/dist/esm/components/ReturnLogistics/index.js +4 -0
  107. package/dist/esm/components/Select/index.d.ts +6 -1
  108. package/dist/esm/components/Select/index.js +10 -2
  109. package/dist/esm/components/ShopInput/index.d.ts +8 -2
  110. package/dist/esm/components/ShopInput/index.js +19 -2
  111. package/dist/esm/components/ShopName/index.d.ts +3 -0
  112. package/dist/esm/components/ShopName/index.js +7 -1
  113. package/dist/esm/components/Submitter/index.d.ts +10 -4
  114. package/dist/esm/components/Submitter/index.js +17 -1
  115. package/dist/esm/components/SystemOrderNo/index.d.ts +4 -0
  116. package/dist/esm/components/SystemOrderNo/index.js +10 -1
  117. package/dist/esm/components/TemplateSelect/index.d.ts +3 -0
  118. package/dist/esm/components/TemplateSelect/index.js +6 -0
  119. package/dist/esm/components/TextArea/index.d.ts +3 -0
  120. package/dist/esm/components/TextArea/index.js +7 -1
  121. package/dist/esm/components/ThirdItemSelect/index.d.ts +3 -0
  122. package/dist/esm/components/ThirdItemSelect/index.js +7 -1
  123. package/dist/esm/components/TradeDateTime/index.d.ts +4 -0
  124. package/dist/esm/components/TradeDateTime/index.js +16 -2
  125. package/dist/esm/components/TradeId/index.d.ts +4 -0
  126. package/dist/esm/components/TradeId/index.js +10 -1
  127. package/dist/esm/components/WorkOrderId/index.d.ts +3 -0
  128. package/dist/esm/components/WorkOrderId/index.js +15 -3
  129. package/dist/esm/constant.d.ts +14 -0
  130. package/dist/esm/constant.js +14 -0
  131. package/dist/esm/type.d.ts +10 -2
  132. package/package.json +4 -4
@@ -7,10 +7,12 @@ declare type Value = {
7
7
  declare class BasicCheckbox implements ComponentInterface {
8
8
  name: string;
9
9
  id: string;
10
+ sortField: string;
10
11
  type: string;
11
12
  rules: any[];
12
13
  componentConfig: ComponentInterface["componentConfig"];
13
14
  isCombinationComponent: boolean;
15
+ canSort: boolean;
14
16
  children: ComponentInterface[];
15
17
  constructor(options: PickOption);
16
18
  getValue: (value: Value) => string | null | undefined;
@@ -24,11 +26,14 @@ declare class BasicCheckbox implements ComponentInterface {
24
26
  renderClient: (record: any) => React.JSX.Element | null;
25
27
  editRender: () => React.JSX.Element;
26
28
  filterConfig: (item: ColumnConfig) => {
29
+ searchDefaultConditions: "in";
27
30
  type: string;
28
31
  id: string;
29
32
  name: string;
30
33
  filterComponentType: "MultipleSelect";
31
- options: any[] | undefined;
34
+ props: {
35
+ options: any[] | undefined;
36
+ };
32
37
  filterFn: (value: string) => (i: Record) => boolean;
33
38
  };
34
39
  }
@@ -11,16 +11,19 @@ import { ApaasCheckbox } from '@kmkf-fe-packages/basic-components';
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
13
  import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
+ import { SYMBOL } from "../../constant";
14
15
  var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
15
16
  var _this = this,
16
17
  _options$componentCon;
17
18
  _classCallCheck(this, BasicCheckbox);
18
19
  _defineProperty(this, "name", void 0);
19
20
  _defineProperty(this, "id", void 0);
21
+ _defineProperty(this, "sortField", void 0);
20
22
  _defineProperty(this, "type", void 0);
21
23
  _defineProperty(this, "rules", void 0);
22
24
  _defineProperty(this, "componentConfig", void 0);
23
25
  _defineProperty(this, "isCombinationComponent", void 0);
26
+ _defineProperty(this, "canSort", void 0);
24
27
  _defineProperty(this, "children", void 0);
25
28
  _defineProperty(this, "getValue", function (value) {
26
29
  var _value$value, _value$value2, _value$value3;
@@ -85,16 +88,19 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
85
88
  _defineProperty(this, "filterConfig", function (item) {
86
89
  var _item$config, _item$config2, _item$config2$options, _item$config3;
87
90
  return {
91
+ searchDefaultConditions: SYMBOL.in,
88
92
  type: item.type,
89
- id: item.id,
93
+ id: "".concat(item.id, "_checkbox"),
90
94
  // 过滤组件id
91
95
  name: item.name,
92
96
  // 过滤组件名称
93
97
  filterComponentType: 'MultipleSelect',
94
- options: item !== null && item !== void 0 && (_item$config = item.config) !== null && _item$config !== void 0 && _item$config.showOther ? item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : (_item$config2$options = _item$config2.options) === null || _item$config2$options === void 0 ? void 0 : _item$config2$options.concat({
95
- label: '其他',
96
- value: '其他'
97
- }) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || [],
98
+ props: {
99
+ options: item !== null && item !== void 0 && (_item$config = item.config) !== null && _item$config !== void 0 && _item$config.showOther ? item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : (_item$config2$options = _item$config2.options) === null || _item$config2$options === void 0 ? void 0 : _item$config2$options.concat({
100
+ label: '其他',
101
+ value: '其他'
102
+ }) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || []
103
+ },
98
104
  filterFn: function filterFn(value) {
99
105
  return function (i) {
100
106
  return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'checkbox')).length > 0;
@@ -104,8 +110,10 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
104
110
  });
105
111
  this.name = options.name;
106
112
  this.id = options.id;
113
+ this.sortField = "".concat(options.id, "_checkbox");
107
114
  this.type = options.type;
108
115
  this.isCombinationComponent = false;
116
+ this.canSort = true;
109
117
  this.children = [];
110
118
  this.componentConfig = options.componentConfig;
111
119
  this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
@@ -6,25 +6,29 @@ import React from 'react';
6
6
  declare class CommonDataTime implements ComponentInterface {
7
7
  name: string;
8
8
  id: string;
9
+ sortField: string;
9
10
  type: string;
10
11
  rules: any[];
11
12
  componentConfig: ComponentInterface["componentConfig"];
12
13
  isCombinationComponent: boolean;
14
+ canSort: boolean;
13
15
  children: ComponentInterface[];
14
16
  constructor(options: PickOption);
15
17
  getValue: (value: string) => string;
16
18
  renderClient: (record: any) => React.JSX.Element | null;
17
- renderPc: (value: any, record: Record) => React.JSX.Element;
18
- renderLog: (r: Record) => React.JSX.Element | null;
19
+ renderPc: (value: any, record: Record) => any;
20
+ renderLog: (r: Record) => any;
19
21
  getComponentValue: (r: Record) => any;
20
22
  renderExport: (value: any, record: Record) => string;
21
23
  editRender: () => null;
22
24
  filterConfig: (item: ColumnConfig) => {
25
+ searchDefaultConditions: "between";
23
26
  type: string;
24
27
  id: string;
25
28
  name: string;
26
29
  filterComponentType: "Date";
27
30
  filterFn: (value: string[]) => (i: Record) => boolean;
31
+ formatFilterValue: (val: Array<any>) => number[] | undefined;
28
32
  };
29
33
  }
30
34
  export default CommonDataTime;
@@ -9,6 +9,7 @@ import React from 'react';
9
9
  import moment from 'moment';
10
10
  import ItemView from "../../commonComponents/ItemView";
11
11
  import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
12
+ import { SYMBOL } from "../../constant";
12
13
 
13
14
  /**
14
15
  * 针对完成时间、创建时间、修改时间定义了3中类型
@@ -18,10 +19,12 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
18
19
  _classCallCheck(this, CommonDataTime);
19
20
  _defineProperty(this, "name", void 0);
20
21
  _defineProperty(this, "id", void 0);
22
+ _defineProperty(this, "sortField", void 0);
21
23
  _defineProperty(this, "type", void 0);
22
24
  _defineProperty(this, "rules", void 0);
23
25
  _defineProperty(this, "componentConfig", void 0);
24
26
  _defineProperty(this, "isCombinationComponent", void 0);
27
+ _defineProperty(this, "canSort", void 0);
25
28
  _defineProperty(this, "children", void 0);
26
29
  _defineProperty(this, "getValue", function (value) {
27
30
  return moment(value).format('YYYY-MM-DD HH:mm:ss');
@@ -34,10 +37,16 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
34
37
  }) : null;
35
38
  });
36
39
  _defineProperty(this, "renderPc", function (value, record) {
37
- if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
38
- return /*#__PURE__*/React.createElement("span", null, "--");
39
- }
40
- return /*#__PURE__*/React.createElement("span", null, moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format('YYYY-MM-DD HH:mm:ss'));
40
+ var _record;
41
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
42
+ // if (record?.[`${this.id}`] === undefined) {
43
+ // return <span>--</span>;
44
+ // }
45
+ // return (
46
+ // <span>
47
+ // {moment(record?.[`${this.id}`]).format('YYYY-MM-DD HH:mm:ss')}
48
+ // </span>
49
+ // );
41
50
  });
42
51
  _defineProperty(this, "renderLog", function (r) {
43
52
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
@@ -57,6 +66,7 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
57
66
  });
58
67
  _defineProperty(this, "filterConfig", function (item) {
59
68
  return {
69
+ searchDefaultConditions: SYMBOL.between,
60
70
  type: item.type,
61
71
  id: item.id,
62
72
  // 过滤组件id
@@ -68,15 +78,24 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
68
78
  var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, '');
69
79
  return _filterFn.filterDateFn(value, recordDateTime);
70
80
  };
81
+ },
82
+ formatFilterValue: function formatFilterValue(val) {
83
+ if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
84
+ return val === null || val === void 0 ? void 0 : val.map(function (v) {
85
+ return moment(v).startOf('second').valueOf();
86
+ });
87
+ }
71
88
  }
72
89
  };
73
90
  });
74
91
  this.name = options.name;
75
92
  this.id = options.id;
93
+ this.sortField = options.id;
76
94
  this.type = options.type;
77
95
  this.componentConfig = options.componentConfig;
78
96
  this.rules = [];
79
97
  this.isCombinationComponent = false;
98
+ this.canSort = true;
80
99
  this.children = [];
81
100
  });
82
101
  export default CommonDataTime;
@@ -3,10 +3,12 @@ import { ComponentInterface, PickOption, Record, ColumnConfig } from '../../type
3
3
  declare class CompletedUser implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
+ sortField: string;
6
7
  type: string;
7
8
  componentConfig: ComponentInterface["componentConfig"];
8
9
  effects: ComponentInterface["effects"];
9
10
  isCombinationComponent: boolean;
11
+ canSort: boolean;
10
12
  children: ComponentInterface[];
11
13
  constructor(options: PickOption);
12
14
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
@@ -16,14 +18,17 @@ declare class CompletedUser implements ComponentInterface {
16
18
  renderClient: () => null;
17
19
  editRender: () => null;
18
20
  filterConfig: (item: ColumnConfig) => {
21
+ searchDefaultConditions: "in";
19
22
  type: string;
20
23
  id: string;
21
24
  name: string;
22
25
  filterComponentType: "MultipleSelect";
23
- options: {
24
- label: string;
25
- value: string;
26
- }[];
26
+ props: {
27
+ options: {
28
+ label: string;
29
+ value: string;
30
+ }[];
31
+ };
27
32
  filterFn: (value: string) => (i: Record) => boolean;
28
33
  };
29
34
  }
@@ -7,15 +7,18 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
7
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
8
  import React from 'react';
9
9
  import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
10
+ import { SYMBOL } from "../../constant";
10
11
  var CompletedUser = /*#__PURE__*/_createClass(function CompletedUser(options) {
11
12
  var _this = this;
12
13
  _classCallCheck(this, CompletedUser);
13
14
  _defineProperty(this, "name", void 0);
14
15
  _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "sortField", void 0);
15
17
  _defineProperty(this, "type", void 0);
16
18
  _defineProperty(this, "componentConfig", void 0);
17
19
  _defineProperty(this, "effects", void 0);
18
20
  _defineProperty(this, "isCombinationComponent", void 0);
21
+ _defineProperty(this, "canSort", void 0);
19
22
  _defineProperty(this, "children", void 0);
20
23
  _defineProperty(this, "renderPc", function (value, record) {
21
24
  var _record;
@@ -40,13 +43,16 @@ var CompletedUser = /*#__PURE__*/_createClass(function CompletedUser(options) {
40
43
  _defineProperty(this, "filterConfig", function (item) {
41
44
  var _this$effects;
42
45
  return {
46
+ searchDefaultConditions: SYMBOL.in,
43
47
  type: item.type,
44
48
  id: item.id,
45
49
  // 过滤组件id
46
50
  name: item.name,
47
51
  // 过滤组件名称
48
52
  filterComponentType: 'MultipleSelect',
49
- options: ((_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.userList) || [],
53
+ props: {
54
+ options: ((_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.userList) || []
55
+ },
50
56
  filterFn: function filterFn(value) {
51
57
  return function (i) {
52
58
  return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
@@ -56,9 +62,11 @@ var CompletedUser = /*#__PURE__*/_createClass(function CompletedUser(options) {
56
62
  });
57
63
  this.name = "完成人";
58
64
  this.id = "completedUserName";
65
+ this.sortField = "completedUserName";
59
66
  this.type = "COMPLETED_USER_INPUT";
60
67
  this.effects = options.effects;
61
68
  this.isCombinationComponent = false;
69
+ this.canSort = true;
62
70
  this.children = [];
63
71
  });
64
72
  export default CompletedUser;
@@ -5,10 +5,12 @@ export declare const DateTime: ({ value, onChange, ...otherProps }: any) => Reac
5
5
  declare class BasicDataTime implements ComponentInterface {
6
6
  name: string;
7
7
  id: string;
8
+ sortField: string;
8
9
  type: string;
9
10
  rules: any[];
10
11
  componentConfig: ComponentInterface["componentConfig"];
11
12
  isCombinationComponent: boolean;
13
+ canSort: boolean;
12
14
  children: ComponentInterface[];
13
15
  constructor(options: PickOption);
14
16
  getValue: (value: Value) => string | undefined;
@@ -18,13 +20,6 @@ declare class BasicDataTime implements ComponentInterface {
18
20
  getComponentValue: (r: Record) => any;
19
21
  renderExport: (value: any, record: Record) => any;
20
22
  editRender: () => React.JSX.Element;
21
- filterConfig: (item: ColumnConfig) => {
22
- type: string;
23
- id: string;
24
- name: string;
25
- filterComponentType: "Date";
26
- options: any[];
27
- filterFn: (value: string[]) => (i: Record) => boolean;
28
- };
23
+ filterConfig: (item: ColumnConfig) => any;
29
24
  }
30
25
  export default BasicDataTime;
@@ -15,6 +15,7 @@ import moment from 'moment';
15
15
  import GetFormItem from "../GetFormItem";
16
16
  import ItemView from "../../commonComponents/ItemView";
17
17
  import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
18
+ import { SYMBOL } from "../../constant";
18
19
  export var DateTime = function DateTime(_ref) {
19
20
  var value = _ref.value,
20
21
  onChange = _ref.onChange,
@@ -34,10 +35,12 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
34
35
  _classCallCheck(this, BasicDataTime);
35
36
  _defineProperty(this, "name", void 0);
36
37
  _defineProperty(this, "id", void 0);
38
+ _defineProperty(this, "sortField", void 0);
37
39
  _defineProperty(this, "type", void 0);
38
40
  _defineProperty(this, "rules", void 0);
39
41
  _defineProperty(this, "componentConfig", void 0);
40
42
  _defineProperty(this, "isCombinationComponent", void 0);
43
+ _defineProperty(this, "canSort", void 0);
41
44
  _defineProperty(this, "children", void 0);
42
45
  _defineProperty(this, "getValue", function (value) {
43
46
  return Array.isArray(value) ? value.join('~') : value;
@@ -79,29 +82,47 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
79
82
  });
80
83
  });
81
84
  _defineProperty(this, "filterConfig", function (item) {
82
- var _item$config;
83
- return {
85
+ var _item$config, _item$config2;
86
+ var dateType = item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.dateType;
87
+ var obj = {
88
+ searchDefaultConditions: SYMBOL.between,
84
89
  type: item.type,
85
- id: item.id,
90
+ id: "".concat(item.id, "_dateTime"),
86
91
  // 过滤组件id
87
92
  name: item.name,
88
93
  // 过滤组件名称
89
94
  filterComponentType: 'Date',
90
- options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || [],
95
+ props: {
96
+ options: (item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : _item$config2.options) || []
97
+ },
91
98
  filterFn: function filterFn(value) {
92
99
  return function (i) {
93
100
  var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, 'dateTime');
94
101
  return _filterFn.filterDateFn(value, recordDateTime);
95
102
  };
103
+ },
104
+ // TODO: 自定义时间类型特殊,不需要转换,直接使用 YYYY-MM-DD HH:mm:ss格式查询
105
+ formatFilterValue: function formatFilterValue(val) {
106
+ if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
107
+ return val === null || val === void 0 ? void 0 : val.map(function (v) {
108
+ return moment(v).startOf('second').valueOf();
109
+ });
110
+ }
96
111
  }
97
112
  };
113
+ if (dateType !== null && dateType !== void 0 && dateType.includes('RANGE')) {
114
+ obj.componentDataType = 'dateArray';
115
+ }
116
+ return obj;
98
117
  });
99
118
  this.name = options.name;
100
119
  this.id = options.id;
120
+ this.sortField = "".concat(options.id, "_dateTime");
101
121
  this.type = options.type;
102
122
  this.componentConfig = options.componentConfig;
103
123
  this.rules = [];
104
124
  this.isCombinationComponent = false;
125
+ this.canSort = true;
105
126
  this.children = [];
106
127
  });
107
128
  export default BasicDataTime;
@@ -3,11 +3,13 @@ import React from 'react';
3
3
  declare class EItemEncode implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
+ sortField: string;
6
7
  type: string;
7
8
  rules: any[];
8
9
  componentConfig: ComponentInterface["componentConfig"];
9
10
  effects: ComponentInterface["effects"];
10
11
  isCombinationComponent: boolean;
12
+ canSort: boolean;
11
13
  children: ComponentInterface[];
12
14
  constructor(options: PickOption);
13
15
  renderClient: (record: any) => React.JSX.Element | null;
@@ -17,6 +19,7 @@ declare class EItemEncode implements ComponentInterface {
17
19
  renderExport: (value: unknown, record: Record) => any;
18
20
  editRender: () => React.JSX.Element;
19
21
  filterConfig: (item: ColumnConfig) => {
22
+ searchDefaultConditions: "like";
20
23
  type: string;
21
24
  id: string;
22
25
  name: string;
@@ -12,17 +12,20 @@ import ItemEncode from "./ItemEncode";
12
12
  import { GoodImage } from "../Common";
13
13
  import ItemView from "../../commonComponents/ItemView";
14
14
  import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
15
+ import { SYMBOL } from "../../constant";
15
16
  var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
16
17
  var _this = this,
17
18
  _this$componentConfig;
18
19
  _classCallCheck(this, EItemEncode);
19
20
  _defineProperty(this, "name", void 0);
20
21
  _defineProperty(this, "id", void 0);
22
+ _defineProperty(this, "sortField", void 0);
21
23
  _defineProperty(this, "type", void 0);
22
24
  _defineProperty(this, "rules", void 0);
23
25
  _defineProperty(this, "componentConfig", void 0);
24
26
  _defineProperty(this, "effects", void 0);
25
27
  _defineProperty(this, "isCombinationComponent", void 0);
28
+ _defineProperty(this, "canSort", void 0);
26
29
  _defineProperty(this, "children", void 0);
27
30
  _defineProperty(this, "renderClient", function (record) {
28
31
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -73,8 +76,9 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
73
76
  });
74
77
  _defineProperty(this, "filterConfig", function (item) {
75
78
  return {
79
+ searchDefaultConditions: SYMBOL.like,
76
80
  type: item.type,
77
- id: item.id,
81
+ id: "".concat(item.id, "_itemList"),
78
82
  // 过滤组件id
79
83
  name: item.name,
80
84
  // 过滤组件名称
@@ -92,10 +96,12 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
92
96
  });
93
97
  this.name = options.name;
94
98
  this.id = options.id;
99
+ this.sortField = "".concat(options.id, "_itemList");
95
100
  this.type = options.type;
96
101
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
97
102
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
98
103
  this.isCombinationComponent = false;
104
+ this.canSort = false;
99
105
  this.children = [];
100
106
  this.rules = this !== null && this !== void 0 && (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
101
107
  required: true,
@@ -3,11 +3,13 @@ import React from 'react';
3
3
  declare class EItemId implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
+ sortField: string;
6
7
  type: string;
7
8
  rules: any[];
8
9
  componentConfig: ComponentInterface["componentConfig"];
9
10
  effects: ComponentInterface["effects"];
10
11
  isCombinationComponent: boolean;
12
+ canSort: boolean;
11
13
  children: ComponentInterface[];
12
14
  constructor(options: PickOption);
13
15
  renderClient: (record: any) => React.JSX.Element | null;
@@ -17,6 +19,7 @@ declare class EItemId implements ComponentInterface {
17
19
  renderExport: (value: any, record: any) => any;
18
20
  editRender: () => React.JSX.Element;
19
21
  filterConfig: (item: ColumnConfig) => {
22
+ searchDefaultConditions: "like";
20
23
  type: string;
21
24
  id: string;
22
25
  name: string;
@@ -12,17 +12,20 @@ import ItemId from "./ItemId";
12
12
  import { GoodImage } from "../Common";
13
13
  import ItemView from "../../commonComponents/ItemView";
14
14
  import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
15
+ import { SYMBOL } from "../../constant";
15
16
  var EItemId = /*#__PURE__*/_createClass(function EItemId(options) {
16
17
  var _this = this,
17
18
  _this$componentConfig2;
18
19
  _classCallCheck(this, EItemId);
19
20
  _defineProperty(this, "name", void 0);
20
21
  _defineProperty(this, "id", void 0);
22
+ _defineProperty(this, "sortField", void 0);
21
23
  _defineProperty(this, "type", void 0);
22
24
  _defineProperty(this, "rules", void 0);
23
25
  _defineProperty(this, "componentConfig", void 0);
24
26
  _defineProperty(this, "effects", void 0);
25
27
  _defineProperty(this, "isCombinationComponent", void 0);
28
+ _defineProperty(this, "canSort", void 0);
26
29
  _defineProperty(this, "children", void 0);
27
30
  _defineProperty(this, "renderClient", function (record) {
28
31
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -74,8 +77,9 @@ var EItemId = /*#__PURE__*/_createClass(function EItemId(options) {
74
77
  });
75
78
  _defineProperty(this, "filterConfig", function (item) {
76
79
  return {
80
+ searchDefaultConditions: SYMBOL.like,
77
81
  type: item.type,
78
- id: item.id,
82
+ id: "".concat(item.id, "_itemList"),
79
83
  // 过滤组件id
80
84
  name: item.name,
81
85
  // 过滤组件名称
@@ -93,9 +97,11 @@ var EItemId = /*#__PURE__*/_createClass(function EItemId(options) {
93
97
  });
94
98
  this.name = options.name;
95
99
  this.id = options.id;
100
+ this.sortField = "".concat(options.id, "_itemList");
96
101
  this.type = options.type;
97
102
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
98
103
  this.isCombinationComponent = false;
104
+ this.canSort = false;
99
105
  this.children = [];
100
106
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
101
107
  this.rules = this !== null && this !== void 0 && (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
@@ -3,11 +3,13 @@ import React from "react";
3
3
  declare class EItemSelect implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
+ sortField: string;
6
7
  type: string;
7
8
  rules: any[];
8
9
  componentConfig: ComponentInterface["componentConfig"];
9
10
  effects: ComponentInterface["effects"];
10
11
  isCombinationComponent: boolean;
12
+ canSort: boolean;
11
13
  children: ComponentInterface[];
12
14
  constructor(options: PickOption);
13
15
  renderClient: (record: any) => React.JSX.Element | null;
@@ -17,11 +17,13 @@ var EItemSelect = /*#__PURE__*/_createClass(function EItemSelect(options) {
17
17
  _classCallCheck(this, EItemSelect);
18
18
  _defineProperty(this, "name", void 0);
19
19
  _defineProperty(this, "id", void 0);
20
+ _defineProperty(this, "sortField", void 0);
20
21
  _defineProperty(this, "type", void 0);
21
22
  _defineProperty(this, "rules", void 0);
22
23
  _defineProperty(this, "componentConfig", void 0);
23
24
  _defineProperty(this, "effects", void 0);
24
25
  _defineProperty(this, "isCombinationComponent", void 0);
26
+ _defineProperty(this, "canSort", void 0);
25
27
  _defineProperty(this, "children", void 0);
26
28
  _defineProperty(this, "renderClient", function (record) {
27
29
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -73,11 +75,13 @@ var EItemSelect = /*#__PURE__*/_createClass(function EItemSelect(options) {
73
75
  });
74
76
  this.name = options.name;
75
77
  this.id = options.id;
78
+ this.sortField = "".concat(options.id, "_itemList");
76
79
  this.type = options.type;
77
80
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
78
81
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
79
82
  this.rules = [];
80
83
  this.isCombinationComponent = false;
84
+ this.canSort = false;
81
85
  this.children = [];
82
86
  });
83
87
  export default EItemSelect;
@@ -3,10 +3,12 @@ import React from 'react';
3
3
  declare class ErpTradeId implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
+ sortField: string;
6
7
  type: string;
7
8
  rules: any[];
8
9
  componentConfig: ComponentInterface["componentConfig"];
9
10
  isCombinationComponent: boolean;
11
+ canSort: boolean;
10
12
  children: ComponentInterface[];
11
13
  constructor(options: PickOption);
12
14
  renderClient: (record: any) => React.JSX.Element | null;
@@ -16,11 +18,13 @@ declare class ErpTradeId implements ComponentInterface {
16
18
  renderExport: (value: any, record: Record) => any;
17
19
  editRender: () => React.JSX.Element;
18
20
  filterConfig: (item: ColumnConfig) => {
21
+ searchDefaultConditions: "in";
19
22
  type: string;
20
23
  id: string;
21
24
  name: string;
22
25
  filterComponentType: "Input";
23
26
  filterFn: (value: string) => (i: Record) => boolean;
27
+ formatFilterValue: (input: string) => string[];
24
28
  };
25
29
  }
26
30
  export default ErpTradeId;
@@ -10,15 +10,18 @@ import { TradeId } from '@kmkf-fe-packages/basic-components';
10
10
  import GetFormItem from "../GetFormItem";
11
11
  import ItemView from "../../commonComponents/ItemView";
12
12
  import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { SYMBOL } from "../../constant";
13
14
  var ErpTradeId = /*#__PURE__*/_createClass(function ErpTradeId(options) {
14
15
  var _this = this;
15
16
  _classCallCheck(this, ErpTradeId);
16
17
  _defineProperty(this, "name", void 0);
17
18
  _defineProperty(this, "id", void 0);
19
+ _defineProperty(this, "sortField", void 0);
18
20
  _defineProperty(this, "type", void 0);
19
21
  _defineProperty(this, "rules", void 0);
20
22
  _defineProperty(this, "componentConfig", void 0);
21
23
  _defineProperty(this, "isCombinationComponent", void 0);
24
+ _defineProperty(this, "canSort", void 0);
22
25
  _defineProperty(this, "children", void 0);
23
26
  _defineProperty(this, "renderClient", function (record) {
24
27
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -54,8 +57,9 @@ var ErpTradeId = /*#__PURE__*/_createClass(function ErpTradeId(options) {
54
57
  });
55
58
  _defineProperty(this, "filterConfig", function (item) {
56
59
  return {
60
+ searchDefaultConditions: SYMBOL.in,
57
61
  type: item.type,
58
- id: item.id,
62
+ id: "".concat(item.id, "_tradeId"),
59
63
  // 过滤组件id
60
64
  name: item.name,
61
65
  // 过滤组件名称
@@ -64,15 +68,20 @@ var ErpTradeId = /*#__PURE__*/_createClass(function ErpTradeId(options) {
64
68
  return function (i) {
65
69
  return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'tradeId'), value);
66
70
  };
71
+ },
72
+ formatFilterValue: function formatFilterValue(input) {
73
+ return input.split(/[,|,]/);
67
74
  }
68
75
  };
69
76
  });
70
77
  this.name = options.name;
71
78
  this.id = options.id;
79
+ this.sortField = "".concat(options.id, "_tradeId");
72
80
  this.type = options.type;
73
81
  this.componentConfig = options.componentConfig;
74
82
  this.rules = [];
75
83
  this.isCombinationComponent = false;
84
+ this.canSort = true;
76
85
  this.children = [];
77
86
  });
78
87
  export default ErpTradeId;