@kmkf-fe-packages/services-components 0.26.1-beta.9 → 0.26.2-alpha.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/README.md +2 -1
- package/dist/esm/commonComponents/GlobalContext/index.d.ts +7 -0
- package/dist/esm/commonComponents/GlobalContext/index.js +104 -0
- package/dist/esm/commonComponents/SelectMark/index.js +6 -2
- package/dist/esm/components/BuyerNick/index.d.ts +3 -3
- package/dist/esm/components/BuyerNick/index.js +19 -9
- package/dist/esm/components/Common/index.d.ts +0 -1
- package/dist/esm/components/Common/index.js +3 -74
- package/dist/esm/components/CompletedUser/index.js +1 -1
- package/dist/esm/components/FlowMarkSelect/index.js +3 -2
- package/dist/esm/components/FlowStatusSelect/index.js +1 -0
- package/dist/esm/components/FlowTag/index.js +1 -1
- package/dist/esm/components/{LogisticsMoreInterception/InterceptType.d.ts → FlowWorkOrderStatus/index.d.ts} +12 -16
- package/dist/esm/components/{PaymentVoucherCode → FlowWorkOrderStatus}/index.js +85 -46
- package/dist/esm/components/Handler/index.js +1 -1
- package/dist/esm/components/HandlerDeadLine/index.js +0 -1
- package/dist/esm/components/LogisticsInterception/InterceptStatus.d.ts +2 -2
- package/dist/esm/components/LogisticsInterception/InterceptStatus.js +1 -1
- package/dist/esm/components/LogisticsMoreTrajectory/index.js +2 -2
- package/dist/esm/components/MultSelect/index.d.ts +4 -4
- package/dist/esm/components/MultSelect/index.js +13 -13
- package/dist/esm/components/NodeDeadLine/index.js +0 -1
- package/dist/esm/components/NodeInput/index.d.ts +24 -0
- package/dist/esm/components/{LogisticsMoreInterception/interceptItem.js → NodeInput/index.js} +24 -47
- package/dist/esm/components/Payment/PaymentStatus.d.ts +4 -4
- package/dist/esm/components/Payment/PaymentStatus.js +30 -30
- package/dist/esm/components/PlatForm/index.js +1 -1
- package/dist/esm/components/ShopInput/index.js +1 -1
- package/dist/esm/constant.js +13 -12
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +11 -10
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +4 -4
- package/dist/esm/service/api.d.ts +7 -1
- package/dist/esm/service/api.js +238 -5
- package/dist/esm/service/request.js +9 -1
- package/dist/esm/type.d.ts +1 -1
- package/package.json +4 -4
- package/dist/esm/components/CommonInput/index.d.ts +0 -44
- package/dist/esm/components/CommonInput/index.js +0 -146
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.d.ts +0 -31
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +0 -88
- package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.d.ts +0 -46
- package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.js +0 -111
- package/dist/esm/components/LogisticsMoreInterception/InterceptType.js +0 -96
- package/dist/esm/components/LogisticsMoreInterception/columnHeader.d.ts +0 -5
- package/dist/esm/components/LogisticsMoreInterception/columnHeader.js +0 -55
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +0 -69
- package/dist/esm/components/LogisticsMoreInterception/index.js +0 -184
- package/dist/esm/components/LogisticsMoreInterception/interceptCompany.d.ts +0 -39
- package/dist/esm/components/LogisticsMoreInterception/interceptCompany.js +0 -88
- package/dist/esm/components/LogisticsMoreInterception/interceptItem.d.ts +0 -34
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +0 -35
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +0 -82
- package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.d.ts +0 -34
- package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.js +0 -81
- package/dist/esm/components/PaymentVoucherCode/index.d.ts +0 -33
|
@@ -6,59 +6,54 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
10
|
-
import {
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { ApaasSelect } from '@kmkf-fe-packages/basic-components';
|
|
11
|
+
import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
12
|
import GetFormItem from "../GetFormItem";
|
|
12
|
-
import
|
|
13
|
-
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import get from 'lodash/get';
|
|
14
14
|
import { SYMBOL } from "../../constant";
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
var _this = this
|
|
18
|
-
|
|
15
|
+
// 节点状态
|
|
16
|
+
var FlowWorkOrderStatus = /*#__PURE__*/_createClass(function FlowWorkOrderStatus(options) {
|
|
17
|
+
var _this = this,
|
|
18
|
+
_Object$keys2;
|
|
19
|
+
_classCallCheck(this, FlowWorkOrderStatus);
|
|
19
20
|
_defineProperty(this, "name", void 0);
|
|
20
21
|
_defineProperty(this, "id", void 0);
|
|
21
22
|
_defineProperty(this, "sortField", void 0);
|
|
22
23
|
_defineProperty(this, "type", void 0);
|
|
23
24
|
_defineProperty(this, "rules", void 0);
|
|
24
25
|
_defineProperty(this, "componentConfig", void 0);
|
|
26
|
+
_defineProperty(this, "effects", void 0);
|
|
27
|
+
_defineProperty(this, "workOrderStatus", void 0);
|
|
25
28
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
26
29
|
_defineProperty(this, "formField", void 0);
|
|
27
30
|
_defineProperty(this, "canSort", void 0);
|
|
28
31
|
_defineProperty(this, "children", void 0);
|
|
29
32
|
_defineProperty(this, "dataType", void 0);
|
|
30
|
-
_defineProperty(this, "
|
|
31
|
-
_defineProperty(this, "workOrderUniqueKey", void 0);
|
|
32
|
-
_defineProperty(this, "effects", void 0);
|
|
33
|
+
_defineProperty(this, "options", void 0);
|
|
33
34
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
|
-
var _this
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
});
|
|
35
|
+
var status = get(_this.workOrderStatus, record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
36
|
+
return status ? /*#__PURE__*/React.createElement("span", {
|
|
37
|
+
style: {
|
|
38
|
+
color: status.color
|
|
39
|
+
}
|
|
40
|
+
}, status === null || status === void 0 ? void 0 : status.label) : /*#__PURE__*/React.createElement("span", null, "--");
|
|
40
41
|
});
|
|
41
42
|
_defineProperty(this, "renderLog", function (r) {
|
|
42
|
-
|
|
43
|
+
var status = get(_this.workOrderStatus, r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
|
|
44
|
+
if (!status) return null;
|
|
43
45
|
return _this.renderPc(undefined, r);
|
|
44
46
|
});
|
|
45
47
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
46
|
-
|
|
48
|
+
var status = get(_this.workOrderStatus, r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
|
|
49
|
+
return status;
|
|
47
50
|
});
|
|
48
51
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
|
-
var
|
|
50
|
-
return
|
|
52
|
+
var status = get(_this.workOrderStatus, record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
53
|
+
return status ? status === null || status === void 0 ? void 0 : status.label : '--';
|
|
51
54
|
});
|
|
52
|
-
_defineProperty(this, "renderClient", function (
|
|
53
|
-
|
|
54
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
55
|
-
id: _this.id,
|
|
56
|
-
label: _this.name,
|
|
57
|
-
value: /*#__PURE__*/React.createElement(AlipayBill, {
|
|
58
|
-
value: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
59
|
-
platform: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.env
|
|
60
|
-
})
|
|
61
|
-
}) : null;
|
|
55
|
+
_defineProperty(this, "renderClient", function () {
|
|
56
|
+
return null;
|
|
62
57
|
});
|
|
63
58
|
_defineProperty(this, "editRender", function (p) {
|
|
64
59
|
var _this$componentConfig, _this$componentConfig2;
|
|
@@ -67,38 +62,82 @@ var PaymentVoucherCode = /*#__PURE__*/_createClass(function PaymentVoucherCode(o
|
|
|
67
62
|
name: _this.id,
|
|
68
63
|
rules: _this.rules,
|
|
69
64
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
70
|
-
display: p === null || p === void 0 ? void 0 : p.display,
|
|
71
65
|
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,
|
|
72
|
-
component: /*#__PURE__*/React.createElement(
|
|
73
|
-
placeholder: "\
|
|
74
|
-
|
|
66
|
+
component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
|
|
67
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
68
|
+
showSearch: true
|
|
75
69
|
}))
|
|
76
70
|
});
|
|
77
71
|
});
|
|
78
72
|
_defineProperty(this, "filterConfig", function (item) {
|
|
73
|
+
var _Object$keys;
|
|
79
74
|
return {
|
|
80
|
-
searchDefaultConditions: SYMBOL.
|
|
75
|
+
searchDefaultConditions: SYMBOL.in,
|
|
81
76
|
type: item.type,
|
|
82
|
-
id:
|
|
77
|
+
id: item.id,
|
|
83
78
|
// 过滤组件id
|
|
84
79
|
name: item.name,
|
|
85
80
|
// 过滤组件名称
|
|
86
|
-
filterComponentType:
|
|
81
|
+
filterComponentType: 'MultipleSelect',
|
|
82
|
+
props: {
|
|
83
|
+
options: (_Object$keys = Object.keys(_this.workOrderStatus)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (item) {
|
|
84
|
+
return {
|
|
85
|
+
label: _this.workOrderStatus[item].label,
|
|
86
|
+
value: item
|
|
87
|
+
};
|
|
88
|
+
})
|
|
89
|
+
},
|
|
90
|
+
filterFn: function filterFn(value) {
|
|
91
|
+
return function (i) {
|
|
92
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
|
|
93
|
+
};
|
|
94
|
+
}
|
|
87
95
|
};
|
|
88
96
|
});
|
|
89
97
|
this.name = options.name;
|
|
90
98
|
this.id = options.id;
|
|
91
|
-
this.sortField =
|
|
92
|
-
this.formField =
|
|
99
|
+
this.sortField = options.id;
|
|
100
|
+
this.formField = options.id;
|
|
93
101
|
this.type = options.type;
|
|
94
|
-
this.templateId = options.templateId;
|
|
95
102
|
this.componentConfig = options.componentConfig;
|
|
96
|
-
this.
|
|
103
|
+
this.effects = options.effects;
|
|
97
104
|
this.rules = [];
|
|
98
105
|
this.isCombinationComponent = false;
|
|
99
|
-
this.canSort =
|
|
106
|
+
this.canSort = true;
|
|
100
107
|
this.children = [];
|
|
101
|
-
this.
|
|
102
|
-
|
|
108
|
+
this.workOrderStatus = {
|
|
109
|
+
"WAITING": {
|
|
110
|
+
label: '待处理',
|
|
111
|
+
color: '#faad14',
|
|
112
|
+
bgColor: '#faad14'
|
|
113
|
+
},
|
|
114
|
+
"PROCESSING": {
|
|
115
|
+
label: '处理中',
|
|
116
|
+
color: '#1890ff',
|
|
117
|
+
bgColor: '#1890ff'
|
|
118
|
+
},
|
|
119
|
+
"STOPPING": {
|
|
120
|
+
label: '暂停中',
|
|
121
|
+
color: '#ff4d4f',
|
|
122
|
+
bgColor: '#ff4d4f'
|
|
123
|
+
},
|
|
124
|
+
"COMPLETED": {
|
|
125
|
+
label: '已完成',
|
|
126
|
+
color: '#73d13d',
|
|
127
|
+
bgColor: '#73d13d'
|
|
128
|
+
},
|
|
129
|
+
"CLOSED": {
|
|
130
|
+
label: '已关闭',
|
|
131
|
+
color: 'rgba(0, 0, 0, 0.65)',
|
|
132
|
+
bgColor: 'rgba(0, 0, 0, 0.04);'
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
this.dataType = 'string';
|
|
136
|
+
this.options = (_Object$keys2 = Object.keys(this.workOrderStatus)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.map(function (item) {
|
|
137
|
+
return {
|
|
138
|
+
label: _this.workOrderStatus[item].label,
|
|
139
|
+
value: item
|
|
140
|
+
};
|
|
141
|
+
});
|
|
103
142
|
});
|
|
104
|
-
export default
|
|
143
|
+
export default FlowWorkOrderStatus;
|
|
@@ -74,7 +74,7 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
});
|
|
77
|
-
this.name = "处理人";
|
|
77
|
+
this.name = (options === null || options === void 0 ? void 0 : options.name) || "处理人";
|
|
78
78
|
this.id = (options === null || options === void 0 ? void 0 : options.id) || "handlerList";
|
|
79
79
|
this.sortField = "handlerList";
|
|
80
80
|
this.formField = "handlerList";
|
|
@@ -26,7 +26,6 @@ var HandlerDeadLine = /*#__PURE__*/_createClass(function HandlerDeadLine(options
|
|
|
26
26
|
_defineProperty(this, "options", void 0);
|
|
27
27
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
28
28
|
var _record, _record2;
|
|
29
|
-
if (!(record !== null && record !== void 0 && record.hasHandlerDeadLine)) return /*#__PURE__*/React.createElement("span", null, "\u672A\u8BBE\u7F6E");
|
|
30
29
|
return /*#__PURE__*/React.createElement("span", {
|
|
31
30
|
className: record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record.includes('已超时') ? 'timeout' : ''
|
|
32
31
|
}, (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record2 !== void 0 ? _record2 : '--');
|
|
@@ -18,8 +18,8 @@ declare class InterceptStatus implements ComponentInterface {
|
|
|
18
18
|
canSort: boolean;
|
|
19
19
|
children: ComponentInterface[];
|
|
20
20
|
expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
|
|
21
|
-
dataType: ComponentInterface[
|
|
22
|
-
options: ComponentInterface[
|
|
21
|
+
dataType: ComponentInterface['dataType'];
|
|
22
|
+
options: ComponentInterface['options'];
|
|
23
23
|
constructor(options: PickOption);
|
|
24
24
|
getComponentValue: (r: Record) => any;
|
|
25
25
|
renderStatus: (record: any, w?: number) => React.JSX.Element;
|
|
@@ -116,7 +116,7 @@ var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options
|
|
|
116
116
|
this.children = [];
|
|
117
117
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
118
118
|
this.expressInterceptInstance = ExpressInterceptData.getInstance();
|
|
119
|
-
this.dataType =
|
|
119
|
+
this.dataType = 'string';
|
|
120
120
|
this.options = this.expressInterceptInstance.getStatusOptions() || [];
|
|
121
121
|
}
|
|
122
122
|
|
|
@@ -107,10 +107,10 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
|
|
|
107
107
|
var hasNoCode = value.some(function (item) {
|
|
108
108
|
return !item.trajectoryCode;
|
|
109
109
|
});
|
|
110
|
-
if (hasNoCompany) {
|
|
110
|
+
if (!hasNoCompany) {
|
|
111
111
|
return Promise.reject(new Error("请选择物流公司"));
|
|
112
112
|
}
|
|
113
|
-
if (hasNoCode) {
|
|
113
|
+
if (!hasNoCode) {
|
|
114
114
|
return Promise.reject(new Error("请输入物流单号"));
|
|
115
115
|
}
|
|
116
116
|
return Promise.resolve();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BasicMultSelect implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -11,8 +11,8 @@ declare class BasicMultSelect implements ComponentInterface {
|
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface[
|
|
15
|
-
options: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface['dataType'];
|
|
15
|
+
options: ComponentInterface['options'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -6,12 +6,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
10
|
-
import intersection from
|
|
11
|
-
import { ApaasMultipleSelect } from
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import intersection from 'lodash/intersection';
|
|
11
|
+
import { ApaasMultipleSelect } from '@kmkf-fe-packages/basic-components';
|
|
12
12
|
import GetFormItem from "../GetFormItem";
|
|
13
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
14
|
-
import { isNull, filterFn as _filterFn } from
|
|
14
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options) {
|
|
17
17
|
var _this = this,
|
|
@@ -34,15 +34,15 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
34
34
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
35
|
id: _this.id,
|
|
36
36
|
label: _this.name,
|
|
37
|
-
value: record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.join(
|
|
37
|
+
value: record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.join(',')
|
|
38
38
|
}) : null;
|
|
39
39
|
});
|
|
40
40
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
41
41
|
var _record;
|
|
42
|
-
if (
|
|
42
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")]) === undefined) {
|
|
43
43
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
44
44
|
}
|
|
45
|
-
return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_basicMultSelect")]) === null || _record === void 0 ? void 0 : _record.join(
|
|
45
|
+
return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_basicMultSelect")]) === null || _record === void 0 ? void 0 : _record.join(','));
|
|
46
46
|
});
|
|
47
47
|
_defineProperty(this, "renderLog", function (r) {
|
|
48
48
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_basicMultSelect")])) return null;
|
|
@@ -53,10 +53,10 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
53
53
|
});
|
|
54
54
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
55
55
|
var _record2;
|
|
56
|
-
if (
|
|
57
|
-
return
|
|
56
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")]) === undefined) {
|
|
57
|
+
return '--';
|
|
58
58
|
}
|
|
59
|
-
return record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id, "_basicMultSelect")]) === null || _record2 === void 0 ? void 0 : _record2.join(
|
|
59
|
+
return record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id, "_basicMultSelect")]) === null || _record2 === void 0 ? void 0 : _record2.join(',');
|
|
60
60
|
});
|
|
61
61
|
_defineProperty(this, "editRender", function (p) {
|
|
62
62
|
var _this$componentConfig, _this$componentConfig2;
|
|
@@ -81,13 +81,13 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
81
81
|
// 过滤组件id
|
|
82
82
|
name: item.name,
|
|
83
83
|
// 过滤组件名称
|
|
84
|
-
filterComponentType:
|
|
84
|
+
filterComponentType: 'MultipleSelect',
|
|
85
85
|
props: {
|
|
86
86
|
options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []
|
|
87
87
|
},
|
|
88
88
|
filterFn: function filterFn(value) {
|
|
89
89
|
return function (i) {
|
|
90
|
-
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
90
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
};
|
|
@@ -102,7 +102,7 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
102
102
|
this.isCombinationComponent = false;
|
|
103
103
|
this.canSort = true;
|
|
104
104
|
this.children = [];
|
|
105
|
-
this.dataType =
|
|
105
|
+
this.dataType = 'array';
|
|
106
106
|
this.options = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.options) || [];
|
|
107
107
|
});
|
|
108
108
|
export default BasicMultSelect;
|
|
@@ -26,7 +26,6 @@ var NodeDeadLine = /*#__PURE__*/_createClass(function NodeDeadLine(options) {
|
|
|
26
26
|
_defineProperty(this, "options", void 0);
|
|
27
27
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
28
28
|
var _record, _record2;
|
|
29
|
-
if (!(record !== null && record !== void 0 && record.hasNodeDeadLine)) return /*#__PURE__*/React.createElement("span", null, "\u672A\u8BBE\u7F6E");
|
|
30
29
|
return /*#__PURE__*/React.createElement("span", {
|
|
31
30
|
className: record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record.includes('已超时') ? 'timeout' : ''
|
|
32
31
|
}, (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record2 !== void 0 ? _record2 : '--');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentInterface, Record, PickOption } from '../../type';
|
|
3
|
+
declare class NodeInput implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
isCombinationComponent: boolean;
|
|
10
|
+
formField: string;
|
|
11
|
+
canSort: boolean;
|
|
12
|
+
children: ComponentInterface[];
|
|
13
|
+
dataType: ComponentInterface['dataType'];
|
|
14
|
+
options: ComponentInterface['options'];
|
|
15
|
+
constructor(options: PickOption);
|
|
16
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
17
|
+
renderExport: (value: any, record: Record) => any;
|
|
18
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
19
|
+
getComponentValue: (r: Record) => any;
|
|
20
|
+
renderClient: () => null;
|
|
21
|
+
editRender: () => null;
|
|
22
|
+
filterConfig: () => never[];
|
|
23
|
+
}
|
|
24
|
+
export default NodeInput;
|
package/dist/esm/components/{LogisticsMoreInterception/interceptItem.js → NodeInput/index.js}
RENAMED
|
@@ -7,75 +7,52 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
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
9
|
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
10
|
-
|
|
11
|
-
var InterceptItem = /*#__PURE__*/_createClass(function InterceptItem(options) {
|
|
10
|
+
var NodeInput = /*#__PURE__*/_createClass(function NodeInput(options) {
|
|
12
11
|
var _this = this;
|
|
13
|
-
_classCallCheck(this,
|
|
12
|
+
_classCallCheck(this, NodeInput);
|
|
14
13
|
_defineProperty(this, "name", void 0);
|
|
15
14
|
_defineProperty(this, "id", void 0);
|
|
16
15
|
_defineProperty(this, "sortField", void 0);
|
|
17
16
|
_defineProperty(this, "type", void 0);
|
|
18
|
-
_defineProperty(this, "rules", void 0);
|
|
19
17
|
_defineProperty(this, "componentConfig", void 0);
|
|
20
|
-
_defineProperty(this, "align", void 0);
|
|
21
|
-
_defineProperty(this, "width", void 0);
|
|
22
18
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
23
19
|
_defineProperty(this, "formField", void 0);
|
|
24
20
|
_defineProperty(this, "canSort", void 0);
|
|
25
21
|
_defineProperty(this, "children", void 0);
|
|
26
22
|
_defineProperty(this, "dataType", void 0);
|
|
27
|
-
_defineProperty(this, "
|
|
28
|
-
var list = record[_this.id] || [];
|
|
29
|
-
if (isNull(list)) return '--';
|
|
30
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, list.map(function (item, index) {
|
|
31
|
-
return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), item);
|
|
32
|
-
}));
|
|
33
|
-
});
|
|
34
|
-
_defineProperty(this, "renderClient", function () {
|
|
35
|
-
return null;
|
|
36
|
-
});
|
|
23
|
+
_defineProperty(this, "options", void 0);
|
|
37
24
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
38
|
-
|
|
25
|
+
var _record;
|
|
26
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--');
|
|
39
27
|
});
|
|
40
|
-
_defineProperty(this, "
|
|
41
|
-
|
|
28
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
29
|
+
var _record2;
|
|
30
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
31
|
+
});
|
|
32
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
33
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
34
|
+
return _this.renderPc(undefined, r);
|
|
42
35
|
});
|
|
43
36
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
44
|
-
|
|
45
|
-
return r === null || r === void 0 ? void 0 : (_r$_this$id = r[_this.id]) === null || _r$_this$id === void 0 ? void 0 : _r$_this$id.join(',');
|
|
37
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
46
38
|
});
|
|
47
|
-
_defineProperty(this, "
|
|
48
|
-
|
|
49
|
-
return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--';
|
|
39
|
+
_defineProperty(this, "renderClient", function () {
|
|
40
|
+
return null;
|
|
50
41
|
});
|
|
51
42
|
_defineProperty(this, "editRender", function () {
|
|
52
43
|
return null;
|
|
53
44
|
});
|
|
54
|
-
_defineProperty(this, "filterConfig", function (
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
searchDefaultConditions: SYMBOL.in,
|
|
58
|
-
type: item.type,
|
|
59
|
-
id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
|
|
60
|
-
name: "".concat(item.name, "-\u7269\u6D41\u5355\u53F7"),
|
|
61
|
-
filterComponentType: 'Input',
|
|
62
|
-
formatFilterValue: function formatFilterValue(input) {
|
|
63
|
-
return batchInput(input);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
45
|
+
_defineProperty(this, "filterConfig", function () {
|
|
46
|
+
return [];
|
|
66
47
|
});
|
|
67
|
-
this.name = options.name;
|
|
68
|
-
this.id = options.id;
|
|
69
|
-
this.
|
|
70
|
-
this.
|
|
71
|
-
this.
|
|
72
|
-
this.componentConfig = options.componentConfig;
|
|
73
|
-
this.rules = [];
|
|
74
|
-
this.align = 'left';
|
|
75
|
-
this.width = 200;
|
|
48
|
+
this.name = (options === null || options === void 0 ? void 0 : options.name) || "当前步骤";
|
|
49
|
+
this.id = (options === null || options === void 0 ? void 0 : options.id) || "nodeId";
|
|
50
|
+
this.type = "NODE_INPUT";
|
|
51
|
+
this.sortField = 'nodeId';
|
|
52
|
+
this.formField = 'nodeId';
|
|
76
53
|
this.isCombinationComponent = false;
|
|
77
54
|
this.canSort = false;
|
|
78
|
-
this.dataType = 'object';
|
|
79
55
|
this.children = [];
|
|
56
|
+
this.dataType = 'string';
|
|
80
57
|
});
|
|
81
|
-
export default
|
|
58
|
+
export default NodeInput;
|
|
@@ -1,5 +1,5 @@
|
|
|
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 PaymentStatus implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -20,8 +20,8 @@ declare class PaymentStatus implements ComponentInterface {
|
|
|
20
20
|
formField: string;
|
|
21
21
|
canSort: boolean;
|
|
22
22
|
children: ComponentInterface[];
|
|
23
|
-
dataType: ComponentInterface[
|
|
24
|
-
options: ComponentInterface[
|
|
23
|
+
dataType: ComponentInterface['dataType'];
|
|
24
|
+
options: ComponentInterface['options'];
|
|
25
25
|
constructor(options: PickOption);
|
|
26
26
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
27
27
|
renderPc: (value: unknown, record: any) => any;
|
|
@@ -5,9 +5,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
5
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
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
|
-
import React from
|
|
8
|
+
import React from 'react';
|
|
9
9
|
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
-
import { isNull, filterFn as _filterFn } from
|
|
10
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
11
|
import { SYMBOL } from "../../constant";
|
|
12
12
|
var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
13
13
|
var _this = this;
|
|
@@ -37,7 +37,7 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
|
37
37
|
});
|
|
38
38
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
39
39
|
var _record$_this$id;
|
|
40
|
-
return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id :
|
|
40
|
+
return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : '--';
|
|
41
41
|
});
|
|
42
42
|
_defineProperty(this, "renderLog", function (r) {
|
|
43
43
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
@@ -47,7 +47,7 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
|
47
47
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
48
48
|
});
|
|
49
49
|
_defineProperty(this, "renderExport", function (value) {
|
|
50
|
-
return value !== null && value !== void 0 ? value :
|
|
50
|
+
return value !== null && value !== void 0 ? value : '--';
|
|
51
51
|
});
|
|
52
52
|
_defineProperty(this, "editRender", function () {
|
|
53
53
|
return null;
|
|
@@ -58,57 +58,57 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
|
58
58
|
type: item.type,
|
|
59
59
|
id: "".concat(item.id, "_enterprisePaymentStatus"),
|
|
60
60
|
name: "".concat(item.name, "-\u6253\u6B3E\u72B6\u6001"),
|
|
61
|
-
filterComponentType:
|
|
61
|
+
filterComponentType: 'MultipleSelect',
|
|
62
62
|
props: {
|
|
63
63
|
options: _this.paymentStatusOptions
|
|
64
64
|
},
|
|
65
65
|
filterFn: function filterFn(value) {
|
|
66
66
|
return function (i) {
|
|
67
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
67
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'enterprisePaymentStatus'));
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
});
|
|
72
|
-
this.name =
|
|
72
|
+
this.name = '打款状态';
|
|
73
73
|
this.id = "".concat(options.id, "_enterprisePaymentStatus");
|
|
74
74
|
this.sortField = "".concat(options.id, "_enterprisePaymentStatus");
|
|
75
75
|
this.formField = "".concat(options.id, "_enterprisePaymentStatus");
|
|
76
76
|
this.type = options.type;
|
|
77
77
|
this.componentConfig = options.componentConfig;
|
|
78
78
|
this.rules = [];
|
|
79
|
-
this.align =
|
|
79
|
+
this.align = 'left';
|
|
80
80
|
this.width = 200;
|
|
81
|
-
this.dataType =
|
|
81
|
+
this.dataType = 'string';
|
|
82
82
|
this.paymentStatus = {
|
|
83
|
-
WAITING_EXAMINE:
|
|
84
|
-
EXAMINED:
|
|
85
|
-
FLAG_PAID:
|
|
86
|
-
ALI_PAY_WAITING:
|
|
87
|
-
ALI_PAY_SUCCESS:
|
|
88
|
-
ALI_PAY_FAIL:
|
|
89
|
-
ALI_PAY_CLOSE:
|
|
83
|
+
WAITING_EXAMINE: '未打款',
|
|
84
|
+
EXAMINED: '审核通过',
|
|
85
|
+
FLAG_PAID: '标记已打款',
|
|
86
|
+
ALI_PAY_WAITING: '支付宝待付款',
|
|
87
|
+
ALI_PAY_SUCCESS: '支付宝打款成功',
|
|
88
|
+
ALI_PAY_FAIL: '支付宝打款失败',
|
|
89
|
+
ALI_PAY_CLOSE: '支付宝打款关闭'
|
|
90
90
|
};
|
|
91
91
|
this.paymentStatusOptions = [{
|
|
92
|
-
label:
|
|
93
|
-
value:
|
|
92
|
+
label: '未打款',
|
|
93
|
+
value: '未打款'
|
|
94
94
|
}, {
|
|
95
|
-
label:
|
|
96
|
-
value:
|
|
95
|
+
label: '审核通过',
|
|
96
|
+
value: '审核通过'
|
|
97
97
|
}, {
|
|
98
|
-
label:
|
|
99
|
-
value:
|
|
98
|
+
label: '标记已打款',
|
|
99
|
+
value: '标记已打款'
|
|
100
100
|
}, {
|
|
101
|
-
label:
|
|
102
|
-
value:
|
|
101
|
+
label: '支付宝待付款',
|
|
102
|
+
value: '支付宝待付款'
|
|
103
103
|
}, {
|
|
104
|
-
label:
|
|
105
|
-
value:
|
|
104
|
+
label: '支付宝打款成功',
|
|
105
|
+
value: '支付宝打款成功'
|
|
106
106
|
}, {
|
|
107
|
-
label:
|
|
108
|
-
value:
|
|
107
|
+
label: '支付宝打款失败',
|
|
108
|
+
value: '支付宝打款失败'
|
|
109
109
|
}, {
|
|
110
|
-
label:
|
|
111
|
-
value:
|
|
110
|
+
label: '支付宝打款关闭',
|
|
111
|
+
value: '支付宝打款关闭'
|
|
112
112
|
}];
|
|
113
113
|
this.options = this.paymentStatusOptions;
|
|
114
114
|
this.isCombinationComponent = false;
|
|
@@ -64,7 +64,7 @@ var PlatForm = /*#__PURE__*/_createClass(function PlatForm(options) {
|
|
|
64
64
|
options: platData
|
|
65
65
|
};
|
|
66
66
|
});
|
|
67
|
-
this.name = "平台";
|
|
67
|
+
this.name = (options === null || options === void 0 ? void 0 : options.name) || "平台";
|
|
68
68
|
this.id = (options === null || options === void 0 ? void 0 : options.id) || "platform";
|
|
69
69
|
this.type = "PLATFORM_INPUT";
|
|
70
70
|
this.sortField = 'platform';
|
|
@@ -86,7 +86,7 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
|
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
});
|
|
89
|
-
this.name = "店铺名称";
|
|
89
|
+
this.name = (options === null || options === void 0 ? void 0 : options.name) || "店铺名称";
|
|
90
90
|
this.id = (options === null || options === void 0 ? void 0 : options.id) || "shopName";
|
|
91
91
|
this.type = "SHOP_INPUT";
|
|
92
92
|
this.sortField = "shopName";
|