kts-components-document-access-point 1.4.8 → 1.4.11
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/index.esm.js +135 -38
- package/dist/index.js +135 -38
- package/package.json +2 -2
- package/src/DocumentWhiteList/ui/main/black.tsx +10 -3
- package/src/DocumentWhiteList/ui/main/white.tsx +14 -6
- package/src/DocumentsCont/index.tsx +2 -5
- package/src/DocumentsList/index.less +0 -23
- package/src/DocumentsList/ui/ModalComfirm/index.tsx +14 -10
- package/src/DocumentsList/ui/PageHeader/index.tsx +2 -2
- package/src/DocumentsList/ui/RuleTable/index.tsx +16 -3
- package/src/DocumentsList/ui/sendlist/index.tsx +21 -3
- package/src/DocumentsRule/ui/main/index.tsx +13 -8
|
@@ -10,6 +10,7 @@ export default function modalcomfirm(props: any) {
|
|
|
10
10
|
const history = useHistory();
|
|
11
11
|
const controller = Main.useController();
|
|
12
12
|
const targetId = controller.useMemo(s => s.targetId, [])
|
|
13
|
+
const [loading, setloading] = useState(false);
|
|
13
14
|
const [targetList, setTargetList] = useState<any[]>([]);
|
|
14
15
|
useEffect(() => {
|
|
15
16
|
(async () => {
|
|
@@ -34,20 +35,25 @@ export default function modalcomfirm(props: any) {
|
|
|
34
35
|
senderParticipantNote: note && note.remarkName
|
|
35
36
|
};
|
|
36
37
|
});
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
|
|
39
|
+
if (!loading) {
|
|
40
|
+
setloading(true)
|
|
41
|
+
const res = await DocumentsService.instance.service?.call({ url: '/schema/config/batchSend', data: data, type: 'post' }) as any;
|
|
42
|
+
if (res.res) {
|
|
43
|
+
gotoSendlist();
|
|
44
|
+
message.success('操作成功');
|
|
45
|
+
props.handleCancel()
|
|
46
|
+
}
|
|
47
|
+
setloading(false)
|
|
42
48
|
}
|
|
43
49
|
})()
|
|
44
|
-
}, [targetId,targetList]);
|
|
50
|
+
}, [targetId, targetList,loading]);
|
|
45
51
|
const gotoSendlist = useCallback(() => {
|
|
46
52
|
controller.pipeline(async s => {
|
|
47
53
|
s.type = 2;
|
|
48
54
|
if (selectItems.length === 1) {
|
|
49
55
|
s.params = { configNumber: selectItems[0].configNumber }
|
|
50
|
-
s.selectedRowKey=[];
|
|
56
|
+
s.selectedRowKey = [];
|
|
51
57
|
}
|
|
52
58
|
history.push({ pathname: `/rulelist`, state: { type: 2 } })
|
|
53
59
|
})()
|
|
@@ -68,12 +74,10 @@ export default function modalcomfirm(props: any) {
|
|
|
68
74
|
return (
|
|
69
75
|
<div>
|
|
70
76
|
<Modal
|
|
71
|
-
title="请选择我司对应
|
|
77
|
+
title="请选择我司对应DID"
|
|
72
78
|
visible={true}
|
|
73
79
|
onOk={handleOk}
|
|
74
80
|
onCancel={handleCancel}
|
|
75
|
-
okText="确定"
|
|
76
|
-
cancelText="取消"
|
|
77
81
|
>
|
|
78
82
|
<Radio.Group onChange={targetSelect} value={targetId} >
|
|
79
83
|
{
|
|
@@ -216,8 +216,8 @@ export default () => {
|
|
|
216
216
|
<div style={{ display: 'flex' }}>
|
|
217
217
|
<div style={{ marginRight: 10 }}>
|
|
218
218
|
<Radio.Group value={type} onChange={switchType}>
|
|
219
|
-
<Radio.Button value={1}>单据校验规则配置</Radio.Button>
|
|
220
|
-
<Radio.Button value={2}>发布记录</Radio.Button>
|
|
219
|
+
<Radio.Button value={1} style={{whiteSpace:'nowrap'}}>单据校验规则配置</Radio.Button>
|
|
220
|
+
<Radio.Button value={2} style={{whiteSpace:'nowrap'}}>发布记录</Radio.Button>
|
|
221
221
|
</Radio.Group>
|
|
222
222
|
</div>
|
|
223
223
|
<AdvancedSearch
|
|
@@ -72,16 +72,20 @@ export default function validaterule(props: any) {
|
|
|
72
72
|
{
|
|
73
73
|
title: '配置名称',
|
|
74
74
|
dataIndex: 'configName',
|
|
75
|
+
width: 160,
|
|
76
|
+
ellipsis: true,
|
|
75
77
|
},
|
|
76
78
|
{
|
|
77
79
|
title: '单据大类',
|
|
78
80
|
dataIndex: 'type',
|
|
81
|
+
width: 120,
|
|
79
82
|
render: (text: any) => {
|
|
80
83
|
return bill[text];
|
|
81
84
|
}
|
|
82
85
|
},
|
|
83
86
|
{
|
|
84
87
|
title: '单据子类',
|
|
88
|
+
width: 120,
|
|
85
89
|
dataIndex: 'profile',
|
|
86
90
|
render: (text: any, record: any) => {
|
|
87
91
|
if (text) {
|
|
@@ -94,21 +98,28 @@ export default function validaterule(props: any) {
|
|
|
94
98
|
{
|
|
95
99
|
title: '收发角色',
|
|
96
100
|
dataIndex: 'attribution',
|
|
101
|
+
width: 120,
|
|
97
102
|
render: (text: string) => attributionEnum[text]
|
|
98
103
|
},
|
|
99
104
|
{
|
|
100
105
|
title: '创建时间',
|
|
101
106
|
dataIndex: 'createAt',
|
|
107
|
+
ellipsis: true,
|
|
108
|
+
width: 160,
|
|
102
109
|
render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm')
|
|
103
110
|
},
|
|
104
111
|
{
|
|
105
112
|
title: '更新时间',
|
|
106
113
|
dataIndex: 'updateAt',
|
|
114
|
+
ellipsis: true,
|
|
115
|
+
width: 160,
|
|
107
116
|
render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm')
|
|
108
117
|
},
|
|
109
118
|
{
|
|
110
119
|
title: '操作',
|
|
120
|
+
width: 170,
|
|
111
121
|
dataIndex: 'console',
|
|
122
|
+
fixed: 'right',
|
|
112
123
|
render: (text: any, record: any) => (
|
|
113
124
|
<span>
|
|
114
125
|
<a className="tabel-action" onClick={() => { onBillView(record) }}>查看</a>
|
|
@@ -155,9 +166,11 @@ export default function validaterule(props: any) {
|
|
|
155
166
|
}, [])
|
|
156
167
|
return (
|
|
157
168
|
<>
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
|
|
169
|
+
<div style={{ flex: 'none', position: 'relative', zIndex: 1 }}>
|
|
170
|
+
<PageHeader />
|
|
171
|
+
</div>
|
|
172
|
+
<AutoTableContainer style={{ flex: 1, padding: '0 20px', background: '#F4F4F4' }} >
|
|
173
|
+
<Table className='fixheight' columns={columns as any} rowKey="configNumber" rowSelection={rowSelection} dataSource={list} pagination={false} />
|
|
161
174
|
</AutoTableContainer>
|
|
162
175
|
{pageMeta && <Pagination onChange={onPageChange} style={{ padding: '16px 0', flex: 'none', background: 'white', textAlign: 'center' }} total={pageMeta.total} pageSize={pageMeta.pageSize} current={pageMeta.pageNum} showSizeChanger={true} />}
|
|
163
176
|
</>);
|
|
@@ -17,7 +17,7 @@ export default function validaterule(props: any) {
|
|
|
17
17
|
const [bill, setConfig] = useState<{ [key: string]: string }>({});
|
|
18
18
|
useEffect(() => {
|
|
19
19
|
(async () => {
|
|
20
|
-
const res = await DocumentsService.instance.service?.call({ url: '/schema/config/querySendRecordPage', data:
|
|
20
|
+
const res = await DocumentsService.instance.service?.call({ url: '/schema/config/querySendRecordPage', data: params, type: 'post' }) as any;
|
|
21
21
|
if (res.err) {
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
@@ -60,10 +60,14 @@ export default function validaterule(props: any) {
|
|
|
60
60
|
{
|
|
61
61
|
title: '配置名称',
|
|
62
62
|
dataIndex: 'configName',
|
|
63
|
+
ellipsis: true,
|
|
64
|
+
width: 160,
|
|
63
65
|
},
|
|
64
66
|
{
|
|
65
67
|
title: '使用标识',
|
|
66
68
|
dataIndex: 'effectStatus',
|
|
69
|
+
width: 120,
|
|
70
|
+
ellipsis: true,
|
|
67
71
|
render: (text: any) => {
|
|
68
72
|
if (text === 0) {
|
|
69
73
|
return <span>已失效</span>
|
|
@@ -75,6 +79,7 @@ export default function validaterule(props: any) {
|
|
|
75
79
|
},
|
|
76
80
|
{
|
|
77
81
|
title: '单据类型',
|
|
82
|
+
width: 120,
|
|
78
83
|
dataIndex: 'type',
|
|
79
84
|
render: (text: any) => {
|
|
80
85
|
return bill[text];
|
|
@@ -82,6 +87,7 @@ export default function validaterule(props: any) {
|
|
|
82
87
|
},
|
|
83
88
|
{
|
|
84
89
|
title: '单据子类',
|
|
90
|
+
width: 120,
|
|
85
91
|
dataIndex: 'profile',
|
|
86
92
|
render: (text: string, record: any) => {
|
|
87
93
|
if (text) {
|
|
@@ -94,14 +100,18 @@ export default function validaterule(props: any) {
|
|
|
94
100
|
{
|
|
95
101
|
title: '我的收发角色',
|
|
96
102
|
dataIndex: 'attribution',
|
|
103
|
+
width: 160,
|
|
104
|
+
ellipsis: true,
|
|
97
105
|
render: (text: any) => attributionEnum[text]
|
|
98
106
|
},
|
|
99
107
|
{
|
|
100
108
|
title: '我司对应DID',
|
|
101
109
|
dataIndex: 'senderParticipantId',
|
|
110
|
+
ellipsis: true,
|
|
111
|
+
width: 200,
|
|
102
112
|
render: (text: any, record: any) => {
|
|
103
113
|
if (record.senderParticipantNote) {
|
|
104
|
-
return <
|
|
114
|
+
return <span title={record.senderParticipantNote+''+text}>{record.senderParticipantNote}{text}</span>
|
|
105
115
|
} else {
|
|
106
116
|
return <span>{text}</span>
|
|
107
117
|
}
|
|
@@ -110,16 +120,22 @@ export default function validaterule(props: any) {
|
|
|
110
120
|
},
|
|
111
121
|
{
|
|
112
122
|
title: '接受对象',
|
|
123
|
+
width: 120,
|
|
124
|
+
ellipsis: true,
|
|
113
125
|
dataIndex: 'receiverParticipantId',
|
|
114
126
|
|
|
115
127
|
},
|
|
116
128
|
{
|
|
117
129
|
title: '接受对象所属公司',
|
|
130
|
+
width: 160,
|
|
131
|
+
ellipsis: true,
|
|
118
132
|
dataIndex: 'receiverCompany',
|
|
119
133
|
},
|
|
120
134
|
{
|
|
121
135
|
title: '发布时间',
|
|
122
136
|
dataIndex: 'createAt',
|
|
137
|
+
width: 160,
|
|
138
|
+
ellipsis: true,
|
|
123
139
|
render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm')
|
|
124
140
|
},
|
|
125
141
|
// {
|
|
@@ -134,6 +150,8 @@ export default function validaterule(props: any) {
|
|
|
134
150
|
{
|
|
135
151
|
title: '操作',
|
|
136
152
|
dataIndex: 'console',
|
|
153
|
+
width: 80,
|
|
154
|
+
fixed: 'right',
|
|
137
155
|
render: (text: any, record: any) => (
|
|
138
156
|
<span>
|
|
139
157
|
<a className="tabel-action" onClick={() => { onBillView(record.id) }}>查看</a>
|
|
@@ -145,7 +163,7 @@ export default function validaterule(props: any) {
|
|
|
145
163
|
<>
|
|
146
164
|
<PageHeader />
|
|
147
165
|
<AutoTableContainer style={{ flex: 1, padding: '0 20px', backgroundColor: '#efefef' }} >
|
|
148
|
-
<Table columns={columns} rowKey="id" dataSource={list} pagination={false} />
|
|
166
|
+
<Table className='fixheight' columns={columns as any} rowKey="id" dataSource={list} pagination={false} />
|
|
149
167
|
</AutoTableContainer>
|
|
150
168
|
{pageMeta && <Pagination onChange={onPageChange} style={{ padding: '16px 0', flex: 'none', background: 'white', textAlign: 'center' }} total={pageMeta.total} pageSize={pageMeta.pageSize} current={pageMeta.pageNum} showSizeChanger={true} />}
|
|
151
169
|
</>);
|
|
@@ -16,7 +16,8 @@ export default function Rule(props: any) {
|
|
|
16
16
|
const [visible, setVisible] = useState(false);
|
|
17
17
|
const [targetId, setTarget] = useState();
|
|
18
18
|
const [targetList, setList] = useState<any[]>([]);
|
|
19
|
-
const [loading] = controller.useRuning(controller.configupdate,controller.configsave)
|
|
19
|
+
const [loading] = controller.useRuning(controller.configupdate, controller.configsave);
|
|
20
|
+
const [sendloading, setloading] = useState(false);
|
|
20
21
|
// const [status, setStatus] = useState(0);
|
|
21
22
|
// const [first, setFirst] = useState(true);
|
|
22
23
|
const [hasChange, setChange] = useState(false);
|
|
@@ -136,7 +137,7 @@ export default function Rule(props: any) {
|
|
|
136
137
|
* 手动保存
|
|
137
138
|
*/
|
|
138
139
|
|
|
139
|
-
|
|
140
|
+
|
|
140
141
|
|
|
141
142
|
|
|
142
143
|
const onSave = useCallback((publish: boolean = false) => {
|
|
@@ -197,14 +198,18 @@ export default function Rule(props: any) {
|
|
|
197
198
|
sendPublic: true,
|
|
198
199
|
senderParticipantNote: note && note.remarkName
|
|
199
200
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
201
|
+
if (!sendloading) {
|
|
202
|
+
setloading(true)
|
|
203
|
+
const res = await controller.batchsend([data]);
|
|
204
|
+
if (res.res) {
|
|
205
|
+
message.success('操作成功');
|
|
206
|
+
handleCancel()
|
|
207
|
+
history.push({ pathname: `/rulelist`, state: { type: 2 } })
|
|
208
|
+
}
|
|
209
|
+
setloading(false)
|
|
205
210
|
}
|
|
206
211
|
})()
|
|
207
|
-
}, [targetId, record]);
|
|
212
|
+
}, [targetId, record,sendloading]);
|
|
208
213
|
const targetSelect = useCallback((e) => {
|
|
209
214
|
setTarget(e.target.value);
|
|
210
215
|
}, []);
|