import { httpApi } from '../../request/httpApi'

export default {
    //获取任务类型或任务状态
    async queryTaskTypeStatus(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/query-task-type-status',
            method: 'get',
            params: form,
        }, msg)
    },
    //获取当前合同段的上报批次
    async queryBatchList(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/query-batch-list',
            method: 'get',
            params: form,
        }, msg)
    },
    //获取当前用户待办流程
    async queryUserToDoTaskList(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/user-to-do-task-list',
            method: 'get',
            params: form,
        }, msg)
    },
    //审批页详情
    async queryApprovalParameter(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/query-approval-parameter',
            method: 'get',
            params: form,
        }, msg)
    },
    //完成任务
    async saveCompleteApprovalTask(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/complete-approval-task',
            method: 'post',
            data: form,
        }, msg)
    },
    //已办任务
    async queryUserDoneTaskList(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/query-user-done-task-list',
            method: 'get',
            params: form,
        }, msg)
    },
    //批量审批
    async batchCompleteApprovalTask(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/batch-complete-approval-task',
            method: 'post',
            data: form,
        }, msg)
    },
    //获取发起
    async queryUserStartFlow(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/query-user-start-flow',
            method: 'get',
            params: form,
        }, msg)
    },
    //批量页详情
    async queryTaskInfo(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/batch-approval-parameter',
            method: 'get',
            params: form,
        }, msg)
    },
    //校验电签短信验证码
    async checkSmsCode(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/check-sms-code',
            method: 'post',
            data: form,
        }, msg)
    },
    //获取任务列表分页
    async getTaskPage(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/task/page',
            method: 'post',
            data: form,
        }, msg)
    },
}
