From eba5e97c196dc85f616bd52c874c0bd71d3362c9 Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Thu, 6 Mar 2025 13:37:00 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=87=BA=E5=BA=93=E5=8F=82?=
=?UTF-8?q?=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business-details.vue | 78 ++++++++++++++-----
.../direct-rotation-apply/index.vue | 2 +-
src/views/material/lease/outBound/index.vue | 2 +-
3 files changed, 61 insertions(+), 21 deletions(-)
diff --git a/src/views/business-examine/direct-rotation-apply/business-details.vue b/src/views/business-examine/direct-rotation-apply/business-details.vue
index 0c7b76c1..2b5bc395 100644
--- a/src/views/business-examine/direct-rotation-apply/business-details.vue
+++ b/src/views/business-examine/direct-rotation-apply/business-details.vue
@@ -202,7 +202,7 @@
@@ -222,7 +222,7 @@
import TitleTip from './components/title-tip.vue'
import { getLeaseTaskDetail, receiveDetail, getInfoById, getAuditInfo, auditDir } from '@/api/business/index'
-import { getAuditingDetailsApi } from '@/api/receive-apply/index.js'
+import { getAuditingDetailsApi, submitAuditingApi } from '@/api/receive-apply/index.js'
export default {
components: {
@@ -258,7 +258,16 @@ export default {
type: 'image'
}
],
- previewList: []
+ previewList: [],
+ auditingParams: {
+ nodeId: '', // 当前审核记录的id
+ remark: '', // 审核意见
+ typeId: '', // 当前审核记录中的 typeId
+ taskId: '', // 外层列表的taskId
+ isAccept: '', // 审批结果 1. 通过 2. 驳回
+ recordId: '',
+ nextNodeId: '' // 下个流程节点ID
+ }
}
},
created() {
@@ -287,8 +296,8 @@ export default {
// this.getAuditInfo()
if (this.$route.query) {
const { nodeId, flowId } = this.$route.query
- // this.auditingParams.taskId = taskId
- // this.currentNodeId = nodeId
+ this.auditingParams.taskId = flowId
+ this.currentNodeId = nodeId
this.getLeaseTaskDetailFun(flowId)
}
},
@@ -302,7 +311,8 @@ export default {
type: 'warning'
})
.then(() => {
- this.isAccept = 1
+ // this.isAccept = 1
+ this.auditingParams.isAccept = 1
this.submitAuditing()
})
.catch(() => {
@@ -318,7 +328,7 @@ export default {
type: 'warning'
})
.then(() => {
- this.isAccept = 2
+ this.auditingParams.isAccept = 2
this.submitAuditing()
})
.catch(() => {
@@ -327,20 +337,50 @@ export default {
},
// 提交审核
async submitAuditing() {
- const params = {
- flowId: this.flowId,
- nodeId: this.auditingList[this.auditingList.length - 1].nodeId,
- isAccept: this.isAccept,
- remark: this.remark
+ // 组装参数
+
+ const currentAuditing = this.auditingList.filter(e => e.nodeId === this.currentNodeId) // 获取当前审核的节点
+ const currentIndex = this.auditingList.findIndex(e => e.nodeId === this.currentNodeId) // 获取当前的索引
+
+ const { recordId, id, typeId, isAccept } = currentAuditing[0]
+
+ // if (isAccept !== 0) {
+ // this.$modal.msgError('当前已审核,不可重复审核')
+ // return
+ // }
+ Object.assign(this.auditingParams, {
+ typeId,
+ recordId,
+ nodeId: id
+ })
+ if (currentIndex !== this.auditingList.length - 1) {
+ this.auditingParams.nextNodeId = this.auditingList[currentIndex + 1].id
}
- try {
- const res = await auditDir(params)
- console.log('🚀 ~ submitAuditing ~ res:', res)
- this.$message.success('审核成功')
- this.$tab.closePage()
- } catch (error) {
- console.log('🚀 ~ submitAuditing ~ error:', error)
+
+ const res = await submitAuditingApi(this.auditingParams)
+
+ if (res.code === 200) {
+ this.$modal.msgSuccess('审核成功')
+ setTimeout(() => {
+ // const obj = { path: '/business-examine/receive-apply' }
+ // this.$tab.closeOpenPage(obj)
+ this.$tab.closePage()
+ }, 500)
}
+ // const params = {
+ // flowId: this.flowId,
+ // nodeId: this.auditingList[this.auditingList.length - 1].nodeId,
+ // isAccept: this.isAccept,
+ // remark: this.remark
+ // }
+ // try {
+ // const res = await auditDir(params)
+ // console.log('🚀 ~ submitAuditing ~ res:', res)
+ // this.$message.success('审核成功')
+ // this.$tab.closePage()
+ // } catch (error) {
+ // console.log('🚀 ~ submitAuditing ~ error:', error)
+ // }
},
// 获取详情
async getTaskInfo() {
diff --git a/src/views/business-examine/direct-rotation-apply/index.vue b/src/views/business-examine/direct-rotation-apply/index.vue
index 22a9e3ae..252f80a3 100644
--- a/src/views/business-examine/direct-rotation-apply/index.vue
+++ b/src/views/business-examine/direct-rotation-apply/index.vue
@@ -206,7 +206,7 @@ export default {
console.log('row.configValues', row.configValue)
if (row.configValue) {
- return row.flowStatus != 1 && row.configValue.includes(this.userId)
+ return row.flowStatus != 2 && row.configValue.includes(this.userId)
}
}
}
diff --git a/src/views/material/lease/outBound/index.vue b/src/views/material/lease/outBound/index.vue
index 4df6f5b6..537808e2 100644
--- a/src/views/material/lease/outBound/index.vue
+++ b/src/views/material/lease/outBound/index.vue
@@ -670,7 +670,7 @@ export default {
maCode: item.maCode,
parentId: this.parentIdTemp,
outNum: 1,
- publishTask: item.publishTask
+ publishTask: this.publishTask
})
})
this.single = selection.length != 1