import request from '@/utils/request'

// 查询贷款台账列表
export function listLedger(query) {
  return request({
    url: '/crmLoanLedger/findByPage',
    method: 'get',
    params: query
  })
}

// 查询贷款台账详细
export function getLedger(id) {
  return request({
    url: '/crmLoanLedger/ledger/' + id,
    method: 'get'
  })
}

// 新增贷款台账
export function addLedger(data) {
  return request({
    url: '/crmLoanLedger/ledger',
    method: 'post',
    data: data
  })
}

// 修改贷款台账
export function updateLedger(data) {
  return request({
    url: '/crmLoanLedger/ledger',
    method: 'put',
    data: data
  })
}

// 删除贷款台账
export function delLedger(id) {
  return request({
    url: '/crmLoanLedger/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delLedgerBatch(ids) {
  console.log(ids);
  return request.post('/crmLoanLedger/delete',ids)
}

