|
|
@ -4,9 +4,9 @@ |
|
|
|
<div class="tab-header webtop"> |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<div> |
|
|
|
<!-- <el-button type="primary" @click="openAgree('同意')">同 意</el-button>--> |
|
|
|
<!-- <el-button type="danger" @click="openReject('驳回')">驳 回</el-button>--> |
|
|
|
<!-- <el-button type="danger" @click="openStop('终止')">终 止</el-button>--> |
|
|
|
<el-button type="primary" @click="openAgree('同意')">同 意</el-button> |
|
|
|
<el-button type="danger" @click="openReject('驳回')">驳 回</el-button> |
|
|
|
<el-button type="danger" @click="openStop('终止')">终 止</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class=""> |
|
|
@ -146,7 +146,7 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div style="text-align:center;margin-top: 20px;"> |
|
|
|
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|
|
|
<el-button type="primary" size="mini" @click="confirm">确 定</el-button> |
|
|
|
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
@ -156,9 +156,14 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getCarTransfer } from '@/api/supplychain/cunfangdidianbiangeng' |
|
|
|
import req from '@/api/flow/cunfangdidianbiangeng' |
|
|
|
import flow from '@/views/baseoutsourcingapplication/workflow/flow' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'cunfangdidianbiangeng', |
|
|
|
name: 'cunfangdidianbiangengHandle', |
|
|
|
components:{ |
|
|
|
flow |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
viewTitle: '', |
|
|
@ -197,7 +202,7 @@ export default { |
|
|
|
taskId: '', |
|
|
|
orgSidPath: '', |
|
|
|
taskDefKey: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
userSid:'' |
|
|
|
}, |
|
|
|
// 驳回列表 |
|
|
|
regectList: { |
|
|
@ -205,7 +210,7 @@ export default { |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
userSid: '' |
|
|
|
}, |
|
|
|
// 终止列表 |
|
|
|
stopList: { |
|
|
@ -213,10 +218,20 @@ export default { |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
userSid: '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
window.parent.postMessage({ |
|
|
|
cmd: 'returnHeight', |
|
|
|
params: { |
|
|
|
// 告诉父级页面,子页面的弹框高度。 |
|
|
|
code: 2, |
|
|
|
data: document.body.scrollHeight + 'px' |
|
|
|
} |
|
|
|
}, '*') |
|
|
|
}, |
|
|
|
created() { |
|
|
|
console.log('url:' + window.location.href) |
|
|
|
var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置 |
|
|
@ -236,6 +251,7 @@ export default { |
|
|
|
this.agreeList.instanceId = obj.instanceId |
|
|
|
this.agreeList.taskId = obj.taskId |
|
|
|
this.agreeList.taskDefKey = obj.taskDefKey |
|
|
|
this.agreeList.userSid = obj.userSid |
|
|
|
this.agreeList.orgSidPath = window.sessionStorage.getItem('orgSidPath') |
|
|
|
this.current.taskDefKey = obj.taskDefKey |
|
|
|
this.current.taskName = obj.taskName |
|
|
@ -243,37 +259,29 @@ export default { |
|
|
|
this.regectList.businessSid = sid |
|
|
|
this.regectList.instanceId = obj.instanceId |
|
|
|
this.regectList.taskId = obj.taskId |
|
|
|
this.regectList.userSid = obj.userSid |
|
|
|
// 终止列表 |
|
|
|
this.stopList.businessSid = sid |
|
|
|
this.stopList.instanceId = obj.instanceId |
|
|
|
this.stopList.taskId = obj.taskId |
|
|
|
this.stopList.userSid = obj.userSid |
|
|
|
// 办理状态 |
|
|
|
this.transactState = obj.transactState |
|
|
|
// 加载流程图相关的数据 |
|
|
|
this.getModelDetail(obj.deployId) |
|
|
|
this.getFlowViewer(obj.instanceId) |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
window.parent.postMessage({ |
|
|
|
cmd: 'returnHeight', |
|
|
|
params: { |
|
|
|
// 告诉父级页面,子页面的弹框高度。 |
|
|
|
code: 2, |
|
|
|
data: document.body.scrollHeight + 'px' |
|
|
|
} |
|
|
|
}, '*') |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleReturn() { |
|
|
|
this.temp = {} |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
|
showInfo(row) { |
|
|
|
showInfo(sid) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['dataForm'].clearValidate() |
|
|
|
}) |
|
|
|
this.viewTitle = '存放地点变更申请详情' |
|
|
|
getCarTransfer(row.sid).then((resp) => { |
|
|
|
getCarTransfer(sid).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
const data = resp.data |
|
|
|
this.temp = data |
|
|
@ -286,6 +294,156 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// ---------- 流程开始 ------------------------------ |
|
|
|
/** xml 文件 */ |
|
|
|
getModelDetail(deployId) { |
|
|
|
// 发送请求,获取xml |
|
|
|
req.readXml(deployId).then((res) => { |
|
|
|
this.xmlData = res.data |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 已办环节的节点 |
|
|
|
getFlowViewer(procInsId) { |
|
|
|
req.getFlowViewer(procInsId).then((res) => { |
|
|
|
this.taskList = res.data |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 同意 |
|
|
|
openAgree(val) { |
|
|
|
this.operation = val |
|
|
|
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
var arr = resp.data |
|
|
|
this.nextNode = arr[0] |
|
|
|
this.nodeDialogVisible = true |
|
|
|
} |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 驳回 |
|
|
|
openReject(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 |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 终止 |
|
|
|
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 |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 选择代办人确认 */ |
|
|
|
confirm() { |
|
|
|
if (this.operation === '同意') { |
|
|
|
this.handleAgree() |
|
|
|
} else if (this.operation === '驳回') { |
|
|
|
this.handleReject() |
|
|
|
} else if (this.operation === '终止') { |
|
|
|
this.handleStop() |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 同意任务 */ |
|
|
|
handleAgree() { |
|
|
|
this.agreeList.comment = this.dialogList.comment |
|
|
|
req.agreeTask(this.agreeList).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: '提示', |
|
|
|
message: '执行失败', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 驳回任务 */ |
|
|
|
handleReject() { |
|
|
|
this.regectList.comment = this.dialogList.comment |
|
|
|
req.rejectTask(this.regectList).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: '提示', |
|
|
|
message: '执行失败', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 终止任务 */ |
|
|
|
handleStop() { |
|
|
|
this.stopList.comment = this.dialogList.comment |
|
|
|
req.breakTask(this.stopList).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: '提示', |
|
|
|
message: '执行失败', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
open(val) { |
|
|
|
this.dialogVisible = true |
|
|
|
this.dialogUrl = val |
|
|
@ -344,4 +502,7 @@ export default { |
|
|
|
font-size: 14px; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
.title{ |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
</style> |
|
|
|