import request from "@/utils/request";

// 创建wms来料退货单
export function createPurchaseReturnOrder(data) {
    return request({
        url: "/rtkwms/purchase-return-order/create",
        method: "post",
        data: data,
    });
}

// 更新wms来料退货单
export function updatePurchaseReturnOrder(data) {
    return request({
        url: "/rtkwms/purchase-return-order/update",
        method: "put",
        data: data,
    });
}

// 删除wms来料退货单
export function deletePurchaseReturnOrder(id) {
    return request({
        url: "/rtkwms/purchase-return-order/delete?id=" + id,
        method: "delete",
    });
}

// 获得wms来料退货单
export function getPurchaseReturnOrder(id) {
    return request({
        url: "/rtkwms/purchase-return-order/get?id=" + id,
        method: "get",
    });
}

// 获得wms来料退货单分页
export function getPurchaseReturnOrderPage(query) {
    return request({
        url: "/rtkwms/purchase-return-order/page",
        method: "get",
        params: query,
    });
}

// 导出wms来料退货单 Excel
export function exportPurchaseReturnOrderExcel(query) {
    return request({
        url: "/rtkwms/purchase-return-order/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}
// 获得wms来料退货单明细分页
export function getPurchaseReturnOrderDetailPage(query) {
    return request({
        url: "/rtkwms/purchase-return-order-detail/page",
        method: "get",
        params: query,
    });
}
// 确认取走
export function updatePurchaseReturnOrderPicking(data) {
    return request({
        url: "/rtkwms/purchase-return-order/update",
        method: "put",
        data: data,
    });
}