import request from '@/utils/request'

// 查询设备采购信息列表
export function listPurchase(query) {
  return request({
    url: '/dms/purchase/list',
    method: 'get',
    params: query
  })
}

// 查询设备采购信息详细
export function getPurchase(devicePurchaseId) {
  return request({
    url: '/dms/purchase/' + devicePurchaseId,
    method: 'get'
  })
}

// 新增设备采购信息
export function addPurchase(data) {
  return request({
    url: '/dms/purchase',
    method: 'post',
    data: data
  })
}

// 修改设备采购信息
export function updatePurchase(data) {
  return request({
    url: '/dms/purchase',
    method: 'put',
    data: data
  })
}

// 删除设备采购信息
export function delPurchase(devicePurchaseId) {
  return request({
    url: '/dms/purchase/' + devicePurchaseId,
    method: 'delete'
  })
}
