import request from '@/utils/request'

// 查询库房列表
export function listKufang(query) {
  return request({
    url: '/system/kufang/list',
    method: 'get',
    params: query
  })
}

// 查询库房详细
export function getKufang(id) {
  return request({
    url: '/system/kufang/' + id,
    method: 'get'
  })
}

// 新增库房
export function addKufang(data) {
  return request({
    url: '/system/kufang',
    method: 'post',
    data: data
  })
}

// 修改库房
export function updateKufang(data) {
  return request({
    url: '/system/kufang',
    method: 'put',
    data: data
  })
}

// 删除库房
export function delKufang(id) {
  return request({
    url: '/system/kufang/' + id,
    method: 'delete'
  })
}

export function getUserByRole() {
  return request({
    url: '/system/kufang/getUserByRole',
    method: 'get'
  })
}
