import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { QuarterlyTaskVO, QuarterlyTaskForm } from './types';

/** 查询季度任务列表 */
export function listQuarterlyTask(query: any): AxiosPromise<QuarterlyTaskVO[]> {
    return request({
        url: '/customer/quarterlyTask/list',
        method: 'get',
        params: query
    });
}

/** 获取季度任务详细信息 */
export function getQuarterlyTask(id: string | number): AxiosPromise<QuarterlyTaskVO> {
    return request({
        url: `/customer/quarterlyTask/${id}`,
        method: 'get'
    });
}

/** 新增季度任务数据 */
export function addQuarterlyTask(data: QuarterlyTaskForm): AxiosPromise<void> {
    return request({
        url: '/customer/quarterlyTask',
        method: 'post',
        data: data
    });
}

/** 修改季度任务数据 */
export function updateQuarterlyTask(data: QuarterlyTaskForm): AxiosPromise<void> {
    return request({
        url: '/customer/quarterlyTask',
        method: 'put',
        data: data
    });
}
