import request from "@/utils/request";

// 创建工厂管理
export function createFactory(data) {
    return request({
        url: "/rtkwms/factory/create",
        method: "post",
        data: data,
    });
}

// 更新工厂管理
export function updateFactory(data) {
    return request({
        url: "/rtkwms/factory/update",
        method: "put",
        data: data,
    });
}

// 删除工厂管理
export function deleteFactory(id) {
    return request({
        url: "/rtkwms/factory/delete?id=" + id,
        method: "delete",
    });
}

// 获得工厂管理
export function getFactory(id) {
    return request({
        url: "/rtkwms/factory/get?id=" + id,
        method: "get",
    });
}

// 获得工厂管理分页
export function getFactoryPage(query) {
    return request({
        url: "/rtkwms/factory/page",
        method: "get",
        params: query,
    });
}

// 导出工厂管理 Excel
export function exportFactoryExcel(query) {
    return request({
        url: "/rtkwms/factory/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}