@kmkf-fe-packages/services-components 1.19.0 → 1.19.2
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/BS/BsLogistics/index.js +13 -31
- package/dist/esm/components/EItemEnCode/index.d.ts +7 -0
- package/dist/esm/components/EItemEnCode/index.js +21 -1
- package/dist/esm/components/JST/JstItemSelect/index.d.ts +7 -0
- package/dist/esm/components/JST/JstItemSelect/index.js +21 -5
- package/dist/esm/components/JST/JstLogistics/index.js +13 -31
- package/dist/esm/components/JST/JstSendGood/index.d.ts +1 -3
- package/dist/esm/components/JST/JstSendGood/index.js +7 -21
- package/dist/esm/components/JST/JstSupply/index.js +12 -31
- package/dist/esm/components/KmErpSendGood/index.js +11 -26
- package/dist/esm/components/MsgStatus/index.js +1 -1
- package/dist/esm/components/ThirdItemSelect/index.d.ts +7 -0
- package/dist/esm/components/ThirdItemSelect/index.js +25 -9
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +2 -2
- package/package.json +4 -4
|
@@ -79,37 +79,19 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
|
79
79
|
}) : null;
|
|
80
80
|
});
|
|
81
81
|
_defineProperty(this, "getSortChildFields", function (type, options) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
if (type === "logisticsCompany") {
|
|
96
|
-
var _typeMap$options$type3;
|
|
97
|
-
return [{
|
|
98
|
-
name: "物流公司",
|
|
99
|
-
key: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.company),
|
|
100
|
-
options: _this.expressDateInstance.getExpressData(),
|
|
101
|
-
dataType: "string"
|
|
102
|
-
}];
|
|
103
|
-
}
|
|
104
|
-
if (type === "logisticsCode") {
|
|
105
|
-
var _typeMap$options$type4;
|
|
106
|
-
return [{
|
|
107
|
-
name: "物流单号",
|
|
108
|
-
key: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.code),
|
|
109
|
-
dataType: "string"
|
|
110
|
-
}];
|
|
111
|
-
}
|
|
112
|
-
return [];
|
|
82
|
+
var _typeMap$options$type, _typeMap$options$type2;
|
|
83
|
+
return [{
|
|
84
|
+
name: "物流公司",
|
|
85
|
+
key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.company),
|
|
86
|
+
options: _this.expressDateInstance.getExpressData(),
|
|
87
|
+
dataType: "arrayObject",
|
|
88
|
+
disabled: type === 'logisticsCode'
|
|
89
|
+
}, {
|
|
90
|
+
name: "物流单号",
|
|
91
|
+
key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.code),
|
|
92
|
+
dataType: "arrayObject",
|
|
93
|
+
disabled: type === 'logisticsCompany'
|
|
94
|
+
}];
|
|
113
95
|
});
|
|
114
96
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
115
97
|
var _typeMap$_this$type;
|
|
@@ -17,7 +17,14 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
17
17
|
dataType: ComponentInterface["dataType"];
|
|
18
18
|
showHeader: string[];
|
|
19
19
|
platform?: ComponentInterface["platform"];
|
|
20
|
+
sortChildField: {
|
|
21
|
+
name: string;
|
|
22
|
+
key: string;
|
|
23
|
+
dataType: string;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}[];
|
|
20
26
|
constructor(options: PickOption);
|
|
27
|
+
getSortChildFields: () => any;
|
|
21
28
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
29
|
renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
|
|
23
30
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -36,6 +36,25 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
36
36
|
_defineProperty(this, "dataType", void 0);
|
|
37
37
|
_defineProperty(this, "showHeader", void 0);
|
|
38
38
|
_defineProperty(this, "platform", void 0);
|
|
39
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
40
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
41
|
+
var mapping = {
|
|
42
|
+
title: '商品名称',
|
|
43
|
+
outerId: '商品编码',
|
|
44
|
+
numIid: '商品id',
|
|
45
|
+
skuId: 'skuId',
|
|
46
|
+
outerSkuId: 'sku编码',
|
|
47
|
+
propertiesName: 'sku信息'
|
|
48
|
+
};
|
|
49
|
+
return Object.keys(mapping).map(function (item) {
|
|
50
|
+
return {
|
|
51
|
+
name: mapping[item],
|
|
52
|
+
key: "".concat(_this.id, "_").concat(item),
|
|
53
|
+
dataType: "arrayObject",
|
|
54
|
+
disabled: !_this.showHeader.includes(item)
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
});
|
|
39
58
|
_defineProperty(this, "renderClient", function (record) {
|
|
40
59
|
if (isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
|
|
41
60
|
return /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -153,6 +172,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
153
172
|
return Promise.resolve();
|
|
154
173
|
}
|
|
155
174
|
}] : [];
|
|
156
|
-
this.dataType = "
|
|
175
|
+
this.dataType = "array";
|
|
176
|
+
this.sortChildField = this.getSortChildFields();
|
|
157
177
|
});
|
|
158
178
|
export default EItemEncode;
|
|
@@ -15,6 +15,12 @@ declare class JstItemSelect implements ComponentInterface {
|
|
|
15
15
|
canSort: boolean;
|
|
16
16
|
children: ComponentInterface[];
|
|
17
17
|
dataType: ComponentInterface["dataType"];
|
|
18
|
+
sortChildField: {
|
|
19
|
+
name: string;
|
|
20
|
+
key: string;
|
|
21
|
+
dataType: string;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}[];
|
|
18
24
|
constructor(options: PickOption);
|
|
19
25
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
20
26
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -22,6 +28,7 @@ declare class JstItemSelect implements ComponentInterface {
|
|
|
22
28
|
getComponentValue: (r: Record) => any;
|
|
23
29
|
renderExport: (value: any, record: any) => any;
|
|
24
30
|
editRender: (p: any) => React.JSX.Element;
|
|
31
|
+
getSortChildFields: () => any;
|
|
25
32
|
filterConfig: (item: ColumnConfig) => {
|
|
26
33
|
searchDefaultConditions: "like";
|
|
27
34
|
type: string;
|
|
@@ -16,7 +16,7 @@ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
|
16
16
|
import { SYMBOL } from "../../../constant";
|
|
17
17
|
var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
|
|
18
18
|
var _this = this,
|
|
19
|
-
_this$
|
|
19
|
+
_this$componentConfig5;
|
|
20
20
|
_classCallCheck(this, JstItemSelect);
|
|
21
21
|
_defineProperty(this, "name", void 0);
|
|
22
22
|
_defineProperty(this, "id", void 0);
|
|
@@ -31,6 +31,7 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
|
|
|
31
31
|
_defineProperty(this, "canSort", void 0);
|
|
32
32
|
_defineProperty(this, "children", void 0);
|
|
33
33
|
_defineProperty(this, "dataType", void 0);
|
|
34
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
34
35
|
_defineProperty(this, "renderClient", function (record) {
|
|
35
36
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
36
37
|
id: _this.id,
|
|
@@ -82,6 +83,20 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
|
|
|
82
83
|
}))
|
|
83
84
|
});
|
|
84
85
|
});
|
|
86
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
87
|
+
var _this$componentConfig3, _this$componentConfig4;
|
|
88
|
+
return [{
|
|
89
|
+
name: "jst供应商名称",
|
|
90
|
+
key: "".concat(_this.id, "_supplierName"),
|
|
91
|
+
dataType: "arrayObject",
|
|
92
|
+
disabled: !((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.enableSupplierName)
|
|
93
|
+
}, {
|
|
94
|
+
name: "jst供应商编码",
|
|
95
|
+
key: "".concat(_this.id, "_itemId"),
|
|
96
|
+
dataType: "arrayObject",
|
|
97
|
+
disabled: !((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.enableItemId)
|
|
98
|
+
}];
|
|
99
|
+
});
|
|
85
100
|
_defineProperty(this, "filterConfig", function (item) {
|
|
86
101
|
return [{
|
|
87
102
|
searchDefaultConditions: SYMBOL.like,
|
|
@@ -127,23 +142,23 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
|
|
|
127
142
|
this.canSort = false;
|
|
128
143
|
this.children = [];
|
|
129
144
|
this.dataType = "object";
|
|
130
|
-
this.rules = (_this$
|
|
145
|
+
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
131
146
|
required: true,
|
|
132
147
|
validator: function validator(_, value) {
|
|
133
|
-
var _this$
|
|
148
|
+
var _this$componentConfig6, _this$componentConfig7;
|
|
134
149
|
if (!value || !value.length) {
|
|
135
150
|
return Promise.reject(new Error("请选择宝贝"));
|
|
136
151
|
}
|
|
137
152
|
var hasNotId = (value || []).some(function (item) {
|
|
138
153
|
return !item.itemId;
|
|
139
154
|
});
|
|
140
|
-
if ((_this$
|
|
155
|
+
if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.enableItemId && hasNotId) {
|
|
141
156
|
return Promise.reject(new Error("请输入供应商编码"));
|
|
142
157
|
}
|
|
143
158
|
var hasNotName = (value || []).some(function (item) {
|
|
144
159
|
return !item.supplierName;
|
|
145
160
|
});
|
|
146
|
-
if ((_this$
|
|
161
|
+
if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.enableSupplierName && hasNotName) {
|
|
147
162
|
return Promise.reject(new Error("请输入供应商名称"));
|
|
148
163
|
}
|
|
149
164
|
return Promise.resolve();
|
|
@@ -151,5 +166,6 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
|
|
|
151
166
|
}] : [];
|
|
152
167
|
this.align = "left";
|
|
153
168
|
this.expressDateInstance = ExpressData.getInstance();
|
|
169
|
+
this.sortChildField = this.getSortChildFields();
|
|
154
170
|
});
|
|
155
171
|
export default JstItemSelect;
|
|
@@ -52,37 +52,19 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
|
|
|
52
52
|
_defineProperty(this, "children", void 0);
|
|
53
53
|
_defineProperty(this, "dataType", void 0);
|
|
54
54
|
_defineProperty(this, "getSortChildFields", function (type, options) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
if (type === "logisticsCompany") {
|
|
69
|
-
var _typeMap$options$type3;
|
|
70
|
-
return [{
|
|
71
|
-
name: "物流公司",
|
|
72
|
-
key: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.company),
|
|
73
|
-
options: _this.expressDateInstance.getExpressData(),
|
|
74
|
-
dataType: "string"
|
|
75
|
-
}];
|
|
76
|
-
}
|
|
77
|
-
if (type === "logisticsCode") {
|
|
78
|
-
var _typeMap$options$type4;
|
|
79
|
-
return [{
|
|
80
|
-
name: "物流单号",
|
|
81
|
-
key: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.code),
|
|
82
|
-
dataType: "string"
|
|
83
|
-
}];
|
|
84
|
-
}
|
|
85
|
-
return [];
|
|
55
|
+
var _typeMap$options$type, _typeMap$options$type2;
|
|
56
|
+
return [{
|
|
57
|
+
name: "物流公司",
|
|
58
|
+
key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.company),
|
|
59
|
+
options: _this.expressDateInstance.getExpressData(),
|
|
60
|
+
dataType: "string",
|
|
61
|
+
disabled: type === "logisticsCode"
|
|
62
|
+
}, {
|
|
63
|
+
name: "物流单号",
|
|
64
|
+
key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.code),
|
|
65
|
+
dataType: "string",
|
|
66
|
+
disabled: type === "logisticsCompany"
|
|
67
|
+
}];
|
|
86
68
|
});
|
|
87
69
|
_defineProperty(this, "renderClient", function (record) {
|
|
88
70
|
var _this$componentConfig;
|
|
@@ -19,6 +19,7 @@ declare class JstSendGood implements ComponentInterface {
|
|
|
19
19
|
canSort: boolean;
|
|
20
20
|
children: ComponentInterface[];
|
|
21
21
|
dataType: ComponentInterface["dataType"];
|
|
22
|
+
format: ComponentInterface["format"];
|
|
22
23
|
constructor(options: PickOption);
|
|
23
24
|
getSortChildFields: (type: string, options: PickOption, fieldType?: string) => any;
|
|
24
25
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
@@ -46,8 +47,5 @@ declare class JstSendGood implements ComponentInterface {
|
|
|
46
47
|
filterFn: (value: string) => (i: Record) => any;
|
|
47
48
|
props?: undefined;
|
|
48
49
|
})[];
|
|
49
|
-
formDataTransform: (v: Array<{
|
|
50
|
-
sendName: string;
|
|
51
|
-
}>) => string[];
|
|
52
50
|
}
|
|
53
51
|
export default JstSendGood;
|
|
@@ -60,31 +60,25 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
60
60
|
_defineProperty(this, "canSort", void 0);
|
|
61
61
|
_defineProperty(this, "children", void 0);
|
|
62
62
|
_defineProperty(this, "dataType", void 0);
|
|
63
|
+
_defineProperty(this, "format", void 0);
|
|
63
64
|
_defineProperty(this, "getSortChildFields", function (type, options, fieldType) {
|
|
64
65
|
var _typeMap$options$type, _typeMap$options$type2;
|
|
65
66
|
var sendName = {
|
|
66
67
|
name: "发货仓名称",
|
|
67
68
|
key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.sendName),
|
|
68
|
-
dataType: "
|
|
69
|
+
dataType: "arrayObject",
|
|
70
|
+
disabled: type === 'sendId'
|
|
69
71
|
};
|
|
70
72
|
var sendId = {
|
|
71
73
|
name: "发货仓编码",
|
|
72
74
|
key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.sendId),
|
|
73
|
-
dataType: "
|
|
75
|
+
dataType: "arrayObject",
|
|
76
|
+
disabled: type === 'sendName'
|
|
74
77
|
};
|
|
75
78
|
if (fieldType === 'WDT_SEND_GOOD') {
|
|
76
79
|
sendName.options = WdtSendData.getInstance().getWdtSendData() || [];
|
|
77
80
|
}
|
|
78
|
-
|
|
79
|
-
return [sendName, sendId];
|
|
80
|
-
}
|
|
81
|
-
if (type === 'sendName') {
|
|
82
|
-
return [sendName];
|
|
83
|
-
}
|
|
84
|
-
if (type === 'sendId') {
|
|
85
|
-
return [sendId];
|
|
86
|
-
}
|
|
87
|
-
return [];
|
|
81
|
+
return [sendName, sendId];
|
|
88
82
|
});
|
|
89
83
|
_defineProperty(this, "renderClient", function (record) {
|
|
90
84
|
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
@@ -202,14 +196,6 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
202
196
|
}
|
|
203
197
|
}];
|
|
204
198
|
});
|
|
205
|
-
_defineProperty(this, "formDataTransform", function (v) {
|
|
206
|
-
var _v$map;
|
|
207
|
-
return v === null || v === void 0 ? void 0 : (_v$map = v.map(function (item) {
|
|
208
|
-
return item.sendName;
|
|
209
|
-
})) === null || _v$map === void 0 ? void 0 : _v$map.filter(function (item) {
|
|
210
|
-
return !isNull(item);
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
199
|
this.name = _options.name;
|
|
214
200
|
this.id = _options.id;
|
|
215
201
|
this.sortField = "".concat(_options.id, "_").concat((_typeMap$_options$typ = typeMap[_options.type]) === null || _typeMap$_options$typ === void 0 ? void 0 : _typeMap$_options$typ.key);
|
|
@@ -217,7 +203,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
217
203
|
this.componentConfig = _options.componentConfig;
|
|
218
204
|
this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options, _options.type);
|
|
219
205
|
this.type = _options.type;
|
|
220
|
-
this.dataType = "
|
|
206
|
+
this.dataType = "arrayObject";
|
|
221
207
|
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
222
208
|
required: true,
|
|
223
209
|
validator: function validator(_, value) {
|
|
@@ -33,36 +33,17 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(_options) {
|
|
|
33
33
|
_defineProperty(this, "children", void 0);
|
|
34
34
|
_defineProperty(this, "dataType", void 0);
|
|
35
35
|
_defineProperty(this, "getSortChildFields", function (type, options) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}];
|
|
48
|
-
}
|
|
49
|
-
if (type === "supplyName") {
|
|
50
|
-
return [{
|
|
51
|
-
name: "jst供销商名称",
|
|
52
|
-
key: "".concat(options.id, "_supplyName"),
|
|
53
|
-
dataType: "array",
|
|
54
|
-
format: "input"
|
|
55
|
-
}];
|
|
56
|
-
}
|
|
57
|
-
if (type === "supplyId") {
|
|
58
|
-
return [{
|
|
59
|
-
name: "jst供销商编码",
|
|
60
|
-
key: "".concat(options.id, "_supplyId"),
|
|
61
|
-
dataType: "array",
|
|
62
|
-
format: "input"
|
|
63
|
-
}];
|
|
64
|
-
}
|
|
65
|
-
return [];
|
|
36
|
+
return [{
|
|
37
|
+
name: "jst供销商名称",
|
|
38
|
+
key: "".concat(options.id, "_supplyName"),
|
|
39
|
+
dataType: "arrayObject",
|
|
40
|
+
disabled: type === 'supplyId'
|
|
41
|
+
}, {
|
|
42
|
+
name: "jst供销商编码",
|
|
43
|
+
key: "".concat(options.id, "_supplyId"),
|
|
44
|
+
dataType: "arrayObject",
|
|
45
|
+
disabled: type === 'supplyName'
|
|
46
|
+
}];
|
|
66
47
|
});
|
|
67
48
|
_defineProperty(this, "renderClient", function (record) {
|
|
68
49
|
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
@@ -157,9 +138,9 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(_options) {
|
|
|
157
138
|
this.id = _options.id;
|
|
158
139
|
this.sortField = "".concat(_options.id, "_jstItemList");
|
|
159
140
|
this.formField = "".concat(_options.id, "_jstItemList");
|
|
160
|
-
this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "", _options);
|
|
161
141
|
this.type = _options.type;
|
|
162
142
|
this.componentConfig = _options.componentConfig;
|
|
143
|
+
this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "", _options);
|
|
163
144
|
this.isCombinationComponent = false;
|
|
164
145
|
this.canSort = false;
|
|
165
146
|
this.children = [];
|
|
@@ -36,32 +36,17 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
36
36
|
_defineProperty(this, "suffixSendId", void 0);
|
|
37
37
|
_defineProperty(this, "suffixSendName", void 0);
|
|
38
38
|
_defineProperty(this, "getSortChildFields", function (type, options) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
if (type === 'sendName') {
|
|
51
|
-
return [{
|
|
52
|
-
name: "发货仓名称",
|
|
53
|
-
key: "".concat(options.id, "_").concat(_this.suffixSendName),
|
|
54
|
-
dataType: "string"
|
|
55
|
-
}];
|
|
56
|
-
}
|
|
57
|
-
if (type === 'sendId') {
|
|
58
|
-
return [{
|
|
59
|
-
name: "发货仓编码",
|
|
60
|
-
key: "".concat(options.id, "_").concat(_this.suffixSendId),
|
|
61
|
-
dataType: "string"
|
|
62
|
-
}];
|
|
63
|
-
}
|
|
64
|
-
return [];
|
|
39
|
+
return [{
|
|
40
|
+
name: "发货仓名称",
|
|
41
|
+
key: "".concat(options.id, "_").concat(_this.suffixSendName),
|
|
42
|
+
dataType: "arrayObject",
|
|
43
|
+
disabled: type === 'sendId'
|
|
44
|
+
}, {
|
|
45
|
+
name: "发货仓编码",
|
|
46
|
+
key: "".concat(options.id, "_").concat(_this.suffixSendId),
|
|
47
|
+
dataType: "arrayObject",
|
|
48
|
+
disabled: type === 'sendName'
|
|
49
|
+
}];
|
|
65
50
|
});
|
|
66
51
|
_defineProperty(this, "renderClient", function (record) {
|
|
67
52
|
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
@@ -185,7 +185,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
|
|
|
185
185
|
this.isCombinationComponent = false;
|
|
186
186
|
this.canSort = false;
|
|
187
187
|
this.children = [];
|
|
188
|
-
this.dataType = '
|
|
188
|
+
this.dataType = 'arrayObject';
|
|
189
189
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
190
190
|
required: true,
|
|
191
191
|
validator: function validator(_, value) {
|
|
@@ -13,7 +13,14 @@ declare class ThirdItemSelect implements ComponentInterface {
|
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
dataType: ComponentInterface['dataType'];
|
|
16
|
+
sortChildField: {
|
|
17
|
+
name: string;
|
|
18
|
+
key: string;
|
|
19
|
+
dataType: string;
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}[];
|
|
16
22
|
constructor(options: PickOption);
|
|
23
|
+
getSortChildFields: () => any;
|
|
17
24
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
18
25
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
19
26
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -15,7 +15,7 @@ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options) {
|
|
17
17
|
var _this = this,
|
|
18
|
-
_this$
|
|
18
|
+
_this$componentConfig6;
|
|
19
19
|
_classCallCheck(this, ThirdItemSelect);
|
|
20
20
|
_defineProperty(this, "name", void 0);
|
|
21
21
|
_defineProperty(this, "id", void 0);
|
|
@@ -29,6 +29,21 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
29
29
|
_defineProperty(this, "canSort", void 0);
|
|
30
30
|
_defineProperty(this, "children", void 0);
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
33
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
34
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
35
|
+
return [{
|
|
36
|
+
name: '供应商编码',
|
|
37
|
+
key: "".concat(_this.id, "_itemId"),
|
|
38
|
+
dataType: "arrayObject",
|
|
39
|
+
disabled: !((_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.enableItemId)
|
|
40
|
+
}, {
|
|
41
|
+
name: '供应商名称',
|
|
42
|
+
key: "".concat(_this.id, "_supplierName"),
|
|
43
|
+
dataType: "arrayObject",
|
|
44
|
+
disabled: !((_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.enableSupplierName)
|
|
45
|
+
}];
|
|
46
|
+
});
|
|
32
47
|
_defineProperty(this, "renderClient", function (record) {
|
|
33
48
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
34
49
|
id: _this.id,
|
|
@@ -68,7 +83,7 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
68
83
|
});
|
|
69
84
|
});
|
|
70
85
|
_defineProperty(this, "editRender", function (p) {
|
|
71
|
-
var _this$
|
|
86
|
+
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2;
|
|
72
87
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
73
88
|
title: _this.name,
|
|
74
89
|
name: _this.id,
|
|
@@ -76,9 +91,9 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
76
91
|
required: false,
|
|
77
92
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
78
93
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
79
|
-
tooltip: (_this$
|
|
94
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
|
|
80
95
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({}, _this.componentConfig, {
|
|
81
|
-
maxLength: ((_this$
|
|
96
|
+
maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
|
|
82
97
|
type: 4,
|
|
83
98
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
84
99
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
@@ -118,28 +133,29 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
118
133
|
this.isCombinationComponent = false;
|
|
119
134
|
this.canSort = false;
|
|
120
135
|
this.children = [];
|
|
121
|
-
this.dataType = '
|
|
122
|
-
this.rules = (_this$
|
|
136
|
+
this.dataType = 'array';
|
|
137
|
+
this.rules = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
|
|
123
138
|
required: true,
|
|
124
139
|
validator: function validator(_, value) {
|
|
125
|
-
var _this$
|
|
140
|
+
var _this$componentConfig7, _this$componentConfig8;
|
|
126
141
|
if (!value || !value.length) {
|
|
127
142
|
return Promise.reject(new Error('请选择宝贝'));
|
|
128
143
|
}
|
|
129
144
|
var hasNotId = (value || []).some(function (item) {
|
|
130
145
|
return !item.itemId && !item.supplierItemOuterId;
|
|
131
146
|
});
|
|
132
|
-
if ((_this$
|
|
147
|
+
if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.enableItemId && hasNotId) {
|
|
133
148
|
return Promise.reject(new Error('请输入供应商编码'));
|
|
134
149
|
}
|
|
135
150
|
var hasNotName = (value || []).some(function (item) {
|
|
136
151
|
return !item.supplierName;
|
|
137
152
|
});
|
|
138
|
-
if ((_this$
|
|
153
|
+
if ((_this$componentConfig8 = _this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.enableSupplierName && hasNotName) {
|
|
139
154
|
return Promise.reject(new Error('请输入供应商名称'));
|
|
140
155
|
}
|
|
141
156
|
return Promise.resolve();
|
|
142
157
|
}
|
|
143
158
|
}] : [];
|
|
159
|
+
this.sortChildField = this.getSortChildFields();
|
|
144
160
|
});
|
|
145
161
|
export default ThirdItemSelect;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | ItemEnCode | FlowWorkOrderStatus | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | KmErpSendGood | LogisticsMoreInterception | MsgStatus | SubForm | ThirdItemSelect | BasicDataTime | TradeDateTime | BasicAddress | BasicCascader | BasicCheckbox | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | SystemOrderNo | Ordinary | Payment | BsGoods | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | AfterSalesOrderId;
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -47,8 +47,8 @@ export interface ComponentInterface {
|
|
|
47
47
|
rules?: any[];
|
|
48
48
|
width?: number;
|
|
49
49
|
align?: ALignType;
|
|
50
|
-
dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
|
|
51
|
-
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup";
|
|
50
|
+
dataType: "string" | "number" | "boolean" | "array" | "range" | "object" | "arrayObject";
|
|
51
|
+
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup" | "object";
|
|
52
52
|
options?: Array<any>;
|
|
53
53
|
templateId?: string;
|
|
54
54
|
flowTemplateKey?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "1.19.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.19.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.19.2",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.19.2",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "2e2f27ba765c9dfa3ee60dbbc3fa4cf37c9ef689",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|