import axios from 'axios';
import qs from 'qs'
//获取某月计划
export function getMonthPlan(params){
    return axios.get('/weekly/listCurrentMonth',{
        params: params
    }).then(result => result.data)
}

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

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

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