import axios from "@/utils/request";

export function getCompanyList(query) {
    return axios({
        url: "/sup/manufacturer/getCompanyList",
        method: "get",
        params: query
    });
}

export function getCompanyBySup(query) {
    return axios({
        url: "/sup/manufacturer/getCompanyBySup",
        method: "get",
        params: query
    });
}


export function getCompanyInfo(query) {
    return axios({
        url: "/sup/manufacturer/getCompanyInfo",
        method: "get",
        params: query
    });
}

export function addOrModifyCompany(query, formName) {
    let url = formName === "add" ?
        "/sup/manufacturer/addCompany" : "/sup/manufacturer/modifyCompany";
    return axios(
        {
            url: url,
            method: "post",
            data: query
        }
    );
}

export function auditManufacturer(query) {
    return axios(
        {
            url: "/udiwms/sup/manufacturer/audit",
            method: "post",
            data: query
        }
    );
}


export function deleteCompany(query) {
    return axios({
        url: "/sup/manufacturer/basic/delete",
        method: "get",
        params: query
    });
}

