|
@@ -132,7 +132,12 @@
|
|
|
<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>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column title="操作" min-width="230px" fixed="right" align="center">
|
|
|
+ <vxe-column min-width="150px"align="center" title="签发单状态" field="status" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="issuedDetail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.issuedStatus, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.issuedStatus, '-')}} </el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column title="操作" min-width="1000px" fixed="right" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '1'" type="text" icon="el-icon-delete" size="small" @click="registeredPush(scope.row)">送审</el-button>
|
|
|
<el-button v-if="hasPermission('program:registered:edit')&&(scope.row.status === '1' || scope.row.status === '3'||scope.row.status === '4')" type="text" icon="el-icon-delete" size="small" @click="registeredPush(scope.row)">修改</el-button>
|
|
@@ -149,6 +154,10 @@
|
|
|
<el-button v-if="hasPermission('program:registered:proo')" type="text" icon="el-icon-delete" size="small" @click="proofread(scope.row.id)">校对</el-button>
|
|
|
<!--评估报告装订后的审核-->
|
|
|
<el-button v-if="hasPermission('program:registered:browse')" type="text" icon="el-icon-delete" size="small" @click="browse(scope.row.id)">浏览审核</el-button>
|
|
|
+ <!--报告签发-->
|
|
|
+ <el-button v-if="hasPermission('program:registered:browse') && scope.row.issuedStatus !== '2' && scope.row.issuedStatus !== '5'" type="text" icon="el-icon-delete" size="small" @click="issued(scope.row)">签发</el-button>
|
|
|
+ <!--报告签发撤回-->
|
|
|
+ <el-button v-if="hasPermission('program:registered:browse') && scope.row.issuedStatus === '2'" type="text" icon="el-icon-delete" size="small" @click="issuedReback(scope.row)">签发撤回</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>
|
|
@@ -161,6 +170,19 @@
|
|
|
|
|
|
<el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' &&scope.row.archiveStatus === '0'||scope.row.archiveStatus === '1'||scope.row.archiveStatus === '3'||scope.row.archiveStatus === '4'" type="text" icon="el-icon-circle-check" size="small" @click="archivePush(scope.row)">项目归档</el-button>
|
|
|
<el-button v-if="hasPermission('program:registered:edit')&&scope.row.archiveStatus === '2'" type="text" icon="el-icon-circle-check" size="small" @click="archiveReback(scope.row)">校审撤回</el-button>
|
|
|
+
|
|
|
+ <!--一级校审ftl文件下载-->
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')" type="text" icon="el-icon-circle-check" size="small" @click="downloadFirstAuditTpl(scope.row)">一级校审下载</el-button>
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')" type="text" icon="el-icon-circle-check" size="small" @click="downloadSecondAuditTpl(scope.row)">二级校审下载</el-button>
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')" type="text" icon="el-icon-circle-check" size="small" @click="downloadThirdlyAuditTpl(scope.row)">三级校审下载</el-button>
|
|
|
+
|
|
|
+ <!--自校功能ftl文件下载-->
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')" type="text" icon="el-icon-circle-check" size="small" @click="downloadProofreadAuditTpl(scope.row)">校对审核</el-button>
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')" type="text" icon="el-icon-circle-check" size="small" @click="downloadAuditRecordFormAfterBindingTpl(scope.row)">评估报告装订后</el-button>
|
|
|
+
|
|
|
+ <!--报告签发单-->
|
|
|
+ <el-button v-if="hasPermission('program:registered:edit')" type="text" icon="el-icon-circle-check" size="small" @click="downloadReportAusstellungTpl(scope.row)">报告签发单</el-button>
|
|
|
+
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
@@ -194,6 +216,7 @@
|
|
|
import TaskService from '@/api/flowable/TaskService'
|
|
|
import ProcessService from '@/api/flowable/ProcessService'
|
|
|
import UserService from '@/api/sys/UserService'
|
|
|
+ import ProofreadIssuedService from '@/api/sys/ProofreadIssuedService'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -225,18 +248,22 @@
|
|
|
processDefinitionId3: '',
|
|
|
procDefKey3: '',
|
|
|
processDefinitionIdArchive: '',
|
|
|
- procDefKeyArchive: ''
|
|
|
+ procDefKeyArchive: '',
|
|
|
+ processDefinitionId4: '',
|
|
|
+ procDefKey4: ''
|
|
|
}
|
|
|
},
|
|
|
programProjectListInfoService: null,
|
|
|
taskService: null,
|
|
|
processService: null,
|
|
|
userService: null,
|
|
|
+ proofreadIssuedService: null,
|
|
|
created () {
|
|
|
this.programProjectListInfoService = new ProgramProjectListInfoService()
|
|
|
this.taskService = new TaskService()
|
|
|
this.processService = new ProcessService()
|
|
|
this.userService = new UserService()
|
|
|
+ this.proofreadIssuedService = new ProofreadIssuedService()
|
|
|
},
|
|
|
components: {
|
|
|
ProjectForm,
|
|
@@ -320,6 +347,12 @@
|
|
|
this.procDefKeyArchive = data.key
|
|
|
}
|
|
|
})
|
|
|
+ this.processService.getByName('报告签发审批').then(({data}) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.processDefinitionId4 = data.id
|
|
|
+ this.procDefKey4 = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 当前页
|
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
@@ -778,6 +811,96 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 下载一级校审
|
|
|
+ downloadFirstAuditTpl (row) {
|
|
|
+ // this.$utils.downloadExcel('/sys/project/import/template')
|
|
|
+ this.loading = true
|
|
|
+ this.programProjectListInfoService.downloadFirstAuditTpl(row.id, row.auditId1).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadWord(res.data, '一级校审')
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 下载二级校审
|
|
|
+ downloadSecondAuditTpl (row) {
|
|
|
+ // this.$utils.downloadExcel('/sys/project/import/template')
|
|
|
+ this.loading = true
|
|
|
+ this.programProjectListInfoService.downloadSecondAuditTpl(row.id, row.auditId2).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadWord(res.data, '二级校审')
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 下载三级校审
|
|
|
+ downloadThirdlyAuditTpl (row) {
|
|
|
+ // this.$utils.downloadExcel('/sys/project/import/template')
|
|
|
+ this.loading = true
|
|
|
+ this.programProjectListInfoService.downloadThirdlyAuditTpl(row.id, row.auditId3).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadWord(res.data, '三级校审')
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 下载资产评估项目(校对)审核记录表
|
|
|
+ downloadProofreadAuditTpl (row) {
|
|
|
+ // this.$utils.downloadExcel('/sys/project/import/template')
|
|
|
+ this.loading = true
|
|
|
+ this.programProjectListInfoService.downloadProofreadAuditTpl(row.id).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadExcel(res.data, '资产评估项目(校对)审核记录表.xls')
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 下载评估报告装订后浏览审核记录表
|
|
|
+ downloadAuditRecordFormAfterBindingTpl (row) {
|
|
|
+ // this.$utils.downloadExcel('/sys/project/import/template')
|
|
|
+ this.loading = true
|
|
|
+ this.programProjectListInfoService.downloadAuditRecordFormAfterBindingTpl(row.id).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadExcel(res.data, '评估报告装订后浏览审核记录表.xls')
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 下载报告签发单
|
|
|
+ downloadReportAusstellungTpl (row) {
|
|
|
+ // this.$utils.downloadExcel('/sys/project/import/template')
|
|
|
+ this.loading = true
|
|
|
+ this.programProjectListInfoService.downloadReportAusstellungTpl(row.id).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadWord(res.data, '报告签发单')
|
|
|
+ this.loading = false
|
|
|
+ }).catch(function (err) {
|
|
|
+ this.loading = false
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
is () {
|
|
|
this.userService.is().then(({data}) => {
|
|
|
this.isAdmin = data
|
|
@@ -817,6 +940,85 @@
|
|
|
// 浏览审核
|
|
|
browse (id) {
|
|
|
this.$refs.proofreadBrowseForm.init(id)
|
|
|
+ },
|
|
|
+ // 签发
|
|
|
+ issued (row) {
|
|
|
+ // 读取流程表单
|
|
|
+ let title = `发起流程【报告签发审批】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[报告签发审批]`
|
|
|
+ let status = 'startAndHold'
|
|
|
+ if (row.issuedStatus === '3' || row.issuedStatus === '4' || row.issuedStatus === '2') {
|
|
|
+ status = 'startAndClose'
|
|
|
+ }
|
|
|
+ this.taskService.getTaskDef({ procDefId: this.processDefinitionId4,
|
|
|
+ businessId: row.id,
|
|
|
+ businessTable: 'proofread_issued'}).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ procDefId: this.processDefinitionId4,
|
|
|
+ procDefKey: this.procDefKey4,
|
|
|
+ title: title,
|
|
|
+ formType: data.data.formType,
|
|
|
+ formUrl: data.data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'proofread_issued',
|
|
|
+ businessId: row.id,
|
|
|
+ isShow: 'false',
|
|
|
+ status: status,
|
|
|
+ routePath: '/program/registered/ProjectList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 签发单详情
|
|
|
+ issuedDetail (row) {
|
|
|
+ if (row.issuedStatus !== '0' && row.issuedStatus !== '1') {
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ this.taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId4,
|
|
|
+ procDefId: this.processDefinitionId4
|
|
|
+ }).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')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 签发撤回
|
|
|
+ issuedReback (row) {
|
|
|
+ this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ await this.proofreadIssuedService.findById(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.procInsId4).then(({data}) => {
|
|
|
+ let form = {status: '3', id: row.id}
|
|
|
+ this.proofreadIssuedService.updateStatus(form)
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|