<template>
  <tab-button v-ref:list>
    <tabs header="开票记录" v-if="permission('开票记录查询')">
      <e-ticket-record-list-query-v4></e-ticket-record-list-query-v4>
    </tabs>
    <tabs header="物联网表结算" v-if="permission('物联网表结算开票')">
      <e-ticket-open-iot-query-v4></e-ticket-open-iot-query-v4>
    </tabs>
    <tabs header="卡表结算"  v-if="permission('卡表结算开票')">
      <e-ticket-open-card-query-v4></e-ticket-open-card-query-v4>
    </tabs>
    <tabs header="抄表结算" v-if="permission('抄表结算开票')">
      <e-ticket-open-hand-query-v4></e-ticket-open-hand-query-v4>
    </tabs>
    <tabs header="自定义开票" v-if="permission('自定义开票')">
      <cust-query-eticket-query-v4></cust-query-eticket-query-v4>
    </tabs>
  </tab-button>
</template>

<script>
import TabButton from '../../../components/revenue/comprehen/common/TabButton'
import Tabs from '../../../components/revenue/comprehen/common/Tabs'
export default {
  name: 'eticket',
  title: '发票管理',
  components: { Tabs, TabButton },
  data () {
    return {// 页面开关
      f_start_date: '',
      f_end_date: '',
      listpage: true,
      width: {
        left: '100%',
        right: '0%'
      },
      // searchNumber:'',
      rowData: {},
      show: [true]
    }
  },
  ready () {},
  methods: {
    permission (name) {
      if (!this.$login.r.find(value => value == name)) {
        return false
      } else {
        return  true
      }
    },
    cancel (obj) {
      this.listpage = true
    },
    dealMsg (obj) {
      this.rowData = obj
      this.listpage = false
      console.log(obj.model)
      this.f_start_date = obj.model.startDate
      this.f_end_date = obj.model.endDate
    }
  }
}
</script>

<style scoped>

</style>
