|
@@ -181,7 +181,7 @@
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</vxe-column>
|
|
</vxe-column>
|
|
- <vxe-column title="操作" width="70px" fixed="right" align="center">
|
|
|
|
|
|
+ <vxe-column title="操作" width="100px" fixed="right" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button v-if="hasPermission('cwProjectReportArchive:edit')&&(scope.row.createBy.id === $store.state.user.id||haveProjectIds.includes(scope.row.projectId))&&(scope.row.status==='0'||scope.row.status==='1'||scope.row.status==='3')" type="text" size="small" @click="push(scope.row)">归档</el-button>
|
|
<el-button v-if="hasPermission('cwProjectReportArchive:edit')&&(scope.row.createBy.id === $store.state.user.id||haveProjectIds.includes(scope.row.projectId))&&(scope.row.status==='0'||scope.row.status==='1'||scope.row.status==='3')" type="text" size="small" @click="push(scope.row)">归档</el-button>
|
|
<el-button v-else-if="hasPermission('cwProjectReportArchive:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5')" type="text" size="small" @click="edit(scope.row.id)">修改</el-button>
|
|
<el-button v-else-if="hasPermission('cwProjectReportArchive:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5')" type="text" size="small" @click="edit(scope.row.id)">修改</el-button>
|
|
@@ -223,6 +223,7 @@
|
|
import UserSelect from '@/components/userSelect'
|
|
import UserSelect from '@/components/userSelect'
|
|
import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
|
|
import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
|
|
import XEUtils from 'xe-utils'
|
|
import XEUtils from 'xe-utils'
|
|
|
|
+ import OfficeService from '@/api/sys/OfficeService'
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -256,6 +257,8 @@
|
|
loading: false,
|
|
loading: false,
|
|
processDefinitionAuditId: '',
|
|
processDefinitionAuditId: '',
|
|
procDefAuditKey: '',
|
|
procDefAuditKey: '',
|
|
|
|
+ processDefinitionAuditIdSZ: '',
|
|
|
|
+ procDefAuditKeySZ: '',
|
|
isAdmin: false,
|
|
isAdmin: false,
|
|
haveProjectIds: '',
|
|
haveProjectIds: '',
|
|
typeDictList: [
|
|
typeDictList: [
|
|
@@ -298,12 +301,14 @@
|
|
processService: null,
|
|
processService: null,
|
|
userService: null,
|
|
userService: null,
|
|
projectRecordsService: null,
|
|
projectRecordsService: null,
|
|
|
|
+ officeService: null,
|
|
created () {
|
|
created () {
|
|
this.projectRecordsService = new ProjectRecordsService()
|
|
this.projectRecordsService = new ProjectRecordsService()
|
|
this.projectReportArchiveService = new ProjectReportArchiveService()
|
|
this.projectReportArchiveService = new ProjectReportArchiveService()
|
|
this.taskService = new TaskService()
|
|
this.taskService = new TaskService()
|
|
this.processService = new ProcessService()
|
|
this.processService = new ProcessService()
|
|
this.userService = new UserService()
|
|
this.userService = new UserService()
|
|
|
|
+ this.officeService = new OfficeService()
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
ProjectRecordsForm,
|
|
ProjectRecordsForm,
|
|
@@ -383,6 +388,12 @@
|
|
this.procDefAuditKey = data.key
|
|
this.procDefAuditKey = data.key
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ this.processService.getByName('会计-项目报告归档-苏州分部').then(({data}) => {
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ this.processDefinitionAuditIdSZ = data.id
|
|
|
|
+ this.procDefAuditKeySZ = data.key
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 当前页
|
|
// 当前页
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
@@ -423,7 +434,7 @@
|
|
start () {
|
|
start () {
|
|
// 读取流程表单
|
|
// 读取流程表单
|
|
let tabTitle = `发起流程【会计-项目报告归档】`
|
|
let tabTitle = `发起流程【会计-项目报告归档】`
|
|
- let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [会计-项目报告归档]`
|
|
|
|
|
|
+ let processTitle = `${this.$store.state.user.name} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [会计-项目报告归档]`
|
|
this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
|
|
this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
|
|
status: 'startAndHold'}).then((data) => {
|
|
status: 'startAndHold'}).then((data) => {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
@@ -448,7 +459,7 @@
|
|
push (row) {
|
|
push (row) {
|
|
// 读取流程表单
|
|
// 读取流程表单
|
|
let title = `发起流程【会计-项目报告归档】`
|
|
let title = `发起流程【会计-项目报告归档】`
|
|
- let processTitle = `${this.userName} 发起了 ${row.reportNo} - ${row.projectName} [会计-项目报告归档]`
|
|
|
|
|
|
+ let processTitle = `${this.$store.state.user.name} 发起了 ${row.reportNo} - ${row.projectName} [会计-项目报告归档]`
|
|
let status = 'startAndHold'
|
|
let status = 'startAndHold'
|
|
if (row.status === '3' || row.status === '4') {
|
|
if (row.status === '3' || row.status === '4') {
|
|
status = 'startAndClose'
|
|
status = 'startAndClose'
|
|
@@ -478,26 +489,39 @@
|
|
// 查看项目归档流程结果
|
|
// 查看项目归档流程结果
|
|
detail (row) {
|
|
detail (row) {
|
|
if (row.status !== '0' && row.status !== '1') {
|
|
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: {
|
|
|
|
- ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
|
- isShow: 'false',
|
|
|
|
- readOnly: true,
|
|
|
|
- title: '会计-项目报告归档' + '流程详情',
|
|
|
|
- formTitle: '会计-项目报告归档' + '流程详情',
|
|
|
|
- businessId: row.id,
|
|
|
|
- status: 'reback'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ let procInsId = row.procInsId
|
|
|
|
+ let procDefId = this.processDefinitionAuditId
|
|
|
|
+ this.officeService.queryById(this.$store.state.user.office.id).then((byId) => {
|
|
|
|
+ // 判断当前人的所属部门是否为苏州分部,根据部门的机构编码(szfb)来判断是不是苏州分部
|
|
|
|
+ if (byId.data.code === 'szfb') {
|
|
|
|
+ procDefId = this.processDefinitionAuditIdSZ
|
|
|
|
+ this.getTaskDef(row, procInsId, procDefId)
|
|
|
|
+ } else {
|
|
|
|
+ this.getTaskDef(row, procInsId, procDefId)
|
|
|
|
+ }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ getTaskDef (row, procInsId, procDefId) {
|
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
|
+ this.taskService.getTaskDef({
|
|
|
|
+ procInsId: procInsId,
|
|
|
|
+ procDefId: procDefId
|
|
|
|
+ }).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.id,
|
|
|
|
+ status: 'reback'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 撤回项目归档
|
|
// 撤回项目归档
|
|
reback (row) {
|
|
reback (row) {
|
|
this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
this.$confirm(`确定要撤回该申请吗?`, '提示', {
|