|
@@ -91,12 +91,16 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column min-width="150px"align="center" fixed="right" title="签章状态" field="status1" >
|
|
|
+ <vxe-column min-width="150px"align="center" fixed="right" title="签章状态" >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" @click="detailS(scope.row)" effect="dark" size="mini"
|
|
|
+ <el-button v-if="scope.row.signatureType === '1'" type="text" @click="detailS(scope.row)" effect="dark" size="mini"
|
|
|
:type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status1, '-')">
|
|
|
{{$dictUtils.getDictLabel("cw_status", scope.row.status1, '-')}}
|
|
|
</el-button>
|
|
|
+ <el-button v-if="scope.row.signatureType === '2'" type="text" @click="detailS2(scope.row)" effect="dark" size="mini"
|
|
|
+ :type="$dictUtils.getDictLabel('cw_project_report_sign_status_flag', scope.row.status2, '-')">
|
|
|
+ {{$dictUtils.getDictLabel("cw_project_report_sign_status", scope.row.status2, '-')}}
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
|
|
@@ -107,8 +111,12 @@
|
|
|
<el-button v-if="hasPermission('cwProjectReport:edit')&&scope.row.createById === $store.state.user.id&&scope.row.status==='2'" type="text" icon="el-icon-edit" size="small" @click="reback(scope.row)">撤回</el-button>
|
|
|
<el-button v-if="hasPermission('cwProjectReport:del')&&scope.row.createById === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4')" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
<el-button v-else-if="hasPermission('cwProjectReport:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
+<!-- 公章流程-->
|
|
|
<el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '1' && (scope.row.status1 === '0' || scope.row.status1 === '3' || scope.row.status1 === '4')" type="text" size="small" @click="pushS(scope.row)">公章</el-button>
|
|
|
- <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '1' && scope.row.status1 === '2'" type="text" size="small" @click="rebackS(scope.row)">撤回</el-button>
|
|
|
+ <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '1' && scope.row.status1 === '2'" type="text" size="small" @click="rebackS(scope.row)">撤回签章申请</el-button>
|
|
|
+<!-- 公章+执业章流程-->
|
|
|
+ <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '2' && (scope.row.status2 === '0' || scope.row.status2 === '3' || scope.row.status2 === '4')" type="text" size="small" @click="pushS2(scope.row)">公章+执业章</el-button>
|
|
|
+ <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '2' && (scope.row.status2 === '2' || scope.row.status2 === '6' || scope.row.status2 === '7')" type="text" size="small" @click="rebackS2(scope.row)">撤回签章申请</el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
@@ -161,7 +169,9 @@
|
|
|
isAdmin: false,
|
|
|
create: '',
|
|
|
processDefinitionSId: '',
|
|
|
- procDefSKey: ''
|
|
|
+ procDefSKey: '',
|
|
|
+ processDefinitionSId2: '',
|
|
|
+ procDefSKey2: ''
|
|
|
}
|
|
|
},
|
|
|
workClientService: null,
|
|
@@ -261,6 +271,12 @@
|
|
|
this.procDefSKey = data.key
|
|
|
}
|
|
|
})
|
|
|
+ this.processService.getByName('财务-报告签章-公章+执业章').then(({data}) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.processDefinitionSId2 = data.id
|
|
|
+ this.procDefSKey2 = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 当前页
|
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
@@ -523,6 +539,81 @@
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+ },
|
|
|
+ // 发起报告签章-公章+执业章流程
|
|
|
+ pushS2 (row) {
|
|
|
+ // 读取流程表单
|
|
|
+ let title = `发起流程【报告签章-公章+执业章】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[报告签章-公章+执业章]`
|
|
|
+ let status = 'startAndClose'
|
|
|
+ if (row.status2 === '3' || row.status2 === '4') {
|
|
|
+ status = 'startAndClose'
|
|
|
+ }
|
|
|
+ this.taskService.getTaskDef({ procDefId: this.processDefinitionSId2,
|
|
|
+ businessId: row.sid2,
|
|
|
+ businessTable: 'cw_project_report_signature'}).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ procDefId: this.processDefinitionSId2,
|
|
|
+ procDefKey: this.procDefSKey2,
|
|
|
+ title: title,
|
|
|
+ formType: data.data.formType,
|
|
|
+ formUrl: data.data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'cw_project_report_signature',
|
|
|
+ businessId: row.sid2,
|
|
|
+ isShow: 'false',
|
|
|
+ status: status,
|
|
|
+ routePath: '/cw/reportManagement/ReportManagementList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查看报告签章-公章+执业章流程结果
|
|
|
+ detailS2 (row) {
|
|
|
+ if (row.status2 !== '0' && row.status2 !== '1') {
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ this.taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId2,
|
|
|
+ procDefId: this.processDefinitionSId2
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '报告签章-公章+执业章' + '流程详情',
|
|
|
+ formTitle: '报告签章-公章+执业章' + '流程详情',
|
|
|
+ businessId: row.sid2,
|
|
|
+ status: 'reback',
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 撤回报告签章-公章+执业章的申请流程
|
|
|
+ rebackS2 (row) {
|
|
|
+ this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ await this.projectReportService.findBySignatureId(row.sid2).then(({data}) => {
|
|
|
+ if (data.status !== row.status2) { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
+ this.refreshList()
|
|
|
+ } else {
|
|
|
+ this.processService.revokeProcIns(row.procInsId2).then(({data}) => {
|
|
|
+ let form = {status: '3', id: row.sid2}
|
|
|
+ this.projectReportService.updateSignatureStatusById(form)
|
|
|
+ this.$message.success(data)
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|