import request from "@/utils/request";

// 创建委外用料清单
export function createOutSourceBomDetail(data) {
    return request({
        url: "/rtkwms/out-source-bom-detail/create",
        method: "post",
        data: data,
    });
}

// 更新委外用料清单
export function updateOutSourceBomDetail(data) {
    return request({
        url: "/rtkwms/out-source-bom-detail/update",
        method: "put",
        data: data,
    });
}

// 删除委外用料清单
export function deleteOutSourceBomDetail(id) {
    return request({
        url: "/rtkwms/out-source-bom-detail/delete?id=" + id,
        method: "delete",
    });
}

// 获得委外用料清单
export function getOutSourceBomDetail(id) {
    return request({
        url: "/rtkwms/out-source-bom-detail/get?id=" + id,
        method: "get",
    });
}

// 获得委外用料清单分页
export function getOutSourceBomDetailPage(query) {
    return request({
        url: "/rtkwms/out-source-bom-detail/page",
        method: "get",
        params: query,
    });
}

// 导出委外用料清单 Excel
export function exportOutSourceBomDetailExcel(query) {
    return request({
        url: "/rtkwms/out-source-bom-detail/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}