import request from '@/utils/request'

// 查询列表
export function listExpenseInfo(query) {
  return request({
    url: '/finance/expense/info/page',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getExpenseInfo(dictId) {
  return request({
    url: '/finance/expense/info/get?id=' + dictId,
    method: 'get'
  })
}

// 新增
export function addExpenseInfo(data) {
  return request({
    url: '/finance/expense/info/create',
    method: 'post',
    data: data
  })
}

// 修改
export function updateExpenseInfo(data) {
  return request({
    url: '/finance/expense/info/update',
    method: 'put',
    data: data
  })
}

// 删除
export function delExpenseInfo(dictId) {
  return request({
    url: '/finance/expense/info/delete?id=' + dictId,
    method: 'delete'
  })
}

// 导出
export function exportExpenseInfo(query) {
  return request({
    url: '/finance/expense/info/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}