import axios from "@/utils/request";

export function getBasicManuMaintains(query) {
  return axios({
    url: "/udiwms/basic/manu/maintain/filter",
    method: "get",
    params: query
  });
}


export function basicUnitMaintainSave(data, formName, method = "post") {
  let url =
    formName === "add" ? "/udiwms/basic/manu/maintain/save" : "/udiwms/basic/manu/maintain/update";
  return axios({
    url: url,
    method: method,
    data: data
  });
}


export function deleteBasicUnitMaintain(query) {
  return axios({
    url: "/udiwms/basic/manu/maintain/delete",
    method: "post",
    data: query
  });
}

export function combine(query) {
  return axios({
    url: "/udiwms/basic/manu/maintain/combine",
    method: "post",
    data: query
  });
}

export function combineAll(query) {
  return axios({
    url: "/udiwms/basic/manu/maintain/combineAll",
    method: "get",
    params: query
  });
}

export function combineSingle(query) {
  return axios({
    url: "/udiwms/basic/manu/maintain/combineSingle",
    method: "post",
    data: query
  });
}

export function getThrsysUnit(query) {
  return axios({
    url: "/udiwms/manutMaintain/thirdSys/detail",
    method: "get",
    params: query
  });
}
