保存流程返回上一级
parent
d20af67b42
commit
eb26bcf326
|
@ -616,6 +616,16 @@
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resetForm() {
|
||||||
|
this.initForm({})
|
||||||
|
this.fileList = []
|
||||||
|
this.rowKeyCounter = 0
|
||||||
|
this.incomeDetails = []
|
||||||
|
this.projectSelected = false
|
||||||
|
this.procurementDetails = []
|
||||||
|
this.supplierMaterialsForm = []
|
||||||
|
},
|
||||||
|
|
||||||
initForm(form) {
|
initForm(form) {
|
||||||
this.processForm = { ...form }
|
this.processForm = { ...form }
|
||||||
},
|
},
|
||||||
|
@ -751,9 +761,7 @@
|
||||||
.finally(() => loading.close())
|
.finally(() => loading.close())
|
||||||
},
|
},
|
||||||
clearProjectProcess() {
|
clearProjectProcess() {
|
||||||
this.projectSelected = false
|
this.resetForm()
|
||||||
this.initForm({})
|
|
||||||
this.incomeDetails = []
|
|
||||||
},
|
},
|
||||||
|
|
||||||
saveDraft() {
|
saveDraft() {
|
||||||
|
@ -930,6 +938,8 @@
|
||||||
message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功",
|
message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功",
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
|
this.resetForm()
|
||||||
|
this.backLastPage()
|
||||||
}).catch(({ response }) => {
|
}).catch(({ response }) => {
|
||||||
const defaultMessage = () => {
|
const defaultMessage = () => {
|
||||||
return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败"
|
return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败"
|
||||||
|
|
|
@ -727,8 +727,7 @@
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.projectSelected = false
|
this.resetForm()
|
||||||
this.initForm({})
|
|
||||||
this.changeMode(BUTTON)
|
this.changeMode(BUTTON)
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
@ -811,6 +810,18 @@
|
||||||
initForm(form) {
|
initForm(form) {
|
||||||
this.processForm = { ...form, sealTypes: [], projectTitle: this.computeProjectTitle(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 用户输入的字符串
|
* @param q 用户输入的字符串
|
||||||
|
@ -905,11 +916,7 @@
|
||||||
.finally(() => loading.close())
|
.finally(() => loading.close())
|
||||||
},
|
},
|
||||||
clearProjectProcess() {
|
clearProjectProcess() {
|
||||||
this.initForm({})
|
this.resetForm()
|
||||||
this.incomeDetails = []
|
|
||||||
this.projectSelected = false
|
|
||||||
this.procurementDetails = []
|
|
||||||
|
|
||||||
if (this.isProcurementContractMode) {
|
if (this.isProcurementContractMode) {
|
||||||
this.goToHome()
|
this.goToHome()
|
||||||
// 重新打开对话框选择项目
|
// 重新打开对话框选择项目
|
||||||
|
@ -1092,6 +1099,8 @@
|
||||||
message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功",
|
message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功",
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
|
this.resetForm()
|
||||||
|
this.goToHome()
|
||||||
}).catch(({ response }) => {
|
}).catch(({ response }) => {
|
||||||
const defaultMessage = () => {
|
const defaultMessage = () => {
|
||||||
return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败"
|
return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败"
|
||||||
|
|
Loading…
Reference in New Issue