审批保存

This commit is contained in:
‘huanghaiixia’
2025-12-02 17:55:03 +08:00
parent 1685ad147f
commit 2506d02e95
3 changed files with 17 additions and 6 deletions

View File

@ -679,11 +679,13 @@
if (type) { if (type) {
data?.id && (formState.id = data.id) data?.id && (formState.id = data.id)
data?.cuCode && (formState.cuCode = data.cuCode) data?.cuCode && (formState.cuCode = data.cuCode)
if (!type) {
notification.success({ notification.success({
message: 'Tip', message: 'Tip',
description: data?.id ? t('新增成功!') : t('修改成功!') description: data?.id ? t('新增成功!') : t('修改成功!')
}); //提示消息 }); //提示消息
} }
}
// formRef.value.resetFields(); // formRef.value.resetFields();
return data?.id ? data : formState return data?.id ? data : formState
// setTimeout(() => { // setTimeout(() => {

View File

@ -38,7 +38,7 @@
</template> </template>
</a-space> </a-space>
</div> </div>
<component v-if="customFormConfig.codeList.includes(curPageCode)" :is="componentName" ref="formInformation" :disabled="true" /> <component v-if="customFormConfig.codeList.includes(curPageCode)" :is="componentName" ref="formInformation" :disabled="readonly" />
<FormInformation <FormInformation
v-else v-else
:key="renderKey" :key="renderKey"
@ -251,6 +251,10 @@
message: t('撤回'), message: t('撤回'),
description: t('撤回成功') description: t('撤回成功')
}); });
setTimeout(() => {
bus.emit(FLOW_PROCESSED);
close();
}, 500);
} else { } else {
notification.open({ notification.open({
type: 'error', type: 'error',
@ -335,6 +339,10 @@
} }
} }
async function saveDraft() { async function saveDraft() {
if (customFormConfig.codeList.includes(curPageCode.value)) {
await formInformation.value.handleSubmit();
return
}
try { try {
spinning.value = true; spinning.value = true;
let formModels = await formInformation.value.saveDraftData(); let formModels = await formInformation.value.saveDraftData();
@ -402,6 +410,7 @@
return; return;
} }
} else { } else {
await formInformation.value.handleSubmit(true);
validateSuccess.value = true validateSuccess.value = true
} }
const params = await getApproveParams(); const params = await getApproveParams();

View File

@ -331,7 +331,7 @@
}; };
} }
async function onSave() { async function onSave() {
let value = await formInformation.value.handleSubmit(true); let value = await formInformation.value.handleSubmit();
} }
async function saveLaunchNew() { async function saveLaunchNew() {
if (!taskId.value && rDraftsId.value != '0') { if (!taskId.value && rDraftsId.value != '0') {