import request from "@/utils/request";

export function getSaleRebatePage(data) {
    return request({
        url: "/sales-allowance/page",
        method: "get",
        params: data
    });
}

export function getSaleRebateList(data) {
    return request({
        url: "/sales-allowance/list",
        method: "post",
        data: data
    });
}

export function addSaleRebate(data) {
    return request({
        url: "/sales-allowance/add",        
        method: "post",
        data: data
    });
}

export function editSaleRebate(data) {
    return request({
        url: "/sales-allowance/edit",
        method: "post",
        data: data
    });
}

export function delSaleRebate(data) {
    return request({
        url: "/sales-allowance/delete",
        method: "post",
        data: data
    });
}

export function getSaleRebateById(data) {
    return request({
        url: "/sales-allowance/listById",
        method: "post",
        data: data,
    });
}

// 获取最新的销售折让编号
export function getLatestSaleRebateNum(data) {
    return request({
        url: "/sales-allowance/getAllowanceNum",
        method: "post",
        data: data
    });
}