import request from '@/utils/request'

// 分页查询费用列表
export function pageListCost(query) {
  return request({
    url: '/amortize/cost/pageList',
    method: 'get',
    params: query
  })
}

// 查询费用列表
export function listCost(query) {
  return request({
    url: '/amortize/cost/list',
    method: 'get',
    params: query
  })
}

// 查询费用详细
export function getCost(ID) {
  return request({
    url: '/amortize/cost/' + ID,
    method: 'get'
  })
}

// 自动计算费用
export function autoCalc(data) {
  return request({
    url: '/amortize/cost/autoCalc',
    method: 'post',
    data: data
  })
}

// 新增费用
export function addCost(data) {
  return request({
    url: '/amortize/cost',
    method: 'post',
    data: data
  })
}

// 修改费用
export function updateCost(data) {
  return request({
    url: '/amortize/cost',
    method: 'put',
    data: data
  })
}

// 删除费用
export function delCost(ID) {
  return request({
    url: '/amortize/cost/' + ID,
    method: 'delete'
  })
}

// 导出费用
export function exportCost(query) {
  return request({
    url: '/amortize/cost/' + 'export',
    method: 'post',
    params: query
  })
}
