Commit 767df67c by qinjianhui

fix:优化

parent 4a8a30c8
import axios from './axios'
export function getOrderTree() {
return axios.get('platform/platformWorkOrder/findStateGroupList')
return axios.get('platform/platformWorkOrder/saas/findStateGroupList')
}
export function workConfirmed(id) {
......@@ -29,6 +29,12 @@ export function archiveWorkOrder(id) {
})
}
export function completeWorkOrder(id) {
return axios.post('platform/platformWorkOrder/complete', {
id: id,
})
}
export function replyTocustomer(id, msg) {
return axios.post('platform/platformWorkOrderChat/add', {
msg: msg,
......
......@@ -376,6 +376,7 @@ import {
workAssigned,
startWorder,
archiveWorkOrder,
completeWorkOrder,
replyTocustomer,
getOrderType,
} from '@/common/api/order'
......@@ -385,6 +386,7 @@ import { mapState } from 'vuex'
import assignWork from '@/assets/work/assign.png'
import startWork from '@/assets/work/start.png'
import archiveWork from '@/assets/work/archive.png'
import completeWork from '@/assets/work/complete.png'
export default {
name: 'task_center',
......@@ -463,6 +465,7 @@ export default {
),
},
{ label: '工单编号', key: 'orderNo', width: 110 },
{ label: '工单模块', key: 'moduleName', width: 110, align: 'left' },
{
label: '工单类型',
key: 'orderTypeTxt',
......@@ -483,12 +486,17 @@ export default {
key: 'fromBusiness',
width: 80,
},
{
label: '描述',
key: 'evaluations',
},
{
label: '创建时间',
key: 'createTime',
width: 130,
},
{ label: '期望完成时间', key: 'expectCompleteTime', width: 130 },
{ label: '完成时间', key: 'completeTime', width: 130 },
{
label: '操作',
fixed: 'right',
......@@ -540,6 +548,11 @@ export default {
/>
</span>
)}
{item.orderStatus === 'IN_PROGRESS' && (
<span title="完成" class="icon-view">
<img width="24" height="24" src={completeWork} onClick={() => this.complete(item)}/>
</span>
)}
</span>
),
},
......@@ -643,6 +656,7 @@ export default {
this.currentRowId = item.id
this.taskLeader = ''
this.assignVisible = true
this.user = ''
},
// 开始工单
async startWorkOrder(item) {
......@@ -727,6 +741,26 @@ export default {
console.error(e)
}
},
async complete(item) {
try {
await this.$confirm('确定完成吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
try {
const res = await completeWorkOrder(item.id)
if (res.code === 200) {
this.getlist()
this.getOrderTree()
}
} catch (e) {
console.error(e)
}
},
async reply() {
if (!this.textarea) {
return this.$message.warning('请输入内容')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment