kts-components-document-access-point 1.4.12 → 2.0.0
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/DocumentWhiteList/___demo___/base/index.d.ts +2 -1
- package/dist/DocumentWhiteList/___demo___/setService/index.d.ts +2 -1
- package/dist/DocumentWhiteList/control/actions/addblack/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/addwhite/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/blacklist/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/demo/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/didilist/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/enableblacklist/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/enablelist/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/enablewhitelist/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/getmode/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/synclist/index.d.ts +1 -1
- package/dist/DocumentWhiteList/control/actions/whitelist/index.d.ts +1 -1
- package/dist/DocumentWhiteList/index.d.ts +1 -1
- package/dist/DocumentWhiteList/ui/UnifiedSearch/index.d.ts +11 -0
- package/dist/DocumentWhiteList/ui/clientmodal/index.d.ts +2 -1
- package/dist/DocumentWhiteList/ui/main/black.d.ts +2 -1
- package/dist/DocumentWhiteList/ui/main/index.d.ts +2 -1
- package/dist/DocumentWhiteList/ui/main/switchmode.d.ts +2 -1
- package/dist/DocumentWhiteList/ui/main/white.d.ts +2 -1
- package/dist/DocumentWhiteList/ui/pageheader/BlackHeader.d.ts +2 -1
- package/dist/DocumentWhiteList/ui/pageheader/WhiteHeader.d.ts +2 -1
- package/dist/DocumentWhiteList/ui/pageui/index.d.ts +1 -1
- package/dist/DocumentWhiteList/ui/whitemodal/index.d.ts +2 -1
- package/dist/DocumentsCont/___demo___/base/index.d.ts +2 -1
- package/dist/DocumentsCont/___demo___/setService/index.d.ts +2 -1
- package/dist/DocumentsCont/index.d.ts +1 -1
- package/dist/DocumentsDemo/Text.d.ts +2 -1
- package/dist/DocumentsDemo/___demo___/base/index.d.ts +2 -1
- package/dist/DocumentsDemo/index.d.ts +1 -1
- package/dist/DocumentsEdit/DocumentsEditController/DocumentsEditControllerState/IProperties/index.d.ts +3 -3
- package/dist/DocumentsEdit/DocumentsEditController/DocumentsEditControllerState/RuleState/index.d.ts +1 -1
- package/dist/DocumentsEdit/DocumentsEditController/actions/addProperties/index.d.ts +3 -3
- package/dist/DocumentsEdit/DocumentsEditController/actions/delProperties/index.d.ts +1 -1
- package/dist/DocumentsEdit/___demo___/conventional/index.d.ts +2 -1
- package/dist/DocumentsEdit/___demo___/monitor/index.d.ts +2 -1
- package/dist/DocumentsEdit/___demo___/readOnly/index.d.ts +2 -1
- package/dist/DocumentsEdit/index.d.ts +1 -1
- package/dist/DocumentsEdit/ui/AddPropertyButton/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/Breadcrumb/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/EditProperty/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/EditRule/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/EditRule/ui/AddRuleButton/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/EditRule/ui/DelRuleButton/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/EditRule/ui/RuleForm/fn/algorithmFormComponent/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/EditRule/ui/RuleForm/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/PropertyTable/hooks/useTableProps/ui/AddChildPropertyButton/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/PropertyTable/hooks/useTableProps/ui/AddRuleButton/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/PropertyTable/hooks/useTableProps/ui/EditPropertyButton/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/PropertyTable/index.d.ts +2 -1
- package/dist/DocumentsEdit/ui/RefPropertyButton/index.d.ts +2 -1
- package/dist/DocumentsList/DocumentsListController/actions/demo/index.d.ts +1 -1
- package/dist/DocumentsList/___demo___/list/index.d.ts +2 -1
- package/dist/DocumentsList/index.d.ts +1 -1
- package/dist/DocumentsList/ui/ModalComfirm/index.d.ts +2 -1
- package/dist/DocumentsList/ui/PageHeader/SendHeader.d.ts +2 -1
- package/dist/DocumentsList/ui/PageHeader/index.d.ts +2 -1
- package/dist/DocumentsList/ui/PageUI/index.d.ts +1 -1
- package/dist/DocumentsList/ui/RuleTable/index.d.ts +2 -1
- package/dist/DocumentsList/ui/sendlist/index.d.ts +2 -1
- package/dist/DocumentsRule/index.d.ts +1 -1
- package/dist/DocumentsRule/ui/main/index.d.ts +2 -1
- package/dist/index.esm.js +3140 -4165
- package/dist/index.js +3131 -4156
- package/package.json +5 -5
- package/src/DocumentWhiteList/control/actions/checkclient/index.ts +1 -1
- package/src/DocumentWhiteList/ui/UnifiedSearch/index.scss +119 -0
- package/src/DocumentWhiteList/ui/UnifiedSearch/index.tsx +146 -0
- package/src/DocumentWhiteList/ui/pageheader/BlackHeader.tsx +8 -78
- package/src/DocumentWhiteList/ui/pageheader/WhiteHeader.tsx +8 -77
- package/src/DocumentsEdit/constant/propertyColumns/index.tsx +1 -1
- package/src/DocumentsEdit/ui/EditRule/ui/RuleForm/fn/algorithmFormComponent/index.tsx +3 -3
- package/src/DocumentsList/index.less +0 -23
- package/src/DocumentsList/ui/PageHeader/SendHeader.tsx +168 -107
- package/src/DocumentsList/ui/PageHeader/index.tsx +272 -184
- package/tsconfig.json +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect, useMemo, useCallback } from 'react';
|
|
2
2
|
import { Radio, Button, Dropdown, PageHeaderFoot } from 'kts-xui';
|
|
3
3
|
import { Menu } from 'kts-components-antd-x4';
|
|
4
|
-
import {
|
|
4
|
+
import { KtsForm } from 'kts-components';
|
|
5
5
|
import { LifeCycleTypes } from '@formily/antd';
|
|
6
6
|
import Main from '../../';
|
|
7
7
|
import ModalComfirm from '../ModalComfirm'
|
|
@@ -9,7 +9,13 @@ import { DocumentsService } from "../../../";
|
|
|
9
9
|
import _ from 'lodash';
|
|
10
10
|
import { useHistory } from 'react-router-dom';
|
|
11
11
|
import moment from 'moment';
|
|
12
|
+
import { Search as SearchXui, searchFormat, searchUnFormat, ISearchItemProps } from 'kts-xui';
|
|
13
|
+
import { Select as SearchSelect, DatePicker } from 'kts-xui';
|
|
14
|
+
import { Select } from 'antd';
|
|
12
15
|
const { SubMenu } = Menu;
|
|
16
|
+
const { Option } = Select;
|
|
17
|
+
const { RangePicker } = DatePicker;
|
|
18
|
+
|
|
13
19
|
export default () => {
|
|
14
20
|
const history = useHistory();
|
|
15
21
|
const controller = Main.useController();
|
|
@@ -19,9 +25,202 @@ export default () => {
|
|
|
19
25
|
const params = controller.useMemo(s => s.params, [])
|
|
20
26
|
const visible = controller.useMemo(s => s.visible, []);
|
|
21
27
|
const [profileEnum, setProfile] = useState([]);
|
|
22
|
-
const [schema, setSchema] = useState({});
|
|
23
28
|
const ktsRef = useRef(null);
|
|
24
29
|
const [didlist, setDidList] = useState([]);//我司对应DID
|
|
30
|
+
|
|
31
|
+
// 动态生成 formItems
|
|
32
|
+
const formItems: ISearchItemProps[] = useMemo(() => {
|
|
33
|
+
const items: ISearchItemProps[] = [];
|
|
34
|
+
const didEnum = didlist.map((item: any) => {
|
|
35
|
+
return { label: item.remarkName + ':' + item.participantId, value: item.participantId };
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
if (type === 1) {
|
|
39
|
+
// 配置名称
|
|
40
|
+
items.push({
|
|
41
|
+
name: "configName",
|
|
42
|
+
label: "配置名称",
|
|
43
|
+
children: <SearchXui.Input />,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// 单据大类
|
|
47
|
+
items.push({
|
|
48
|
+
name: "type",
|
|
49
|
+
label: "单据大类",
|
|
50
|
+
children: (
|
|
51
|
+
<SearchSelect className="underline" allowClear={true}>
|
|
52
|
+
{billEnum.map((item: any) => (
|
|
53
|
+
<Option key={item.value} value={item.value}>
|
|
54
|
+
{item.label}
|
|
55
|
+
</Option>
|
|
56
|
+
))}
|
|
57
|
+
</SearchSelect>
|
|
58
|
+
),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// 单据子类
|
|
62
|
+
items.push({
|
|
63
|
+
name: "profile",
|
|
64
|
+
label: "单据子类",
|
|
65
|
+
children: (
|
|
66
|
+
<SearchSelect className="underline" allowClear={true}>
|
|
67
|
+
{profileEnum.map((item: any) => (
|
|
68
|
+
<Option key={item.value} value={item.value}>
|
|
69
|
+
{item.name}
|
|
70
|
+
</Option>
|
|
71
|
+
))}
|
|
72
|
+
</SearchSelect>
|
|
73
|
+
),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// 收发角色
|
|
77
|
+
items.push({
|
|
78
|
+
name: "attributionList",
|
|
79
|
+
label: "收发角色",
|
|
80
|
+
children: (
|
|
81
|
+
<SearchSelect className="underline" allowClear={true} mode="multiple">
|
|
82
|
+
<Option value={1}>发送方</Option>
|
|
83
|
+
<Option value={2}>接收方</Option>
|
|
84
|
+
</SearchSelect>
|
|
85
|
+
),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// 创建时间
|
|
89
|
+
items.push({
|
|
90
|
+
name: "createTime",
|
|
91
|
+
label: "创建时间",
|
|
92
|
+
children: (
|
|
93
|
+
<RangePicker
|
|
94
|
+
style={{ width: "100%" }}
|
|
95
|
+
format="YYYY-MM-DD"
|
|
96
|
+
placeholder={["开始时间", "结束时间"]}
|
|
97
|
+
className="underline-datepicker"
|
|
98
|
+
/>
|
|
99
|
+
),
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// 更新时间
|
|
103
|
+
items.push({
|
|
104
|
+
name: "sendTime",
|
|
105
|
+
label: "更新时间",
|
|
106
|
+
children: (
|
|
107
|
+
<RangePicker
|
|
108
|
+
style={{ width: "100%" }}
|
|
109
|
+
format="YYYY-MM-DD"
|
|
110
|
+
placeholder={["开始时间", "结束时间"]}
|
|
111
|
+
className="underline-datepicker"
|
|
112
|
+
/>
|
|
113
|
+
),
|
|
114
|
+
});
|
|
115
|
+
} else if (type === 2) {
|
|
116
|
+
// 配置名称
|
|
117
|
+
items.push({
|
|
118
|
+
name: "configName",
|
|
119
|
+
label: "配置名称",
|
|
120
|
+
children: <SearchXui.Input />,
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// 使用标识
|
|
124
|
+
items.push({
|
|
125
|
+
name: "effectStatus",
|
|
126
|
+
label: "使用标识",
|
|
127
|
+
children: (
|
|
128
|
+
<SearchSelect className="underline" allowClear={true}>
|
|
129
|
+
<Option value={0}>已失效</Option>
|
|
130
|
+
<Option value={1}>使用中</Option>
|
|
131
|
+
</SearchSelect>
|
|
132
|
+
),
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// 我的收发角色
|
|
136
|
+
items.push({
|
|
137
|
+
name: "attribution",
|
|
138
|
+
label: "我的收发角色",
|
|
139
|
+
children: (
|
|
140
|
+
<SearchSelect className="underline" allowClear={true}>
|
|
141
|
+
<Option value={1}>发送方</Option>
|
|
142
|
+
<Option value={2}>接收方</Option>
|
|
143
|
+
</SearchSelect>
|
|
144
|
+
),
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// 我司对应DID
|
|
148
|
+
items.push({
|
|
149
|
+
name: "senderParticipantId",
|
|
150
|
+
label: "我司对应DID",
|
|
151
|
+
children: (
|
|
152
|
+
<SearchSelect className="underline" allowClear={true}>
|
|
153
|
+
{didEnum.map((item: any) => (
|
|
154
|
+
<Option key={item.value} value={item.value}>
|
|
155
|
+
{item.label}
|
|
156
|
+
</Option>
|
|
157
|
+
))}
|
|
158
|
+
</SearchSelect>
|
|
159
|
+
),
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
// 接受对象
|
|
163
|
+
items.push({
|
|
164
|
+
name: "receiverParticipantId",
|
|
165
|
+
label: "接受对象",
|
|
166
|
+
children: <SearchXui.Input />,
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
// 接受对象所属公司
|
|
170
|
+
items.push({
|
|
171
|
+
name: "receiverCompany",
|
|
172
|
+
label: "接受对象所属公司",
|
|
173
|
+
children: <SearchXui.Input />,
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// 单据大类
|
|
177
|
+
items.push({
|
|
178
|
+
name: "type",
|
|
179
|
+
label: "单据大类",
|
|
180
|
+
children: (
|
|
181
|
+
<SearchSelect className="underline" allowClear={true}>
|
|
182
|
+
{billEnum.map((item: any) => (
|
|
183
|
+
<Option key={item.value} value={item.value}>
|
|
184
|
+
{item.label}
|
|
185
|
+
</Option>
|
|
186
|
+
))}
|
|
187
|
+
</SearchSelect>
|
|
188
|
+
),
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// 单据子类
|
|
192
|
+
items.push({
|
|
193
|
+
name: "profile",
|
|
194
|
+
label: "单据子类",
|
|
195
|
+
children: (
|
|
196
|
+
<SearchSelect className="underline" allowClear={true}>
|
|
197
|
+
{profileEnum.map((item: any) => (
|
|
198
|
+
<Option key={item.value} value={item.value}>
|
|
199
|
+
{item.name}
|
|
200
|
+
</Option>
|
|
201
|
+
))}
|
|
202
|
+
</SearchSelect>
|
|
203
|
+
),
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
// 发布时间
|
|
207
|
+
items.push({
|
|
208
|
+
name: "createTime",
|
|
209
|
+
label: "发布时间",
|
|
210
|
+
children: (
|
|
211
|
+
<RangePicker
|
|
212
|
+
style={{ width: "100%" }}
|
|
213
|
+
format="YYYY-MM-DD"
|
|
214
|
+
placeholder={["开始时间", "结束时间"]}
|
|
215
|
+
className="underline-datepicker"
|
|
216
|
+
/>
|
|
217
|
+
),
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return items;
|
|
222
|
+
}, [billEnum, type, profileEnum, didlist]);
|
|
223
|
+
|
|
25
224
|
useEffect(() => {
|
|
26
225
|
(async () => {
|
|
27
226
|
const res = await DocumentsService.instance.service?.call({ url: '/participant/listBySubjectId', data: {}, type: 'get' }) as any;
|
|
@@ -30,6 +229,28 @@ export default () => {
|
|
|
30
229
|
}
|
|
31
230
|
})()
|
|
32
231
|
}, []);
|
|
232
|
+
|
|
233
|
+
// 处理单据子类的动态更新
|
|
234
|
+
useEffect(() => {
|
|
235
|
+
const selectedType = (params as any).type;
|
|
236
|
+
if (selectedType) {
|
|
237
|
+
const target: any = billEnum.find((item: any) => item.value === selectedType);
|
|
238
|
+
if (target && target.profileList) {
|
|
239
|
+
const list = target.profileList.map((item: any) => {
|
|
240
|
+
return {
|
|
241
|
+
label: item.name,
|
|
242
|
+
value: item.value
|
|
243
|
+
}
|
|
244
|
+
})
|
|
245
|
+
setProfile(list);
|
|
246
|
+
} else {
|
|
247
|
+
setProfile([])
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
setProfile([])
|
|
251
|
+
}
|
|
252
|
+
}, [billEnum, params]);
|
|
253
|
+
|
|
33
254
|
useEffect(() => {
|
|
34
255
|
(async () => {
|
|
35
256
|
const res = await DocumentsService.instance.service?.call({ url: '/schema/config/getDefaultTypeList', data: {}, type: 'get' }) as any;
|
|
@@ -59,6 +280,51 @@ export default () => {
|
|
|
59
280
|
})()
|
|
60
281
|
}, [controller])
|
|
61
282
|
|
|
283
|
+
// 创建搜索组件
|
|
284
|
+
const { search, setSearchValues } = SearchXui.useCreate({
|
|
285
|
+
labelCol: 9,
|
|
286
|
+
onSubmit: (e) => {
|
|
287
|
+
const processedValues = {
|
|
288
|
+
...e,
|
|
289
|
+
beginCreateTime: e.createTime && e.createTime[0] ? e.createTime[0].format('YYYY-MM-DD 00:00:00') : undefined,
|
|
290
|
+
endCreateTime: e.createTime && e.createTime[1] ? e.createTime[1].format('YYYY-MM-DD 23:59:59') : undefined,
|
|
291
|
+
beginSendTime: e.sendTime && e.sendTime[0] ? e.sendTime[0].format('YYYY-MM-DD 00:00:00') : undefined,
|
|
292
|
+
endSendTime: e.sendTime && e.sendTime[1] ? e.sendTime[1].format('YYYY-MM-DD 23:59:59') : undefined,
|
|
293
|
+
pageNum: 1,
|
|
294
|
+
pageSize: 10
|
|
295
|
+
};
|
|
296
|
+
// 移除原始的日期字段
|
|
297
|
+
delete processedValues.createTime;
|
|
298
|
+
delete processedValues.sendTime;
|
|
299
|
+
onSearchFormSubmit(processedValues);
|
|
300
|
+
},
|
|
301
|
+
values: React.useMemo(() => {
|
|
302
|
+
// 转换搜索值格式
|
|
303
|
+
const convertedValues = { ...params } as any;
|
|
304
|
+
const paramsAny = params as any;
|
|
305
|
+
if (paramsAny.beginCreateTime && paramsAny.endCreateTime) {
|
|
306
|
+
convertedValues.createTime = [paramsAny.beginCreateTime, paramsAny.endCreateTime];
|
|
307
|
+
}
|
|
308
|
+
if (paramsAny.beginSendTime && paramsAny.endSendTime) {
|
|
309
|
+
convertedValues.sendTime = [paramsAny.beginSendTime, paramsAny.endSendTime];
|
|
310
|
+
}
|
|
311
|
+
return searchUnFormat(convertedValues, formItems);
|
|
312
|
+
}, [params, formItems]),
|
|
313
|
+
formItems,
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
useEffect(() => {
|
|
317
|
+
const convertedValues = { ...params } as any;
|
|
318
|
+
const paramsAny = params as any;
|
|
319
|
+
if (paramsAny.beginCreateTime && paramsAny.endCreateTime) {
|
|
320
|
+
convertedValues.createTime = [paramsAny.beginCreateTime, paramsAny.endCreateTime];
|
|
321
|
+
}
|
|
322
|
+
if (paramsAny.beginSendTime && paramsAny.endSendTime) {
|
|
323
|
+
convertedValues.sendTime = [paramsAny.beginSendTime, paramsAny.endSendTime];
|
|
324
|
+
}
|
|
325
|
+
setSearchValues(searchUnFormat(convertedValues, formItems));
|
|
326
|
+
}, [formItems, params, setSearchValues]);
|
|
327
|
+
|
|
62
328
|
const switchType = React.useCallback((e) => {
|
|
63
329
|
controller.pipeline(async s => {
|
|
64
330
|
s.type = e.target.value;
|
|
@@ -76,138 +342,6 @@ export default () => {
|
|
|
76
342
|
s.visible = true;
|
|
77
343
|
})()
|
|
78
344
|
}, [controller]);
|
|
79
|
-
useEffect(() => {
|
|
80
|
-
const didEnum = didlist.map((item: any) => {
|
|
81
|
-
return { label: item.remarkName + ':' + item.participantId, value: item.participantId };
|
|
82
|
-
})
|
|
83
|
-
if (type === 1) {
|
|
84
|
-
let obj: any = {
|
|
85
|
-
type: "object",
|
|
86
|
-
properties: {
|
|
87
|
-
configName: {
|
|
88
|
-
type: "string",
|
|
89
|
-
title: "配置名称",
|
|
90
|
-
},
|
|
91
|
-
type: {
|
|
92
|
-
type: "string",
|
|
93
|
-
title: "单据大类",
|
|
94
|
-
enum: billEnum,
|
|
95
|
-
},
|
|
96
|
-
profile: {
|
|
97
|
-
type: "string",
|
|
98
|
-
title: "单据子类",
|
|
99
|
-
enum: profileEnum,
|
|
100
|
-
visible: false
|
|
101
|
-
},
|
|
102
|
-
attributionList: {
|
|
103
|
-
type: "checkbox",
|
|
104
|
-
title: "收发角色",
|
|
105
|
-
enum: [{
|
|
106
|
-
"label": "发送方",
|
|
107
|
-
"value": 1
|
|
108
|
-
}, {
|
|
109
|
-
"label": "接收方",
|
|
110
|
-
"value": 2
|
|
111
|
-
}],
|
|
112
|
-
'x-props': {
|
|
113
|
-
mode: "multiple"
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
createTime: {
|
|
117
|
-
type: "daterange",
|
|
118
|
-
title: "创建时间",
|
|
119
|
-
'x-props':{
|
|
120
|
-
extendsFields: ['beginCreateTime', 'endCreateTime'],
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
sendTime: {
|
|
124
|
-
type: "daterange",
|
|
125
|
-
title: "更新时间",
|
|
126
|
-
'x-props':{
|
|
127
|
-
extendsFields: ['beginSendTime', 'endSendTime'],
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
setSchema(obj);
|
|
133
|
-
} else if (type === 2) {
|
|
134
|
-
let obj: any = {
|
|
135
|
-
type: "object",
|
|
136
|
-
properties: {
|
|
137
|
-
configName: {
|
|
138
|
-
type: "string",
|
|
139
|
-
title: "配置名称",
|
|
140
|
-
},
|
|
141
|
-
effectStatus: {
|
|
142
|
-
type: "radio",
|
|
143
|
-
title: "使用标识",
|
|
144
|
-
enum: [{
|
|
145
|
-
"label": "已失效",
|
|
146
|
-
"value": 0
|
|
147
|
-
}, {
|
|
148
|
-
"label": "使用中",
|
|
149
|
-
"value": 1
|
|
150
|
-
}]
|
|
151
|
-
},
|
|
152
|
-
attribution: {
|
|
153
|
-
type: "radio",
|
|
154
|
-
title: "我的收发角色",
|
|
155
|
-
enum: [{
|
|
156
|
-
"label": "发送方",
|
|
157
|
-
"value": 1
|
|
158
|
-
}, {
|
|
159
|
-
"label": "接收方",
|
|
160
|
-
"value": 2
|
|
161
|
-
}],
|
|
162
|
-
},
|
|
163
|
-
// attributionList: {
|
|
164
|
-
// type: "string",
|
|
165
|
-
// title: "发送对象",
|
|
166
|
-
// visible: true
|
|
167
|
-
// },
|
|
168
|
-
senderParticipantId: {
|
|
169
|
-
type: "string",
|
|
170
|
-
title: "我司对应DID",
|
|
171
|
-
enum: didEnum
|
|
172
|
-
},
|
|
173
|
-
receiverParticipantId: {
|
|
174
|
-
type: "string",
|
|
175
|
-
title: "接受对象",
|
|
176
|
-
},
|
|
177
|
-
receiverCompany: {
|
|
178
|
-
type: "string",
|
|
179
|
-
title: "接受对象所属公司",
|
|
180
|
-
},
|
|
181
|
-
type: {
|
|
182
|
-
type: "string",
|
|
183
|
-
title: "单据大类",
|
|
184
|
-
enum: billEnum,
|
|
185
|
-
},
|
|
186
|
-
profile: {
|
|
187
|
-
type: "string",
|
|
188
|
-
title: "单据子类",
|
|
189
|
-
enum: profileEnum,
|
|
190
|
-
visible: false
|
|
191
|
-
},
|
|
192
|
-
createTime: {
|
|
193
|
-
type: "daterange",
|
|
194
|
-
title: "发布时间",
|
|
195
|
-
'x-props':{
|
|
196
|
-
extendsFields: ['beginCreateTime', 'endCreateTime'],
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
// '[beginSendTime,endSendTime]': {
|
|
200
|
-
// key: "[beginSendTime,endSendTime]",
|
|
201
|
-
// name: "[beginSendTime,endSendTime]",
|
|
202
|
-
// type: "daterange",
|
|
203
|
-
// title: "更新时间",
|
|
204
|
-
// },
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
setSchema(obj);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
}, [billEnum, type, profileEnum, didlist])
|
|
211
345
|
const onCreateType = useCallback((category, record?) => {
|
|
212
346
|
history.push({ pathname: `/rule`, search: `?type=config&profile=${record && record.value || ''}&billtype=${category}` })
|
|
213
347
|
}, [])
|
|
@@ -220,58 +354,12 @@ export default () => {
|
|
|
220
354
|
<Radio.Button value={2} style={{whiteSpace:'nowrap'}}>发布记录</Radio.Button>
|
|
221
355
|
</Radio.Group>
|
|
222
356
|
</div>
|
|
223
|
-
<
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
compact={true}
|
|
227
|
-
defaultKey="configName"
|
|
228
|
-
placeholder="输入配置名称"
|
|
229
|
-
searchFormSubmit={onSearchFormSubmit}
|
|
230
|
-
>
|
|
231
|
-
<KtsForm
|
|
232
|
-
ref={ktsRef}
|
|
233
|
-
labelCol={9}
|
|
234
|
-
wrapperCol={15}
|
|
235
|
-
labelAlign='left'
|
|
236
|
-
compact={true}
|
|
237
|
-
schema={schema}
|
|
238
|
-
defaultValue={params}
|
|
239
|
-
effects={($: any, actions: any) => {
|
|
240
|
-
$(LifeCycleTypes.ON_FIELD_VALUE_CHANGE, 'type',).subscribe((fieldState: any) => {
|
|
241
|
-
if (fieldState.value) {
|
|
242
|
-
const target: any = billEnum.find((item: any) => item.value === fieldState.value);
|
|
243
|
-
if (target && target.profileList) {
|
|
244
|
-
actions.setFieldState('profile', (state: any) => {
|
|
245
|
-
state.visible = true;
|
|
246
|
-
});
|
|
247
|
-
const list = target.profileList.map((item: any) => {
|
|
248
|
-
return {
|
|
249
|
-
label: item.name,
|
|
250
|
-
value: item.value
|
|
251
|
-
}
|
|
252
|
-
})
|
|
253
|
-
setProfile(list);
|
|
254
|
-
} else {
|
|
255
|
-
actions.setFieldState('profile', (state: any) => {
|
|
256
|
-
state.visible = false;
|
|
257
|
-
});
|
|
258
|
-
setProfile([])
|
|
259
|
-
}
|
|
260
|
-
} else {
|
|
261
|
-
actions.setFieldState('profile', (state: any) => {
|
|
262
|
-
state.visible = false;
|
|
263
|
-
});
|
|
264
|
-
setProfile([])
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
}}
|
|
268
|
-
>
|
|
269
|
-
</KtsForm>
|
|
270
|
-
</AdvancedSearch>
|
|
271
|
-
|
|
357
|
+
<div style={{ flex: 1 }}>
|
|
358
|
+
{search}
|
|
359
|
+
</div>
|
|
272
360
|
</div>
|
|
273
361
|
);
|
|
274
|
-
}, [type,
|
|
362
|
+
}, [type, search]);
|
|
275
363
|
const menu = useMemo(() => {
|
|
276
364
|
return (
|
|
277
365
|
<Menu>
|