@kmkf-fe-packages/services-components 0.24.1 → 0.24.2-beta.1

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 (38) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/components/BS/BsLogistics/index.d.ts +3 -2
  3. package/dist/esm/components/BS/BsLogistics/index.js +6 -0
  4. package/dist/esm/components/BS/BsReissue/index.d.ts +9 -9
  5. package/dist/esm/components/BS/BsReissue/index.js +64 -34
  6. package/dist/esm/components/BS/BsSystemOrder/index.js +7 -0
  7. package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
  8. package/dist/esm/components/BS/common/BsMemo.js +16 -15
  9. package/dist/esm/components/BS/common/BsType.d.ts +4 -4
  10. package/dist/esm/components/BS/common/BsType.js +14 -13
  11. package/dist/esm/components/BS/common/expressCode.js +3 -0
  12. package/dist/esm/components/BS/common/expressCompany.js +3 -0
  13. package/dist/esm/components/Common/index.d.ts +5 -12
  14. package/dist/esm/components/Common/index.js +413 -332
  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/CompletedUser/index.js +1 -1
  18. package/dist/esm/components/EItemEnCode/index.js +3 -2
  19. package/dist/esm/components/FlowMarkSelect/index.js +3 -2
  20. package/dist/esm/components/FlowStatusSelect/index.js +1 -0
  21. package/dist/esm/components/FlowTag/index.js +1 -1
  22. package/dist/esm/components/FlowWorkOrderStatus/index.d.ts +40 -0
  23. package/dist/esm/components/FlowWorkOrderStatus/index.js +143 -0
  24. package/dist/esm/components/Handler/index.js +1 -1
  25. package/dist/esm/components/JST/JstSendGood/index.js +6 -0
  26. package/dist/esm/components/NodeInput/index.d.ts +24 -0
  27. package/dist/esm/components/NodeInput/index.js +58 -0
  28. package/dist/esm/components/PlatForm/index.js +1 -1
  29. package/dist/esm/components/PostIng/index.js +7 -2
  30. package/dist/esm/components/ShopInput/index.js +1 -1
  31. package/dist/esm/components/WDT/WdtGoods/index.d.ts +33 -0
  32. package/dist/esm/components/WDT/WdtGoods/index.js +121 -0
  33. package/dist/esm/factory.d.ts +2 -2
  34. package/dist/esm/factory.js +30 -1
  35. package/dist/esm/index.d.ts +4 -1
  36. package/dist/esm/index.js +3 -0
  37. package/dist/esm/type.d.ts +1 -1
  38. package/package.json +4 -4
@@ -0,0 +1,27 @@
1
+ import { ComponentInterface, PickOption, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ declare class CommonHeaderGoods implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ align: ALignType;
10
+ width: number;
11
+ isCombinationComponent: boolean;
12
+ formField: string;
13
+ canSort: boolean;
14
+ children: ComponentInterface[];
15
+ dataType: ComponentInterface["dataType"];
16
+ itemKey: any;
17
+ constructor(options: PickOption);
18
+ getParentId: () => string;
19
+ renderClient: (record: any) => React.JSX.Element | null;
20
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
21
+ renderLog: (r: Record) => React.JSX.Element | null;
22
+ getComponentValue: (r: Record) => any;
23
+ renderExport: (value: string, record: Record) => any;
24
+ editRender: () => null;
25
+ filterConfig: () => never[];
26
+ }
27
+ export default CommonHeaderGoods;
@@ -0,0 +1,187 @@
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; }
4
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ 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); } }
15
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
+ 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; }
18
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
+ 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); }
20
+ import React from "react";
21
+ import ItemView from "../../commonComponents/ItemView";
22
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
23
+ import { BsHeaderPic, BsHeaderChild } from "../BS/common";
24
+ var GoodHeaderMap = {
25
+ "WDT_GOODS": {
26
+ headerMap: {
27
+ goodId: {
28
+ component: BsHeaderChild,
29
+ name: "SPUID",
30
+ key: "goodId",
31
+ width: 140
32
+ },
33
+ goodNo: {
34
+ component: BsHeaderChild,
35
+ name: "SPU商品编码",
36
+ key: "goodNo",
37
+ width: 200
38
+ },
39
+ imgUrl: {
40
+ component: BsHeaderPic,
41
+ name: "图片",
42
+ key: "imgUrl",
43
+ width: 70
44
+ },
45
+ goodName: {
46
+ component: BsHeaderChild,
47
+ name: "商品名称",
48
+ key: "goodName",
49
+ width: 100
50
+ },
51
+ specId: {
52
+ component: BsHeaderChild,
53
+ name: "SKUID",
54
+ key: "specId",
55
+ width: 200
56
+ },
57
+ specNo: {
58
+ component: BsHeaderChild,
59
+ name: "sku编码",
60
+ key: "specNo",
61
+ width: 140
62
+ },
63
+ specName: {
64
+ component: BsHeaderChild,
65
+ name: "sku名称",
66
+ key: "specName",
67
+ width: 140
68
+ },
69
+ orderPrice: {
70
+ component: BsHeaderChild,
71
+ name: "实付总金额",
72
+ key: "orderPrice",
73
+ width: 100
74
+ },
75
+ sharePrice: {
76
+ component: BsHeaderChild,
77
+ name: "分摊价",
78
+ key: "sharePrice",
79
+ width: 120
80
+ },
81
+ giftType: {
82
+ component: BsHeaderChild,
83
+ name: "赠品方式",
84
+ key: "giftType",
85
+ width: 150
86
+ }
87
+ },
88
+ itemKey: {
89
+ goodId: "SPUID",
90
+ goodNo: "SPU商品编码",
91
+ goodName: "商品名称",
92
+ specId: "SKUID",
93
+ specNo: "sku编码",
94
+ specName: "sku名称",
95
+ orderPrice: "实付总金额",
96
+ num: "数量",
97
+ sharePrice: "分摊价",
98
+ giftType: "赠品方式"
99
+ },
100
+ moneyKey: "orderPrice"
101
+ }
102
+ };
103
+ GoodHeaderMap['WDT_REISSUE_GOODS'] = GoodHeaderMap['WDT_GOODS'];
104
+ var CommonHeaderGoods = /*#__PURE__*/_createClass(function CommonHeaderGoods(options) {
105
+ var _this = this,
106
+ _GoodHeaderMap$this$t;
107
+ _classCallCheck(this, CommonHeaderGoods);
108
+ _defineProperty(this, "name", void 0);
109
+ _defineProperty(this, "id", void 0);
110
+ _defineProperty(this, "sortField", void 0);
111
+ _defineProperty(this, "type", void 0);
112
+ _defineProperty(this, "componentConfig", void 0);
113
+ _defineProperty(this, "align", void 0);
114
+ _defineProperty(this, "width", void 0);
115
+ _defineProperty(this, "isCombinationComponent", void 0);
116
+ _defineProperty(this, "formField", void 0);
117
+ _defineProperty(this, "canSort", void 0);
118
+ _defineProperty(this, "children", void 0);
119
+ _defineProperty(this, "dataType", void 0);
120
+ _defineProperty(this, "itemKey", void 0);
121
+ _defineProperty(this, "getParentId", function () {
122
+ var _this$id$split = _this.id.split("_"),
123
+ _this$id$split2 = _slicedToArray(_this$id$split, 3),
124
+ key = _this$id$split2[0],
125
+ name = _this$id$split2[1],
126
+ code = _this$id$split2[2];
127
+ return "".concat(key, "_").concat(name);
128
+ });
129
+ _defineProperty(this, "renderClient", function (record) {
130
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
131
+ id: _this.id,
132
+ label: _this.name,
133
+ value: _this.getComponentValue(record)
134
+ }) : null;
135
+ });
136
+ _defineProperty(this, "renderPc", function (value, record) {
137
+ var _this$getComponentVal;
138
+ return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
139
+ });
140
+ _defineProperty(this, "renderLog", function (r) {
141
+ var id = _this.getParentId();
142
+ if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
143
+ return _this.renderPc(undefined, r);
144
+ });
145
+ _defineProperty(this, "getComponentValue", function (r) {
146
+ var id = _this.getParentId();
147
+ var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
148
+ next[GoodHeaderMap[_this.type].moneyKey] && prv.push(next[GoodHeaderMap[_this.type].moneyKey]);
149
+ return prv;
150
+ }, []);
151
+ return list.join(",");
152
+ });
153
+ _defineProperty(this, "renderExport", function (value, record) {
154
+ var _this$getComponentVal2;
155
+ return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
156
+ });
157
+ _defineProperty(this, "editRender", function () {
158
+ return null;
159
+ });
160
+ _defineProperty(this, "filterConfig", function () {
161
+ return [];
162
+ });
163
+ this.name = options.name;
164
+ this.id = options.id;
165
+ this.sortField = options.id;
166
+ this.formField = options.id;
167
+ this.type = options.type;
168
+ this.componentConfig = options.componentConfig;
169
+ this.align = "left";
170
+ this.width = 200;
171
+ this.isCombinationComponent = true;
172
+ this.canSort = false;
173
+ this.dataType = "string";
174
+ this.itemKey = (_GoodHeaderMap$this$t = GoodHeaderMap[this.type]) === null || _GoodHeaderMap$this$t === void 0 ? void 0 : _GoodHeaderMap$this$t.itemKey;
175
+ this.children = _toConsumableArray(Object.keys(GoodHeaderMap[this.type].headerMap).reduce(function (prv, key) {
176
+ var _options$componentCon, _options$componentCon2;
177
+ if (options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && (_options$componentCon2 = _options$componentCon.showHeader) !== null && _options$componentCon2 !== void 0 && _options$componentCon2.includes(key)) {
178
+ prv.push(new GoodHeaderMap[_this.type].headerMap[key].component(_objectSpread(_objectSpread({}, options), {}, {
179
+ name: _this.itemKey[key],
180
+ id: "".concat(options.id, "_").concat(GoodHeaderMap[_this.type].headerMap[key].key),
181
+ width: GoodHeaderMap[_this.type].headerMap[key].width
182
+ })));
183
+ }
184
+ return prv;
185
+ }, []));
186
+ });
187
+ export default CommonHeaderGoods;
@@ -64,7 +64,7 @@ var CompletedUser = /*#__PURE__*/_createClass(function CompletedUser(options) {
64
64
  }
65
65
  };
66
66
  });
67
- this.name = "完成人";
67
+ this.name = this.name = (options === null || options === void 0 ? void 0 : options.name) || "完成人";
68
68
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "completedUserName";
69
69
  this.sortField = "completedUserName";
70
70
  this.formField = "completedUserName";
@@ -11,7 +11,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
11
11
  import React from "react";
12
12
  import GetFormItem from "../GetFormItem";
13
13
  import ItemEncode from "./ItemEncode";
14
- import { GoodImage, TBGoodTable } from "../Common";
14
+ import { GoodImage, BsGoodsTable } from "../Common";
15
15
  import { BsHeaderGood } from "../BS/common/index";
16
16
  import ItemView from "../../commonComponents/ItemView";
17
17
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
@@ -52,7 +52,8 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
52
52
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
53
53
  id: _this.id,
54
54
  label: _this.name,
55
- value: /*#__PURE__*/React.createElement(TBGoodTable, {
55
+ value: /*#__PURE__*/React.createElement(BsGoodsTable, {
56
+ type: _this.type,
56
57
  list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [],
57
58
  showHeader: _this.showHeader
58
59
  })
@@ -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;
@@ -74,7 +74,7 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
74
74
  }
75
75
  };
76
76
  });
77
- this.name = "处理人";
77
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "处理人";
78
78
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "handlerList";
79
79
  this.sortField = "handlerList";
80
80
  this.formField = "handlerList";
@@ -32,6 +32,12 @@ var typeMap = {
32
32
  name: "wln",
33
33
  sendId: "wlnSendId",
34
34
  sendName: "wlnSendName"
35
+ },
36
+ WDT_SEND_GOOD: {
37
+ key: "wdtSendGood",
38
+ name: "wdt",
39
+ sendId: "wdtSendId",
40
+ sendName: "wdtSendName"
35
41
  }
36
42
  };
37
43
  var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { ComponentInterface, Record, PickOption } from '../../type';
3
+ declare class NodeInput implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ isCombinationComponent: boolean;
10
+ formField: string;
11
+ canSort: boolean;
12
+ children: ComponentInterface[];
13
+ dataType: ComponentInterface['dataType'];
14
+ options: ComponentInterface['options'];
15
+ constructor(options: PickOption);
16
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
17
+ renderExport: (value: any, record: Record) => any;
18
+ renderLog: (r: Record) => React.JSX.Element | null;
19
+ getComponentValue: (r: Record) => any;
20
+ renderClient: () => null;
21
+ editRender: () => null;
22
+ filterConfig: () => never[];
23
+ }
24
+ export default NodeInput;
@@ -0,0 +1,58 @@
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 { isNull } from '@kmkf-fe-packages/kmkf-utils';
10
+ var NodeInput = /*#__PURE__*/_createClass(function NodeInput(options) {
11
+ var _this = this;
12
+ _classCallCheck(this, NodeInput);
13
+ _defineProperty(this, "name", void 0);
14
+ _defineProperty(this, "id", void 0);
15
+ _defineProperty(this, "sortField", void 0);
16
+ _defineProperty(this, "type", void 0);
17
+ _defineProperty(this, "componentConfig", void 0);
18
+ _defineProperty(this, "isCombinationComponent", void 0);
19
+ _defineProperty(this, "formField", void 0);
20
+ _defineProperty(this, "canSort", void 0);
21
+ _defineProperty(this, "children", void 0);
22
+ _defineProperty(this, "dataType", void 0);
23
+ _defineProperty(this, "options", void 0);
24
+ _defineProperty(this, "renderPc", function (value, record) {
25
+ var _record;
26
+ return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--');
27
+ });
28
+ _defineProperty(this, "renderExport", function (value, record) {
29
+ var _record2;
30
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record2 !== void 0 ? _record2 : '--';
31
+ });
32
+ _defineProperty(this, "renderLog", function (r) {
33
+ if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
34
+ return _this.renderPc(undefined, r);
35
+ });
36
+ _defineProperty(this, "getComponentValue", function (r) {
37
+ return r === null || r === void 0 ? void 0 : r[_this.id];
38
+ });
39
+ _defineProperty(this, "renderClient", function () {
40
+ return null;
41
+ });
42
+ _defineProperty(this, "editRender", function () {
43
+ return null;
44
+ });
45
+ _defineProperty(this, "filterConfig", function () {
46
+ return [];
47
+ });
48
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "当前步骤";
49
+ this.id = (options === null || options === void 0 ? void 0 : options.id) || "nodeId";
50
+ this.type = "NODE_INPUT";
51
+ this.sortField = 'nodeId';
52
+ this.formField = 'nodeId';
53
+ this.isCombinationComponent = false;
54
+ this.canSort = false;
55
+ this.children = [];
56
+ this.dataType = 'string';
57
+ });
58
+ export default NodeInput;
@@ -64,7 +64,7 @@ var PlatForm = /*#__PURE__*/_createClass(function PlatForm(options) {
64
64
  options: platData
65
65
  };
66
66
  });
67
- this.name = "平台";
67
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "平台";
68
68
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "platform";
69
69
  this.type = "PLATFORM_INPUT";
70
70
  this.sortField = 'platform';
@@ -13,7 +13,7 @@ import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
15
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
- import { AddressData, BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { AddressData, BsAddressData, WdtAddressData } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import Province from "../BS/BsPosting/components/Province";
18
18
  import City from "../BS/BsPosting/components//City";
19
19
  import District from "../BS/BsPosting/components//District";
@@ -186,7 +186,12 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
186
186
  this.isCombinationComponent = this.isSplitColumns;
187
187
  this.canSort = false;
188
188
  this.dataType = "string";
189
- this.addressDateInstance = ((_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField) === "bs" ? BsAddressData.getInstance() : AddressData.getInstance();
189
+ var showField = (_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField;
190
+ this.addressDateInstance = (showField && {
191
+ bs: BsAddressData,
192
+ wdt: WdtAddressData,
193
+ workOrder: AddressData
194
+ }[showField] || AddressData).getInstance();
190
195
  this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
191
196
  id: "".concat(options.id, "_postingProvince"),
192
197
  name: "省",
@@ -86,7 +86,7 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
86
86
  }
87
87
  };
88
88
  });
89
- this.name = "店铺名称";
89
+ this.name = (options === null || options === void 0 ? void 0 : options.name) || "店铺名称";
90
90
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "shopName";
91
91
  this.type = "SHOP_INPUT";
92
92
  this.sortField = "shopName";