保存流程返回上一级

master
Harry Yang 2023-01-03 10:42:48 +08:00
parent eb26bcf326
commit bd84dc2db0
2 changed files with 22 additions and 31 deletions

View File

@ -354,7 +354,6 @@
</el-table>
<el-row style="margin: 20px 0">
<el-button type="info" @click="goToSaleContractProcess">返回上一级</el-button>
<el-button type="primary" @click="submitToSaleContractProcess">保存并返回上一级</el-button>
</el-row>
@ -450,7 +449,6 @@
</el-table>
<el-row style="margin: 20px 0">
<el-button type="info" @click="goToProcurementContract">返回上一级</el-button>
<el-button type="primary" @click="saveProcurementContractDetail">保存并返回上一级</el-button>
</el-row>
@ -587,13 +585,10 @@
return true
},
/**
* 保存 业务采购合同清单明细,并验证表单是否填写完整,
* 如果完整就到流程表单界面
* 保存 业务采购合同清单明细,返回上一级的表单界面
*/
saveProcurementContractDetail() {
if (this.checkProcurementDetails()) {
this.goToProcurementContract()
}
this.goToProcurementContract()
},
goToContractDetail() {
@ -936,10 +931,12 @@
this.$message({
showClose: true,
message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功",
type: 'success'
type: 'success',
onClose: () => {
this.resetForm()
this.backLastPage()
}
})
this.resetForm()
this.backLastPage()
}).catch(({ response }) => {
const defaultMessage = () => {
return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败"

View File

@ -472,8 +472,7 @@
</el-table>
<el-row style="margin: 20px 0">
<el-button type="info" @click="goToSaleContractProcess">返回上一级</el-button>
<el-button type="primary" @click="submitToSaleContractProcess">保存并返回上一级</el-button>
<el-button type="primary" @click="saveAndGoToSaleContractProcess">保存并返回上一级</el-button>
</el-row>
</div>
@ -570,7 +569,6 @@
</el-table>
<el-row style="margin: 20px 0">
<el-button type="info" @click="goToProcurementContract">返回上一级</el-button>
<el-button type="primary" @click="saveProcurementContractDetail">保存并返回上一级</el-button>
</el-row>
@ -746,16 +744,12 @@
this.processType = saleContract
},
goToProcurementContract() {
this.changeMode(procurementContractProcess)
this.processType = procurementContract
},
/**
* 校验不通过提示
* @returns {boolean} 校验通过否
*/
checkProcurementDetails() {
// TODO FIXME 修改为提示第几行数据有问题
const emptyRows = this.procurementDetails.filter(detail => {
return isNotEmpty(procurementDetailProperties.filter(property => isBlank(detail[property])))
})
@ -772,13 +766,11 @@
return true
},
/**
* 保存 业务采购合同清单明细,并验证表单是否填写完整,
* 如果完整就到流程表单界面
* 保存 业务采购合同清单明细
*/
saveProcurementContractDetail() {
if (this.checkProcurementDetails()) {
this.goToProcurementContract()
}
this.changeMode(procurementContractProcess)
this.processType = procurementContract
},
goToContractDetail() {
@ -1097,10 +1089,12 @@
this.$message({
showClose: true,
message: processForm.status === 'draft' ? '草稿保存成功' : "提交成功",
type: 'success'
type: 'success',
onClose: () => {
this.resetForm()
this.goToHome()
}
})
this.resetForm()
this.goToHome()
}).catch(({ response }) => {
const defaultMessage = () => {
return processForm.status === 'draft' ? '草稿保存失败' : "项目提交失败"
@ -1126,11 +1120,11 @@
}
return true
},
submitToSaleContractProcess() {
// 做校验
if (this.checkExpirationDate()) {
this.goToSaleContractProcess()
}
/**
* 保存销售合同详情数据,并返回表单界面
*/
saveAndGoToSaleContractProcess() {
this.goToSaleContractProcess()
},
handleRemove(file, fileList) {