12345678910111213141516171819202122232425262728293031323334353637383940 |
- import React, { useEffect } from 'react';
- import { Modal, Input, Table, Select, Form, Radio } from 'antd';
- const { Option } = Select;
- // 审批意见
- function AuditModal(props) {
- const { visible, onCancel, onOk, userList = [], data = {}, loading } = props;
- const [form] = Form.useForm();
- const formLayout = { labelCol: { span: 4 }, wrapperCol: { span: 14 } };
- const handleOk = async () => {
- let fieldsValue = await form.validateFields();
- onOk(fieldsValue);
- };
- useEffect(() => {
- if (visible) form.resetFields();
- }, [visible]);
- return (
- <Modal
- confirmLoading={loading}
- destroyOnClose
- title="流程"
- visible={visible}
- onCancel={onCancel}
- onOk={handleOk}
- >
- <Form {...formLayout} form={form}>
- <Form.Item label="流程名称" name="name">
- <Input />
- </Form.Item>
- <Form.Item label="详情" name="desc">
- <Input.TextArea />
- </Form.Item>
- </Form>
- </Modal>
- );
- }
- export default AuditModal;
|