import request from '@/utils/request'

// 创建银行回单
export function createBankSlip(data) {
  return request({
    url: '/archives/bank-slip/create',
    method: 'post',
    data: data
  })
}

// 更新银行回单
export function updateBankSlip(data) {
  return request({
    url: '/archives/bank-slip/update',
    method: 'put',
    data: data
  })
}

// 删除银行回单
export function deleteBankSlip(id) {
  return request({
    url: '/archives/bank-slip/delete?id=' + id,
    method: 'delete'
  })
}

// 获得银行回单
export function getBankSlip(id) {
  return request({
    url: '/archives/bank-slip/get?id=' + id,
    method: 'get'
  })
}

// 获得银行回单分页
export function getBankSlipPage(query) {
  return request({
    url: '/archives/bank-slip/page',
    method: 'get',
    params: query
  })
}

// 获得银行回单分页2
export function getBankSlipPageTime(query) {
  return request({
    url: '/archives/bank-slip/pageTime',
    method: 'get',
    params: query
  })
}

// 导出银行回单 Excel
export function exportBankSlipExcel(query) {
  return request({
    url: '/archives/bank-slip/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

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