@kmkf-fe-packages/services-components 1.17.5-beta.0 → 1.17.5-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/LogisticsInterception/InterceptApiStatus.d.ts +38 -0
- package/dist/esm/components/LogisticsInterception/InterceptApiStatus.js +115 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +3 -0
- package/dist/esm/components/LogisticsInterception/index.js +8 -4
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.d.ts +38 -0
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +115 -0
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +2 -0
- package/dist/esm/components/LogisticsMoreInterception/index.js +11 -4
- package/package.json +4 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class InterceptApiStatus implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: 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
|
+
formField: string;
|
|
15
|
+
canSort: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
options: ComponentInterface["options"];
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: any, record: Record) => React.JSX.Element | "--";
|
|
23
|
+
renderLog: (r: Record) => React.JSX.Element | "--" | null;
|
|
24
|
+
renderExport: (value: any, record: Record) => any;
|
|
25
|
+
editRender: () => null;
|
|
26
|
+
filterConfig: (item: ColumnConfig) => {
|
|
27
|
+
searchDefaultConditions: "in";
|
|
28
|
+
type: string;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
filterComponentType: "MultipleSelect";
|
|
32
|
+
props: {
|
|
33
|
+
options: any[];
|
|
34
|
+
};
|
|
35
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export default InterceptApiStatus;
|
|
@@ -0,0 +1,115 @@
|
|
|
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 } from "../../constant";
|
|
12
|
+
var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, InterceptApiStatus);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "sortField", 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, "formField", void 0);
|
|
26
|
+
_defineProperty(this, "canSort", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "options", void 0);
|
|
30
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
31
|
+
var _r$interceptLogistics;
|
|
32
|
+
return r === null || r === void 0 ? void 0 : (_r$interceptLogistics = r.interceptLogisticsApiStatus) === null || _r$interceptLogistics === void 0 ? void 0 : _r$interceptLogistics.status;
|
|
33
|
+
});
|
|
34
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
35
|
+
var _record$interceptLogi, _record$interceptLogi2, _record$interceptLogi3, _record$interceptLogi4, _record$interceptLogi5;
|
|
36
|
+
var status = record === null || record === void 0 ? void 0 : (_record$interceptLogi = record.interceptLogisticsApiStatus) === null || _record$interceptLogi === void 0 ? void 0 : _record$interceptLogi.status;
|
|
37
|
+
var statusColor = status === "成功" ? "#52c41a" : "#ff4d4f";
|
|
38
|
+
return !isNull(record === null || record === void 0 ? void 0 : (_record$interceptLogi2 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi2 === void 0 ? void 0 : _record$interceptLogi2.status) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
39
|
+
id: _this.id,
|
|
40
|
+
label: _this.name,
|
|
41
|
+
value: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
style: {
|
|
43
|
+
color: statusColor
|
|
44
|
+
}
|
|
45
|
+
}, record === null || record === void 0 ? void 0 : (_record$interceptLogi3 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi3 === void 0 ? void 0 : _record$interceptLogi3.status, record !== null && record !== void 0 && (_record$interceptLogi4 = record.interceptLogisticsApiStatus) !== null && _record$interceptLogi4 !== void 0 && _record$interceptLogi4.reason ? /*#__PURE__*/React.createElement("span", {
|
|
46
|
+
className: "c-red"
|
|
47
|
+
}, ",", (record === null || record === void 0 ? void 0 : (_record$interceptLogi5 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi5 === void 0 ? void 0 : _record$interceptLogi5.reason) || "") : null))
|
|
48
|
+
}) : null;
|
|
49
|
+
});
|
|
50
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
51
|
+
var _record$interceptLogi6, _record$interceptLogi7, _record$interceptLogi8, _record$interceptLogi9;
|
|
52
|
+
console.log('renderPc', record);
|
|
53
|
+
var status = record === null || record === void 0 ? void 0 : (_record$interceptLogi6 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi6 === void 0 ? void 0 : _record$interceptLogi6.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$interceptLogi7 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi7 === void 0 ? void 0 : _record$interceptLogi7.status, record !== null && record !== void 0 && (_record$interceptLogi8 = record.interceptLogisticsApiStatus) !== null && _record$interceptLogi8 !== void 0 && _record$interceptLogi8.reason ? /*#__PURE__*/React.createElement("span", {
|
|
60
|
+
className: "c-red"
|
|
61
|
+
}, ",", (record === null || record === void 0 ? void 0 : (_record$interceptLogi9 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi9 === void 0 ? void 0 : _record$interceptLogi9.reason) || "") : null)) : "--";
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
64
|
+
var _r$interceptLogistics2;
|
|
65
|
+
if (isNull(r === null || r === void 0 ? void 0 : (_r$interceptLogistics2 = r.interceptLogisticsApiStatus) === null || _r$interceptLogistics2 === void 0 ? void 0 : _r$interceptLogistics2.status)) return null;
|
|
66
|
+
return _this.renderPc(undefined, r);
|
|
67
|
+
});
|
|
68
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
69
|
+
var _record$interceptLogi10, _record$interceptLogi11;
|
|
70
|
+
console.log('renderExport', record);
|
|
71
|
+
return (_record$interceptLogi10 = record === null || record === void 0 ? void 0 : (_record$interceptLogi11 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi11 === void 0 ? void 0 : _record$interceptLogi11.status) !== null && _record$interceptLogi10 !== void 0 ? _record$interceptLogi10 : "--";
|
|
72
|
+
});
|
|
73
|
+
_defineProperty(this, "editRender", function () {
|
|
74
|
+
return null;
|
|
75
|
+
});
|
|
76
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
77
|
+
return {
|
|
78
|
+
searchDefaultConditions: SYMBOL.in,
|
|
79
|
+
type: item.type,
|
|
80
|
+
id: "".concat(item.id, "_interceptLogisticsApiStatus"),
|
|
81
|
+
name: "".concat(item.name, "-\u63A5\u53E3\u72B6\u6001"),
|
|
82
|
+
filterComponentType: "MultipleSelect",
|
|
83
|
+
props: {
|
|
84
|
+
options: _this.options || []
|
|
85
|
+
},
|
|
86
|
+
filterFn: function filterFn(value) {
|
|
87
|
+
return function (i) {
|
|
88
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "status"));
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
this.name = "接口状态";
|
|
94
|
+
this.id = "".concat(options.id, "_interceptLogisticsApiStatus");
|
|
95
|
+
this.sortField = "".concat(options.id, "_interceptLogisticsApiStatus");
|
|
96
|
+
this.formField = "".concat(options.id, "_interceptLogisticsApiStatus");
|
|
97
|
+
this.type = options.type;
|
|
98
|
+
this.componentConfig = options.componentConfig;
|
|
99
|
+
this.rules = [];
|
|
100
|
+
this.align = "left";
|
|
101
|
+
this.width = 200;
|
|
102
|
+
this.isCombinationComponent = false;
|
|
103
|
+
this.canSort = true;
|
|
104
|
+
this.children = [];
|
|
105
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
106
|
+
this.dataType = "string";
|
|
107
|
+
this.options = [{
|
|
108
|
+
label: "成功",
|
|
109
|
+
value: "成功"
|
|
110
|
+
}, {
|
|
111
|
+
label: "失败",
|
|
112
|
+
value: "失败"
|
|
113
|
+
}];
|
|
114
|
+
});
|
|
115
|
+
export default InterceptApiStatus;
|
|
@@ -7,6 +7,7 @@ import InterceptAddress from "./InterceptAddress";
|
|
|
7
7
|
import InterceptType from "./InterceptType";
|
|
8
8
|
import InterceptStatus from "./InterceptStatus";
|
|
9
9
|
import InterceptState from "./InterceptState";
|
|
10
|
+
import InterceptApiStatus from "./InterceptApiStatus";
|
|
10
11
|
import Express from "../Express";
|
|
11
12
|
import ExpressCode from "../ExpressCode";
|
|
12
13
|
declare class Logistics implements ComponentInterface {
|
|
@@ -20,6 +21,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
20
21
|
interceptAddress: InterceptAddress;
|
|
21
22
|
interceptType: InterceptType;
|
|
22
23
|
interceptLogisticsStatus: InterceptStatus;
|
|
24
|
+
interceptApiStatus: InterceptApiStatus;
|
|
23
25
|
interceptSenderMobile: InterceptSenderMobile;
|
|
24
26
|
interceptSnapshot: InterceptSnapshot;
|
|
25
27
|
interceptState: InterceptState;
|
|
@@ -43,6 +45,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
43
45
|
interceptSenderMobile: any;
|
|
44
46
|
interceptType: any;
|
|
45
47
|
interceptLogisticsStatus: any;
|
|
48
|
+
interceptApiStatus: any;
|
|
46
49
|
interceptRedirectTo: {
|
|
47
50
|
province: any;
|
|
48
51
|
city: any;
|
|
@@ -18,6 +18,7 @@ import InterceptAddress from "./InterceptAddress";
|
|
|
18
18
|
import InterceptType from "./InterceptType";
|
|
19
19
|
import InterceptStatus from "./InterceptStatus";
|
|
20
20
|
import InterceptState from "./InterceptState";
|
|
21
|
+
import InterceptApiStatus from "./InterceptApiStatus";
|
|
21
22
|
import Express from "../Express";
|
|
22
23
|
import ExpressCode from "../ExpressCode";
|
|
23
24
|
import ColumnHeader from "./columnHeader";
|
|
@@ -34,6 +35,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
34
35
|
_defineProperty(this, "interceptAddress", void 0);
|
|
35
36
|
_defineProperty(this, "interceptType", void 0);
|
|
36
37
|
_defineProperty(this, "interceptLogisticsStatus", void 0);
|
|
38
|
+
_defineProperty(this, "interceptApiStatus", void 0);
|
|
37
39
|
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
38
40
|
_defineProperty(this, "interceptSnapshot", void 0);
|
|
39
41
|
_defineProperty(this, "interceptState", void 0);
|
|
@@ -49,10 +51,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
49
51
|
_defineProperty(this, "effects", void 0);
|
|
50
52
|
_defineProperty(this, "dataType", void 0);
|
|
51
53
|
_defineProperty(this, "renderClient", function (record) {
|
|
52
|
-
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.interceptSnapshot.renderClient(record), _this.interceptState.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 === null || record === void 0 ? void 0 : record[_this.id]), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record));
|
|
53
55
|
});
|
|
54
56
|
_defineProperty(this, "renderLog", function (record) {
|
|
55
|
-
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.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))));
|
|
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 === null || record === void 0 ? void 0 : record[_this.id])) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatus.name, ":", " ", _this.interceptApiStatus.renderLog(record === null || record === void 0 ? void 0 : record[_this.id]))), /*#__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))));
|
|
56
58
|
});
|
|
57
59
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
58
60
|
return {
|
|
@@ -61,6 +63,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
61
63
|
interceptSenderMobile: _this.interceptSenderMobile.getComponentValue(r),
|
|
62
64
|
interceptType: _this.interceptType.getComponentValue(r),
|
|
63
65
|
interceptLogisticsStatus: _this.interceptLogisticsStatus.getComponentValue(r),
|
|
66
|
+
interceptApiStatus: _this.interceptApiStatus.getComponentValue(r === null || r === void 0 ? void 0 : r[_this.id]),
|
|
64
67
|
interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
|
|
65
68
|
interceptSnapshot: _this.interceptSnapshot.getComponentValue(r),
|
|
66
69
|
interceptState: _this.interceptState.getComponentValue(r)
|
|
@@ -95,7 +98,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
95
98
|
subKey: "interceptCompany"
|
|
96
99
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
97
100
|
subKey: "interceptCode"
|
|
98
|
-
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)];
|
|
101
|
+
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)];
|
|
99
102
|
});
|
|
100
103
|
this.name = options.name;
|
|
101
104
|
this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
|
|
@@ -113,6 +116,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
113
116
|
this.interceptAddress = new InterceptAddress(options);
|
|
114
117
|
this.interceptType = new InterceptType(options);
|
|
115
118
|
this.interceptLogisticsStatus = new InterceptStatus(options);
|
|
119
|
+
this.interceptApiStatus = new InterceptApiStatus(options);
|
|
116
120
|
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
117
121
|
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
118
122
|
this.interceptState = new InterceptState(options);
|
|
@@ -127,7 +131,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
127
131
|
this.isCombinationComponent = true;
|
|
128
132
|
this.canSort = false;
|
|
129
133
|
this.dataType = "object";
|
|
130
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot, this.interceptState];
|
|
134
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptState];
|
|
131
135
|
this.rules = [{
|
|
132
136
|
validator: function validator(_, value) {
|
|
133
137
|
var _this$componentConfig5, _this$componentConfig6, _value$interceptAddre, _value$interceptSende;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class InterceptApiStatus implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: 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
|
+
formField: string;
|
|
15
|
+
canSort: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
options: ComponentInterface["options"];
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: any, record: Record) => React.JSX.Element | "--";
|
|
23
|
+
renderLog: (r: Record) => React.JSX.Element | "--" | null;
|
|
24
|
+
renderExport: (value: any, record: Record) => any;
|
|
25
|
+
editRender: () => null;
|
|
26
|
+
filterConfig: (item: ColumnConfig) => {
|
|
27
|
+
searchDefaultConditions: "in";
|
|
28
|
+
type: string;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
filterComponentType: "MultipleSelect";
|
|
32
|
+
props: {
|
|
33
|
+
options: any[];
|
|
34
|
+
};
|
|
35
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export default InterceptApiStatus;
|
|
@@ -0,0 +1,115 @@
|
|
|
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 } from "../../constant";
|
|
12
|
+
var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, InterceptApiStatus);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "sortField", 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, "formField", void 0);
|
|
26
|
+
_defineProperty(this, "canSort", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "options", void 0);
|
|
30
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
31
|
+
var _r$_this$id;
|
|
32
|
+
console.log('getComponentValue', r);
|
|
33
|
+
return r === null || r === void 0 ? void 0 : (_r$_this$id = r[_this.id]) === null || _r$_this$id === void 0 ? void 0 : _r$_this$id.status;
|
|
34
|
+
});
|
|
35
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
36
|
+
var _record$_this$id, _record$_this$id2, _record$_this$id3, _record$_this$id4, _record$_this$id5;
|
|
37
|
+
var status = record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.status;
|
|
38
|
+
var statusColor = status === "成功" ? "#52c41a" : "#ff4d4f";
|
|
39
|
+
return !isNull(record === null || record === void 0 ? void 0 : (_record$_this$id2 = record[_this.id]) === null || _record$_this$id2 === void 0 ? void 0 : _record$_this$id2.status) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
40
|
+
id: _this.id,
|
|
41
|
+
label: _this.name,
|
|
42
|
+
value: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
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", {
|
|
47
|
+
className: "c-red"
|
|
48
|
+
}, ",", (record === null || record === void 0 ? void 0 : (_record$_this$id5 = record[_this.id]) === null || _record$_this$id5 === void 0 ? void 0 : _record$_this$id5.reason) || "") : null))
|
|
49
|
+
}) : null;
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
52
|
+
var _record$_this$id6, _record$_this$id7, _record$_this$id8, _record$_this$id9;
|
|
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)) : "--";
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
64
|
+
var _r$_this$id2;
|
|
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);
|
|
67
|
+
});
|
|
68
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
69
|
+
var _record$_this$id$stat, _record$_this$id10;
|
|
70
|
+
console.log('renderExport', record);
|
|
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 : "--";
|
|
72
|
+
});
|
|
73
|
+
_defineProperty(this, "editRender", function () {
|
|
74
|
+
return null;
|
|
75
|
+
});
|
|
76
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
77
|
+
return {
|
|
78
|
+
searchDefaultConditions: SYMBOL.in,
|
|
79
|
+
type: item.type,
|
|
80
|
+
id: "".concat(item.id, "_logisticsInterceptApiStatusList"),
|
|
81
|
+
name: "".concat(item.name, "-\u63A5\u53E3\u72B6\u6001"),
|
|
82
|
+
filterComponentType: "MultipleSelect",
|
|
83
|
+
props: {
|
|
84
|
+
options: _this.options || []
|
|
85
|
+
},
|
|
86
|
+
filterFn: function filterFn(value) {
|
|
87
|
+
return function (i) {
|
|
88
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "status"));
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
this.name = "接口状态";
|
|
94
|
+
this.id = "".concat(options.id, "_interceptLogisticsApiStatus");
|
|
95
|
+
this.sortField = "".concat(options.id, "_interceptLogisticsApiStatus");
|
|
96
|
+
this.formField = "".concat(options.id, "_interceptLogisticsApiStatus");
|
|
97
|
+
this.type = options.type;
|
|
98
|
+
this.componentConfig = options.componentConfig;
|
|
99
|
+
this.rules = [];
|
|
100
|
+
this.align = "left";
|
|
101
|
+
this.width = 200;
|
|
102
|
+
this.isCombinationComponent = false;
|
|
103
|
+
this.canSort = true;
|
|
104
|
+
this.children = [];
|
|
105
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
106
|
+
this.dataType = "string";
|
|
107
|
+
this.options = [{
|
|
108
|
+
label: "成功",
|
|
109
|
+
value: "成功"
|
|
110
|
+
}, {
|
|
111
|
+
label: "失败",
|
|
112
|
+
value: "失败"
|
|
113
|
+
}];
|
|
114
|
+
});
|
|
115
|
+
export default InterceptApiStatus;
|
|
@@ -7,6 +7,7 @@ import InterceptAddress from './InterceptAddress';
|
|
|
7
7
|
import InterceptType from './InterceptType';
|
|
8
8
|
import InterceptStatus from './InterceptStatus';
|
|
9
9
|
import InterceptCode from './interceptCode';
|
|
10
|
+
import InterceptApiStatus from "./InterceptApiStatus";
|
|
10
11
|
import Express from './interceptCompany';
|
|
11
12
|
declare class Logistics implements ComponentInterface {
|
|
12
13
|
name: string;
|
|
@@ -19,6 +20,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
19
20
|
interceptAddress: InterceptAddress;
|
|
20
21
|
interceptType: InterceptType;
|
|
21
22
|
interceptLogisticsStatus: InterceptStatus;
|
|
23
|
+
interceptApiStatus: InterceptApiStatus;
|
|
22
24
|
interceptSenderMobile: InterceptSenderMobile;
|
|
23
25
|
interceptSnapshot: InterceptSnapshot;
|
|
24
26
|
isCombinationComponent: boolean;
|
|
@@ -20,6 +20,7 @@ import InterceptAddress from "./InterceptAddress";
|
|
|
20
20
|
import InterceptType from "./InterceptType";
|
|
21
21
|
import InterceptStatus from "./InterceptStatus";
|
|
22
22
|
import InterceptCode from "./interceptCode";
|
|
23
|
+
import InterceptApiStatus from "./InterceptApiStatus";
|
|
23
24
|
import Express from "./interceptCompany";
|
|
24
25
|
import ColumnHeader from "./columnHeader";
|
|
25
26
|
import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
|
|
@@ -39,6 +40,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
39
40
|
_defineProperty(this, "interceptAddress", void 0);
|
|
40
41
|
_defineProperty(this, "interceptType", void 0);
|
|
41
42
|
_defineProperty(this, "interceptLogisticsStatus", void 0);
|
|
43
|
+
_defineProperty(this, "interceptApiStatus", void 0);
|
|
42
44
|
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
43
45
|
_defineProperty(this, "interceptSnapshot", void 0);
|
|
44
46
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
@@ -59,7 +61,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
59
61
|
return /*#__PURE__*/React.createElement(Space, {
|
|
60
62
|
wrap: true
|
|
61
63
|
}, list.map(function (item, index) {
|
|
62
|
-
var _ref, _item$interceptAddres, _this$expressIntercep;
|
|
64
|
+
var _ref, _item$interceptAddres, _this$expressIntercep, _item$interceptLogist, _item$interceptLogist2, _item$interceptLogist3;
|
|
63
65
|
var addressText = (_ref = item.interceptAddress || []) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
|
|
64
66
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
65
67
|
}).join('');
|
|
@@ -70,7 +72,11 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
70
72
|
interceptCompany: item.interceptCompany,
|
|
71
73
|
interceptCode: item.interceptCode,
|
|
72
74
|
interceptSenderMobile: item.interceptSenderMobile
|
|
73
|
-
})) : null, item.
|
|
75
|
+
})) : null, item.interceptLogisticsApiStatus ? /*#__PURE__*/React.createElement("div", null, "\u63A5\u53E3\u72B6\u6001:", (_item$interceptLogist = item.interceptLogisticsApiStatus) === null || _item$interceptLogist === void 0 ? void 0 : _item$interceptLogist.status, " ", (_item$interceptLogist2 = item.interceptLogisticsApiStatus) !== null && _item$interceptLogist2 !== void 0 && _item$interceptLogist2.reason ? /*#__PURE__*/React.createElement("span", {
|
|
76
|
+
style: {
|
|
77
|
+
color: 'red'
|
|
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);
|
|
74
80
|
}));
|
|
75
81
|
});
|
|
76
82
|
_defineProperty(this, "renderClient", function (record) {
|
|
@@ -112,7 +118,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
112
118
|
subKey: 'logisticsInterceptCompanyList'
|
|
113
119
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
114
120
|
subKey: 'logisticsInterceptCodeList'
|
|
115
|
-
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
|
|
121
|
+
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
|
|
116
122
|
});
|
|
117
123
|
this.name = options.name;
|
|
118
124
|
this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
|
|
@@ -131,6 +137,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
131
137
|
this.interceptAddress = new InterceptAddress(options);
|
|
132
138
|
this.interceptType = new InterceptType(options);
|
|
133
139
|
this.interceptLogisticsStatus = new InterceptStatus(options);
|
|
140
|
+
this.interceptApiStatus = new InterceptApiStatus(options);
|
|
134
141
|
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
135
142
|
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
136
143
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
@@ -144,7 +151,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
144
151
|
this.isCombinationComponent = true;
|
|
145
152
|
this.canSort = false;
|
|
146
153
|
this.dataType = 'object';
|
|
147
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot];
|
|
154
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot];
|
|
148
155
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
149
156
|
required: (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required,
|
|
150
157
|
validator: function validator(_, value) {
|
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.6",
|
|
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.6",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.17.5-beta.6",
|
|
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": "6f914a3e575fc16172f8a8354ffaf57595b25ee4",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|