|
@@ -164,7 +164,11 @@
|
|
|
if (this.status === 'start') { // 送审
|
|
|
this.buttons = [{code: '_flow_start', name: '启动', isHide: '0'}]
|
|
|
} else if (this.status === 'startAndClose') { // 送审、关闭
|
|
|
- this.buttons = [{code: '_flow_start', name: '送审', isHide: '0'}, {code: '_flow_close', name: '关闭', isHide: '0'}]
|
|
|
+ if (this.statusFlag === '4') {
|
|
|
+ this.buttons = [{code: '_flow_reapply', name: '重新申请', isHide: '0'}, {code: '_flow_stop', name: '流程终止', isHide: '0'}, {code: '_flow_close', name: '关闭', isHide: '0'}]
|
|
|
+ } else {
|
|
|
+ this.buttons = [{code: '_flow_start', name: '送审', isHide: '0'}, {code: '_flow_close', name: '关闭', isHide: '0'}]
|
|
|
+ }
|
|
|
} else if (this.status === 'startAndHold') { // 送审、暂存、关闭
|
|
|
this.buttons = [{code: '_flow_start', name: '送审', isHide: '0'}, {code: '_flow_save', name: '暂存', isHide: '0'}, {code: '_flow_close', name: '关闭', isHide: '0'}]
|
|
|
} else if (this.status === 'startAndCloseFiled') { // 送审、关闭
|
|
@@ -250,6 +254,7 @@
|
|
|
this.auditForm.message = ''
|
|
|
this.cUser = this.commonJS.isEmpty(this.$route.query.cUser) ? false : this.$route.query.cUser
|
|
|
this.contractTitle = this.$route.query.contractTitle
|
|
|
+ this.statusFlag = this.$route.query.statusFlag
|
|
|
if (this.commonJS.isEmpty(this.$route.query.isShow)) {
|
|
|
this.isShow = 'true'
|
|
|
} else {
|
|
@@ -346,21 +351,22 @@
|
|
|
},
|
|
|
// 同意
|
|
|
async agree (vars) {
|
|
|
+ vars = {...vars, agree: true}
|
|
|
if (this.formType === '2' && this.formUrl !== '/sys/workContract/WorkContractFileForm') {
|
|
|
this.commit(vars) // 同意
|
|
|
- this.$refs.form.updateStatusById('agree')
|
|
|
+ // this.$refs.form.updateStatusById('agree')
|
|
|
}
|
|
|
if (this.formType === '2' && this.formUrl === '/sys/workContract/WorkContractFileForm') {
|
|
|
this.$refs.form.filedNoIsEmpty((item) => {
|
|
|
if (item !== 'false') {
|
|
|
this.commit(vars) // 同意
|
|
|
- this.$refs.form.updateStatusById('agree')
|
|
|
+ // this.$refs.form.updateStatusById('agree')
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
// 驳回
|
|
|
- reject () {
|
|
|
+ reject (vars) {
|
|
|
this.$confirm(`确定驳回流程吗?`, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
@@ -368,27 +374,31 @@
|
|
|
}).then(async () => {
|
|
|
if (this.formType === '2') {
|
|
|
if (this.cUser === true || this.cUser === 'true') { // cUser为true则页面审核人为自定义多选,驳回时要将审核人重新定义一次
|
|
|
- await this.$refs.form.updateStatusById('reject', (businessTable, businessId, inputForm) => {
|
|
|
+ await setTimeout(() => {
|
|
|
+ vars = {...vars, agree: false}
|
|
|
+ this.commit(vars) // 驳回
|
|
|
+ // this.taskService.backNodes(this.taskId).then(({data}) => {
|
|
|
+ // let backNodes = data
|
|
|
+ // if (backNodes.length > 0) {
|
|
|
+ // let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
|
|
|
+ // this.back(backTaskDefKey)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ }, 100)
|
|
|
+ this.$refs.form.updateStatusById('reject', (businessTable, businessId, inputForm) => {
|
|
|
this.auditForm.candidateUserList = inputForm.assignee
|
|
|
})
|
|
|
- setTimeout(() => {
|
|
|
- this.taskService.backNodes(this.taskId).then(({data}) => {
|
|
|
- let backNodes = data
|
|
|
- if (backNodes.length > 0) {
|
|
|
- let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
|
|
|
- this.back(backTaskDefKey)
|
|
|
- }
|
|
|
- })
|
|
|
- }, 100)
|
|
|
} else {
|
|
|
- await this.$refs.form.updateStatusById('reject')
|
|
|
- this.taskService.backNodes(this.taskId).then(({data}) => {
|
|
|
- let backNodes = data
|
|
|
- if (backNodes.length > 0) {
|
|
|
- let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
|
|
|
- this.back(backTaskDefKey)
|
|
|
- }
|
|
|
- })
|
|
|
+ vars = {...vars, agree: false}
|
|
|
+ await this.commit(vars) // 驳回
|
|
|
+ this.$refs.form.updateStatusById('reject')
|
|
|
+ // this.taskService.backNodes(this.taskId).then(({data}) => {
|
|
|
+ // let backNodes = data
|
|
|
+ // if (backNodes.length > 0) {
|
|
|
+ // let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
|
|
|
+ // this.back(backTaskDefKey)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -503,8 +513,27 @@
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
this.processService.stop(this.procInsId, this.auditForm.message).then(({data}) => {
|
|
|
+ // 将数据状态更改为暂存状态
|
|
|
+ this.$refs.form.updateStatusById('hold', (businessTable, businessId, inputForm) => {
|
|
|
+ this.auditForm.candidateUserList = inputForm.assignee
|
|
|
+ })
|
|
|
+
|
|
|
this.$message.success(data)
|
|
|
- this.$router.push('/flowable/task/TodoList')
|
|
|
+ if (this.$route.query.routePath) {
|
|
|
+ this.$router.push(this.$route.query.routePath)
|
|
|
+ } else {
|
|
|
+ var num = this.$route.query.num
|
|
|
+ if (num === '2') {
|
|
|
+ this.$router.push('/sys/dashboard/workBench/Pending')
|
|
|
+ this.cc(data)
|
|
|
+ } else if (num === '3') {
|
|
|
+ this.$router.push('/sys/dashboard/workBench/PendingList')
|
|
|
+ this.cc(data)
|
|
|
+ } else {
|
|
|
+ this.$router.push('/flowable/task/TodoList')
|
|
|
+ this.cc(data)
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -516,12 +545,22 @@
|
|
|
close () {
|
|
|
this.changeBusiness()
|
|
|
this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
|
|
|
- this.$router.push(this.$route.query.routePath)
|
|
|
+ if (this.$route.query.routePath) {
|
|
|
+ this.$router.push(this.$route.query.routePath)
|
|
|
+ } else {
|
|
|
+ var num = this.$route.query.num
|
|
|
+ if (num === '2') {
|
|
|
+ this.$router.push('/sys/dashboard/workBench/Pending')
|
|
|
+ } else if (num === '3') {
|
|
|
+ this.$router.push('/sys/dashboard/workBench/PendingList')
|
|
|
+ } else {
|
|
|
+ this.$router.push('/flowable/task/TodoList')
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$refs.form.close()
|
|
|
},
|
|
|
// 自定义按钮提交
|
|
|
commit (vars) {
|
|
|
- var num = this.$route.query.num
|
|
|
if (this.formType === '2') { // 外置表单
|
|
|
let param = {
|
|
|
num: this.$route.query.num,
|
|
@@ -561,15 +600,20 @@
|
|
|
this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
|
|
|
// this.$router.push('/flowable/task/TodoList')
|
|
|
// this.cc(data)
|
|
|
- if (num === '2') {
|
|
|
- this.$router.push('/sys/dashboard/workBench/Pending')
|
|
|
- this.cc(data)
|
|
|
- } else if (num === '3') {
|
|
|
- this.$router.push('/sys/dashboard/workBench/PendingList')
|
|
|
- this.cc(data)
|
|
|
+ if (this.$route.query.routePath) {
|
|
|
+ this.$router.push(this.$route.query.routePath)
|
|
|
} else {
|
|
|
- this.$router.push('/flowable/task/TodoList')
|
|
|
- this.cc(data)
|
|
|
+ var num = this.$route.query.num
|
|
|
+ if (num === '2') {
|
|
|
+ this.$router.push('/sys/dashboard/workBench/Pending')
|
|
|
+ this.cc(data)
|
|
|
+ } else if (num === '3') {
|
|
|
+ this.$router.push('/sys/dashboard/workBench/PendingList')
|
|
|
+ this.cc(data)
|
|
|
+ } else {
|
|
|
+ this.$router.push('/flowable/task/TodoList')
|
|
|
+ this.cc(data)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}, param)
|
|
@@ -580,15 +624,20 @@
|
|
|
this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
|
|
|
// this.$router.push('/flowable/task/TodoList')
|
|
|
// this.cc(data)
|
|
|
- if (num === '2') {
|
|
|
- this.$router.push('/sys/dashboard/workBench/Pending')
|
|
|
- this.cc(data)
|
|
|
- } else if (num === '3') {
|
|
|
- this.$router.push('/sys/dashboard/workBench/PendingList')
|
|
|
- this.cc(data)
|
|
|
+ if (this.$route.query.routePath) {
|
|
|
+ this.$router.push(this.$route.query.routePath)
|
|
|
} else {
|
|
|
- this.$router.push('/flowable/task/TodoList')
|
|
|
- this.cc(data)
|
|
|
+ var num = this.$route.query.num
|
|
|
+ if (num === '2') {
|
|
|
+ this.$router.push('/sys/dashboard/workBench/Pending')
|
|
|
+ this.cc(data)
|
|
|
+ } else if (num === '3') {
|
|
|
+ this.$router.push('/sys/dashboard/workBench/PendingList')
|
|
|
+ this.cc(data)
|
|
|
+ } else {
|
|
|
+ this.$router.push('/flowable/task/TodoList')
|
|
|
+ this.cc(data)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -621,10 +670,10 @@
|
|
|
this.agree()
|
|
|
break
|
|
|
case '_flow_reject': // 驳回
|
|
|
- if (this.title.includes('报销申请')) {
|
|
|
- this.rejectToPointNum(0)
|
|
|
- break
|
|
|
- }
|
|
|
+ // if (this.title.includes('报销申请')) {
|
|
|
+ // this.rejectToPointNum(0)
|
|
|
+ // break
|
|
|
+ // }
|
|
|
this.reject()
|
|
|
break
|
|
|
case '_flow_back': // 驳回到任意步骤
|
|
@@ -648,6 +697,9 @@
|
|
|
case '_flow_print':// 打印
|
|
|
this.print()
|
|
|
break
|
|
|
+ case '_flow_reapply':// 重新申请
|
|
|
+ this.agree()
|
|
|
+ break
|
|
|
case '_flow_close':// 关闭
|
|
|
this.close()
|
|
|
break
|
|
@@ -666,7 +718,8 @@
|
|
|
taskName: '',
|
|
|
createUser: '',
|
|
|
createTime: '',
|
|
|
- noticeName: ''
|
|
|
+ noticeName: '',
|
|
|
+ noticeId: ''
|
|
|
}
|
|
|
this.taskService.historicTaskList(taskId).then(({data}) => {
|
|
|
if (data[data.length - 1].comment.status === '结束') {
|
|
@@ -685,6 +738,8 @@
|
|
|
this.inputForm.createTime = data[0].histIns.endTime
|
|
|
// 通知人
|
|
|
this.inputForm.noticeName = data[0].assigneeName
|
|
|
+ // 通知人Id
|
|
|
+ this.inputForm.noticeId = data[0].assigneeId
|
|
|
this.noticeService.addInfo(this.inputForm)
|
|
|
}
|
|
|
})
|