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

export function filterThridSubAll(query) {
    return axios({
        url: "/thirdSys/sub/inv/warehouse/filter",
        method: "get",
        params: query
    });
}

export function filterSubByInv(query) {
    return axios({
        url: "/thirdSys/sub/inv/warehouse/findByInv",
        method: "get",
        params: query
    });
}


// 保存
export function saveSubWarehouse(data, formName, method = "post") {
    let url =
        formName !== "edit"
            ? "/thirdSys/sub/inv/warehouse/save"
            : "/thirdSys/sub/inv/warehouse/edit";
    return axios({
        url: url,
        method: method,
        data: data
    });
}

// 删除
export function deleteSubWarehouse(data) {
    return axios({
        url: "/thirdSys/sub/inv/warehouse/delete",
        method: "post",
        data: data
    });
}



