import request from "@/utils/request";

// 生产领料单分页
export function getOutStockMainDetailPage(query) {
    return request({
        url: "/rtkwms/out-stock-detail/outStockMainDetailPage",
        method: "get",
        params: query,
    });
}

// 删除领料记录
export function deleteStockDetail(id) {
    return request({
        url: "/rtkwms/out-stock-detail/deleteBatch?id=" + id,
        method: "delete",
    });
}

// 生产补料分页
export function getMainAndDetailPage(query) {
    return request({
        url: "/rtkwms/resupply-order-detail/mainAndDetailPage",
        method: "get",
        params: query,
    });
}

// 生产退料单分页
export function getOutStockReturnPage(query) {
    return request({
        url: "/rtkwms/return-work-order-pre-detail/outStockReturnPage",
        method: "get",
        params: query,
    });
}

// 生产入库单查询分页
export function getProduceStockedPage(query) {
    return request({
        url: "/rtkwms/incoming-produce-detail/produceStockedPage",
        method: "get",
        params: query,
    });
}

// 销售出库单查询分页
export function getSaleOutDetailPage(query) {
    return request({
        url: "/rtkwms/sale-out-order-detail/saleOutDetailPage",
        method: "get",
        params: query,
    });
}

// 导出WMS补料申请单主 Excel
export function exportResupplyOrderMasterExcel(query) {
    return request({
        url: "/rtkwms/resupply-order-master/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}

// 生产入库删除
export function deleteIncomingProduceDetail(id) {
    return request({
        url: "/rtkwms/incoming-produce-detail/delete?id=" + id,
        method: "delete",
    });
}

// 导出销售出库 Excel
export function exportSaleOutOrderDetail(query) {
    return request({
        url: "/rtkwms/sale-out-order-detail/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}

// 导出生产领料单 Excel
export function exportOutStockDetail(query) {
    return request({
        url: "/rtkwms/out-stock-detail/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}

// 导出生产入库单 Excel
export function exportIncomingProduct(query) {
    return request({
        url: "/rtkwms/incoming-produce-detail/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}