@kmkf-fe-packages/services-components 0.6.3-alpha.55 → 0.6.3-alpha.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +5 -2
- package/dist/esm/components/LogisticsInterception/InterceptStatus.js +3 -1
- package/dist/esm/components/LogisticsInterception/columnHeader.js +14 -2
- package/dist/esm/components/LogisticsInterception/index.d.ts +3 -0
- package/dist/esm/components/LogisticsInterception/index.js +15 -4
- package/dist/esm/components/LogisticsInterception/interceptSenderMobile.d.ts +30 -0
- package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +74 -0
- package/package.json +4 -4
|
@@ -46,6 +46,9 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
|
46
46
|
mailNo: interceptCode,
|
|
47
47
|
cpCode: interceptCompany,
|
|
48
48
|
mobile: interceptReceiverMobile
|
|
49
|
+
},
|
|
50
|
+
handleError: function handleError(msg) {
|
|
51
|
+
msg && message.error(msg);
|
|
49
52
|
}
|
|
50
53
|
}).then(function (res) {
|
|
51
54
|
var result = res.result,
|
|
@@ -61,11 +64,11 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
|
61
64
|
content: LogisticsList(data)
|
|
62
65
|
});
|
|
63
66
|
} else {
|
|
64
|
-
message.error(message);
|
|
67
|
+
message && message.error(message);
|
|
65
68
|
}
|
|
66
69
|
});
|
|
67
70
|
} catch (err) {
|
|
68
|
-
message.error(err === null || err === void 0 ? void 0 : err.message);
|
|
71
|
+
(err === null || err === void 0 ? void 0 : err.message) && message.error(err === null || err === void 0 ? void 0 : err.message);
|
|
69
72
|
}
|
|
70
73
|
case 3:
|
|
71
74
|
case "end":
|
|
@@ -29,12 +29,14 @@ var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options
|
|
|
29
29
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
30
30
|
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
31
31
|
});
|
|
32
|
-
_defineProperty(this, "renderStatus", function (record
|
|
32
|
+
_defineProperty(this, "renderStatus", function (record) {
|
|
33
33
|
var _this$expressIntercep;
|
|
34
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
34
35
|
var interceptCode = "".concat(_this.parentId, "_interceptCode");
|
|
35
36
|
var interceptReceiverMobile = "".concat(_this.parentId, "_interceptReceiverMobile");
|
|
36
37
|
var value = (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep["".concat(record === null || record === void 0 ? void 0 : record[_this.id])];
|
|
37
38
|
return /*#__PURE__*/React.createElement("div", null, value !== null && value !== void 0 ? value : "--", value ? /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
|
|
39
|
+
modelWidth: w,
|
|
38
40
|
interceptCompany: record[_this.companyId],
|
|
39
41
|
interceptCode: record[interceptCode],
|
|
40
42
|
interceptReceiverMobile: record[interceptReceiverMobile]
|
|
@@ -30,11 +30,23 @@ var ColumnHeader = function ColumnHeader(_ref) {
|
|
|
30
30
|
return setVisible(false);
|
|
31
31
|
},
|
|
32
32
|
footer: null
|
|
33
|
-
}, /*#__PURE__*/React.createElement("p", null, "\u7269\u6D41\u516C\u53F8\uFF1A\u672C\u6B21\u5DE5\u5355\u9700\u8981\u62E6\u622A\u7684\u7269\u6D41\u516C\u53F8\u540D\u79F0"), /*#__PURE__*/React.createElement("p", null, "\u7269\u6D41\u5355\u53F7\uFF1A\u672C\u6B21\u5DE5\u5355\u9700\u8981\u62E6\u622A\u7684\u7269\u6D41\u5355\u53F7"), /*#__PURE__*/React.createElement("p", null, "\u62E6\u622A\u7C7B\u578B\uFF1A\u672C\u6B21\u62E6\u622A\u6240\u8981\u505A\u7684\u52A8\u4F5C\u662F\u4EC0\u4E48\uFF1B\u4F8B\u5982\uFF1A\u662F\u9000\u56DE\u8FD8\u662F\u8F6C\u5BC4"), /*#__PURE__*/React.createElement("
|
|
33
|
+
}, /*#__PURE__*/React.createElement("p", null, "\u7269\u6D41\u516C\u53F8\uFF1A\u672C\u6B21\u5DE5\u5355\u9700\u8981\u62E6\u622A\u7684\u7269\u6D41\u516C\u53F8\u540D\u79F0"), /*#__PURE__*/React.createElement("p", null, "\u7269\u6D41\u5355\u53F7\uFF1A\u672C\u6B21\u5DE5\u5355\u9700\u8981\u62E6\u622A\u7684\u7269\u6D41\u5355\u53F7"), /*#__PURE__*/React.createElement("p", null, "\u62E6\u622A\u7C7B\u578B\uFF1A\u672C\u6B21\u62E6\u622A\u6240\u8981\u505A\u7684\u52A8\u4F5C\u662F\u4EC0\u4E48\uFF1B\u4F8B\u5982\uFF1A\u662F\u9000\u56DE\u8FD8\u662F\u8F6C\u5BC4"), /*#__PURE__*/React.createElement("div", null, "\u6D3E\u9001\u5730\u5740\uFF1A"), /*#__PURE__*/React.createElement("div", null, "\u4E2D\u901A/\u987A\u4E30\uFF1A\u5982\u679C\u62E6\u622A\u7C7B\u578B\u4E3A\u8F6C\u5BC4\u7684\u8BDD\uFF0C\u9700\u8981\u586B\u5199\u65B0\u7684\u6D3E\u9001\u5730\u5740\uFF1B\u5982\u679C\u62E6\u622A\u7C7B\u578B\u4E3A\u9000\u56DE\u5219\u4E0D\u9700\u8981"), /*#__PURE__*/React.createElement("p", null, "\u6781\u5154\uFF1A\u65E0\u8BBA\u54EA\u79CD\u7C7B\u578B\u90FD\u9700\u8981\u586B\u5199\u6D3E\u9001\u5730\u5740"), /*#__PURE__*/React.createElement("p", null, "\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7\uFF1A\u5982\u679C\u7269\u6D41\u516C\u53F8\u4E3A\u987A\u4E30\uFF0C\u5219\u9700\u8981\u586B\u5199\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7\uFF0C\u7528\u6765\u67E5\u8BE2 \u7269\u6D41\u8F68\u8FF9"), /*#__PURE__*/React.createElement("p", null, "\u7269\u6D41\u72B6\u6001\uFF1A\u62E6\u622A\u5F53\u524D\u8FD9\u4E2A\u7269\u6D41\u5355\u53F7\u7684\u7269\u6D41\u8F68\u8FF9\u72B6\u6001\uFF08", /*#__PURE__*/React.createElement("span", {
|
|
34
34
|
style: {
|
|
35
35
|
color: "#ff4d4f"
|
|
36
36
|
}
|
|
37
|
-
}, "\u62E6\u622A\u6210\u529F\u548C\u62E6\u622A\u5931\u7684\u7269\u6D41\u72B6\u6001\u90FD\u4E3A\u6700\u7EC8\u72B6\u6001\uFF0C\u4E0D\
|
|
37
|
+
}, "\u62E6\u622A\u6210\u529F\u548C\u62E6\u622A\u5931\u8D25\u7684\u7269\u6D41\u72B6\u6001\u90FD\u4E3A\u6700\u7EC8\u72B6\u6001\uFF0C\u4E0D\u518D\u505A\u66F4\u65B0\uFF0C\u53EF\u901A\u8FC7\u67E5\u8BE2\u7269\u6D41\u8F68\u8FF9\u6765\u83B7\u53D6\u6700\u65B0\u7269\u6D41\u72B6\u6001"), "\uFF09\uFF0C\u53EF\u4EE5\u901A\u8FC7\u67E5\u770B\u8BE5\u72B6\u6001\u6765\u5224\u65AD\u6B64\u6B21\u62E6\u622A\u662F\u5426\u6210\u529F\uFF08\u5BF9\u5173\u7CFB\u5982\u4E0B\uFF09"), /*#__PURE__*/React.createElement("p", null, "1.", /*#__PURE__*/React.createElement("b", {
|
|
38
|
+
style: {
|
|
39
|
+
color: "#1890ff"
|
|
40
|
+
}
|
|
41
|
+
}, "\u62E6\u622A\u4E2D"), "\uFF1A\u62E6\u622A\u8BF7\u6C42\u5DF2\u7ECF\u53D1\u9001\u7ED9\u5FEB\u9012\u516C\u53F8\uFF0C\u7269\u6D41\u72B6\u6001\u5927\u6982\u4E3A", /*#__PURE__*/React.createElement("b", null, "\u3010\u63A5\u5355\u4E2D\u3001\u5F85\u63FD\u6536\u3001\u5DF2\u63FD\u6536\u3001\u8FD0\u8F93\u4E2D\u3001\u5230\u8FBE\u76EE\u7684\u57CE\u5E02\u3001\u5305\u88F9\u5F02\u5E38\u3001\u95EE\u9898\u4EF6\u3001\u7834\u635F\u3011")), /*#__PURE__*/React.createElement("p", null, "2.", /*#__PURE__*/React.createElement("b", {
|
|
42
|
+
style: {
|
|
43
|
+
color: "#1890ff"
|
|
44
|
+
}
|
|
45
|
+
}, "\u62E6\u622A\u6210\u529F"), "\uFF1A\u8BE5\u7269\u6D41\u5355\u53F7\u5DF2\u7ECF\u88AB\u6210\u529F\u62E6\u622A\uFF0C\u7269\u6D41\u72B6\u6001\u5927\u6982\u4E3A", /*#__PURE__*/React.createElement("b", null, "\u3010\u9000\u56DE\u7B7E\u6536\u3001\u9000\u56DE\u4EF6\u3001\u62E6\u622A\u53D6\u6D88\u3001\u8F6C\u5355\u6216\u8005\u4FEE\u6539\u5730\u5740\u8F6C\u5BC4\u3011")), /*#__PURE__*/React.createElement("p", null, "3.", /*#__PURE__*/React.createElement("b", {
|
|
46
|
+
style: {
|
|
47
|
+
color: "#1890ff"
|
|
48
|
+
}
|
|
49
|
+
}, "\u62E6\u622A\u5931\u8D25"), "\uFF1A\u8BE5\u7269\u6D41\u5355\u53F7\u51FA\u73B0\u5F02\u5E38\u6216\u8005\u88AB\u7B7E\u6536\uFF0C\u7269\u6D41\u72B6\u6001\u5927\u6982\u4E3A", /*#__PURE__*/React.createElement("b", null, "\u3010\u6D3E\u4EF6\u4E2D\u3001\u5DF2\u653E\u5165\u5FEB\u9012\u67DC\u6216\u9A7F\u7AD9\u3001\u5DF2\u4EE3\u7B7E\u6536\u3001\u5DF2\u7B7E\u6536\u3001\u4ECE\u5FEB\u9012\u67DC\u6216\u8005\u9A7F\u7AD9\u53D6\u51FA\u3001\u62D2\u6536\u3001\u6D3E\u4EF6\u5F02\u5E38\u3001\u6EDE\u7559\u4EF6\u3011")), /*#__PURE__*/React.createElement("p", {
|
|
38
50
|
style: {
|
|
39
51
|
color: "#ff4d4f"
|
|
40
52
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ExpressData, ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
4
5
|
import InterceptAddress from "./InterceptAddress";
|
|
5
6
|
import InterceptType from "./InterceptType";
|
|
6
7
|
import InterceptStatus from "./InterceptStatus";
|
|
@@ -16,6 +17,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
16
17
|
interceptAddress: InterceptAddress;
|
|
17
18
|
interceptType: InterceptType;
|
|
18
19
|
interceptLogisticsStatus: InterceptStatus;
|
|
20
|
+
interceptSenderMobile: InterceptSenderMobile;
|
|
19
21
|
isCombinationComponent: boolean;
|
|
20
22
|
children: ComponentInterface[];
|
|
21
23
|
express: Express;
|
|
@@ -29,6 +31,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
29
31
|
getComponentValue: (r: Record) => {
|
|
30
32
|
interceptCompany: any;
|
|
31
33
|
interceptCode: any;
|
|
34
|
+
interceptSenderMobile: any;
|
|
32
35
|
interceptType: any;
|
|
33
36
|
interceptLogisticsStatus: any;
|
|
34
37
|
interceptRedirectTo: {
|
|
@@ -12,6 +12,7 @@ import React from "react";
|
|
|
12
12
|
import { LogisticsInterception } from "@kmkf-fe-packages/basic-components";
|
|
13
13
|
import { ExpressData, ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import GetFormItem from "../GetFormItem";
|
|
15
|
+
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
15
16
|
import InterceptAddress from "./InterceptAddress";
|
|
16
17
|
import InterceptType from "./InterceptType";
|
|
17
18
|
import InterceptStatus from "./InterceptStatus";
|
|
@@ -30,6 +31,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
30
31
|
_defineProperty(this, "interceptAddress", void 0);
|
|
31
32
|
_defineProperty(this, "interceptType", void 0);
|
|
32
33
|
_defineProperty(this, "interceptLogisticsStatus", void 0);
|
|
34
|
+
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
33
35
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
34
36
|
_defineProperty(this, "children", void 0);
|
|
35
37
|
_defineProperty(this, "express", void 0);
|
|
@@ -38,15 +40,16 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
38
40
|
_defineProperty(this, "expressInterceptData", void 0);
|
|
39
41
|
_defineProperty(this, "effects", void 0);
|
|
40
42
|
_defineProperty(this, "renderClient", function (record) {
|
|
41
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record));
|
|
43
|
+
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));
|
|
42
44
|
});
|
|
43
45
|
_defineProperty(this, "renderLog", function (record) {
|
|
44
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record)));
|
|
46
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record)));
|
|
45
47
|
});
|
|
46
48
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
47
49
|
return {
|
|
48
50
|
interceptCompany: _this.express.getComponentValue(r),
|
|
49
51
|
interceptCode: _this.expressCode.getComponentValue(r),
|
|
52
|
+
interceptSenderMobile: _this.interceptSenderMobile.getComponentValue(r),
|
|
50
53
|
interceptType: _this.interceptType.getComponentValue(r),
|
|
51
54
|
interceptLogisticsStatus: _this.interceptLogisticsStatus.getComponentValue(r),
|
|
52
55
|
interceptRedirectTo: _this.interceptAddress.getComponentValue(r)
|
|
@@ -77,7 +80,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
77
80
|
subKey: "interceptCompany"
|
|
78
81
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
79
82
|
subKey: "interceptCode"
|
|
80
|
-
})), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item)];
|
|
83
|
+
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item)];
|
|
81
84
|
});
|
|
82
85
|
this.name = options.name;
|
|
83
86
|
this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
|
|
@@ -92,6 +95,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
92
95
|
this.interceptAddress = new InterceptAddress(options);
|
|
93
96
|
this.interceptType = new InterceptType(options);
|
|
94
97
|
this.interceptLogisticsStatus = new InterceptStatus(options);
|
|
98
|
+
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
95
99
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
96
100
|
id: "".concat(options.id, "_interceptCompany"),
|
|
97
101
|
name: "物流信息"
|
|
@@ -104,7 +108,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
104
108
|
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus];
|
|
105
109
|
this.rules = [{
|
|
106
110
|
validator: function validator(_, value) {
|
|
107
|
-
var _this$componentConfig3, _this$componentConfig4, _value$interceptAddre;
|
|
111
|
+
var _this$componentConfig3, _this$componentConfig4, _value$interceptAddre, _value$interceptSende;
|
|
108
112
|
if ((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required && (!(value !== null && value !== void 0 && value.interceptCompany) || !value.interceptCode)) {
|
|
109
113
|
return Promise.reject(new Error("请填写物流信息"));
|
|
110
114
|
}
|
|
@@ -115,6 +119,13 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
115
119
|
if (showAddress && (!(value !== null && value !== void 0 && (_value$interceptAddre = value.interceptAddress) !== null && _value$interceptAddre !== void 0 && _value$interceptAddre.length) || !(value !== null && value !== void 0 && value.interceptDetail) || !(value !== null && value !== void 0 && value.interceptReceiverName) || !(value !== null && value !== void 0 && value.interceptReceiverMobile))) {
|
|
116
120
|
return Promise.reject(new Error("请填写派送地址"));
|
|
117
121
|
}
|
|
122
|
+
var showSender = _this.expressInterceptData.getShowSenderMobileMap()["".concat(value === null || value === void 0 ? void 0 : value.interceptType)];
|
|
123
|
+
if (showSender && !(value !== null && value !== void 0 && value.interceptSenderMobile)) {
|
|
124
|
+
return Promise.reject(new Error("请填写发件人手机号"));
|
|
125
|
+
}
|
|
126
|
+
if (showSender && value !== null && value !== void 0 && value.interceptSenderMobile && !(value !== null && value !== void 0 && (_value$interceptSende = value.interceptSenderMobile) !== null && _value$interceptSende !== void 0 && _value$interceptSende.match(/^[1][0-9]{10}$/))) {
|
|
127
|
+
return Promise.reject(new Error("请填写正确发件人手机号"));
|
|
128
|
+
}
|
|
118
129
|
return Promise.resolve();
|
|
119
130
|
}
|
|
120
131
|
}];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class InterceptSenderMobile 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
|
+
children: ComponentInterface[];
|
|
15
|
+
constructor(options: PickOption);
|
|
16
|
+
getComponentValue: (r: Record) => any;
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: (value: any, record: Record) => any;
|
|
19
|
+
renderLog: (r: Record) => any;
|
|
20
|
+
renderExport: (value: any, record: Record) => any;
|
|
21
|
+
editRender: () => null;
|
|
22
|
+
filterConfig: (item: ColumnConfig) => {
|
|
23
|
+
type: string;
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
filterComponentType: "Input";
|
|
27
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export default InterceptSenderMobile;
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
var InterceptSenderMobile = /*#__PURE__*/_createClass(function InterceptSenderMobile(options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
_classCallCheck(this, InterceptSenderMobile);
|
|
14
|
+
_defineProperty(this, "name", void 0);
|
|
15
|
+
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "companyId", void 0);
|
|
17
|
+
_defineProperty(this, "type", void 0);
|
|
18
|
+
_defineProperty(this, "rules", void 0);
|
|
19
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
20
|
+
_defineProperty(this, "effects", void 0);
|
|
21
|
+
_defineProperty(this, "align", void 0);
|
|
22
|
+
_defineProperty(this, "width", void 0);
|
|
23
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
25
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
26
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
27
|
+
});
|
|
28
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
29
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
30
|
+
id: _this.id,
|
|
31
|
+
label: _this.name,
|
|
32
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
33
|
+
}) : null;
|
|
34
|
+
});
|
|
35
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
36
|
+
return record === null || record === void 0 ? void 0 : record[_this.id];
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
39
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
40
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
41
|
+
});
|
|
42
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
43
|
+
var _record;
|
|
44
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
|
|
45
|
+
});
|
|
46
|
+
_defineProperty(this, "editRender", function () {
|
|
47
|
+
return null;
|
|
48
|
+
});
|
|
49
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
50
|
+
return {
|
|
51
|
+
type: item.type,
|
|
52
|
+
id: "".concat(item.id, "_interceptSenderMobile"),
|
|
53
|
+
name: "".concat(item.name, "-\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7"),
|
|
54
|
+
filterComponentType: "Input",
|
|
55
|
+
filterFn: function filterFn(value) {
|
|
56
|
+
return function (i) {
|
|
57
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "interceptSenderMobile")).includes(value);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
this.name = "发件人手机号";
|
|
63
|
+
this.id = "".concat(options.id, "_interceptSenderMobile");
|
|
64
|
+
this.companyId = "".concat(options.id, "_interceptCompany");
|
|
65
|
+
this.type = options.type;
|
|
66
|
+
this.componentConfig = options.componentConfig;
|
|
67
|
+
this.rules = [];
|
|
68
|
+
this.align = "left";
|
|
69
|
+
this.width = 200;
|
|
70
|
+
this.isCombinationComponent = false;
|
|
71
|
+
this.children = [];
|
|
72
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
73
|
+
});
|
|
74
|
+
export default InterceptSenderMobile;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.6.3-alpha.
|
|
3
|
+
"version": "0.6.3-alpha.56",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.6.3-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.6.3-alpha.56",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.56"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "7ba5b29d26ca0e9048f88e7c5d2eb472a6bd70c6"
|
|
44
44
|
}
|