import request, { postBlob, getBlob, handleImport } from '@/utils/request'

export function dailyBankTemplateImport(data) {
  return handleImport('/daily/bank/template/import', data.formdata, data.id || '')
}

export function dailyBankList(data) {
  return request({
    url: `/daily/bank/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function dailyBankListExport(data, name) {
  return postBlob({
    url: '/daily/bank/list/export',
    data,
    name
  })
}

export function dailyBankAdd(data) {
  return request({
    url: '/daily/bank/add',
    method: 'post',
    data
  })
}

export function dailyBankUpdate(data) {
  return request({
    url: '/daily/bank/update',
    method: 'post',
    data
  })
}

export function dailyBankDetail(params) {
  return request({
    url: '/daily/bank/detail',
    method: 'post',
    params
  })
}

export function dailyBankDelete(params) {
  return request({
    url: '/daily/bank/delete',
    method: 'post',
    params
  })
}
