import { getBillStatementAll, exportExcel, getByOrderNumberBillInvoice } from '@/api/billStatement'

const billStatement = {
  state: {

  },
  mutations: {

  },
  actions: {
    GetBillStatementAll({ commit }, data) { // 获取流水信息
      return new Promise((resolve, reject) => {
        getBillStatementAll(data).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },
    ExportBillStatementExcel({ commit }) { // 导出 excel
      return new Promise((resolve, reject) => {
        exportExcel().then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    },
    GetByOrderNumberBillInvoice({ commit }, orderNumber) { // 根据订单号，查询缴费单
      return new Promise((resolve, reject) => {
        getByOrderNumberBillInvoice(orderNumber).then(response => {
          resolve(response)
        }).catch(error => {
          reject(error)
        })
      })
    }
  }
}

export default billStatement
