// 工单模块
import request from '@/utils/request'

// 工单列表-- 全部
export const getWorkOrderList = (params) => request.basic.get('/api/v1/orders', params)

// 异常工单列表
export const getAbnormalWorkOrderList = (params) => request.basic.get('/api/v1/orders/errors_order', params)

// 我下的工单
export const getMyWorkOrderList = (params) => request.basic.get('/api/v1/orders/my_order', params)

// 回访记录
export const getBackRecordList = (params) => request.basic.get('/api/v1/orders/back_order', params)

// 工单回访列表
export const getBackWorkOrderList = (params) => request.basic.get(`/api/v1/orders/noback_order`, params)


// 工单详情
export const getWorkOrderDetail = (id) => request.basic.get(`/api/v1/orders/${id}`)

// 派单
export const sendWorkOrder = (id, params) => request.basic.put(`/api/v1/orders${id}`, params)

