import request from '@/utils/request'

// 查询派工单列表
export function listWork(query) {
  return request({
    url: '/work/work/list',
    method: 'get',
    params: query
  })
}

// 查询派工单详细
export function getWork(id) {
  return request({
    url: '/work/work/' + id,
    method: 'get'
  })
}

// 新增派工单
export function addWork(data) {
  return request({
    url: '/work/work',
    method: 'post',
    data: data
  })
}

// 修改派工单
export function updateWork(data) {
  return request({
    url: '/work/work',
    method: 'put',
    data: data
  })
}

// 删除派工单
export function delWork(id) {
  return request({
    url: '/work/work/' + id,
    method: 'delete'
  })
}
