Browse Source

工单

master
蔡玲玲 2 weeks ago
parent
commit
26f53ab96b
  1. 28
      base-vue/src/views/modules/tickets/detail.vue

28
base-vue/src/views/modules/tickets/detail.vue

@ -2,7 +2,7 @@
<div class="mod-config"> <div class="mod-config">
<el-descriptions title="工单详情" direction="vertical" :column="column" size="mini" border> <el-descriptions title="工单详情" direction="vertical" :column="column" size="mini" border>
<template slot="extra"> <template slot="extra">
<el-button type="primary" size="small">审批</el-button> <el-button type="primary" size="small" @click="doOperate">审批</el-button>
</template> </template>
<el-descriptions-item label="工单ID"> <el-descriptions-item label="工单ID">
<el-tag size="small">{{ ticketsData.ticketsId }}</el-tag> <el-tag size="small">{{ ticketsData.ticketsId }}</el-tag>
@ -81,6 +81,32 @@
currentChangeHandle (val) { currentChangeHandle (val) {
this.pageIndex = val this.pageIndex = val
this.getDataList() this.getDataList()
},
doOperate () {
this.$confirm(`确定进行审批操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/flw/instance/completeFlow'),
method: 'post',
data: this.$http.adornData({ticketsId: this.ticketsData.ticketsId, processInstance: this.ticketsData.processInstance})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.$router.push('/tickets-tickets')
}
})
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {})
} }
} }
} }

Loading…
Cancel
Save