@kmkf-fe-packages/services-components 2.2.11 → 2.2.13-beta.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/README.md +1 -1
- package/dist/esm/Hooks/useColumnsConfig.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +3 -2
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +13 -12
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +10 -9
- package/dist/esm/commonComponents/ShopList/index.js +3 -1
- package/dist/esm/components/BS/BsLogistics/index.js +9 -0
- package/dist/esm/components/BS/BsSystemOrder/index.js +3 -2
- package/dist/esm/components/BS/common/expressCode.js +4 -2
- package/dist/esm/components/BS/common/expressCompany.js +3 -0
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +4 -2
- package/dist/esm/components/Common/index.js +5 -3
- package/dist/esm/components/CommonHeaderGood/index.js +216 -6
- package/dist/esm/components/File/index.d.ts +6 -6
- package/dist/esm/components/File/index.js +9 -9
- package/dist/esm/components/JST/JstSendGood/index.js +9 -1
- package/dist/esm/components/KmErpSendGood/index.js +1 -1
- package/dist/esm/components/LogisticsInterception/index.d.ts +20 -0
- package/dist/esm/components/LogisticsInterception/index.js +10 -5
- package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.d.ts +45 -0
- package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.js +97 -0
- package/dist/esm/components/MsgStatus/index.js +6 -1
- package/dist/esm/components/OrderSubForm/index.js +4 -1
- package/dist/esm/components/Payment/PaymentAmount.d.ts +0 -1
- package/dist/esm/components/Payment/PaymentAmount.js +0 -4
- package/dist/esm/components/Public/Goods/index.d.ts +3 -0
- package/dist/esm/components/Public/Goods/index.js +3 -0
- package/dist/esm/components/SubForm/children/HeaderChildFile.d.ts +30 -0
- package/dist/esm/components/SubForm/children/HeaderChildFile.js +117 -0
- package/dist/esm/components/SubForm/children/HeaderChildPic.d.ts +30 -0
- package/dist/esm/components/SubForm/children/HeaderChildPic.js +116 -0
- package/dist/esm/components/SubForm/index.js +86 -6
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.js +4 -0
- package/dist/esm/service/api.d.ts +1 -0
- package/dist/esm/service/api.js +6 -0
- package/package.json +3 -3
|
@@ -12,11 +12,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
12
12
|
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; }
|
|
13
13
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
14
|
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); }
|
|
15
|
-
import React from
|
|
16
|
-
import { ApaasUploadFile } from
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { ApaasUploadFile } from '@kmkf-fe-packages/basic-components';
|
|
17
17
|
import GetFormItem from "../GetFormItem";
|
|
18
18
|
import ItemView from "../../commonComponents/ItemView";
|
|
19
|
-
import { isNull } from
|
|
19
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
20
20
|
import { FileRender } from "../Common";
|
|
21
21
|
import { PlatForm } from "../../type";
|
|
22
22
|
var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
@@ -46,7 +46,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
46
46
|
href: file.url,
|
|
47
47
|
target: "_blank",
|
|
48
48
|
style: {
|
|
49
|
-
display:
|
|
49
|
+
display: 'block'
|
|
50
50
|
}
|
|
51
51
|
}, file.name);
|
|
52
52
|
});
|
|
@@ -60,7 +60,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
60
60
|
});
|
|
61
61
|
_defineProperty(this, "renderClient", function (record) {
|
|
62
62
|
var _this$effects;
|
|
63
|
-
var _this$id$split = _this.id.split(
|
|
63
|
+
var _this$id$split = _this.id.split('_'),
|
|
64
64
|
_this$id$split2 = _slicedToArray(_this$id$split, 1),
|
|
65
65
|
id = _this$id$split2[0];
|
|
66
66
|
var canDownload = ![PlatForm.KS, PlatForm.FXG].includes((_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.env);
|
|
@@ -83,7 +83,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
83
83
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
84
84
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
85
85
|
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,
|
|
86
|
-
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 :
|
|
86
|
+
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 : '',
|
|
87
87
|
component: /*#__PURE__*/React.createElement(ApaasUploadFile, _extends({}, _this.componentConfig, {
|
|
88
88
|
uniqueKey: _this.id,
|
|
89
89
|
platform: p === null || p === void 0 ? void 0 : p.platform,
|
|
@@ -97,7 +97,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
97
97
|
prv.push(next.url);
|
|
98
98
|
return prv;
|
|
99
99
|
}, []);
|
|
100
|
-
return textArr === null || textArr === void 0 ? void 0 : textArr.join(
|
|
100
|
+
return textArr === null || textArr === void 0 ? void 0 : textArr.join(',');
|
|
101
101
|
});
|
|
102
102
|
_defineProperty(this, "filterConfig", function () {
|
|
103
103
|
return [];
|
|
@@ -112,9 +112,9 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
112
112
|
this.isCombinationComponent = false;
|
|
113
113
|
this.canSort = false;
|
|
114
114
|
this.children = [];
|
|
115
|
-
this.dataType =
|
|
115
|
+
this.dataType = 'array';
|
|
116
116
|
this.effects = options.effects;
|
|
117
117
|
this.exampleValue = '[{"name":"c.jpeg","url":"https://kefu.kuaimai.com/pic/c.jpeg"}]';
|
|
118
|
-
this.standardDateType =
|
|
118
|
+
this.standardDateType = 'Array';
|
|
119
119
|
});
|
|
120
120
|
export default BasicFile;
|
|
@@ -70,6 +70,14 @@ var typeMap = {
|
|
|
70
70
|
sendName: "gySendName",
|
|
71
71
|
platformType: "gy",
|
|
72
72
|
dataType: "weakenArray"
|
|
73
|
+
},
|
|
74
|
+
JY_SEND_GOOD: {
|
|
75
|
+
key: "jySendGood",
|
|
76
|
+
name: "jy",
|
|
77
|
+
sendId: "jySendId",
|
|
78
|
+
sendName: "jySendName",
|
|
79
|
+
platformType: "jy",
|
|
80
|
+
dataType: "weakenArray"
|
|
73
81
|
}
|
|
74
82
|
};
|
|
75
83
|
var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
@@ -176,7 +184,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
176
184
|
});
|
|
177
185
|
_defineProperty(this, "filterConfig", function (item) {
|
|
178
186
|
var _typeMap$_this$type8, _typeMap$_this$type9, _typeMap$_this$type11;
|
|
179
|
-
return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "GY_SEND_GOOD"].includes(_this.type) ? {
|
|
187
|
+
return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "KM_SEND_GOOD", "GY_SEND_GOOD"].includes(_this.type) ? {
|
|
180
188
|
searchDefaultConditions: SYMBOL.in,
|
|
181
189
|
type: item.type,
|
|
182
190
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.sendName),
|
|
@@ -106,7 +106,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
_defineProperty(this, "filterConfig", function (item) {
|
|
109
|
-
return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "GY_SEND_GOOD"].includes(_this.type) ? {
|
|
109
|
+
return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "GY_SEND_GOOD", "JY_SEND_GOOD"].includes(_this.type) ? {
|
|
110
110
|
searchDefaultConditions: SYMBOL.in,
|
|
111
111
|
type: item.type,
|
|
112
112
|
id: "".concat(item.id, "_").concat(_this.suffixSendName),
|
|
@@ -2,6 +2,7 @@ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ExpressData, ExpressInterceptData, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
4
|
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
5
|
+
import InterceptApiStatusReason from "./interceptApiStatusReason";
|
|
5
6
|
import InterceptSnapshot from "./interceptSnapshot";
|
|
6
7
|
import InterceptAddress from "./InterceptAddress";
|
|
7
8
|
import InterceptType from "./InterceptType";
|
|
@@ -23,6 +24,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
23
24
|
interceptLogisticsStatus: InterceptStatus;
|
|
24
25
|
interceptApiStatus: InterceptApiStatus;
|
|
25
26
|
interceptSenderMobile: InterceptSenderMobile;
|
|
27
|
+
interceptApiStatusReason: InterceptApiStatusReason;
|
|
26
28
|
interceptSnapshot: InterceptSnapshot;
|
|
27
29
|
interceptState: InterceptState;
|
|
28
30
|
isCombinationComponent: boolean;
|
|
@@ -56,6 +58,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
56
58
|
};
|
|
57
59
|
interceptSnapshot: any;
|
|
58
60
|
interceptState: any;
|
|
61
|
+
interceptApiStatusReason: any;
|
|
59
62
|
};
|
|
60
63
|
renderPc: () => null;
|
|
61
64
|
renderExport: () => null;
|
|
@@ -67,6 +70,23 @@ declare class Logistics implements ComponentInterface {
|
|
|
67
70
|
name: string;
|
|
68
71
|
filterComponentType: "Input";
|
|
69
72
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
73
|
+
} | {
|
|
74
|
+
searchDefaultConditions: {
|
|
75
|
+
in: "in";
|
|
76
|
+
anylike: "anylike";
|
|
77
|
+
};
|
|
78
|
+
type: string;
|
|
79
|
+
id: string;
|
|
80
|
+
name: string;
|
|
81
|
+
filterComponentType: "SelectInput";
|
|
82
|
+
props: {
|
|
83
|
+
filterOptions: {
|
|
84
|
+
label: string;
|
|
85
|
+
value: string;
|
|
86
|
+
}[];
|
|
87
|
+
};
|
|
88
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
89
|
+
formatFilterValue: (value: any) => any;
|
|
70
90
|
} | {
|
|
71
91
|
searchDefaultConditions: "in";
|
|
72
92
|
type: string;
|
|
@@ -13,6 +13,7 @@ import { LogisticsInterception } from "@kmkf-fe-packages/basic-components";
|
|
|
13
13
|
import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import GetFormItem from "../GetFormItem";
|
|
15
15
|
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
16
|
+
import InterceptApiStatusReason from "./interceptApiStatusReason";
|
|
16
17
|
import InterceptSnapshot from "./interceptSnapshot";
|
|
17
18
|
import InterceptAddress from "./InterceptAddress";
|
|
18
19
|
import InterceptType from "./InterceptType";
|
|
@@ -44,6 +45,7 @@ function Logistics(options) {
|
|
|
44
45
|
_defineProperty(this, "interceptLogisticsStatus", void 0);
|
|
45
46
|
_defineProperty(this, "interceptApiStatus", void 0);
|
|
46
47
|
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
48
|
+
_defineProperty(this, "interceptApiStatusReason", void 0);
|
|
47
49
|
_defineProperty(this, "interceptSnapshot", void 0);
|
|
48
50
|
_defineProperty(this, "interceptState", void 0);
|
|
49
51
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
@@ -58,10 +60,10 @@ function Logistics(options) {
|
|
|
58
60
|
_defineProperty(this, "effects", void 0);
|
|
59
61
|
_defineProperty(this, "dataType", void 0);
|
|
60
62
|
_defineProperty(this, "renderClient", function (record) {
|
|
61
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptApiStatus.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record));
|
|
63
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptApiStatus.renderClient(record), _this.interceptApiStatusReason.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record));
|
|
62
64
|
});
|
|
63
65
|
_defineProperty(this, "renderLog", function (record) {
|
|
64
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptApiStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatus.name, ":", " ", _this.interceptApiStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptState.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptState.name, ":", " ", _this.interceptState.renderLog(record))));
|
|
66
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptApiStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatus.name, ":", " ", _this.interceptApiStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptApiStatusReason.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatusReason.name, ":", " ", _this.interceptApiStatusReason.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptState.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptState.name, ":", " ", _this.interceptState.renderLog(record))));
|
|
65
67
|
});
|
|
66
68
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
67
69
|
return {
|
|
@@ -73,7 +75,8 @@ function Logistics(options) {
|
|
|
73
75
|
interceptApiStatus: _this.interceptApiStatus.getComponentValue(r),
|
|
74
76
|
interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
|
|
75
77
|
interceptSnapshot: _this.interceptSnapshot.getComponentValue(r),
|
|
76
|
-
interceptState: _this.interceptState.getComponentValue(r)
|
|
78
|
+
interceptState: _this.interceptState.getComponentValue(r),
|
|
79
|
+
interceptApiStatusReason: _this.interceptApiStatusReason.getComponentValue(r)
|
|
77
80
|
// interceptLogisticsUserKCode:
|
|
78
81
|
// this.interceptLogisticsUserKCode.getComponentValue(r),
|
|
79
82
|
// interceptLogisticsUserSecretKey:
|
|
@@ -100,6 +103,7 @@ function Logistics(options) {
|
|
|
100
103
|
platform: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.env,
|
|
101
104
|
onJumpPage: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.onJumpPage
|
|
102
105
|
}, _this.componentConfig, {
|
|
106
|
+
showReason: true,
|
|
103
107
|
logisticsOptions: _this.expressDateInstance.getExpressData(),
|
|
104
108
|
expressInterceptData: _this.expressInterceptData.getExpressData(),
|
|
105
109
|
logisticsAddressData: _this.logisticsAddressData.getAddressData(),
|
|
@@ -112,7 +116,7 @@ function Logistics(options) {
|
|
|
112
116
|
subKey: "interceptCompany"
|
|
113
117
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
114
118
|
subKey: "interceptCode"
|
|
115
|
-
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)
|
|
119
|
+
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptApiStatusReason.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)
|
|
116
120
|
// this.interceptLogisticsUserKCode.filterConfig(item),
|
|
117
121
|
// this.interceptLogisticsUserSecretKey.filterConfig(item),
|
|
118
122
|
];
|
|
@@ -137,6 +141,7 @@ function Logistics(options) {
|
|
|
137
141
|
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
138
142
|
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
139
143
|
this.interceptState = new InterceptState(options);
|
|
144
|
+
this.interceptApiStatusReason = new InterceptApiStatusReason(options);
|
|
140
145
|
// this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(
|
|
141
146
|
// options,
|
|
142
147
|
// );
|
|
@@ -152,7 +157,7 @@ function Logistics(options) {
|
|
|
152
157
|
this.isCombinationComponent = true;
|
|
153
158
|
this.canSort = false;
|
|
154
159
|
this.dataType = "object";
|
|
155
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptState
|
|
160
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptApiStatusReason, this.interceptSnapshot, this.interceptState
|
|
156
161
|
// this.interceptLogisticsUserKCode,
|
|
157
162
|
// this.interceptLogisticsUserSecretKey,
|
|
158
163
|
];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class InterceptApiStatusReason implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
companyId: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
|
+
align: ALignType;
|
|
12
|
+
width: number;
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
sortField: string;
|
|
15
|
+
formField: string;
|
|
16
|
+
canSort: boolean;
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
children: ComponentInterface[];
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: any, record: Record) => any;
|
|
23
|
+
renderLog: (r: Record) => any;
|
|
24
|
+
renderExport: (value: any, record: Record) => any;
|
|
25
|
+
editRender: () => null;
|
|
26
|
+
filterConfig: (item: ColumnConfig) => {
|
|
27
|
+
searchDefaultConditions: {
|
|
28
|
+
in: "in";
|
|
29
|
+
anylike: "anylike";
|
|
30
|
+
};
|
|
31
|
+
type: string;
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
filterComponentType: "SelectInput";
|
|
35
|
+
props: {
|
|
36
|
+
filterOptions: {
|
|
37
|
+
label: string;
|
|
38
|
+
value: string;
|
|
39
|
+
}[];
|
|
40
|
+
};
|
|
41
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
42
|
+
formatFilterValue: (value: any) => any;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export default InterceptApiStatusReason;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 _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); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
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); }
|
|
8
|
+
import React from "react";
|
|
9
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
|
|
12
|
+
var InterceptApiStatusReason = /*#__PURE__*/_createClass(function InterceptApiStatusReason(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, InterceptApiStatusReason);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "companyId", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", void 0);
|
|
20
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
21
|
+
_defineProperty(this, "effects", void 0);
|
|
22
|
+
_defineProperty(this, "align", void 0);
|
|
23
|
+
_defineProperty(this, "width", void 0);
|
|
24
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
+
_defineProperty(this, "sortField", void 0);
|
|
26
|
+
_defineProperty(this, "formField", void 0);
|
|
27
|
+
_defineProperty(this, "canSort", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "children", void 0);
|
|
30
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
31
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
34
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
|
+
id: _this.id,
|
|
36
|
+
label: _this.name,
|
|
37
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
38
|
+
}) : null;
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
41
|
+
return record === null || record === void 0 ? void 0 : record[_this.id];
|
|
42
|
+
});
|
|
43
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
44
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
45
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
48
|
+
var _record;
|
|
49
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "editRender", function () {
|
|
52
|
+
return null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
55
|
+
return {
|
|
56
|
+
searchDefaultConditions: {
|
|
57
|
+
in: SYMBOL.in,
|
|
58
|
+
anylike: SYMBOL.anylike
|
|
59
|
+
},
|
|
60
|
+
type: _this.type,
|
|
61
|
+
id: "".concat(item.id, "_interceptLogisticsApiStatusReason"),
|
|
62
|
+
name: "".concat(item.name, "-\u63A5\u53E3\u72B6\u6001\u539F\u56E0"),
|
|
63
|
+
filterComponentType: "SelectInput",
|
|
64
|
+
props: {
|
|
65
|
+
filterOptions: SEARCH_OPTIONS
|
|
66
|
+
},
|
|
67
|
+
filterFn: function filterFn(value) {
|
|
68
|
+
return function (i) {
|
|
69
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'interceptLogisticsApiStatusReason')).includes(value);
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
formatFilterValue: function formatFilterValue(value) {
|
|
73
|
+
if (['in', 'anylike'].includes(value.type)) {
|
|
74
|
+
return batchInput(value.keywords);
|
|
75
|
+
} else {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
this.name = "接口状态原因";
|
|
82
|
+
this.id = "".concat(options.id, "_interceptLogisticsApiStatusReason");
|
|
83
|
+
this.companyId = "".concat(options.id, "_interceptCompany");
|
|
84
|
+
this.formField = "".concat(options.id, "_interceptLogisticsApiStatusReason");
|
|
85
|
+
this.sortField = "".concat(options.id, "_interceptLogisticsApiStatusReason");
|
|
86
|
+
this.dataType = "string";
|
|
87
|
+
this.type = options.type + '_API_STATUS_REASON';
|
|
88
|
+
this.componentConfig = options.componentConfig;
|
|
89
|
+
this.rules = [];
|
|
90
|
+
this.align = "left";
|
|
91
|
+
this.width = 200;
|
|
92
|
+
this.isCombinationComponent = false;
|
|
93
|
+
this.canSort = true;
|
|
94
|
+
this.children = [];
|
|
95
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
96
|
+
});
|
|
97
|
+
export default InterceptApiStatusReason;
|
|
@@ -39,10 +39,15 @@ var typeMap = {
|
|
|
39
39
|
label: "等待执行",
|
|
40
40
|
color: "#e7780f"
|
|
41
41
|
}, {
|
|
42
|
-
oldValue: "
|
|
42
|
+
oldValue: "不满足条件,无需执行",
|
|
43
43
|
value: "不满足条件,无需执行",
|
|
44
44
|
label: "不满足条件,无需执行",
|
|
45
45
|
color: "#8A8A8A"
|
|
46
|
+
}, {
|
|
47
|
+
oldValue: "暂不满足条件,等待执行",
|
|
48
|
+
value: "暂不满足条件,等待执行",
|
|
49
|
+
label: "暂不满足条件,等待执行",
|
|
50
|
+
color: "#4D90F7"
|
|
46
51
|
}],
|
|
47
52
|
key: "msgStatusValues",
|
|
48
53
|
code: "msgStatus4Search",
|
|
@@ -230,10 +230,12 @@ function OrderSubForm(options) {
|
|
|
230
230
|
if (item.widget === "upload") {
|
|
231
231
|
return new BsHeaderPic(_objectSpread(_objectSpread({}, options), {}, {
|
|
232
232
|
name: item.title,
|
|
233
|
+
width: (item === null || item === void 0 ? void 0 : item.width) || 150,
|
|
233
234
|
id: "".concat(options.id, "_subOrderList_").concat(item.dataIndex)
|
|
234
235
|
}));
|
|
235
236
|
} else if (item.widget === "select") {
|
|
236
237
|
return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
238
|
+
width: (item === null || item === void 0 ? void 0 : item.width) || 150,
|
|
237
239
|
name: item.title,
|
|
238
240
|
id: "".concat(options.id, "_subOrderList_").concat(item.dataIndex),
|
|
239
241
|
transformValue: function transformValue(val) {
|
|
@@ -245,6 +247,7 @@ function OrderSubForm(options) {
|
|
|
245
247
|
}));
|
|
246
248
|
} else if (item.widget === "datePicker") {
|
|
247
249
|
return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
250
|
+
width: (item === null || item === void 0 ? void 0 : item.width) || 150,
|
|
248
251
|
name: item.title,
|
|
249
252
|
id: "".concat(options.id, "_subOrderList_").concat(item.dataIndex),
|
|
250
253
|
transformValue: function transformValue(val) {
|
|
@@ -256,6 +259,7 @@ function OrderSubForm(options) {
|
|
|
256
259
|
}));
|
|
257
260
|
} else {
|
|
258
261
|
return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
262
|
+
width: (item === null || item === void 0 ? void 0 : item.width) || 150,
|
|
259
263
|
name: item.title,
|
|
260
264
|
id: "".concat(options.id, "_subOrderList_").concat(item.dataIndex)
|
|
261
265
|
}));
|
|
@@ -263,6 +267,5 @@ function OrderSubForm(options) {
|
|
|
263
267
|
});
|
|
264
268
|
this.dataType = "object";
|
|
265
269
|
this.expressDateInstance = ExpressData.getInstance();
|
|
266
|
-
console.log("componentConfig", this.componentConfig);
|
|
267
270
|
});
|
|
268
271
|
export default OrderSubForm;
|
|
@@ -36,6 +36,5 @@ declare class PaymentAmount implements ComponentInterface {
|
|
|
36
36
|
formatFilterValue: (val: Array<number | null>) => (number | null)[];
|
|
37
37
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
38
38
|
};
|
|
39
|
-
formDataTransform: (value: string) => string | number;
|
|
40
39
|
}
|
|
41
40
|
export default PaymentAmount;
|
|
@@ -132,10 +132,6 @@ var PaymentAmount = /*#__PURE__*/_createClass(function PaymentAmount(options) {
|
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
});
|
|
135
|
-
_defineProperty(this, "formDataTransform", function (value) {
|
|
136
|
-
var isNumber = new RegExp(/^[+-]?\d+(\.\d+)?$/);
|
|
137
|
-
return isNumber.test(value) ? Number(value) : value;
|
|
138
|
-
});
|
|
139
135
|
this.name = '打款金额';
|
|
140
136
|
this.id = "".concat(options.id, "_enterprisePaymentRefundFee");
|
|
141
137
|
this.sortField = "".concat(options.id, "_enterprisePaymentRefundFee");
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare class HeaderChildFile implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
|
+
parentName?: string;
|
|
17
|
+
transformValue: (val: any, record?: any, parentName?: string) => any;
|
|
18
|
+
export: (val: any, record?: any, parentName?: string) => any;
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getParentId: () => string;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: unknown, record: Record) => any;
|
|
23
|
+
renderLog: (r: Record) => any;
|
|
24
|
+
getComponentValue: (r: Record) => any;
|
|
25
|
+
getComponentExport: (r: Record) => any;
|
|
26
|
+
renderExport: (value: string, record: Record) => any;
|
|
27
|
+
editRender: () => null;
|
|
28
|
+
filterConfig: () => never[];
|
|
29
|
+
}
|
|
30
|
+
export default HeaderChildFile;
|
|
@@ -0,0 +1,117 @@
|
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
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); } }
|
|
9
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 'react';
|
|
15
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
|
+
var HeaderChildFile = /*#__PURE__*/_createClass(function HeaderChildFile(options) {
|
|
18
|
+
var _this = this;
|
|
19
|
+
_classCallCheck(this, HeaderChildFile);
|
|
20
|
+
_defineProperty(this, "name", void 0);
|
|
21
|
+
_defineProperty(this, "id", void 0);
|
|
22
|
+
_defineProperty(this, "sortField", void 0);
|
|
23
|
+
_defineProperty(this, "type", void 0);
|
|
24
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
25
|
+
_defineProperty(this, "align", void 0);
|
|
26
|
+
_defineProperty(this, "width", void 0);
|
|
27
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
28
|
+
_defineProperty(this, "formField", void 0);
|
|
29
|
+
_defineProperty(this, "canSort", void 0);
|
|
30
|
+
_defineProperty(this, "children", void 0);
|
|
31
|
+
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "parentName", void 0);
|
|
33
|
+
_defineProperty(this, "transformValue", function (val) {
|
|
34
|
+
return val;
|
|
35
|
+
});
|
|
36
|
+
_defineProperty(this, "export", function (val) {
|
|
37
|
+
return val;
|
|
38
|
+
});
|
|
39
|
+
_defineProperty(this, "getParentId", function () {
|
|
40
|
+
var _this$id$split = _this.id.split('_'),
|
|
41
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
42
|
+
key = _this$id$split2[0],
|
|
43
|
+
name = _this$id$split2[1],
|
|
44
|
+
code = _this$id$split2[2];
|
|
45
|
+
return "".concat(key, "_").concat(name);
|
|
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: _this.getComponentValue(record)
|
|
52
|
+
}) : null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
55
|
+
var fileList = _this.getComponentValue(record);
|
|
56
|
+
if (!fileList.length) {
|
|
57
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
58
|
+
}
|
|
59
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file) {
|
|
60
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
61
|
+
href: file.url,
|
|
62
|
+
onClick: function onClick(e) {
|
|
63
|
+
return e.stopPropagation();
|
|
64
|
+
},
|
|
65
|
+
target: "_blank",
|
|
66
|
+
style: {
|
|
67
|
+
display: 'block'
|
|
68
|
+
}
|
|
69
|
+
}, file.name);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
73
|
+
var id = _this.getParentId();
|
|
74
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
75
|
+
return _this.renderPc(undefined, r);
|
|
76
|
+
});
|
|
77
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
78
|
+
return (r === null || r === void 0 ? void 0 : r[_this.id]) || [];
|
|
79
|
+
});
|
|
80
|
+
_defineProperty(this, "getComponentExport", function (r) {
|
|
81
|
+
return _this.export(r === null || r === void 0 ? void 0 : r[_this.id], r, _this.parentName);
|
|
82
|
+
});
|
|
83
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
84
|
+
var fileList = _this.getComponentValue(record) || [];
|
|
85
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file) {
|
|
86
|
+
return file.url;
|
|
87
|
+
}).join(',');
|
|
88
|
+
});
|
|
89
|
+
_defineProperty(this, "editRender", function () {
|
|
90
|
+
return null;
|
|
91
|
+
});
|
|
92
|
+
_defineProperty(this, "filterConfig", function () {
|
|
93
|
+
return [];
|
|
94
|
+
});
|
|
95
|
+
this.name = options.name;
|
|
96
|
+
this.id = options.id;
|
|
97
|
+
this.sortField = options.id;
|
|
98
|
+
this.formField = options.id;
|
|
99
|
+
this.type = options.type;
|
|
100
|
+
if (options.parentName) {
|
|
101
|
+
this.parentName = options.parentName;
|
|
102
|
+
}
|
|
103
|
+
this.componentConfig = options.componentConfig;
|
|
104
|
+
this.align = 'left';
|
|
105
|
+
this.width = (options === null || options === void 0 ? void 0 : options.width) || 100;
|
|
106
|
+
this.isCombinationComponent = false;
|
|
107
|
+
this.canSort = false;
|
|
108
|
+
this.dataType = 'string';
|
|
109
|
+
this.children = [];
|
|
110
|
+
if (options.transformValue) {
|
|
111
|
+
this.transformValue = options.transformValue;
|
|
112
|
+
}
|
|
113
|
+
if (options.renderExport) {
|
|
114
|
+
this.export = options.renderExport;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
export default HeaderChildFile;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class HeaderChildPic implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
parentName?: string;
|
|
17
|
+
transformValue: (val: any, record?: any, parentName?: string) => any;
|
|
18
|
+
export: (val: any, record?: any, parentName?: string) => any;
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getParentId: () => string;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: unknown, record: Record) => any;
|
|
23
|
+
renderLog: (r: Record) => any;
|
|
24
|
+
getComponentValue: (r: Record) => any;
|
|
25
|
+
getComponentExport: (r: Record) => any;
|
|
26
|
+
renderExport: (value: string, record: Record) => any;
|
|
27
|
+
editRender: () => null;
|
|
28
|
+
filterConfig: () => never[];
|
|
29
|
+
}
|
|
30
|
+
export default HeaderChildPic;
|