提交 159d2ef3 authored 作者: 王绍森's avatar 王绍森

创新创业评奖评优批量审核修改

上级 faa9bc9d
...@@ -7,6 +7,7 @@ import HistoryForm from '@/webPublic/FormInsertDiy/HistoryForm'; ...@@ -7,6 +7,7 @@ import HistoryForm from '@/webPublic/FormInsertDiy/HistoryForm';
import ButtonDiy from '@/baseComponent/ButtonDiy'; import ButtonDiy from '@/baseComponent/ButtonDiy';
import { ModalInfo } from '@/baseComponent/Modal'; import { ModalInfo } from '@/baseComponent/Modal';
import { router } from 'umi'; import { router } from 'umi';
import RenderForm from '../../RenderForm';
const isNewForm = true; const isNewForm = true;
...@@ -15,10 +16,12 @@ function AuditModal({ form, selectRows, children, getPage }) { ...@@ -15,10 +16,12 @@ function AuditModal({ form, selectRows, children, getPage }) {
function submitCb(res) { function submitCb(res) {
// ModalInfo(`提交${res ? '成功' : '失败'}!`, { onOk: () => router.goBack() }); // ModalInfo(`提交${res ? '成功' : '失败'}!`, { onOk: () => router.goBack() });
ModalInfo(`提交${res ? '成功' : '失败'}!`, { onOk: () => { ModalInfo(`提交${res ? '成功' : '失败'}!`, {
onOk: () => {
setVisible(false); setVisible(false);
getPage(); getPage();
} }); },
});
} }
const [data, setData] = useState(null); const [data, setData] = useState(null);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
...@@ -27,7 +30,7 @@ function AuditModal({ form, selectRows, children, getPage }) { ...@@ -27,7 +30,7 @@ function AuditModal({ form, selectRows, children, getPage }) {
() => { () => {
if (!visible) { if (!visible) {
return form.resetFields(); return form.resetFields();
}; }
const code = selectRows && selectRows[0] && selectRows[0].code; const code = selectRows && selectRows[0] && selectRows[0].code;
if (typeof code === 'undefined') return; if (typeof code === 'undefined') return;
setLoading(true); setLoading(true);
...@@ -52,7 +55,6 @@ function AuditModal({ form, selectRows, children, getPage }) { ...@@ -52,7 +55,6 @@ function AuditModal({ form, selectRows, children, getPage }) {
</div> </div>
) : null; ) : null;
return ( return (
<> <>
<Modal <Modal
...@@ -63,20 +65,21 @@ function AuditModal({ form, selectRows, children, getPage }) { ...@@ -63,20 +65,21 @@ function AuditModal({ form, selectRows, children, getPage }) {
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
> >
<Spin spinning={loading}> <Spin spinning={loading}>
{data && ( {data && data.isHandle && !!data.taskFormKey ? (
<> <div style={{ width: 800, margin: 'auto' }}>
<div className={styles.zyd_onestop_style_class}> <RenderForm
<HistoryForm postData={data}
data={data} // 'affair/getIdFormDetail' 接口返回数据 get="web"
form={form} // form控件 isCg="no"
isNewForm={!!isNewForm} // 是否渲染需要当前用户填写的审核表单 为false只会渲染历史回显表单 obj={data.hisTaskForm.formData}
table="new"
form={form}
/> />
</div> </div>
</> ) : null}
)}
</Spin> </Spin>
</Modal> </Modal>
{children({ onShow: () => setVisible(true)})} {children({ onShow: () => setVisible(true) })}
</> </>
); );
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论