From a617123339a37a49818d85c74661558b89c67ad6 Mon Sep 17 00:00:00 2001 From: danshihao Date: Wed, 31 Jan 2024 15:54:32 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=A8=BD=E6=9F=A5=E6=95=B4=E6=94=B9-?= =?UTF-8?q?=E5=BC=BA=E5=88=B6=E6=92=A4=E5=9B=9E=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workCenter.js | 3 +++ ...terpriseStandardInspectionRectification.vue | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/api/workCenter.js b/src/api/workCenter.js index d78eabbd..8667034f 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -305,6 +305,8 @@ const editInspectExtensionTable = (params) => postAction('/esinspectdelayapply/p /* 企标稽查整改 */ // 详情信息 const getInspectRectifyDetail = (params) => getAction('/process/esInspectRectifyFlow/queryDetailByProjectId', params) +// 发起 +const startInspectRectify = (params) => postAction('/process/esInspectRectifyFlow/flowStart', params) // 同意 const approvalInspectRectify = (params) => postAction('/process/esInspectRectifyFlow/flowApproval', params) // 驳回 @@ -588,6 +590,7 @@ export { editInspectExtensionTable, getInspectRectifyDetail, + startInspectRectify, approvalInspectRectify, rejectInspectRectify, transferInspectRectify, diff --git a/src/views/workCenter/enterpriseStandardInspectionRectification/EnterpriseStandardInspectionRectification.vue b/src/views/workCenter/enterpriseStandardInspectionRectification/EnterpriseStandardInspectionRectification.vue index 7ebd107e..c29ba20f 100644 --- a/src/views/workCenter/enterpriseStandardInspectionRectification/EnterpriseStandardInspectionRectification.vue +++ b/src/views/workCenter/enterpriseStandardInspectionRectification/EnterpriseStandardInspectionRectification.vue @@ -110,7 +110,7 @@ import UserSelectModal from '@comp/selection/UserSelectModal' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' import { approvalInspectRectify, getInspectRectifyDataById, - getInspectRectifyDetail, rejectInspectRectify, saveInspectRectify, transferInspectRectify + getInspectRectifyDetail, rejectInspectRectify, saveInspectRectify, startInspectRectify, transferInspectRectify } from '@api/workCenter' import { ApprovalOpinions, EsInspectionRectification, ProcessKey } from '@/enums/commonEnums' @@ -189,6 +189,11 @@ export default { // 是否节点1 isUploadRectificationResult () { return this.currentNode === EsInspectionRectification.uploadRectificationResult.value + }, + // 是否强制撤回 + isForceRevoke () { + const { nodeId, draftId } = this.$route.query + return draftId && !nodeId } }, created () { @@ -198,6 +203,10 @@ export default { this.currentNodeName = taskName || '' this.projectId = projectId || '' this.btn = EsInspectionRectification.propertyOfValue('btn', this.currentNode) || [] + // 强制撤回默认节点1 + if (this.isForceRevoke) { + this.currentNode = EsInspectionRectification.uploadRectificationResult.value + } // 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点 if (nodeId && !EsInspectionRectification.keyOfValue(nodeId)) { // 同意按钮 @@ -458,7 +467,12 @@ export default { this.getPageParams().then(res => { console.log(res) res.map.pass = true - return approvalInspectRectify(res) + let fn = approvalInspectRectify + // 是否强制撤回(强制撤回的话,就发起接口) + if (this.isForceRevoke) { + fn = startInspectRectify + } + return fn(res) }).then(res => { if (res.success) { this.$message.success(res.message)