|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
<el-tabs type="border-card" v-model="taskSelectedTab">
|
|
|
<el-tab-pane label="表单信息" name="form-first">
|
|
|
- <component id="printForm" :status="status" :formReadOnly="formReadOnly" v-if="formType === '2'" :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId" :is="form"></component>
|
|
|
+ <component id="printForm" :status="status" :formReadOnly="formReadOnly" v-if="formType === '2'" :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId" :is="form" @disableButton="disableButton"></component>
|
|
|
|
|
|
<PreviewForm id="printForm" v-if="formType !== '2'" :processDefinitionId="procDefId" :edit="true" :taskFormData="taskFormData" ref="form"/>
|
|
|
</el-tab-pane>
|
|
@@ -164,11 +164,9 @@
|
|
|
if (this.status === 'start') { // 送审
|
|
|
this.buttons = [{code: '_flow_start', name: '启动', isHide: '0'}]
|
|
|
} else if (this.status === 'startAndClose') { // 送审、关闭
|
|
|
- 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'}]
|
|
|
- }
|
|
|
+ this.buttons = [{code: '_flow_start', name: '送审', isHide: '0'}, {code: '_flow_close', name: '关闭', isHide: '0'}]
|
|
|
+ } else if (this.status === 'reapplyFlag') { // 重新申请、流程终止、关闭
|
|
|
+ this.buttons = [{code: '_flow_reapply', name: '重新申请', isHide: '0'}, {code: '_flow_stop', 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') { // 送审、关闭
|
|
@@ -365,6 +363,90 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 重新申请
|
|
|
+ reapply (vars) {
|
|
|
+ vars = {...vars, agree: true}
|
|
|
+ if (this.formType === '2') { // 外置表单
|
|
|
+ let param = {
|
|
|
+ num: this.$route.query.num,
|
|
|
+ taskId: this.taskId,
|
|
|
+ taskDefKey: this.taskDefKey,
|
|
|
+ procInsId: this.procInsId,
|
|
|
+ procDefId: this.procDefId,
|
|
|
+ vars: vars,
|
|
|
+ comment: this.auditForm,
|
|
|
+ assignee: this.auditForm.assignee,
|
|
|
+ cope: {
|
|
|
+ userIds: this.auditForm.userIds,
|
|
|
+ procDefId: this.procDefId,
|
|
|
+ procInsId: '',
|
|
|
+ procDefName: '',
|
|
|
+ procInsName: this.title,
|
|
|
+ taskName: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$refs.form.reapplyForm((businessTable, businessId, inputForm) => {
|
|
|
+ vars = {...vars, ...inputForm}
|
|
|
+ this.taskService.audit({
|
|
|
+ taskId: this.taskId,
|
|
|
+ taskDefKey: this.taskDefKey,
|
|
|
+ procInsId: this.procInsId,
|
|
|
+ procDefId: this.procDefId,
|
|
|
+ vars: vars,
|
|
|
+ comment: this.auditForm,
|
|
|
+ assignee: this.auditForm.assignee
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.$message.success('提交成功')
|
|
|
+ this.changeBusiness()
|
|
|
+ this.$refs.form.close()
|
|
|
+ // 我的通知
|
|
|
+ let createDate = ''
|
|
|
+ this.myNotice(data, this.procDefId, this.title, vars.userName, createDate)
|
|
|
+ this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
|
|
|
+ // this.$router.push('/flowable/task/TodoList')
|
|
|
+ // this.cc(data)
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }, param)
|
|
|
+ } else { // 动态表单
|
|
|
+ this.$refs.form.submitTaskFormData(vars, this.procInsId, this.taskId, this.auditForm.assignee, this.auditForm, (data) => {
|
|
|
+ this.changeBusiness()
|
|
|
+ this.$refs.form.close()
|
|
|
+ this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
|
|
|
+ // this.$router.push('/flowable/task/TodoList')
|
|
|
+ // this.cc(data)
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 驳回
|
|
|
reject (vars) {
|
|
|
this.$confirm(`确定驳回流程吗?`, '提示', {
|
|
@@ -512,28 +594,27 @@
|
|
|
cancelButtonText: '取消',
|
|
|
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)
|
|
|
- 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)
|
|
|
+ // 将数据状态更改为暂存状态
|
|
|
+ this.$refs.form.updateStatusById('hold', () => {
|
|
|
+ // this.auditForm.candidateUserList = inputForm.assignee
|
|
|
+ this.processService.stop(this.procInsId, this.auditForm.message).then(({data}) => {
|
|
|
+ this.$message.success(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)
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -698,7 +779,7 @@
|
|
|
this.print()
|
|
|
break
|
|
|
case '_flow_reapply':// 重新申请
|
|
|
- this.agree()
|
|
|
+ this.reapply()
|
|
|
break
|
|
|
case '_flow_close':// 关闭
|
|
|
this.close()
|