@kmkf-fe-packages/services-components 0.6.3-alpha.16 → 0.6.3-alpha.18
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/InterceptAddress.d.ts +1 -1
- package/dist/esm/components/LogisticsInterception/InterceptAddress.js +12 -8
- package/dist/esm/components/LogisticsInterception/InterceptStatus.d.ts +1 -1
- package/dist/esm/components/LogisticsInterception/InterceptStatus.js +7 -6
- package/dist/esm/components/LogisticsInterception/index.d.ts +8 -3
- package/dist/esm/components/LogisticsInterception/index.js +8 -3
- package/dist/esm/type.d.ts +3 -0
- package/package.json +2 -2
|
@@ -13,7 +13,7 @@ declare class PaymentTid implements ComponentInterface {
|
|
|
13
13
|
isCombinationComponent: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
originId: string;
|
|
16
|
-
addressDateInstance:
|
|
16
|
+
addressDateInstance: AddressData;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
render: (value: any, record: any) => JSX.Element | null;
|
|
19
19
|
renderClient: (record: any) => JSX.Element | null;
|
|
@@ -60,16 +60,20 @@ var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
|
|
|
60
60
|
}) : null;
|
|
61
61
|
});
|
|
62
62
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
63
|
-
|
|
63
|
+
var _ref3;
|
|
64
|
+
var province = record["".concat(_this.originId, "_interceptProvince")];
|
|
65
|
+
var city = record["".concat(_this.originId, "_interceptCity")];
|
|
66
|
+
var district = record["".concat(_this.originId, "_interceptDistrict")];
|
|
67
|
+
var detail = record["".concat(_this.originId, "_interceptDetail")];
|
|
68
|
+
var name = record["".concat(_this.originId, "_interceptReceiverName")];
|
|
69
|
+
var mobile = record["".concat(_this.originId, "_interceptReceiverMobile")];
|
|
70
|
+
if (province === undefined) {
|
|
64
71
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
65
72
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
|
|
71
|
-
}
|
|
72
|
-
}, value);
|
|
73
|
+
var addressText = (_ref3 = [province, city, district]) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (suffix) {
|
|
74
|
+
return _this.addressDateInstance.getNameByCode(suffix);
|
|
75
|
+
}).join("");
|
|
76
|
+
return /*#__PURE__*/React.createElement("span", null, "".concat(addressText).concat(detail), /*#__PURE__*/React.createElement("br", null), "".concat(name, " ").concat(mobile));
|
|
73
77
|
});
|
|
74
78
|
_defineProperty(this, "renderLog", function (r) {
|
|
75
79
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_interceptProvince")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_interceptDetail")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_interceptReceiverName")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_interceptReceiverMobile")])) return null;
|
|
@@ -13,7 +13,7 @@ declare class InterceptStatus implements ComponentInterface {
|
|
|
13
13
|
width: number;
|
|
14
14
|
isCombinationComponent: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
|
-
|
|
16
|
+
expressInterceptInstance: ExpressInterceptData;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
render: (value: any, record: any) => JSX.Element;
|
|
19
19
|
getComponentValue: (r: Record) => any;
|
|
@@ -23,7 +23,7 @@ var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options
|
|
|
23
23
|
_defineProperty(this, "width", void 0);
|
|
24
24
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
25
|
_defineProperty(this, "children", void 0);
|
|
26
|
-
_defineProperty(this, "
|
|
26
|
+
_defineProperty(this, "expressInterceptInstance", void 0);
|
|
27
27
|
_defineProperty(this, "render", function (value, record) {
|
|
28
28
|
return /*#__PURE__*/React.createElement("span", null, "TODO");
|
|
29
29
|
});
|
|
@@ -34,16 +34,17 @@ var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options
|
|
|
34
34
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
35
|
id: _this.id,
|
|
36
36
|
label: _this.name,
|
|
37
|
-
value: _this.
|
|
37
|
+
value: _this.expressInterceptInstance.getStatusNameMap()["".concat(record === null || record === void 0 ? void 0 : record[_this.companyId], "_").concat(record === null || record === void 0 ? void 0 : record[_this.id])]
|
|
38
38
|
}) : null;
|
|
39
39
|
});
|
|
40
40
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
41
|
-
var _this$
|
|
42
|
-
return (_this$
|
|
41
|
+
var _this$expressIntercep, _this$expressIntercep2;
|
|
42
|
+
return (_this$expressIntercep = (_this$expressIntercep2 = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep2 === void 0 ? void 0 : _this$expressIntercep2["".concat(record === null || record === void 0 ? void 0 : record[_this.companyId], "_").concat(record === null || record === void 0 ? void 0 : record[_this.id])]) !== null && _this$expressIntercep !== void 0 ? _this$expressIntercep : "--";
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(this, "renderLog", function (r) {
|
|
45
|
+
var _this$expressIntercep3;
|
|
45
46
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_interceptStatus")])) return null;
|
|
46
|
-
return _this.
|
|
47
|
+
return (_this$expressIntercep3 = _this.expressInterceptInstance.getTypeNameMap()) === null || _this$expressIntercep3 === void 0 ? void 0 : _this$expressIntercep3[r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_interceptStatus")]];
|
|
47
48
|
});
|
|
48
49
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
50
|
return _this.renderPc("", record);
|
|
@@ -65,6 +66,6 @@ var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options
|
|
|
65
66
|
this.isCombinationComponent = false;
|
|
66
67
|
this.children = [];
|
|
67
68
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
68
|
-
this.
|
|
69
|
+
this.expressInterceptInstance = ExpressInterceptData.getInstance();
|
|
69
70
|
});
|
|
70
71
|
export default InterceptStatus;
|
|
@@ -19,14 +19,19 @@ declare class Logistics implements ComponentInterface {
|
|
|
19
19
|
children: ComponentInterface[];
|
|
20
20
|
express: Express;
|
|
21
21
|
expressCode: ExpressCode;
|
|
22
|
-
expressDateInstance:
|
|
23
|
-
expressInterceptData:
|
|
22
|
+
expressDateInstance: ExpressData;
|
|
23
|
+
expressInterceptData: ExpressInterceptData;
|
|
24
24
|
effects: ComponentInterface["effects"];
|
|
25
25
|
constructor(options: PickOption);
|
|
26
26
|
render: () => null;
|
|
27
27
|
renderClient: (record: any) => JSX.Element;
|
|
28
28
|
renderLog: (record: any) => JSX.Element;
|
|
29
|
-
getComponentValue: (r: Record) => {
|
|
29
|
+
getComponentValue: (r: Record) => {
|
|
30
|
+
interceptCompany: any;
|
|
31
|
+
interceptCode: any;
|
|
32
|
+
interceptType: any;
|
|
33
|
+
interceptStatus: any;
|
|
34
|
+
};
|
|
30
35
|
renderPc: () => null;
|
|
31
36
|
renderExport: () => null;
|
|
32
37
|
editRender: (value: any) => JSX.Element;
|
|
@@ -45,7 +45,12 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
45
45
|
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderLog(record), _this.expressCode.renderLog(record), _this.interceptType.renderLog(record), _this.interceptAddress.renderLog(record), _this.interceptStatus.renderLog(record));
|
|
46
46
|
});
|
|
47
47
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
48
|
-
return {
|
|
48
|
+
return {
|
|
49
|
+
interceptCompany: _this.express.getComponentValue(r),
|
|
50
|
+
interceptCode: _this.expressCode.getComponentValue(r),
|
|
51
|
+
interceptType: _this.interceptType.getComponentValue(r),
|
|
52
|
+
interceptStatus: _this.interceptStatus.getComponentValue(r)
|
|
53
|
+
};
|
|
49
54
|
});
|
|
50
55
|
_defineProperty(this, "renderPc", function () {
|
|
51
56
|
return null;
|
|
@@ -90,7 +95,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
90
95
|
name: "物流单号"
|
|
91
96
|
}));
|
|
92
97
|
this.isCombinationComponent = true;
|
|
93
|
-
this.children = [this.express, this.expressCode, this.interceptAddress];
|
|
98
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptStatus];
|
|
94
99
|
this.rules = [{
|
|
95
100
|
validator: function validator(_, value) {
|
|
96
101
|
var _this$componentConfig3, _this$componentConfig4, _value$interceptAddre;
|
|
@@ -100,7 +105,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
100
105
|
if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required && !(value !== null && value !== void 0 && value.interceptType)) {
|
|
101
106
|
return Promise.reject(new Error("请选择拦截类型"));
|
|
102
107
|
}
|
|
103
|
-
var showAddress = _this.
|
|
108
|
+
var showAddress = _this.expressInterceptData.getShowNewAddressMap()["".concat(value === null || value === void 0 ? void 0 : value.interceptCompany, "_").concat(value === null || value === void 0 ? void 0 : value.interceptType)];
|
|
104
109
|
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))) {
|
|
105
110
|
return Promise.reject(new Error("请填写新派送地"));
|
|
106
111
|
}
|
package/dist/esm/type.d.ts
CHANGED
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.18",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "7db46b511fc26977de8a04e39ecccfe724d6fc32"
|
|
44
44
|
}
|