import request from '@/utils/request'

// 查询货架列表
export function listHouse(query) {
  return request({
    url: '/material/base/house/list',
    method: 'get',
    params: query
  })
}
export function listHouseTree(query) {
  return request({
    url: '/material/base/house/tree',
    method: 'get',
    params: query
  })
}
// 新增货架
export function addHouse(data) {
  return request({
    url: '/material/base/house',
    method: 'post',
    data: data
  })
}
// 查询部门详细
export function getHouse(houseId) {
  return request({
    url: '/material/base/house/' + houseId,
    method: 'get'
  })
}
// 修改货架
export function updateHouse(data) {
  return request({
    url: '/material/base/house',
    method: 'put',
    data: data
  })
}

// 删除货架
export function delHouse(houseId) {
  return request({
    url: '/material/base/house/' + houseId,
    method: 'delete'
  })
}


//货架配置-列表
export function getHouseSet(query) {
  return request({
    url: '/material/base/houseSet/getHouseSet',
    method: 'get',
    params: query
  })
}

//货架配置-新增
export function addhouseSet(data) {
  return request({
    url: '/material/base/houseSet',
    method: 'post',
    data: data
  })
}
// 货架配置-修改
export function updateHouseSet(data) {
  return request({
    url: '/material/base/houseSet',
    method: 'put',
    data: data
  })
}
//货架配置-删除
export function delHouseSet(houseId) {
  return request({
    url: '/material/base/houseSet/' + houseId,
    method: 'delete'
  })
}
