@kmkf-fe-packages/services-components 1.16.5-alpha.0 → 1.16.5-alpha.6
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/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +11 -9
- package/dist/esm/components/BS/BsLogistics/index.js +13 -31
- package/dist/esm/components/Common/index.js +2 -2
- package/dist/esm/components/EItemEnCode/index.d.ts +7 -0
- package/dist/esm/components/EItemEnCode/index.js +21 -1
- package/dist/esm/components/Input/index.js +13 -10
- 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 +2 -1
- package/dist/esm/components/JST/JstSendGood/index.js +20 -31
- package/dist/esm/components/JST/JstSupply/index.d.ts +7 -0
- package/dist/esm/components/JST/JstSupply/index.js +27 -11
- package/dist/esm/components/KmErpSendGood/index.js +11 -26
- package/dist/esm/components/LogisticsInterception/InterceptApiStatus.d.ts +39 -0
- package/dist/esm/components/LogisticsInterception/InterceptApiStatus.js +112 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +3 -0
- package/dist/esm/components/LogisticsInterception/index.js +8 -4
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +1 -1
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.d.ts +40 -0
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +107 -0
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +15 -13
- package/dist/esm/components/LogisticsMoreInterception/index.js +26 -19
- package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.js +1 -1
- package/dist/esm/components/MsgStatus/index.js +21 -11
- package/dist/esm/components/SubForm/index.js +16 -2
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryWdtSendData";
|
|
3
|
-
declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
|
|
3
|
+
declare const Global: ({ children, requestList, repeatRequestList, }: React.PropsWithChildren<{
|
|
4
4
|
requestList?: RequestType[] | undefined;
|
|
5
5
|
repeatRequestList?: Record<string, () => Promise<any>> | undefined;
|
|
6
6
|
}>) => React.JSX.Element;
|
|
@@ -14,9 +14,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
14
14
|
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; } }
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useEffect, useState } from "react";
|
|
17
|
-
import { Skeleton,
|
|
17
|
+
import { Skeleton, Button, Alert, Space } from "antd";
|
|
18
18
|
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
|
|
19
|
-
import { servers } from
|
|
19
|
+
import { servers } from "@kmkf-fe-packages/kmkf-utils";
|
|
20
20
|
var Global = function Global(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
22
22
|
_ref$requestList = _ref.requestList,
|
|
@@ -93,15 +93,17 @@ var Global = function Global(_ref) {
|
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
if (globalState === "failed") {
|
|
96
|
-
return /*#__PURE__*/React.createElement(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Alert, {
|
|
97
|
+
message: "\u6570\u636E\u52A0\u8F7D\u5F02\u5E38,\u53EF\u80FD\u5F71\u54CD\u90E8\u5206\u7EC4\u4EF6\u4F7F\u7528",
|
|
98
|
+
type: "warning",
|
|
99
|
+
action: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
100
100
|
type: "primary",
|
|
101
101
|
key: "console",
|
|
102
|
-
onClick: initDataSource
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
onClick: initDataSource,
|
|
103
|
+
size: "small"
|
|
104
|
+
}, "\u5237\u65B0\u91CD\u8BD5")),
|
|
105
|
+
closable: true
|
|
106
|
+
}), children);
|
|
105
107
|
}
|
|
106
108
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
107
109
|
};
|
|
@@ -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;
|
|
@@ -1065,7 +1065,7 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
1065
1065
|
var getColorByStatus = function getColorByStatus(value) {
|
|
1066
1066
|
var _options$find2;
|
|
1067
1067
|
return ((_options$find2 = options.find(function (innerItem) {
|
|
1068
|
-
return value === innerItem.label;
|
|
1068
|
+
return value === innerItem.label || value === innerItem.oldValue;
|
|
1069
1069
|
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) || '#000';
|
|
1070
1070
|
};
|
|
1071
1071
|
var detailContent = function detailContent(item) {
|
|
@@ -1106,7 +1106,7 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
1106
1106
|
cursor: "pointer"
|
|
1107
1107
|
}
|
|
1108
1108
|
}, (_item$msgReceivers2 = item.msgReceivers) !== null && _item$msgReceivers2 !== void 0 && _item$msgReceivers2.some(function (msgItem) {
|
|
1109
|
-
return (msgItem === null || msgItem === void 0 ? void 0 : msgItem.status) === failValue;
|
|
1109
|
+
return Array.isArray(failValue) ? failValue.includes(msgItem === null || msgItem === void 0 ? void 0 : msgItem.status) : (msgItem === null || msgItem === void 0 ? void 0 : msgItem.status) === failValue;
|
|
1110
1110
|
}) || item.failReason ? /*#__PURE__*/React.createElement(Popover, {
|
|
1111
1111
|
content: detailContent(item),
|
|
1112
1112
|
overlayStyle: {
|
|
@@ -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;
|
|
@@ -110,7 +110,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
110
110
|
this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
|
|
111
111
|
this.rules = [{
|
|
112
112
|
validator: function validator(_, value) {
|
|
113
|
-
var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8, _this$componentConfig9, _this$componentConfig10;
|
|
113
|
+
var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8, _this$componentConfig9, _this$componentConfig10, _this$componentConfig11;
|
|
114
114
|
if (!value) {
|
|
115
115
|
return Promise.resolve();
|
|
116
116
|
}
|
|
@@ -127,11 +127,14 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
127
127
|
if (testList.length && !isTest) {
|
|
128
128
|
return Promise.reject(new Error("请填写正确的格式"));
|
|
129
129
|
}
|
|
130
|
-
if ((_this$componentConfig9 = _this.componentConfig) !== null && _this$componentConfig9 !== void 0 &&
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
if ((_this$componentConfig9 = _this.componentConfig) !== null && _this$componentConfig9 !== void 0 && _this$componentConfig9.isNumber && value > Number.MAX_SAFE_INTEGER) {
|
|
131
|
+
return Promise.reject(new Error("输入数值超出最大数字上限,请使用文本框替代当前数字输入框组件"));
|
|
132
|
+
}
|
|
133
|
+
if ((_this$componentConfig10 = _this.componentConfig) !== null && _this$componentConfig10 !== void 0 && (_this$componentConfig11 = _this$componentConfig10.rulesOptions) !== null && _this$componentConfig11 !== void 0 && _this$componentConfig11.length) {
|
|
134
|
+
var _this$componentConfig12;
|
|
135
|
+
var rulesList = (_this$componentConfig12 = _this.componentConfig) === null || _this$componentConfig12 === void 0 ? void 0 : _this$componentConfig12.rulesOptions.filter(function (item) {
|
|
136
|
+
var _this$componentConfig13;
|
|
137
|
+
return (((_this$componentConfig13 = _this.componentConfig) === null || _this$componentConfig13 === void 0 ? void 0 : _this$componentConfig13.selectRules) || []).includes(item.id);
|
|
135
138
|
});
|
|
136
139
|
if (!rulesList.length) {
|
|
137
140
|
return Promise.resolve();
|
|
@@ -154,8 +157,8 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
154
157
|
validateTrigger: "onBlur",
|
|
155
158
|
validator: function () {
|
|
156
159
|
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
|
|
157
|
-
var _this$
|
|
158
|
-
var _resultList$, params, _yield$replaceCheck, resultList, _this$
|
|
160
|
+
var _this$componentConfig14;
|
|
161
|
+
var _resultList$, params, _yield$replaceCheck, resultList, _this$componentConfig15, _this$componentConfig16, _this$componentConfig17, messageMap;
|
|
159
162
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
160
163
|
while (1) switch (_context.prev = _context.next) {
|
|
161
164
|
case 0:
|
|
@@ -165,7 +168,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
165
168
|
}
|
|
166
169
|
return _context.abrupt("return", Promise.resolve());
|
|
167
170
|
case 2:
|
|
168
|
-
if (!((_this$
|
|
171
|
+
if (!((_this$componentConfig14 = _this.componentConfig) !== null && _this$componentConfig14 !== void 0 && _this$componentConfig14.replaceWarn)) {
|
|
169
172
|
_context.next = 11;
|
|
170
173
|
break;
|
|
171
174
|
}
|
|
@@ -192,7 +195,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
192
195
|
currFlow: "数据已存在本模版中,不能重复提交",
|
|
193
196
|
allWorkOrder: "数据已存在其他模版中,不能重复提交"
|
|
194
197
|
};
|
|
195
|
-
return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$
|
|
198
|
+
return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$componentConfig15 = (_this$componentConfig16 = _this.componentConfig) === null || _this$componentConfig16 === void 0 ? void 0 : (_this$componentConfig17 = _this$componentConfig16.repeatConfig) === null || _this$componentConfig17 === void 0 ? void 0 : _this$componentConfig17.repeatRange) !== null && _this$componentConfig15 !== void 0 ? _this$componentConfig15 : ""] || "内容已存在,不能重复提交")));
|
|
196
199
|
case 11:
|
|
197
200
|
case "end":
|
|
198
201
|
return _context.stop();
|
|
@@ -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,8 +19,9 @@ 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
|
-
getSortChildFields: (type: string, options: PickOption) => any;
|
|
24
|
+
getSortChildFields: (type: string, options: PickOption, fieldType?: string) => any;
|
|
24
25
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
25
26
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
26
27
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -60,36 +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, "
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
_defineProperty(this, "format", void 0);
|
|
64
|
+
_defineProperty(this, "getSortChildFields", function (type, options, fieldType) {
|
|
65
|
+
var _typeMap$options$type, _typeMap$options$type2;
|
|
66
|
+
var sendName = {
|
|
67
|
+
name: "发货仓名称",
|
|
68
|
+
key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.sendName),
|
|
69
|
+
dataType: "arrayObject",
|
|
70
|
+
disabled: type === 'sendId'
|
|
71
|
+
};
|
|
72
|
+
var sendId = {
|
|
73
|
+
name: "发货仓编码",
|
|
74
|
+
key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.sendId),
|
|
75
|
+
dataType: "arrayObject",
|
|
76
|
+
disabled: type === 'sendName'
|
|
77
|
+
};
|
|
78
|
+
if (fieldType === 'WDT_SEND_GOOD') {
|
|
79
|
+
sendName.options = WdtSendData.getInstance().getWdtSendData() || [];
|
|
75
80
|
}
|
|
76
|
-
|
|
77
|
-
var _typeMap$options$type3;
|
|
78
|
-
return [{
|
|
79
|
-
name: "发货仓名称",
|
|
80
|
-
key: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.sendName),
|
|
81
|
-
dataType: "string"
|
|
82
|
-
}];
|
|
83
|
-
}
|
|
84
|
-
if (type === 'sendId') {
|
|
85
|
-
var _typeMap$options$type4;
|
|
86
|
-
return [{
|
|
87
|
-
name: "发货仓编码",
|
|
88
|
-
key: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.sendId),
|
|
89
|
-
dataType: "string"
|
|
90
|
-
}];
|
|
91
|
-
}
|
|
92
|
-
return [];
|
|
81
|
+
return [sendName, sendId];
|
|
93
82
|
});
|
|
94
83
|
_defineProperty(this, "renderClient", function (record) {
|
|
95
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) {
|
|
@@ -212,9 +201,9 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
212
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);
|
|
213
202
|
this.formField = "".concat(_options.id, "_").concat((_typeMap$_options$typ2 = typeMap[_options.type]) === null || _typeMap$_options$typ2 === void 0 ? void 0 : _typeMap$_options$typ2.key);
|
|
214
203
|
this.componentConfig = _options.componentConfig;
|
|
215
|
-
this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options);
|
|
204
|
+
this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options, _options.type);
|
|
216
205
|
this.type = _options.type;
|
|
217
|
-
this.dataType = "
|
|
206
|
+
this.dataType = "arrayObject";
|
|
218
207
|
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
219
208
|
required: true,
|
|
220
209
|
validator: function validator(_, value) {
|
|
@@ -4,6 +4,12 @@ declare class JstSupply implements ComponentInterface {
|
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
|
+
sortChildField: {
|
|
8
|
+
name: string;
|
|
9
|
+
key: string;
|
|
10
|
+
dataType: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}[];
|
|
7
13
|
type: string;
|
|
8
14
|
rules: any[];
|
|
9
15
|
componentConfig: ComponentInterface["componentConfig"];
|
|
@@ -14,6 +20,7 @@ declare class JstSupply implements ComponentInterface {
|
|
|
14
20
|
children: ComponentInterface[];
|
|
15
21
|
dataType: ComponentInterface["dataType"];
|
|
16
22
|
constructor(options: PickOption);
|
|
23
|
+
getSortChildFields: (type: string, options: PickOption) => 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;
|
|
@@ -14,13 +14,15 @@ import { JstGoods } from "@kmkf-fe-packages/basic-components";
|
|
|
14
14
|
import ItemView from "../../../commonComponents/ItemView";
|
|
15
15
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import { SYMBOL } from "../../../constant";
|
|
17
|
-
var JstSupply = /*#__PURE__*/_createClass(function JstSupply(
|
|
17
|
+
var JstSupply = /*#__PURE__*/_createClass(function JstSupply(_options) {
|
|
18
18
|
var _this = this,
|
|
19
|
-
_this$componentConfig3
|
|
19
|
+
_this$componentConfig3,
|
|
20
|
+
_this$componentConfig4;
|
|
20
21
|
_classCallCheck(this, JstSupply);
|
|
21
22
|
_defineProperty(this, "name", void 0);
|
|
22
23
|
_defineProperty(this, "id", void 0);
|
|
23
24
|
_defineProperty(this, "sortField", void 0);
|
|
25
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
24
26
|
_defineProperty(this, "type", void 0);
|
|
25
27
|
_defineProperty(this, "rules", void 0);
|
|
26
28
|
_defineProperty(this, "componentConfig", void 0);
|
|
@@ -30,6 +32,19 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
|
|
|
30
32
|
_defineProperty(this, "canSort", void 0);
|
|
31
33
|
_defineProperty(this, "children", void 0);
|
|
32
34
|
_defineProperty(this, "dataType", void 0);
|
|
35
|
+
_defineProperty(this, "getSortChildFields", function (type, options) {
|
|
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
|
+
}];
|
|
47
|
+
});
|
|
33
48
|
_defineProperty(this, "renderClient", function (record) {
|
|
34
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) {
|
|
35
50
|
return !isNull(item);
|
|
@@ -119,21 +134,22 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
|
|
|
119
134
|
}
|
|
120
135
|
}];
|
|
121
136
|
});
|
|
122
|
-
this.name =
|
|
123
|
-
this.id =
|
|
124
|
-
this.sortField = "".concat(
|
|
125
|
-
this.formField = "".concat(
|
|
126
|
-
this.type =
|
|
127
|
-
this.componentConfig =
|
|
137
|
+
this.name = _options.name;
|
|
138
|
+
this.id = _options.id;
|
|
139
|
+
this.sortField = "".concat(_options.id, "_jstItemList");
|
|
140
|
+
this.formField = "".concat(_options.id, "_jstItemList");
|
|
141
|
+
this.type = _options.type;
|
|
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);
|
|
128
144
|
this.isCombinationComponent = false;
|
|
129
145
|
this.canSort = false;
|
|
130
146
|
this.children = [];
|
|
131
147
|
this.dataType = "object";
|
|
132
|
-
this.rules = (_this$
|
|
148
|
+
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
133
149
|
required: true,
|
|
134
150
|
validator: function validator(_, value) {
|
|
135
|
-
var _this$
|
|
136
|
-
var showField = (_this === null || _this === void 0 ? void 0 : (_this$
|
|
151
|
+
var _this$componentConfig5;
|
|
152
|
+
var showField = (_this === null || _this === void 0 ? void 0 : (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) || "";
|
|
137
153
|
if (!value || !value.length) {
|
|
138
154
|
return Promise.reject(new Error("请选择宝贝"));
|
|
139
155
|
}
|
|
@@ -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) {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class InterceptApiStatus implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
parentId: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
align: ALignType;
|
|
13
|
+
width: number;
|
|
14
|
+
isCombinationComponent: boolean;
|
|
15
|
+
formField: string;
|
|
16
|
+
canSort: boolean;
|
|
17
|
+
children: ComponentInterface[];
|
|
18
|
+
dataType: ComponentInterface["dataType"];
|
|
19
|
+
options: ComponentInterface["options"];
|
|
20
|
+
constructor(options: PickOption);
|
|
21
|
+
getComponentValue: (r: Record) => any;
|
|
22
|
+
renderClient: (r: any) => React.JSX.Element | null;
|
|
23
|
+
renderPc: (value: any, r: Record) => React.JSX.Element | "--";
|
|
24
|
+
renderLog: (r: Record) => React.JSX.Element | "--" | null;
|
|
25
|
+
renderExport: (value: any, r: Record) => string;
|
|
26
|
+
editRender: () => null;
|
|
27
|
+
filterConfig: (item: ColumnConfig) => {
|
|
28
|
+
searchDefaultConditions: "in";
|
|
29
|
+
type: string;
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
filterComponentType: "MultipleSelect";
|
|
33
|
+
props: {
|
|
34
|
+
options: any[];
|
|
35
|
+
};
|
|
36
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export default InterceptApiStatus;
|