import request from '@/utils/request'

// 创建其他资料
export function createOther(data) {
  return request({
    url: '/accounting/other/create',
    method: 'post',
    data: data
  })
}

// 更新其他资料
export function updateOther(data) {
  return request({
    url: '/accounting/other/update',
    method: 'put',
    data: data
  })
}

// 删除其他资料
export function deleteOther(id) {
  return request({
    url: '/accounting/other/delete?id=' + id,
    method: 'delete'
  })
}

// 获得其他资料
export function getOther(id) {
  return request({
    url: '/accounting/other/get?id=' + id,
    method: 'get'
  })
}

// 获得其他资料分页
export function getOtherPage(query) {
  return request({
    url: '/accounting/other/page',
    method: 'get',
    params: query
  })
}

// 导出其他资料 Excel
export function exportOtherExcel(query) {
  return request({
    url: '/accounting/other/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 下载元数据
export function downloadXml(query) {
  return request({
    url: '/accounting/other/downloadXml',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
