import request from '@/utils/request';
// 获取班次
export async function getpullDown() {
    const res = await request.get(`/main/teamtime/pullDown`, {});
    if (res.data.code == 0) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.message));
}
// 假保存
export async function teamqueuesave(data) {
    const res = await request.post(`/main/teamqueue/save`, data);
    if (res.data.code == 0) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.message));
}
// 保存
export async function teamqueuedetailSave(data) {
    const res = await request.post(`/main/teamqueuedetail/save`, data);
    if (res.data.code == 0) {
        return res.data.message;
    }
    return Promise.reject(new Error(res.data.message));
}
// 修改
export async function teamqueuedetailupdate(data) {
    const res = await request.put(`/main/teamqueuedetail/update`, data);
    if (res.data.code == 0) {
        return res.data.message;
    }
    return Promise.reject(new Error(res.data.message));
}
// 列表
export async function teamqueuepage(data) {
    const res = await request.get(`/main/teamqueue/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/teamqueue/delete`, {
        data
    });
    if (res.data.code == 0) {
        return res.data.message;
    }
    return Promise.reject(new Error(res.data.message));
}
// 排班详情
export async function getByIdteamqueue(id) {
    const res = await request.get(`/main/teamqueue/getById/${id}`, {

    });
    if (res.data.code == 0) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.message));
}