import request from '@/utils/httpRequest'

export default class reimbursementIsNoTicketService {
  findList (params) {
    return request({
      url: '/accountant/reimbursementBusinessTwo/findListPage',
      method: 'get',
      params: params
    })
  }

  saveBusiness (inputForm) {
    return request({
      url: `/accountant/reimbursement/saveBusiness`,
      method: 'post',
      data: inputForm
    })
  }

  saveGatheringTime (inputForm) {
    return request({
      url: `/accountant/reimbursement/saveGatheringTime`,
      method: 'post',
      data: inputForm
    })
  }
  getBusinessById (id) {
    return request({
      url: `/accountant/reimbursementBusiness/getBusinessById`,
      method: 'get',
      params: {id: id}
    })
  }
  queryById (id) {
    return request({
      url: `/accountant/reimbursementUser/queryById`,
      method: 'get',
      params: {id: id}
    })
  }
  updateReimbursementRatio (inputForm) {
    return request({
      url: `/accountant/reimbursement/updateReimbursementRatio`,
      method: 'post',
      data: inputForm
    })
  }

  saveInvoice (inputForm) {
    return request({
      url: `/accountant/reimbursement/saveInvoice`,
      method: 'post',
      data: inputForm
    })
  }

  modifyInvoice (inputForm) {
    return request({
      url: `/accountant/reimbursement/modifyInvoice`,
      method: 'post',
      data: inputForm
    })
  }

  deleteBusiness (ids) {
    return request({
      url: '/accountant/reimbursement/deleteBusiness',
      method: 'delete',
      params: {ids: ids}
    })
  }

  deleteInvoice (ids) {
    return request({
      url: '/accountant/reimbursementBusinessTwo/delById/' + ids,
      method: 'delete',
      params: {ids: ids}
    })
  }

  delete (ids) {
    return request({
      url: '/accountant/reimbursement/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }

  queryBusinessById (id) {
    return request({
      url: `/accountant/reimbursement/queryBusinessById`,
      method: 'get',
      params: {id: id}
    })
  }

  queryBusinessByInvoiceId (id) {
    return request({
      url: `/accountant/reimbursement/queryBusinessByInvoiceId`,
      method: 'get',
      params: {id: id}
    })
  }

  queryInvoiceById (id) {
    return request({
      url: `/accountant/reimbursement/queryInvoiceById`,
      method: 'get',
      params: {id: id}
    })
  }

  addBatchReimbursement (invoiceNumbers) {
    return request({
      url: '/accountant/reimbursement/addBatchReimbursement',
      method: 'put',
      params: {
        invoiceNumbers: invoiceNumbers
      }
    })
  }

  findSelectList () {
    return request({
      url: '/accountant/reimbursementBusinessTwo/findSelectList',
      method: 'post'
    })
  }

  modifyBindCode (params) {
    return request({
      url: '/accountant/reimbursementBusinessTwo/modifyBindCode',
      method: 'post',
      params: params
    })
  }

  findSelectYearList () {
    return request({
      url: '/accountant/reimbursementBusinessTwo/findSelectYearList',
      method: 'post'
    })
  }

  findSelectCodeListByYear (year) {
    return request({
      url: '/accountant/reimbursementBusinessTwo/findSelectCodeListByYear/' + year,
      method: 'post'
    })
  }

  exportExcel (params) {
    return request({
      url: '/accountant/reimbursementBusinessTwo/export',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
}
