update 流程同意调整

This commit is contained in:
danshihao
2023-12-06 18:40:29 +08:00
parent 536b16e286
commit 57676ac03c
6 changed files with 51 additions and 21 deletions
@@ -370,9 +370,9 @@ export default {
*/
handleSubmit () {
if (this.loading) return
// 发起流程并且没有被驳回,调发起接口,否则调审批接口
if (this.currentNode === EsInspectionProcess.initiate.value && this.$route.query.taskId) {
this.handleAgree()
// 有taskId说明已经发起过,调审批接口,否则调发起接口
if (this.$route.query.taskId) {
this.handleAgree(true)
return
}
this.loading = true
@@ -394,12 +394,17 @@ export default {
},
/**
* 同意
* @param isSubmitBtn - 是否提交按钮(提交按钮除了发起也走同意接口)
*/
handleAgree () {
handleAgree (isSubmitBtn) {
if (this.loading) return
this.loading = true
this.getPageParams().then(res => {
res.map.pass = true
// 不是提交按钮 且 如果没有填写注释,就默认同意
if (!isSubmitBtn && !res.processApprovalRecord.commitText) {
res.processApprovalRecord.commitText = '同意'
}
return approvalInspectProcess(res)
}).then(res => {
if (res.success) {