import request from '@/utils/request'

// 创建配件库
export function createWares(data) {
  return request({
    url: '/repair/wares/create',
    method: 'post',
    data: data
  })
}

// 更新配件库
export function updateWares(data) {
  return request({
    url: '/repair/wares/update',
    method: 'put',
    data: data
  })
}

// 删除配件库
export function deleteWares(id) {
  return request({
    url: '/repair/wares/delete?id=' + id,
    method: 'delete'
  })
}

// 获得配件库
export function getWares(id) {
  return request({
    url: '/repair/wares/get?id=' + id,
    method: 'get'
  })
}

// 获得配件库分页
export function getWaresPage(params) {
  return request({
    url: '/repair/wares/page',
    method: 'get',
    params
  })
}

