@kmkf-fe-packages/services-components 0.13.1 → 0.13.2
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/BS/BsPosting/components/City/index.js +4 -4
- package/dist/esm/components/BS/BsPosting/components/Detail/index.js +4 -4
- package/dist/esm/components/BS/BsPosting/components/District/index.js +4 -4
- package/dist/esm/components/BS/BsPosting/components/Province/index.js +4 -4
- package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.js +4 -4
- package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.js +4 -4
- package/dist/esm/components/BS/BsPosting/index.js +24 -6
- package/dist/esm/components/PostIng/index.d.ts +16 -3
- package/dist/esm/components/PostIng/index.js +89 -88
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +4 -0
- package/package.json +2 -2
|
@@ -57,10 +57,10 @@ var City = /*#__PURE__*/_createClass(function City(options) {
|
|
|
57
57
|
_defineProperty(this, "filterConfig", function () {
|
|
58
58
|
return [];
|
|
59
59
|
});
|
|
60
|
-
this.name =
|
|
61
|
-
this.id =
|
|
62
|
-
this.sortField =
|
|
63
|
-
this.formField =
|
|
60
|
+
this.name = options.name;
|
|
61
|
+
this.id = options.id;
|
|
62
|
+
this.sortField = options.id;
|
|
63
|
+
this.formField = options.id;
|
|
64
64
|
this.type = options.type;
|
|
65
65
|
this.isCombinationComponent = false;
|
|
66
66
|
this.canSort = false;
|
|
@@ -51,10 +51,10 @@ var Detail = /*#__PURE__*/_createClass(function Detail(options) {
|
|
|
51
51
|
_defineProperty(this, "filterConfig", function () {
|
|
52
52
|
return [];
|
|
53
53
|
});
|
|
54
|
-
this.name =
|
|
55
|
-
this.id =
|
|
56
|
-
this.sortField =
|
|
57
|
-
this.formField =
|
|
54
|
+
this.name = options.name;
|
|
55
|
+
this.id = options.id;
|
|
56
|
+
this.sortField = options.id;
|
|
57
|
+
this.formField = options.id;
|
|
58
58
|
this.type = options.type;
|
|
59
59
|
this.isCombinationComponent = false;
|
|
60
60
|
this.canSort = false;
|
|
@@ -57,10 +57,10 @@ var District = /*#__PURE__*/_createClass(function District(options) {
|
|
|
57
57
|
_defineProperty(this, "filterConfig", function () {
|
|
58
58
|
return [];
|
|
59
59
|
});
|
|
60
|
-
this.name =
|
|
61
|
-
this.id =
|
|
62
|
-
this.sortField =
|
|
63
|
-
this.formField =
|
|
60
|
+
this.name = options.name;
|
|
61
|
+
this.id = options.id;
|
|
62
|
+
this.sortField = options.id;
|
|
63
|
+
this.formField = options.id;
|
|
64
64
|
this.type = options.type;
|
|
65
65
|
this.isCombinationComponent = false;
|
|
66
66
|
this.canSort = false;
|
|
@@ -57,10 +57,10 @@ var Province = /*#__PURE__*/_createClass(function Province(options) {
|
|
|
57
57
|
_defineProperty(this, "filterConfig", function () {
|
|
58
58
|
return [];
|
|
59
59
|
});
|
|
60
|
-
this.name =
|
|
61
|
-
this.id =
|
|
62
|
-
this.sortField =
|
|
63
|
-
this.formField =
|
|
60
|
+
this.name = options.name;
|
|
61
|
+
this.id = options.id;
|
|
62
|
+
this.sortField = options.id;
|
|
63
|
+
this.formField = options.id;
|
|
64
64
|
this.type = options.type;
|
|
65
65
|
this.isCombinationComponent = false;
|
|
66
66
|
this.canSort = false;
|
|
@@ -51,10 +51,10 @@ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options)
|
|
|
51
51
|
_defineProperty(this, "filterConfig", function () {
|
|
52
52
|
return [];
|
|
53
53
|
});
|
|
54
|
-
this.name =
|
|
55
|
-
this.id =
|
|
56
|
-
this.sortField =
|
|
57
|
-
this.formField =
|
|
54
|
+
this.name = options.name;
|
|
55
|
+
this.id = options.id;
|
|
56
|
+
this.sortField = options.id;
|
|
57
|
+
this.formField = options.id;
|
|
58
58
|
this.type = options.type;
|
|
59
59
|
this.isCombinationComponent = false;
|
|
60
60
|
this.canSort = false;
|
|
@@ -51,10 +51,10 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
|
|
|
51
51
|
_defineProperty(this, "filterConfig", function () {
|
|
52
52
|
return [];
|
|
53
53
|
});
|
|
54
|
-
this.name =
|
|
55
|
-
this.id =
|
|
56
|
-
this.sortField =
|
|
57
|
-
this.formField =
|
|
54
|
+
this.name = options.name;
|
|
55
|
+
this.id = options.id;
|
|
56
|
+
this.sortField = options.id;
|
|
57
|
+
this.formField = options.id;
|
|
58
58
|
this.type = options.type;
|
|
59
59
|
this.isCombinationComponent = false;
|
|
60
60
|
this.canSort = false;
|
|
@@ -86,12 +86,30 @@ var BsPosting = /*#__PURE__*/_createClass(function BsPosting(options) {
|
|
|
86
86
|
this.canSort = false;
|
|
87
87
|
this.children = [];
|
|
88
88
|
this.dataType = "object";
|
|
89
|
-
this.province = new Province(_objectSpread({}, options)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
this.
|
|
94
|
-
|
|
89
|
+
this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
|
|
90
|
+
id: "".concat(options.id, "_bsPostingProvince"),
|
|
91
|
+
name: '省'
|
|
92
|
+
}));
|
|
93
|
+
this.city = new City(_objectSpread(_objectSpread({}, options), {}, {
|
|
94
|
+
id: "".concat(options.id, "_bsPostingCity"),
|
|
95
|
+
name: '市'
|
|
96
|
+
}));
|
|
97
|
+
this.district = new District(_objectSpread(_objectSpread({}, options), {}, {
|
|
98
|
+
id: "".concat(options.id, "_bsPostingDistrict"),
|
|
99
|
+
name: '区/县'
|
|
100
|
+
}));
|
|
101
|
+
this.detail = new Detail(_objectSpread(_objectSpread({}, options), {}, {
|
|
102
|
+
id: "".concat(options.id, "_bsPostingDetail"),
|
|
103
|
+
name: '详细地址'
|
|
104
|
+
}));
|
|
105
|
+
this.receiverName = new ReceiverName(_objectSpread(_objectSpread({}, options), {}, {
|
|
106
|
+
id: "".concat(options.id, "_bsPostingReceiverName"),
|
|
107
|
+
name: '收件人姓名'
|
|
108
|
+
}));
|
|
109
|
+
this.receiverMobile = new ReceiverMobile(_objectSpread(_objectSpread({}, options), {}, {
|
|
110
|
+
id: "".concat(options.id, "_bsPostingReceiverMobile"),
|
|
111
|
+
name: '收件人电话'
|
|
112
|
+
}));
|
|
95
113
|
this.children = [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile];
|
|
96
114
|
this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
|
|
97
115
|
validator: function validator(_, value) {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption,
|
|
1
|
+
import { ComponentInterface, PickOption, Record } from "../../type";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
import Province from "../BS/BsPosting/components/Province";
|
|
5
|
+
import City from "../BS/BsPosting/components//City";
|
|
6
|
+
import District from "../BS/BsPosting/components//District";
|
|
7
|
+
import Detail from "../BS/BsPosting/components//Detail";
|
|
8
|
+
import ReceiverName from "../BS/BsPosting/components//ReceiverName";
|
|
9
|
+
import ReceiverMobile from "../BS/BsPosting/components//ReceiverMobile";
|
|
4
10
|
declare class BasicPosting implements ComponentInterface {
|
|
5
11
|
name: string;
|
|
6
12
|
id: string;
|
|
@@ -14,8 +20,15 @@ declare class BasicPosting implements ComponentInterface {
|
|
|
14
20
|
children: ComponentInterface[];
|
|
15
21
|
dataType: ComponentInterface["dataType"];
|
|
16
22
|
addressDateInstance: InstanceType<typeof AddressData>;
|
|
23
|
+
province: Province;
|
|
24
|
+
city: City;
|
|
25
|
+
district: District;
|
|
26
|
+
detail: Detail;
|
|
27
|
+
receiverName: ReceiverName;
|
|
28
|
+
receiverMobile: ReceiverMobile;
|
|
29
|
+
isSplitColumns: boolean;
|
|
17
30
|
constructor(options: PickOption);
|
|
18
|
-
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
31
|
+
renderPc: (value: any, record: Record) => React.JSX.Element | null;
|
|
19
32
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
33
|
getComponentValue: (r: Record) => {
|
|
21
34
|
province: any;
|
|
@@ -28,6 +41,6 @@ declare class BasicPosting implements ComponentInterface {
|
|
|
28
41
|
renderExport: (value: any, record: Record) => string | null;
|
|
29
42
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
30
43
|
editRender: (p: any) => React.JSX.Element;
|
|
31
|
-
filterConfig: (
|
|
44
|
+
filterConfig: () => never[];
|
|
32
45
|
}
|
|
33
46
|
export default BasicPosting;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
5
|
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); } }
|
|
4
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -12,28 +14,17 @@ import GetFormItem from "../GetFormItem";
|
|
|
12
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
15
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
16
|
import { AddressData, BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
name: "postingReceiverName",
|
|
22
|
-
mobile: "postingReceiverMobile"
|
|
23
|
-
},
|
|
24
|
-
BS_POSTING: {
|
|
25
|
-
province: "bsPostingProvince",
|
|
26
|
-
city: "bsPostingCity",
|
|
27
|
-
district: "bsPostingDistrict",
|
|
28
|
-
detail: "bsPostingDetail",
|
|
29
|
-
name: "bsPostingReceiverName",
|
|
30
|
-
mobile: "bsPostingReceiverMobile"
|
|
31
|
-
}
|
|
32
|
-
};
|
|
17
|
+
import Province from "../BS/BsPosting/components/Province";
|
|
18
|
+
import City from "../BS/BsPosting/components//City";
|
|
19
|
+
import District from "../BS/BsPosting/components//District";
|
|
20
|
+
import Detail from "../BS/BsPosting/components//Detail";
|
|
21
|
+
import ReceiverName from "../BS/BsPosting/components//ReceiverName";
|
|
22
|
+
import ReceiverMobile from "../BS/BsPosting/components//ReceiverMobile";
|
|
33
23
|
var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
34
24
|
var _this = this,
|
|
35
25
|
_options$componentCon,
|
|
36
|
-
_options$componentCon2
|
|
26
|
+
_options$componentCon2,
|
|
27
|
+
_options$componentCon3;
|
|
37
28
|
_classCallCheck(this, BasicPosting);
|
|
38
29
|
_defineProperty(this, "name", void 0);
|
|
39
30
|
_defineProperty(this, "id", void 0);
|
|
@@ -47,14 +38,24 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
47
38
|
_defineProperty(this, "children", void 0);
|
|
48
39
|
_defineProperty(this, "dataType", void 0);
|
|
49
40
|
_defineProperty(this, "addressDateInstance", void 0);
|
|
41
|
+
_defineProperty(this, "province", void 0);
|
|
42
|
+
_defineProperty(this, "city", void 0);
|
|
43
|
+
_defineProperty(this, "district", void 0);
|
|
44
|
+
_defineProperty(this, "detail", void 0);
|
|
45
|
+
_defineProperty(this, "receiverName", void 0);
|
|
46
|
+
_defineProperty(this, "receiverMobile", void 0);
|
|
47
|
+
_defineProperty(this, "isSplitColumns", void 0);
|
|
50
48
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
49
|
+
var _ref;
|
|
50
|
+
if (_this.isSplitColumns) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
var province = record["".concat(_this.id, "_postingProvince}")];
|
|
54
|
+
var city = record["".concat(_this.id, "_postingCity")];
|
|
55
|
+
var district = record["".concat(_this.id, "_postingDistrict")];
|
|
56
|
+
var detail = record["".concat(_this.id, "_postingDetail")] || "";
|
|
57
|
+
var name = record["".concat(_this.id, "_postingReceiverName")] || "";
|
|
58
|
+
var mobile = record["".concat(_this.id, "_postingReceiverMobile")] || "";
|
|
58
59
|
if (province === undefined) {
|
|
59
60
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
60
61
|
}
|
|
@@ -70,6 +71,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
70
71
|
});
|
|
71
72
|
_defineProperty(this, "renderLog", function (r) {
|
|
72
73
|
var _ref2;
|
|
74
|
+
if (_this.isSplitColumns) {
|
|
75
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.province.renderLog(r), _this.city.renderLog(r), _this.district.renderLog(r), _this.detail.renderLog(r), "/", _this.receiverName.renderLog(r), _this.receiverMobile.renderLog(r));
|
|
76
|
+
}
|
|
73
77
|
var _this$getComponentVal = _this.getComponentValue(r),
|
|
74
78
|
province = _this$getComponentVal.province,
|
|
75
79
|
city = _this$getComponentVal.city,
|
|
@@ -86,18 +90,30 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
86
90
|
return /*#__PURE__*/React.createElement(React.Fragment, null, "".concat(addressText).concat(detail, " ").concat(name).concat(mobile));
|
|
87
91
|
});
|
|
88
92
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
89
|
-
|
|
93
|
+
if (_this.isSplitColumns) {
|
|
94
|
+
return {
|
|
95
|
+
province: _this.province.getComponentValue(r),
|
|
96
|
+
city: _this.city.getComponentValue(r),
|
|
97
|
+
district: _this.district.getComponentValue(r),
|
|
98
|
+
detail: _this.detail.getComponentValue(r),
|
|
99
|
+
name: _this.receiverName.getComponentValue(r),
|
|
100
|
+
mobile: _this.receiverMobile.getComponentValue(r)
|
|
101
|
+
};
|
|
102
|
+
}
|
|
90
103
|
return {
|
|
91
|
-
province: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
92
|
-
city: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
93
|
-
district: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
94
|
-
detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
95
|
-
name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
96
|
-
mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
104
|
+
province: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingProvince")],
|
|
105
|
+
city: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingCity}")],
|
|
106
|
+
district: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingDistrict}")],
|
|
107
|
+
detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingDetail")]) || "",
|
|
108
|
+
name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingReceiverName")]) || "",
|
|
109
|
+
mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingReceiverMobile")]) || ""
|
|
97
110
|
};
|
|
98
111
|
});
|
|
99
112
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
100
113
|
var _ref3;
|
|
114
|
+
if (_this.isSplitColumns) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
101
117
|
var _this$getComponentVal2 = _this.getComponentValue(record),
|
|
102
118
|
province = _this$getComponentVal2.province,
|
|
103
119
|
city = _this$getComponentVal2.city,
|
|
@@ -114,13 +130,16 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
114
130
|
return "".concat(addressText, "/").concat(detail, "/ ").concat(name, "/").concat(mobile);
|
|
115
131
|
});
|
|
116
132
|
_defineProperty(this, "renderClient", function (record) {
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
var
|
|
122
|
-
var
|
|
123
|
-
var
|
|
133
|
+
var _ref4;
|
|
134
|
+
if (_this.isSplitColumns) {
|
|
135
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.province.renderClient(record), _this.city.renderClient(record), _this.district.renderClient(record), _this.detail.renderClient(record), _this.receiverName.renderClient(record), _this.receiverMobile.renderClient(record));
|
|
136
|
+
}
|
|
137
|
+
var province = record["".concat(_this.id, "_postingProvince")];
|
|
138
|
+
var city = record["".concat(_this.id, "_postingCity}")];
|
|
139
|
+
var district = record["".concat(_this.id, "_postingDistrict}")];
|
|
140
|
+
var detail = record["".concat(_this.id, "_postingDetail")];
|
|
141
|
+
var name = record["".concat(_this.id, "_postingReceiverName")];
|
|
142
|
+
var mobile = record["".concat(_this.id, "_postingReceiverMobile")];
|
|
124
143
|
var addressText = (_ref4 = [province, city, district]) === null || _ref4 === void 0 ? void 0 : _ref4.map(function (suffix) {
|
|
125
144
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
126
145
|
}).join("");
|
|
@@ -145,64 +164,46 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
145
164
|
}))
|
|
146
165
|
});
|
|
147
166
|
});
|
|
148
|
-
_defineProperty(this, "filterConfig", function (
|
|
167
|
+
_defineProperty(this, "filterConfig", function () {
|
|
149
168
|
return [];
|
|
150
|
-
// return [
|
|
151
|
-
// {
|
|
152
|
-
// searchDefaultConditions: SYMBOL.eq as "eq",
|
|
153
|
-
// type: item.type,
|
|
154
|
-
// id: `${item.id}_${typeMap[this.type]?.district}`, // 过滤组件id
|
|
155
|
-
// name: `${item.name}-省市区`, // 过滤组件名称
|
|
156
|
-
// filterComponentType: "Cascader" as const,
|
|
157
|
-
// props: {
|
|
158
|
-
// options: (this.addressDateInstance.addressOptions as any) || [],
|
|
159
|
-
// fieldNames: {
|
|
160
|
-
// label: "label",
|
|
161
|
-
// value: "value",
|
|
162
|
-
// children: "children",
|
|
163
|
-
// },
|
|
164
|
-
// },
|
|
165
|
-
// formatFilterValue: (val: Array<number>) => {
|
|
166
|
-
// if (val?.length > 2) {
|
|
167
|
-
// return val?.[2];
|
|
168
|
-
// }
|
|
169
|
-
// },
|
|
170
|
-
// },
|
|
171
|
-
// {
|
|
172
|
-
// searchDefaultConditions: SYMBOL.like as "like",
|
|
173
|
-
// type: item.type,
|
|
174
|
-
// id: `${item.id}_${typeMap[this.type]?.detail}`, // 过滤组件id
|
|
175
|
-
// name: `${item.name}-详细地址`, // 过滤组件名称
|
|
176
|
-
// filterComponentType: "Input" as const,
|
|
177
|
-
// },
|
|
178
|
-
// {
|
|
179
|
-
// searchDefaultConditions: SYMBOL.like as "like",
|
|
180
|
-
// type: item.type,
|
|
181
|
-
// id: `${item.id}_${typeMap[this.type]?.name}`, // 过滤组件id
|
|
182
|
-
// name: `${item.name}-姓名`, // 过滤组件名称
|
|
183
|
-
// filterComponentType: "Input" as const,
|
|
184
|
-
// },
|
|
185
|
-
// {
|
|
186
|
-
// searchDefaultConditions: SYMBOL.like as "like",
|
|
187
|
-
// type: item.type,
|
|
188
|
-
// id: `${item.id}_${typeMap[this.type]?.mobile}`, // 过滤组件id
|
|
189
|
-
// name: `${item.name}-电话`, // 过滤组件名称
|
|
190
|
-
// filterComponentType: "Input" as const,
|
|
191
|
-
// },
|
|
192
|
-
// ];
|
|
193
169
|
});
|
|
194
170
|
this.name = options.name;
|
|
195
171
|
this.id = options.id;
|
|
196
172
|
this.sortField = "".concat(options.id);
|
|
197
173
|
this.formField = "".concat(options.id);
|
|
174
|
+
this.isSplitColumns = !!((_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.splitColumns);
|
|
198
175
|
this.type = options.type;
|
|
199
176
|
this.componentConfig = options.componentConfig;
|
|
200
|
-
this.isCombinationComponent =
|
|
177
|
+
this.isCombinationComponent = this.isSplitColumns;
|
|
201
178
|
this.canSort = false;
|
|
202
|
-
this.
|
|
179
|
+
this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
|
|
180
|
+
id: "".concat(options.id, "_postingProvince"),
|
|
181
|
+
name: '省'
|
|
182
|
+
}));
|
|
183
|
+
this.city = new City(_objectSpread(_objectSpread({}, options), {}, {
|
|
184
|
+
id: "".concat(options.id, "_postingCity"),
|
|
185
|
+
name: '市'
|
|
186
|
+
}));
|
|
187
|
+
this.district = new District(_objectSpread(_objectSpread({}, options), {}, {
|
|
188
|
+
id: "".concat(options.id, "_bsPostingDistrict"),
|
|
189
|
+
name: '区/县'
|
|
190
|
+
}));
|
|
191
|
+
this.detail = new Detail(_objectSpread(_objectSpread({}, options), {}, {
|
|
192
|
+
id: "".concat(options.id, "_postingDetail"),
|
|
193
|
+
name: '详细地址'
|
|
194
|
+
}));
|
|
195
|
+
this.receiverName = new ReceiverName(_objectSpread(_objectSpread({}, options), {}, {
|
|
196
|
+
id: "".concat(options.id, "_postingReceiverName"),
|
|
197
|
+
name: '收件人姓名'
|
|
198
|
+
}));
|
|
199
|
+
this.receiverMobile = new ReceiverMobile(_objectSpread(_objectSpread({}, options), {}, {
|
|
200
|
+
id: "".concat(options.id, "_postingReceiverMobile"),
|
|
201
|
+
name: '收件人电话'
|
|
202
|
+
}));
|
|
203
|
+
this.children = this.isSplitColumns ? [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile] : [];
|
|
203
204
|
this.dataType = "string";
|
|
204
|
-
this.addressDateInstance =
|
|
205
|
-
this.rules = options !== null && options !== void 0 && (_options$
|
|
205
|
+
this.addressDateInstance = ((_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField) === "bs" ? BsAddressData.getInstance() : AddressData.getInstance();
|
|
206
|
+
this.rules = options !== null && options !== void 0 && (_options$componentCon3 = options.componentConfig) !== null && _options$componentCon3 !== void 0 && _options$componentCon3.required ? [{
|
|
206
207
|
validator: function validator(_, value) {
|
|
207
208
|
var _value$postingAddress;
|
|
208
209
|
if (!(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
|
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, CommonDataTime, TradeId, ShopName, ErpTradeId, 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, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BsExchange |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BasicAddress | BsExchange | BsPosting | BsReissue | BsReturn | BsSystemOrder | BasicCascader | BasicCheckbox | CommonDataTime | CommonMultiStatus | BasicDataTime | FlowCreator | FlowTag | BasicInput | BasicPosting | PrevSubmitter | BasicRadio | ReceiverAddress | ERemark | Submitter | BasicSelect | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
|
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.13.
|
|
3
|
+
"version": "0.13.2",
|
|
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": "9ca5c7be054e6ab3e2b27eeb15ca64b5b23eb766"
|
|
44
44
|
}
|