Commit 767df67c by qinjianhui

fix:优化

parent 4a8a30c8
import axios from './axios' import axios from './axios'
export function getOrderTree() { export function getOrderTree() {
return axios.get('platform/platformWorkOrder/findStateGroupList') return axios.get('platform/platformWorkOrder/saas/findStateGroupList')
} }
export function workConfirmed(id) { export function workConfirmed(id) {
...@@ -29,6 +29,12 @@ export function archiveWorkOrder(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) { export function replyTocustomer(id, msg) {
return axios.post('platform/platformWorkOrderChat/add', { return axios.post('platform/platformWorkOrderChat/add', {
msg: msg, msg: msg,
......
...@@ -376,6 +376,7 @@ import { ...@@ -376,6 +376,7 @@ import {
workAssigned, workAssigned,
startWorder, startWorder,
archiveWorkOrder, archiveWorkOrder,
completeWorkOrder,
replyTocustomer, replyTocustomer,
getOrderType, getOrderType,
} from '@/common/api/order' } from '@/common/api/order'
...@@ -385,6 +386,7 @@ import { mapState } from 'vuex' ...@@ -385,6 +386,7 @@ import { mapState } from 'vuex'
import assignWork from '@/assets/work/assign.png' import assignWork from '@/assets/work/assign.png'
import startWork from '@/assets/work/start.png' import startWork from '@/assets/work/start.png'
import archiveWork from '@/assets/work/archive.png' import archiveWork from '@/assets/work/archive.png'
import completeWork from '@/assets/work/complete.png'
export default { export default {
name: 'task_center', name: 'task_center',
...@@ -463,6 +465,7 @@ export default { ...@@ -463,6 +465,7 @@ export default {
), ),
}, },
{ label: '工单编号', key: 'orderNo', width: 110 }, { label: '工单编号', key: 'orderNo', width: 110 },
{ label: '工单模块', key: 'moduleName', width: 110, align: 'left' },
{ {
label: '工单类型', label: '工单类型',
key: 'orderTypeTxt', key: 'orderTypeTxt',
...@@ -483,12 +486,17 @@ export default { ...@@ -483,12 +486,17 @@ export default {
key: 'fromBusiness', key: 'fromBusiness',
width: 80, width: 80,
}, },
{
label: '描述',
key: 'evaluations',
},
{ {
label: '创建时间', label: '创建时间',
key: 'createTime', key: 'createTime',
width: 130, width: 130,
}, },
{ label: '期望完成时间', key: 'expectCompleteTime', width: 130 },
{ label: '完成时间', key: 'completeTime', width: 130 },
{ {
label: '操作', label: '操作',
fixed: 'right', fixed: 'right',
...@@ -540,6 +548,11 @@ export default { ...@@ -540,6 +548,11 @@ export default {
/> />
</span> </span>
)} )}
{item.orderStatus === 'IN_PROGRESS' && (
<span title="完成" class="icon-view">
<img width="24" height="24" src={completeWork} onClick={() => this.complete(item)}/>
</span>
)}
</span> </span>
), ),
}, },
...@@ -643,6 +656,7 @@ export default { ...@@ -643,6 +656,7 @@ export default {
this.currentRowId = item.id this.currentRowId = item.id
this.taskLeader = '' this.taskLeader = ''
this.assignVisible = true this.assignVisible = true
this.user = ''
}, },
// 开始工单 // 开始工单
async startWorkOrder(item) { async startWorkOrder(item) {
...@@ -727,6 +741,26 @@ export default { ...@@ -727,6 +741,26 @@ export default {
console.error(e) 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() { async reply() {
if (!this.textarea) { if (!this.textarea) {
return this.$message.warning('请输入内容') 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