import request from "@/utils/request";

// wms备料完成
export function updateWorkBatchBom(data) {
    return request({
        url: "/rtkwms/work-order-bom-detail/updateBatch",
        method: "put",
        data: data,
    });
}

// 获得用料清单（投料单）分页
export function gePreparePage(query) {
    return request({
        url: "/rtkwms/work-order-bom-detail/preparePage",
        method: "get",
        params: query,
    });
}

// 综合备料单主页面列表
export function getMainDetailPage(query) {
    return request({
        url: "/rtkwms/synthetical-send-master/page",
        method: "get",
        params: query,
    });
}

// 导出用料清单（投料单） Excel
export function exportWorkOrderBomExcel(query) {
    return request({
        url: "/rtkwms/work-order-bom/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}

// 获得用料详情分页
export function getPdaNeedDetail(query) {
    return request({
        url: "/rtkwms/work-order-bom-detail/pdaNeedDetail",
        method: "get",
        params: query,
    });
}

// 查看明细-表头表体
export function getMasterDetail(query) {
    return request({
        url: "/rtkwms/synthetical-send-master/detail",
        method: "get",
        params: query,
    });
}

// 查看已备料内容
export function getPreparationLogsPage(query) {
    return request({
        url: "/rtkwms/synthetical-preparation-lots/page",
        method: "get",
        params: query,
    });
}

// wms确认备料
export function updatePdaUpdate(query) {
    return request({
        url: "/rtkwms/work-order-bom-detail/pdaUpdate",
        method: "get",
        params: query,
    });
}

// 生成综合备料单
export function createSendMaster(data) {
    return request({
        url: "/rtkwms/synthetical-send-master/create",
        method: "post",
        data: data,
    });
}

// 删除综合备料单
export function deleteMasterPrepare(id) {
    return request({
        url: "/rtkwms/synthetical-send-master/delete?id=" + id,
        method: "delete",
    });
}