审批同意 变更优化

This commit is contained in:
‘huanghaiixia’
2026-01-14 11:05:28 +08:00
parent 5cf1c553ef
commit a635481219
8 changed files with 30 additions and 23 deletions

View File

@ -16,7 +16,7 @@
</slot>
提交
</a-button>
<a-button v-if="customFormConfig.codeList.includes(curPageCode)&&!disabled" @click="onSave">
<a-button v-if="customFormConfig.codeList.includes(curPageCode)&&!disabled" :disabled="disableSubmit||data.submitLoading" @click="onSave">
<slot name="icon"><save-outlined /></slot>保存
</a-button>
<a-button v-if="!customFormConfig.codeList.includes(curPageCode)&&!disabled" :disabled="data.submitLoading" @click="saveDraft">
@ -351,12 +351,18 @@
};
}
async function onSave() {
let value = await formInformation.value.handleSubmit();
if (rQuery.type == 'update') {
setTimeout(() => {
bus.emit(CREATE_FLOW, {});
close();
}, 500);
try {
disableSubmit.value = true
let value = await formInformation.value.handleSubmit();
disableSubmit.value = false
if (rQuery.type == 'update'&&value) {
setTimeout(() => {
bus.emit(CREATE_FLOW, {});
close();
}, 500);
}
} catch {
disableSubmit.value = false
}
}
async function saveLaunchNew() {
@ -383,8 +389,9 @@
let system = {}
let obj = {}
system[key] = false
let value = await formInformation.value.handleSubmit(true);
data.submitLoading = true;
let value = await formInformation.value.handleSubmit(true, rQuery.type == 'update' ? 'update' : '');
data.submitLoading = false;
obj[key] = value
mainFormModels.value = obj
if (!value) return