import request from "@/utils/request";

// 创建mes生产领料单主表-同步
export function createProductionMaterialOrder(data) {
    return request({
        url: "/rtkwms/production-material-order/create",
        method: "post",
        data: data,
    });
}

// 更新mes生产领料单主表-同步
export function updateProductionMaterialOrder(data) {
    return request({
        url: "/rtkwms/production-material-order/update",
        method: "put",
        data: data,
    });
}

// 删除mes生产领料单主表-同步
export function deleteProductionMaterialOrder(id) {
    return request({
        url: "/rtkwms/production-material-order/delete?id=" + id,
        method: "delete",
    });
}

// 获得mes生产领料单主表-同步
export function getProductionMaterialOrder(id) {
    return request({
        url: "/rtkwms/production-material-order/get?id=" + id,
        method: "get",
    });
}

// 获得mes生产领料单主表-同步分页
export function getProductionMaterialOrderPage(query) {
    return request({
        url: "/rtkwms/work-order-bom/page",
        method: "get",
        params: query,
    });
}
// 获得物料需求清单明细
export function getProductionmaterialDetailPage(query) {
    return request({
        url: "/rtkwms/work-order-bom-detail/page",
        method: "get",
        params: query,
    });
}

// 导出mes生产领料单主表-同步 Excel
export function exportProductionMaterialOrderExcel(query) {
    return request({
        url: "/rtkwms/production-material-order/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}