import axios from 'axios';
import qs from 'qs'
//获取列表
export function getPlanList(){
    return axios.get('/annual/list').then(result => result.data)
}

//获取列表
export function getCurrent(year){
    return axios.get('/annual/current',{
        params: {year: year}
    }).then(result => result.data)
}

//新增
export function addPlan(item) {
    return axios({
        method: 'post',
        url: '/annual/add',
        data: qs.stringify(item)
    }).then(res => res.data)
}

//修改
export function updatePlan(item) {
    return axios({
        method: 'post',
        url: '/annual/update',
        data: qs.stringify(item)
    }).then(res => res.data)
}

//删除
export function deletePlan(item) {
    return axios({
        method: 'post',
        url: '/annual/delete',
        data: qs.stringify(item)
    }).then(res => res)
}