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

历史表单修改

上级 cc7122fe
......@@ -11,6 +11,10 @@ let ApplyPage = ({ id, form }) => {
function submitCb(res) {
ModalInfo(`提交${res ? '成功' : '失败'}!`, {onOk: () => router.goBack()});
}
function saveDraftCb(res) {
ModalInfo(`提交${res ? '成功' : '失败'}!`, {onOk: () => router.goBack()});
}
return (
<Shell styleShell={{ marginTop: 0 }}>
<Entrance id={id} isCg="false" get="web" form={form} />
......@@ -22,6 +26,7 @@ let ApplyPage = ({ id, form }) => {
openDraftButton
DraftButtonText="暂存"
callback={submitCb}
draftCallback={saveDraftCb}
/>
</div>
</Shell>
......
......@@ -82,7 +82,7 @@ function AuditButton(props) {
}
function showModal(str, key, value) {
setModalContent(`确定审核${str}吗?`);
setModalContent(`确定${str}吗?`);
setAffairParams({ oldKey: key, btnValue: value });
setVisible(true);
}
......
......@@ -5,7 +5,7 @@ import { ModalInfo } from '@/baseComponent/Modal';
import React, { useState, useEffect } from 'react';
import { getHistoryFormDetail } from '../../Services';
import withGoBack from '@/highOrderComponent/withGoBack';
import HistoryForm from '@/webPublic/one_stop_public/Entrance/historyForm';
import HistoryForm from '@/webPublic/FormInsertDiy/HistoryForm';
import AuditButton from '../AuditButton';
import styles from '../RenderForm/index.less';
......
/* eslint-disable no-nested-ternary */
/**
* 历史表单+最新表单生成
* data 'affair/getIdFormDetail' 接口返回的详细参数
* form 表单控件
* isNewForm 是否展示最新表单
*/
import React from 'react';
import { Spin, Card } from 'antd';
import { isEmpty } from '@/webPublic/one_stop_public/copy';
import RenderForm from '../RenderForm';
import styles from './index.less';
export default function HistoryForm(props) {
const { data, isNewForm } = props;
return (
<div>
{data.hisTaskForm.formKeys && data.hisTaskForm.formKeys.length > 0
? data.hisTaskForm.formKeys.map((item, index) => {
return (
<Card
key={item.formKey}
title={item.taskName}
bordered={false}
style={{ width: 800, margin: 'auto' }}
>
{!data ? (
<div
style={{
width: '100%',
height: 200,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<Spin size="large" />
</div>
) : (
<RenderForm
get="web"
isCg="no"
postData={data}
obj={data.hisTaskForm.formData}
form={props.form}
formKey={item.formKey}
/>
)}
</Card>
);
})
: ''}
{isNewForm ? ( // 展示最新表单
data.isHandle && !!data.taskFormKey ? (
<Card
title="当前流程"
bordered={false}
style={{ width: 800, margin: 'auto' }}
>
{!isEmpty(data) && (
<RenderForm
postData={data}
get="web"
isCg="no"
obj={data.hisTaskForm.formData}
table="new"
form={props.form}
/>
)}
</Card>
) : null
) : null}
</div>
);
}
.title {
font-size: 20px;
font-weight: bolder;
margin: 16px 0 8px 0;
padding-left: calc((100% - 800px) / 2);
}
import React, { useState, useEffect } from 'react';
import { Form, Spin } from 'antd';
import Shell from '@/baseComponent/Shell';
import HistoryForm from '@/webPublic/one_stop_public/Entrance/historyForm';
import HistoryForm from '@/webPublic/FormInsertDiy/HistoryForm';
import { getHistoryFormDetail } from '../../Services';
import withGoBack from '@/highOrderComponent/withGoBack';
......
......@@ -3,10 +3,10 @@ import ZdyTable from '@/webPublic/one_stop_public/Table';
import styles from './index.less';
import { fetchTemplateByCode, fetchTableItem } from '@/webPublic/Services';
export default function RenderForm({ get = 'web', isCg = 'yes', form, postData }) {
export default function RenderForm({ get = 'web', isCg = 'yes', ...rest }) {
return (
<div className={styles.zyd_onestop_style_class}>
<ZdyTable get={get} isCg={isCg} postData={postData} form={form} />
<ZdyTable get={get} isCg={isCg} {...rest} />
</div>
);
}
......@@ -73,6 +73,12 @@ export function RenderFormByObjId({
);
return (
<RenderFormByContent get={get} isCg={isCg} content={content} templateCode={templateCode} form={form} />
<RenderFormByContent
get={get}
isCg={isCg}
content={content}
templateCode={templateCode}
form={form}
/>
);
}
.zyd_onestop_style_class{
padding: 20px;
table, td, div{
overflow: unset !important;
}
}
......@@ -65,8 +65,6 @@ export default class idnex extends Component {
if(this.props?.callback){
this.props.callback(val)
}
} else {
openToast('error', '保存失败', '请尝试');
}
},
}).then(()=>{
......@@ -140,8 +138,9 @@ export default class idnex extends Component {
openDraftButton?
<Button
style={{
marginRight:20
marginRight:24
}}
shape='round'
isLoading={isLoading}
onClick={this.handleDraft}
>
......@@ -153,6 +152,8 @@ export default class idnex extends Component {
onClick={this.showModal}
isLoading={isLoading}
type='primary'
shape='round'
ghost
>
{
text??'提交'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论