import request from '@/utils/request'

// 查询设备报修流程记录列表
export function listRepairs(query) {
  return request({
    url: '/device/repairs/list',
    method: 'get',
    params: query
  })
}

// 查询设备报修流程记录详细
export function getRepairs(id) {
  return request({
    url: '/device/repairs/' + id,
    method: 'get'
  })
}

// 新增设备报修流程记录
export function addRepairs(data) {
  return request({
    url: '/device/repairs',
    method: 'post',
    data: data
  })
}

// 修改设备报修流程记录
export function updateRepairs(data) {
  return request({
    url: '/device/repairs',
    method: 'put',
    data: data
  })
}

// 删除设备报修流程记录
export function delRepairs(id) {
  return request({
    url: '/device/repairs/' + id,
    method: 'delete'
  })
}

// 导出设备报修流程记录
export function exportRepairs(query) {
  return request({
    url: '/device/repairs/export',
    method: 'get',
    params: query
  })
}