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

审核页面,编辑页面修改

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