import request from '@/utils/request'

// 查询流程申请列表
export function listApply(query) {
    return request({
        url: '/tongzhou/apply/apply/list',
        method: 'get',
        params: query
    })
}

export function listAlreadyApply(query) {
    return request({
        url: '/tongzhou/apply/apply/Alreadylist',
        method: 'get',
        params: query
    })
}



// 查询流程申请详细
export function getApply(applyId) {
    return request({
        url: '/tongzhou/apply/apply/' + applyId,
        method: 'get'
    })
}

export function getAlreadyApply(applyId) {
    return request({
        url: '/tongzhou/apply/apply/getInfoYb/' + applyId,
        method: 'get'
    })
}




// 新增流程申请
export function addApply(data) {
    return request({
        url: '/tongzhou/apply/apply',
        method: 'post',
        data: data
    })
}

// 修改流程申请
export function updateApply(data) {
    return request({
        url: '/tongzhou/apply/apply',
        method: 'put',
        data: data
    })
}

export function withdrawApply(applyId) {
    return request({
        url: '/tongzhou/apply/apply/withdraw/' + applyId,
        method: 'get'
    })
}

// 删除流程申请
export function delApply(applyId) {
    return request({
        url: '/tongzhou/apply/apply/' + applyId,
        method: 'delete'
    })
}

// 导出流程申请
export function exportApply(query) {
    return request({
        url: '/tongzhou/apply/apply/export',
        method: 'get',
        params: query
    })
}