审批同意 变更优化

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

@ -269,13 +269,13 @@
async function getFormValue() {
return formState
}
async function handleSubmit(type) {
async function handleSubmit(type, updateType) {
try {
await formRef.value.validateFields();
let obj = {
...formState,
lngFileUploadList: dataFile.value,
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
}
spinning.value = true;
let request = !formState.id ? addLngAppro :updateLngAppro

View File

@ -551,7 +551,7 @@
async function getFormValue() {
return formState
}
async function handleSubmit(type) {
async function handleSubmit(type, updateType) {
try {
await formRef.value.validateFields();
@ -567,7 +567,7 @@
lngFileUploadList: dataFile.value,
lngContractFactCpList: dataList.value,
lngContractApproRelList: dataListAppro.value,
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
}
spinning.value = true;

View File

@ -517,7 +517,7 @@
async function getFormValue() {
return formState
}
async function handleSubmit(type) {
async function handleSubmit(type, updateType) {
try {
await formRef.value.validateFields();
let arr = contractQty.value.getQtyList()
@ -572,7 +572,7 @@
"uomCode": formState.uomCode,
}
],
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
}
spinning.value = true;

View File

@ -541,7 +541,7 @@
async function getFormValue() {
return formState
}
async function handleSubmit(type) {
async function handleSubmit(type, updateType) {
try {
await formRef.value.validateFields();
let arr = contractQty.value.getQtyList()
@ -598,7 +598,7 @@
"uomCode": formState.uomCode,
}
],
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
}
spinning.value = true;

View File

@ -282,14 +282,14 @@
async function getFormValue() {
return formState
}
async function handleSubmit(type) {
async function handleSubmit(type, updateType) {
try {
await formRef.value.validateFields();
let obj = {
...formState,
lngScoreDtlList: dataList.value,
lngFileUploadList: dataFile.value,
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
}
spinning.value = true;
let request = !formState.id ? addLngScore :updateLngScore

View File

@ -419,7 +419,7 @@
}
} else {
// await formInformation.value.handleSubmit(true);
// validateSuccess.value = true
validateSuccess.value = true
}
const params = await getApproveParams();
const nextNodes = await postGetNextTaskMaybeArrival(params);
@ -457,7 +457,7 @@
return;
}
} else {
await formInformation.value.handleSubmit(true);
// await formInformation.value.handleSubmit(true);
validateSuccess.value = true
}
const params = await getApproveParams();

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

View File

@ -283,14 +283,14 @@
async function getFormValue() {
return formState
}
async function handleSubmit(type) {
async function handleSubmit(type, updateType) {
try {
await formRef.value.validateFields();
let obj = {
...formState,
lngScoreDtlList: dataList.value,
lngFileUploadList: dataFile.value,
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
approCode: pageType.value=='update'&&updateType ? 'WTJ' : formState.approCode
}
spinning.value = true;