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

批量审批 bug修改

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