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

审核页面,编辑页面修改

上级 89b6f355
......@@ -7,10 +7,11 @@ import { getHistoryFormDetail } from '../../Services';
import withGoBack from '@/highOrderComponent/withGoBack';
import HistoryForm from '@/webPublic/one_stop_public/Entrance/historyForm';
import AuditButton from '../AuditButton';
import styles from '../RenderForm/index.less';
let AuditForm = ({ code, isNewForm, form }) => {
function submitCb(res) {
ModalInfo(`提交${res ? '成功' : '失败'}!`, {onOk: () => router.goBack()});
ModalInfo(`提交${res ? '成功' : '失败'}!`, { onOk: () => router.goBack() });
}
const [data, setData] = useState(null);
const [loading, setLoading] = useState(false);
......@@ -31,11 +32,14 @@ let AuditForm = ({ code, isNewForm, form }) => {
<Spin spinning={loading}>
{data && (
<>
<div className={styles.zyd_onestop_style_class}>
<HistoryForm
data={data} // 'affair/getIdFormDetail' 接口返回数据
form={form} // form控件
isNewForm={!!isNewForm} // 是否渲染需要当前用户填写的审核表单 为false只会渲染历史回显表单
/>
</div>
{isNewForm && (
<div style={{ padding: 16, textAlign: 'center' }}>
<AuditButton
......
......@@ -11,15 +11,15 @@ function submitCb(res) {
ModalInfo(`提交${res ? '成功' : '失败'}!`);
}
// 编辑草稿,传入应用id和草稿id
let EditPage = ({ form, appId, draftId }) => {
// 编辑草稿,传入应用id和草稿code
let EditPage = ({ form, appId, draftCode }) => {
const [data, setData] = useState(null);
const [loading, setLoading] = useState(false);
useEffect(() => {
if (typeof draftId === 'undefined') return;
if (typeof draftCode === 'undefined') return;
setLoading(true);
getHistoryFormDetail({ id: draftId }).then(res => {
getHistoryFormDetail({ code: draftCode }).then(res => {
setLoading(false);
if (res && !res.errMsg) {
setData(res);
......@@ -38,7 +38,7 @@ let EditPage = ({ form, appId, draftId }) => {
<SubmitButton
form={form}
appId={appId}
draftId={draftId}
draftCode={draftCode}
text="提交"
openDraftButton
DraftButtonText="暂存"
......
.zyd_onestop_style_class{
td{
table, td, div{
overflow: unset !important;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论