提交 69bd00c1 authored 作者: 钟是志's avatar 钟是志

批量审批 bug修改

上级 a64ad6d2
...@@ -33,23 +33,23 @@ function AuditModal({ form, selectRows, children, getPage, noNeedForm }) { ...@@ -33,23 +33,23 @@ function AuditModal({ form, selectRows, children, getPage, noNeedForm }) {
setLoading(false); setLoading(false);
if (res && !res.errMsg) { if (res && !res.errMsg) {
setData({ ...res, hisTaskForm: { ...res.hisTaskForm, formKeys: [] } }); setData({ ...res, hisTaskForm: { ...res.hisTaskForm, formKeys: [] } });
getTaskDefinition({ getTaskDefinition({
appId: res.appId, appId: res.appId,
key: res.taskDefinitionKey, key: res.taskDefinitionKey,
}).then((res2) =>{ }).then((res2) => {
if(res2){ if (res2) {
setTaskDefinition(res2); setTaskDefinition(res2);
if(res2.id && res2.formProperties){ // 从流程的配置项里面去取 批量审批时是否显示表单的配置项 if (res2.id && res2.formProperties) {
let check = res2.formProperties.find((g) => g.name === 'batchAuditHiddenForm'); // 从流程的配置项里面去取 批量审批时是否显示表单的配置项
if(!check || check.expression !== 'true'){ let check = res2.formProperties.find((g) => g.name === 'batchAuditHiddenForm');
setConfigNeedForm(false); if (!check || check.expression !== 'true') {
} setConfigNeedForm(false);
}else{ }
setConfigNeedForm(false); } else {
} setConfigNeedForm(false);
} }
}); }
});
} }
}); });
}, },
...@@ -62,7 +62,7 @@ function AuditModal({ form, selectRows, children, getPage, noNeedForm }) { ...@@ -62,7 +62,7 @@ function AuditModal({ form, selectRows, children, getPage, noNeedForm }) {
data={data} // 为 'affair/getIdFormDetail' 接口请求到的数据 data={data} // 为 'affair/getIdFormDetail' 接口请求到的数据
callback={submitCb} // 提交完成后回调函数 callback={submitCb} // 提交完成后回调函数
form={form} // form表单控件 form={form} // form表单控件
selectRows={selectRows} selectRows={selectRows}
taskIds={selectRows.map((i) => i.taskId)} taskIds={selectRows.map((i) => i.taskId)}
/> />
</div> </div>
...@@ -71,37 +71,40 @@ function AuditModal({ form, selectRows, children, getPage, noNeedForm }) { ...@@ -71,37 +71,40 @@ function AuditModal({ form, selectRows, children, getPage, noNeedForm }) {
return ( return (
<> <>
<Modal {visible && (
width={900} <Modal
visible={visible} width={900}
title="批量审核" visible={true}
maskClosable={false} title="批量审核"
footer={footer} maskClosable={false}
onCancel={() => setVisible(false)}> footer={footer}
<Spin spinning={loading}> onCancel={() => setVisible(false)}>
{data && data.isHandle && !!data.taskFormKey && !noNeedForm && !configNoNeedForm ? ( <Spin spinning={loading}>
<RenderForm {data && data.isHandle && !!data.taskFormKey && !noNeedForm && !configNoNeedForm ? (
postData={data} <RenderForm
get="web" postData={data}
isCg="no" get="web"
obj={data.hisTaskForm.formData} isCg="no"
table="new" obj={data.hisTaskForm.formData}
form={form} table="new"
/> form={form}
) : null} />
<div> ) : null}
<h3 style={{ padding: 12, paddingBottom: 0, fontWeight: 'bold' }}>审批说明:</h3> <div>
<span style={{ display: 'block', textAlign: 'center' }}> <h3 style={{ padding: 12, paddingBottom: 0, fontWeight: 'bold' }}>审批说明:</h3>
{getFieldDecorator('reason')( <span style={{ display: 'block', textAlign: 'center' }}>
<TextArea {getFieldDecorator('reason')(
placeholder="请输入审批理由" <TextArea
style={{ width: '95%', margin: 12, height: 120, color: '#7F8B95' }} placeholder="请输入审批理由"
/>, style={{ width: '95%', margin: 12, height: 120, color: '#7F8B95' }}
)} />,
</span> )}
</div> </span>
</Spin> </div>
</Modal> </Spin>
</Modal>
)}
{children({ onShow: () => setVisible(true) })} {children({ onShow: () => setVisible(true) })}
</> </>
); );
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论