import axios from "@/utils/request";

export function filterDepts(query) {
  return axios({
    url: "/udi/auth/dept/filter",
    method: "get",
    params: query
  });
}

export function addDept(data) {
  return axios({
    url: "/udi/auth/dept/add",
    method: "post",
    data: data
  });
}

export function updateDept(data) {
  return axios({
    url: "/udi/auth/dept/update",
    method: "post",
    data: data
  });
}

export function deleteDept(data) {
  return axios({
    url: "/udi/auth/dept/delete",
    method: "post",
    data: data
  });
}

export function getDeptListByUser(params) {
  return axios({
    url: "/spms/inv/warehouse/filterByUser",
    method: "get",
    params: params
  });
}
