This commit is contained in:
2025-08-28 23:32:17 +08:00
parent 2b25709c14
commit ade1177294
16 changed files with 1929 additions and 649 deletions

View File

@ -145,7 +145,7 @@
></el-col>
<el-col :span="12">
<el-form-item label="费用" prop="costEstimation">
<el-input v-model="form.costEstimation" type="number" placeholder="请输入费用" /> </el-form-item
<el-input min="0" v-model="form.costEstimation" type="number" placeholder="请输入费用" /> </el-form-item
></el-col>
<el-col :span="24">
<el-form-item label="变更费用估算表" label-width="110px" prop="costEstimationFile">
@ -348,8 +348,11 @@ const getInfo = () => {
loading.value = true;
buttonLoading.value = false;
nextTick(async () => {
const res = await getDesignChange(routeParams.value.id);
let id = routeParams.value.id.split('_')[0];
const res = await getDesignChange(id);
Object.assign(form.value, res.data);
console.log(form.value);
if (form.value.changeReason.length > 0) {
form.value.changeReason = form.value.changeReason.split(',');
}
@ -374,24 +377,26 @@ const submitForm = (status1: string) => {
if (form.value.saveFile && form.value.saveFile.length > 0) {
saveFile = form.value.saveFile.join(',');
}
}
leaveFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
var res;
res = await addDesignChange({ ...form.value, changeReason, saveFile }).finally(() => (buttonLoading.value = false));
if (res.code == 200) {
if (form.value.costEstimation == '0') {
ElMessage.success('通知成功');
goBack();
leaveFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
var res;
res = await addDesignChange({ ...form.value, changeReason, saveFile }).finally(() => (buttonLoading.value = false));
if (res.code == 200) {
if (form.value.costEstimation == '0') {
ElMessage.success('通知成功');
goBack();
} else {
submit(status.value, res.data);
}
} else {
submit(status.value, res.data);
ElMessage.error(res.msg);
}
} else {
ElMessage.error(res.msg);
}
}
});
});
} else {
submit(status.value, form.value);
}
};
const submitFlow = async () => {
@ -429,14 +434,15 @@ const submitCallback = async () => {
};
//审批
const approvalVerifyOpen = async () => {
submitVerifyRef.value.openDialog(routeParams.value.taskId, true, routeParams.value.businessId);
// submitVerifyRef.value.openDialog(routeParams.value.taskId);
// submitVerifyRef.value.openDialog(routeParams.value.taskId, true, routeParams.value.businessId);
submitVerifyRef.value.openDialog(routeParams.value.taskId);
};
// 图纸上传成功之后 开始提交
const route = useRoute();
const router = useRouter();
const submit = async (status, data) => {
form.value = data;
form.value.id = form.value.id + '_audit';
if (status === 'draft') {
buttonLoading.value = false;
proxy?.$modal.msgSuccess('暂存成功');