|
|
@ -7,7 +7,11 @@ |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<!--start 添加修改按钮--> |
|
|
|
<div> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|
|
|
<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 type="info">关 闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!--标题按钮部分结束--> |
|
|
@ -71,6 +75,18 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div v-show="transactState=='00'"> |
|
|
|
<!-- <div class="diaTitle"><i class="el-icon-chat-line-square"></i><span>审批意见</span></div>--> |
|
|
|
<el-form :model="dialogList" :inline="true" label-width="80px"> |
|
|
|
<el-row> |
|
|
|
<el-col> |
|
|
|
<el-form-item label="审批意见"> |
|
|
|
<el-input v-model="dialogList.comment" type="textarea" maxlength="20" placeholder="请输入审批意见" class="inputType" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<div class="tableStyle"> |
|
|
|
<div style="margin-left: 5px;font-weight: bold">车辆列表</div> |
|
|
|
</div> |
|
|
@ -130,10 +146,79 @@ export default { |
|
|
|
vehicleOrderSid: '', |
|
|
|
vehicleList: [] |
|
|
|
}, |
|
|
|
dialogList: { |
|
|
|
comment: '' |
|
|
|
}, |
|
|
|
transactState: '', // 办理状态 |
|
|
|
// 同意办理列表 |
|
|
|
agreeList: { |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
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') |
|
|
|
}, |
|
|
|
rules: {}, |
|
|
|
submitdisabled: false |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
console.log('url:' + window.location.href) |
|
|
|
var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置 |
|
|
|
var b = window.location.href.indexOf('#data') // 第一个#data出现的位置 |
|
|
|
const info = window.location.href.slice(a, b) |
|
|
|
var sid = info.substr(info.indexOf('=') + 1) |
|
|
|
this.showInfo(sid) |
|
|
|
// ===获取参数 |
|
|
|
var one = window.location.href.lastIndexOf('#') + 1 |
|
|
|
var two = window.location.href.lastIndexOf('}') + 1 |
|
|
|
const data = decodeURI(window.location.href.slice(one, two)) // url解码unescape()已从web中移除,尽量不使用 |
|
|
|
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.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 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
showInfo(sid, row) { |
|
|
|
this.$nextTick(() => { |
|
|
@ -167,15 +252,151 @@ export default { |
|
|
|
this.formobj = row |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 返回(===既判断又赋值) |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
|
this.formobj.departureDate = '' |
|
|
|
this.formobj.remarks = '' // 备注 |
|
|
|
this.formobj.vehicleList = [] |
|
|
|
this.$refs['form_obj'].resetFields() |
|
|
|
this.$emit('doback') |
|
|
|
// 同意 |
|
|
|
openAgree() { |
|
|
|
this.$confirm('是否确认执行同意操作', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.handleAgree() |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消同意' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 驳回 |
|
|
|
openReject() { |
|
|
|
this.$confirm('是否确认执行驳回操作', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.handleReject() |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消驳回' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 终止 |
|
|
|
openStop() { |
|
|
|
this.$confirm('是否确认执行终止操作', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.handleStop() |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消终止' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 确认撤回任务 */ |
|
|
|
openRevoke() { |
|
|
|
this.$confirm('是否确认执行撤回操作', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.handleRevoke() |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消撤回' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 同意任务 */ |
|
|
|
handleAgree() { |
|
|
|
this.agreeList.comment = this.dialogList.comment |
|
|
|
req.businessAgree(this.agreeList).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.refreshIt() |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行失败', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 终止任务 */ |
|
|
|
handleStop() { |
|
|
|
this.stopList.comment = this.dialogList.comment |
|
|
|
req.breakTask(this.stopList).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行失败', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 驳回任务 */ |
|
|
|
handleReject() { |
|
|
|
this.regectList.comment = this.dialogList.comment |
|
|
|
req.rejectTask(this.regectList).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行失败', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 撤回任务 */ |
|
|
|
handleRevoke() { |
|
|
|
this.revokeList.comment = this.dialogList.comment |
|
|
|
req.revokeTask(this.revokeList).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行失败', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
@ -215,5 +436,8 @@ export default { |
|
|
|
.el-form-item-right { |
|
|
|
text-align: right; |
|
|
|
} |
|
|
|
.inputType { |
|
|
|
width: 600px; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|