import request from '@/utils/request'

// 查询cmc借款申请列表
export function listBorrow(query) {
  return request({
    url: '/oa/borrow/list',
    method: 'get',
    params: query
  })
}

// 查询cmc借款申请详细
export function getBorrow(borrowId) {
  return request({
    url: '/oa/borrow/' + borrowId,
    method: 'get'
  })
}

// 新增cmc借款申请
export function addBorrow(data) {
  return request({
    url: '/oa/borrow',
    method: 'post',
    data: data
  })
}

// 修改cmc借款申请
export function updateBorrow(data) {
  return request({
    url: '/oa/borrow',
    method: 'put',
    data: data
  })
}

// 删除cmc借款申请
export function delBorrow(borrowId) {
  return request({
    url: '/oa/borrow/' + borrowId,
    method: 'delete'
  })
}
