@kmkf-fe-packages/services-components 0.8.21-alpha.2 → 0.8.21-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/SelectMark/index.d.ts +8 -0
- package/dist/esm/commonComponents/SelectMark/index.js +81 -0
- package/dist/esm/components/CommonMultiStatus/index.d.ts +1 -1
- package/dist/esm/components/CommonMultiStatus/index.js +2 -2
- package/dist/esm/components/CommonSystemOrder/index.d.ts +1 -1
- package/dist/esm/components/CommonSystemOrder/index.js +2 -2
- package/dist/esm/components/FlowMarkSelect/index.d.ts +5 -7
- package/dist/esm/components/FlowMarkSelect/index.js +51 -69
- package/dist/esm/components/LogisticsInterception/index.d.ts +4 -1
- package/dist/esm/components/LogisticsInterception/index.js +9 -5
- package/dist/esm/components/LogisticsInterception/interceptSenderMobile.d.ts +1 -1
- package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +3 -3
- package/dist/esm/components/LogisticsInterception/interceptSnapshot.d.ts +35 -0
- package/dist/esm/components/LogisticsInterception/interceptSnapshot.js +84 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/package.json +3 -3
- /package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.css +0 -0
- /package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.js +0 -0
- /package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.json +0 -0
- /package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.ttf +0 -0
- /package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.woff +0 -0
- /package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.woff2 +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { Menu, Dropdown } from 'antd';
|
|
3
|
+
import "./icon/iconfont.css";
|
|
4
|
+
var workOrderMark = [{
|
|
5
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
6
|
+
className: "iconfont icon-xingxing"
|
|
7
|
+
}),
|
|
8
|
+
value: '1'
|
|
9
|
+
}, {
|
|
10
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
11
|
+
className: "iconfont icon-xingxing1",
|
|
12
|
+
style: {
|
|
13
|
+
color: '#ff0000'
|
|
14
|
+
}
|
|
15
|
+
}),
|
|
16
|
+
value: '2'
|
|
17
|
+
}, {
|
|
18
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
19
|
+
className: "iconfont icon-xingxing1",
|
|
20
|
+
style: {
|
|
21
|
+
color: '#f6b343'
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
value: '3'
|
|
25
|
+
}, {
|
|
26
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
27
|
+
className: "iconfont icon-xingxing1",
|
|
28
|
+
style: {
|
|
29
|
+
color: '#4d90f7'
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
32
|
+
value: '4'
|
|
33
|
+
}, {
|
|
34
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
35
|
+
className: "iconfont icon-xingxing1",
|
|
36
|
+
style: {
|
|
37
|
+
color: '#6ed86c'
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
value: '5'
|
|
41
|
+
}, {
|
|
42
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
43
|
+
className: "iconfont icon-xingxing1",
|
|
44
|
+
style: {
|
|
45
|
+
color: '#be4ed1'
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
value: '6'
|
|
49
|
+
}];
|
|
50
|
+
export default (function (props) {
|
|
51
|
+
var value = props.value,
|
|
52
|
+
onChange = props.onChange;
|
|
53
|
+
var renderMenu = function renderMenu() {
|
|
54
|
+
var menu = /*#__PURE__*/React.createElement(Menu, {
|
|
55
|
+
onClick: function onClick(_ref) {
|
|
56
|
+
var key = _ref.key,
|
|
57
|
+
domEvent = _ref.domEvent;
|
|
58
|
+
domEvent.stopPropagation();
|
|
59
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(key);
|
|
60
|
+
}
|
|
61
|
+
}, workOrderMark.map(function (item) {
|
|
62
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
63
|
+
key: item.value
|
|
64
|
+
}, item.label);
|
|
65
|
+
}));
|
|
66
|
+
return menu;
|
|
67
|
+
};
|
|
68
|
+
var markLabel = useMemo(function () {
|
|
69
|
+
var _workOrderMark$find;
|
|
70
|
+
return (_workOrderMark$find = workOrderMark.find(function (item) {
|
|
71
|
+
return item.value === value;
|
|
72
|
+
})) === null || _workOrderMark$find === void 0 ? void 0 : _workOrderMark$find.label;
|
|
73
|
+
}, [value]);
|
|
74
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
75
|
+
overlay: renderMenu()
|
|
76
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
77
|
+
onClick: function onClick(e) {
|
|
78
|
+
return e.stopPropagation();
|
|
79
|
+
}
|
|
80
|
+
}, markLabel || '--'));
|
|
81
|
+
});
|
|
@@ -118,7 +118,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
118
118
|
});
|
|
119
119
|
_defineProperty(this, "filterConfig", function (item) {
|
|
120
120
|
var _typeMap$_this$type13;
|
|
121
|
-
return
|
|
121
|
+
return {
|
|
122
122
|
searchDefaultConditions: SYMBOL.like,
|
|
123
123
|
type: item.type,
|
|
124
124
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.code),
|
|
@@ -130,7 +130,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
130
130
|
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.code), value);
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
}
|
|
133
|
+
};
|
|
134
134
|
});
|
|
135
135
|
this.name = options.name;
|
|
136
136
|
this.id = options.id;
|
|
@@ -109,7 +109,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
109
109
|
});
|
|
110
110
|
_defineProperty(this, "filterConfig", function (item) {
|
|
111
111
|
var _typeMap$_this$type10;
|
|
112
|
-
return
|
|
112
|
+
return {
|
|
113
113
|
searchDefaultConditions: SYMBOL.like,
|
|
114
114
|
type: item.type,
|
|
115
115
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.code),
|
|
@@ -121,7 +121,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
121
121
|
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.code), value);
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
}
|
|
124
|
+
};
|
|
125
125
|
});
|
|
126
126
|
this.name = options.name;
|
|
127
127
|
this.id = options.id;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import "./icon/iconfont.css";
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
declare class FlowMarkSelect implements ComponentInterface {
|
|
5
4
|
name: string;
|
|
6
5
|
id: string;
|
|
7
6
|
sortField: string;
|
|
8
7
|
type: string;
|
|
9
8
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
11
|
-
effects: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
10
|
+
effects: ComponentInterface['effects'];
|
|
12
11
|
workOrderMark: any[];
|
|
13
12
|
isCombinationComponent: boolean;
|
|
14
13
|
formField: string;
|
|
15
14
|
canSort: boolean;
|
|
16
15
|
children: ComponentInterface[];
|
|
17
|
-
dataType: ComponentInterface[
|
|
16
|
+
dataType: ComponentInterface['dataType'];
|
|
18
17
|
constructor(options: PickOption);
|
|
19
|
-
renderMenu: (record: Record) => React.JSX.Element;
|
|
20
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
21
19
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
22
20
|
getComponentValue: (r: Record) => any;
|
|
@@ -8,14 +8,14 @@ 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 { Dropdown, Menu } from "antd";
|
|
11
|
+
import React from 'react';
|
|
13
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
13
|
+
import SelectMark from "../../commonComponents/SelectMark";
|
|
14
|
+
import { ApaasSelect } from '@kmkf-fe-packages/basic-components';
|
|
15
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
16
|
import GetFormItem from "../GetFormItem";
|
|
17
17
|
import { SYMBOL } from "../../constant";
|
|
18
|
-
import "./icon/iconfont.css";
|
|
18
|
+
// import "./icon/iconfont.css";
|
|
19
19
|
var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options) {
|
|
20
20
|
var _this = this;
|
|
21
21
|
_classCallCheck(this, FlowMarkSelect);
|
|
@@ -32,33 +32,15 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
32
32
|
_defineProperty(this, "canSort", void 0);
|
|
33
33
|
_defineProperty(this, "children", void 0);
|
|
34
34
|
_defineProperty(this, "dataType", void 0);
|
|
35
|
-
_defineProperty(this, "renderMenu", function (record) {
|
|
36
|
-
var menu = /*#__PURE__*/React.createElement(Menu, {
|
|
37
|
-
onClick: function onClick(_ref) {
|
|
38
|
-
var _this$effects, _this$effects2;
|
|
39
|
-
var key = _ref.key,
|
|
40
|
-
domEvent = _ref.domEvent;
|
|
41
|
-
domEvent.stopPropagation();
|
|
42
|
-
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.handleChangeSingleWorkOrderMark) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.handleChangeSingleWorkOrderMark(key, record));
|
|
43
|
-
}
|
|
44
|
-
}, _this.workOrderMark.map(function (item) {
|
|
45
|
-
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
46
|
-
key: item.value
|
|
47
|
-
}, item.label);
|
|
48
|
-
}));
|
|
49
|
-
return menu;
|
|
50
|
-
});
|
|
51
35
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
52
|
-
var
|
|
53
|
-
|
|
36
|
+
var changeMarkHandle = function changeMarkHandle(key) {
|
|
37
|
+
var _this$effects, _this$effects2;
|
|
38
|
+
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.handleChangeSingleWorkOrderMark) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.handleChangeSingleWorkOrderMark(key, record));
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/React.createElement(SelectMark, {
|
|
41
|
+
value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)],
|
|
42
|
+
onChange: changeMarkHandle
|
|
54
43
|
});
|
|
55
|
-
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
56
|
-
overlay: _this.renderMenu(record)
|
|
57
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
58
|
-
onClick: function onClick(e) {
|
|
59
|
-
return e.stopPropagation();
|
|
60
|
-
}
|
|
61
|
-
}, (mark === null || mark === void 0 ? void 0 : mark.label) || "--"));
|
|
62
44
|
});
|
|
63
45
|
_defineProperty(this, "renderLog", function (r) {
|
|
64
46
|
var mark = _this.workOrderMark.find(function (item) {
|
|
@@ -75,23 +57,23 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
75
57
|
});
|
|
76
58
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
77
59
|
var MARK_MAP = {
|
|
78
|
-
1:
|
|
79
|
-
2:
|
|
80
|
-
3:
|
|
81
|
-
4:
|
|
82
|
-
5:
|
|
83
|
-
6:
|
|
60
|
+
1: '白色',
|
|
61
|
+
2: '红色',
|
|
62
|
+
3: '黄色',
|
|
63
|
+
4: '蓝色',
|
|
64
|
+
5: '绿色',
|
|
65
|
+
6: '紫色'
|
|
84
66
|
};
|
|
85
67
|
var mark = _this.workOrderMark.find(function (item) {
|
|
86
68
|
return item.value === (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
87
69
|
});
|
|
88
|
-
return mark ? MARK_MAP[mark === null || mark === void 0 ? void 0 : mark.value] :
|
|
70
|
+
return mark ? MARK_MAP[mark === null || mark === void 0 ? void 0 : mark.value] : '--';
|
|
89
71
|
});
|
|
90
72
|
_defineProperty(this, "renderClient", function (record) {
|
|
91
73
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
92
74
|
id: _this.id,
|
|
93
75
|
label: _this.name,
|
|
94
|
-
value: (record === null || record === void 0 ? void 0 : record[_this.id]) ||
|
|
76
|
+
value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ''
|
|
95
77
|
}) : null;
|
|
96
78
|
});
|
|
97
79
|
_defineProperty(this, "editRender", function (p) {
|
|
@@ -115,41 +97,41 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
115
97
|
// 过滤组件id
|
|
116
98
|
name: item.name,
|
|
117
99
|
// 过滤组件名称
|
|
118
|
-
filterComponentType:
|
|
100
|
+
filterComponentType: 'MultipleSelect',
|
|
119
101
|
props: {
|
|
120
102
|
//不使用workOrderMark的数据,筛选会深拷贝
|
|
121
103
|
options: [{
|
|
122
|
-
label:
|
|
123
|
-
value:
|
|
104
|
+
label: '空白',
|
|
105
|
+
value: '1'
|
|
124
106
|
}, {
|
|
125
|
-
label:
|
|
126
|
-
value:
|
|
107
|
+
label: '红色',
|
|
108
|
+
value: '2'
|
|
127
109
|
}, {
|
|
128
|
-
label:
|
|
129
|
-
value:
|
|
110
|
+
label: '黄色',
|
|
111
|
+
value: '3'
|
|
130
112
|
}, {
|
|
131
|
-
label:
|
|
132
|
-
value:
|
|
113
|
+
label: '蓝色',
|
|
114
|
+
value: '4'
|
|
133
115
|
}, {
|
|
134
|
-
label:
|
|
135
|
-
value:
|
|
116
|
+
label: '绿色',
|
|
117
|
+
value: '5'
|
|
136
118
|
}, {
|
|
137
|
-
label:
|
|
138
|
-
value:
|
|
119
|
+
label: '紫色',
|
|
120
|
+
value: '6'
|
|
139
121
|
}]
|
|
140
122
|
},
|
|
141
123
|
filterFn: function filterFn(value) {
|
|
142
124
|
return function (i) {
|
|
143
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
125
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
|
|
144
126
|
};
|
|
145
127
|
}
|
|
146
128
|
};
|
|
147
129
|
});
|
|
148
|
-
this.name =
|
|
149
|
-
this.id =
|
|
150
|
-
this.sortField =
|
|
151
|
-
this.formField =
|
|
152
|
-
this.type =
|
|
130
|
+
this.name = '标记';
|
|
131
|
+
this.id = 'markFlag';
|
|
132
|
+
this.sortField = 'markFlag';
|
|
133
|
+
this.formField = 'markFlag';
|
|
134
|
+
this.type = 'FLOW_MARK_SELECT';
|
|
153
135
|
this.effects = options.effects;
|
|
154
136
|
this.rules = [];
|
|
155
137
|
this.isCombinationComponent = false;
|
|
@@ -159,51 +141,51 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
|
|
|
159
141
|
label: /*#__PURE__*/React.createElement("span", {
|
|
160
142
|
className: "iconfont icon-xingxing"
|
|
161
143
|
}),
|
|
162
|
-
value:
|
|
144
|
+
value: '1'
|
|
163
145
|
}, {
|
|
164
146
|
label: /*#__PURE__*/React.createElement("span", {
|
|
165
147
|
className: "iconfont icon-xingxing1",
|
|
166
148
|
style: {
|
|
167
|
-
color:
|
|
149
|
+
color: '#ff0000'
|
|
168
150
|
}
|
|
169
151
|
}),
|
|
170
|
-
value:
|
|
152
|
+
value: '2'
|
|
171
153
|
}, {
|
|
172
154
|
label: /*#__PURE__*/React.createElement("span", {
|
|
173
155
|
className: "iconfont icon-xingxing1",
|
|
174
156
|
style: {
|
|
175
|
-
color:
|
|
157
|
+
color: '#f6b343'
|
|
176
158
|
}
|
|
177
159
|
}),
|
|
178
|
-
value:
|
|
160
|
+
value: '3'
|
|
179
161
|
}, {
|
|
180
162
|
label: /*#__PURE__*/React.createElement("span", {
|
|
181
163
|
className: "iconfont icon-xingxing1",
|
|
182
164
|
style: {
|
|
183
|
-
color:
|
|
165
|
+
color: '#4d90f7'
|
|
184
166
|
}
|
|
185
167
|
}),
|
|
186
|
-
value:
|
|
168
|
+
value: '4'
|
|
187
169
|
}, {
|
|
188
170
|
label: /*#__PURE__*/React.createElement("span", {
|
|
189
171
|
className: "iconfont icon-xingxing1",
|
|
190
172
|
style: {
|
|
191
|
-
color:
|
|
173
|
+
color: '#6ed86c'
|
|
192
174
|
}
|
|
193
175
|
}),
|
|
194
|
-
value:
|
|
176
|
+
value: '5'
|
|
195
177
|
}, {
|
|
196
178
|
label: /*#__PURE__*/React.createElement("span", {
|
|
197
179
|
className: "iconfont icon-xingxing1",
|
|
198
180
|
style: {
|
|
199
|
-
color:
|
|
181
|
+
color: '#be4ed1'
|
|
200
182
|
}
|
|
201
183
|
}),
|
|
202
|
-
value:
|
|
184
|
+
value: '6'
|
|
203
185
|
}];
|
|
204
186
|
this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
|
|
205
187
|
options: this.workOrderMark
|
|
206
188
|
});
|
|
207
|
-
this.dataType =
|
|
189
|
+
this.dataType = 'string';
|
|
208
190
|
});
|
|
209
191
|
export default FlowMarkSelect;
|
|
@@ -2,6 +2,7 @@ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ExpressData, ExpressInterceptData, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
4
|
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
5
|
+
import InterceptSnapshot from "./interceptSnapshot";
|
|
5
6
|
import InterceptAddress from "./InterceptAddress";
|
|
6
7
|
import InterceptType from "./InterceptType";
|
|
7
8
|
import InterceptStatus from "./InterceptStatus";
|
|
@@ -19,6 +20,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
19
20
|
interceptType: InterceptType;
|
|
20
21
|
interceptLogisticsStatus: InterceptStatus;
|
|
21
22
|
interceptSenderMobile: InterceptSenderMobile;
|
|
23
|
+
interceptSnapshot: InterceptSnapshot;
|
|
22
24
|
isCombinationComponent: boolean;
|
|
23
25
|
formField: string;
|
|
24
26
|
canSort: boolean;
|
|
@@ -29,7 +31,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
29
31
|
expressInterceptData: InstanceType<typeof ExpressInterceptData>;
|
|
30
32
|
logisticsAddressData: InstanceType<typeof LogisticsAddressData>;
|
|
31
33
|
effects: ComponentInterface["effects"];
|
|
32
|
-
dataType: ComponentInterface[
|
|
34
|
+
dataType: ComponentInterface["dataType"];
|
|
33
35
|
constructor(options: PickOption);
|
|
34
36
|
renderClient: (record: any) => React.JSX.Element;
|
|
35
37
|
renderLog: (record: any) => React.JSX.Element;
|
|
@@ -47,6 +49,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
47
49
|
name: any;
|
|
48
50
|
mobile: any;
|
|
49
51
|
};
|
|
52
|
+
interceptSnapshot: any;
|
|
50
53
|
};
|
|
51
54
|
renderPc: () => null;
|
|
52
55
|
renderExport: () => null;
|
|
@@ -13,6 +13,7 @@ import { LogisticsInterception } from "@kmkf-fe-packages/basic-components";
|
|
|
13
13
|
import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import GetFormItem from "../GetFormItem";
|
|
15
15
|
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
16
|
+
import InterceptSnapshot from "./interceptSnapshot";
|
|
16
17
|
import InterceptAddress from "./InterceptAddress";
|
|
17
18
|
import InterceptType from "./InterceptType";
|
|
18
19
|
import InterceptStatus from "./InterceptStatus";
|
|
@@ -33,6 +34,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
33
34
|
_defineProperty(this, "interceptType", void 0);
|
|
34
35
|
_defineProperty(this, "interceptLogisticsStatus", void 0);
|
|
35
36
|
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
37
|
+
_defineProperty(this, "interceptSnapshot", void 0);
|
|
36
38
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
37
39
|
_defineProperty(this, "formField", void 0);
|
|
38
40
|
_defineProperty(this, "canSort", void 0);
|
|
@@ -45,10 +47,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
45
47
|
_defineProperty(this, "effects", void 0);
|
|
46
48
|
_defineProperty(this, "dataType", void 0);
|
|
47
49
|
_defineProperty(this, "renderClient", function (record) {
|
|
48
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record));
|
|
50
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptSnapshot.renderClient(record));
|
|
49
51
|
});
|
|
50
52
|
_defineProperty(this, "renderLog", function (record) {
|
|
51
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))));
|
|
53
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))));
|
|
52
54
|
});
|
|
53
55
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
54
56
|
return {
|
|
@@ -57,7 +59,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
57
59
|
interceptSenderMobile: _this.interceptSenderMobile.getComponentValue(r),
|
|
58
60
|
interceptType: _this.interceptType.getComponentValue(r),
|
|
59
61
|
interceptLogisticsStatus: _this.interceptLogisticsStatus.getComponentValue(r),
|
|
60
|
-
interceptRedirectTo: _this.interceptAddress.getComponentValue(r)
|
|
62
|
+
interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
|
|
63
|
+
interceptSnapshot: _this.interceptSnapshot.getComponentValue(r)
|
|
61
64
|
};
|
|
62
65
|
});
|
|
63
66
|
_defineProperty(this, "renderPc", function () {
|
|
@@ -106,6 +109,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
106
109
|
this.interceptType = new InterceptType(options);
|
|
107
110
|
this.interceptLogisticsStatus = new InterceptStatus(options);
|
|
108
111
|
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
112
|
+
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
109
113
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
110
114
|
id: "".concat(options.id, "_interceptCompany"),
|
|
111
115
|
name: "物流信息"
|
|
@@ -116,8 +120,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
116
120
|
}));
|
|
117
121
|
this.isCombinationComponent = true;
|
|
118
122
|
this.canSort = false;
|
|
119
|
-
this.dataType =
|
|
120
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus];
|
|
123
|
+
this.dataType = "object";
|
|
124
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot];
|
|
121
125
|
this.rules = [{
|
|
122
126
|
validator: function validator(_, value) {
|
|
123
127
|
var _this$componentConfig3, _this$componentConfig4, _value$interceptAddre, _value$interceptSende;
|
|
@@ -14,7 +14,7 @@ declare class InterceptSenderMobile implements ComponentInterface {
|
|
|
14
14
|
sortField: string;
|
|
15
15
|
formField: string;
|
|
16
16
|
canSort: boolean;
|
|
17
|
-
dataType: ComponentInterface[
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
18
|
children: ComponentInterface[];
|
|
19
19
|
constructor(options: PickOption);
|
|
20
20
|
getComponentValue: (r: Record) => any;
|
|
@@ -68,9 +68,9 @@ var InterceptSenderMobile = /*#__PURE__*/_createClass(function InterceptSenderMo
|
|
|
68
68
|
this.name = "发件人手机号";
|
|
69
69
|
this.id = "".concat(options.id, "_interceptSenderMobile");
|
|
70
70
|
this.companyId = "".concat(options.id, "_interceptCompany");
|
|
71
|
-
this.formField = "".concat(options.id, "
|
|
72
|
-
this.sortField = "".concat(options.id, "
|
|
73
|
-
this.dataType =
|
|
71
|
+
this.formField = "".concat(options.id, "_interceptSenderMobile");
|
|
72
|
+
this.sortField = "".concat(options.id, "_interceptSenderMobile");
|
|
73
|
+
this.dataType = "string";
|
|
74
74
|
this.type = options.type;
|
|
75
75
|
this.componentConfig = options.componentConfig;
|
|
76
76
|
this.rules = [];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class InterceptSnapshot implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
companyId: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
|
+
align: ALignType;
|
|
12
|
+
width: number;
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
sortField: string;
|
|
15
|
+
formField: string;
|
|
16
|
+
canSort: boolean;
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
children: ComponentInterface[];
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: any, record: Record) => any;
|
|
23
|
+
renderLog: (r: Record) => any;
|
|
24
|
+
renderExport: (value: any, record: Record) => any;
|
|
25
|
+
editRender: () => null;
|
|
26
|
+
filterConfig: (item: ColumnConfig) => {
|
|
27
|
+
searchDefaultConditions: "like";
|
|
28
|
+
type: string;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
filterComponentType: "Input";
|
|
32
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export default InterceptSnapshot;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
import React from "react";
|
|
9
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
import { SYMBOL } from "../../constant";
|
|
12
|
+
var InterceptSnapshot = /*#__PURE__*/_createClass(function InterceptSnapshot(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, InterceptSnapshot);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "companyId", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", void 0);
|
|
20
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
21
|
+
_defineProperty(this, "effects", void 0);
|
|
22
|
+
_defineProperty(this, "align", void 0);
|
|
23
|
+
_defineProperty(this, "width", void 0);
|
|
24
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
+
_defineProperty(this, "sortField", void 0);
|
|
26
|
+
_defineProperty(this, "formField", void 0);
|
|
27
|
+
_defineProperty(this, "canSort", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "children", void 0);
|
|
30
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
31
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
34
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
|
+
id: _this.id,
|
|
36
|
+
label: _this.name,
|
|
37
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
38
|
+
}) : null;
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
41
|
+
return record === null || record === void 0 ? void 0 : record[_this.id];
|
|
42
|
+
});
|
|
43
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
44
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
45
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
48
|
+
var _record;
|
|
49
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "editRender", function () {
|
|
52
|
+
return null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
55
|
+
return {
|
|
56
|
+
searchDefaultConditions: SYMBOL.like,
|
|
57
|
+
type: item.type,
|
|
58
|
+
id: "".concat(item.id, "_interceptLogisticsSnapshot"),
|
|
59
|
+
name: "".concat(item.name, "-\u5FEB\u7167"),
|
|
60
|
+
filterComponentType: "Input",
|
|
61
|
+
filterFn: function filterFn(value) {
|
|
62
|
+
return function (i) {
|
|
63
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "interceptLogisticsSnapshot")).includes(value);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
this.name = "快照";
|
|
69
|
+
this.id = "".concat(options.id, "_interceptLogisticsSnapshot");
|
|
70
|
+
this.companyId = "".concat(options.id, "_interceptCompany");
|
|
71
|
+
this.formField = "".concat(options.id, "_interceptLogisticsSnapshot");
|
|
72
|
+
this.sortField = "".concat(options.id, "_interceptLogisticsSnapshot");
|
|
73
|
+
this.dataType = "string";
|
|
74
|
+
this.type = options.type;
|
|
75
|
+
this.componentConfig = options.componentConfig;
|
|
76
|
+
this.rules = [];
|
|
77
|
+
this.align = "left";
|
|
78
|
+
this.width = 200;
|
|
79
|
+
this.isCombinationComponent = false;
|
|
80
|
+
this.canSort = true;
|
|
81
|
+
this.children = [];
|
|
82
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
83
|
+
});
|
|
84
|
+
export default InterceptSnapshot;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
|
65
65
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
66
66
|
export { factory } from "./factory";
|
|
67
67
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
68
|
+
export { default as SelectMark } from "./commonComponents/SelectMark";
|
|
68
69
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
|
69
70
|
export { default as ShopList } from "./commonComponents/ShopList";
|
|
70
71
|
export { default as OperationLog } from "./commonComponents/OperationLog";
|
package/dist/esm/index.js
CHANGED
|
@@ -65,6 +65,7 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
|
65
65
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
66
66
|
export { factory } from "./factory";
|
|
67
67
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
68
|
+
export { default as SelectMark } from "./commonComponents/SelectMark";
|
|
68
69
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
|
69
70
|
export { default as ShopList } from "./commonComponents/ShopList";
|
|
70
71
|
export { default as OperationLog } from "./commonComponents/OperationLog";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.8.21-alpha.
|
|
3
|
+
"version": "0.8.21-alpha.4",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.8.21-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.8.21-alpha.3",
|
|
30
30
|
"@kmkf-fe-packages/kmkf-utils": "^0.8.21-alpha.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "f82d3aeff6b7f7ca756505cb87b7c34e0a75d8ce"
|
|
44
44
|
}
|
/package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.css
RENAMED
|
File without changes
|
/package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.js
RENAMED
|
File without changes
|
/package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.json
RENAMED
|
File without changes
|
/package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.ttf
RENAMED
|
File without changes
|
/package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.woff
RENAMED
|
File without changes
|
/package/dist/esm/{components/FlowMarkSelect → commonComponents/SelectMark}/icon/iconfont.woff2
RENAMED
|
File without changes
|