|
|
@ -10,7 +10,7 @@ |
|
|
|
<el-button v-show="transactState=='00'" type="primary" @click="openAgree('同意')">同 意</el-button> |
|
|
|
<el-button v-show="transactState=='00'" type="danger" @click="openReject('驳回')">驳 回</el-button> |
|
|
|
<el-button v-show="transactState=='00'" type="danger" @click="openStop('终止')">终 止</el-button> |
|
|
|
<el-button v-show="transactState=='01'" type="danger" @click="openRevoke('撤回')">撤 回 </el-button> |
|
|
|
<el-button v-show="transactState=='01' && current.taskName !== '排产申请'" type="danger" @click="openRevoke()">撤 回 </el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!--标题按钮部分结束--> |
|
|
@ -186,7 +186,6 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/supplychain/busvehicleapply' |
|
|
|
import { businessAgree, rejectTask, breakTask, revokeTask } from '@/api/flow/todo' |
|
|
|
import flow from '../../../baseoutsourcingapplication/workflow/flow' |
|
|
|
export default { |
|
|
|
name: 'cheliangpaichandetails', |
|
|
@ -227,39 +226,15 @@ export default { |
|
|
|
busVehicleApplyDetailDtoList: [] |
|
|
|
}, |
|
|
|
transactState: '', // 办理状态 |
|
|
|
// 同意办理列表 |
|
|
|
agreeList: { |
|
|
|
// 环节所需参数 |
|
|
|
linkByParameter: { |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
orgSidPath: '', |
|
|
|
taskDefKey: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
}, |
|
|
|
// 驳回列表 |
|
|
|
regectList: { |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
}, |
|
|
|
// 终止列表 |
|
|
|
stopList: { |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
}, |
|
|
|
// 撤回 |
|
|
|
revokeList: { |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
userSid: '' |
|
|
|
}, |
|
|
|
rules: {} |
|
|
|
} |
|
|
@ -278,26 +253,15 @@ export default { |
|
|
|
var tar = data.substr(data.indexOf('=') + 1) |
|
|
|
const obj = JSON.parse(tar) |
|
|
|
console.log('iframe页面获取的obj:', obj) |
|
|
|
// 同意列表 |
|
|
|
this.agreeList.businessSid = sid |
|
|
|
this.agreeList.instanceId = obj.instanceId |
|
|
|
this.agreeList.taskId = obj.taskId |
|
|
|
this.agreeList.taskDefKey = obj.taskDefKey |
|
|
|
this.agreeList.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
|
|
|
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
|
|
|
this.linkByParameter.businessSid = sid |
|
|
|
this.linkByParameter.instanceId = obj.instanceId |
|
|
|
this.linkByParameter.taskId = obj.taskId |
|
|
|
this.linkByParameter.taskDefKey = obj.taskDefKey |
|
|
|
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
|
|
|
this.linkByParameter.userSid = obj.userSid |
|
|
|
this.current.taskDefKey = obj.taskDefKey |
|
|
|
this.current.taskName = obj.taskName |
|
|
|
// 驳回列表 |
|
|
|
this.regectList.businessSid = sid |
|
|
|
this.regectList.instanceId = obj.instanceId |
|
|
|
this.regectList.taskId = obj.taskId |
|
|
|
// 终止列表 |
|
|
|
this.stopList.businessSid = sid |
|
|
|
this.stopList.instanceId = obj.instanceId |
|
|
|
this.stopList.taskId = obj.taskId |
|
|
|
// 撤回列表 |
|
|
|
this.revokeList.businessSid = sid |
|
|
|
this.revokeList.instanceId = obj.instanceId |
|
|
|
this.revokeList.taskId = obj.taskId |
|
|
|
// 办理状态 |
|
|
|
this.transactState = obj.transactState |
|
|
|
// 加载流程图相关的数据 |
|
|
@ -344,8 +308,8 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 已办环节的节点 |
|
|
|
getFlowViewer(procInsId){ |
|
|
|
req.getFlowViewer(procInsId).then((res) =>{ |
|
|
|
getFlowViewer(procInsId) { |
|
|
|
req.getFlowViewer(procInsId).then((res) => { |
|
|
|
this.taskList = res.data |
|
|
|
}) |
|
|
|
}, |
|
|
@ -374,18 +338,15 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 终止 |
|
|
|
openStop() { |
|
|
|
this.$confirm('是否确认执行终止操作', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.handleStop() |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消终止' |
|
|
|
}) |
|
|
|
openStop(val) { |
|
|
|
this.operation = val |
|
|
|
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
var arr = resp.data |
|
|
|
this.nextNode = arr[0] |
|
|
|
this.nodeDialogVisible = true |
|
|
|
} |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 确认撤回任务 */ |
|
|
@ -395,13 +356,13 @@ export default { |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.handleRevoke() |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消撤回' |
|
|
|
this.handleRevoke() |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消撤回' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
reject() { |
|
|
|
if (this.operation === '同意') { |
|
|
@ -409,13 +370,13 @@ export default { |
|
|
|
} else if (this.operation === '驳回') { |
|
|
|
this.handleReject() |
|
|
|
} else if (this.operation === '终止') { |
|
|
|
} else if (this.operation === '撤回') { |
|
|
|
this.handleStop() |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 同意任务 */ |
|
|
|
handleAgree() { |
|
|
|
this.agreeList.comment = this.dialogList.comment |
|
|
|
req.complete(this.agreeList).then((response) => { |
|
|
|
this.linkByParameter.comment = this.dialogList.comment |
|
|
|
req.complete(this.linkByParameter).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
@ -444,8 +405,8 @@ export default { |
|
|
|
}, |
|
|
|
/** 驳回任务 */ |
|
|
|
handleReject() { |
|
|
|
this.regectList.comment = this.dialogList.comment |
|
|
|
req.reject(this.regectList).then((response) => { |
|
|
|
this.linkByParameter.comment = this.dialogList.comment |
|
|
|
req.reject(this.linkByParameter).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
@ -474,15 +435,25 @@ export default { |
|
|
|
}, |
|
|
|
/** 终止任务 */ |
|
|
|
handleStop() { |
|
|
|
this.stopList.comment = this.dialogList.comment |
|
|
|
breakTask(this.stopList).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.linkByParameter.comment = this.dialogList.comment |
|
|
|
console.log(this.stopList, 99999) |
|
|
|
req.breakProcess(this.linkByParameter).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.nodeDialogVisible = false |
|
|
|
// 子页面向父级页面传递值 |
|
|
|
window.parent.postMessage({ |
|
|
|
cmd: 'returnHeight', |
|
|
|
params: { |
|
|
|
// 操作成功,告诉父级页面关闭弹框 |
|
|
|
code: 1 |
|
|
|
} |
|
|
|
}, '*') |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
@ -495,15 +466,24 @@ export default { |
|
|
|
}, |
|
|
|
/** 撤回任务 */ |
|
|
|
handleRevoke() { |
|
|
|
this.revokeList.comment = this.dialogList.comment |
|
|
|
revokeTask(this.revokeList).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.linkByParameter.comment = this.dialogList.comment |
|
|
|
req.revokeProcess(this.linkByParameter).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.nodeDialogVisible = false |
|
|
|
// 子页面向父级页面传递值 |
|
|
|
window.parent.postMessage({ |
|
|
|
cmd: 'returnHeight', |
|
|
|
params: { |
|
|
|
// 操作成功,告诉父级页面关闭弹框 |
|
|
|
code: 1 |
|
|
|
} |
|
|
|
}, '*') |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|