import request from '@/utils/request'

// 查询费用项目数据列表
export function listData(query) {
  return request({
    url: '/finance/expense/item/page',
    method: 'get',
    params: query
  })
}

// 查询费用项目数据详细
export function getData(dictCode) {
  return request({
    url: '/finance/expense/item/get?id=' + dictCode,
    method: 'get'
  })
}



// 新增费用项目数据
export function addData(data) {
  return request({
    url: '/finance/expense/item/create',
    method: 'post',
    data: data
  })
}

// 修改费用项目数据
export function updateData(data) {
  return request({
    url: '/finance/expense/item/update',
    method: 'put',
    data: data
  })
}

// 删除费用项目数据
export function delData(dictCode) {
  return request({
    url: '/finance/expense/item/delete?id=' + dictCode,
    method: 'delete'
  })
}

// 导出费用项目数据
export function exportData(query) {
  return request({
    url: '/finance/expense/item/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}