import request from '@/utils/request'

// 获取仓库列表
export function getPageList (params) {
  return request({
    url: '/mall4cloud_product/s/warehouse/page',
    method: 'get',
    params
  })
}
// 获取仓库信息
export function getWarehouse (params) {
  return request({
    url: '/mall4cloud_product/s/warehouse',
    method: 'get',
    params
  })
}
// 保存仓库
export function postWarehouse (data) {
  return request({
    url: '/mall4cloud_product/s/warehouse',
    method: 'post',
    data
  })
}

// 更新仓库
export function putWarehouse (data) {
  return request({
    url: '/mall4cloud_product/s/warehouse',
    method: 'put',
    data
  })
}

// 删除非默认仓库
export function deleteWarehouse (param) {
  return request({
    url: '/mall4cloud_product/s/warehouse',
    method: 'delete',
    params: param
  })
}

// 获取已存在仓库的区域数组
export function listWarehouseCity (param) {
  return request({
    url: '/mall4cloud_product/s/warehouse/list_warehouse_city',
    method: 'get',
    params: param
  })
}

export function getPageStockPointSku (params) {
  return request({
    url: '/mall4cloud_product/s/stock_point_sku/page',
    method: 'get',
    params
  })
}

export function getListWarehouse () {
  return request({
    url: '/mall4cloud_product/s/warehouse/list_warehouse',
    method: 'get'
  })
}

export function getStockPointInfo () {
  return request({
    url: '/mall4cloud_product/s/stock_point_sku/stock_point',
    method: 'get'
  })
}
