import request from '@/utils/request'

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

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

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

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

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