@kmkf-fe-packages/services-components 0.23.1-beta.1 → 0.23.1-beta.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 (55) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/components/BS/BsLogistics/index.js +5 -4
  3. package/dist/esm/components/BS/BsReissue/index.d.ts +2 -1
  4. package/dist/esm/components/BS/BsReissue/index.js +14 -7
  5. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +7 -6
  6. package/dist/esm/components/BS/BsSystemOrder/index.js +22 -19
  7. package/dist/esm/components/BS/DeliveryNo/index.d.ts +6 -5
  8. package/dist/esm/components/BS/DeliveryNo/index.js +15 -12
  9. package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
  10. package/dist/esm/components/BS/common/BsMemo.js +16 -15
  11. package/dist/esm/components/BS/common/BsType.d.ts +4 -4
  12. package/dist/esm/components/BS/common/BsType.js +14 -13
  13. package/dist/esm/components/Common/index.d.ts +2 -1
  14. package/dist/esm/components/Common/index.js +182 -68
  15. package/dist/esm/components/CommonHeaderGood/index.d.ts +27 -0
  16. package/dist/esm/components/CommonHeaderGood/index.js +187 -0
  17. package/dist/esm/components/CommonMultiStatus/index.d.ts +6 -5
  18. package/dist/esm/components/CommonMultiStatus/index.js +58 -51
  19. package/dist/esm/components/CommonSystemOrder/index.d.ts +6 -5
  20. package/dist/esm/components/CommonSystemOrder/index.js +29 -26
  21. package/dist/esm/components/FlowMarkSelect/index.js +3 -2
  22. package/dist/esm/components/FlowStatusSelect/index.js +1 -0
  23. package/dist/esm/components/FlowTag/index.js +1 -1
  24. package/dist/esm/components/FlowWorkOrderStatus/index.d.ts +40 -0
  25. package/dist/esm/components/FlowWorkOrderStatus/index.js +143 -0
  26. package/dist/esm/components/Input/index.d.ts +7 -6
  27. package/dist/esm/components/Input/index.js +37 -26
  28. package/dist/esm/components/JST/JstLogistics/index.d.ts +11 -0
  29. package/dist/esm/components/JST/JstLogistics/index.js +21 -7
  30. package/dist/esm/components/Logistics/index.d.ts +6 -6
  31. package/dist/esm/components/Logistics/index.js +16 -15
  32. package/dist/esm/components/LogisticsMoreTrajectory/index.d.ts +48 -0
  33. package/dist/esm/components/LogisticsMoreTrajectory/index.js +119 -0
  34. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.d.ts +34 -0
  35. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.js +98 -0
  36. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.d.ts +40 -0
  37. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.js +95 -0
  38. package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.d.ts +32 -0
  39. package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.js +74 -0
  40. package/dist/esm/components/NodeInput/index.d.ts +24 -0
  41. package/dist/esm/components/NodeInput/index.js +58 -0
  42. package/dist/esm/components/Payment/index.d.ts +12 -12
  43. package/dist/esm/components/Payment/index.js +11 -12
  44. package/dist/esm/components/TradeId/index.d.ts +1 -1
  45. package/dist/esm/components/TradeId/index.js +2 -2
  46. package/dist/esm/components/WDT/WdtGoods/index.d.ts +33 -0
  47. package/dist/esm/components/WDT/WdtGoods/index.js +121 -0
  48. package/dist/esm/constant.d.ts +1 -0
  49. package/dist/esm/constant.js +8 -0
  50. package/dist/esm/factory.d.ts +2 -2
  51. package/dist/esm/factory.js +30 -3
  52. package/dist/esm/index.d.ts +4 -0
  53. package/dist/esm/index.js +4 -0
  54. package/dist/esm/type.d.ts +13 -13
  55. package/package.json +4 -4
@@ -8,72 +8,72 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  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; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  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); }
11
- import React from "react";
12
- import some from "lodash/some";
11
+ import React from 'react';
12
+ import some from 'lodash/some';
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import { CommonOrderContent } from "../Common";
15
- import { CommonMultiStatus as Status } from "@kmkf-fe-packages/basic-components";
15
+ import { CommonMultiStatus as Status } from '@kmkf-fe-packages/basic-components';
16
16
  import ItemView from "../../commonComponents/ItemView";
17
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
17
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
18
18
  import { SYMBOL } from "../../constant";
19
19
  var typeMap = {
20
20
  RETURN_GOODS_STATUS: {
21
21
  options: [{
22
- value: "成功",
23
- label: "成功",
24
- color: "#52c41a"
22
+ value: '成功',
23
+ label: '成功',
24
+ color: '#52c41a'
25
25
  }, {
26
- value: "失败",
27
- label: "失败",
28
- color: "#ff4d4f"
26
+ value: '失败',
27
+ label: '失败',
28
+ color: '#ff4d4f'
29
29
  }],
30
- key: "returnGoodsStatusList",
31
- code: "returnGoodsStatusValue",
32
- name: "退货状态",
30
+ key: 'returnGoodsStatusList',
31
+ code: 'returnGoodsStatusValue',
32
+ name: '退货状态',
33
33
  type: 1,
34
- valueKey: "status",
35
- idKey: "systemOrderId",
36
- failValue: "失败"
34
+ valueKey: 'status',
35
+ idKey: 'systemOrderId',
36
+ failValue: '失败'
37
37
  },
38
38
  EXCHANGE_STATUS: {
39
39
  options: [{
40
- value: "成功",
41
- label: "成功",
42
- color: "#52c41a"
40
+ value: '成功',
41
+ label: '成功',
42
+ color: '#52c41a'
43
43
  }, {
44
- value: "失败",
45
- label: "失败",
46
- color: "#ff4d4f"
44
+ value: '失败',
45
+ label: '失败',
46
+ color: '#ff4d4f'
47
47
  }],
48
- key: "exchangeReason",
49
- code: "exchangeStatusValue",
50
- name: "退货状态",
48
+ key: 'exchangeReason',
49
+ code: 'exchangeStatusValue',
50
+ name: '换货状态',
51
51
  type: 1,
52
- valueKey: "status",
53
- idKey: "systemOrderId",
54
- failValue: "失败"
52
+ valueKey: 'status',
53
+ idKey: 'systemOrderId',
54
+ failValue: '失败'
55
55
  },
56
56
  WAREHOUSING_STATUS: {
57
57
  options: [{
58
- value: "2",
59
- label: "已入库",
60
- color: "#52c41a"
58
+ value: '2',
59
+ label: '已入库',
60
+ color: '#52c41a'
61
61
  }, {
62
- value: "1",
63
- label: "部分入库",
64
- color: "#e7780f"
62
+ value: '1',
63
+ label: '部分入库',
64
+ color: '#e7780f'
65
65
  }, {
66
- value: "0",
67
- label: "未入库",
68
- color: "#ff4d4f"
66
+ value: '0',
67
+ label: '未入库',
68
+ color: '#ff4d4f'
69
69
  }],
70
- key: "inStockStatusItemList",
71
- code: "inStockStatusList",
72
- name: "退货入库状态",
70
+ key: 'inStockStatusItemList',
71
+ code: 'inStockStatusList',
72
+ name: '商品入库状态(勿填)',
73
73
  type: 2,
74
- valueKey: "status",
75
- idKey: "systemOrderId",
76
- failValue: "失败"
74
+ valueKey: 'status',
75
+ idKey: 'systemOrderId',
76
+ failValue: '失败'
77
77
  }
78
78
  };
79
79
  var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
@@ -144,8 +144,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
144
144
  var _typeMap$_this$type14;
145
145
  return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
146
146
  });
147
- return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey]) || "");
148
- }).join(",");
147
+ return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey]) || '');
148
+ }).join(',');
149
149
  });
150
150
  _defineProperty(this, "editRender", function (p) {
151
151
  var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type17;
@@ -164,16 +164,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
164
164
  _defineProperty(this, "filterConfig", function (item) {
165
165
  var _typeMap$_this$type18, _item$templateConfig;
166
166
  return {
167
- searchDefaultConditions: _this.type === "WAREHOUSING_STATUS" ? SYMBOL.in : SYMBOL.like,
167
+ searchDefaultConditions: _this.type === 'WAREHOUSING_STATUS' ? SYMBOL.in : SYMBOL.like,
168
168
  type: item.type,
169
169
  id: "".concat(item.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.code),
170
170
  name: "".concat(_this.name),
171
- filterComponentType: _this.type === "WAREHOUSING_STATUS" ? "MultipleSelect" : "Input",
171
+ filterComponentType: _this.type === 'WAREHOUSING_STATUS' ? 'MultipleSelect' : 'SelectInput',
172
172
  props: {
173
173
  options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
174
174
  fieldNames: {
175
- label: "label",
176
- value: "value"
175
+ label: 'label',
176
+ value: 'value'
177
177
  }
178
178
  },
179
179
  filterFn: function filterFn(value) {
@@ -181,6 +181,13 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
181
181
  var _typeMap$_this$type19;
182
182
  return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code), value);
183
183
  };
184
+ },
185
+ formatFilterValue: _this.type === 'WAREHOUSING_STATUS' ? null : function (value) {
186
+ if (value.type === 'keywords') {
187
+ return value.keywords;
188
+ } else {
189
+ return value;
190
+ }
184
191
  }
185
192
  };
186
193
  });
@@ -195,7 +202,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
195
202
  this.isCombinationComponent = false;
196
203
  this.canSort = false;
197
204
  this.children = [];
198
- this.dataType = "object";
205
+ this.dataType = 'object';
199
206
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
200
207
  required: true,
201
208
  validator: function validator(_, value) {
@@ -210,6 +217,6 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
210
217
  return Promise.resolve();
211
218
  }
212
219
  }] : [];
213
- this.align = "left";
220
+ this.align = 'left';
214
221
  });
215
222
  export default CommonMultiStatus;
@@ -1,18 +1,18 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
2
+ import React from 'react';
3
3
  declare class CommonSystemOrder 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
  align: ALignType;
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface["dataType"];
15
+ dataType: ComponentInterface['dataType'];
16
16
  constructor(options: PickOption);
17
17
  renderClient: (record: any) => React.JSX.Element | null;
18
18
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -21,12 +21,13 @@ declare class CommonSystemOrder implements ComponentInterface {
21
21
  renderExport: (value: any, record: any) => any;
22
22
  editRender: (p: any) => React.JSX.Element;
23
23
  filterConfig: (item: ColumnConfig) => {
24
- searchDefaultConditions: "like";
24
+ searchDefaultConditions: "in";
25
25
  type: string;
26
26
  id: string;
27
27
  name: string;
28
28
  filterComponentType: "Input";
29
29
  filterFn: (value: string) => (i: Record) => boolean;
30
+ formatFilterValue: (input: string) => string | string[];
30
31
  };
31
32
  }
32
33
  export default CommonSystemOrder;
@@ -6,42 +6,42 @@ 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 some from "lodash/some";
9
+ import React from 'react';
10
+ import some from 'lodash/some';
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import { CommonOrderContent } from "../Common";
13
- import { CommonSystemOrder as SystemOrder } from "@kmkf-fe-packages/basic-components";
13
+ import { CommonSystemOrder as SystemOrder } from '@kmkf-fe-packages/basic-components';
14
14
  import ItemView from "../../commonComponents/ItemView";
15
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
- import { SYMBOL } from "../../constant";
15
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
16
+ import { SYMBOL, batchInput } from "../../constant";
17
17
  var typeMap = {
18
18
  BS_DELIVERY_NO: {
19
- key: "deliveryNoList",
20
- code: "deliveryNoIds",
21
- name: "出库单",
19
+ key: 'deliveryNoList',
20
+ code: 'deliveryNoIds',
21
+ name: '出库单',
22
22
  type: 1,
23
- valueKey: "deliveryNo"
23
+ valueKey: 'deliveryNo'
24
24
  },
25
25
  RETURN_GOODS_TRADE_ID: {
26
- key: "returnGoodsTradeItemList",
27
- code: "returnGoodsTradeIdList",
28
- name: "退货单id",
26
+ key: 'returnGoodsTradeItemList',
27
+ code: 'returnGoodsTradeIdList',
28
+ name: '退货单id',
29
29
  type: 2,
30
- valueKey: "returnGoodsTradeId"
30
+ valueKey: 'returnGoodsTradeId'
31
31
  },
32
32
  REISSUE_TRADE_ID: {
33
- key: "tradeItemList",
34
- code: "tradeIdList",
35
- name: "补发单id",
33
+ key: 'tradeItemList',
34
+ code: 'tradeIdList',
35
+ name: '补发单id',
36
36
  type: 3,
37
- valueKey: "billNo"
37
+ valueKey: 'billNo'
38
38
  },
39
39
  EXCHANGE_TRADE_ID: {
40
- key: "tradeItemList",
41
- code: "tradeIdList",
42
- name: "换货单id",
40
+ key: 'tradeItemList',
41
+ code: 'tradeIdList',
42
+ name: '换货单id',
43
43
  type: 4,
44
- valueKey: "billNo"
44
+ valueKey: 'billNo'
45
45
  }
46
46
  };
47
47
  var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(options) {
@@ -106,7 +106,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
106
106
  return (list || []).map(function (item) {
107
107
  var _typeMap$_this$type8;
108
108
  return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.valueKey];
109
- }).join(",");
109
+ }).join(',');
110
110
  });
111
111
  _defineProperty(this, "editRender", function (p) {
112
112
  var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type9;
@@ -124,16 +124,19 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
124
124
  _defineProperty(this, "filterConfig", function (item) {
125
125
  var _typeMap$_this$type10;
126
126
  return {
127
- searchDefaultConditions: SYMBOL.like,
127
+ searchDefaultConditions: SYMBOL.in,
128
128
  type: item.type,
129
129
  id: "".concat(item.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.code),
130
130
  name: "".concat(_this.name),
131
- filterComponentType: "Input",
131
+ filterComponentType: 'Input',
132
132
  filterFn: function filterFn(value) {
133
133
  return function (i) {
134
134
  var _typeMap$_this$type11;
135
135
  return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.code), value);
136
136
  };
137
+ },
138
+ formatFilterValue: function formatFilterValue(input) {
139
+ return batchInput(input);
137
140
  }
138
141
  };
139
142
  });
@@ -146,7 +149,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
146
149
  this.isCombinationComponent = false;
147
150
  this.canSort = false;
148
151
  this.children = [];
149
- this.dataType = "object";
152
+ this.dataType = 'object';
150
153
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
151
154
  required: true,
152
155
  validator: function validator(_, value) {
@@ -161,6 +164,6 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
161
164
  return Promise.resolve();
162
165
  }
163
166
  }] : [];
164
- this.align = "left";
167
+ this.align = 'left';
165
168
  });
166
169
  export default CommonSystemOrder;
@@ -40,8 +40,9 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
40
40
  _defineProperty(this, "renderPc", function (value, record) {
41
41
  var changeMarkHandle = function changeMarkHandle(key) {
42
42
  var _this$effects, _this$effects2;
43
- typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.handleChangeSingleWorkOrderMark) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.handleChangeSingleWorkOrderMark(key, record));
43
+ typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.handleChangeSingleWorkOrderMark) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.handleChangeSingleWorkOrderMark(key, record, _this.id)); // TODO: 针对流程模板中有多个组件同时出现的时候,需要通过组件id找到对应的节点信息
44
44
  };
45
+
45
46
  return /*#__PURE__*/React.createElement(SelectMark, {
46
47
  value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)],
47
48
  onChange: changeMarkHandle
@@ -133,7 +134,7 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
133
134
  }
134
135
  };
135
136
  });
136
- this.name = "标记";
137
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "标记";
137
138
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "markFlag";
138
139
  this.sortField = "markFlag";
139
140
  this.formField = "markFlag";
@@ -12,6 +12,7 @@ import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
12
12
  import GetFormItem from "../GetFormItem";
13
13
  import get from 'lodash/get';
14
14
  import { SYMBOL } from "../../constant";
15
+ // 节点状态
15
16
  var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
16
17
  var _this = this,
17
18
  _Object$keys2;
@@ -122,7 +122,7 @@ var FlowTag = /*#__PURE__*/_createClass(function FlowTag(options) {
122
122
  }
123
123
  };
124
124
  });
125
- this.name = "标签";
125
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "标签";
126
126
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "flowTags";
127
127
  this.sortField = "flowTags";
128
128
  this.formField = "flowTags";
@@ -0,0 +1,40 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
+ declare class FlowWorkOrderStatus implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ rules: any[];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ effects: ComponentInterface["effects"];
11
+ workOrderStatus: any;
12
+ isCombinationComponent: boolean;
13
+ formField: string;
14
+ canSort: boolean;
15
+ children: ComponentInterface[];
16
+ dataType: ComponentInterface['dataType'];
17
+ options: ComponentInterface['options'];
18
+ constructor(options: PickOption);
19
+ renderPc: (value: any, record: Record) => React.JSX.Element;
20
+ renderLog: (r: Record) => React.JSX.Element | null;
21
+ getComponentValue: (r: Record) => any;
22
+ renderExport: (value: any, record: Record) => any;
23
+ renderClient: () => null;
24
+ editRender: (p: any) => React.JSX.Element;
25
+ filterConfig: (item: ColumnConfig) => {
26
+ searchDefaultConditions: "in";
27
+ type: string;
28
+ id: string;
29
+ name: string;
30
+ filterComponentType: "MultipleSelect";
31
+ props: {
32
+ options: {
33
+ label: any;
34
+ value: string;
35
+ }[];
36
+ };
37
+ filterFn: (value: string[]) => (i: Record) => boolean;
38
+ };
39
+ }
40
+ export default FlowWorkOrderStatus;
@@ -0,0 +1,143 @@
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 _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
+ 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
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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 { ApaasSelect } from '@kmkf-fe-packages/basic-components';
11
+ import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
12
+ import GetFormItem from "../GetFormItem";
13
+ import get from 'lodash/get';
14
+ import { SYMBOL } from "../../constant";
15
+ // 节点状态
16
+ var FlowWorkOrderStatus = /*#__PURE__*/_createClass(function FlowWorkOrderStatus(options) {
17
+ var _this = this,
18
+ _Object$keys2;
19
+ _classCallCheck(this, FlowWorkOrderStatus);
20
+ _defineProperty(this, "name", void 0);
21
+ _defineProperty(this, "id", void 0);
22
+ _defineProperty(this, "sortField", void 0);
23
+ _defineProperty(this, "type", void 0);
24
+ _defineProperty(this, "rules", void 0);
25
+ _defineProperty(this, "componentConfig", void 0);
26
+ _defineProperty(this, "effects", void 0);
27
+ _defineProperty(this, "workOrderStatus", void 0);
28
+ _defineProperty(this, "isCombinationComponent", void 0);
29
+ _defineProperty(this, "formField", void 0);
30
+ _defineProperty(this, "canSort", void 0);
31
+ _defineProperty(this, "children", void 0);
32
+ _defineProperty(this, "dataType", void 0);
33
+ _defineProperty(this, "options", void 0);
34
+ _defineProperty(this, "renderPc", function (value, record) {
35
+ var status = get(_this.workOrderStatus, record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
36
+ return status ? /*#__PURE__*/React.createElement("span", {
37
+ style: {
38
+ color: status.color
39
+ }
40
+ }, status === null || status === void 0 ? void 0 : status.label) : /*#__PURE__*/React.createElement("span", null, "--");
41
+ });
42
+ _defineProperty(this, "renderLog", function (r) {
43
+ var status = get(_this.workOrderStatus, r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
44
+ if (!status) return null;
45
+ return _this.renderPc(undefined, r);
46
+ });
47
+ _defineProperty(this, "getComponentValue", function (r) {
48
+ var status = get(_this.workOrderStatus, r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
49
+ return status;
50
+ });
51
+ _defineProperty(this, "renderExport", function (value, record) {
52
+ var status = get(_this.workOrderStatus, record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
53
+ return status ? status === null || status === void 0 ? void 0 : status.label : '--';
54
+ });
55
+ _defineProperty(this, "renderClient", function () {
56
+ return null;
57
+ });
58
+ _defineProperty(this, "editRender", function (p) {
59
+ var _this$componentConfig, _this$componentConfig2;
60
+ return /*#__PURE__*/React.createElement(GetFormItem, {
61
+ title: _this.name,
62
+ name: _this.id,
63
+ rules: _this.rules,
64
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
65
+ 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,
66
+ component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
67
+ placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
68
+ showSearch: true
69
+ }))
70
+ });
71
+ });
72
+ _defineProperty(this, "filterConfig", function (item) {
73
+ var _Object$keys;
74
+ return {
75
+ searchDefaultConditions: SYMBOL.in,
76
+ type: item.type,
77
+ id: item.id,
78
+ // 过滤组件id
79
+ name: item.name,
80
+ // 过滤组件名称
81
+ filterComponentType: 'MultipleSelect',
82
+ props: {
83
+ options: (_Object$keys = Object.keys(_this.workOrderStatus)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (item) {
84
+ return {
85
+ label: _this.workOrderStatus[item].label,
86
+ value: item
87
+ };
88
+ })
89
+ },
90
+ filterFn: function filterFn(value) {
91
+ return function (i) {
92
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
93
+ };
94
+ }
95
+ };
96
+ });
97
+ this.name = options.name;
98
+ this.id = options.id;
99
+ this.sortField = options.id;
100
+ this.formField = options.id;
101
+ this.type = options.type;
102
+ this.componentConfig = options.componentConfig;
103
+ this.effects = options.effects;
104
+ this.rules = [];
105
+ this.isCombinationComponent = false;
106
+ this.canSort = true;
107
+ this.children = [];
108
+ this.workOrderStatus = {
109
+ "WAITING": {
110
+ label: '待处理',
111
+ color: '#faad14',
112
+ bgColor: '#faad14'
113
+ },
114
+ "PROCESSING": {
115
+ label: '处理中',
116
+ color: '#1890ff',
117
+ bgColor: '#1890ff'
118
+ },
119
+ "STOPPING": {
120
+ label: '暂停中',
121
+ color: '#ff4d4f',
122
+ bgColor: '#ff4d4f'
123
+ },
124
+ "COMPLETED": {
125
+ label: '已完成',
126
+ color: '#73d13d',
127
+ bgColor: '#73d13d'
128
+ },
129
+ "CLOSED": {
130
+ label: '已关闭',
131
+ color: 'rgba(0, 0, 0, 0.65)',
132
+ bgColor: 'rgba(0, 0, 0, 0.04);'
133
+ }
134
+ };
135
+ this.dataType = 'string';
136
+ this.options = (_Object$keys2 = Object.keys(this.workOrderStatus)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.map(function (item) {
137
+ return {
138
+ label: _this.workOrderStatus[item].label,
139
+ value: item
140
+ };
141
+ });
142
+ });
143
+ export default FlowWorkOrderStatus;
@@ -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
  templateId?: string;
16
16
  workOrderUniqueKey?: string;
17
17
  constructor(options: PickOption);
@@ -22,12 +22,13 @@ declare class BasicInput implements ComponentInterface {
22
22
  renderClient: (record: Record) => React.JSX.Element | null;
23
23
  editRender: (p: any) => React.JSX.Element;
24
24
  filterConfig: (item: ColumnConfig) => {
25
- searchDefaultConditions: "like";
25
+ searchDefaultConditions: "in";
26
26
  type: string;
27
27
  id: string;
28
28
  name: string;
29
- filterComponentType: "Input";
29
+ filterComponentType: "SelectInput";
30
30
  filterFn: (value: string) => (i: Record) => boolean;
31
+ formatFilterValue: (value: any) => any;
31
32
  };
32
33
  }
33
34
  export default BasicInput;