import request from "@/utils/request";

// 创建库存总账
export function createInventoryGeneral(data) {
    return request({
        url: "/rtkwms/inventory-general/create",
        method: "post",
        data: data,
    });
}

// 更新库存总账
export function updateInventoryGeneral(data) {
    return request({
        url: "/rtkwms/inventory-general/update",
        method: "put",
        data: data,
    });
}

// 删除库存总账
export function deleteInventoryGeneral(id) {
    return request({
        url: "/rtkwms/inventory-general/delete?id=" + id,
        method: "delete",
    });
}

// 获得库存总账
export function getInventoryGeneral(id) {
    return request({
        url: "/rtkwms/inventory-general/get?id=" + id,
        method: "get",
    });
}

// 获得库存总账分页
export function getInventoryGeneralPage(query) {
    return request({
        url: "/rtkwms/inventory-general/currentPage",
        method: "get",
        params: query,
    });
}
// 获得物料收发汇总分页
export function getMaterialSummaryPage(query) {
    return request({
        url: "wms/inventory-general/page",
        method: "get",
        params: query,
    });
}
// 获得库存总账分页
export function getGeneralDetailPage(query) {
    return request({
        url: "/rtkwms/inventory-general/detailPage",
        method: "get",
        params: query,
    });
}

// 导出库存总账 Excel
export function exportInventoryGeneralExcel(query) {
    return request({
        url: "/rtkwms/inventory-general/current-export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}

// 导出物料收发汇总 Excel
export function exportTotalGeneralExcel(query) {
    return request({
        url: "/rtkwms/inventory-general/total-export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}

// 导出账龄分析 Excel
export function exportAgingGeneralExcel(query) {
    return request({
        url: "/rtkwms/inventory-general/aging-export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}

// 导出账龄分析 Excel
export function exportDetailGeneralExcel(query) {
    return request({
        url: "/rtkwms/inventory-general/detail-export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}

// 账龄分析分页
export function getAgingPage(query) {
    return request({
        url: "/rtkwms/label-master/overdue",
        method: "get",
        params: query,
    });
}