提交 5a0e00f3 authored 作者: 钟是志's avatar 钟是志

在批量审核的时候 默认给一个审批理由让用户填写

钟是志
上级 f400ef7d
import { Modal, Spin, Form } from 'antd';
import { Modal, Spin, Form, Input } from 'antd';
import { useState, useEffect } from 'react';
import styles from '../../RenderForm/index.less';
import { getHistoryFormDetail } from '../../../Services';
......@@ -9,7 +9,7 @@ import { ModalInfo } from '@/baseComponent/Modal';
import { router } from 'umi';
import RenderForm from '../../RenderForm';
const isNewForm = true;
const TextArea = Input.TextArea;
function AuditModal({ form, selectRows, children, getPage }) {
const [visible, setVisible] = useState(false);
......@@ -23,6 +23,7 @@ function AuditModal({ form, selectRows, children, getPage }) {
},
});
}
const [data, setData] = useState(null);
const [loading, setLoading] = useState(false);
......@@ -41,7 +42,7 @@ function AuditModal({ form, selectRows, children, getPage }) {
}
});
},
[visible]
[visible],
);
const footer = data ? (
......@@ -54,6 +55,7 @@ function AuditModal({ form, selectRows, children, getPage }) {
/>
</div>
) : null;
const { getFieldDecorator } = form;
return (
<>
......@@ -75,10 +77,22 @@ function AuditModal({ form, selectRows, children, getPage }) {
form={form}
/>
) : null}
<div>
<h3 style={{ padding: 12, paddingBottom: 0, fontWeight: 'bold' }}>审批说明:</h3>
<span style={{ display: 'block', textAlign: 'center' }}>
{getFieldDecorator('reason')(
<TextArea
placeholder="请输入审批理由"
style={{ width: '95%', margin: 12, height: 120, color: '#7F8B95' }}
/>,
)}
</span>
</div>
</Spin>
</Modal>
{children({ onShow: () => setVisible(true) })}
</>
);
}
export default Form.create()(AuditModal);
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论