import request from '@/utils/request'

// 创建库房管理
export function createDepot(data) {
  return request({
    url: '/setting/depot/create',
    method: 'post',
    data: data
  })
}

// 更新库房管理
export function updateDepot(data) {
  return request({
    url: '/setting/depot/update',
    method: 'put',
    data: data
  })
}

// 删除库房管理
export function deleteDepot(id) {
  return request({
    url: '/setting/depot/delete?id=' + id,
    method: 'delete'
  })
}

// 获得库房管理
export function getDepot(id) {
  return request({
    url: '/setting/depot/get?id=' + id,
    method: 'get'
  })
}

// 获得库房管理分页
export function getDepotPage(query) {
  return request({
    url: '/setting/depot/page',
    method: 'get',
    params: query
  })
}

// 导出库房管理 Excel
export function exportDepotExcel(query) {
  return request({
    url: '/setting/depot/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
