From 57676ac03c47ceaec366d0eade7a08968221f51a Mon Sep 17 00:00:00 2001 From: danshihao Date: Wed, 6 Dec 2023 18:40:29 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=B5=81=E7=A8=8B=E5=90=8C=E6=84=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EnterpriseStandardInspectionPlanFlow.vue | 13 +++++++++---- .../EnterpriseStandardInspectionProcess.vue | 13 +++++++++---- .../EnterpriseStandardInspectionRectification.vue | 7 ++++++- .../InspectionExtensionRequestProcess.vue | 13 +++++++++---- .../PermissionApplicationProcess.vue | 13 +++++++++---- .../PostMeetingManageProcess.vue | 13 +++++++++---- 6 files changed, 51 insertions(+), 21 deletions(-) diff --git a/src/views/workCenter/enterpriseStandardInspectionPlan/EnterpriseStandardInspectionPlanFlow.vue b/src/views/workCenter/enterpriseStandardInspectionPlan/EnterpriseStandardInspectionPlanFlow.vue index 055643e4..cbf7eb52 100644 --- a/src/views/workCenter/enterpriseStandardInspectionPlan/EnterpriseStandardInspectionPlanFlow.vue +++ b/src/views/workCenter/enterpriseStandardInspectionPlan/EnterpriseStandardInspectionPlanFlow.vue @@ -426,9 +426,9 @@ export default { */ handleSubmit () { if (this.loading) return - // 发起流程并且没有被驳回,调发起接口,否则调审批接口 - if (this.currentNode === EsInspectionPlan.initiate.value && this.$route.query.taskId) { - this.handleAgree() + // 有taskId说明已经发起过,调审批接口,否则调发起接口 + if (this.$route.query.taskId) { + this.handleAgree(true) return } this.loading = true @@ -450,12 +450,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 approvalInspectPlan(res) }).then(res => { if (res.success) { diff --git a/src/views/workCenter/enterpriseStandardInspectionProcess/EnterpriseStandardInspectionProcess.vue b/src/views/workCenter/enterpriseStandardInspectionProcess/EnterpriseStandardInspectionProcess.vue index 27870db5..bdf5e435 100644 --- a/src/views/workCenter/enterpriseStandardInspectionProcess/EnterpriseStandardInspectionProcess.vue +++ b/src/views/workCenter/enterpriseStandardInspectionProcess/EnterpriseStandardInspectionProcess.vue @@ -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) { diff --git a/src/views/workCenter/enterpriseStandardInspectionRectification/EnterpriseStandardInspectionRectification.vue b/src/views/workCenter/enterpriseStandardInspectionRectification/EnterpriseStandardInspectionRectification.vue index 21fcfcb3..56c9f40d 100644 --- a/src/views/workCenter/enterpriseStandardInspectionRectification/EnterpriseStandardInspectionRectification.vue +++ b/src/views/workCenter/enterpriseStandardInspectionRectification/EnterpriseStandardInspectionRectification.vue @@ -392,12 +392,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 approvalInspectRectify(res) }).then(res => { if (res.success) { diff --git a/src/views/workCenter/inspectionExtensionRequestProcess/InspectionExtensionRequestProcess.vue b/src/views/workCenter/inspectionExtensionRequestProcess/InspectionExtensionRequestProcess.vue index a7080952..24f90ce6 100644 --- a/src/views/workCenter/inspectionExtensionRequestProcess/InspectionExtensionRequestProcess.vue +++ b/src/views/workCenter/inspectionExtensionRequestProcess/InspectionExtensionRequestProcess.vue @@ -371,9 +371,9 @@ export default { */ handleSubmit () { if (this.loading) return - // 发起流程并且没有被驳回,调发起接口,否则调审批接口 - if (this.currentNode === InspectionExtensionRequestProcess.initiate.value && this.$route.query.taskId) { - this.handleAgree() + // 有taskId说明已经发起过,调审批接口,否则调发起接口 + if (this.$route.query.taskId) { + this.handleAgree(true) return } this.loading = true @@ -395,12 +395,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 approvalInspectExtension(res) }).then(res => { if (res.success) { diff --git a/src/views/workCenter/permissionApplicationProcess/PermissionApplicationProcess.vue b/src/views/workCenter/permissionApplicationProcess/PermissionApplicationProcess.vue index 465e783e..9312e830 100644 --- a/src/views/workCenter/permissionApplicationProcess/PermissionApplicationProcess.vue +++ b/src/views/workCenter/permissionApplicationProcess/PermissionApplicationProcess.vue @@ -473,9 +473,9 @@ export default { */ handleSubmit () { if (this.loading) return - // 发起流程并且没有被驳回,调发起接口,否则调审批接口 - if (this.currentNode === PermissionApply.initiate.value && this.$route.query.taskId) { - this.handleAgree() + // 有taskId说明已经发起过,调审批接口,否则调发起接口 + if (this.$route.query.taskId) { + this.handleAgree(true) return } this.loading = true @@ -497,12 +497,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 approvalPermissionApply(res) }).then(res => { if (res.success) { diff --git a/src/views/workCenter/postMeetingManageProcess/PostMeetingManageProcess.vue b/src/views/workCenter/postMeetingManageProcess/PostMeetingManageProcess.vue index 35b22be5..e257e208 100644 --- a/src/views/workCenter/postMeetingManageProcess/PostMeetingManageProcess.vue +++ b/src/views/workCenter/postMeetingManageProcess/PostMeetingManageProcess.vue @@ -396,9 +396,9 @@ export default { */ handleSubmit () { if (this.loading) return - // 发起流程并且没有被驳回,调发起接口 - if (this.currentNode !== PostMeetingManage.initiate.value) { - this.handleAgree() + // 有taskId说明已经发起过,调审批接口,否则调发起接口 + if (this.$route.query.taskId) { + this.handleAgree(true) return } this.loading = true @@ -420,13 +420,18 @@ export default { }, /** * 同意 + * @param isSubmitBtn - 是否提交按钮(提交按钮除了发起也走同意接口) */ - handleAgree () { + handleAgree (isSubmitBtn) { if (this.loading) return this.loading = true this.getPageParams().then(res => { res.map.pass = true res.notAttend = false + // 不是提交按钮 且 如果没有填写注释,就默认同意 + if (!isSubmitBtn && !res.processApprovalRecord.commitText) { + res.processApprovalRecord.commitText = '同意' + } return approvalPostMeetingManage(res) }).then(res => { if (res.success) {