@kmkf-fe-packages/services-components 0.14.1-alpha.8 → 0.14.1
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.d.ts +3 -1
- package/dist/esm/components/BS/BsPosting/components/City/index.js +5 -6
- package/dist/esm/components/BS/BsPosting/components/Detail/index.js +4 -4
- package/dist/esm/components/BS/BsPosting/components/District/index.d.ts +3 -1
- package/dist/esm/components/BS/BsPosting/components/District/index.js +5 -6
- package/dist/esm/components/BS/BsPosting/components/Province/index.d.ts +3 -1
- package/dist/esm/components/BS/BsPosting/components/Province/index.js +5 -6
- 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.d.ts +3 -1
- package/dist/esm/components/BS/BsPosting/index.js +48 -8
- package/dist/esm/components/Common/index.d.ts +0 -1
- package/dist/esm/components/Common/index.js +0 -52
- package/dist/esm/components/CommonMultiStatus/index.d.ts +4 -4
- package/dist/esm/components/CommonMultiStatus/index.js +50 -50
- package/dist/esm/components/CommonSystemOrder/index.js +1 -1
- package/dist/esm/components/JST/JstSendGood/index.js +1 -1
- package/dist/esm/components/PostIng/index.d.ts +16 -3
- package/dist/esm/components/PostIng/index.js +101 -88
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +1 -3
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/type.d.ts +4 -0
- package/package.json +4 -4
- package/dist/esm/components/MsgStatus/index.d.ts +0 -39
- package/dist/esm/components/MsgStatus/index.js +0 -178
|
@@ -17,7 +17,9 @@ declare class City implements ComponentInterface {
|
|
|
17
17
|
children: ComponentInterface[];
|
|
18
18
|
dataType: ComponentInterface['dataType'];
|
|
19
19
|
addressDateInstance: InstanceType<typeof AddressData>;
|
|
20
|
-
constructor(options: PickOption
|
|
20
|
+
constructor(options: PickOption & {
|
|
21
|
+
addressDateInstance: InstanceType<typeof AddressData>;
|
|
22
|
+
});
|
|
21
23
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
22
24
|
renderPc: (value: unknown, record: Record) => string;
|
|
23
25
|
renderLog: (r: Record) => string;
|
|
@@ -6,7 +6,6 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
9
|
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
10
|
import ItemView from "../../../../../commonComponents/ItemView";
|
|
12
11
|
var City = /*#__PURE__*/_createClass(function City(options) {
|
|
@@ -57,10 +56,10 @@ var City = /*#__PURE__*/_createClass(function City(options) {
|
|
|
57
56
|
_defineProperty(this, "filterConfig", function () {
|
|
58
57
|
return [];
|
|
59
58
|
});
|
|
60
|
-
this.name =
|
|
61
|
-
this.id =
|
|
62
|
-
this.sortField =
|
|
63
|
-
this.formField =
|
|
59
|
+
this.name = options.name;
|
|
60
|
+
this.id = options.id;
|
|
61
|
+
this.sortField = options.id;
|
|
62
|
+
this.formField = options.id;
|
|
64
63
|
this.type = options.type;
|
|
65
64
|
this.isCombinationComponent = false;
|
|
66
65
|
this.canSort = false;
|
|
@@ -71,6 +70,6 @@ var City = /*#__PURE__*/_createClass(function City(options) {
|
|
|
71
70
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
72
71
|
this.rules = [];
|
|
73
72
|
this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
|
|
74
|
-
this.addressDateInstance =
|
|
73
|
+
this.addressDateInstance = options === null || options === void 0 ? void 0 : options.addressDateInstance;
|
|
75
74
|
});
|
|
76
75
|
export default City;
|
|
@@ -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;
|
|
@@ -17,7 +17,9 @@ declare class District implements ComponentInterface {
|
|
|
17
17
|
children: ComponentInterface[];
|
|
18
18
|
dataType: ComponentInterface['dataType'];
|
|
19
19
|
addressDateInstance: InstanceType<typeof AddressData>;
|
|
20
|
-
constructor(options: PickOption
|
|
20
|
+
constructor(options: PickOption & {
|
|
21
|
+
addressDateInstance: InstanceType<typeof AddressData>;
|
|
22
|
+
});
|
|
21
23
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
22
24
|
renderPc: (value: unknown, record: Record) => string;
|
|
23
25
|
renderLog: (r: Record) => string;
|
|
@@ -6,7 +6,6 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
9
|
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
10
|
import ItemView from "../../../../../commonComponents/ItemView";
|
|
12
11
|
var District = /*#__PURE__*/_createClass(function District(options) {
|
|
@@ -57,10 +56,10 @@ var District = /*#__PURE__*/_createClass(function District(options) {
|
|
|
57
56
|
_defineProperty(this, "filterConfig", function () {
|
|
58
57
|
return [];
|
|
59
58
|
});
|
|
60
|
-
this.name =
|
|
61
|
-
this.id =
|
|
62
|
-
this.sortField =
|
|
63
|
-
this.formField =
|
|
59
|
+
this.name = options.name;
|
|
60
|
+
this.id = options.id;
|
|
61
|
+
this.sortField = options.id;
|
|
62
|
+
this.formField = options.id;
|
|
64
63
|
this.type = options.type;
|
|
65
64
|
this.isCombinationComponent = false;
|
|
66
65
|
this.canSort = false;
|
|
@@ -71,6 +70,6 @@ var District = /*#__PURE__*/_createClass(function District(options) {
|
|
|
71
70
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
72
71
|
this.rules = [];
|
|
73
72
|
this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
|
|
74
|
-
this.addressDateInstance =
|
|
73
|
+
this.addressDateInstance = options === null || options === void 0 ? void 0 : options.addressDateInstance;
|
|
75
74
|
});
|
|
76
75
|
export default District;
|
|
@@ -17,7 +17,9 @@ declare class Province implements ComponentInterface {
|
|
|
17
17
|
children: ComponentInterface[];
|
|
18
18
|
dataType: ComponentInterface['dataType'];
|
|
19
19
|
addressDateInstance: InstanceType<typeof AddressData>;
|
|
20
|
-
constructor(options: PickOption
|
|
20
|
+
constructor(options: PickOption & {
|
|
21
|
+
addressDateInstance: InstanceType<typeof AddressData>;
|
|
22
|
+
});
|
|
21
23
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
22
24
|
renderPc: (value: unknown, record: Record) => string;
|
|
23
25
|
renderLog: (r: Record) => string;
|
|
@@ -6,7 +6,6 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
9
|
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
10
|
import ItemView from "../../../../../commonComponents/ItemView";
|
|
12
11
|
var Province = /*#__PURE__*/_createClass(function Province(options) {
|
|
@@ -57,10 +56,10 @@ var Province = /*#__PURE__*/_createClass(function Province(options) {
|
|
|
57
56
|
_defineProperty(this, "filterConfig", function () {
|
|
58
57
|
return [];
|
|
59
58
|
});
|
|
60
|
-
this.name =
|
|
61
|
-
this.id =
|
|
62
|
-
this.sortField =
|
|
63
|
-
this.formField =
|
|
59
|
+
this.name = options.name;
|
|
60
|
+
this.id = options.id;
|
|
61
|
+
this.sortField = options.id;
|
|
62
|
+
this.formField = options.id;
|
|
64
63
|
this.type = options.type;
|
|
65
64
|
this.isCombinationComponent = false;
|
|
66
65
|
this.canSort = false;
|
|
@@ -71,6 +70,6 @@ var Province = /*#__PURE__*/_createClass(function Province(options) {
|
|
|
71
70
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
72
71
|
this.rules = [];
|
|
73
72
|
this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
|
|
74
|
-
this.addressDateInstance =
|
|
73
|
+
this.addressDateInstance = options === null || options === void 0 ? void 0 : options.addressDateInstance;
|
|
75
74
|
});
|
|
76
75
|
export default Province;
|
|
@@ -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;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, Record } from "../../../type";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
3
4
|
import Province from "./components/Province";
|
|
4
5
|
import City from "./components/City";
|
|
5
6
|
import District from "./components/District";
|
|
@@ -24,6 +25,7 @@ declare class BsPosting implements ComponentInterface {
|
|
|
24
25
|
detail: Detail;
|
|
25
26
|
receiverName: ReceiverName;
|
|
26
27
|
receiverMobile: ReceiverMobile;
|
|
28
|
+
addressDateInstance: InstanceType<typeof AddressData>;
|
|
27
29
|
constructor(options: PickOption);
|
|
28
30
|
renderPc: () => null;
|
|
29
31
|
renderLog: (r: Record) => React.JSX.Element;
|
|
@@ -36,7 +38,7 @@ declare class BsPosting implements ComponentInterface {
|
|
|
36
38
|
mobile: any;
|
|
37
39
|
};
|
|
38
40
|
renderExport: () => null;
|
|
39
|
-
renderClient: (record: any) => React.JSX.Element;
|
|
41
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
40
42
|
editRender: (p: any) => React.JSX.Element;
|
|
41
43
|
filterConfig: () => never[];
|
|
42
44
|
}
|
|
@@ -10,6 +10,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
11
|
import React from "react";
|
|
12
12
|
import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
|
|
13
|
+
import { BsAddressData, isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
14
|
import GetFormItem from "../../GetFormItem";
|
|
14
15
|
import Province from "./components/Province";
|
|
15
16
|
import City from "./components/City";
|
|
@@ -17,6 +18,7 @@ import District from "./components/District";
|
|
|
17
18
|
import Detail from "./components/Detail";
|
|
18
19
|
import ReceiverName from "./components/ReceiverName";
|
|
19
20
|
import ReceiverMobile from "./components/ReceiverMobile";
|
|
21
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
20
22
|
var BsPosting = /*#__PURE__*/_createClass(function BsPosting(options) {
|
|
21
23
|
var _this = this,
|
|
22
24
|
_options$componentCon;
|
|
@@ -38,6 +40,7 @@ var BsPosting = /*#__PURE__*/_createClass(function BsPosting(options) {
|
|
|
38
40
|
_defineProperty(this, "detail", void 0);
|
|
39
41
|
_defineProperty(this, "receiverName", void 0);
|
|
40
42
|
_defineProperty(this, "receiverMobile", void 0);
|
|
43
|
+
_defineProperty(this, "addressDateInstance", void 0);
|
|
41
44
|
_defineProperty(this, "renderPc", function () {
|
|
42
45
|
return null;
|
|
43
46
|
});
|
|
@@ -58,7 +61,23 @@ var BsPosting = /*#__PURE__*/_createClass(function BsPosting(options) {
|
|
|
58
61
|
return null;
|
|
59
62
|
});
|
|
60
63
|
_defineProperty(this, "renderClient", function (record) {
|
|
61
|
-
|
|
64
|
+
var _ref;
|
|
65
|
+
var province = record["".concat(_this.id, "_bsPostingProvince")];
|
|
66
|
+
var city = record["".concat(_this.id, "_bsPostingCity")];
|
|
67
|
+
var district = record["".concat(_this.id, "_bsPostingDistrict")];
|
|
68
|
+
var detail = record["".concat(_this.id, "_bsPostingDetail")];
|
|
69
|
+
var name = record["".concat(_this.id, "_bsPostingReceiverName")];
|
|
70
|
+
var mobile = record["".concat(_this.id, "_bsPostingReceiverMobile")];
|
|
71
|
+
var addressText = (_ref = [province, city, district]) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
|
|
72
|
+
return _this.addressDateInstance.getNameByCode(suffix);
|
|
73
|
+
}).join("");
|
|
74
|
+
var hasValue = addressText || detail || name || mobile;
|
|
75
|
+
var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join("/"), /*#__PURE__*/React.createElement("br", null), [name, mobile].join("/")) : null;
|
|
76
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
77
|
+
id: _this.id,
|
|
78
|
+
label: _this.name,
|
|
79
|
+
value: value
|
|
80
|
+
}) : null;
|
|
62
81
|
});
|
|
63
82
|
_defineProperty(this, "editRender", function (p) {
|
|
64
83
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
|
|
@@ -84,14 +103,35 @@ var BsPosting = /*#__PURE__*/_createClass(function BsPosting(options) {
|
|
|
84
103
|
this.componentConfig = options.componentConfig;
|
|
85
104
|
this.isCombinationComponent = true;
|
|
86
105
|
this.canSort = false;
|
|
87
|
-
this.children = [];
|
|
88
106
|
this.dataType = "object";
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
107
|
+
this.addressDateInstance = BsAddressData.getInstance();
|
|
108
|
+
this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
|
|
109
|
+
id: "".concat(options.id, "_bsPostingProvince"),
|
|
110
|
+
name: '省',
|
|
111
|
+
addressDateInstance: this.addressDateInstance
|
|
112
|
+
}));
|
|
113
|
+
this.city = new City(_objectSpread(_objectSpread({}, options), {}, {
|
|
114
|
+
id: "".concat(options.id, "_bsPostingCity"),
|
|
115
|
+
name: '市',
|
|
116
|
+
addressDateInstance: this.addressDateInstance
|
|
117
|
+
}));
|
|
118
|
+
this.district = new District(_objectSpread(_objectSpread({}, options), {}, {
|
|
119
|
+
id: "".concat(options.id, "_bsPostingDistrict"),
|
|
120
|
+
name: '区/县',
|
|
121
|
+
addressDateInstance: this.addressDateInstance
|
|
122
|
+
}));
|
|
123
|
+
this.detail = new Detail(_objectSpread(_objectSpread({}, options), {}, {
|
|
124
|
+
id: "".concat(options.id, "_bsPostingDetail"),
|
|
125
|
+
name: '详细地址'
|
|
126
|
+
}));
|
|
127
|
+
this.receiverName = new ReceiverName(_objectSpread(_objectSpread({}, options), {}, {
|
|
128
|
+
id: "".concat(options.id, "_bsPostingReceiverName"),
|
|
129
|
+
name: '收件人姓名'
|
|
130
|
+
}));
|
|
131
|
+
this.receiverMobile = new ReceiverMobile(_objectSpread(_objectSpread({}, options), {}, {
|
|
132
|
+
id: "".concat(options.id, "_bsPostingReceiverMobile"),
|
|
133
|
+
name: '收件人电话'
|
|
134
|
+
}));
|
|
95
135
|
this.children = [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile];
|
|
96
136
|
this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
|
|
97
137
|
validator: function validator(_, value) {
|
|
@@ -30,5 +30,4 @@ export declare const BsGoodsTable: ({ list, showHeader, text, }: {
|
|
|
30
30
|
}) => React.JSX.Element;
|
|
31
31
|
export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
|
|
32
32
|
export declare const BsSystemOrderTable: ({ value, type }: any) => React.JSX.Element;
|
|
33
|
-
export declare const MsgContent: ({ list, valueKey, failValue, options, }: any) => any;
|
|
34
33
|
export {};
|
|
@@ -624,56 +624,4 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
624
624
|
emptyText: "暂无数据"
|
|
625
625
|
}
|
|
626
626
|
});
|
|
627
|
-
};
|
|
628
|
-
export var MsgContent = function MsgContent(_ref14) {
|
|
629
|
-
var _ref14$list = _ref14.list,
|
|
630
|
-
list = _ref14$list === void 0 ? [] : _ref14$list,
|
|
631
|
-
valueKey = _ref14.valueKey,
|
|
632
|
-
failValue = _ref14.failValue,
|
|
633
|
-
_ref14$options = _ref14.options,
|
|
634
|
-
options = _ref14$options === void 0 ? [] : _ref14$options;
|
|
635
|
-
var msgTypeCh = {
|
|
636
|
-
'ding': '钉钉',
|
|
637
|
-
'wechat': '微信',
|
|
638
|
-
'qq': 'QQ',
|
|
639
|
-
'qywx': '企业微信'
|
|
640
|
-
};
|
|
641
|
-
var detailContent = function detailContent(item, index) {
|
|
642
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
643
|
-
style: {
|
|
644
|
-
textAlign: "left"
|
|
645
|
-
}
|
|
646
|
-
}, /*#__PURE__*/React.createElement("div", null, item.ruleName), /*#__PURE__*/React.createElement("div", null, "\u5931\u8D25\u539F\u56E0:", item.reason), /*#__PURE__*/React.createElement("div", null, "\u4EFB\u52A1ID:", item.msgRuleId)));
|
|
647
|
-
};
|
|
648
|
-
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
649
|
-
var _options$find2;
|
|
650
|
-
var color = ((_options$find2 = options.find(function (innerItem) {
|
|
651
|
-
return item[valueKey] === innerItem.label;
|
|
652
|
-
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) || "#000";
|
|
653
|
-
var currentOption = options.find(function (option) {
|
|
654
|
-
return item[valueKey] === option.value;
|
|
655
|
-
});
|
|
656
|
-
var key = item.msgType || 'ding';
|
|
657
|
-
return /*#__PURE__*/React.createElement(Space, {
|
|
658
|
-
style: {
|
|
659
|
-
marginRight: '10px',
|
|
660
|
-
color: color
|
|
661
|
-
}
|
|
662
|
-
}, item[valueKey] === failValue ? /*#__PURE__*/React.createElement(Popover, {
|
|
663
|
-
content: detailContent(item, index),
|
|
664
|
-
overlayStyle: {
|
|
665
|
-
zIndex: 1080
|
|
666
|
-
}
|
|
667
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
668
|
-
key: index,
|
|
669
|
-
style: {
|
|
670
|
-
cursor: "pointer"
|
|
671
|
-
}
|
|
672
|
-
}, msgTypeCh[key], "-"), /*#__PURE__*/React.createElement("span", null, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "")) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
673
|
-
key: index,
|
|
674
|
-
style: {
|
|
675
|
-
cursor: "pointer"
|
|
676
|
-
}
|
|
677
|
-
}, msgTypeCh[key], "-"), /*#__PURE__*/React.createElement("span", null, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "")));
|
|
678
|
-
}) : null;
|
|
679
627
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class CommonMultiStatus implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
10
|
align: ALignType;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -8,72 +8,72 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
-
import React from
|
|
12
|
-
import some from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import some from "lodash/some";
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import { CommonOrderContent } from "../Common";
|
|
15
|
-
import { CommonMultiStatus as Status } from
|
|
15
|
+
import { CommonMultiStatus as Status } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull, filterFn as _filterFn } from
|
|
17
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { SYMBOL } from "../../constant";
|
|
19
19
|
var typeMap = {
|
|
20
20
|
RETURN_GOODS_STATUS: {
|
|
21
21
|
options: [{
|
|
22
|
-
value:
|
|
23
|
-
label:
|
|
24
|
-
color:
|
|
22
|
+
value: "成功",
|
|
23
|
+
label: "成功",
|
|
24
|
+
color: "#52c41a"
|
|
25
25
|
}, {
|
|
26
|
-
value:
|
|
27
|
-
label:
|
|
28
|
-
color:
|
|
26
|
+
value: "失败",
|
|
27
|
+
label: "失败",
|
|
28
|
+
color: "#ff4d4f"
|
|
29
29
|
}],
|
|
30
|
-
key:
|
|
31
|
-
code:
|
|
32
|
-
name:
|
|
30
|
+
key: "returnGoodsStatusList",
|
|
31
|
+
code: "returnGoodsStatusValue",
|
|
32
|
+
name: "退货状态",
|
|
33
33
|
type: 1,
|
|
34
|
-
valueKey:
|
|
35
|
-
idKey:
|
|
36
|
-
failValue:
|
|
34
|
+
valueKey: "status",
|
|
35
|
+
idKey: "systemOrderId",
|
|
36
|
+
failValue: "失败"
|
|
37
37
|
},
|
|
38
38
|
EXCHANGE_STATUS: {
|
|
39
39
|
options: [{
|
|
40
|
-
value:
|
|
41
|
-
label:
|
|
42
|
-
color:
|
|
40
|
+
value: "成功",
|
|
41
|
+
label: "成功",
|
|
42
|
+
color: "#52c41a"
|
|
43
43
|
}, {
|
|
44
|
-
value:
|
|
45
|
-
label:
|
|
46
|
-
color:
|
|
44
|
+
value: "失败",
|
|
45
|
+
label: "失败",
|
|
46
|
+
color: "#ff4d4f"
|
|
47
47
|
}],
|
|
48
|
-
key:
|
|
49
|
-
code:
|
|
50
|
-
name:
|
|
48
|
+
key: "exchangeReason",
|
|
49
|
+
code: "exchangeStatusValue",
|
|
50
|
+
name: "退货状态",
|
|
51
51
|
type: 1,
|
|
52
|
-
valueKey:
|
|
53
|
-
idKey:
|
|
54
|
-
failValue:
|
|
52
|
+
valueKey: "status",
|
|
53
|
+
idKey: "systemOrderId",
|
|
54
|
+
failValue: "失败"
|
|
55
55
|
},
|
|
56
56
|
WAREHOUSING_STATUS: {
|
|
57
57
|
options: [{
|
|
58
|
-
value:
|
|
59
|
-
label:
|
|
60
|
-
color:
|
|
58
|
+
value: "2",
|
|
59
|
+
label: "已入库",
|
|
60
|
+
color: "#52c41a"
|
|
61
61
|
}, {
|
|
62
|
-
value:
|
|
63
|
-
label:
|
|
64
|
-
color:
|
|
62
|
+
value: "1",
|
|
63
|
+
label: "部分入库",
|
|
64
|
+
color: "#e7780f"
|
|
65
65
|
}, {
|
|
66
|
-
value:
|
|
67
|
-
label:
|
|
68
|
-
color:
|
|
66
|
+
value: "0",
|
|
67
|
+
label: "未入库",
|
|
68
|
+
color: "#ff4d4f"
|
|
69
69
|
}],
|
|
70
|
-
key:
|
|
71
|
-
code:
|
|
72
|
-
name:
|
|
70
|
+
key: "inStockStatusItemList",
|
|
71
|
+
code: "inStockStatusList",
|
|
72
|
+
name: "退货入库状态",
|
|
73
73
|
type: 2,
|
|
74
|
-
valueKey:
|
|
75
|
-
idKey:
|
|
76
|
-
failValue:
|
|
74
|
+
valueKey: "status",
|
|
75
|
+
idKey: "systemOrderId",
|
|
76
|
+
failValue: "失败"
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
|
|
@@ -144,8 +144,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
144
144
|
var _typeMap$_this$type14;
|
|
145
145
|
return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
|
|
146
146
|
});
|
|
147
|
-
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) ||
|
|
148
|
-
}).join(
|
|
147
|
+
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey]) || "");
|
|
148
|
+
}).join(",");
|
|
149
149
|
});
|
|
150
150
|
_defineProperty(this, "editRender", function (p) {
|
|
151
151
|
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type17;
|
|
@@ -164,11 +164,11 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
164
164
|
_defineProperty(this, "filterConfig", function (item) {
|
|
165
165
|
var _typeMap$_this$type18, _item$templateConfig;
|
|
166
166
|
return {
|
|
167
|
-
searchDefaultConditions: _this.type ===
|
|
167
|
+
searchDefaultConditions: _this.type === "WAREHOUSING_STATUS" ? SYMBOL.in : SYMBOL.like,
|
|
168
168
|
type: item.type,
|
|
169
169
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.code),
|
|
170
170
|
name: "".concat(_this.name),
|
|
171
|
-
filterComponentType: _this.type ===
|
|
171
|
+
filterComponentType: _this.type === "WAREHOUSING_STATUS" ? "MultipleSelect" : "Input",
|
|
172
172
|
props: {
|
|
173
173
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
174
174
|
fieldNames: {
|
|
@@ -187,7 +187,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
187
187
|
this.name = options.name;
|
|
188
188
|
this.id = options.id;
|
|
189
189
|
this.sortField = "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.key);
|
|
190
|
-
this.formField = "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.
|
|
190
|
+
this.formField = "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.key);
|
|
191
191
|
this.type = options.type;
|
|
192
192
|
this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
|
|
193
193
|
options: typeMap[options.type].options
|
|
@@ -195,7 +195,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
195
195
|
this.isCombinationComponent = false;
|
|
196
196
|
this.canSort = false;
|
|
197
197
|
this.children = [];
|
|
198
|
-
this.dataType =
|
|
198
|
+
this.dataType = "object";
|
|
199
199
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
200
200
|
required: true,
|
|
201
201
|
validator: function validator(_, value) {
|
|
@@ -210,6 +210,6 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
210
210
|
return Promise.resolve();
|
|
211
211
|
}
|
|
212
212
|
}] : [];
|
|
213
|
-
this.align =
|
|
213
|
+
this.align = "left";
|
|
214
214
|
});
|
|
215
215
|
export default CommonMultiStatus;
|
|
@@ -140,7 +140,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
140
140
|
this.name = options.name;
|
|
141
141
|
this.id = options.id;
|
|
142
142
|
this.sortField = "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.key);
|
|
143
|
-
this.formField = "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.
|
|
143
|
+
this.formField = "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.key);
|
|
144
144
|
this.type = options.type;
|
|
145
145
|
this.componentConfig = options.componentConfig;
|
|
146
146
|
this.isCombinationComponent = false;
|
|
@@ -180,9 +180,9 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
180
180
|
this.id = _options.id;
|
|
181
181
|
this.sortField = "".concat(_options.id, "_").concat((_typeMap$_options$typ = typeMap[_options.type]) === null || _typeMap$_options$typ === void 0 ? void 0 : _typeMap$_options$typ.key);
|
|
182
182
|
this.formField = "".concat(_options.id, "_").concat((_typeMap$_options$typ2 = typeMap[_options.type]) === null || _typeMap$_options$typ2 === void 0 ? void 0 : _typeMap$_options$typ2.key);
|
|
183
|
+
this.componentConfig = _options.componentConfig;
|
|
183
184
|
this.sortChildField = this.getSortChildFields(((_this$componentConfig = this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showField) || '', _options);
|
|
184
185
|
this.type = _options.type;
|
|
185
|
-
this.componentConfig = _options.componentConfig;
|
|
186
186
|
this.dataType = "object";
|
|
187
187
|
this.rules = (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
|
|
188
188
|
required: true,
|
|
@@ -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,25 @@ 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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
133
|
+
var _ref4;
|
|
134
|
+
// if (this.isSplitColumns) {
|
|
135
|
+
// return (
|
|
136
|
+
// <>
|
|
137
|
+
// {this.province.renderClient(record)}
|
|
138
|
+
// {this.city.renderClient(record)}
|
|
139
|
+
// {this.district.renderClient(record)}
|
|
140
|
+
// {this.detail.renderClient(record)}
|
|
141
|
+
// {this.receiverName.renderClient(record)}
|
|
142
|
+
// {this.receiverMobile.renderClient(record)}
|
|
143
|
+
// </>
|
|
144
|
+
// );
|
|
145
|
+
// }
|
|
146
|
+
var province = record["".concat(_this.id, "_postingProvince")];
|
|
147
|
+
var city = record["".concat(_this.id, "_postingCity")];
|
|
148
|
+
var district = record["".concat(_this.id, "_postingDistrict")];
|
|
149
|
+
var detail = record["".concat(_this.id, "_postingDetail")];
|
|
150
|
+
var name = record["".concat(_this.id, "_postingReceiverName")];
|
|
151
|
+
var mobile = record["".concat(_this.id, "_postingReceiverMobile")];
|
|
124
152
|
var addressText = (_ref4 = [province, city, district]) === null || _ref4 === void 0 ? void 0 : _ref4.map(function (suffix) {
|
|
125
153
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
126
154
|
}).join("");
|
|
@@ -145,64 +173,49 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
145
173
|
}))
|
|
146
174
|
});
|
|
147
175
|
});
|
|
148
|
-
_defineProperty(this, "filterConfig", function (
|
|
176
|
+
_defineProperty(this, "filterConfig", function () {
|
|
149
177
|
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
178
|
});
|
|
194
179
|
this.name = options.name;
|
|
195
180
|
this.id = options.id;
|
|
196
181
|
this.sortField = "".concat(options.id);
|
|
197
182
|
this.formField = "".concat(options.id);
|
|
183
|
+
this.isSplitColumns = !!((_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.splitColumns);
|
|
198
184
|
this.type = options.type;
|
|
199
185
|
this.componentConfig = options.componentConfig;
|
|
200
|
-
this.isCombinationComponent =
|
|
186
|
+
this.isCombinationComponent = this.isSplitColumns;
|
|
201
187
|
this.canSort = false;
|
|
202
|
-
this.children = [];
|
|
203
188
|
this.dataType = "string";
|
|
204
|
-
this.addressDateInstance =
|
|
205
|
-
this.
|
|
189
|
+
this.addressDateInstance = ((_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField) === "bs" ? BsAddressData.getInstance() : AddressData.getInstance();
|
|
190
|
+
this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
|
|
191
|
+
id: "".concat(options.id, "_postingProvince"),
|
|
192
|
+
name: '省',
|
|
193
|
+
addressDateInstance: this.addressDateInstance
|
|
194
|
+
}));
|
|
195
|
+
this.city = new City(_objectSpread(_objectSpread({}, options), {}, {
|
|
196
|
+
id: "".concat(options.id, "_postingCity"),
|
|
197
|
+
name: '市',
|
|
198
|
+
addressDateInstance: this.addressDateInstance
|
|
199
|
+
}));
|
|
200
|
+
this.district = new District(_objectSpread(_objectSpread({}, options), {}, {
|
|
201
|
+
id: "".concat(options.id, "_postingDistrict"),
|
|
202
|
+
name: '区/县',
|
|
203
|
+
addressDateInstance: this.addressDateInstance
|
|
204
|
+
}));
|
|
205
|
+
this.detail = new Detail(_objectSpread(_objectSpread({}, options), {}, {
|
|
206
|
+
id: "".concat(options.id, "_postingDetail"),
|
|
207
|
+
name: '详细地址'
|
|
208
|
+
}));
|
|
209
|
+
this.receiverName = new ReceiverName(_objectSpread(_objectSpread({}, options), {}, {
|
|
210
|
+
id: "".concat(options.id, "_postingReceiverName"),
|
|
211
|
+
name: '收件人姓名'
|
|
212
|
+
}));
|
|
213
|
+
this.receiverMobile = new ReceiverMobile(_objectSpread(_objectSpread({}, options), {}, {
|
|
214
|
+
id: "".concat(options.id, "_postingReceiverMobile"),
|
|
215
|
+
name: '收件人电话'
|
|
216
|
+
}));
|
|
217
|
+
this.children = this.isSplitColumns ? [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile] : [];
|
|
218
|
+
this.rules = options !== null && options !== void 0 && (_options$componentCon3 = options.componentConfig) !== null && _options$componentCon3 !== void 0 && _options$componentCon3.required ? [{
|
|
206
219
|
validator: function validator(_, value) {
|
|
207
220
|
var _value$postingAddress;
|
|
208
221
|
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
|
-
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
|
|
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) => BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsExchange | BsGoods | BsReissue | BsReturn | BsSystemOrder | CommonMultiStatus | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -159,8 +159,6 @@ export var factory = function factory(type, options) {
|
|
|
159
159
|
case "EXCHANGE_STATUS":
|
|
160
160
|
case "WAREHOUSING_STATUS":
|
|
161
161
|
return new CommonMultiStatus(options);
|
|
162
|
-
case "MSG_STATUS":
|
|
163
|
-
return new MsgStatus(options);
|
|
164
162
|
// case "REISSUE_TRADE_ID":
|
|
165
163
|
// case 'EXCHANGE_TRADE_ID':
|
|
166
164
|
// return new CommonTradeId(options);
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -68,7 +68,6 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
|
68
68
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
69
69
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
70
70
|
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
71
|
-
export { default as MsgStatus } from './components/MsgStatus';
|
|
72
71
|
export { factory } from "./factory";
|
|
73
72
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
74
73
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
package/dist/esm/index.js
CHANGED
|
@@ -68,7 +68,6 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
|
68
68
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
69
69
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
70
70
|
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
71
|
-
export { default as MsgStatus } from "./components/MsgStatus";
|
|
72
71
|
export { factory } from "./factory";
|
|
73
72
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
74
73
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
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.14.1
|
|
3
|
+
"version": "0.14.1",
|
|
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.14.1
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.14.1",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.14.1"
|
|
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": "6cdf51565e497213b786f988ba694684a046d697"
|
|
44
44
|
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare class MsgStatus implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface['componentConfig'];
|
|
10
|
-
align: ALignType;
|
|
11
|
-
isCombinationComponent: boolean;
|
|
12
|
-
formField: string;
|
|
13
|
-
canSort: boolean;
|
|
14
|
-
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface['dataType'];
|
|
16
|
-
constructor(options: PickOption);
|
|
17
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
-
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
19
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
|
-
getComponentValue: (r: Record) => any;
|
|
21
|
-
renderExport: (value: any, record: any) => any;
|
|
22
|
-
editRender: (p: any) => React.JSX.Element;
|
|
23
|
-
filterConfig: (item: ColumnConfig) => {
|
|
24
|
-
searchDefaultConditions: "like" | "in";
|
|
25
|
-
type: string;
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
filterComponentType: "MultipleSelect" | "Input";
|
|
29
|
-
props: {
|
|
30
|
-
options: any[] | undefined;
|
|
31
|
-
fieldNames: {
|
|
32
|
-
label: string;
|
|
33
|
-
value: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
filterFn: (value: string) => (i: Record) => boolean;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export default MsgStatus;
|
|
@@ -1,178 +0,0 @@
|
|
|
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; }
|
|
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); }
|
|
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); } }
|
|
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; }
|
|
7
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import some from 'lodash/some';
|
|
13
|
-
import GetFormItem from "../GetFormItem";
|
|
14
|
-
import { MsgContent } from "../Common";
|
|
15
|
-
import { MsgStatus as Status } from '@kmkf-fe-packages/basic-components';
|
|
16
|
-
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
|
-
import { SYMBOL } from "../../constant";
|
|
19
|
-
var typeMap = {
|
|
20
|
-
MSG_STATUS: {
|
|
21
|
-
options: [{
|
|
22
|
-
value: '发送成功',
|
|
23
|
-
label: '发送成功',
|
|
24
|
-
color: '#52c41a'
|
|
25
|
-
}, {
|
|
26
|
-
value: '发送失败',
|
|
27
|
-
label: '发送失败',
|
|
28
|
-
color: '#ff4d4f'
|
|
29
|
-
}, {
|
|
30
|
-
value: '待发送',
|
|
31
|
-
label: '待发送',
|
|
32
|
-
color: '#e7780f'
|
|
33
|
-
}],
|
|
34
|
-
key: 'msgStatusValues',
|
|
35
|
-
code: 'msgStatus4Search',
|
|
36
|
-
name: '消息状态',
|
|
37
|
-
type: 1,
|
|
38
|
-
valueKey: 'status',
|
|
39
|
-
idKey: 'systemOrderId',
|
|
40
|
-
failValue: '发送失败'
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
|
|
44
|
-
var _this = this,
|
|
45
|
-
_typeMap$options$type,
|
|
46
|
-
_typeMap$options$type2,
|
|
47
|
-
_this$componentConfig3;
|
|
48
|
-
_classCallCheck(this, MsgStatus);
|
|
49
|
-
_defineProperty(this, "name", void 0);
|
|
50
|
-
_defineProperty(this, "id", void 0);
|
|
51
|
-
_defineProperty(this, "sortField", void 0);
|
|
52
|
-
_defineProperty(this, "type", void 0);
|
|
53
|
-
_defineProperty(this, "rules", void 0);
|
|
54
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
55
|
-
_defineProperty(this, "align", void 0);
|
|
56
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
57
|
-
_defineProperty(this, "formField", void 0);
|
|
58
|
-
_defineProperty(this, "canSort", void 0);
|
|
59
|
-
_defineProperty(this, "children", void 0);
|
|
60
|
-
_defineProperty(this, "dataType", void 0);
|
|
61
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
62
|
-
var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3;
|
|
63
|
-
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
64
|
-
return !isNull(item);
|
|
65
|
-
}) : false;
|
|
66
|
-
return isShow ? /*#__PURE__*/React.createElement(ItemView, {
|
|
67
|
-
id: _this.id,
|
|
68
|
-
label: _this.name,
|
|
69
|
-
value: /*#__PURE__*/React.createElement(MsgContent, {
|
|
70
|
-
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
71
|
-
valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey,
|
|
72
|
-
failValue: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.failValue,
|
|
73
|
-
options: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.options
|
|
74
|
-
})
|
|
75
|
-
}) : null;
|
|
76
|
-
});
|
|
77
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
78
|
-
var _typeMap$_this$type4, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7;
|
|
79
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
|
|
80
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
81
|
-
onClick: function onClick(e) {
|
|
82
|
-
return e.stopPropagation();
|
|
83
|
-
}
|
|
84
|
-
}, /*#__PURE__*/React.createElement(MsgContent, {
|
|
85
|
-
list: list,
|
|
86
|
-
valueKey: (_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.valueKey,
|
|
87
|
-
failValue: (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.failValue,
|
|
88
|
-
options: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.options
|
|
89
|
-
}));
|
|
90
|
-
});
|
|
91
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
92
|
-
var _typeMap$_this$type8;
|
|
93
|
-
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key)];
|
|
94
|
-
if (isNull(list)) return null;
|
|
95
|
-
return _this.renderPc(undefined, r);
|
|
96
|
-
});
|
|
97
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
98
|
-
var _typeMap$_this$type9;
|
|
99
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.key)];
|
|
100
|
-
});
|
|
101
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
102
|
-
var _typeMap$_this$type10;
|
|
103
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
|
|
104
|
-
return (list || []).map(function (item) {
|
|
105
|
-
var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type15, _typeMap$_this$type16;
|
|
106
|
-
var currentOption = (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : (_typeMap$_this$type12 = _typeMap$_this$type11.options) === null || _typeMap$_this$type12 === void 0 ? void 0 : (_typeMap$_this$type13 = _typeMap$_this$type12.find) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.call(_typeMap$_this$type12, function (option) {
|
|
107
|
-
var _typeMap$_this$type14;
|
|
108
|
-
return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
|
|
109
|
-
});
|
|
110
|
-
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey]) || '');
|
|
111
|
-
}).join(',');
|
|
112
|
-
});
|
|
113
|
-
_defineProperty(this, "editRender", function (p) {
|
|
114
|
-
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type17;
|
|
115
|
-
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
116
|
-
title: _this.name,
|
|
117
|
-
name: _this.id,
|
|
118
|
-
rules: _this.rules,
|
|
119
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
120
|
-
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
121
|
-
component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
|
|
122
|
-
type: (_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.type,
|
|
123
|
-
failValue: typeMap[_this.type].failValue
|
|
124
|
-
}))
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
_defineProperty(this, "filterConfig", function (item) {
|
|
128
|
-
var _typeMap$_this$type18, _item$templateConfig;
|
|
129
|
-
return {
|
|
130
|
-
searchDefaultConditions: _this.type === 'MSG_STATUS' ? SYMBOL.in : SYMBOL.like,
|
|
131
|
-
type: item.type,
|
|
132
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.code),
|
|
133
|
-
name: "".concat(_this.name),
|
|
134
|
-
filterComponentType: _this.type === 'MSG_STATUS' ? 'MultipleSelect' : "Input",
|
|
135
|
-
props: {
|
|
136
|
-
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
137
|
-
fieldNames: {
|
|
138
|
-
label: "label",
|
|
139
|
-
value: "value"
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
filterFn: function filterFn(value) {
|
|
143
|
-
return function (i) {
|
|
144
|
-
var _typeMap$_this$type19;
|
|
145
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code), value);
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
});
|
|
150
|
-
this.name = options.name;
|
|
151
|
-
this.id = options.id;
|
|
152
|
-
this.sortField = "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.key);
|
|
153
|
-
this.formField = "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.code);
|
|
154
|
-
this.type = options.type;
|
|
155
|
-
this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
|
|
156
|
-
options: typeMap[options.type].options
|
|
157
|
-
});
|
|
158
|
-
this.isCombinationComponent = false;
|
|
159
|
-
this.canSort = false;
|
|
160
|
-
this.children = [];
|
|
161
|
-
this.dataType = 'object';
|
|
162
|
-
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
163
|
-
required: true,
|
|
164
|
-
validator: function validator(_, value) {
|
|
165
|
-
var hasNo = (value || []).some(function (item) {
|
|
166
|
-
var _typeMap$_this$type20;
|
|
167
|
-
return item[(_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.valueKey];
|
|
168
|
-
});
|
|
169
|
-
if (!hasNo) {
|
|
170
|
-
var _typeMap$_this$type21;
|
|
171
|
-
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type21 = typeMap[_this.type]) === null || _typeMap$_this$type21 === void 0 ? void 0 : _typeMap$_this$type21.name)));
|
|
172
|
-
}
|
|
173
|
-
return Promise.resolve();
|
|
174
|
-
}
|
|
175
|
-
}] : [];
|
|
176
|
-
this.align = 'left';
|
|
177
|
-
});
|
|
178
|
-
export default MsgStatus;
|