import request from '@/utils/request'

//组织人员树类型管理
export function getMatConfigList(query) {
  return request({
    url: '/system/user/deptUserTree',
    method: 'get',
    params: query,
  })
}

//组织人员树类型管理列表
export function getListByMatConfig(query) {
  return request({
    url: '/material/ma_type/listNoPage',
    method: 'get',
    params: query,
  })
}

// 库管员管理--绑定
export function bindKeeper(data) {
  return request({
    url: '/material/ma_type_keeper',
    method: 'post',
    data: data,
  })
}

// 库管员管理--解绑
export function noBindKeeper(data) {
  return request({
    url: '/material/ma_type_keeper/unbind',
    method: 'post',
    data: data,
  })
}

//获取库管员树的角色数组
export function getKeeperIds(itemName) {
  return request({
    url: '/material/bm_config/list/',
    method: 'get',
    params: { "itemName": itemName },
  })
}

//修改库管员树的角色数组
export function updateBmConfig(data) {
  return request({
    url: '/material/bm_config',
    method: 'post',
    data: data,
  })
}