|
@@ -181,7 +181,7 @@
|
|
|
<el-button @click="registeredDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '未登记')}} </el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column min-width="120" align="center" title="一级校审" field="firstInstanceStatus">
|
|
|
+ <vxe-column min-width="150" align="center" title="一级校审" field="firstInstanceStatus">
|
|
|
<template #default="scope">
|
|
|
<el-button @click="firstAuditDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.firstInstanceStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.firstInstanceStatus, '未登记')}} </el-button>
|
|
|
</template>
|
|
@@ -236,31 +236,31 @@
|
|
|
<!-- <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' && commonJS.isEmpty(scope.row.reportNo) && scope.row.createBy === $store.state.user.id" text type="primary" @click="saveReportNo(scope.row.id)">生成报告号</el-button>-->
|
|
|
|
|
|
<!-- <!– 一级校审 发起–>-->
|
|
|
- <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' &&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&(scope.row.firstInstanceStatus === '0'||scope.row.firstInstanceStatus === '1'||scope.row.firstInstanceStatus === '3')" text type="primary" @click="firstAuditPush(scope.row)">一级校审</el-button>
|
|
|
+ <el-button v-if="hasPermission('jy_project:info:edit')&& scope.row.status === '5' && (scope.row.firstInstanceStatus ==='0' || scope.row.firstInstanceStatus ==='3' ||scope.row.firstInstanceStatus ==='1'||scope.row.firstInstanceStatus ==='6') &&(scope.row.createBy === $store.state.user.id)" text type="primary" @click="firstAuditPush(scope.row)">一级校审</el-button>
|
|
|
<!-- <!– 一级校审 撤回–>-->
|
|
|
- <el-button v-if="hasPermission('program:registered:edit')&&scope.row.firstInstanceStatus === '2' &&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))" text type="primary" @click="firstAuditReback(scope.row)">校审撤回</el-button>
|
|
|
+ <el-button v-if="hasPermission('jy_project:info:edit')&&scope.row.firstInstanceStatus === '2' &&(scope.row.createBy === $store.state.user.id)" text type="primary" @click="firstAuditReback(scope.row)">校审撤回</el-button>
|
|
|
<!-- <!– 一级校审 审核–>-->
|
|
|
<el-button v-if="scope.row.firstInstanceStatus==='2' && checkIsAuditFirst(scope.row)" text type="primary" @click="examineFirst(scope.row)">一级校审审核</el-button>
|
|
|
<!-- <!– 一级校审 被驳回后当前申请人重新调整–>-->
|
|
|
- <el-button v-if="hasPermission('program:registered:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.firstInstanceStatus === '4'" text type="primary" @click="adjustFirst(scope.row)">驳回调整</el-button>
|
|
|
+ <el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&scope.row.firstInstanceStatus === '4'" text type="primary" @click="adjustFirst(scope.row)">驳回调整</el-button>
|
|
|
|
|
|
<!-- <!– 二级校审 发起–>-->
|
|
|
-<!-- <el-button v-if="hasPermission('program:registered:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.status1 === '5'&&(scope.row.status2 === '0'||scope.row.status2 === '1'||scope.row.status2 === '3')" text type="primary" @click="secondAuditPush(scope.row)">二级校审</el-button>-->
|
|
|
+ <el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&(scope.row.firstInstanceStatus === '5' || scope.row.firstInstanceStatus === '7')&&(scope.row.secondInstanceStatus === '0'||scope.row.secondInstanceStatus === '1'||scope.row.secondInstanceStatus === '3')" text type="primary" @click="secondAuditPush(scope.row)">二级校审</el-button>
|
|
|
<!-- <!– 二级校审 撤回–>-->
|
|
|
-<!-- <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status2 === '2'&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))" type="text" @click="secondAuditReback(scope.row)">校审撤回</el-button>-->
|
|
|
+ <el-button v-if="hasPermission('jy_project:info:edit')&&scope.row.secondInstanceStatus === '2'&&(scope.row.createBy === $store.state.user.id)" type="text" @click="secondAuditReback(scope.row)">校审撤回</el-button>
|
|
|
<!-- <!– 二级校审 审核–>-->
|
|
|
-<!-- <el-button v-if="scope.row.status2==='2' && checkIsAuditSecond(scope.row)" text type="primary" @click="examineSecond(scope.row)">二级校审审核</el-button>-->
|
|
|
+ <el-button v-if="scope.row.secondInstanceStatus==='2' && checkIsAuditSecond(scope.row)" text type="primary" @click="examineSecond(scope.row)">二级校审审核</el-button>
|
|
|
<!-- <!– 二级校审 被驳回后当前申请人重新调整–>-->
|
|
|
-<!-- <el-button v-if="hasPermission('program:registered:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.status2 === '4'" text type="primary" @click="adjustSecond(scope.row)">驳回调整</el-button>-->
|
|
|
+ <el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&scope.row.secondInstanceStatus === '4'" text type="primary" @click="adjustSecond(scope.row)">驳回调整</el-button>
|
|
|
|
|
|
<!-- <!– 三级校审 发起–>-->
|
|
|
-<!-- <el-button v-if="hasPermission('program:registered:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.status2 === '5' &&(scope.row.status3 === '0'||scope.row.status3 === '1'||scope.row.status3 === '3')" text type="primary" @click="thirdAuditPush(scope.row)">三级校审</el-button>-->
|
|
|
+ <el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&scope.row.secondInstanceStatus === '5' &&(scope.row.thirdInstanceStatus === '0'||scope.row.thirdInstanceStatus === '1'||scope.row.thirdInstanceStatus === '3')" text type="primary" @click="thirdAuditPush(scope.row)">三级校审</el-button>
|
|
|
<!-- <!– 三级校审 撤回–>-->
|
|
|
-<!-- <el-button v-if="hasPermission('program:registered:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.status3 === '2'" text type="primary" @click="thirdAuditReback(scope.row)">校审撤回</el-button>-->
|
|
|
+ <el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.thirdInstanceStatus === '2'" text type="primary" @click="thirdAuditReback(scope.row)">校审撤回</el-button>
|
|
|
<!-- <!– 三级校审 审核–>-->
|
|
|
-<!-- <el-button v-if="scope.row.status3==='2' && checkIsAuditThird(scope.row)" text type="primary" @click="examineThird(scope.row)">三级校审审核</el-button>-->
|
|
|
+ <el-button v-if="scope.row.thirdInstanceStatus==='2' && checkIsAuditThird(scope.row)" text type="primary" @click="examineThird(scope.row)">三级校审审核</el-button>
|
|
|
<!-- <!– 三级校审 被驳回后当前申请人重新调整–>-->
|
|
|
-<!-- <el-button v-if="hasPermission('program:registered:edit')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.status3 === '4'" text type="primary" @click="adjustThird(scope.row)">驳回调整</el-button>-->
|
|
|
+ <el-button v-if="hasPermission('jy_project:info:edit')&&(scope.row.createBy === $store.state.user.id)&&scope.row.thirdInstanceStatus === '4'" text type="primary" @click="adjustThird(scope.row)">驳回调整</el-button>
|
|
|
|
|
|
<!-- <!–三神结束后,评估报告签发前进行资产评估项目(校对)–>-->
|
|
|
<!-- <el-button v-if="hasPermission('program:registered:proo')&&(scope.row.createBy === $store.state.user.id||haveProjectIds.includes(scope.row.id))&&scope.row.status3 === '5'&&scope.row.issuedStatus === '0'" text type="primary" @click="proofread(scope.row.id)">校对</el-button>-->
|
|
@@ -368,7 +368,11 @@ export default {
|
|
|
procDefKey:'',
|
|
|
haveProjectIds:'',
|
|
|
processDefinitionId1:'',
|
|
|
- procDefKey1:''
|
|
|
+ procDefKey1:'',
|
|
|
+ processDefinitionId2:'',
|
|
|
+ procDefKey2:'',
|
|
|
+ processDefinitionId3:'',
|
|
|
+ procDefKey3:'',
|
|
|
}
|
|
|
},
|
|
|
ProjectInfoService:null,
|
|
@@ -427,7 +431,7 @@ export default {
|
|
|
},
|
|
|
// 查看
|
|
|
view (row) {
|
|
|
- this.$refs.projectDia.init('view', row.id)
|
|
|
+ this.$refs.projectDia.init('view', row.id,row.auditId1, row.auditId2, row.auditId3)
|
|
|
},
|
|
|
// 获取数据列表
|
|
|
refreshList () {
|
|
@@ -466,6 +470,18 @@ export default {
|
|
|
this.procDefKey1 = data.key
|
|
|
}
|
|
|
})
|
|
|
+ processService.getByName('嘉溢-项目二级校审').then((data) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.processDefinitionId2 = data.id
|
|
|
+ this.procDefKey2 = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
+ processService.getByName('嘉溢-项目三级校审').then((data) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.processDefinitionId3 = data.id
|
|
|
+ this.procDefKey3 = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 当前页
|
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
@@ -718,15 +734,378 @@ export default {
|
|
|
formType: data.formType,
|
|
|
formUrl: data.formUrl,
|
|
|
formTitle: processTitle,
|
|
|
- businessTable: 'program_audit',
|
|
|
+ businessTable: 'jy_project_audit',
|
|
|
businessId: row.auditId1,
|
|
|
isShow: 'false',
|
|
|
status: status,
|
|
|
- routePath: '/program/registered/ProjectList'
|
|
|
+ routePath: '/jy/project/ProjectList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ checkIsAuditFirst (row) {
|
|
|
+ let loginUserId = this.$store.state.user.id // 获取当前登录用户id
|
|
|
+ if (this.commonJS.isNotEmpty(row.auditUserIds1)) {
|
|
|
+ for (const userId of row.auditUserIds1) {
|
|
|
+ if (userId === loginUserId) { // 当数据的审核人中包含当前登录人id时,返回true
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ },
|
|
|
+ // 驳回后调整 一级校审
|
|
|
+ adjustFirst (row) {
|
|
|
+ this.projectInfoService.findByIdAudit(row.auditId1).then((data) => {
|
|
|
+ if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.todoFirst(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 审核 一级校审
|
|
|
+ examineFirst (row) {
|
|
|
+ this.projectInfoService.findByIdAudit(row.auditId1).then((data) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.todoFirst(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 审核或重新调整跳转 一级校审
|
|
|
+ todoFirst (row) {
|
|
|
+ let cUser = false
|
|
|
+ taskService.getTaskDefInfo({
|
|
|
+ taskId: row.taskIdAudit1
|
|
|
+ }).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
|
|
|
+ isShow: false,
|
|
|
+ formReadOnly: true,
|
|
|
+ formTitle: `${data.taskName}`,
|
|
|
+ cUser: cUser,
|
|
|
+ title: `审批【${data.taskName || ''}】`,
|
|
|
+ routePath: '/jy/project/ProjectList' // 数据处理后需要跳转的页面路径
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查看一级校审审批流程结果
|
|
|
+ firstAuditDetail (row) {
|
|
|
+ if (row.firstInstanceStatus !== '0' && row.firstInstanceStatus !== '1') {
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId1,
|
|
|
+ procDefId: this.processDefinitionId1
|
|
|
+ }).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '一级校审' + '流程详情',
|
|
|
+ formTitle: '一级校审' + '流程详情',
|
|
|
+ businessId: row.auditId1,
|
|
|
+ status: 'reback'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 撤回一级校审
|
|
|
+ firstAuditReback (row) {
|
|
|
+ this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ await this.projectInfoService.findByIdAudit(row.auditId1).then((data) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ processService.revokeProcIns(row.procInsId1).then((data) => {
|
|
|
+ let form = {status: '3', id: row.auditId1}
|
|
|
+ this.projectInfoService.updateStatusByAuditId(form)
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查询当前登录人是否是数据的审核人 二级校审
|
|
|
+ checkIsAuditSecond (row) {
|
|
|
+ let loginUserId = this.$store.state.user.id // 获取当前登录用户id
|
|
|
+ if (this.commonJS.isNotEmpty(row.auditUserIds2)) {
|
|
|
+ for (const userId of row.auditUserIds2) {
|
|
|
+ if (userId === loginUserId) { // 当数据的审核人中包含当前登录人id时,返回true
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ },
|
|
|
+ // 发起二级校审
|
|
|
+ secondAuditPush (row) {
|
|
|
+ // 读取流程表单
|
|
|
+ let title = `发起流程【嘉溢-项目二级校审】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[嘉溢-项目二级校审]`
|
|
|
+ let status = 'startAndHold'
|
|
|
+ if (row.secondInstanceStatus === '3') {
|
|
|
+ status = 'startAndClose'
|
|
|
+ } else if (row.secondInstanceStatus === '4') {
|
|
|
+ status = 'reapplyFlag'
|
|
|
+ }
|
|
|
+ taskService.getTaskDef({ procDefId: this.processDefinitionId2,
|
|
|
+ businessId: row.auditId2,
|
|
|
+ businessTable: 'jy_project_audit'}).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
+ procDefId: this.processDefinitionId2,
|
|
|
+ procDefKey: this.procDefKey2,
|
|
|
+ title: title,
|
|
|
+ formType: data.formType,
|
|
|
+ formUrl: data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'jy_project_audit',
|
|
|
+ businessId: row.auditId2,
|
|
|
+ isShow: 'false',
|
|
|
+ status: status,
|
|
|
+ routePath: '/jy/project/ProjectList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查看二级校审审批流程结果
|
|
|
+ secondAuditDetail (row) {
|
|
|
+ if (row.secondInstanceStatus !== '0' && row.secondInstanceStatus !== '1') {
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId2,
|
|
|
+ procDefId: this.processDefinitionId2
|
|
|
+ }).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '二级校审' + '流程详情',
|
|
|
+ formTitle: '二级校审' + '流程详情',
|
|
|
+ businessId: row.auditId2,
|
|
|
+ status: 'reback'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 撤回二级校审
|
|
|
+ secondAuditReback (row) {
|
|
|
+ this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ await this.projectInfoService.findByIdAudit(row.auditId2).then((data) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ processService.revokeProcIns(row.procInsId2).then((data) => {
|
|
|
+ let form = {status: '3', id: row.auditId2}
|
|
|
+ this.projectInfoService.updateStatusByAuditId(form)
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 驳回后调整 二级校审
|
|
|
+ adjustSecond (row) {
|
|
|
+ this.projectInfoService.findByIdAudit(row.auditId2).then((data) => {
|
|
|
+ if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.todoSecond(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 审核 二级校审
|
|
|
+ examineSecond (row) {
|
|
|
+ this.projectInfoService.findByIdAudit(row.auditId2).then((data) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.todoSecond(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 审核或重新调整跳转 二级校审
|
|
|
+ todoSecond (row) {
|
|
|
+ let cUser = false
|
|
|
+ taskService.getTaskDefInfo({
|
|
|
+ taskId: row.taskIdAudit2
|
|
|
+ }).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
|
|
|
+ isShow: false,
|
|
|
+ formReadOnly: true,
|
|
|
+ formTitle: `${data.taskName}`,
|
|
|
+ cUser: cUser,
|
|
|
+ title: `审批【${data.taskName || ''}】`,
|
|
|
+ routePath: '/jy/project/ProjectList' // 数据处理后需要跳转的页面路径
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 发起三级校审
|
|
|
+ thirdAuditPush (row) {
|
|
|
+ // 读取流程表单
|
|
|
+ let title = `发起流程【嘉溢-项目三级校审】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[嘉溢-项目三级校审]`
|
|
|
+ let status = 'startAndHold'
|
|
|
+ if (row.thirdInstanceStatus === '3') {
|
|
|
+ status = 'startAndClose'
|
|
|
+ } else if (row.thirdInstanceStatus === '4') {
|
|
|
+ status = 'reapplyFlag'
|
|
|
+ }
|
|
|
+ taskService.getTaskDef({ procDefId: this.processDefinitionId3,
|
|
|
+ businessId: row.auditId3,
|
|
|
+ businessTable: 'jy_project_audit'}).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
+ procDefId: this.processDefinitionId3,
|
|
|
+ procDefKey: this.procDefKey3,
|
|
|
+ title: title,
|
|
|
+ formType: data.formType,
|
|
|
+ formUrl: data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'jy_project_audit',
|
|
|
+ businessId: row.auditId3,
|
|
|
+ isShow: 'false',
|
|
|
+ status: status,
|
|
|
+ routePath: '/jy/project/ProjectList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查看三级校审审批流程结果
|
|
|
+ thirdAuditDetail (row) {
|
|
|
+ if (row.thirdInstanceStatus !== '0' && row.thirdInstanceStatus !== '1') {
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId3,
|
|
|
+ procDefId: this.processDefinitionId3
|
|
|
+ }).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '三级校审' + '流程详情',
|
|
|
+ formTitle: '三级校审' + '流程详情',
|
|
|
+ businessId: row.auditId3,
|
|
|
+ status: 'reback'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 撤回三级校审
|
|
|
+ thirdAuditReback (row) {
|
|
|
+ this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ await this.projectInfoService.findByIdAudit(row.auditId3).then((data) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ processService.revokeProcIns(row.procInsId3).then((data) => {
|
|
|
+ let form = {status: '3', id: row.auditId3}
|
|
|
+ this.projectInfoService.updateStatusByAuditId(form)
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 驳回后调整 三级校审
|
|
|
+ adjustThird (row) {
|
|
|
+ this.projectInfoService.findByIdAudit(row.auditId3).then((data) => {
|
|
|
+ if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.todoThird(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 审核 三级校审
|
|
|
+ examineThird (row) {
|
|
|
+ this.projectInfoService.findByIdAudit(row.auditId3).then((data) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.todoThird(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 审核或重新调整跳转 三级校审
|
|
|
+ todoThird (row) {
|
|
|
+ let cUser = false
|
|
|
+ taskService.getTaskDefInfo({
|
|
|
+ taskId: row.taskIdAudit3
|
|
|
+ }).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
|
|
|
+ isShow: false,
|
|
|
+ formReadOnly: true,
|
|
|
+ formTitle: `${data.taskName}`,
|
|
|
+ cUser: cUser,
|
|
|
+ title: `审批【${data.taskName || ''}】`,
|
|
|
+ routePath: '/jy/project/ProjectList' // 数据处理后需要跳转的页面路径
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ // 查询当前登录人是否是数据的审核人 三级校审
|
|
|
+ checkIsAuditThird (row) {
|
|
|
+ let loginUserId = this.$store.state.user.id // 获取当前登录用户id
|
|
|
+ if (this.commonJS.isNotEmpty(row.auditUserIds3)) {
|
|
|
+ for (const userId of row.auditUserIds3) {
|
|
|
+ if (userId === loginUserId) { // 当数据的审核人中包含当前登录人id时,返回true
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|