import request from "@/utils/request";

// 创建mes同步退料单
export function createReturnWorkOrder(data) {
    return request({
        url: "/rtkwms/return-work-order/create",
        method: "post",
        data: data,
    });
}

// 更新mes同步退料单
export function updateReturnWorkOrder(data) {
    return request({
        url: "/rtkwms/return-work-order/update",
        method: "put",
        data: data,
    });
}

// 删除mes同步退料单
export function deleteReturnWorkOrder(id) {
    return request({
        url: "/rtkwms/return-work-order/delete?id=" + id,
        method: "delete",
    });
}

// 获得mes同步退料单
export function getReturnWorkOrder(id) {
    return request({
        url: "/rtkwms/return-work-order/get?id=" + id,
        method: "get",
    });
}

// 获得mes同步退料单分页
export function getReturnWorkOrderPage(query) {
    return request({
        url: "/rtkwms/incoming-reject/toStockPage",
        method: "get",
        params: query,
    });
}

// 导出mes同步退料单 Excel
export function exportReturnWorkOrderExcel(query) {
    return request({
        url: "/rtkwms/return-work-order/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}