import request from '@/router/axios'

export function fetchViewList(query) {
  return request({
    url: '/admin/budget/getBudgetViewPage',
    method: 'get',
    params: query
  })
}

export function fetchEntViewList(query) {
  return request({
    url: '/admin/budget/getBudgetEntViewPage',
    method: 'get',
    params: query
  })
}

export function fetchList(query) {
  return request({
    url: '/admin/budget/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/admin/budget',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/admin/budget/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/admin/budget/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/admin/budget',
    method: 'put',
    data: obj
  })
}
