|
@@ -185,7 +185,9 @@
|
|
type: '',
|
|
type: '',
|
|
filedType: '',
|
|
filedType: '',
|
|
contractAmounts: [],
|
|
contractAmounts: [],
|
|
- createBy: ''
|
|
|
|
|
|
+ createBy: '',
|
|
|
|
+ procInsId: '',
|
|
|
|
+ processDefinitionId: ''
|
|
},
|
|
},
|
|
dataList: [],
|
|
dataList: [],
|
|
tablePage: {
|
|
tablePage: {
|
|
@@ -238,6 +240,7 @@
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
this.processService.getByName('合同登记新建').then(({data}) => {
|
|
this.processService.getByName('合同登记新建').then(({data}) => {
|
|
|
|
+ console.log(data)
|
|
if (!this.commonJS.isEmpty(data.id)) {
|
|
if (!this.commonJS.isEmpty(data.id)) {
|
|
this.processDefinitionId = data.id
|
|
this.processDefinitionId = data.id
|
|
this.procDefKey = data.key
|
|
this.procDefKey = data.key
|
|
@@ -274,7 +277,12 @@
|
|
}).then(({data}) => {
|
|
}).then(({data}) => {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/flowable/task/TaskFormDetail',
|
|
path: '/flowable/task/TaskFormDetail',
|
|
- query: {readOnly: true, title: row.name + '流程详情', formTitle: row.name + '流程详情', ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')}
|
|
|
|
|
|
+ query: {
|
|
|
|
+ readOnly: true,
|
|
|
|
+ title: row.name + '流程详情',
|
|
|
|
+ formTitle: row.name + '流程详情',
|
|
|
|
+ businessId: row.id,
|
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -285,7 +293,11 @@
|
|
// return item.id
|
|
// return item.id
|
|
// })[0]
|
|
// })[0]
|
|
// this.$refs.workContractForm2.init('edit', id)
|
|
// this.$refs.workContractForm2.init('edit', id)
|
|
- this.start1(row)
|
|
|
|
|
|
+ if (row.status === '3' || row.status === '4') {
|
|
|
|
+ this.start2(row)
|
|
|
|
+ } else {
|
|
|
|
+ this.start1(row)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 查看
|
|
// 查看
|
|
view (id) {
|
|
view (id) {
|
|
@@ -333,7 +345,8 @@
|
|
formType: data.data.formType,
|
|
formType: data.data.formType,
|
|
formUrl: data.data.formUrl,
|
|
formUrl: data.data.formUrl,
|
|
formTitle: processTitle,
|
|
formTitle: processTitle,
|
|
- businessId: 'false'
|
|
|
|
|
|
+ businessId: 'false',
|
|
|
|
+ isShow: false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -357,36 +370,76 @@
|
|
formUrl: data.data.formUrl,
|
|
formUrl: data.data.formUrl,
|
|
formTitle: processTitle,
|
|
formTitle: processTitle,
|
|
businessTable: 'work_contract_info',
|
|
businessTable: 'work_contract_info',
|
|
- businessId: row.id
|
|
|
|
|
|
+ businessId: row.id,
|
|
|
|
+ isShow: false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- reback (row) {
|
|
|
|
|
|
+ start2 (row) {
|
|
// 读取流程表单
|
|
// 读取流程表单
|
|
let tabTitle = `发起流程【合同登记新建】`
|
|
let tabTitle = `发起流程【合同登记新建】`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
|
|
this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
businessId: row.id,
|
|
businessId: row.id,
|
|
businessTable: 'work_contract_info',
|
|
businessTable: 'work_contract_info',
|
|
|
|
+ status: 'startAndClose'
|
|
|
|
+ }).then((data) => {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
|
+ query: {
|
|
|
|
+ procDefId: this.processDefinitionId,
|
|
|
|
+ procDefKey: this.procDefKey,
|
|
|
|
+ status: 'startAndClose',
|
|
|
|
+ title: tabTitle,
|
|
|
|
+ formType: data.data.formType,
|
|
|
|
+ formUrl: data.data.formUrl,
|
|
|
|
+ formTitle: processTitle,
|
|
|
|
+ businessTable: 'work_contract_info',
|
|
|
|
+ businessId: row.id,
|
|
|
|
+ isShow: false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ reback (row) {
|
|
|
|
+ this.$confirm(`确定撤回流程吗?`, '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
taskId: row.procInsId,
|
|
taskId: row.procInsId,
|
|
- status: 'startAndHold'}).then((data) => {
|
|
|
|
- this.$router.push({
|
|
|
|
- path: '/flowable/task/TaskForm',
|
|
|
|
- query: {
|
|
|
|
- procDefId: this.processDefinitionId,
|
|
|
|
- procDefKey: this.procDefKey,
|
|
|
|
- status: 'reback',
|
|
|
|
- title: tabTitle,
|
|
|
|
- formType: data.data.formType,
|
|
|
|
- formUrl: data.data.formUrl,
|
|
|
|
- formTitle: processTitle,
|
|
|
|
- businessTable: 'work_contract_info',
|
|
|
|
- businessId: row.id,
|
|
|
|
- taskId: row.procInsId
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ console.log(row)
|
|
|
|
+ this.taskService.backNodes(row.procInsId).then(({data}) => {
|
|
|
|
+ let backNodes = data
|
|
|
|
+ if (backNodes.length > 0) {
|
|
|
|
+ let backTaskDefKey = backNodes[0].taskDefKey
|
|
|
|
+ this.taskService.back({
|
|
|
|
+ taskId: row.procInsId,
|
|
|
|
+ backTaskDefKey: backTaskDefKey,
|
|
|
|
+ isShow: false,
|
|
|
|
+ ...this.auditForm
|
|
|
|
+ }).then(({data}) => {
|
|
|
|
+ this.updateStatusById(row, 'reback')
|
|
|
|
+ this.$message.success('回退成功')
|
|
|
|
+ })
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ updateStatusById (row, type) {
|
|
|
|
+ if (type === 'agree') {
|
|
|
|
+ row.status = '5'
|
|
|
|
+ this.workContractService.updateStatusById(row)
|
|
|
|
+ }
|
|
|
|
+ if (type === 'reject') {
|
|
|
|
+ row.status = '4'
|
|
|
|
+ this.workContractService.updateStatusById(row)
|
|
|
|
+ }
|
|
|
|
+ if (type === 'reback') {
|
|
|
|
+ row.status = '3'
|
|
|
|
+ this.workContractService.updateStatusById(row)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|