|
@@ -107,6 +107,21 @@
|
|
|
<vxe-column min-width="180"align="center" title="委托方" field="clientName"></vxe-column>
|
|
|
<vxe-column min-width="210"align="center" title="报告号" field="reportNo"></vxe-column>
|
|
|
<vxe-column min-width="120"align="center" title="创建日期" field="createDate"></vxe-column>
|
|
|
+ <vxe-column min-width="120"align="center" title="一级校审" field="status1">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="firstAuditDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status1, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status1, '-')}} </el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column min-width="120"align="center" title="二级校审" field="status2">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="secondAuditDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status2, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status2, '-')}} </el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column min-width="120"align="center" title="三级校审" field="status3">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="thirdAuditDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status3, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status3, '-')}} </el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
<vxe-column min-width="150px"align="center" title="状态" field="status" >
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" @click="registeredDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '-')}} </el-button>
|
|
@@ -124,6 +139,15 @@
|
|
|
<el-button v-if="hasPermission('program:registered:del')&&scope.row.status === '5' && isAdmin" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
|
|
|
<el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' && commonJS.isEmpty(scope.row.reportNo)" type="text" icon="el-icon-circle-check" size="small" @click="saveReportNo(scope.row.id)">生成报告号</el-button>
|
|
|
+
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' && commonJS.isNotEmpty(scope.row.reportNo)&&scope.row.status1 === '0'||scope.row.status1 === '1'||scope.row.status1 === '3'||scope.row.status1 === '4'" type="text" icon="el-icon-circle-check" size="small" @click="firstAuditPush(scope.row)">一级校审</el-button>
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status1 === '2' && commonJS.isNotEmpty(scope.row.reportNo)" type="text" icon="el-icon-circle-check" size="small" @click="firstAuditReback(scope.row)">校审撤回</el-button>
|
|
|
+
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status1 === '5'&&scope.row.status2 === '0'||scope.row.status2 === '1'||scope.row.status2 === '3'||scope.row.status2 === '4'" type="text" icon="el-icon-circle-check" size="small" @click="secondAuditPush(scope.row)">二级校审</el-button>
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status2 === '2'" type="text" icon="el-icon-circle-check" size="small" @click="secondAuditReback(scope.row)">校审撤回</el-button>
|
|
|
+
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status2 === '5' &&scope.row.status3 === '0'||scope.row.status3 === '1'||scope.row.status3 === '3'||scope.row.status3 === '4'" type="text" icon="el-icon-circle-check" size="small" @click="thirdAuditPush(scope.row)">三级校审</el-button>
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status3 === '2'" type="text" icon="el-icon-circle-check" size="small" @click="thirdAuditReback(scope.row)">校审撤回</el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
@@ -176,7 +200,13 @@
|
|
|
loading: false,
|
|
|
processDefinitionAuditId: '',
|
|
|
procDefAuditKey: '',
|
|
|
- isAdmin: false
|
|
|
+ isAdmin: false,
|
|
|
+ processDefinitionId1: '',
|
|
|
+ procDefKey1: '',
|
|
|
+ processDefinitionId2: '',
|
|
|
+ procDefKey2: '',
|
|
|
+ processDefinitionId3: '',
|
|
|
+ procDefKey3: ''
|
|
|
}
|
|
|
},
|
|
|
programProjectListInfoService: null,
|
|
@@ -207,7 +237,6 @@
|
|
|
},
|
|
|
user () {
|
|
|
this.create = JSON.parse(localStorage.getItem('user')).id
|
|
|
- console.log('createId', this.create)
|
|
|
return JSON.parse(localStorage.getItem('user'))
|
|
|
}
|
|
|
},
|
|
@@ -244,7 +273,24 @@
|
|
|
if (!this.commonJS.isEmpty(data.id)) {
|
|
|
this.processDefinitionAuditId = data.id
|
|
|
this.procDefAuditKey = data.key
|
|
|
- console.log(this.processDefinitionAuditId)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.processService.getByName('项目一级校审').then(({data}) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.processDefinitionId1 = data.id
|
|
|
+ this.procDefKey1 = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.processService.getByName('项目二级校审').then(({data}) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.processDefinitionId2 = data.id
|
|
|
+ this.procDefKey2 = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.processService.getByName('项目三级校审').then(({data}) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.processDefinitionId3 = data.id
|
|
|
+ this.procDefKey3 = data.key
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -342,43 +388,292 @@
|
|
|
},
|
|
|
// 查看项目登记审批流程结果
|
|
|
registeredDetail (row) {
|
|
|
- // eslint-disable-next-line eqeqeq
|
|
|
- this.taskService.getTaskDef({
|
|
|
- procInsId: row.procInsId,
|
|
|
- procDefId: this.processDefinitionAuditId
|
|
|
- }).then(({data}) => {
|
|
|
+ if (row.status !== '0' && row.status !== '1') {
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ this.taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId,
|
|
|
+ procDefId: this.processDefinitionAuditId
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '项目登记' + '流程详情',
|
|
|
+ formTitle: '项目登记' + '流程详情',
|
|
|
+ businessId: row.id,
|
|
|
+ status: 'reback',
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 撤回项目登记审批
|
|
|
+ registeredReback (row) {
|
|
|
+ this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ await this.programProjectListInfoService.queryById(row.id).then(({data}) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.err = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (this.err === true) {
|
|
|
+ this.err = ''
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.processService.revokeProcIns(row.procInsId).then(({data}) => {
|
|
|
+ let form = {status: '3', id: row.id}
|
|
|
+ this.programProjectListInfoService.updateStatusById(form)
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 发起一级校审
|
|
|
+ firstAuditPush (row) {
|
|
|
+ // 读取流程表单
|
|
|
+ let title = `发起流程【项目一级校审】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目一级校审]`
|
|
|
+ let status = 'startAndHold'
|
|
|
+ if (row.status1 === '3' || row.status1 === '4') {
|
|
|
+ status = 'startAndClose'
|
|
|
+ }
|
|
|
+ this.taskService.getTaskDef({ procDefId: this.processDefinitionId1,
|
|
|
+ businessId: row.auditId1,
|
|
|
+ businessTable: 'program_audit'}).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ procDefId: this.processDefinitionId1,
|
|
|
+ procDefKey: this.procDefKey1,
|
|
|
+ title: title,
|
|
|
+ formType: data.data.formType,
|
|
|
+ formUrl: data.data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'program_audit',
|
|
|
+ businessId: row.auditId1,
|
|
|
+ isShow: 'false',
|
|
|
+ status: status,
|
|
|
+ routePath: '/program/registered/ProjectList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查看一级校审审批流程结果
|
|
|
+ firstAuditDetail (row) {
|
|
|
+ if (row.status1 !== '0' && row.status1 !== '1') {
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ this.taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId1,
|
|
|
+ procDefId: this.processDefinitionId1
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '项目登记' + '流程详情',
|
|
|
+ formTitle: '项目登记' + '流程详情',
|
|
|
+ businessId: row.auditId1,
|
|
|
+ status: 'reback',
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 撤回一级校审
|
|
|
+ firstAuditReback (row) {
|
|
|
+ this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ await this.programProjectListInfoService.findByIdAudit(row.auditId1).then(({data}) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.err = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (this.err === true) {
|
|
|
+ this.err = ''
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.processService.revokeProcIns(row.procInsId1).then(({data}) => {
|
|
|
+ let form = {status: '3', id: row.auditId1}
|
|
|
+ this.programProjectListInfoService.updateStatusByAuditId(form)
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 发起二级校审
|
|
|
+ secondAuditPush (row) {
|
|
|
+ // 读取流程表单
|
|
|
+ let title = `发起流程【项目二级校审】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目二级校审]`
|
|
|
+ let status = 'startAndHold'
|
|
|
+ if (row.status2 === '3' || row.status2 === '4') {
|
|
|
+ status = 'startAndClose'
|
|
|
+ }
|
|
|
+ this.taskService.getTaskDef({ procDefId: this.processDefinitionId2,
|
|
|
+ businessId: row.auditId2,
|
|
|
+ businessTable: 'program_audit'}).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ procDefId: this.processDefinitionId2,
|
|
|
+ procDefKey: this.procDefKey2,
|
|
|
+ title: title,
|
|
|
+ formType: data.data.formType,
|
|
|
+ formUrl: data.data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'program_audit',
|
|
|
+ businessId: row.auditId2,
|
|
|
+ isShow: 'false',
|
|
|
+ status: status,
|
|
|
+ routePath: '/program/registered/ProjectList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查看二级校审审批流程结果
|
|
|
+ secondAuditDetail (row) {
|
|
|
+ if (row.status2 !== '0' && row.status2 !== '1') {
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ this.taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId2,
|
|
|
+ procDefId: this.processDefinitionId2
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '项目登记' + '流程详情',
|
|
|
+ formTitle: '项目登记' + '流程详情',
|
|
|
+ businessId: row.auditId2,
|
|
|
+ status: 'reback',
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 撤回二级校审
|
|
|
+ secondAuditReback (row) {
|
|
|
+ this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ await this.programProjectListInfoService.findByIdAudit(row.auditId2).then(({data}) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.err = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (this.err === true) {
|
|
|
+ this.err = ''
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.processService.revokeProcIns(row.procInsId2).then(({data}) => {
|
|
|
+ let form = {status: '3', id: row.auditId2}
|
|
|
+ this.programProjectListInfoService.updateStatusByAuditId(form)
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 发起三级校审
|
|
|
+ thirdAuditPush (row) {
|
|
|
+ // 读取流程表单
|
|
|
+ let title = `发起流程【项目三级校审】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目三级校审]`
|
|
|
+ let status = 'startAndHold'
|
|
|
+ if (row.status3 === '3' || row.status3 === '4') {
|
|
|
+ status = 'startAndClose'
|
|
|
+ }
|
|
|
+ this.taskService.getTaskDef({ procDefId: this.processDefinitionId3,
|
|
|
+ businessId: row.auditId3,
|
|
|
+ businessTable: 'program_audit'}).then((data) => {
|
|
|
this.$router.push({
|
|
|
- path: '/flowable/task/TaskFormDetail',
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
query: {
|
|
|
+ procDefId: this.processDefinitionId3,
|
|
|
+ procDefKey: this.procDefKey3,
|
|
|
+ title: title,
|
|
|
+ formType: data.data.formType,
|
|
|
+ formUrl: data.data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'program_audit',
|
|
|
+ businessId: row.auditId3,
|
|
|
isShow: 'false',
|
|
|
- readOnly: true,
|
|
|
- title: '项目登记' + '流程详情',
|
|
|
- formTitle: '项目登记' + '流程详情',
|
|
|
- businessId: row.id,
|
|
|
- status: 'reback',
|
|
|
- ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
|
|
|
+ status: status,
|
|
|
+ routePath: '/program/registered/ProjectList'
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- // 撤回项目登记审批
|
|
|
- registeredReback (row) {
|
|
|
+ // 查看三级校审审批流程结果
|
|
|
+ thirdAuditDetail (row) {
|
|
|
+ if (row.status3 !== '0' && row.status3 !== '1') {
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ this.taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId3,
|
|
|
+ procDefId: this.processDefinitionId3
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '项目登记' + '流程详情',
|
|
|
+ formTitle: '项目登记' + '流程详情',
|
|
|
+ businessId: row.auditId3,
|
|
|
+ status: 'reback',
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 撤回三级校审
|
|
|
+ thirdAuditReback (row) {
|
|
|
this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.processService.revokeProcIns(row.procInsId).then(({data}) => {
|
|
|
- let form = {status: '3', id: row.id}
|
|
|
- this.programProjectListInfoService.updateStatusById(form)
|
|
|
- this.$message.success(data)
|
|
|
- this.refreshList()
|
|
|
+ }).then(async () => {
|
|
|
+ await this.programProjectListInfoService.findByIdAudit(row.auditId3).then(({data}) => {
|
|
|
+ if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.err = true
|
|
|
+ }
|
|
|
})
|
|
|
+ if (this.err === true) {
|
|
|
+ this.err = ''
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.processService.revokeProcIns(row.procInsId3).then(({data}) => {
|
|
|
+ let form = {status: '3', id: row.auditId3}
|
|
|
+ this.programProjectListInfoService.updateStatusByAuditId(form)
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
is () {
|
|
|
this.userService.is().then(({data}) => {
|
|
|
- console.log('isAdmin', data)
|
|
|
this.isAdmin = data
|
|
|
})
|
|
|
},
|