import request from '@/utils/request'

// 查询信用管理部门或岗位列表
export function listManagement(query) {
    return request({
        url: '/crmCreditManagement/findByPage',
        method: 'get',
        params: query
    })
}

// 查询信用管理部门或岗位详细
export function getManagement(id) {
    return request({
        url: '/crmCreditManagement/' + id,
        method: 'get'
    })
}

// 新增信用管理部门或岗位
export function addManagement(data) {
    return request({
        url: '/crmCreditManagement',
        method: 'post',
        data: data
    })
}

// 修改信用管理部门或岗位
export function updateManagement(data) {
    return request({
        url: '/crmCreditManagement',
        method: 'put',
        data: data
    })
}

// 删除信用管理部门或岗位
export function delManagement(id) {
    return request({
        url: '/crmCreditManagement/deleteAll',
        method: 'delete'
    })
}
// 批量删除行政许可
export function delManagementBatch(ids) {
    console.log(ids);
    return request.post('/crmCreditManagement/delete',ids)
}