import request from "@/utils/request";

// 创建来料暂收主
export function createIncomingReceiptMaster(data) {
    return request({
        url: "/rtkwms/incoming-receipt-master/create",
        method: "post",
        data: data,
    });
}

// 更新来料暂收主
export function updateIncomingReceiptMaster(data) {
    return request({
        url: "/rtkwms/incoming-receipt-master/update",
        method: "put",
        data: data,
    });
}

// 删除来料暂收主
export function deleteIncomingReceiptMaster(id) {
    return request({
        url: "/rtkwms/incoming-receipt-master/delete?id=" + id,
        method: "delete",
    });
}

// 获得来料暂收主
export function getIncomingReceiptMaster(id) {
    return request({
        url: "/rtkwms/incoming-receipt-master/get?id=" + id,
        method: "get",
    });
}

// 获得来料暂收主分页
export function getIncomingReceiptMasterPage(query) {
    return request({
        url: "wms/incoming-receipt-master/mainDetailPage",
        method: "get",
        params: query,
    });
}

// 扫供应商送货单号
export function getDeliveryOrderNo(query) {
    return request({
        url: "/rtkwms/delivery-notice-master/sanDeliveryOrderNo",
        method: "get",
        params: query,
    });
}

// 查看来料暂收明细
export function getDetailPage(query) {
    return request({
        url: "/rtkwms/incoming-receipt-master/detailPage",
        method: "get",
        params: query,
    });
}

// 导出来料暂收主 Excel
export function exportIncomingReceiptMasterExcel(query) {
    return request({
        url: "/rtkwms/incoming-receipt-master/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}