import axios from "@/utils/request";

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

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

export function getCorrespondence(query) {
  return axios({
    url: "/udiwms/basic/unit/maintain/filter2",
    method: "get",
    params: query
  });
}
export function getCorpFilter(query) {
    return axios({
        url: "/sale/info/company/product/corp/filter",
        method: "get",
        params: query
    });
}



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

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

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

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

export function combineSingle(query) {
    return axios({
        url: "/udiwms/basic/unit/maintain/combineSingle",
        method: "post",
        data: query
    });
}
export function deleteBasicUnitMaintain(query) {
    return axios({
        url: "/udiwms/basic/unit/maintain/delete",
        method: "post",
        data: query
    });
}
export function ucloudUnit(query) {
    return axios({
        url: "/udiwms/unitMaintain/filterErp",
        method: "get",
        params: query
    });
}

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

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

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

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

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

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

export function getPlatFormDelect(query) {
    return axios({
        url: "/udiwms/platform/getPlatFormDelect",
        method: "post",
        data: query
    });
}




