import request from '@/utils/request'

// 查询换电工单列表
export function listOrder(query) {
  return request({
    url: '/system/adminOrder/list',
    method: 'get',
    params: query
  })
}

// 查询换电工单详细
export function getOrder(id) {
  return request({
    url: '/system/adminOrder/' + id,
    method: 'get'
  })
}

// 新增换电工单
export function addOrder(data) {
  return request({
    url: '/system/adminOrder',
    method: 'post',
    data: data
  })
}

// 修改换电工单
export function updateOrder(data) {
  return request({
    url: '/system/adminOrder',
    method: 'put',
    data: data
  })
}

// 删除换电工单
export function delOrder(id) {
  return request({
    url: '/system/adminOrder/' + id,
    method: 'delete'
  })
}
