CheckModal.tsx
972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { ModalForm, ProFormTextArea } from '@ant-design/pro-components';
import { Form, message } from 'antd';
export default ({ setCheckVisible }) => {
const [form] = Form.useForm<{ name: string; company: string }>();
return (
<ModalForm<{
name: string;
company: string;
}>
width={500}
open
title="审核"
form={form}
autoFocusFirstInput
modalProps={{
okText: '通过',
cancelText: '驳回',
destroyOnClose: true,
onCancel: () => {
setCheckVisible(false);
},
}}
submitTimeout={2000}
onFinish={async (values) => {
console.log(values.name);
message.success('提交成功');
return true;
}}
>
<div>请特别注意订单总金额与订单金额。</div>
<ProFormTextArea
width="lg"
name="name"
placeholder="若驳回,请填写驳回理由"
/>
</ModalForm>
);
};