import request from '@/utils/request'

// 查询仓库信息列表
export function listWarehouseinfo(query) {
  return request({
    url: '/information/warehouseinfo/list',
    method: 'get',
    params: query
  })
}

// 查询仓库信息详细
export function getWarehouseinfo(id) {
  return request({
    url: '/information/warehouseinfo/' + id,
    method: 'get'
  })
}

// 新增仓库信息
export function addWarehouseinfo(data) {
  return request({
    url: '/information/warehouseinfo',
    method: 'post',
    data: data
  })
}

// 修改仓库信息
export function updateWarehouseinfo(data) {
  return request({
    url: '/information/warehouseinfo',
    method: 'put',
    data: data
  })
}

// 删除仓库信息
export function delWarehouseinfo(id) {
  return request({
    url: '/information/warehouseinfo/' + id,
    method: 'delete'
  })
}

//所属仓库下拉数据
export function warehouseDict() {
  return request({
    url: '/information/warehouseinfo/getAll',
    method: 'get'
  })
}

//所属大仓和小仓下拉数据
export function warehouseAll() {
  return request({
    url: '/information/warehouseinfo/tree',
    method: 'get'
  })
}
