import request from '@/utils/axios.ts';

// 销售概览 - 列表查询
export function salesOverviewList(data) {
    return request({
        url: '/salesoverview/list',
        method: 'POST',
        data,
    });
}

// 销售概览 - 新增
export function salesOverviewAdd(data) {
    return request({
        url: '/salesoverview/add',
        method: 'POST',
        data,
    });
}

// 销售概览 - 编辑
export function salesOverviewEdit(data) {
    return request({
        url: '/salesoverview/edit',
        method: 'POST',
        data,
    });
}

// 销售概览 - 删除
export function salesOverviewDelete(id) {
    return request({
        url: `/salesoverview/delete?id=${id}`,
        method: 'GET',
    });
}

// 销售概览 - 详情查询
export function salesOverviewDetail(id) {
    return request({
        url: `/salesoverview/detail?id=${id}`,
        method: 'GET',
    });
}

// 销售概览 - 计算统计数据
export function calculateSalesOverview() {
    return request({
        url: '/salesoverview/calculate',
        method: 'POST',
    });
}

