import request from '@/utils/request'

// 创建仓位
export function createWarehouseAreaPosition(data) {
  return request({
    url: '/ecw/warehouse-area-position/create',
    method: 'post',
    data: data
  })
}

// 更新仓位
export function updateWarehouseAreaPosition(data) {
  return request({
    url: '/ecw/warehouse-area-position/update',
    method: 'put',
    data: data
  })
}

// 删除仓位
export function deleteWarehouseAreaPosition(id) {
  return request({
    url: '/ecw/warehouse-area-position/delete?id=' + id,
    method: 'delete'
  })
}

// 获得仓位
export function getWarehouseAreaPosition(id) {
  return request({
    url: '/ecw/warehouse-area-position/get?id=' + id,
    method: 'get'
  })
}

// 获得仓位分页
export function getWarehouseAreaPositionPage(query) {
  return request({
    url: '/ecw/warehouse-area-position/page',
    method: 'get',
    params: query
  })
}

// 导出仓位 Excel
export function exportWarehouseAreaPositionExcel(query) {
  return request({
    url: '/ecw/warehouse-area-position/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
