import request from '@/utils/request';
// 保存班次
export async function saveteamtime(data) {
    const res = await request.post(`/main/teamtime/save`, data);
    if (res.data.code == 0) {
        return res.data.message;
    }
    return Promise.reject(new Error(res.data.message));
}
// 列表
export async function getteamtime(data) {
    const res = await request.get(`/main/teamtime/page`, {
        params: data
    });
    console.log(res.data.code == 0)
    if (res.data.code == 0) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.message));
}
// 删除
export async function deleteteamtime(data) {
    const res = await request.delete(`/main/teamtime/delete`, {
        data
    });
    if (res.data.code == 0) {
        return res.data.message;
    }
    return Promise.reject(new Error(res.data.message));
}
// 修改班组
export async function updateteamtime(data) {
    const res = await request.put(`/main/teamtime/update`, data);
    if (res.data.code == 0) {
        return res.data.message;
    }
    return Promise.reject(new Error(res.data.message));
}