@kmkf-fe-packages/services-components 1.17.5-beta.6 → 1.17.5-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/LogisticsInterception/InterceptApiStatus.d.ts +4 -3
- package/dist/esm/components/LogisticsInterception/InterceptApiStatus.js +26 -20
- package/dist/esm/components/LogisticsInterception/index.js +3 -3
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.d.ts +4 -2
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +26 -38
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +13 -13
- package/dist/esm/components/LogisticsMoreInterception/index.js +19 -19
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -3,6 +3,7 @@ import React from "react";
|
|
|
3
3
|
declare class InterceptApiStatus implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
|
+
parentId: string;
|
|
6
7
|
sortField: string;
|
|
7
8
|
type: string;
|
|
8
9
|
rules: any[];
|
|
@@ -18,10 +19,10 @@ declare class InterceptApiStatus implements ComponentInterface {
|
|
|
18
19
|
options: ComponentInterface["options"];
|
|
19
20
|
constructor(options: PickOption);
|
|
20
21
|
getComponentValue: (r: Record) => any;
|
|
21
|
-
renderClient: (
|
|
22
|
-
renderPc: (value: any,
|
|
22
|
+
renderClient: (r: any) => React.JSX.Element | null;
|
|
23
|
+
renderPc: (value: any, r: Record) => React.JSX.Element | "--";
|
|
23
24
|
renderLog: (r: Record) => React.JSX.Element | "--" | null;
|
|
24
|
-
renderExport: (value: any,
|
|
25
|
+
renderExport: (value: any, r: Record) => any;
|
|
25
26
|
editRender: () => null;
|
|
26
27
|
filterConfig: (item: ColumnConfig) => {
|
|
27
28
|
searchDefaultConditions: "in";
|
|
@@ -14,6 +14,7 @@ var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(o
|
|
|
14
14
|
_classCallCheck(this, InterceptApiStatus);
|
|
15
15
|
_defineProperty(this, "name", void 0);
|
|
16
16
|
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "parentId", void 0);
|
|
17
18
|
_defineProperty(this, "sortField", void 0);
|
|
18
19
|
_defineProperty(this, "type", void 0);
|
|
19
20
|
_defineProperty(this, "rules", void 0);
|
|
@@ -28,47 +29,51 @@ var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(o
|
|
|
28
29
|
_defineProperty(this, "dataType", void 0);
|
|
29
30
|
_defineProperty(this, "options", void 0);
|
|
30
31
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
31
|
-
var
|
|
32
|
-
|
|
32
|
+
var _record$interceptLogi;
|
|
33
|
+
var record = r[_this.parentId];
|
|
34
|
+
return record === null || record === void 0 ? void 0 : (_record$interceptLogi = record.interceptLogisticsApiStatus) === null || _record$interceptLogi === void 0 ? void 0 : _record$interceptLogi.status;
|
|
33
35
|
});
|
|
34
|
-
_defineProperty(this, "renderClient", function (
|
|
35
|
-
var _record$
|
|
36
|
-
var
|
|
36
|
+
_defineProperty(this, "renderClient", function (r) {
|
|
37
|
+
var _record$interceptLogi2, _record$interceptLogi3, _record$interceptLogi4, _record$interceptLogi5, _record$interceptLogi6;
|
|
38
|
+
var record = r[_this.parentId];
|
|
39
|
+
var status = record === null || record === void 0 ? void 0 : (_record$interceptLogi2 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi2 === void 0 ? void 0 : _record$interceptLogi2.status;
|
|
37
40
|
var statusColor = status === "成功" ? "#52c41a" : "#ff4d4f";
|
|
38
|
-
return !isNull(record === null || record === void 0 ? void 0 : (_record$
|
|
41
|
+
return !isNull(record === null || record === void 0 ? void 0 : (_record$interceptLogi3 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi3 === void 0 ? void 0 : _record$interceptLogi3.status) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
39
42
|
id: _this.id,
|
|
40
43
|
label: _this.name,
|
|
41
44
|
value: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
42
45
|
style: {
|
|
43
46
|
color: statusColor
|
|
44
47
|
}
|
|
45
|
-
}, record === null || record === void 0 ? void 0 : (_record$
|
|
48
|
+
}, record === null || record === void 0 ? void 0 : (_record$interceptLogi4 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi4 === void 0 ? void 0 : _record$interceptLogi4.status, record !== null && record !== void 0 && (_record$interceptLogi5 = record.interceptLogisticsApiStatus) !== null && _record$interceptLogi5 !== void 0 && _record$interceptLogi5.reason ? /*#__PURE__*/React.createElement("span", {
|
|
46
49
|
className: "c-red"
|
|
47
|
-
}, ",", (record === null || record === void 0 ? void 0 : (_record$
|
|
50
|
+
}, ",", (record === null || record === void 0 ? void 0 : (_record$interceptLogi6 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi6 === void 0 ? void 0 : _record$interceptLogi6.reason) || "") : null))
|
|
48
51
|
}) : null;
|
|
49
52
|
});
|
|
50
|
-
_defineProperty(this, "renderPc", function (value,
|
|
51
|
-
var _record$
|
|
52
|
-
|
|
53
|
-
var status = record === null || record === void 0 ? void 0 : (_record$
|
|
53
|
+
_defineProperty(this, "renderPc", function (value, r) {
|
|
54
|
+
var _record$interceptLogi7, _record$interceptLogi8, _record$interceptLogi9, _record$interceptLogi10;
|
|
55
|
+
var record = r[_this.parentId];
|
|
56
|
+
var status = record === null || record === void 0 ? void 0 : (_record$interceptLogi7 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi7 === void 0 ? void 0 : _record$interceptLogi7.status;
|
|
54
57
|
var statusColor = status === "成功" ? "#52c41a" : "#ff4d4f";
|
|
55
58
|
return !isNull(status) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
56
59
|
style: {
|
|
57
60
|
color: statusColor
|
|
58
61
|
}
|
|
59
|
-
}, record === null || record === void 0 ? void 0 : (_record$
|
|
62
|
+
}, record === null || record === void 0 ? void 0 : (_record$interceptLogi8 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi8 === void 0 ? void 0 : _record$interceptLogi8.status, record !== null && record !== void 0 && (_record$interceptLogi9 = record.interceptLogisticsApiStatus) !== null && _record$interceptLogi9 !== void 0 && _record$interceptLogi9.reason ? /*#__PURE__*/React.createElement("span", {
|
|
60
63
|
className: "c-red"
|
|
61
|
-
}, ",", (record === null || record === void 0 ? void 0 : (_record$
|
|
64
|
+
}, ",", (record === null || record === void 0 ? void 0 : (_record$interceptLogi10 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi10 === void 0 ? void 0 : _record$interceptLogi10.reason) || "") : null)) : "--";
|
|
62
65
|
});
|
|
63
66
|
_defineProperty(this, "renderLog", function (r) {
|
|
64
|
-
var
|
|
65
|
-
|
|
67
|
+
var _record$interceptLogi11;
|
|
68
|
+
var record = r[_this.parentId];
|
|
69
|
+
if (isNull(record === null || record === void 0 ? void 0 : (_record$interceptLogi11 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi11 === void 0 ? void 0 : _record$interceptLogi11.status)) return null;
|
|
66
70
|
return _this.renderPc(undefined, r);
|
|
67
71
|
});
|
|
68
|
-
_defineProperty(this, "renderExport", function (value,
|
|
69
|
-
var _record$
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
_defineProperty(this, "renderExport", function (value, r) {
|
|
73
|
+
var _record$interceptLogi12, _record$interceptLogi13;
|
|
74
|
+
var record = r[_this.parentId];
|
|
75
|
+
console.log("renderExport", record);
|
|
76
|
+
return (_record$interceptLogi12 = record === null || record === void 0 ? void 0 : (_record$interceptLogi13 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi13 === void 0 ? void 0 : _record$interceptLogi13.status) !== null && _record$interceptLogi12 !== void 0 ? _record$interceptLogi12 : "--";
|
|
72
77
|
});
|
|
73
78
|
_defineProperty(this, "editRender", function () {
|
|
74
79
|
return null;
|
|
@@ -92,6 +97,7 @@ var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(o
|
|
|
92
97
|
});
|
|
93
98
|
this.name = "接口状态";
|
|
94
99
|
this.id = "".concat(options.id, "_interceptLogisticsApiStatus");
|
|
100
|
+
this.parentId = options.id;
|
|
95
101
|
this.sortField = "".concat(options.id, "_interceptLogisticsApiStatus");
|
|
96
102
|
this.formField = "".concat(options.id, "_interceptLogisticsApiStatus");
|
|
97
103
|
this.type = options.type;
|
|
@@ -51,10 +51,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
51
51
|
_defineProperty(this, "effects", void 0);
|
|
52
52
|
_defineProperty(this, "dataType", void 0);
|
|
53
53
|
_defineProperty(this, "renderClient", function (record) {
|
|
54
|
-
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
|
|
54
|
+
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));
|
|
55
55
|
});
|
|
56
56
|
_defineProperty(this, "renderLog", function (record) {
|
|
57
|
-
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
|
|
57
|
+
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))));
|
|
58
58
|
});
|
|
59
59
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
60
60
|
return {
|
|
@@ -63,7 +63,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
63
63
|
interceptSenderMobile: _this.interceptSenderMobile.getComponentValue(r),
|
|
64
64
|
interceptType: _this.interceptType.getComponentValue(r),
|
|
65
65
|
interceptLogisticsStatus: _this.interceptLogisticsStatus.getComponentValue(r),
|
|
66
|
-
interceptApiStatus: _this.interceptApiStatus.getComponentValue(r
|
|
66
|
+
interceptApiStatus: _this.interceptApiStatus.getComponentValue(r),
|
|
67
67
|
interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
|
|
68
68
|
interceptSnapshot: _this.interceptSnapshot.getComponentValue(r),
|
|
69
69
|
interceptState: _this.interceptState.getComponentValue(r)
|
|
@@ -3,6 +3,7 @@ import React from "react";
|
|
|
3
3
|
declare class InterceptApiStatus implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
|
+
parentId: string;
|
|
6
7
|
sortField: string;
|
|
7
8
|
type: string;
|
|
8
9
|
rules: any[];
|
|
@@ -18,9 +19,10 @@ declare class InterceptApiStatus implements ComponentInterface {
|
|
|
18
19
|
options: ComponentInterface["options"];
|
|
19
20
|
constructor(options: PickOption);
|
|
20
21
|
getComponentValue: (r: Record) => any;
|
|
21
|
-
|
|
22
|
+
renderStatus: (record: any, w?: number) => React.JSX.Element | "--";
|
|
23
|
+
renderClient: () => null;
|
|
22
24
|
renderPc: (value: any, record: Record) => React.JSX.Element | "--";
|
|
23
|
-
renderLog: (
|
|
25
|
+
renderLog: () => null;
|
|
24
26
|
renderExport: (value: any, record: Record) => any;
|
|
25
27
|
editRender: () => null;
|
|
26
28
|
filterConfig: (item: ColumnConfig) => {
|
|
@@ -6,7 +6,6 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
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
8
|
import React from "react";
|
|
9
|
-
import ItemView from "../../commonComponents/ItemView";
|
|
10
9
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
10
|
import { SYMBOL } from "../../constant";
|
|
12
11
|
var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(options) {
|
|
@@ -14,6 +13,7 @@ var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(o
|
|
|
14
13
|
_classCallCheck(this, InterceptApiStatus);
|
|
15
14
|
_defineProperty(this, "name", void 0);
|
|
16
15
|
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "parentId", void 0);
|
|
17
17
|
_defineProperty(this, "sortField", void 0);
|
|
18
18
|
_defineProperty(this, "type", void 0);
|
|
19
19
|
_defineProperty(this, "rules", void 0);
|
|
@@ -28,47 +28,34 @@ var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(o
|
|
|
28
28
|
_defineProperty(this, "dataType", void 0);
|
|
29
29
|
_defineProperty(this, "options", void 0);
|
|
30
30
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
return ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).map(function (item) {
|
|
32
|
+
return item === null || item === void 0 ? void 0 : item.status;
|
|
33
|
+
}).join(",");
|
|
34
34
|
});
|
|
35
|
-
_defineProperty(this, "
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
style: {
|
|
44
|
-
color: statusColor
|
|
45
|
-
}
|
|
46
|
-
}, record === null || record === void 0 ? void 0 : (_record$_this$id3 = record[_this.id]) === null || _record$_this$id3 === void 0 ? void 0 : _record$_this$id3.status, record !== null && record !== void 0 && (_record$_this$id4 = record[_this.id]) !== null && _record$_this$id4 !== void 0 && _record$_this$id4.reason ? /*#__PURE__*/React.createElement("span", {
|
|
35
|
+
_defineProperty(this, "renderStatus", function (record) {
|
|
36
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
37
|
+
var statusList = record["".concat(_this.parentId, "_logisticsInterceptApiStatusList")] || [];
|
|
38
|
+
if (isNull(statusList)) return "--";
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", null, statusList.map(function (item, index) {
|
|
40
|
+
var status = item === null || item === void 0 ? void 0 : item.status;
|
|
41
|
+
var reason = item === null || item === void 0 ? void 0 : item.reason;
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), status ? /*#__PURE__*/React.createElement(React.Fragment, null, status, " ", reason ? /*#__PURE__*/React.createElement("span", {
|
|
47
43
|
className: "c-red"
|
|
48
|
-
}, "
|
|
49
|
-
})
|
|
44
|
+
}, "\u5931\u8D25\u539F\u56E0:", reason) : null) : "--");
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderClient", function () {
|
|
48
|
+
return null;
|
|
50
49
|
});
|
|
51
50
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
52
|
-
|
|
53
|
-
var status = record === null || record === void 0 ? void 0 : (_record$_this$id6 = record[_this.id]) === null || _record$_this$id6 === void 0 ? void 0 : _record$_this$id6.status;
|
|
54
|
-
var statusColor = status === "成功" ? "#52c41a" : "#ff4d4f";
|
|
55
|
-
return !isNull(status) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
56
|
-
style: {
|
|
57
|
-
color: statusColor
|
|
58
|
-
}
|
|
59
|
-
}, record === null || record === void 0 ? void 0 : (_record$_this$id7 = record[_this.id]) === null || _record$_this$id7 === void 0 ? void 0 : _record$_this$id7.status, record !== null && record !== void 0 && (_record$_this$id8 = record[_this.id]) !== null && _record$_this$id8 !== void 0 && _record$_this$id8.reason ? /*#__PURE__*/React.createElement("span", {
|
|
60
|
-
className: "c-red"
|
|
61
|
-
}, ",", (record === null || record === void 0 ? void 0 : (_record$_this$id9 = record[_this.id]) === null || _record$_this$id9 === void 0 ? void 0 : _record$_this$id9.reason) || "") : null)) : "--";
|
|
51
|
+
return _this.renderStatus(record, 700);
|
|
62
52
|
});
|
|
63
|
-
_defineProperty(this, "renderLog", function (
|
|
64
|
-
|
|
65
|
-
if (isNull(r === null || r === void 0 ? void 0 : (_r$_this$id2 = r[_this.id]) === null || _r$_this$id2 === void 0 ? void 0 : _r$_this$id2.status)) return null;
|
|
66
|
-
return _this.renderPc(undefined, r);
|
|
53
|
+
_defineProperty(this, "renderLog", function () {
|
|
54
|
+
return null;
|
|
67
55
|
});
|
|
68
56
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
return (_record$_this$id$stat = record === null || record === void 0 ? void 0 : (_record$_this$id10 = record[_this.id]) === null || _record$_this$id10 === void 0 ? void 0 : _record$_this$id10.status) !== null && _record$_this$id$stat !== void 0 ? _record$_this$id$stat : "--";
|
|
57
|
+
var _this$getComponentVal;
|
|
58
|
+
return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--";
|
|
72
59
|
});
|
|
73
60
|
_defineProperty(this, "editRender", function () {
|
|
74
61
|
return null;
|
|
@@ -91,9 +78,10 @@ var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(o
|
|
|
91
78
|
};
|
|
92
79
|
});
|
|
93
80
|
this.name = "接口状态";
|
|
94
|
-
this.id = "".concat(options.id, "
|
|
95
|
-
this.
|
|
96
|
-
this.
|
|
81
|
+
this.id = "".concat(options.id, "_logisticsInterceptApiStatusList");
|
|
82
|
+
this.parentId = options.id;
|
|
83
|
+
this.sortField = "".concat(options.id, "_logisticsInterceptApiStatusList");
|
|
84
|
+
this.formField = "".concat(options.id, "_logisticsInterceptApiStatusList");
|
|
97
85
|
this.type = options.type;
|
|
98
86
|
this.componentConfig = options.componentConfig;
|
|
99
87
|
this.rules = [];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { ExpressData, ExpressInterceptData, LogisticsAddressData, AddressData } from
|
|
4
|
-
import InterceptSenderMobile from
|
|
5
|
-
import InterceptSnapshot from
|
|
6
|
-
import InterceptAddress from
|
|
7
|
-
import InterceptType from
|
|
8
|
-
import InterceptStatus from
|
|
9
|
-
import InterceptCode from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ExpressData, ExpressInterceptData, LogisticsAddressData, AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
5
|
+
import InterceptSnapshot from "./interceptSnapshot";
|
|
6
|
+
import InterceptAddress from "./InterceptAddress";
|
|
7
|
+
import InterceptType from "./InterceptType";
|
|
8
|
+
import InterceptStatus from "./InterceptStatus";
|
|
9
|
+
import InterceptCode from "./interceptCode";
|
|
10
10
|
import InterceptApiStatus from "./InterceptApiStatus";
|
|
11
|
-
import Express from
|
|
11
|
+
import Express from "./interceptCompany";
|
|
12
12
|
declare class Logistics implements ComponentInterface {
|
|
13
13
|
name: string;
|
|
14
14
|
columnHeader: string | JSX.Element;
|
|
@@ -16,7 +16,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
16
16
|
sortField: string;
|
|
17
17
|
type: string;
|
|
18
18
|
rules: any[];
|
|
19
|
-
componentConfig: ComponentInterface[
|
|
19
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
20
20
|
interceptAddress: InterceptAddress;
|
|
21
21
|
interceptType: InterceptType;
|
|
22
22
|
interceptLogisticsStatus: InterceptStatus;
|
|
@@ -34,8 +34,8 @@ declare class Logistics implements ComponentInterface {
|
|
|
34
34
|
logisticsAddressData: InstanceType<typeof LogisticsAddressData>;
|
|
35
35
|
addressDateInstance: InstanceType<typeof AddressData>;
|
|
36
36
|
expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
|
|
37
|
-
effects: ComponentInterface[
|
|
38
|
-
dataType: ComponentInterface[
|
|
37
|
+
effects: ComponentInterface["effects"];
|
|
38
|
+
dataType: ComponentInterface["dataType"];
|
|
39
39
|
constructor(options: PickOption);
|
|
40
40
|
renderInfo: (list?: any[]) => React.JSX.Element;
|
|
41
41
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -8,10 +8,10 @@ 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
|
|
12
|
-
import { Space } from
|
|
13
|
-
import { LogisticsMoreInterception } from
|
|
14
|
-
import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData } from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import { Space } from "antd";
|
|
13
|
+
import { LogisticsMoreInterception } from "@kmkf-fe-packages/basic-components";
|
|
14
|
+
import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
15
|
import ItemView from "../../commonComponents/ItemView";
|
|
16
16
|
import GetFormItem from "../GetFormItem";
|
|
17
17
|
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
@@ -61,22 +61,22 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
61
61
|
return /*#__PURE__*/React.createElement(Space, {
|
|
62
62
|
wrap: true
|
|
63
63
|
}, list.map(function (item, index) {
|
|
64
|
-
var _ref, _item$interceptAddres, _this$expressIntercep, _item$interceptLogist, _item$interceptLogist2, _item$interceptLogist3;
|
|
64
|
+
var _ref, _item$interceptAddres, _this$expressIntercep, _item$interceptLogist, _item$interceptLogist2, _item$interceptLogist3, _item$interceptLogist4;
|
|
65
65
|
var addressText = (_ref = item.interceptAddress || []) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
|
|
66
66
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
67
|
-
}).join(
|
|
68
|
-
return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") :
|
|
67
|
+
}).join("");
|
|
68
|
+
return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", item.interceptCompany ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u516C\u53F8\uFF1A", _this.expressDateInstance.getExpressNameByCode(item.interceptCompany) || item.interceptCompany) : null, item.interceptCode ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u5355\u53F7\uFF1A", /*#__PURE__*/React.createElement(CopyText, {
|
|
69
69
|
text: item.interceptCode
|
|
70
|
-
})) : null, (_item$interceptAddres = item.interceptAddress) !== null && _item$interceptAddres !== void 0 && _item$interceptAddres.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", addressText, item.interceptDetail, " ", item.interceptReceiverName,
|
|
70
|
+
})) : null, (_item$interceptAddres = item.interceptAddress) !== null && _item$interceptAddres !== void 0 && _item$interceptAddres.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", addressText, item.interceptDetail, " ", item.interceptReceiverName, " ", item.interceptReceiverMobile) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
|
|
71
71
|
modelWidth: 500,
|
|
72
72
|
interceptCompany: item.interceptCompany,
|
|
73
73
|
interceptCode: item.interceptCode,
|
|
74
74
|
interceptSenderMobile: item.interceptSenderMobile
|
|
75
|
-
})) : null, item.interceptLogisticsApiStatus ? /*#__PURE__*/React.createElement("div", null, "\u63A5\u53E3\u72B6\u6001:", (_item$interceptLogist = item.interceptLogisticsApiStatus)
|
|
75
|
+
})) : null, item.interceptLogisticsApiStatus ? /*#__PURE__*/React.createElement("div", null, "\u63A5\u53E3\u72B6\u6001:", (_item$interceptLogist = item.interceptLogisticsApiStatus) !== null && _item$interceptLogist !== void 0 && _item$interceptLogist.reason ? /*#__PURE__*/React.createElement("span", {
|
|
76
76
|
style: {
|
|
77
|
-
color:
|
|
77
|
+
color: "red"
|
|
78
78
|
}
|
|
79
|
-
}, "\u5931\u8D25\u539F\u56E0\uFF1A", item === null || item === void 0 ? void 0 : (_item$interceptLogist3 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist3 === void 0 ? void 0 : _item$interceptLogist3.reason) : null) : null, item.interceptLogisticsSnapshot ? /*#__PURE__*/React.createElement("div", null, "\u5FEB\u7167\uFF1A", item.interceptLogisticsSnapshot) : null);
|
|
79
|
+
}, (_item$interceptLogist2 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist2 === void 0 ? void 0 : _item$interceptLogist2.status, " \u5931\u8D25\u539F\u56E0\uFF1A", item === null || item === void 0 ? void 0 : (_item$interceptLogist3 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist3 === void 0 ? void 0 : _item$interceptLogist3.reason) : /*#__PURE__*/React.createElement("span", null, (_item$interceptLogist4 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist4 === void 0 ? void 0 : _item$interceptLogist4.status)) : null, item.interceptLogisticsSnapshot ? /*#__PURE__*/React.createElement("div", null, "\u5FEB\u7167\uFF1A", item.interceptLogisticsSnapshot) : null);
|
|
80
80
|
}));
|
|
81
81
|
});
|
|
82
82
|
_defineProperty(this, "renderClient", function (record) {
|
|
@@ -106,7 +106,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
106
106
|
rules: _this.rules,
|
|
107
107
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
108
108
|
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,
|
|
109
|
-
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 :
|
|
109
|
+
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 : "",
|
|
110
110
|
component: /*#__PURE__*/React.createElement(LogisticsMoreInterception, _extends({}, _this.componentConfig, {
|
|
111
111
|
expressInterceptData: _this.expressInterceptData.getExpressData(),
|
|
112
112
|
isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing
|
|
@@ -115,9 +115,9 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
115
115
|
});
|
|
116
116
|
_defineProperty(this, "filterConfig", function (item) {
|
|
117
117
|
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
118
|
-
subKey:
|
|
118
|
+
subKey: "logisticsInterceptCompanyList"
|
|
119
119
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
120
|
-
subKey:
|
|
120
|
+
subKey: "logisticsInterceptCodeList"
|
|
121
121
|
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
|
|
122
122
|
});
|
|
123
123
|
this.name = options.name;
|
|
@@ -142,15 +142,15 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
142
142
|
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
143
143
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
144
144
|
id: "".concat(options.id, "_logisticsInterceptCompanyList"),
|
|
145
|
-
name:
|
|
145
|
+
name: "物流信息"
|
|
146
146
|
}));
|
|
147
147
|
this.expressCode = new InterceptCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
148
148
|
id: "".concat(options.id, "_logisticsInterceptCodeList"),
|
|
149
|
-
name:
|
|
149
|
+
name: "物流单号"
|
|
150
150
|
}));
|
|
151
151
|
this.isCombinationComponent = true;
|
|
152
152
|
this.canSort = false;
|
|
153
|
-
this.dataType =
|
|
153
|
+
this.dataType = "object";
|
|
154
154
|
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot];
|
|
155
155
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
156
156
|
required: (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required,
|
|
@@ -158,12 +158,12 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
158
158
|
if (value.some(function (t) {
|
|
159
159
|
return !(t !== null && t !== void 0 && t.interceptCompany) || !(t !== null && t !== void 0 && t.interceptCode);
|
|
160
160
|
})) {
|
|
161
|
-
return Promise.reject(new Error(
|
|
161
|
+
return Promise.reject(new Error("请填写物流信息"));
|
|
162
162
|
}
|
|
163
163
|
if (value.some(function (t) {
|
|
164
164
|
return !(t !== null && t !== void 0 && t.interceptType);
|
|
165
165
|
})) {
|
|
166
|
-
return Promise.reject(new Error(
|
|
166
|
+
return Promise.reject(new Error("请选择拦截类型"));
|
|
167
167
|
}
|
|
168
168
|
var hasNoAddress = value.some(function (t) {
|
|
169
169
|
var _t$interceptAddress;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, KmErpSendGood, AfterSalesOrderId } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonDataTime | CommonInput | CommonMultiStatus | CommonSystemOrder | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | PaymentVoucherCode | Label | KmErpSendGood;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.17.5-beta.
|
|
3
|
+
"version": "1.17.5-beta.8",
|
|
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.17.5-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.17.5-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.17.5-beta.8",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.17.5-beta.8",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "6bea58785e9f071f4b7ef646744bbd1cf7387fc0",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|