import request from "@/utils/request";

// 创建委外订单明细
export function createOutSourceDetail(data) {
    return request({
        url: "/rtkwms/out-source-detail/create",
        method: "post",
        data: data,
    });
}

// 更新委外订单明细
export function updateOutSourceDetail(data) {
    return request({
        url: "/rtkwms/out-source-detail/update",
        method: "put",
        data: data,
    });
}

// 删除委外订单明细
export function deleteOutSourceDetail(id) {
    return request({
        url: "/rtkwms/out-source-detail/delete?id=" + id,
        method: "delete",
    });
}

// 获得委外订单明细
export function getOutSourceDetail(id) {
    return request({
        url: "/rtkwms/out-source-detail/get?id=" + id,
        method: "get",
    });
}

// 获得委外订单明细分页
export function getOutSourceDetailPage(query) {
    return request({
        url: "/rtkwms/out-source-detail/page",
        method: "get",
        params: query,
    });
}

// 导出委外订单明细 Excel
export function exportOutSourceDetailExcel(query) {
    return request({
        url: "/rtkwms/out-source-detail/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}