import request from '@/utils/request'

// 查询物资库列表
export function listStorage(query) {
  return request({
    url: '/erms/storage/list',
    method: 'get',
    params: query
  })
}

// 查询物资库详细
export function getStorage(id) {
  return request({
    url: '/erms/storage/' + id,
    method: 'get'
  })
}

// 新增物资库
export function addStorage(data) {
  return request({
    url: '/erms/storage',
    method: 'post',
    data: data
  })
}

// 修改物资库
export function updateStorage(data) {
  return request({
    url: '/erms/storage',
    method: 'put',
    data: data
  })
}

// 删除物资库
export function delStorage(id) {
  return request({
    url: '/erms/storage/' + id,
    method: 'delete'
  })
}

// 导出物资库
export function exportStorage(query) {
  return request({
    url: '/erms/storage/export',
    method: 'get',
    params: query
  })
}