import request from '@/utils/request'

// 创建仓库
export function createBaseWarehouse(data) {
  return request({
    url: '/conf/baseWarehouse/create',
    method: 'post',
    data: data
  })
}

// 更新仓库
export function updateBaseWarehouse(data) {
  return request({
    url: '/conf/baseWarehouse/update',
    method: 'put',
    data: data
  })
}

// 删除仓库
export function deleteBaseWarehouse(id) {
  return request({
    url: '/conf/baseWarehouse/delete?id=' + id,
    method: 'delete'
  })
}

// 获得仓库
export function getBaseWarehouse(id) {
  return request({
    url: '/conf/baseWarehouse/get?id=' + id,
    method: 'get'
  })
}

// 获得仓库列表
export function getBaseWarehouseList(params) {
  return request({
    url: '/conf/baseWarehouse/list',
    method: 'get',
    params
  })
}
// 导出仓库 Excel
export function exportBaseWarehouseExcel(params) {
  return request({
    url: '/conf/baseWarehouse/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
