import axios from "../../utils/axios";

export function getRegistrationList(query) {
    return axios({
        url: "/udiwms/info/suppliers/registration/basic/getRegistrationList",
        method: "get",
        params: query
    });
}

export function getRegistrationInfo(query) {
    return axios({
        url: "/udiwms/info/suppliers/registration/basic/getRegistrationInfo",
        method: "get",
        params: query
    });
}

export function addOrModifyRegistration(query, formName) {
    let url = formName === "add" ?
            "/udiwms/info/suppliers/registration/basic/addRegistration" : "/udiwms/info/suppliers/registration/basic/modifyRegistration";
    return axios(
        {
            url: url,
            method: "post",
            data: query
        }
    );
}

export function deleteRegistration(query) {
    return axios({
        url: "/udiwms/info/suppliers/registration/basic/delete",
        method: "get",
        params: query
    });
}

