保存流程返回上一级

master
Harry Yang 2023-01-03 10:01:29 +08:00
parent d20af67b42
commit eb26bcf326
2 changed files with 29 additions and 10 deletions
src/main/resources/templates/admin/business

View File

@ -616,6 +616,16 @@
console.log(obj)
},
resetForm() {
this.initForm({})
this.fileList = []
this.rowKeyCounter = 0
this.incomeDetails = []
this.projectSelected = false
this.procurementDetails = []
this.supplierMaterialsForm = []
},
initForm(form) {
this.processForm = { ...form }
},
@ -751,9 +761,7 @@
.finally(() => loading.close())
},
clearProjectProcess() {
this.projectSelected = false
this.initForm({})
this.incomeDetails = []
this.resetForm()
},
saveDraft() {
@ -930,6 +938,8 @@
message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功",
type: 'success'
})
this.resetForm()
this.backLastPage()
}).catch(({ response }) => {
const defaultMessage = () => {
return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败"

View File

@ -727,8 +727,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.projectSelected = false
this.initForm({})
this.resetForm()
this.changeMode(BUTTON)
}).catch(() => {
this.$message({
@ -811,6 +810,18 @@
initForm(form) {
this.processForm = { ...form, sealTypes: [], projectTitle: this.computeProjectTitle(form) }
},
resetForm() {
this.initForm({})
this.fileList = []
this.rowKeyCounter = 0
this.incomeDetails = []
this.projectSelected = false
this.procurementDetails = []
this.supplierMaterialsForm = []
this.filteredProcurementDetails = []
},
/**
* 搜索项目
* @param q 用户输入的字符串
@ -905,11 +916,7 @@
.finally(() => loading.close())
},
clearProjectProcess() {
this.initForm({})
this.incomeDetails = []
this.projectSelected = false
this.procurementDetails = []
this.resetForm()
if (this.isProcurementContractMode) {
this.goToHome()
// 重新打开对话框选择项目
@ -1092,6 +1099,8 @@
message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功",
type: 'success'
})
this.resetForm()
this.goToHome()
}).catch(({ response }) => {
const defaultMessage = () => {
return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败"