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

// 权限管理

// 获取列表
export function filterThrList(query) {
    return axios({
        url: "/spms/thrsys/warehouse/filter",
        method: "get",
        params: query
    });
}

export function filterThrAll(query) {
    return axios({
        url: "/spms/thrsys/warehouse/filterAll",
        method: "get",
        params: query
    });
}


// 保存
export function saveThrWarehouse(data, formName, method = "post") {
    let url =
        formName !== "edit"
            ? "/spms/thrsys/warehouse/save"
            : "/spms/thrsys/warehouse/edit";
    return axios({
        url: url,
        method: method,
        data: data
    });
}

// 删除
export function deleteThrWarehouse(data) {
    return axios({
        url: "/spms/thrsys/warehouse/delete",
        method: "post",
        data: data
    });
}
