@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
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption } from '../../type';
2
+ import { ComponentInterface, PickOption, ColumnConfig } from '../../type';
3
3
  import AlipayNick from './AlipayNick';
4
4
  import AlipayNo from './AlipayNo';
5
5
  import AlipayTime from './AlipayTime';
@@ -28,5 +28,20 @@ declare class Logistics implements ComponentInterface {
28
28
  renderPc: () => null;
29
29
  renderExport: () => null;
30
30
  editRender: (value: any) => JSX.Element;
31
+ filterConfig: (item: ColumnConfig) => ({
32
+ id: string;
33
+ name: string;
34
+ filterComponentType: "MultipleSelect";
35
+ options: {
36
+ label: string;
37
+ value: string;
38
+ }[];
39
+ filterFn: (value: string) => (i: import("../../type").Record) => boolean;
40
+ } | {
41
+ id: string;
42
+ name: string;
43
+ filterComponentType: "Input";
44
+ filterFn: (value: string) => (i: import("../../type").Record) => any;
45
+ })[];
31
46
  }
32
47
  export default Logistics;
@@ -1,4 +1,6 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2
4
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
5
  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); } }
4
6
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -57,6 +59,9 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
57
59
  }))
58
60
  });
59
61
  });
62
+ _defineProperty(this, "filterConfig", function (item) {
63
+ return [_this.alipayNick.filterConfig(_objectSpread({}, item)), _this.paymentAmount.filterConfig(_objectSpread({}, item)), _this.alipayNo.filterConfig(_objectSpread({}, item)), _this.buyerNick.filterConfig(_objectSpread({}, item)), _this.paymentTid.filterConfig(_objectSpread({}, item)), _this.paymentStatus.filterConfig(_objectSpread({}, item)), _this.payTime.filterConfig(_objectSpread({}, item))];
64
+ });
60
65
  this.name = options.name;
61
66
  this.id = options.id;
62
67
  this.type = options.type;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, Record } from '../../type';
2
+ import { ComponentInterface, ColumnConfig, Record } from '../../type';
3
3
  import { PlatData } from '@kmkf-fe-packages/kmkf-utils';
4
4
  declare class PlatForm implements ComponentInterface {
5
5
  name: string;
@@ -11,9 +11,16 @@ declare class PlatForm implements ComponentInterface {
11
11
  platInstance: PlatData;
12
12
  constructor();
13
13
  renderPc: (value: any, record: Record) => JSX.Element;
14
- renderExport: (value: any, record: Record) => any;
14
+ renderExport: (value: any, record: Record) => string;
15
15
  render: () => null;
16
16
  renderClient: () => null;
17
17
  editRender: () => null;
18
+ filterConfig: (item: ColumnConfig) => {
19
+ id: string;
20
+ name: string;
21
+ filterComponentType: "MultipleSelect";
22
+ filterFn: (value: string) => (i: Record) => boolean;
23
+ options: any;
24
+ };
18
25
  }
19
26
  export default PlatForm;
@@ -6,7 +6,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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
- import { PlatData } from '@kmkf-fe-packages/kmkf-utils';
9
+ import { PlatData, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
10
10
  var PlatForm = /*#__PURE__*/_createClass(function PlatForm() {
11
11
  var _this = this;
12
12
  _classCallCheck(this, PlatForm);
@@ -23,9 +23,9 @@ var PlatForm = /*#__PURE__*/_createClass(function PlatForm() {
23
23
  return /*#__PURE__*/React.createElement("span", null, (_platMap$record = platMap === null || platMap === void 0 ? void 0 : platMap[record === null || record === void 0 ? void 0 : record["".concat(_this.id)]]) !== null && _platMap$record !== void 0 ? _platMap$record : '--');
24
24
  });
25
25
  _defineProperty(this, "renderExport", function (value, record) {
26
- var _record;
26
+ var _platMap$record2;
27
27
  var platMap = _this.platInstance.getPlatMap();
28
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
28
+ return (_platMap$record2 = platMap === null || platMap === void 0 ? void 0 : platMap[record === null || record === void 0 ? void 0 : record["".concat(_this.id)]]) !== null && _platMap$record2 !== void 0 ? _platMap$record2 : '--';
29
29
  });
30
30
  _defineProperty(this, "render", function () {
31
31
  return null;
@@ -36,6 +36,22 @@ var PlatForm = /*#__PURE__*/_createClass(function PlatForm() {
36
36
  _defineProperty(this, "editRender", function () {
37
37
  return null;
38
38
  });
39
+ _defineProperty(this, "filterConfig", function (item) {
40
+ var platData = _this.platInstance.getPlatSelectList();
41
+ return {
42
+ id: item.id,
43
+ // 过滤组件id
44
+ name: item.name,
45
+ // 过滤组件名称
46
+ filterComponentType: 'MultipleSelect',
47
+ filterFn: function filterFn(value) {
48
+ return function (i) {
49
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
50
+ };
51
+ },
52
+ options: platData
53
+ };
54
+ });
39
55
  this.name = "平台";
40
56
  this.id = "platform";
41
57
  this.type = "PLATFORM_INPUT";
@@ -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 type Value = {
4
4
  value?: string;
5
5
  other?: string;
@@ -18,5 +18,12 @@ declare class BasicRadio implements ComponentInterface {
18
18
  renderExport: (value: any, record: Record) => string;
19
19
  renderClient: (record: Record) => JSX.Element | null;
20
20
  editRender: () => JSX.Element;
21
+ filterConfig: (item: ColumnConfig) => {
22
+ id: string;
23
+ name: string;
24
+ filterComponentType: "MultipleSelect";
25
+ options: any[] | undefined;
26
+ filterFn: (value: string) => (i: Record) => boolean;
27
+ };
21
28
  }
22
29
  export default BasicRadio;
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import { ApaasSelect } 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
  import get from 'lodash/get';
15
15
  var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
16
16
  var _this = this,
@@ -59,6 +59,25 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
59
59
  }))
60
60
  });
61
61
  });
62
+ _defineProperty(this, "filterConfig", function (item) {
63
+ var _item$config, _item$config2, _item$config2$options, _item$config3;
64
+ return {
65
+ id: item.id,
66
+ // 过滤组件id
67
+ name: item.name,
68
+ // 过滤组件名称
69
+ filterComponentType: 'MultipleSelect',
70
+ 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({
71
+ label: '其他',
72
+ value: '其他'
73
+ }) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || [],
74
+ filterFn: function filterFn(value) {
75
+ return function (i) {
76
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'radio'));
77
+ };
78
+ } // 第一个为选中值,第二个参数为表格行记录值
79
+ };
80
+ });
62
81
  this.name = options.name;
63
82
  this.id = options.id;
64
83
  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 ReceiverMobile implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -15,5 +15,11 @@ declare class ReceiverMobile implements ComponentInterface {
15
15
  renderPc: (value: any, record: Record) => JSX.Element;
16
16
  renderExport: (value: any, 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 ReceiverMobile;
@@ -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 ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options) {
15
15
  var _this = this;
16
16
  _classCallCheck(this, ReceiverMobile);
@@ -62,6 +62,20 @@ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options)
62
62
  }))
63
63
  });
64
64
  });
65
+ _defineProperty(this, "filterConfig", function (item) {
66
+ return {
67
+ id: item.id,
68
+ // 过滤组件id
69
+ name: item.name,
70
+ // 过滤组件名称
71
+ filterComponentType: 'Input',
72
+ filterFn: function filterFn(value) {
73
+ return function (i) {
74
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'receiveMobile')).includes(value);
75
+ };
76
+ }
77
+ };
78
+ });
65
79
  this.name = options.name;
66
80
  this.id = options.id;
67
81
  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 ReceiverName implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -15,5 +15,11 @@ declare class ReceiverName 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) => boolean;
23
+ };
18
24
  }
19
25
  export default ReceiverName;
@@ -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 ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
15
15
  var _this = this;
16
16
  _classCallCheck(this, ReceiverName);
@@ -59,6 +59,20 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
59
59
  }))
60
60
  });
61
61
  });
62
+ _defineProperty(this, "filterConfig", function (item) {
63
+ return {
64
+ id: item.id,
65
+ // 过滤组件id
66
+ name: item.name,
67
+ // 过滤组件名称
68
+ filterComponentType: 'Input',
69
+ filterFn: function filterFn(value) {
70
+ return function (i) {
71
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'receiveName')).includes(value);
72
+ };
73
+ }
74
+ };
75
+ });
62
76
  this.name = options.name;
63
77
  this.id = options.id;
64
78
  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 type Value = {
4
4
  flag?: number | string;
5
5
  remark?: string;
@@ -20,5 +20,11 @@ declare class ERemark 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
+ filterConfig: (item: ColumnConfig) => {
24
+ id: string;
25
+ name: string;
26
+ filterComponentType: "Input";
27
+ filterFn: (value: string) => (i: Record) => boolean;
28
+ };
23
29
  }
24
30
  export default ERemark;
@@ -16,7 +16,7 @@ import trade4 from "./flag/trade-icon-flag-4.png";
16
16
  import trade5 from "./flag/trade-icon-flag-5.png";
17
17
  import get from 'lodash/get';
18
18
  import ItemView from "../../commonComponents/ItemView";
19
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
19
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
20
20
  var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
21
21
  var _this = this,
22
22
  _this$componentConfig3;
@@ -72,6 +72,20 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
72
72
  component: /*#__PURE__*/React.createElement(Remark, _this.componentConfig)
73
73
  });
74
74
  });
75
+ _defineProperty(this, "filterConfig", function (item) {
76
+ return {
77
+ id: item.id,
78
+ // 过滤组件id
79
+ name: item.name,
80
+ // 过滤组件名称
81
+ filterComponentType: 'Input',
82
+ filterFn: function filterFn(value) {
83
+ return function (i) {
84
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'remark')).includes(value);
85
+ };
86
+ }
87
+ };
88
+ });
75
89
  this.name = options.name;
76
90
  this.id = options.id;
77
91
  this.type = options.type;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption, DataType } from '../../type';
2
+ import { ComponentInterface, PickOption, DataType, ColumnConfig } from '../../type';
3
3
  import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
4
4
  import Express from '../Express';
5
5
  import ExpressCode from '../ExpressCode';
@@ -25,5 +25,16 @@ declare class ReturnLogistics implements ComponentInterface {
25
25
  renderPc: () => null;
26
26
  renderExport: () => null;
27
27
  editRender: (value: any) => JSX.Element;
28
+ filterConfig: (item: ColumnConfig) => ({
29
+ id: string;
30
+ name: string;
31
+ filterComponentType: "MultipleSelect";
32
+ filterFn: (value: string) => (i: import("../../type").Record) => boolean;
33
+ } | {
34
+ id: string;
35
+ name: string;
36
+ filterComponentType: "Input";
37
+ filterFn: (value: string) => (i: import("../../type").Record) => boolean;
38
+ })[];
28
39
  }
29
40
  export default ReturnLogistics;
@@ -58,6 +58,13 @@ var ReturnLogistics = /*#__PURE__*/_createClass(function ReturnLogistics(options
58
58
  }))
59
59
  });
60
60
  });
61
+ _defineProperty(this, "filterConfig", function (item) {
62
+ return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
63
+ subKey: 'returnLogisticsCompany'
64
+ })), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
65
+ subKey: 'returnLogisticsCode'
66
+ }))];
67
+ });
61
68
  this.name = options.name;
62
69
  this.id = options.id;
63
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 BasicSelect implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -14,5 +14,12 @@ declare class BasicSelect implements ComponentInterface {
14
14
  renderClient: (record: any) => JSX.Element | null;
15
15
  renderPc: (value: any, record: Record) => JSX.Element;
16
16
  renderExport: (value: any, record: Record) => any;
17
+ filterConfig: (item: ColumnConfig) => {
18
+ id: string;
19
+ name: string;
20
+ filterComponentType: "MultipleSelect";
21
+ options: any[];
22
+ filterFn: (value: string) => (i: Record) => boolean;
23
+ };
17
24
  }
18
25
  export default BasicSelect;
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import { ApaasSelect } 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 BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
15
15
  var _this = this;
16
16
  _classCallCheck(this, BasicSelect);
@@ -52,6 +52,22 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
52
52
  var _record2;
53
53
  return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_select")]) !== null && _record2 !== void 0 ? _record2 : '--';
54
54
  });
55
+ _defineProperty(this, "filterConfig", function (item) {
56
+ var _item$config;
57
+ return {
58
+ id: item.id,
59
+ // 过滤组件id
60
+ name: item.name,
61
+ // 过滤组件名称
62
+ filterComponentType: 'MultipleSelect',
63
+ options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || [],
64
+ filterFn: function filterFn(value) {
65
+ return function (i) {
66
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'select'));
67
+ };
68
+ } // 第一个为选中值,第二个参数为表格行记录值
69
+ };
70
+ });
55
71
  this.name = options.name;
56
72
  this.id = options.id;
57
73
  this.type = options.type;
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import { ComponentInterface, ColumnConfig, Record, PickOption } from '../../type';
3
+ declare class ShopInput implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ type: string;
7
+ componentConfig: ComponentInterface["componentConfig"];
8
+ effects: ComponentInterface["effects"];
9
+ isCombinationComponent: boolean;
10
+ children: ComponentInterface[];
11
+ constructor(options: PickOption);
12
+ renderPc: (shopName: string, record: any) => JSX.Element;
13
+ renderExport: (value: any, record: Record) => any;
14
+ render: () => null;
15
+ renderClient: () => null;
16
+ editRender: () => null;
17
+ filterConfig: (item: ColumnConfig) => {
18
+ id: string;
19
+ name: string;
20
+ filterComponentType: "ShopList";
21
+ shopList: any[];
22
+ mode: string;
23
+ filterFn: (value: string) => (i: Record) => boolean | undefined;
24
+ };
25
+ }
26
+ export default ShopInput;
@@ -0,0 +1,71 @@
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 PlatformAvatar from "../../commonComponents/PlatformAvatar";
10
+ import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
11
+ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, ShopInput);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "type", void 0);
17
+ _defineProperty(this, "componentConfig", void 0);
18
+ _defineProperty(this, "effects", void 0);
19
+ _defineProperty(this, "isCombinationComponent", void 0);
20
+ _defineProperty(this, "children", void 0);
21
+ _defineProperty(this, "renderPc", function (shopName, record) {
22
+ return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(PlatformAvatar, {
23
+ type: record === null || record === void 0 ? void 0 : record.platform,
24
+ styles: {
25
+ marginRight: 5
26
+ }
27
+ }), shopName);
28
+ });
29
+ _defineProperty(this, "renderExport", function (value, record) {
30
+ var _record;
31
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
32
+ });
33
+ _defineProperty(this, "render", function () {
34
+ return null;
35
+ });
36
+ _defineProperty(this, "renderClient", function () {
37
+ return null;
38
+ });
39
+ _defineProperty(this, "editRender", function () {
40
+ return null;
41
+ });
42
+ _defineProperty(this, "filterConfig", function (item) {
43
+ var _this$effects;
44
+ return {
45
+ id: item.id,
46
+ // 过滤组件id
47
+ name: item.name,
48
+ // 过滤组件名称
49
+ filterComponentType: 'ShopList',
50
+ shopList: (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopList) || [],
51
+ mode: 'multiple',
52
+ filterFn: function filterFn(value) {
53
+ return function (i) {
54
+ var _this$effects2, _this$effects2$shopLi, _this$effects2$shopLi2, _this$effects2$shopLi3;
55
+ return _this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : (_this$effects2$shopLi = _this$effects2.shopList) === null || _this$effects2$shopLi === void 0 ? void 0 : (_this$effects2$shopLi2 = _this$effects2$shopLi.filter(function (item) {
56
+ return value === null || value === void 0 ? void 0 : value.includes(item.shopId);
57
+ })) === null || _this$effects2$shopLi2 === void 0 ? void 0 : (_this$effects2$shopLi3 = _this$effects2$shopLi2.map(function (item) {
58
+ return item.shopName;
59
+ })) === null || _this$effects2$shopLi3 === void 0 ? void 0 : _this$effects2$shopLi3.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
60
+ };
61
+ }
62
+ };
63
+ });
64
+ this.name = "店铺名称";
65
+ this.id = "shopName";
66
+ this.type = "SHOP_INPUT";
67
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
68
+ this.isCombinationComponent = false;
69
+ this.children = [];
70
+ });
71
+ export default ShopInput;
@@ -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
  renderPc: (value: any, record: Record) => JSX.Element;
15
15
  renderExport: (value: any, record: Record) => any;
16
16
  editRender: (value: any) => 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 { 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 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, 'shopName')).includes(value);
64
+ };
65
+ }
66
+ };
67
+ });
54
68
  this.name = options.name;
55
69
  this.id = options.id;
56
70
  this.type = options.type;
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import { ComponentInterface, ColumnConfig, Record, PickOption } from '../../type';
3
+ declare class Submitter implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ type: string;
7
+ componentConfig: ComponentInterface["componentConfig"];
8
+ effects: ComponentInterface["effects"];
9
+ isCombinationComponent: boolean;
10
+ children: ComponentInterface[];
11
+ constructor(options: PickOption);
12
+ renderPc: (value: string, record: Record) => JSX.Element;
13
+ renderExport: (value: any, record: Record) => any;
14
+ render: () => null;
15
+ renderClient: () => null;
16
+ editRender: () => null;
17
+ filterConfig: (item: ColumnConfig) => {
18
+ id: string;
19
+ name: string;
20
+ filterComponentType: "MultipleSelect";
21
+ options: {
22
+ label: string;
23
+ value: string;
24
+ }[] | undefined;
25
+ filterFn: (value: string) => (i: Record) => boolean;
26
+ };
27
+ }
28
+ export default Submitter;