@kmkf-fe-packages/services-components 1.0.10-beta.2 → 1.0.10-beta.20
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.
- package/dist/esm/components/Input/index.js +10 -5
- package/dist/esm/components/Label/index.d.ts +12 -2
- package/dist/esm/components/Label/index.js +29 -7
- package/dist/esm/components/SubForm/index.d.ts +33 -0
- package/dist/esm/components/SubForm/index.js +173 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +3 -1
- package/dist/esm/index.d.ts +4 -3
- package/dist/esm/index.js +1 -0
- package/dist/esm/type.d.ts +7 -0
- package/package.json +6 -6
|
@@ -154,7 +154,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
154
154
|
validator: function () {
|
|
155
155
|
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
|
|
156
156
|
var _this$componentConfig11;
|
|
157
|
-
var _resultList$, params, _yield$replaceCheck, resultList;
|
|
157
|
+
var _resultList$, params, _yield$replaceCheck, resultList, _this$componentConfig12, _this$componentConfig13, _this$componentConfig14, messageMap;
|
|
158
158
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
159
159
|
while (1) switch (_context.prev = _context.next) {
|
|
160
160
|
case 0:
|
|
@@ -165,7 +165,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
165
165
|
return _context.abrupt("return", Promise.resolve());
|
|
166
166
|
case 2:
|
|
167
167
|
if (!((_this$componentConfig11 = _this.componentConfig) !== null && _this$componentConfig11 !== void 0 && _this$componentConfig11.replaceWarn)) {
|
|
168
|
-
_context.next =
|
|
168
|
+
_context.next = 11;
|
|
169
169
|
break;
|
|
170
170
|
}
|
|
171
171
|
params = {
|
|
@@ -183,11 +183,16 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
183
183
|
_yield$replaceCheck = _context.sent;
|
|
184
184
|
resultList = _yield$replaceCheck.data.resultList;
|
|
185
185
|
if (!((resultList === null || resultList === void 0 ? void 0 : (_resultList$ = resultList[0]) === null || _resultList$ === void 0 ? void 0 : _resultList$.repeatCount) > 0)) {
|
|
186
|
-
_context.next =
|
|
186
|
+
_context.next = 11;
|
|
187
187
|
break;
|
|
188
188
|
}
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
messageMap = {
|
|
190
|
+
currWorkOrder: "数据已存在本模版同节点中,不能重复提交",
|
|
191
|
+
currFlow: "数据已存在本模版中,不能重复提交",
|
|
192
|
+
allWorkOrder: "数据已存在其他模版中,不能重复提交"
|
|
193
|
+
};
|
|
194
|
+
return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$componentConfig12 = (_this$componentConfig13 = _this.componentConfig) === null || _this$componentConfig13 === void 0 ? void 0 : (_this$componentConfig14 = _this$componentConfig13.repeatConfig) === null || _this$componentConfig14 === void 0 ? void 0 : _this$componentConfig14.repeatRange) !== null && _this$componentConfig12 !== void 0 ? _this$componentConfig12 : ""] || "内容已存在,不能重复提交")));
|
|
195
|
+
case 11:
|
|
191
196
|
case "end":
|
|
192
197
|
return _context.stop();
|
|
193
198
|
}
|
|
@@ -27,8 +27,18 @@ declare class Label implements ComponentInterface {
|
|
|
27
27
|
}>) => React.JSX.Element;
|
|
28
28
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
29
29
|
renderLog: (r: Record) => React.JSX.Element;
|
|
30
|
-
renderExport: (value: any, record: Record) =>
|
|
31
|
-
filterConfig: (item: ColumnConfig) =>
|
|
30
|
+
renderExport: (value: any, record: Record) => string;
|
|
31
|
+
filterConfig: (item: ColumnConfig) => {
|
|
32
|
+
searchDefaultConditions: "in";
|
|
33
|
+
type: string;
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
filterComponentType: "MultipleSelect";
|
|
37
|
+
props: {
|
|
38
|
+
options: any;
|
|
39
|
+
};
|
|
40
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
41
|
+
};
|
|
32
42
|
formDataTransform: (v: Array<{
|
|
33
43
|
labelShowName: string;
|
|
34
44
|
}>) => string[];
|
|
@@ -8,9 +8,12 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
8
8
|
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); }
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { Tag, Select, Space } from 'antd';
|
|
11
|
-
import {
|
|
11
|
+
import { groupBy } from 'lodash';
|
|
12
|
+
import { LabelData, isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import intersection from "lodash/intersection";
|
|
12
14
|
import GetFormItem from "../GetFormItem";
|
|
13
15
|
import ItemView from "../../commonComponents/ItemView";
|
|
16
|
+
import { SYMBOL } from "../../constant";
|
|
14
17
|
var EditRenderItem = function EditRenderItem(props) {
|
|
15
18
|
var value = props.value;
|
|
16
19
|
var tagRender = function tagRender(prop) {
|
|
@@ -90,14 +93,17 @@ var Label = /*#__PURE__*/_createClass(function Label(options) {
|
|
|
90
93
|
}) : null;
|
|
91
94
|
});
|
|
92
95
|
_defineProperty(this, "showDetail", function (value) {
|
|
96
|
+
var _Object$keys;
|
|
93
97
|
return /*#__PURE__*/React.createElement(Space, {
|
|
94
98
|
style: {
|
|
95
99
|
flexWrap: 'wrap'
|
|
96
100
|
}
|
|
97
|
-
}, Array.isArray(value) ?
|
|
101
|
+
}, Array.isArray(value) ? (_Object$keys = Object.keys(groupBy(value, function (item) {
|
|
102
|
+
return item.labelShowName;
|
|
103
|
+
}))) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (labelShowName) {
|
|
98
104
|
var _this$labelDateInstan;
|
|
99
105
|
var label = ((_this$labelDateInstan = _this.labelDateInstance.labelData) === null || _this$labelDateInstan === void 0 ? void 0 : _this$labelDateInstan.find(function (item) {
|
|
100
|
-
return item.value ===
|
|
106
|
+
return item.value === labelShowName;
|
|
101
107
|
})) || {};
|
|
102
108
|
if (!isNull(label)) return /*#__PURE__*/React.createElement(Tag, {
|
|
103
109
|
color: label === null || label === void 0 ? void 0 : label.color
|
|
@@ -112,13 +118,29 @@ var Label = /*#__PURE__*/_createClass(function Label(options) {
|
|
|
112
118
|
return _this.renderPc(undefined, r);
|
|
113
119
|
});
|
|
114
120
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
115
|
-
var
|
|
116
|
-
return record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_label")]) === null || _record === void 0 ? void 0 :
|
|
121
|
+
var _Array$from, _record;
|
|
122
|
+
return (_Array$from = Array.from(new Set(record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_label")]) === null || _record === void 0 ? void 0 : _record.map(function (item) {
|
|
117
123
|
return item === null || item === void 0 ? void 0 : item.labelShowName;
|
|
118
|
-
})) === null ||
|
|
124
|
+
})))) === null || _Array$from === void 0 ? void 0 : _Array$from.join('、');
|
|
119
125
|
});
|
|
120
126
|
_defineProperty(this, "filterConfig", function (item) {
|
|
121
|
-
return
|
|
127
|
+
return {
|
|
128
|
+
searchDefaultConditions: SYMBOL.in,
|
|
129
|
+
type: item.type,
|
|
130
|
+
id: "".concat(item.id, "_label"),
|
|
131
|
+
// 过滤组件id
|
|
132
|
+
name: item.name,
|
|
133
|
+
// 过滤组件名称
|
|
134
|
+
filterComponentType: "MultipleSelect",
|
|
135
|
+
props: {
|
|
136
|
+
options: _this.labelDateInstance.labelData || []
|
|
137
|
+
},
|
|
138
|
+
filterFn: function filterFn(value) {
|
|
139
|
+
return function (i) {
|
|
140
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "label")).length > 0;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
};
|
|
122
144
|
});
|
|
123
145
|
_defineProperty(this, "formDataTransform", function (v) {
|
|
124
146
|
return v === null || v === void 0 ? void 0 : v.map(function (item) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class SubForm implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
isCombinationComponent: boolean;
|
|
11
|
+
formField: string;
|
|
12
|
+
canSort: boolean;
|
|
13
|
+
children: ComponentInterface[];
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
templateId?: string;
|
|
16
|
+
workOrderUniqueKey?: string;
|
|
17
|
+
constructor(options: PickOption);
|
|
18
|
+
renderTabel: (list: any) => React.JSX.Element;
|
|
19
|
+
renderPc: () => null;
|
|
20
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
|
+
getComponentValue: (r: Record) => any;
|
|
22
|
+
renderExport: () => null;
|
|
23
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
24
|
+
editRender: (p: any) => React.JSX.Element;
|
|
25
|
+
filterConfig: (item: ColumnConfig) => {
|
|
26
|
+
searchDefaultConditions: "like";
|
|
27
|
+
type: string;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
filterComponentType: "Input";
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
export default SubForm;
|
|
@@ -0,0 +1,173 @@
|
|
|
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 _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); }
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
|
+
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; }
|
|
10
|
+
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); } }
|
|
11
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
16
|
+
import React from "react";
|
|
17
|
+
import { Table } from "antd";
|
|
18
|
+
import { SubForm as SubFormComponent } from "@kmkf-fe-packages/basic-components";
|
|
19
|
+
import Input from "../Input";
|
|
20
|
+
import TextArea from "../TextArea";
|
|
21
|
+
import BsHeaderChild from "../BS/common/BsHeaderChild";
|
|
22
|
+
import GetFormItem from "../GetFormItem";
|
|
23
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
24
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
25
|
+
import { SYMBOL } from "../../constant";
|
|
26
|
+
var WidgetMap = {
|
|
27
|
+
INPUT: Input,
|
|
28
|
+
TEXTAREA: TextArea
|
|
29
|
+
};
|
|
30
|
+
var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
31
|
+
var _this = this,
|
|
32
|
+
_this$componentConfig5,
|
|
33
|
+
_this$componentConfig9,
|
|
34
|
+
_this$componentConfig10;
|
|
35
|
+
_classCallCheck(this, SubForm);
|
|
36
|
+
_defineProperty(this, "name", void 0);
|
|
37
|
+
_defineProperty(this, "id", void 0);
|
|
38
|
+
_defineProperty(this, "sortField", void 0);
|
|
39
|
+
_defineProperty(this, "type", void 0);
|
|
40
|
+
_defineProperty(this, "rules", void 0);
|
|
41
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
42
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
43
|
+
_defineProperty(this, "formField", void 0);
|
|
44
|
+
_defineProperty(this, "canSort", void 0);
|
|
45
|
+
_defineProperty(this, "children", void 0);
|
|
46
|
+
_defineProperty(this, "dataType", void 0);
|
|
47
|
+
_defineProperty(this, "templateId", void 0);
|
|
48
|
+
_defineProperty(this, "workOrderUniqueKey", void 0);
|
|
49
|
+
_defineProperty(this, "renderTabel", function (list) {
|
|
50
|
+
var _ref, _ref$filter, _this$componentConfig, _this$componentConfig2;
|
|
51
|
+
var columns = [{
|
|
52
|
+
dataIndex: "",
|
|
53
|
+
title: "序号",
|
|
54
|
+
align: "center",
|
|
55
|
+
ellipsis: true,
|
|
56
|
+
width: 50,
|
|
57
|
+
render: function render(val, record, index) {
|
|
58
|
+
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
59
|
+
}
|
|
60
|
+
}].concat(_toConsumableArray(((_ref = ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : (_this$componentConfig2 = _this$componentConfig.subConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.config) || []) === null || _ref === void 0 ? void 0 : (_ref$filter = _ref.filter(function (t) {
|
|
61
|
+
return t.isShow;
|
|
62
|
+
})) === null || _ref$filter === void 0 ? void 0 : _ref$filter.map(function (item) {
|
|
63
|
+
return {
|
|
64
|
+
dataIndex: item.key,
|
|
65
|
+
title: item.name,
|
|
66
|
+
align: "center",
|
|
67
|
+
ellipsis: true,
|
|
68
|
+
width: 200,
|
|
69
|
+
render: function render(val) {
|
|
70
|
+
return /*#__PURE__*/React.createElement("span", null, val);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
})) || []));
|
|
74
|
+
return /*#__PURE__*/React.createElement(Table, {
|
|
75
|
+
columns: columns,
|
|
76
|
+
dataSource: list,
|
|
77
|
+
rowKey: "uuid",
|
|
78
|
+
size: "small",
|
|
79
|
+
pagination: false,
|
|
80
|
+
scroll: {
|
|
81
|
+
x: "100%"
|
|
82
|
+
},
|
|
83
|
+
locale: {
|
|
84
|
+
emptyText: "暂无数据"
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
_defineProperty(this, "renderPc", function () {
|
|
89
|
+
return null;
|
|
90
|
+
});
|
|
91
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
92
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")])) return null;
|
|
93
|
+
return _this.renderTabel(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")]);
|
|
94
|
+
});
|
|
95
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
96
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")];
|
|
97
|
+
});
|
|
98
|
+
_defineProperty(this, "renderExport", function () {
|
|
99
|
+
return null;
|
|
100
|
+
});
|
|
101
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
102
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
103
|
+
id: _this.id,
|
|
104
|
+
label: _this.name,
|
|
105
|
+
value: _this.renderTabel(record === null || record === void 0 ? void 0 : record["".concat(_this.id)])
|
|
106
|
+
}) : null;
|
|
107
|
+
});
|
|
108
|
+
_defineProperty(this, "editRender", function (p) {
|
|
109
|
+
var _this$componentConfig3, _this$componentConfig4;
|
|
110
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
111
|
+
title: _this.name,
|
|
112
|
+
name: _this.id,
|
|
113
|
+
rules: _this.rules,
|
|
114
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
115
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
116
|
+
required: (_this$componentConfig3 = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.required) !== null && _this$componentConfig3 !== void 0 ? _this$componentConfig3 : false,
|
|
117
|
+
component: /*#__PURE__*/React.createElement(SubFormComponent, _this.componentConfig)
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
121
|
+
return [{
|
|
122
|
+
searchDefaultConditions: SYMBOL.like,
|
|
123
|
+
type: item.type,
|
|
124
|
+
id: "".concat(item.id, "_productList"),
|
|
125
|
+
// 过滤组件id
|
|
126
|
+
name: item.name,
|
|
127
|
+
// 过滤组件名称
|
|
128
|
+
filterComponentType: "Input"
|
|
129
|
+
}];
|
|
130
|
+
});
|
|
131
|
+
this.name = options.name;
|
|
132
|
+
this.id = options.id;
|
|
133
|
+
this.sortField = "".concat(options.id, "_productList");
|
|
134
|
+
this.formField = "".concat(options.id, "_productList");
|
|
135
|
+
this.type = options.type;
|
|
136
|
+
this.templateId = options.templateId;
|
|
137
|
+
this.componentConfig = options.componentConfig;
|
|
138
|
+
this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
|
|
139
|
+
this.rules = [{
|
|
140
|
+
required: (_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.required,
|
|
141
|
+
validator: function validator(_, value) {
|
|
142
|
+
var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8;
|
|
143
|
+
var result = (_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : (_this$componentConfig7 = _this$componentConfig6.subConfig) === null || _this$componentConfig7 === void 0 ? void 0 : (_this$componentConfig8 = _this$componentConfig7.config) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.reduce(function (prv, next) {
|
|
144
|
+
if (next.isRequired && next.isShow && !next.isEdit) {
|
|
145
|
+
prv[next.key] = "".concat(next.name, "\u4E0D\u80FD\u4E3A\u7A7A");
|
|
146
|
+
}
|
|
147
|
+
return prv;
|
|
148
|
+
}, {});
|
|
149
|
+
var msg = (value || []).reduce(function (prv, next) {
|
|
150
|
+
Object.keys(next).forEach(function (key) {
|
|
151
|
+
if (result[key] && !next[key]) {
|
|
152
|
+
prv = result[key];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
return prv;
|
|
156
|
+
}, "");
|
|
157
|
+
if (msg) {
|
|
158
|
+
return Promise.reject(new Error(msg));
|
|
159
|
+
}
|
|
160
|
+
return Promise.resolve();
|
|
161
|
+
}
|
|
162
|
+
}];
|
|
163
|
+
this.isCombinationComponent = true;
|
|
164
|
+
this.canSort = false;
|
|
165
|
+
this.children = (((_this$componentConfig9 = this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : (_this$componentConfig10 = _this$componentConfig9.subConfig) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.config) || []).map(function (item) {
|
|
166
|
+
return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
167
|
+
name: item.name,
|
|
168
|
+
id: "".concat(options.id, "_productList_").concat(item.key)
|
|
169
|
+
}));
|
|
170
|
+
});
|
|
171
|
+
this.dataType = "object";
|
|
172
|
+
});
|
|
173
|
+
export default SubForm;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, 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, KmErpSendGood, AfterSalesOrderId } from "./index";
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, 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, KmErpSendGood, AfterSalesOrderId } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => AfterSalesOrderId | FlowMarkSelect | BasicInput | KmErpSendGood | MsgStatus |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => AfterSalesOrderId | AliPay | BasicCascader | CommonMultiStatus | CommonSystemOrder | FlowMarkSelect | BasicInput | KmErpSendGood | Label | MsgStatus | StatusSelect | WdtExchange | WdtReturn | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | CommonInput | PaymentVoucherCode;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, 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,
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, ErpTradeId, 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,
|
|
2
2
|
// CommonTradeId,
|
|
3
3
|
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, KmErpSendGood, AfterSalesOrderId } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
@@ -48,6 +48,8 @@ export var factory = function factory(type, options) {
|
|
|
48
48
|
return new BasicFile(options);
|
|
49
49
|
case "POSTING":
|
|
50
50
|
return new BasicPosting(options);
|
|
51
|
+
case "SUBFORM":
|
|
52
|
+
return new SubForm(options);
|
|
51
53
|
case "SHOP_NAME_INPUT":
|
|
52
54
|
return new ShopName(options);
|
|
53
55
|
case "TRADE_ID_INPUT":
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { default as BasicGrade } from "./components/Grade";
|
|
|
12
12
|
export { default as BasicRate } from "./components/Rate";
|
|
13
13
|
export { default as BasicFile } from "./components/File";
|
|
14
14
|
export { default as BasicPosting } from "./components/PostIng";
|
|
15
|
+
export { default as SubForm } from "./components/SubForm";
|
|
15
16
|
export { default as CommonDataTime } from "./components/CommonDataTime";
|
|
16
17
|
export { default as TradeId } from "./components/TradeId";
|
|
17
18
|
export { default as ErpTradeId } from "./components/ErpTradeId";
|
|
@@ -70,9 +71,9 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
|
70
71
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
71
72
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
72
73
|
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
73
|
-
export { default as NodeInput } from
|
|
74
|
-
export { default as FlowWorkOrderStatus } from
|
|
75
|
-
export { default as MsgStatus } from
|
|
74
|
+
export { default as NodeInput } from "./components/NodeInput";
|
|
75
|
+
export { default as FlowWorkOrderStatus } from "./components/FlowWorkOrderStatus";
|
|
76
|
+
export { default as MsgStatus } from "./components/MsgStatus";
|
|
76
77
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
78
|
export { default as WdtReissue } from "./components/WDT/WdtRessuie";
|
|
78
79
|
export { default as WdtReturn } from "./components/WDT/WdtReturn";
|
package/dist/esm/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export { default as BasicGrade } from "./components/Grade";
|
|
|
12
12
|
export { default as BasicRate } from "./components/Rate";
|
|
13
13
|
export { default as BasicFile } from "./components/File";
|
|
14
14
|
export { default as BasicPosting } from "./components/PostIng";
|
|
15
|
+
export { default as SubForm } from "./components/SubForm";
|
|
15
16
|
export { default as CommonDataTime } from "./components/CommonDataTime";
|
|
16
17
|
export { default as TradeId } from "./components/TradeId";
|
|
17
18
|
export { default as ErpTradeId } from "./components/ErpTradeId";
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -173,6 +173,13 @@ export interface ComponentInterface {
|
|
|
173
173
|
repeatRange: string;
|
|
174
174
|
repeatComponents: any[];
|
|
175
175
|
};
|
|
176
|
+
subConfig?: {
|
|
177
|
+
config: any;
|
|
178
|
+
flowStatus: string[];
|
|
179
|
+
flowTemplateKey: any;
|
|
180
|
+
nodeId: string;
|
|
181
|
+
workOrderTemplateId: string;
|
|
182
|
+
};
|
|
176
183
|
};
|
|
177
184
|
effects?: {
|
|
178
185
|
queryWorkOrderDetail?: (r: Record) => void;
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.0.10-beta.
|
|
3
|
+
"version": "1.0.10-beta.20",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
9
|
"scripts": {
|
|
10
|
-
"sync": "yarn build && yalc push",
|
|
11
10
|
"build": "yarn run lint && father build",
|
|
12
11
|
"lint": "eslint '**/*.{ts,tsx}'",
|
|
13
|
-
"lint:fix": "eslint --fix '**/*.{ts,tsx}'"
|
|
12
|
+
"lint:fix": "eslint --fix '**/*.{ts,tsx}'",
|
|
13
|
+
"sync": "yarn build && yalc push"
|
|
14
14
|
},
|
|
15
15
|
"lint-staged": {
|
|
16
16
|
"*.{js,jsx,less,md,json}": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.0.10-beta.20",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.0.10-beta.17"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "4b235d0e205f7725d1c0f7cdee27b41145630c39",
|
|
42
42
|
"gitHooks": {
|
|
43
43
|
"pre-commit": "lint-staged"
|
|
44
44
|
}
|