@kmkf-fe-packages/services-components 1.0.10-beta.11 → 1.0.10-beta.12
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 +1 -1
- package/dist/esm/commonComponents/SelectMark/index.js +0 -9
- package/dist/esm/components/Common/index.js +3 -4
- package/dist/esm/components/FlowMarkSelect/index.js +1 -14
- package/dist/esm/components/Label/index.d.ts +2 -12
- package/dist/esm/components/Label/index.js +7 -29
- package/dist/esm/components/MsgStatus/index.js +1 -2
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +5 -12
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +0 -3
- package/dist/esm/type.d.ts +1 -7
- package/package.json +4 -4
- package/dist/esm/commonComponents/SelectMark/img/xingxing-grey.png +0 -0
- package/dist/esm/components/AfterSalesOrderId/index.d.ts +0 -35
- package/dist/esm/components/AfterSalesOrderId/index.js +0 -107
- package/dist/esm/components/KmErpSendGood/index.d.ts +0 -53
- package/dist/esm/components/KmErpSendGood/index.js +0 -213
- package/dist/esm/components/SubForm/index.d.ts +0 -33
- package/dist/esm/components/SubForm/index.js +0 -172
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "
|
|
2
|
+
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryWdtSendData";
|
|
3
3
|
declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
|
|
4
4
|
requestList?: RequestType[] | undefined;
|
|
5
5
|
repeatRequestList?: Record<string, () => Promise<any>> | undefined;
|
|
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useEffect, useState } from "react";
|
|
17
17
|
import { Skeleton, Result, Button } from "antd";
|
|
18
|
-
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData,
|
|
18
|
+
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
|
|
19
19
|
import { servers } from '@kmkf-fe-packages/kmkf-utils';
|
|
20
20
|
var Global = function Global(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
@@ -6,7 +6,6 @@ import xingYellow from "./img/xingxing-yellow.png";
|
|
|
6
6
|
import xingBlue from "./img/xingxing-blue.png";
|
|
7
7
|
import xingGreen from "./img/xingxing-green.png";
|
|
8
8
|
import xingPurple from "./img/xingxing-purple.png";
|
|
9
|
-
import xingGrey from "./img/xingxing-grey.png";
|
|
10
9
|
var workOrderMark = [{
|
|
11
10
|
label: /*#__PURE__*/React.createElement("img", {
|
|
12
11
|
src: xing,
|
|
@@ -15,14 +14,6 @@ var workOrderMark = [{
|
|
|
15
14
|
}
|
|
16
15
|
}),
|
|
17
16
|
value: "1"
|
|
18
|
-
}, {
|
|
19
|
-
label: /*#__PURE__*/React.createElement("img", {
|
|
20
|
-
src: xingGrey,
|
|
21
|
-
style: {
|
|
22
|
-
width: "16px"
|
|
23
|
-
}
|
|
24
|
-
}),
|
|
25
|
-
value: "7"
|
|
26
17
|
}, {
|
|
27
18
|
label: /*#__PURE__*/React.createElement("img", {
|
|
28
19
|
src: xingRed,
|
|
@@ -16,10 +16,10 @@ import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Ty
|
|
|
16
16
|
import React, { useState, useMemo } from "react";
|
|
17
17
|
import { ExpressData, WdtSendData } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { getAlipayBillReceipt } from "../../service/api";
|
|
19
|
-
import { CopyToClipboard } from
|
|
20
|
-
import CopyText from "../../commonComponents/CopyText";
|
|
19
|
+
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
21
20
|
import styles from "./index.module.less";
|
|
22
21
|
import defaultImg from "./img/default-img.png";
|
|
22
|
+
import CopyText from "../../commonComponents/CopyText";
|
|
23
23
|
var Paragraph = Typography.Paragraph;
|
|
24
24
|
export var getFormItem = function getFormItem(_ref) {
|
|
25
25
|
var name = _ref.name,
|
|
@@ -1057,8 +1057,7 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
1057
1057
|
ding: '钉钉',
|
|
1058
1058
|
wechat: '微信',
|
|
1059
1059
|
qq: 'QQ',
|
|
1060
|
-
qywx: '企业微信'
|
|
1061
|
-
YZDKH: '邮政大客户'
|
|
1060
|
+
qywx: '企业微信'
|
|
1062
1061
|
};
|
|
1063
1062
|
var detailContent = function detailContent(item) {
|
|
1064
1063
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -21,7 +21,6 @@ import xingYellow from "../../commonComponents/SelectMark/img/xingxing-yellow.pn
|
|
|
21
21
|
import xingBlue from "../../commonComponents/SelectMark/img/xingxing-blue.png";
|
|
22
22
|
import xingGreen from "../../commonComponents/SelectMark/img/xingxing-green.png";
|
|
23
23
|
import xingPurple from "../../commonComponents/SelectMark/img/xingxing-purple.png";
|
|
24
|
-
import xingGrey from "../../commonComponents/SelectMark/img/xingxing-grey.png";
|
|
25
24
|
var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options) {
|
|
26
25
|
var _this = this;
|
|
27
26
|
_classCallCheck(this, FlowMarkSelect);
|
|
@@ -66,8 +65,7 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
66
65
|
3: "黄色",
|
|
67
66
|
4: "蓝色",
|
|
68
67
|
5: "绿色",
|
|
69
|
-
6: "紫色"
|
|
70
|
-
7: "灰色"
|
|
68
|
+
6: "紫色"
|
|
71
69
|
};
|
|
72
70
|
var mark = _this.workOrderMark.find(function (item) {
|
|
73
71
|
return item.value === (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
@@ -113,9 +111,6 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
113
111
|
options: [{
|
|
114
112
|
label: "空白",
|
|
115
113
|
value: "1"
|
|
116
|
-
}, {
|
|
117
|
-
label: "灰色",
|
|
118
|
-
value: "7"
|
|
119
114
|
}, {
|
|
120
115
|
label: "红色",
|
|
121
116
|
value: "2"
|
|
@@ -158,14 +153,6 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
158
153
|
}
|
|
159
154
|
}),
|
|
160
155
|
value: "1"
|
|
161
|
-
}, {
|
|
162
|
-
label: /*#__PURE__*/React.createElement("img", {
|
|
163
|
-
src: xingGrey,
|
|
164
|
-
style: {
|
|
165
|
-
width: "16px"
|
|
166
|
-
}
|
|
167
|
-
}),
|
|
168
|
-
value: "7"
|
|
169
156
|
}, {
|
|
170
157
|
label: /*#__PURE__*/React.createElement("img", {
|
|
171
158
|
src: xingRed,
|
|
@@ -27,18 +27,8 @@ 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) =>
|
|
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
|
-
};
|
|
30
|
+
renderExport: (value: any, record: Record) => any;
|
|
31
|
+
filterConfig: (item: ColumnConfig) => never[];
|
|
42
32
|
formDataTransform: (v: Array<{
|
|
43
33
|
labelShowName: string;
|
|
44
34
|
}>) => string[];
|
|
@@ -8,12 +8,9 @@ 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 {
|
|
12
|
-
import { LabelData, isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
-
import intersection from "lodash/intersection";
|
|
11
|
+
import { LabelData, isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
12
|
import GetFormItem from "../GetFormItem";
|
|
15
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
16
|
-
import { SYMBOL } from "../../constant";
|
|
17
14
|
var EditRenderItem = function EditRenderItem(props) {
|
|
18
15
|
var value = props.value;
|
|
19
16
|
var tagRender = function tagRender(prop) {
|
|
@@ -93,17 +90,14 @@ var Label = /*#__PURE__*/_createClass(function Label(options) {
|
|
|
93
90
|
}) : null;
|
|
94
91
|
});
|
|
95
92
|
_defineProperty(this, "showDetail", function (value) {
|
|
96
|
-
var _Object$keys;
|
|
97
93
|
return /*#__PURE__*/React.createElement(Space, {
|
|
98
94
|
style: {
|
|
99
95
|
flexWrap: 'wrap'
|
|
100
96
|
}
|
|
101
|
-
}, Array.isArray(value) ?
|
|
102
|
-
return item.labelShowName;
|
|
103
|
-
}))) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (labelShowName) {
|
|
97
|
+
}, Array.isArray(value) ? value === null || value === void 0 ? void 0 : value.map(function (v) {
|
|
104
98
|
var _this$labelDateInstan;
|
|
105
99
|
var label = ((_this$labelDateInstan = _this.labelDateInstance.labelData) === null || _this$labelDateInstan === void 0 ? void 0 : _this$labelDateInstan.find(function (item) {
|
|
106
|
-
return item.value === labelShowName;
|
|
100
|
+
return item.value === (v === null || v === void 0 ? void 0 : v.labelShowName);
|
|
107
101
|
})) || {};
|
|
108
102
|
if (!isNull(label)) return /*#__PURE__*/React.createElement(Tag, {
|
|
109
103
|
color: label === null || label === void 0 ? void 0 : label.color
|
|
@@ -118,29 +112,13 @@ var Label = /*#__PURE__*/_createClass(function Label(options) {
|
|
|
118
112
|
return _this.renderPc(undefined, r);
|
|
119
113
|
});
|
|
120
114
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
121
|
-
var
|
|
122
|
-
return
|
|
115
|
+
var _record, _record$map;
|
|
116
|
+
return record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_label")]) === null || _record === void 0 ? void 0 : (_record$map = _record.map(function (item) {
|
|
123
117
|
return item === null || item === void 0 ? void 0 : item.labelShowName;
|
|
124
|
-
}))
|
|
118
|
+
})) === null || _record$map === void 0 ? void 0 : _record$map.join('、');
|
|
125
119
|
});
|
|
126
120
|
_defineProperty(this, "filterConfig", function (item) {
|
|
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
|
-
};
|
|
121
|
+
return [];
|
|
144
122
|
});
|
|
145
123
|
_defineProperty(this, "formDataTransform", function (v) {
|
|
146
124
|
return v === null || v === void 0 ? void 0 : v.map(function (item) {
|
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,
|
|
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 } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => AliPay | BasicCascader | CommonMultiStatus | CommonSystemOrder | FlowMarkSelect | BasicInput | Label |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => AliPay | BasicCascader | CommonMultiStatus | CommonSystemOrder | FlowMarkSelect | BasicInput | Label | StatusSelect | WdtExchange | WdtReturn | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | 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 | MsgStatus | WdtGoods | WdtReissue | CommonInput | PaymentVoucherCode;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting,
|
|
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,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -48,8 +48,6 @@ 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);
|
|
53
51
|
case "SHOP_NAME_INPUT":
|
|
54
52
|
return new ShopName(options);
|
|
55
53
|
case "TRADE_ID_INPUT":
|
|
@@ -141,8 +139,6 @@ export var factory = function factory(type, options) {
|
|
|
141
139
|
return new BsPosting(options);
|
|
142
140
|
case "BS_GOODS":
|
|
143
141
|
return new BsGoods(options);
|
|
144
|
-
case "WDT_GOODS":
|
|
145
|
-
return new WdtGoods(options);
|
|
146
142
|
case "BS_EXCHANGE_GOODS":
|
|
147
143
|
return new BsExchange(options);
|
|
148
144
|
case "WDT_EXCHANGE_GOODS":
|
|
@@ -205,18 +201,15 @@ export var factory = function factory(type, options) {
|
|
|
205
201
|
return new CommonDataTime(options);
|
|
206
202
|
case "FLOW_UPDATE_DATETIME":
|
|
207
203
|
return new CommonDataTime(options);
|
|
204
|
+
case "WDT_GOODS":
|
|
205
|
+
// 万里牛商品
|
|
206
|
+
return new WdtGoods(options);
|
|
208
207
|
case "BUSINESS_ORDER_NO":
|
|
209
208
|
return new CommonInput(options);
|
|
210
209
|
case "PAYMENT_VOUCHER_CODE":
|
|
211
210
|
return new PaymentVoucherCode(options);
|
|
212
211
|
case "LABEL":
|
|
213
212
|
return new Label(options);
|
|
214
|
-
case "KM_SEND_GOOD":
|
|
215
|
-
// 快麦ERP发货仓
|
|
216
|
-
return new KmErpSendGood(options);
|
|
217
|
-
case "AFTER_SALES_ORDER_ID":
|
|
218
|
-
// 售后单ID
|
|
219
|
-
return new AfterSalesOrderId(options);
|
|
220
213
|
default:
|
|
221
214
|
return new BasicInput(options);
|
|
222
215
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ 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";
|
|
16
15
|
export { default as CommonDataTime } from "./components/CommonDataTime";
|
|
17
16
|
export { default as TradeId } from "./components/TradeId";
|
|
18
17
|
export { default as ErpTradeId } from "./components/ErpTradeId";
|
|
@@ -81,8 +80,6 @@ export { default as WdtExchange } from "./components/WDT/WdtExchange";
|
|
|
81
80
|
export { default as CommonInput } from "./components/CommonInput";
|
|
82
81
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
83
82
|
export { default as Label } from "./components/Label";
|
|
84
|
-
export { default as KmErpSendGood } from "./components/KmErpSendGood";
|
|
85
|
-
export { default as AfterSalesOrderId } from "./components/AfterSalesOrderId";
|
|
86
83
|
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
87
84
|
export { factory } from "./factory";
|
|
88
85
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
package/dist/esm/index.js
CHANGED
|
@@ -12,7 +12,6 @@ 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";
|
|
16
15
|
export { default as CommonDataTime } from "./components/CommonDataTime";
|
|
17
16
|
export { default as TradeId } from "./components/TradeId";
|
|
18
17
|
export { default as ErpTradeId } from "./components/ErpTradeId";
|
|
@@ -81,8 +80,6 @@ export { default as WdtExchange } from "./components/WDT/WdtExchange";
|
|
|
81
80
|
export { default as CommonInput } from "./components/CommonInput";
|
|
82
81
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
83
82
|
export { default as Label } from "./components/Label";
|
|
84
|
-
export { default as KmErpSendGood } from "./components/KmErpSendGood";
|
|
85
|
-
export { default as AfterSalesOrderId } from "./components/AfterSalesOrderId";
|
|
86
83
|
// TODO: ERP 打款工单使用
|
|
87
84
|
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
88
85
|
export { factory } from "./factory";
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -169,17 +169,11 @@ export interface ComponentInterface {
|
|
|
169
169
|
rulesOptions?: Array<any>;
|
|
170
170
|
selectRules?: Array<string>;
|
|
171
171
|
logistics?: string;
|
|
172
|
+
belongType?: string;
|
|
172
173
|
repeatConfig?: {
|
|
173
174
|
repeatRange: string;
|
|
174
175
|
repeatComponents: any[];
|
|
175
176
|
};
|
|
176
|
-
subConfig?: {
|
|
177
|
-
config: any;
|
|
178
|
-
flowStatus: string[];
|
|
179
|
-
flowTemplateKey: any;
|
|
180
|
-
nodeId: string;
|
|
181
|
-
workOrderTemplateId: string;
|
|
182
|
-
};
|
|
183
177
|
};
|
|
184
178
|
effects?: {
|
|
185
179
|
queryWorkOrderDetail?: (r: Record) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.0.10-beta.
|
|
3
|
+
"version": "1.0.10-beta.12",
|
|
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.0.10-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.0.10-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.0.10-beta.12",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.0.10-beta.12"
|
|
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": "6c73932001a3b2408235c2d8cabb6d26529a31bd",
|
|
42
42
|
"gitHooks": {
|
|
43
43
|
"pre-commit": "lint-staged"
|
|
44
44
|
}
|
|
Binary file
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare class AfterSalesOrderId 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
|
-
suffixKey: string;
|
|
18
|
-
constructor(options: PickOption);
|
|
19
|
-
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
20
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
|
-
getComponentValue: (r: Record) => any;
|
|
22
|
-
renderExport: (value: any, record: Record) => any;
|
|
23
|
-
renderClient: (record: Record) => React.JSX.Element | null;
|
|
24
|
-
editRender: (p: any) => React.JSX.Element;
|
|
25
|
-
filterConfig: (item: ColumnConfig) => {
|
|
26
|
-
searchDefaultConditions: "in";
|
|
27
|
-
type: string;
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
filterComponentType: "SelectInput";
|
|
31
|
-
filterFn: (value: string) => (i: Record) => boolean;
|
|
32
|
-
formatFilterValue: (value: any) => any;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export default AfterSalesOrderId;
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
-
import React from "react";
|
|
10
|
-
import { ApaasInput } from "@kmkf-fe-packages/basic-components";
|
|
11
|
-
import GetFormItem from "../GetFormItem";
|
|
12
|
-
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
-
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
-
import { SYMBOL, batchInput } from "../../constant";
|
|
15
|
-
var AfterSalesOrderId = /*#__PURE__*/_createClass(function AfterSalesOrderId(options) {
|
|
16
|
-
var _this = this;
|
|
17
|
-
_classCallCheck(this, AfterSalesOrderId);
|
|
18
|
-
_defineProperty(this, "name", void 0);
|
|
19
|
-
_defineProperty(this, "id", void 0);
|
|
20
|
-
_defineProperty(this, "sortField", void 0);
|
|
21
|
-
_defineProperty(this, "type", void 0);
|
|
22
|
-
_defineProperty(this, "rules", void 0);
|
|
23
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
24
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
-
_defineProperty(this, "formField", void 0);
|
|
26
|
-
_defineProperty(this, "canSort", void 0);
|
|
27
|
-
_defineProperty(this, "children", void 0);
|
|
28
|
-
_defineProperty(this, "dataType", void 0);
|
|
29
|
-
_defineProperty(this, "templateId", void 0);
|
|
30
|
-
_defineProperty(this, "workOrderUniqueKey", void 0);
|
|
31
|
-
_defineProperty(this, "suffixKey", void 0);
|
|
32
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
33
|
-
var _record;
|
|
34
|
-
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.suffixKey)]) !== null && _record !== void 0 ? _record : "--");
|
|
35
|
-
});
|
|
36
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
37
|
-
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.suffixKey)])) return null;
|
|
38
|
-
return _this.renderPc(undefined, r);
|
|
39
|
-
});
|
|
40
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
41
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.suffixKey)];
|
|
42
|
-
});
|
|
43
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
44
|
-
var _record2;
|
|
45
|
-
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.suffixKey)]) !== null && _record2 !== void 0 ? _record2 : "--";
|
|
46
|
-
});
|
|
47
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
48
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
49
|
-
id: _this.id,
|
|
50
|
-
label: _this.name,
|
|
51
|
-
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
52
|
-
}) : null;
|
|
53
|
-
});
|
|
54
|
-
_defineProperty(this, "editRender", function (p) {
|
|
55
|
-
var _this$componentConfig, _this$componentConfig2;
|
|
56
|
-
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
57
|
-
title: _this.name,
|
|
58
|
-
name: _this.id,
|
|
59
|
-
rules: _this.rules,
|
|
60
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
61
|
-
display: p === null || p === void 0 ? void 0 : p.display,
|
|
62
|
-
validateTrigger: ["onBlur", "onChange"],
|
|
63
|
-
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
64
|
-
component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
|
|
65
|
-
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
|
|
66
|
-
}))
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
_defineProperty(this, "filterConfig", function (item) {
|
|
70
|
-
return {
|
|
71
|
-
searchDefaultConditions: SYMBOL.in,
|
|
72
|
-
type: item.type,
|
|
73
|
-
id: "".concat(item.id, "_").concat(_this.suffixKey),
|
|
74
|
-
// 过滤组件id
|
|
75
|
-
name: item.name,
|
|
76
|
-
// 过滤组件名称
|
|
77
|
-
filterComponentType: "SelectInput",
|
|
78
|
-
filterFn: function filterFn(value) {
|
|
79
|
-
return function (i) {
|
|
80
|
-
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, _this.suffixKey)).includes(value);
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
formatFilterValue: function formatFilterValue(value) {
|
|
84
|
-
if (value.type === "keywords") {
|
|
85
|
-
return batchInput(value.keywords);
|
|
86
|
-
} else {
|
|
87
|
-
return value;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
});
|
|
92
|
-
this.name = options.name;
|
|
93
|
-
this.id = options.id;
|
|
94
|
-
this.suffixKey = 'afterSalesOrderId';
|
|
95
|
-
this.sortField = "".concat(options.id, "_").concat(this.suffixKey);
|
|
96
|
-
this.formField = "".concat(options.id, "_").concat(this.suffixKey);
|
|
97
|
-
this.type = options.type;
|
|
98
|
-
this.templateId = options.templateId;
|
|
99
|
-
this.componentConfig = options.componentConfig;
|
|
100
|
-
this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
|
|
101
|
-
this.rules = [];
|
|
102
|
-
this.isCombinationComponent = false;
|
|
103
|
-
this.canSort = true;
|
|
104
|
-
this.children = [];
|
|
105
|
-
this.dataType = "string";
|
|
106
|
-
});
|
|
107
|
-
export default AfterSalesOrderId;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare class JstSendGood implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
sortChildField: {
|
|
8
|
-
name: string;
|
|
9
|
-
key: string;
|
|
10
|
-
dataType: string;
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}[];
|
|
13
|
-
type: string;
|
|
14
|
-
rules: any[];
|
|
15
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
16
|
-
align: ALignType;
|
|
17
|
-
isCombinationComponent: boolean;
|
|
18
|
-
formField: string;
|
|
19
|
-
canSort: boolean;
|
|
20
|
-
children: ComponentInterface[];
|
|
21
|
-
dataType: ComponentInterface["dataType"];
|
|
22
|
-
suffixKey: string;
|
|
23
|
-
suffixSendId: string;
|
|
24
|
-
suffixSendName: string;
|
|
25
|
-
constructor(options: PickOption);
|
|
26
|
-
getSortChildFields: (type: string, options: PickOption) => any;
|
|
27
|
-
renderClient: (record: Record) => React.JSX.Element | null;
|
|
28
|
-
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
29
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
30
|
-
getComponentValue: (r: Record) => any;
|
|
31
|
-
renderExport: (value: any, record: any) => any;
|
|
32
|
-
editRender: (p: any) => React.JSX.Element;
|
|
33
|
-
filterConfig: (item: ColumnConfig) => ({
|
|
34
|
-
searchDefaultConditions: "in";
|
|
35
|
-
type: string;
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
filterComponentType: "MultipleSelect";
|
|
39
|
-
props: {
|
|
40
|
-
options: any[];
|
|
41
|
-
};
|
|
42
|
-
filterFn: (value: string) => (i: Record) => any;
|
|
43
|
-
} | {
|
|
44
|
-
searchDefaultConditions: "like";
|
|
45
|
-
type: string;
|
|
46
|
-
id: string;
|
|
47
|
-
name: string;
|
|
48
|
-
filterComponentType: "Input";
|
|
49
|
-
filterFn: (value: string) => (i: Record) => any;
|
|
50
|
-
props?: undefined;
|
|
51
|
-
})[];
|
|
52
|
-
}
|
|
53
|
-
export default JstSendGood;
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
-
import React from "react";
|
|
10
|
-
import some from "lodash/some";
|
|
11
|
-
import GetFormItem from "../GetFormItem";
|
|
12
|
-
import { JstGoodImage } from "../Common";
|
|
13
|
-
import { JstGoods } from "@kmkf-fe-packages/basic-components";
|
|
14
|
-
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull, filterFn as _filterFn, WdtSendData } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
-
import { SYMBOL } from "../../constant";
|
|
17
|
-
var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
18
|
-
var _this = this,
|
|
19
|
-
_this$componentConfig,
|
|
20
|
-
_this$componentConfig2;
|
|
21
|
-
_classCallCheck(this, JstSendGood);
|
|
22
|
-
_defineProperty(this, "name", void 0);
|
|
23
|
-
_defineProperty(this, "id", void 0);
|
|
24
|
-
_defineProperty(this, "sortField", void 0);
|
|
25
|
-
_defineProperty(this, "sortChildField", void 0);
|
|
26
|
-
_defineProperty(this, "type", void 0);
|
|
27
|
-
_defineProperty(this, "rules", void 0);
|
|
28
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
-
_defineProperty(this, "align", void 0);
|
|
30
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
31
|
-
_defineProperty(this, "formField", void 0);
|
|
32
|
-
_defineProperty(this, "canSort", void 0);
|
|
33
|
-
_defineProperty(this, "children", void 0);
|
|
34
|
-
_defineProperty(this, "dataType", void 0);
|
|
35
|
-
_defineProperty(this, "suffixKey", void 0);
|
|
36
|
-
_defineProperty(this, "suffixSendId", void 0);
|
|
37
|
-
_defineProperty(this, "suffixSendName", void 0);
|
|
38
|
-
_defineProperty(this, "getSortChildFields", function (type, options) {
|
|
39
|
-
if (type === 'all') {
|
|
40
|
-
return [{
|
|
41
|
-
name: "发货仓名称",
|
|
42
|
-
key: "".concat(options.id, "_").concat(_this.suffixSendName),
|
|
43
|
-
dataType: "string"
|
|
44
|
-
}, {
|
|
45
|
-
name: "发货仓编码",
|
|
46
|
-
key: "".concat(options.id, "_").concat(_this.suffixSendId),
|
|
47
|
-
dataType: "string"
|
|
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 [];
|
|
65
|
-
});
|
|
66
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
67
|
-
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) {
|
|
68
|
-
return !isNull(item);
|
|
69
|
-
}) : false;
|
|
70
|
-
return isShow ? /*#__PURE__*/React.createElement(ItemView, {
|
|
71
|
-
id: _this.id,
|
|
72
|
-
label: _this.name,
|
|
73
|
-
value: /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
74
|
-
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
75
|
-
type: 3,
|
|
76
|
-
platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
|
|
77
|
-
})
|
|
78
|
-
}) : null;
|
|
79
|
-
});
|
|
80
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
81
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.suffixKey)];
|
|
82
|
-
//兼容多个商品
|
|
83
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
84
|
-
onClick: function onClick(e) {
|
|
85
|
-
return e.stopPropagation();
|
|
86
|
-
}
|
|
87
|
-
}, /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
88
|
-
list: list,
|
|
89
|
-
type: 3,
|
|
90
|
-
platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
|
|
91
|
-
}));
|
|
92
|
-
});
|
|
93
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
94
|
-
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.suffixKey)];
|
|
95
|
-
if (isNull(list)) return null;
|
|
96
|
-
return _this.renderPc(undefined, r);
|
|
97
|
-
});
|
|
98
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
99
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.suffixKey)];
|
|
100
|
-
});
|
|
101
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
102
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.suffixKey)];
|
|
103
|
-
return (list || []).map(function (item) {
|
|
104
|
-
return [item === null || item === void 0 ? void 0 : item.sendId, _this.type === 'WDT_SEND_GOOD' ? WdtSendData.getInstance().getWdtSendNameByCode(item === null || item === void 0 ? void 0 : item.sendName) : item === null || item === void 0 ? void 0 : item.sendName].join("/");
|
|
105
|
-
}).join(",");
|
|
106
|
-
});
|
|
107
|
-
_defineProperty(this, "editRender", function (p) {
|
|
108
|
-
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
109
|
-
title: _this.name,
|
|
110
|
-
name: _this.id,
|
|
111
|
-
rules: _this.rules,
|
|
112
|
-
required: false,
|
|
113
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
114
|
-
display: p === null || p === void 0 ? void 0 : p.display,
|
|
115
|
-
component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
|
|
116
|
-
type: 3,
|
|
117
|
-
platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
|
|
118
|
-
}))
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
_defineProperty(this, "filterConfig", function (item) {
|
|
122
|
-
return [_this.type === 'WDT_SEND_GOOD' ? {
|
|
123
|
-
searchDefaultConditions: SYMBOL.in,
|
|
124
|
-
type: item.type,
|
|
125
|
-
id: "".concat(item.id, "_").concat(_this.suffixSendName),
|
|
126
|
-
name: "".concat(_this.name, "\u540D\u79F0"),
|
|
127
|
-
filterComponentType: "MultipleSelect",
|
|
128
|
-
props: {
|
|
129
|
-
options: WdtSendData.getInstance().getWdtSendData() || []
|
|
130
|
-
},
|
|
131
|
-
filterFn: function filterFn(value) {
|
|
132
|
-
return function (i) {
|
|
133
|
-
var _ref;
|
|
134
|
-
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "sendName").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
|
|
135
|
-
var _String;
|
|
136
|
-
var sendName = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
|
|
137
|
-
return sendName;
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
} : {
|
|
142
|
-
searchDefaultConditions: SYMBOL.like,
|
|
143
|
-
type: item.type,
|
|
144
|
-
id: "".concat(item.id, "_").concat(_this.suffixSendName),
|
|
145
|
-
name: "".concat(_this.name, "\u540D\u79F0"),
|
|
146
|
-
filterComponentType: "Input",
|
|
147
|
-
filterFn: function filterFn(value) {
|
|
148
|
-
return function (i) {
|
|
149
|
-
var _ref2;
|
|
150
|
-
return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, _this.suffixKey) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
|
|
151
|
-
var _String2;
|
|
152
|
-
var name = item !== null && item !== void 0 && item.sendName ? (_String2 = String(item === null || item === void 0 ? void 0 : item.sendName)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
|
|
153
|
-
return name;
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
}, {
|
|
158
|
-
searchDefaultConditions: SYMBOL.like,
|
|
159
|
-
type: item.type,
|
|
160
|
-
id: "".concat(item.id, "_").concat(_this.suffixSendId),
|
|
161
|
-
name: "".concat(_this.name, "\u7F16\u7801"),
|
|
162
|
-
filterComponentType: "Input",
|
|
163
|
-
filterFn: function filterFn(value) {
|
|
164
|
-
return function (i) {
|
|
165
|
-
var _ref3;
|
|
166
|
-
return (_ref3 = _filterFn.filterTableListItemColumnValue(i, item.id, _this.suffixKey) || []) === null || _ref3 === void 0 ? void 0 : _ref3.some(function (item) {
|
|
167
|
-
var _String3;
|
|
168
|
-
var id = item !== null && item !== void 0 && item.sendId ? (_String3 = String(item === null || item === void 0 ? void 0 : item.sendId)) === null || _String3 === void 0 ? void 0 : _String3.includes(value) : false;
|
|
169
|
-
return id;
|
|
170
|
-
});
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
}];
|
|
174
|
-
});
|
|
175
|
-
this.name = _options.name;
|
|
176
|
-
this.id = _options.id;
|
|
177
|
-
this.suffixKey = 'kmSendGood';
|
|
178
|
-
this.suffixSendId = 'kmSendId';
|
|
179
|
-
this.suffixSendName = 'kmSendName';
|
|
180
|
-
this.sortField = "".concat(_options.id, "_").concat(this.suffixKey);
|
|
181
|
-
this.formField = "".concat(_options.id, "_").concat(this.suffixKey);
|
|
182
|
-
this.componentConfig = _options.componentConfig;
|
|
183
|
-
this.sortChildField = this.getSortChildFields(((_this$componentConfig = this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showField) || '', _options);
|
|
184
|
-
this.type = _options.type;
|
|
185
|
-
this.dataType = "object";
|
|
186
|
-
this.rules = (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
|
|
187
|
-
required: true,
|
|
188
|
-
validator: function validator(_, value) {
|
|
189
|
-
if (!value || !value.length) {
|
|
190
|
-
return Promise.reject(new Error("请选择宝贝"));
|
|
191
|
-
}
|
|
192
|
-
var hasNo = (value || []).some(function (item) {
|
|
193
|
-
var _this$componentConfig3, _this$componentConfig4;
|
|
194
|
-
if (["sendName"].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "")) {
|
|
195
|
-
return item.sendName;
|
|
196
|
-
} else if (["sendId"].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) || "")) {
|
|
197
|
-
return item.sendId;
|
|
198
|
-
} else {
|
|
199
|
-
return item.sendId && item.sendName;
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
if (!hasNo) {
|
|
203
|
-
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684\u53D1\u8D27\u4ED3\u4FE1\u606F"));
|
|
204
|
-
}
|
|
205
|
-
return Promise.resolve();
|
|
206
|
-
}
|
|
207
|
-
}] : [];
|
|
208
|
-
this.align = "left";
|
|
209
|
-
this.isCombinationComponent = false;
|
|
210
|
-
this.canSort = false;
|
|
211
|
-
this.children = [];
|
|
212
|
-
});
|
|
213
|
-
export default JstSendGood;
|
|
@@ -1,33 +0,0 @@
|
|
|
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;
|
|
@@ -1,172 +0,0 @@
|
|
|
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 GetFormItem from "../GetFormItem";
|
|
22
|
-
import ItemView from "../../commonComponents/ItemView";
|
|
23
|
-
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
24
|
-
import { SYMBOL } from "../../constant";
|
|
25
|
-
var WidgetMap = {
|
|
26
|
-
INPUT: Input,
|
|
27
|
-
TEXTAREA: TextArea
|
|
28
|
-
};
|
|
29
|
-
var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
30
|
-
var _this = this,
|
|
31
|
-
_this$componentConfig5,
|
|
32
|
-
_this$componentConfig9,
|
|
33
|
-
_this$componentConfig10;
|
|
34
|
-
_classCallCheck(this, SubForm);
|
|
35
|
-
_defineProperty(this, "name", void 0);
|
|
36
|
-
_defineProperty(this, "id", void 0);
|
|
37
|
-
_defineProperty(this, "sortField", void 0);
|
|
38
|
-
_defineProperty(this, "type", void 0);
|
|
39
|
-
_defineProperty(this, "rules", void 0);
|
|
40
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
41
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
42
|
-
_defineProperty(this, "formField", void 0);
|
|
43
|
-
_defineProperty(this, "canSort", void 0);
|
|
44
|
-
_defineProperty(this, "children", void 0);
|
|
45
|
-
_defineProperty(this, "dataType", void 0);
|
|
46
|
-
_defineProperty(this, "templateId", void 0);
|
|
47
|
-
_defineProperty(this, "workOrderUniqueKey", void 0);
|
|
48
|
-
_defineProperty(this, "renderTabel", function (list) {
|
|
49
|
-
var _ref, _ref$filter, _this$componentConfig, _this$componentConfig2;
|
|
50
|
-
var columns = [{
|
|
51
|
-
dataIndex: "",
|
|
52
|
-
title: "序号",
|
|
53
|
-
align: "center",
|
|
54
|
-
ellipsis: true,
|
|
55
|
-
width: 50,
|
|
56
|
-
render: function render(val, record, index) {
|
|
57
|
-
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
58
|
-
}
|
|
59
|
-
}].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) {
|
|
60
|
-
return t.isShow;
|
|
61
|
-
})) === null || _ref$filter === void 0 ? void 0 : _ref$filter.map(function (item) {
|
|
62
|
-
return {
|
|
63
|
-
dataIndex: item.key,
|
|
64
|
-
title: item.name,
|
|
65
|
-
align: "center",
|
|
66
|
-
ellipsis: true,
|
|
67
|
-
width: 200,
|
|
68
|
-
render: function render(val) {
|
|
69
|
-
return /*#__PURE__*/React.createElement("span", null, val);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
})) || []));
|
|
73
|
-
return /*#__PURE__*/React.createElement(Table, {
|
|
74
|
-
columns: columns,
|
|
75
|
-
dataSource: list,
|
|
76
|
-
rowKey: "uuid",
|
|
77
|
-
size: "small",
|
|
78
|
-
pagination: false,
|
|
79
|
-
scroll: {
|
|
80
|
-
x: "100%"
|
|
81
|
-
},
|
|
82
|
-
locale: {
|
|
83
|
-
emptyText: "暂无数据"
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
_defineProperty(this, "renderPc", function () {
|
|
88
|
-
return null;
|
|
89
|
-
});
|
|
90
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
91
|
-
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")])) return null;
|
|
92
|
-
return _this.renderTabel(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")]);
|
|
93
|
-
});
|
|
94
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
95
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_productList")];
|
|
96
|
-
});
|
|
97
|
-
_defineProperty(this, "renderExport", function () {
|
|
98
|
-
return null;
|
|
99
|
-
});
|
|
100
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
101
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
102
|
-
id: _this.id,
|
|
103
|
-
label: _this.name,
|
|
104
|
-
value: _this.renderTabel(record === null || record === void 0 ? void 0 : record["".concat(_this.id)])
|
|
105
|
-
}) : null;
|
|
106
|
-
});
|
|
107
|
-
_defineProperty(this, "editRender", function (p) {
|
|
108
|
-
var _this$componentConfig3, _this$componentConfig4;
|
|
109
|
-
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
110
|
-
title: _this.name,
|
|
111
|
-
name: _this.id,
|
|
112
|
-
rules: _this.rules,
|
|
113
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
114
|
-
display: p === null || p === void 0 ? void 0 : p.display,
|
|
115
|
-
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,
|
|
116
|
-
component: /*#__PURE__*/React.createElement(SubFormComponent, _this.componentConfig)
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
_defineProperty(this, "filterConfig", function (item) {
|
|
120
|
-
return {
|
|
121
|
-
searchDefaultConditions: SYMBOL.in,
|
|
122
|
-
type: item.type,
|
|
123
|
-
id: "".concat(item.id, "_productList"),
|
|
124
|
-
// 过滤组件id
|
|
125
|
-
name: item.name,
|
|
126
|
-
// 过滤组件名称
|
|
127
|
-
filterComponentType: "Input"
|
|
128
|
-
};
|
|
129
|
-
});
|
|
130
|
-
this.name = options.name;
|
|
131
|
-
this.id = options.id;
|
|
132
|
-
this.sortField = "".concat(options.id, "_productList");
|
|
133
|
-
this.formField = "".concat(options.id, "_productList");
|
|
134
|
-
this.type = options.type;
|
|
135
|
-
this.templateId = options.templateId;
|
|
136
|
-
this.componentConfig = options.componentConfig;
|
|
137
|
-
this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
|
|
138
|
-
this.rules = [{
|
|
139
|
-
required: (_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.required,
|
|
140
|
-
validator: function validator(_, value) {
|
|
141
|
-
var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8;
|
|
142
|
-
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) {
|
|
143
|
-
if (next.isRequired && next.isShow && !next.isEdit) {
|
|
144
|
-
prv[next.key] = "".concat(next.name, "\u4E0D\u80FD\u4E3A\u7A7A");
|
|
145
|
-
}
|
|
146
|
-
return prv;
|
|
147
|
-
}, {});
|
|
148
|
-
var msg = (value || []).reduce(function (prv, next) {
|
|
149
|
-
Object.keys(next).forEach(function (key) {
|
|
150
|
-
if (result[key] && !next[key]) {
|
|
151
|
-
prv = result[key];
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
return prv;
|
|
155
|
-
}, "");
|
|
156
|
-
if (msg) {
|
|
157
|
-
return Promise.reject(new Error(msg));
|
|
158
|
-
}
|
|
159
|
-
return Promise.resolve();
|
|
160
|
-
}
|
|
161
|
-
}];
|
|
162
|
-
this.isCombinationComponent = true;
|
|
163
|
-
this.canSort = false;
|
|
164
|
-
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) {
|
|
165
|
-
return new WidgetMap[item.workOrderComponentType](_objectSpread(_objectSpread({}, options), {}, {
|
|
166
|
-
name: item.name,
|
|
167
|
-
id: item.key
|
|
168
|
-
}));
|
|
169
|
-
});
|
|
170
|
-
this.dataType = "object";
|
|
171
|
-
});
|
|
172
|
-
export default SubForm;
|