@kmkf-fe-packages/services-components 2.0.0-rc.7 → 2.0.0
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/CopyText/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +5 -2
- package/dist/esm/components/BS/BsGoods/index.js +1 -1
- package/dist/esm/components/BS/BsLogistics/index.js +8 -1
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +5 -5
- package/dist/esm/components/BS/BsSystemOrder/index.js +12 -147
- package/dist/esm/components/BS/common/BsHeaderChild.d.ts +6 -4
- package/dist/esm/components/BS/common/BsHeaderChild.js +20 -9
- package/dist/esm/components/BS/common/BsHeaderGood.d.ts +1 -0
- package/dist/esm/components/BS/common/BsHeaderGood.js +139 -103
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
- package/dist/esm/components/BS/common/BsMemo.js +19 -18
- package/dist/esm/components/BS/common/BsType.d.ts +4 -4
- package/dist/esm/components/BS/common/BsType.js +17 -16
- package/dist/esm/components/BS/common/SystemOrderNo.js +2 -1
- package/dist/esm/components/BS/common/expressCode.js +4 -1
- package/dist/esm/components/BS/common/expressCompany.js +3 -0
- package/dist/esm/components/BsE3/BsGoods/index.js +1 -1
- package/dist/esm/components/BsE3/BsReissueE3/index.js +1 -1
- package/dist/esm/components/Common/constants/bs.d.ts +3 -0
- package/dist/esm/components/Common/constants/bs.js +90 -0
- package/dist/esm/components/Common/constants/bs_e3.d.ts +3 -0
- package/dist/esm/components/Common/constants/bs_e3.js +154 -0
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.d.ts +5 -0
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +26 -0
- package/dist/esm/components/Common/constants/defaultColumns.d.ts +3 -0
- package/dist/esm/components/Common/constants/defaultColumns.js +76 -0
- package/dist/esm/components/Common/constants/gy.d.ts +3 -0
- package/dist/esm/components/Common/constants/gy.js +153 -0
- package/dist/esm/components/Common/constants/system.d.ts +3 -0
- package/dist/esm/components/Common/constants/system.js +58 -0
- package/dist/esm/components/Common/constants/wdt.d.ts +3 -0
- package/dist/esm/components/Common/constants/wdt.js +280 -0
- package/dist/esm/components/Common/index.d.ts +13 -5
- package/dist/esm/components/Common/index.js +221 -912
- package/dist/esm/components/CommonHeaderGood/index.d.ts +1 -0
- package/dist/esm/components/CommonHeaderGood/index.js +322 -93
- package/dist/esm/components/CommonMultiStatus/index.d.ts +4 -4
- package/dist/esm/components/CommonMultiStatus/index.js +78 -74
- package/dist/esm/components/CommonSystemOrder/index.d.ts +4 -4
- package/dist/esm/components/CommonSystemOrder/index.js +25 -25
- package/dist/esm/components/EItemEnCode/index.d.ts +3 -1
- package/dist/esm/components/EItemEnCode/index.js +26 -29
- package/dist/esm/components/GY/GyGoods/index.d.ts +33 -0
- package/dist/esm/components/GY/GyGoods/index.js +123 -0
- package/dist/esm/components/GY/GyReissue/index.d.ts +58 -0
- package/dist/esm/components/GY/GyReissue/index.js +188 -0
- package/dist/esm/components/JST/JstSendGood/index.js +32 -16
- package/dist/esm/components/KmErpSendGood/index.js +11 -11
- package/dist/esm/components/MsgStatus/index.d.ts +5 -5
- package/dist/esm/components/MsgStatus/index.js +39 -48
- package/dist/esm/components/PostIng/index.js +3 -2
- package/dist/esm/components/ReceiverAddress/index.js +74 -8
- package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.d.ts +12 -3
- package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.js +36 -13
- package/dist/esm/components/StatusSelect/index.d.ts +1 -1
- package/dist/esm/components/StatusSelect/index.js +1 -2
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +10 -4
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/service/api.d.ts +3 -0
- package/dist/esm/service/api.js +59 -38
- package/dist/esm/type.d.ts +8 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryBsE3LogisticsCompany" | "querySendData";
|
|
2
|
+
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryGyAddressData" | "queryBsE3LogisticsCompany" | "querySendData" | "queryJSTLogisticsCompany" | "queryWLNLogisticsCompany";
|
|
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, Button, Alert, Space } from "antd";
|
|
18
|
-
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryBsE3LogisticsCompany, querySendData } from "../../service/api";
|
|
18
|
+
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryBsE3LogisticsCompany, querySendData, queryJSTLogisticsCompany, queryWLNLogisticsCompany } 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,
|
|
@@ -42,9 +42,12 @@ var Global = function Global(_ref) {
|
|
|
42
42
|
queryAllLogisticsCompany: queryAllLogisticsCompany,
|
|
43
43
|
queryLabel: queryLabel,
|
|
44
44
|
queryWdtAddressData: servers.queryWdtAddressData,
|
|
45
|
+
queryGyAddressData: servers.queryGyAddressData,
|
|
45
46
|
queryWdtLogisticsCompany: queryWdtLogisticsCompany,
|
|
46
47
|
queryBsE3LogisticsCompany: queryBsE3LogisticsCompany,
|
|
47
|
-
querySendData: querySendData
|
|
48
|
+
querySendData: querySendData,
|
|
49
|
+
queryJSTLogisticsCompany: queryJSTLogisticsCompany,
|
|
50
|
+
queryWLNLogisticsCompany: queryWLNLogisticsCompany
|
|
48
51
|
};
|
|
49
52
|
mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
|
|
50
53
|
promises = [];
|
|
@@ -72,7 +72,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
72
72
|
required: false,
|
|
73
73
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
74
74
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
75
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
75
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
76
76
|
component: /*#__PURE__*/React.createElement(Goods, _extends({
|
|
77
77
|
type: _this.type
|
|
78
78
|
}, _this.componentConfig, {
|
|
@@ -38,7 +38,7 @@ var typeMap = {
|
|
|
38
38
|
name: "万里牛",
|
|
39
39
|
company: "wlnLogisticsCompany",
|
|
40
40
|
code: "wlnLogisticsCode",
|
|
41
|
-
platformType: "
|
|
41
|
+
platformType: "wln"
|
|
42
42
|
},
|
|
43
43
|
WDT_LOGISTICS: {
|
|
44
44
|
key: "wdtLogisticsList",
|
|
@@ -46,6 +46,13 @@ var typeMap = {
|
|
|
46
46
|
company: "wdtLogisticsCompany",
|
|
47
47
|
code: "wdtLogisticsCode",
|
|
48
48
|
platformType: "wdt"
|
|
49
|
+
},
|
|
50
|
+
JST_LOGISTICS: {
|
|
51
|
+
key: "jstItemList",
|
|
52
|
+
name: "聚水潭",
|
|
53
|
+
company: "logisticsCompany",
|
|
54
|
+
code: "logisticsCode",
|
|
55
|
+
platformType: 'jst'
|
|
49
56
|
}
|
|
50
57
|
};
|
|
51
58
|
var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class BsSystemOrder implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
10
|
-
effects: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
|
-
dataType: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
15
|
children: ComponentInterface[];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -8,157 +8,21 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
8
|
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; }
|
|
9
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
10
|
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); }
|
|
11
|
-
import React from
|
|
11
|
+
import React from "react";
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import ItemView from "../../../commonComponents/ItemView";
|
|
14
|
-
import { isNull,
|
|
15
|
-
import { BsSystemOrder as SystemOrder } from
|
|
14
|
+
import { isNull, KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
|
+
import { BsSystemOrder as SystemOrder } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import { BsSystemOrderTable } from "../../Common";
|
|
17
17
|
import { BsHeaderChild } from "../common/index";
|
|
18
18
|
import { SYMBOL, batchInput } from "../../../constant";
|
|
19
19
|
var typeMap = {
|
|
20
|
-
BS_SYSTEM_ORDER:
|
|
21
|
-
key: 'bsSystemShowOrder',
|
|
22
|
-
name: '百胜',
|
|
23
|
-
selectId: 'bsSystemSelectIds',
|
|
24
|
-
columns: [{
|
|
25
|
-
title: "单据类型",
|
|
26
|
-
dataIndex: "billType",
|
|
27
|
-
width: 150
|
|
28
|
-
}, {
|
|
29
|
-
title: "系统订单号",
|
|
30
|
-
dataIndex: "billNo",
|
|
31
|
-
width: 150
|
|
32
|
-
}, {
|
|
33
|
-
title: "标签",
|
|
34
|
-
dataIndex: "billTag",
|
|
35
|
-
width: 150
|
|
36
|
-
}, {
|
|
37
|
-
title: '主播名称',
|
|
38
|
-
dataIndex: 'authorName',
|
|
39
|
-
width: 150
|
|
40
|
-
}, {
|
|
41
|
-
title: '主播ID',
|
|
42
|
-
dataIndex: 'authorId',
|
|
43
|
-
width: 150
|
|
44
|
-
}
|
|
45
|
-
// {
|
|
46
|
-
// title: '直播活动',
|
|
47
|
-
// dataIndex: 'liveActivites',
|
|
48
|
-
// width: 150,
|
|
49
|
-
// },
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
|
|
20
|
+
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG,
|
|
53
21
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG,
|
|
54
|
-
WLN_SYSTEM_ORDER:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
columns: [{
|
|
59
|
-
title: "订单类型",
|
|
60
|
-
dataIndex: "billType",
|
|
61
|
-
width: 150
|
|
62
|
-
}, {
|
|
63
|
-
title: "系统订单号",
|
|
64
|
-
dataIndex: "billNo",
|
|
65
|
-
width: 150
|
|
66
|
-
}, {
|
|
67
|
-
title: "标记",
|
|
68
|
-
dataIndex: "billTag",
|
|
69
|
-
width: 150
|
|
70
|
-
}]
|
|
71
|
-
},
|
|
72
|
-
WDT_SYSTEM_ORDER: {
|
|
73
|
-
key: "wdtSystemShowOrder",
|
|
74
|
-
name: "旺店通",
|
|
75
|
-
selectId: "wdtSystemSelectIds",
|
|
76
|
-
columns: [{
|
|
77
|
-
title: "订单类型",
|
|
78
|
-
dataIndex: "billType",
|
|
79
|
-
width: 150
|
|
80
|
-
}, {
|
|
81
|
-
title: "系统订单号",
|
|
82
|
-
dataIndex: "billNo",
|
|
83
|
-
width: 150
|
|
84
|
-
}, {
|
|
85
|
-
title: "订单标签",
|
|
86
|
-
dataIndex: "billTag",
|
|
87
|
-
width: 150
|
|
88
|
-
}]
|
|
89
|
-
},
|
|
90
|
-
BS_E3_SYSTEM_ORDER: {
|
|
91
|
-
key: "bsE3SystemShowOrder",
|
|
92
|
-
name: "百胜",
|
|
93
|
-
selectId: "bsE3SystemSelectIds",
|
|
94
|
-
columns: [{
|
|
95
|
-
title: "系统订单号",
|
|
96
|
-
dataIndex: "orderSn",
|
|
97
|
-
width: 150,
|
|
98
|
-
ellipsis: true
|
|
99
|
-
}, {
|
|
100
|
-
title: "订单状态",
|
|
101
|
-
dataIndex: "orderStatus",
|
|
102
|
-
width: 100,
|
|
103
|
-
ellipsis: true,
|
|
104
|
-
render: function render(val) {
|
|
105
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_ORDER_STATUS_MAP[val] || val);
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
108
|
-
title: "是否被拆分",
|
|
109
|
-
dataIndex: "isSplit",
|
|
110
|
-
width: 100,
|
|
111
|
-
ellipsis: true,
|
|
112
|
-
render: function render(val) {
|
|
113
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
114
|
-
}
|
|
115
|
-
}, {
|
|
116
|
-
title: "是否拆分子单",
|
|
117
|
-
dataIndex: "isSplitNew",
|
|
118
|
-
width: 100,
|
|
119
|
-
ellipsis: true,
|
|
120
|
-
render: function render(val) {
|
|
121
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
122
|
-
}
|
|
123
|
-
}, {
|
|
124
|
-
title: "是否被合并",
|
|
125
|
-
dataIndex: "isCombine",
|
|
126
|
-
width: 100,
|
|
127
|
-
ellipsis: true,
|
|
128
|
-
render: function render(val) {
|
|
129
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
130
|
-
}
|
|
131
|
-
}, {
|
|
132
|
-
title: "是否合并新单",
|
|
133
|
-
dataIndex: "isCombineNew",
|
|
134
|
-
width: 100,
|
|
135
|
-
ellipsis: true,
|
|
136
|
-
render: function render(val) {
|
|
137
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
138
|
-
}
|
|
139
|
-
}, {
|
|
140
|
-
title: "是否复制单",
|
|
141
|
-
dataIndex: "isCopy",
|
|
142
|
-
width: 100,
|
|
143
|
-
ellipsis: true,
|
|
144
|
-
render: function render(val) {
|
|
145
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
146
|
-
}
|
|
147
|
-
}, {
|
|
148
|
-
title: "是否换货单",
|
|
149
|
-
dataIndex: "isExchangeOrder",
|
|
150
|
-
width: 100,
|
|
151
|
-
ellipsis: true,
|
|
152
|
-
render: function render(val) {
|
|
153
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
154
|
-
}
|
|
155
|
-
}, {
|
|
156
|
-
title: "订单备注",
|
|
157
|
-
dataIndex: "orderMsg",
|
|
158
|
-
width: 150,
|
|
159
|
-
ellipsis: true
|
|
160
|
-
}]
|
|
161
|
-
}
|
|
22
|
+
WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG,
|
|
23
|
+
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG,
|
|
24
|
+
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG,
|
|
25
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG
|
|
162
26
|
};
|
|
163
27
|
var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
164
28
|
var _this = this,
|
|
@@ -216,7 +80,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
216
80
|
required: false,
|
|
217
81
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
218
82
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
219
|
-
tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip :
|
|
83
|
+
tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : "",
|
|
220
84
|
component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
|
|
221
85
|
onChange: p === null || p === void 0 ? void 0 : p.onChange,
|
|
222
86
|
type: _this.type
|
|
@@ -231,7 +95,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
231
95
|
// 过滤组件id
|
|
232
96
|
name: item.name,
|
|
233
97
|
// 过滤组件名称
|
|
234
|
-
filterComponentType:
|
|
98
|
+
filterComponentType: "Input",
|
|
235
99
|
formatFilterValue: function formatFilterValue(input) {
|
|
236
100
|
return batchInput(input);
|
|
237
101
|
}
|
|
@@ -248,6 +112,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
248
112
|
this.children = ((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : (_typeMap$options$type2 = _typeMap$options$type.columns) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.map(function (column) {
|
|
249
113
|
return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
250
114
|
transformValue: column.render,
|
|
115
|
+
renderExport: column.renderExport,
|
|
251
116
|
name: column.title,
|
|
252
117
|
id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_").concat(column.dataIndex),
|
|
253
118
|
width: column.width || 150
|
|
@@ -264,6 +129,6 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
264
129
|
return Promise.resolve();
|
|
265
130
|
}
|
|
266
131
|
}] : [];
|
|
267
|
-
this.dataType =
|
|
132
|
+
this.dataType = "object";
|
|
268
133
|
});
|
|
269
134
|
export default BsSystemOrder;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class BsHeaderChild implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
transformValue: (val: any) => any;
|
|
17
|
+
export: (val: any) => any;
|
|
17
18
|
constructor(options: PickOption);
|
|
18
19
|
getParentId: () => string;
|
|
19
20
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
21
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
21
22
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
22
23
|
getComponentValue: (r: Record) => any;
|
|
24
|
+
getComponentExport: (r: Record) => any;
|
|
23
25
|
renderExport: (value: string, record: Record) => any;
|
|
24
26
|
editRender: () => null;
|
|
25
27
|
filterConfig: () => never[];
|
|
@@ -11,9 +11,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import React from
|
|
14
|
+
import React from "react";
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
18
18
|
var _this = this;
|
|
19
19
|
_classCallCheck(this, BsHeaderChild);
|
|
@@ -32,8 +32,11 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
32
32
|
_defineProperty(this, "transformValue", function (val) {
|
|
33
33
|
return val;
|
|
34
34
|
});
|
|
35
|
+
_defineProperty(this, "export", function (val) {
|
|
36
|
+
return val;
|
|
37
|
+
});
|
|
35
38
|
_defineProperty(this, "getParentId", function () {
|
|
36
|
-
var _this$id$split = _this.id.split(
|
|
39
|
+
var _this$id$split = _this.id.split("_"),
|
|
37
40
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
38
41
|
key = _this$id$split2[0],
|
|
39
42
|
name = _this$id$split2[1],
|
|
@@ -49,7 +52,7 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
49
52
|
});
|
|
50
53
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
51
54
|
var _this$getComponentVal;
|
|
52
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
55
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
53
56
|
});
|
|
54
57
|
_defineProperty(this, "renderLog", function (r) {
|
|
55
58
|
var id = _this.getParentId();
|
|
@@ -59,10 +62,13 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
59
62
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
60
63
|
return _this.transformValue(r === null || r === void 0 ? void 0 : r[_this.id]);
|
|
61
64
|
});
|
|
65
|
+
_defineProperty(this, "getComponentExport", function (r) {
|
|
66
|
+
return _this.export(r === null || r === void 0 ? void 0 : r[_this.id]);
|
|
67
|
+
});
|
|
62
68
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
63
|
-
var _this$
|
|
64
|
-
var val = (_this$
|
|
65
|
-
return typeof val ===
|
|
69
|
+
var _this$getComponentExp;
|
|
70
|
+
var val = (_this$getComponentExp = _this.getComponentExport(record)) !== null && _this$getComponentExp !== void 0 ? _this$getComponentExp : "--";
|
|
71
|
+
return typeof val === "number" ? val + "" : val;
|
|
66
72
|
});
|
|
67
73
|
_defineProperty(this, "editRender", function () {
|
|
68
74
|
return null;
|
|
@@ -76,14 +82,19 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
76
82
|
this.formField = options.id;
|
|
77
83
|
this.type = options.type;
|
|
78
84
|
this.componentConfig = options.componentConfig;
|
|
79
|
-
this.align =
|
|
85
|
+
this.align = "left";
|
|
80
86
|
this.width = (options === null || options === void 0 ? void 0 : options.width) || 100;
|
|
81
87
|
this.isCombinationComponent = false;
|
|
82
88
|
this.canSort = false;
|
|
83
|
-
this.dataType =
|
|
89
|
+
this.dataType = "string";
|
|
84
90
|
this.children = [];
|
|
85
91
|
if (options.transformValue) {
|
|
86
92
|
this.transformValue = options.transformValue;
|
|
87
93
|
}
|
|
94
|
+
if (options.renderExport) {
|
|
95
|
+
this.export = options.renderExport;
|
|
96
|
+
}
|
|
97
|
+
// this.export = (options as any).renderExport;
|
|
88
98
|
});
|
|
99
|
+
|
|
89
100
|
export default BsHeaderChild;
|
|
@@ -15,6 +15,7 @@ declare class BsHeaderGods implements ComponentInterface {
|
|
|
15
15
|
dataType: ComponentInterface["dataType"];
|
|
16
16
|
itemKey: any;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
|
+
getChildren(options: PickOption): any[];
|
|
18
19
|
getParentId: () => string;
|
|
19
20
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
21
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|