import request from '@/utils/request'

// 分页查询报修单列表
export function pageListOrder(query) {
  return request({
    url: '/maintenance/order/pageList',
    method: 'get',
    params: query
  })
}

// 查询报修单列表
export function listOrder(query) {
  return request({
    url: '/maintenance/order/list',
    method: 'get',
    params: query
  })
}

// 查询报修单详细
export function getOrder(id) {
  return request({
    url: '/maintenance/order/' + id,
    method: 'get'
  })
}

// 新增报修单
export function addOrder(data) {
  return request({
    url: '/maintenance/order',
    method: 'post',
    data: data
  })
}

// 修改报修单
export function updateOrder(data) {
  return request({
    url: '/maintenance/order',
    method: 'put',
    data: data
  })
}

// 删除报修单
export function delOrder(id) {
  return request({
    url: '/maintenance/order/' + id,
    method: 'delete'
  })
}

// 导出报修单
export function exportOrder(query) {
  return request({
    url: '/maintenance/order/' + 'export',
    method: 'post',
    params: query
  })
}
