@kmkf-fe-packages/services-components 0.5.2-alpha.3 → 0.5.2-alpha.5

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 (110) hide show
  1. package/dist/esm/commonComponents/PlatformAvatar/index.d.ts +7 -0
  2. package/dist/esm/commonComponents/PlatformAvatar/index.js +28 -0
  3. package/dist/esm/components/ActualPayment/index.d.ts +7 -1
  4. package/dist/esm/components/ActualPayment/index.js +15 -1
  5. package/dist/esm/components/Alipay/index.d.ts +7 -1
  6. package/dist/esm/components/Alipay/index.js +3 -0
  7. package/dist/esm/components/AlipayAccount/index.d.ts +7 -1
  8. package/dist/esm/components/AlipayAccount/index.js +13 -1
  9. package/dist/esm/components/AlipayName/index.d.ts +7 -1
  10. package/dist/esm/components/AlipayName/index.js +13 -1
  11. package/dist/esm/components/BuyerNick/index.d.ts +7 -1
  12. package/dist/esm/components/BuyerNick/index.js +15 -1
  13. package/dist/esm/components/Cascader/index.d.ts +8 -1
  14. package/dist/esm/components/Cascader/index.js +18 -1
  15. package/dist/esm/components/Checkbox/index.d.ts +8 -1
  16. package/dist/esm/components/Checkbox/index.js +21 -1
  17. package/dist/esm/components/CommonDataTime/index.d.ts +7 -1
  18. package/dist/esm/components/CommonDataTime/index.js +16 -1
  19. package/dist/esm/components/CompletedUser/index.d.ts +28 -0
  20. package/dist/esm/components/CompletedUser/index.js +60 -0
  21. package/dist/esm/components/DataTime/index.d.ts +8 -1
  22. package/dist/esm/components/DataTime/index.js +18 -1
  23. package/dist/esm/components/EItemEnCode/index.d.ts +7 -1
  24. package/dist/esm/components/EItemEnCode/index.js +19 -1
  25. package/dist/esm/components/EItemId/index.d.ts +7 -1
  26. package/dist/esm/components/EItemId/index.js +19 -1
  27. package/dist/esm/components/Express/index.d.ts +7 -1
  28. package/dist/esm/components/Express/index.js +14 -1
  29. package/dist/esm/components/ExpressCode/index.d.ts +7 -1
  30. package/dist/esm/components/ExpressCode/index.js +14 -1
  31. package/dist/esm/components/FlowStatusSelect/index.d.ts +11 -1
  32. package/dist/esm/components/FlowStatusSelect/index.js +22 -0
  33. package/dist/esm/components/Handler/index.d.ts +32 -0
  34. package/dist/esm/components/Handler/index.js +64 -0
  35. package/dist/esm/components/Input/index.d.ts +7 -1
  36. package/dist/esm/components/Input/index.js +15 -1
  37. package/dist/esm/components/JstItemSelect/index.d.ts +7 -1
  38. package/dist/esm/components/JstItemSelect/index.js +32 -1
  39. package/dist/esm/components/JstLogistics/index.d.ts +17 -1
  40. package/dist/esm/components/JstLogistics/index.js +34 -1
  41. package/dist/esm/components/JstSendGood/index.d.ts +7 -1
  42. package/dist/esm/components/JstSendGood/index.js +32 -1
  43. package/dist/esm/components/JstSupply/index.d.ts +7 -1
  44. package/dist/esm/components/JstSupply/index.js +32 -1
  45. package/dist/esm/components/Logistics/index.d.ts +12 -1
  46. package/dist/esm/components/Logistics/index.js +7 -0
  47. package/dist/esm/components/MultSelect/index.d.ts +8 -1
  48. package/dist/esm/components/MultSelect/index.js +18 -1
  49. package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +7 -1
  50. package/dist/esm/components/Ordinary/OrdinaryHeader.js +13 -1
  51. package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +7 -1
  52. package/dist/esm/components/Ordinary/OrdinaryMoney.js +13 -1
  53. package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +7 -1
  54. package/dist/esm/components/Ordinary/OrdinarySerial.js +13 -1
  55. package/dist/esm/components/Ordinary/index.d.ts +7 -1
  56. package/dist/esm/components/Ordinary/index.js +5 -0
  57. package/dist/esm/components/Payment/AlipayNick.d.ts +7 -1
  58. package/dist/esm/components/Payment/AlipayNick.js +13 -1
  59. package/dist/esm/components/Payment/AlipayNo.d.ts +7 -1
  60. package/dist/esm/components/Payment/AlipayNo.js +13 -1
  61. package/dist/esm/components/Payment/AlipayTime.d.ts +7 -1
  62. package/dist/esm/components/Payment/AlipayTime.js +14 -1
  63. package/dist/esm/components/Payment/BuyerNick.d.ts +7 -1
  64. package/dist/esm/components/Payment/BuyerNick.js +13 -1
  65. package/dist/esm/components/Payment/PaymentAmount.d.ts +7 -1
  66. package/dist/esm/components/Payment/PaymentAmount.js +13 -1
  67. package/dist/esm/components/Payment/PaymentStatus.d.ts +15 -1
  68. package/dist/esm/components/Payment/PaymentStatus.js +37 -1
  69. package/dist/esm/components/Payment/PaymentTid.d.ts +7 -1
  70. package/dist/esm/components/Payment/PaymentTid.js +13 -1
  71. package/dist/esm/components/Payment/index.d.ts +16 -1
  72. package/dist/esm/components/Payment/index.js +5 -0
  73. package/dist/esm/components/PlatForm/index.d.ts +9 -2
  74. package/dist/esm/components/PlatForm/index.js +19 -3
  75. package/dist/esm/components/Radio/index.d.ts +8 -1
  76. package/dist/esm/components/Radio/index.js +20 -1
  77. package/dist/esm/components/ReceiverMobile/index.d.ts +7 -1
  78. package/dist/esm/components/ReceiverMobile/index.js +15 -1
  79. package/dist/esm/components/ReceiverName/index.d.ts +7 -1
  80. package/dist/esm/components/ReceiverName/index.js +15 -1
  81. package/dist/esm/components/Remark/index.d.ts +7 -1
  82. package/dist/esm/components/Remark/index.js +15 -1
  83. package/dist/esm/components/ReturnLogistics/index.d.ts +12 -1
  84. package/dist/esm/components/ReturnLogistics/index.js +7 -0
  85. package/dist/esm/components/Select/index.d.ts +8 -1
  86. package/dist/esm/components/Select/index.js +17 -1
  87. package/dist/esm/components/ShopInput/index.d.ts +26 -0
  88. package/dist/esm/components/ShopInput/index.js +71 -0
  89. package/dist/esm/components/ShopName/index.d.ts +7 -1
  90. package/dist/esm/components/ShopName/index.js +15 -1
  91. package/dist/esm/components/Submitter/index.d.ts +28 -0
  92. package/dist/esm/components/Submitter/index.js +60 -0
  93. package/dist/esm/components/SystemOrderNo/index.d.ts +7 -1
  94. package/dist/esm/components/SystemOrderNo/index.js +15 -1
  95. package/dist/esm/components/TemplateSelect/index.d.ts +8 -1
  96. package/dist/esm/components/TemplateSelect/index.js +17 -0
  97. package/dist/esm/components/TextArea/index.d.ts +7 -1
  98. package/dist/esm/components/TextArea/index.js +15 -1
  99. package/dist/esm/components/ThirdItemSelect/index.d.ts +7 -1
  100. package/dist/esm/components/ThirdItemSelect/index.js +21 -1
  101. package/dist/esm/components/TradeDateTime/index.d.ts +8 -1
  102. package/dist/esm/components/TradeDateTime/index.js +31 -1
  103. package/dist/esm/components/TradeId/index.d.ts +7 -1
  104. package/dist/esm/components/TradeId/index.js +15 -1
  105. package/dist/esm/components/WorkOrderId/index.d.ts +7 -1
  106. package/dist/esm/components/WorkOrderId/index.js +15 -0
  107. package/dist/esm/index.d.ts +4 -0
  108. package/dist/esm/index.js +5 -1
  109. package/dist/esm/type.d.ts +21 -0
  110. package/package.json +3 -3
@@ -0,0 +1,60 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import React from 'react';
9
+ import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
10
+ var Submitter = /*#__PURE__*/_createClass(function Submitter(options) {
11
+ var _this = this;
12
+ _classCallCheck(this, Submitter);
13
+ _defineProperty(this, "name", void 0);
14
+ _defineProperty(this, "id", void 0);
15
+ _defineProperty(this, "type", void 0);
16
+ _defineProperty(this, "componentConfig", void 0);
17
+ _defineProperty(this, "effects", void 0);
18
+ _defineProperty(this, "isCombinationComponent", void 0);
19
+ _defineProperty(this, "children", void 0);
20
+ _defineProperty(this, "renderPc", function (value, record) {
21
+ var _record;
22
+ return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--');
23
+ });
24
+ _defineProperty(this, "renderExport", function (value, record) {
25
+ var _record2;
26
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record2 !== void 0 ? _record2 : '--';
27
+ });
28
+ _defineProperty(this, "render", function () {
29
+ return null;
30
+ });
31
+ _defineProperty(this, "renderClient", function () {
32
+ return null;
33
+ });
34
+ _defineProperty(this, "editRender", function () {
35
+ return null;
36
+ });
37
+ _defineProperty(this, "filterConfig", function (item) {
38
+ var _this$effects;
39
+ return {
40
+ id: item.id,
41
+ // 过滤组件id
42
+ name: item.name,
43
+ // 过滤组件名称
44
+ filterComponentType: 'MultipleSelect',
45
+ options: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.userList,
46
+ filterFn: function filterFn(value) {
47
+ return function (i) {
48
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
49
+ };
50
+ }
51
+ };
52
+ });
53
+ this.name = "提交人";
54
+ this.id = "submitter";
55
+ this.type = "OPERATOR_INPUT";
56
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
57
+ this.isCombinationComponent = false;
58
+ this.children = [];
59
+ });
60
+ export default Submitter;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption, Record } from '../../type';
2
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
3
3
  declare class SystemOrderNo implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -15,5 +15,11 @@ declare class SystemOrderNo implements ComponentInterface {
15
15
  renderPc: (value: string, record: Record) => JSX.Element;
16
16
  renderExport: (value: string, record: Record) => any;
17
17
  editRender: (value: any) => JSX.Element;
18
+ filterConfig: (item: ColumnConfig) => {
19
+ id: string;
20
+ name: string;
21
+ filterComponentType: "Input";
22
+ filterFn: (value: string) => (i: Record) => boolean;
23
+ };
18
24
  }
19
25
  export default SystemOrderNo;
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import { ApaasInput } from '@kmkf-fe-packages/basic-components';
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
14
  var SystemOrderNo = /*#__PURE__*/_createClass(function SystemOrderNo(options) {
15
15
  var _this = this;
16
16
  _classCallCheck(this, SystemOrderNo);
@@ -52,6 +52,20 @@ var SystemOrderNo = /*#__PURE__*/_createClass(function SystemOrderNo(options) {
52
52
  }))
53
53
  });
54
54
  });
55
+ _defineProperty(this, "filterConfig", function (item) {
56
+ return {
57
+ id: item.id,
58
+ // 过滤组件id
59
+ name: item.name,
60
+ // 过滤组件名称
61
+ filterComponentType: 'Input',
62
+ filterFn: function filterFn(value) {
63
+ return function (i) {
64
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'systemOrderNo'), value);
65
+ };
66
+ }
67
+ };
68
+ });
55
69
  this.name = options.name;
56
70
  this.id = options.id;
57
71
  this.type = options.type;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption, Record } from '../../type';
2
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
3
3
  declare class TemplateSelect implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -15,5 +15,12 @@ declare class TemplateSelect implements ComponentInterface {
15
15
  render: () => null;
16
16
  renderClient: () => null;
17
17
  editRender: (value: any) => null;
18
+ filterConfig: (item: ColumnConfig) => {
19
+ id: string;
20
+ name: string;
21
+ filterComponentType: "MultipleSelect";
22
+ filterFn: (value: string) => (i: Record) => boolean;
23
+ options: any[] | undefined;
24
+ };
18
25
  }
19
26
  export default TemplateSelect;
@@ -8,6 +8,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
8
8
  import React from 'react';
9
9
  import find from 'lodash/find';
10
10
  import get from 'lodash/get';
11
+ import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
11
12
  var TemplateSelect = /*#__PURE__*/_createClass(function TemplateSelect(options) {
12
13
  var _this = this;
13
14
  _classCallCheck(this, TemplateSelect);
@@ -50,6 +51,22 @@ var TemplateSelect = /*#__PURE__*/_createClass(function TemplateSelect(options)
50
51
  _defineProperty(this, "editRender", function (value) {
51
52
  return null;
52
53
  });
54
+ _defineProperty(this, "filterConfig", function (item) {
55
+ var _this$effects3;
56
+ return {
57
+ id: item.id,
58
+ // 过滤组件id
59
+ name: item.name,
60
+ // 过滤组件名称
61
+ filterComponentType: 'MultipleSelect',
62
+ filterFn: function filterFn(value) {
63
+ return function (i) {
64
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
65
+ };
66
+ },
67
+ options: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.templateList
68
+ };
69
+ });
53
70
  this.name = options.name;
54
71
  this.id = options.id;
55
72
  this.type = options.type;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption, Record } from '../../type';
2
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
3
3
  declare class BasicInput implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -14,5 +14,11 @@ declare class BasicInput implements ComponentInterface {
14
14
  renderExport: (value: any, record: Record) => any;
15
15
  renderClient: (record: Record) => JSX.Element | null;
16
16
  editRender: () => JSX.Element;
17
+ filterConfig: (item: ColumnConfig) => {
18
+ id: string;
19
+ name: string;
20
+ filterComponentType: "Input";
21
+ filterFn: (value: string) => (i: Record) => boolean;
22
+ };
17
23
  }
18
24
  export default BasicInput;
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import { ApaasTextArea } from '@kmkf-fe-packages/basic-components';
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
14
  var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
15
15
  var _this = this;
16
16
  _classCallCheck(this, BasicInput);
@@ -51,6 +51,20 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
51
51
  }))
52
52
  });
53
53
  });
54
+ _defineProperty(this, "filterConfig", function (item) {
55
+ return {
56
+ id: item.id,
57
+ // 过滤组件id
58
+ name: item.name,
59
+ // 过滤组件名称
60
+ filterComponentType: 'Input',
61
+ filterFn: function filterFn(value) {
62
+ return function (i) {
63
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'textarea')).includes(value);
64
+ };
65
+ }
66
+ };
67
+ });
54
68
  this.name = options.name;
55
69
  this.id = options.id;
56
70
  this.type = options.type;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption, Record } from '../../type';
2
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
3
3
  declare class ThirdItemSelect implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -15,5 +15,11 @@ declare class ThirdItemSelect implements ComponentInterface {
15
15
  renderPc: (value: any, record: Record) => JSX.Element;
16
16
  renderExport: (value: any, record: Record) => any;
17
17
  editRender: () => JSX.Element;
18
+ filterConfig: (item: ColumnConfig) => {
19
+ id: string;
20
+ name: string;
21
+ filterComponentType: "Input";
22
+ filterFn: (value: string) => (i: Record) => any;
23
+ };
18
24
  }
19
25
  export default ThirdItemSelect;
@@ -11,7 +11,7 @@ import GetFormItem from "../GetFormItem";
11
11
  import ItemEncode from "./ItemEncode";
12
12
  import { GoodImage } from "../Common";
13
13
  import ItemView from "../../commonComponents/ItemView";
14
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
14
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
15
15
  var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options) {
16
16
  var _this = this,
17
17
  _this$componentConfig2;
@@ -71,6 +71,26 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
71
71
  }))
72
72
  });
73
73
  });
74
+ _defineProperty(this, "filterConfig", function (item) {
75
+ return {
76
+ id: item.id,
77
+ // 过滤组件id
78
+ name: item.name,
79
+ // 过滤组件名称
80
+ filterComponentType: 'Input',
81
+ filterFn: function filterFn(value) {
82
+ return function (i) {
83
+ var _ref2;
84
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, 'itemList') || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
85
+ var _String, _String2;
86
+ var id = item !== null && item !== void 0 && item.itemId ? (_String = String(item === null || item === void 0 ? void 0 : item.itemId)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
87
+ var name = item !== null && item !== void 0 && item.supplierName ? (_String2 = String(item === null || item === void 0 ? void 0 : item.supplierName)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
88
+ return id || name;
89
+ });
90
+ };
91
+ }
92
+ };
93
+ });
74
94
  this.name = options.name || '供应商编码/名称';
75
95
  this.id = options.id;
76
96
  this.type = options.type;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption, DataType, Record } from '../../type';
2
+ import { ComponentInterface, PickOption, DataType, Record, ColumnConfig } from '../../type';
3
3
  declare type Value = string | string[] | undefined;
4
4
  declare class BasicDataTime implements ComponentInterface {
5
5
  name: string;
@@ -20,5 +20,12 @@ declare class BasicDataTime implements ComponentInterface {
20
20
  renderPc: (value: unknown, record: Record) => JSX.Element;
21
21
  renderExport: (value: unknown, record: Record) => any;
22
22
  editRender: () => JSX.Element;
23
+ getKeyByComponentType: (type: string) => "tradeCreateDateTime" | "tradePaymentDateTime" | "tradeDeliveryDateTime" | "tradeClosingDateTime" | undefined;
24
+ filterConfig: (item: ColumnConfig) => {
25
+ id: string;
26
+ name: string;
27
+ filterComponentType: "Date";
28
+ filterFn: (value: string) => (i: Record) => any;
29
+ };
23
30
  }
24
31
  export default BasicDataTime;
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import { DateTime } from "../DataTime";
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
14
  var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
15
15
  var _this = this;
16
16
  _classCallCheck(this, BasicDataTime);
@@ -70,6 +70,36 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
70
70
  }))
71
71
  });
72
72
  });
73
+ _defineProperty(this, "getKeyByComponentType", function (type) {
74
+ if (type === 'TRADE_CLOSING_DATETIME') {
75
+ return 'tradeClosingDateTime';
76
+ }
77
+ if (type === 'TRADE_CREATE_DATETIME') {
78
+ return 'tradeCreateDateTime';
79
+ }
80
+ if (type === 'TRADE_PAYMENT_DATETIME') {
81
+ return 'tradePaymentDateTime';
82
+ }
83
+ if (type === 'TRADE_DELIVERY_DATETIME') {
84
+ return 'tradeDeliveryDateTime';
85
+ }
86
+ });
87
+ _defineProperty(this, "filterConfig", function (item) {
88
+ return {
89
+ id: item.id,
90
+ // 过滤组件id
91
+ name: item.name,
92
+ // 过滤组件名称
93
+ filterComponentType: 'Date',
94
+ filterFn: function filterFn(value) {
95
+ return function (i) {
96
+ var key = _this.getKeyByComponentType(item.type);
97
+ var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, key);
98
+ return _filterFn.dateFilterFn(value, recordDateTime);
99
+ };
100
+ }
101
+ };
102
+ });
73
103
  this.name = options.name;
74
104
  this.id = options.id;
75
105
  this.type = options.type;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption, DataType, Record } from '../../type';
2
+ import { ComponentInterface, PickOption, DataType, Record, ColumnConfig } from '../../type';
3
3
  declare class ETradeId implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -21,5 +21,11 @@ declare class ETradeId implements ComponentInterface {
21
21
  renderPc: (value: unknown, record: Record) => JSX.Element;
22
22
  renderExport: (value: unknown, record: Record) => any;
23
23
  editRender: (value: any) => JSX.Element;
24
+ filterConfig: (item: ColumnConfig) => {
25
+ id: string;
26
+ name: string;
27
+ filterComponentType: "Input";
28
+ filterFn: (value: string) => (i: Record) => boolean;
29
+ };
24
30
  }
25
31
  export default ETradeId;
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import { TradeId } from '@kmkf-fe-packages/basic-components';
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
14
  var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
15
15
  var _this = this;
16
16
  _classCallCheck(this, ETradeId);
@@ -65,6 +65,20 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
65
65
  }))
66
66
  });
67
67
  });
68
+ _defineProperty(this, "filterConfig", function (item) {
69
+ return {
70
+ id: item.id,
71
+ // 过滤组件id
72
+ name: item.name,
73
+ // 过滤组件名称
74
+ filterComponentType: 'Input',
75
+ filterFn: function filterFn(value) {
76
+ return function (i) {
77
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'tradeId'), value);
78
+ };
79
+ }
80
+ };
81
+ });
68
82
  this.name = options.name;
69
83
  this.id = options.id;
70
84
  this.type = options.type;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption } from '../../type';
2
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
3
3
  declare class WorkOrderId implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -16,5 +16,11 @@ declare class WorkOrderId implements ComponentInterface {
16
16
  render: () => null;
17
17
  renderClient: () => null;
18
18
  editRender: () => JSX.Element;
19
+ filterConfig: (item: ColumnConfig) => {
20
+ id: string;
21
+ name: string;
22
+ filterComponentType: "Input";
23
+ filterFn: (value: string) => (i: Record) => boolean;
24
+ };
19
25
  }
20
26
  export default WorkOrderId;
@@ -10,6 +10,7 @@ import React from 'react';
10
10
  import { message } from 'antd';
11
11
  import { CopyOutlined } from '@ant-design/icons';
12
12
  import { ApaasInput } from '@kmkf-fe-packages/basic-components';
13
+ import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
13
14
  import GetFormItem from "../GetFormItem";
14
15
  import repeatPng from "./img/repeat.png";
15
16
  import copy from 'copy-to-clipboard';
@@ -73,6 +74,20 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
73
74
  }))
74
75
  });
75
76
  });
77
+ _defineProperty(this, "filterConfig", function (item) {
78
+ return {
79
+ id: item.id,
80
+ // 过滤组件id
81
+ name: item.name,
82
+ // 过滤组件名称
83
+ filterComponentType: 'Input',
84
+ filterFn: function filterFn(value) {
85
+ return function (i) {
86
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, '')).includes(value);
87
+ };
88
+ }
89
+ };
90
+ });
76
91
  this.name = options.name;
77
92
  this.id = options.id;
78
93
  this.type = options.type;
@@ -40,3 +40,7 @@ export { default as TemplateSelect } from './components/TemplateSelect';
40
40
  export { default as WorkOrderId } from './components/WorkOrderId';
41
41
  export { default as LogisticsInterception } from './components/LogisticsInterception';
42
42
  export { default as PlatForm } from './components/PlatForm';
43
+ export { default as ShopInput } from './components/ShopInput';
44
+ export { default as Submitter } from './components/Submitter';
45
+ export { default as Handler } from './components/Handler';
46
+ export { default as CompletedUser } from './components/CompletedUser';
package/dist/esm/index.js CHANGED
@@ -39,4 +39,8 @@ export { default as FlowStatusSelect } from "./components/FlowStatusSelect";
39
39
  export { default as TemplateSelect } from "./components/TemplateSelect";
40
40
  export { default as WorkOrderId } from "./components/WorkOrderId";
41
41
  export { default as LogisticsInterception } from "./components/LogisticsInterception";
42
- export { default as PlatForm } from "./components/PlatForm";
42
+ export { default as PlatForm } from "./components/PlatForm";
43
+ export { default as ShopInput } from "./components/ShopInput";
44
+ export { default as Submitter } from "./components/Submitter";
45
+ export { default as Handler } from "./components/Handler";
46
+ export { default as CompletedUser } from "./components/CompletedUser";
@@ -114,6 +114,10 @@ export interface ComponentInterface {
114
114
  form: FormInstance;
115
115
  shopList?: any[];
116
116
  shopId?: string;
117
+ userList?: {
118
+ label: string;
119
+ value: string;
120
+ }[];
117
121
  };
118
122
  /**
119
123
  * 客户端卡片字段渲染,record的格式为下面这种,可以直接使用
@@ -144,5 +148,22 @@ export interface ComponentInterface {
144
148
  formItemIndex?: number;
145
149
  onBlur?: (p1: any, p2: any) => void;
146
150
  }) => JSX.Element | null;
151
+ filterConfig?: (p: ColumnConfig) => FilterConfigType | FilterConfigType[];
147
152
  }
148
153
  export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects'>;
154
+ export declare type ColumnConfig = {
155
+ id: string;
156
+ name: string;
157
+ type: string;
158
+ subKey?: string;
159
+ mode?: 'multiple';
160
+ config?: ComponentInterface['componentConfig'];
161
+ };
162
+ export declare type FilterConfigType = {
163
+ id: string;
164
+ name: string;
165
+ options?: any[];
166
+ filterComponentType: FilterComponentType;
167
+ filterFn?: (p: any) => (r: Record) => unknown;
168
+ };
169
+ export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' | 'Cascader' | 'ShopList';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.5.2-alpha.3",
3
+ "version": "0.5.2-alpha.5",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@kmkf-fe-packages/basic-components": "^0.5.2-alpha.0",
25
- "@kmkf-fe-packages/kmkf-utils": "^0.5.2-alpha.2"
25
+ "@kmkf-fe-packages/kmkf-utils": "^0.5.2-alpha.5"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@ant-design/icons": "^4.7.0",
@@ -35,5 +35,5 @@
35
35
  "gitHooks": {
36
36
  "pre-commit": "lint-staged"
37
37
  },
38
- "gitHead": "422650d5cd04643e1cdf1ae01443f9bf902c9b06"
38
+ "gitHead": "6d47d0543401386a9ca66fcb35add3db7aa7b6de"
39
39
  }