import request from '@/utils/request'


export function getBillList(query) {
  return request({
    url: '/financial/bill/',
    method: 'get',
    params: query
  })
}
export function getBill(id) {
  return request({
    url: `/financial/bill/${id}/`,
    method: 'get'
  })
}
export function createBill(data) {
  return request({
    url: '/financial/bill/',
    method: 'post',
    data
  })
}

export function updateBill(id, data) {
  return request({
    url: `/financial/bill/${id}/`,
    method: 'put',
    data
  })
}

export function deleteBill(id) {
  return request({
    url: `/financial/bill/${id}/`,
    method: 'delete'
  })
}

export function getChargeitemList(query) {
  return request({
    url: '/financial/chargeitem/',
    method: 'get',
    params: query
  })
}

export function createChargeitem(data) {
  return request({
    url: '/financial/chargeitem/',
    method: 'post',
    data
  })
}

export function updateChargeitem(id, data) {
  return request({
    url: `/financial/chargeitem/${id}/`,
    method: 'put',
    data
  })
}

export function deleteChargeitem(id) {
  return request({
    url: `/financial/chargeitem/${id}/`,
    method: 'delete'
  })
}
