import request from '@/utils/request'

// 查询动产抵押信息列表
export function listMortgage(query) {
    return request({
        url: '/crmMovablePropertyMortgage/findByPage',
        method: 'get',
        params: query
    })
}

// 查询动产抵押信息详细
export function getMortgage(id) {
    return request({
        url: '/crmMovablePropertyMortgage/' + id,
        method: 'get'
    })
}

// 新增动产抵押信息
export function addMortgage(data) {
    return request({
        url: '/crmMovablePropertyMortgage',
        method: 'post',
        data: data
    })
}

// 修改动产抵押信息
export function updateMortgage(data) {
    return request({
        url: '/crmMovablePropertyMortgage',
        method: 'put',
        data: data
    })
}

// 删除动产抵押信息
export function delMortgage(id) {
    return request({
        url: '/crmMovablePropertyMortgage/deleteAll',
        method: 'delete'
    })
}
// 批量删除行政许可
export function delMortgageBatch(ids) {
    console.log(ids);
    return request.post('/crmMovablePropertyMortgage/delete',ids)
}