@kmkf-fe-packages/services-components 2.1.10 → 2.1.11

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 (32) hide show
  1. package/dist/esm/components/AfterSalesOrderId/index.d.ts +10 -4
  2. package/dist/esm/components/AfterSalesOrderId/index.js +13 -10
  3. package/dist/esm/components/BS/common/expressCode.d.ts +10 -4
  4. package/dist/esm/components/BS/common/expressCode.js +22 -19
  5. package/dist/esm/components/BuyerNick/index.d.ts +17 -7
  6. package/dist/esm/components/BuyerNick/index.js +24 -11
  7. package/dist/esm/components/CommonMultiStatus/index.d.ts +8 -4
  8. package/dist/esm/components/CommonMultiStatus/index.js +79 -78
  9. package/dist/esm/components/Input/index.d.ts +14 -5
  10. package/dist/esm/components/Input/index.js +24 -18
  11. package/dist/esm/components/Picture/index.d.ts +5 -5
  12. package/dist/esm/components/Picture/index.js +19 -19
  13. package/dist/esm/components/PicturePro/PictureUrl.d.ts +4 -4
  14. package/dist/esm/components/PicturePro/PictureUrl.js +7 -7
  15. package/dist/esm/components/ReceiverName/index.d.ts +3 -3
  16. package/dist/esm/components/ReceiverName/index.js +8 -8
  17. package/dist/esm/components/Remark/index.d.ts +16 -6
  18. package/dist/esm/components/Remark/index.js +29 -16
  19. package/dist/esm/components/ShopName/index.d.ts +13 -3
  20. package/dist/esm/components/ShopName/index.js +16 -3
  21. package/dist/esm/components/TextArea/index.d.ts +16 -6
  22. package/dist/esm/components/TextArea/index.js +23 -10
  23. package/dist/esm/constant.d.ts +9 -0
  24. package/dist/esm/constant.js +38 -14
  25. package/dist/esm/factory.d.ts +1 -1
  26. package/dist/esm/type.d.ts +1 -1
  27. package/package.json +4 -4
  28. package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
  29. package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
  30. package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
  31. package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
  32. package/dist/esm/components/Common/dist/index.js +0 -1019
@@ -6,11 +6,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
- import React from 'react';
10
- import { ApaasInput } from '@kmkf-fe-packages/basic-components';
9
+ import React from "react";
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, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
14
14
  import { SYMBOL } from "../../constant";
15
15
  var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
16
16
  var _this = this;
@@ -42,7 +42,7 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
42
42
  className: "pointer",
43
43
  onClick: function onClick(e) {
44
44
  var _this$effects, _this$effects2;
45
- typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
45
+ typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
46
46
  e.stopPropagation();
47
47
  }
48
48
  }, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_receiveName")]);
@@ -66,7 +66,7 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
66
66
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
67
67
  display: p === null || p === void 0 ? void 0 : p.display,
68
68
  required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
69
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
69
+ tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
70
70
  component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
71
71
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
72
72
  }))
@@ -80,10 +80,10 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
80
80
  // 过滤组件id
81
81
  name: item.name,
82
82
  // 过滤组件名称
83
- filterComponentType: 'Input',
83
+ filterComponentType: "Input",
84
84
  filterFn: function filterFn(value) {
85
85
  return function (i) {
86
- return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'receiveName')).includes(value);
86
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "receiveName")).includes(value);
87
87
  };
88
88
  }
89
89
  };
@@ -99,6 +99,6 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
99
99
  this.isCombinationComponent = false;
100
100
  this.canSort = true;
101
101
  this.children = [];
102
- this.dataType = 'string';
102
+ this.dataType = "string";
103
103
  });
104
104
  export default ReceiverName;
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
3
  declare type Value = {
4
4
  flag?: number | string;
5
5
  remark?: string;
@@ -10,14 +10,14 @@ declare class ERemark implements ComponentInterface {
10
10
  sortField: string;
11
11
  type: string;
12
12
  rules: any[];
13
- componentConfig: ComponentInterface["componentConfig"];
13
+ componentConfig: ComponentInterface['componentConfig'];
14
14
  imgList: any[];
15
15
  flagColors: string[];
16
16
  isCombinationComponent: boolean;
17
17
  formField: string;
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
- dataType: ComponentInterface["dataType"];
20
+ dataType: ComponentInterface['dataType'];
21
21
  constructor(options: PickOption);
22
22
  render: (value: Value) => React.JSX.Element;
23
23
  renderClient: (record: Record) => React.JSX.Element | null;
@@ -30,12 +30,22 @@ declare class ERemark implements ComponentInterface {
30
30
  renderExport: (value: unknown, record: Record) => any;
31
31
  editRender: (p: any) => React.JSX.Element;
32
32
  filterConfig: (item: ColumnConfig) => {
33
- searchDefaultConditions: "like";
33
+ searchDefaultConditions: {
34
+ in: "in";
35
+ anylike: "anylike";
36
+ };
34
37
  type: string;
35
38
  id: string;
36
39
  name: string;
37
- filterComponentType: "Input";
40
+ filterComponentType: "SelectInput";
41
+ props: {
42
+ filterOptions: {
43
+ label: string;
44
+ value: string;
45
+ }[];
46
+ };
38
47
  filterFn: (value: string) => (i: Record) => boolean;
48
+ formatFilterValue: (value: any) => any;
39
49
  };
40
50
  }
41
51
  export default ERemark;
@@ -5,8 +5,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
5
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
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
- import React from "react";
9
- import { Remark } from "@kmkf-fe-packages/basic-components";
8
+ import React from 'react';
9
+ import { Remark } from '@kmkf-fe-packages/basic-components';
10
10
  import GetFormItem from "../GetFormItem";
11
11
  import trade0 from "./flag/trade-icon-flag-0.png";
12
12
  import trade1 from "./flag/trade-icon-flag-1.png";
@@ -14,10 +14,10 @@ import trade2 from "./flag/trade-icon-flag-2.png";
14
14
  import trade3 from "./flag/trade-icon-flag-3.png";
15
15
  import trade4 from "./flag/trade-icon-flag-4.png";
16
16
  import trade5 from "./flag/trade-icon-flag-5.png";
17
- import get from "lodash/get";
17
+ import get from 'lodash/get';
18
18
  import ItemView from "../../commonComponents/ItemView";
19
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
20
- import { SYMBOL } from "../../constant";
19
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
20
+ import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
21
21
  var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
22
22
  var _this = this,
23
23
  _this$componentConfig5;
@@ -36,14 +36,14 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
36
36
  _defineProperty(this, "children", void 0);
37
37
  _defineProperty(this, "dataType", void 0);
38
38
  _defineProperty(this, "render", function (value) {
39
- var index = get(value, "flag");
39
+ var index = get(value, 'flag');
40
40
  return /*#__PURE__*/React.createElement("div", {
41
41
  style: {
42
- display: "inline-block"
42
+ display: 'inline-block'
43
43
  }
44
44
  }, index !== undefined && /*#__PURE__*/React.createElement("img", {
45
45
  src: _this.imgList[Number(index)]
46
- }), /*#__PURE__*/React.createElement("span", null, get(value, "remark")));
46
+ }), /*#__PURE__*/React.createElement("span", null, get(value, 'remark')));
47
47
  });
48
48
  _defineProperty(this, "renderClient", function (record) {
49
49
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -59,7 +59,7 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
59
59
  var index = get(record, "".concat(_this.id, "_flag"));
60
60
  return /*#__PURE__*/React.createElement("div", {
61
61
  style: {
62
- display: "inline-block"
62
+ display: 'inline-block'
63
63
  }
64
64
  }, !isNull(get(record, "".concat(_this.id, "_flag"))) ? index !== undefined && /*#__PURE__*/React.createElement("img", {
65
65
  src: _this.imgList[Number(index)]
@@ -99,17 +99,30 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
99
99
  });
100
100
  _defineProperty(this, "filterConfig", function (item) {
101
101
  return {
102
- searchDefaultConditions: SYMBOL.like,
102
+ searchDefaultConditions: {
103
+ in: SYMBOL.in,
104
+ anylike: SYMBOL.anylike
105
+ },
103
106
  type: item.type,
104
107
  id: "".concat(item.id, "_remark"),
105
108
  // 过滤组件id
106
109
  name: item.name,
107
110
  // 过滤组件名称
108
- filterComponentType: "Input",
111
+ filterComponentType: 'SelectInput',
112
+ props: {
113
+ filterOptions: SEARCH_OPTIONS
114
+ },
109
115
  filterFn: function filterFn(value) {
110
116
  return function (i) {
111
- return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "remark")).includes(value);
117
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'remark')).includes(value);
112
118
  };
119
+ },
120
+ formatFilterValue: function formatFilterValue(value) {
121
+ if (['in', 'anylike'].includes(value.type)) {
122
+ return batchInput(value.keywords);
123
+ } else {
124
+ return value;
125
+ }
113
126
  }
114
127
  };
115
128
  });
@@ -119,21 +132,21 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
119
132
  this.formField = "".concat(options.id, "_remark");
120
133
  this.type = options.type;
121
134
  this.componentConfig = options.componentConfig;
122
- this.dataType = "object";
135
+ this.dataType = 'object';
123
136
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
124
137
  validator: function validator(_, value) {
125
138
  var _this$componentConfig6;
126
139
  if (!(value !== null && value !== void 0 && value.remark)) {
127
- return Promise.reject(new Error("请输入备注"));
140
+ return Promise.reject(new Error('请输入备注'));
128
141
  }
129
142
  if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.isShowFlag && !(value !== null && value !== void 0 && value.flag) && (value === null || value === void 0 ? void 0 : value.flag) !== 0) {
130
- return Promise.reject(new Error("请选择旗帜"));
143
+ return Promise.reject(new Error('请选择旗帜'));
131
144
  }
132
145
  return Promise.resolve();
133
146
  }
134
147
  }] : [];
135
148
  this.imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
136
- this.flagColors = ["gray", "red", "yellow", "green", "blue", "purple"];
149
+ this.flagColors = ['gray', 'red', 'yellow', 'green', 'blue', 'purple'];
137
150
  this.isCombinationComponent = false;
138
151
  this.canSort = true;
139
152
  this.children = [];
@@ -6,7 +6,7 @@ declare class BasicInput implements ComponentInterface {
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface["componentConfig"];
9
+ componentConfig: ComponentInterface['componentConfig'];
10
10
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
@@ -20,12 +20,22 @@ declare class BasicInput implements ComponentInterface {
20
20
  renderExport: (value: any, record: Record) => any;
21
21
  editRender: (p: any) => React.JSX.Element;
22
22
  filterConfig: (item: ColumnConfig) => {
23
- searchDefaultConditions: "like";
23
+ searchDefaultConditions: {
24
+ in: "in";
25
+ anylike: "anylike";
26
+ };
24
27
  type: string;
25
28
  id: string;
26
29
  name: string;
27
- filterComponentType: "Input";
30
+ filterComponentType: "SelectInput";
31
+ props: {
32
+ filterOptions: {
33
+ label: string;
34
+ value: string;
35
+ }[];
36
+ };
28
37
  filterFn: (value: string) => (i: Record) => boolean;
38
+ formatFilterValue: (value: any) => any;
29
39
  };
30
40
  }
31
41
  export default BasicInput;
@@ -11,7 +11,7 @@ import { ApaasInput } 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
+ import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
15
15
  var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
16
16
  var _this = this;
17
17
  _classCallCheck(this, BasicInput);
@@ -65,17 +65,30 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
65
65
  });
66
66
  _defineProperty(this, "filterConfig", function (item) {
67
67
  return {
68
- searchDefaultConditions: SYMBOL.like,
68
+ searchDefaultConditions: {
69
+ in: SYMBOL.in,
70
+ anylike: SYMBOL.anylike
71
+ },
69
72
  type: item.type,
70
73
  id: "".concat(item.id, "_shopName"),
71
74
  // 过滤组件id
72
75
  name: item.name,
73
76
  // 过滤组件名称
74
- filterComponentType: 'Input',
77
+ filterComponentType: 'SelectInput',
78
+ props: {
79
+ filterOptions: SEARCH_OPTIONS
80
+ },
75
81
  filterFn: function filterFn(value) {
76
82
  return function (i) {
77
83
  return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'shopName')).includes(value);
78
84
  };
85
+ },
86
+ formatFilterValue: function formatFilterValue(value) {
87
+ if (['in', 'anylike'].includes(value.type)) {
88
+ return batchInput(value.keywords);
89
+ } else {
90
+ return value;
91
+ }
79
92
  }
80
93
  };
81
94
  });
@@ -1,17 +1,17 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
3
  declare class BasicInput implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface["componentConfig"];
9
+ componentConfig: ComponentInterface['componentConfig'];
10
10
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
13
13
  children: ComponentInterface[];
14
- dataType: ComponentInterface["dataType"];
14
+ dataType: ComponentInterface['dataType'];
15
15
  constructor(options: PickOption);
16
16
  renderPc: (value: any, record: Record) => React.JSX.Element;
17
17
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -20,12 +20,22 @@ declare class BasicInput implements ComponentInterface {
20
20
  renderClient: (record: Record) => React.JSX.Element | null;
21
21
  editRender: (p: any) => React.JSX.Element;
22
22
  filterConfig: (item: ColumnConfig) => {
23
- searchDefaultConditions: "like";
23
+ searchDefaultConditions: {
24
+ in: "in";
25
+ anylike: "anylike";
26
+ };
24
27
  type: string;
25
28
  id: string;
26
29
  name: string;
27
- filterComponentType: "Input";
30
+ filterComponentType: "SelectInput";
31
+ props: {
32
+ filterOptions: {
33
+ label: string;
34
+ value: string;
35
+ }[];
36
+ };
28
37
  filterFn: (value: string) => (i: Record) => boolean;
38
+ formatFilterValue: (value: any) => any;
29
39
  };
30
40
  }
31
41
  export default BasicInput;
@@ -6,12 +6,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
- import React from "react";
10
- import { ApaasTextArea } from "@kmkf-fe-packages/basic-components";
9
+ import React from 'react';
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, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
14
- import { SYMBOL } from "../../constant";
13
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
+ import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
15
15
  var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
16
16
  var _this = this;
17
17
  _classCallCheck(this, BasicInput);
@@ -28,7 +28,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
28
28
  _defineProperty(this, "dataType", void 0);
29
29
  _defineProperty(this, "renderPc", function (value, record) {
30
30
  var _record;
31
- return /*#__PURE__*/React.createElement("pre", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_textarea")]) !== null && _record !== void 0 ? _record : "--");
31
+ return /*#__PURE__*/React.createElement("pre", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_textarea")]) !== null && _record !== void 0 ? _record : '--');
32
32
  });
33
33
  _defineProperty(this, "renderLog", function (r) {
34
34
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_textarea")])) return null;
@@ -39,7 +39,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
39
39
  });
40
40
  _defineProperty(this, "renderExport", function (value, record) {
41
41
  var _record2;
42
- return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_textarea")]) !== null && _record2 !== void 0 ? _record2 : "--";
42
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_textarea")]) !== null && _record2 !== void 0 ? _record2 : '--';
43
43
  });
44
44
  _defineProperty(this, "renderClient", function (record) {
45
45
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -65,17 +65,30 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
65
65
  });
66
66
  _defineProperty(this, "filterConfig", function (item) {
67
67
  return {
68
- searchDefaultConditions: SYMBOL.like,
68
+ searchDefaultConditions: {
69
+ in: SYMBOL.in,
70
+ anylike: SYMBOL.anylike
71
+ },
69
72
  type: item.type,
70
73
  id: "".concat(item.id, "_textarea"),
71
74
  // 过滤组件id
72
75
  name: item.name,
73
76
  // 过滤组件名称
74
- filterComponentType: "Input",
77
+ filterComponentType: 'SelectInput',
78
+ props: {
79
+ filterOptions: SEARCH_OPTIONS
80
+ },
75
81
  filterFn: function filterFn(value) {
76
82
  return function (i) {
77
- return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "textarea")).includes(value);
83
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'textarea')).includes(value);
78
84
  };
85
+ },
86
+ formatFilterValue: function formatFilterValue(value) {
87
+ if (['in', 'anylike'].includes(value.type)) {
88
+ return batchInput(value.keywords);
89
+ } else {
90
+ return value;
91
+ }
79
92
  }
80
93
  };
81
94
  });
@@ -85,7 +98,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
85
98
  this.formField = "".concat(options.id, "_textarea");
86
99
  this.type = options.type;
87
100
  this.componentConfig = options.componentConfig;
88
- this.dataType = "string";
101
+ this.dataType = 'string';
89
102
  this.rules = [];
90
103
  this.isCombinationComponent = false;
91
104
  this.canSort = true;
@@ -9,8 +9,17 @@ export declare const SYMBOL: {
9
9
  ne: string;
10
10
  in: string;
11
11
  nin: string;
12
+ anylike: string;
12
13
  non: string;
13
14
  notnull: string;
14
15
  };
15
16
  export declare const batchInput: (val: string) => string | string[];
16
17
  export declare const hostUrl = "https://kefu.kuaimai.com";
18
+ export declare const SEARCH_OPTIONS: {
19
+ label: string;
20
+ value: string;
21
+ }[];
22
+ export declare const SEARCH_OPTIONS_V2: {
23
+ label: string;
24
+ value: string;
25
+ }[];
@@ -1,22 +1,46 @@
1
1
  export var SYMBOL = {
2
- between: 'between',
3
- eq: 'eq',
4
- like: 'like',
5
- gt: 'gt',
6
- gte: 'gte',
7
- lt: 'lt',
8
- lte: 'lte',
9
- ne: 'ne',
10
- in: 'in',
11
- nin: 'nin',
12
- non: 'non',
13
- notnull: 'notnull'
2
+ between: "between",
3
+ eq: "eq",
4
+ like: "like",
5
+ gt: "gt",
6
+ gte: "gte",
7
+ lt: "lt",
8
+ lte: "lte",
9
+ ne: "ne",
10
+ in: "in",
11
+ nin: "nin",
12
+ anylike: "anylike",
13
+ non: "non",
14
+ notnull: "notnull"
14
15
  };
15
16
  export var batchInput = function batchInput(val) {
16
- return val ? val.split(/[,|,|\s|\n|\rn]/).filter(function (t) {
17
+ return val ? val.split(/[,|,|\s|\n|\r]/).filter(function (t) {
17
18
  return !!t;
18
19
  }).map(function (t) {
19
20
  return t.trim();
20
21
  }) : val;
21
22
  };
22
- export var hostUrl = 'https://kefu.kuaimai.com';
23
+ export var hostUrl = "https://kefu.kuaimai.com";
24
+ export var SEARCH_OPTIONS = [{
25
+ label: "关键词精确匹配",
26
+ value: "in"
27
+ }, {
28
+ label: "关键词模糊匹配",
29
+ value: "anylike"
30
+ }, {
31
+ label: "为空查询",
32
+ value: "isNull"
33
+ }, {
34
+ label: "不为空查询",
35
+ value: "notNull"
36
+ }];
37
+ export var SEARCH_OPTIONS_V2 = [{
38
+ label: "关键字",
39
+ value: "in"
40
+ }, {
41
+ label: "为空查询",
42
+ value: "isNull"
43
+ }, {
44
+ label: "不为空查询",
45
+ value: "notNull"
46
+ }];
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, KmVideo } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BuyerNick | FlowStatusSelect | JstSendGood | MsgStatus | BasicPosting | AsyncSelect | BasicSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn;
3
+ export declare const factory: (type: string, options: PickOption) => BuyerNick | BasicCheckbox | BasicFile | FlowStatusSelect | BasicInput | BasicAddress | BasicCascader | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyReissue | GyReturn | AsyncSelect | GyGoods;
@@ -8,7 +8,7 @@ export declare type ShowHeaderObjType = {
8
8
  };
9
9
  export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
10
10
  export declare type ALignType = "left" | "right" | "center";
11
- export declare type QuerySymbol = keyof typeof SYMBOL;
11
+ export declare type QuerySymbol = keyof typeof SYMBOL | Record;
12
12
  export declare type Record = {
13
13
  [props in string]: any;
14
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.1.10",
3
+ "version": "2.1.11",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "2.1.8",
25
- "@kmkf-fe-packages/kmkf-utils": "2.1.8",
24
+ "@kmkf-fe-packages/basic-components": "2.1.11",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.1.11",
26
26
  "b64-to-blob": "^1.2.19",
27
27
  "html2canvas": "^1.4.1",
28
28
  "react-pdf-js": "^5.1.0"
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "3658c9a9b1c9811dce266d1098cda5bf7a3fcd6d",
44
+ "gitHead": "bae37c7d672c8cf62a72cd261a2c69fe14c3ce5e",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- var react_1 = require("react");
5
- var react_redux_1 = require("react-redux");
6
- var toolkit_1 = require("@reduxjs/toolkit");
7
- var getTemplate = function getTemplate(companyUserConfig) {
8
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
9
- return JSON.stringify({
10
- hasWln: (_c = (_b = (_a = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _a === void 0 ? void 0 : _a.wln) === null || _b === void 0 ? void 0 : _b.show) !== null && _c !== void 0 ? _c : false,
11
- hasWdt: (_f = (_e = (_d = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _d === void 0 ? void 0 : _d.wdt) === null || _e === void 0 ? void 0 : _e.show) !== null && _f !== void 0 ? _f : false,
12
- hasBs: (_j = (_h = (_g = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _g === void 0 ? void 0 : _g.bs) === null || _h === void 0 ? void 0 : _h.show) !== null && _j !== void 0 ? _j : false,
13
- hasE3: (_m = (_l = (_k = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _k === void 0 ? void 0 : _k.bse3) === null || _l === void 0 ? void 0 : _l.show) !== null && _m !== void 0 ? _m : false,
14
- hasJst: (_q = (_p = (_o = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _o === void 0 ? void 0 : _o.jst) === null || _p === void 0 ? void 0 : _p.show) !== null && _q !== void 0 ? _q : false,
15
- hasGy: (_t = (_s = (_r = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _r === void 0 ? void 0 : _r.gy) === null || _s === void 0 ? void 0 : _s.show) !== null && _t !== void 0 ? _t : false
16
- });
17
- };
18
- function useGetHasErpData() {
19
- var companyUserConfig = react_redux_1.useSelector(toolkit_1.createSelector([function (state) {
20
- var _a, _b, _c, _d;
21
- console.log("state--useSelector", state);
22
- /**
23
- * pc main
24
- * 端 workOrder
25
- * **/
26
- return (_d = (_b = (_a = state === null || state === void 0 ? void 0 : state.main) === null || _a === void 0 ? void 0 : _a.userInfo) !== null && _b !== void 0 ? _b : (_c = state === null || state === void 0 ? void 0 : state.workOrder) === null || _c === void 0 ? void 0 : _c.userInfo) !== null && _d !== void 0 ? _d : {};
27
- }], function (state) {
28
- var _a;
29
- var companyUserConfig = (_a = state === null || state === void 0 ? void 0 : state.companyUserConfig) !== null && _a !== void 0 ? _a : {};
30
- if (typeof companyUserConfig === "string") {
31
- try {
32
- companyUserConfig = JSON.parse(companyUserConfig);
33
- } catch (e) {
34
- console.error("companyUserConfig转换异常", companyUserConfig);
35
- companyUserConfig = {};
36
- }
37
- }
38
- return companyUserConfig;
39
- }));
40
- var _a = react_1.useState(getTemplate({})),
41
- hasErpDataJson = _a[0],
42
- setHasErpDataJson = _a[1];
43
- react_1.useEffect(function () {
44
- setHasErpDataJson(getTemplate(companyUserConfig));
45
- console.log("companyUserConfig---", companyUserConfig);
46
- }, [companyUserConfig]);
47
- var hasErpData = react_1.useMemo(function () {
48
- return JSON.parse(hasErpDataJson);
49
- }, [hasErpDataJson]);
50
- return hasErpData;
51
- }
52
- exports["default"] = useGetHasErpData;