<template>
<!--    <div v-if="listpage">-->
  <tab-button v-ref:list>
    <tabs header="发票管理">
      <e-ticket-manage @deal-msg="dealMsg"></e-ticket-manage>
    </tabs>
    <tabs header="抬头录入">
      <company-info-manage @deal-msg="dealMsg"></company-info-manage>
    </tabs>
    <tabs header="商品信息录入">
      <goods-info-manage @deal-msg="dealMsg"></goods-info-manage>
    </tabs>
  </tab-button>
<!--    </div>-->
<!--    <div v-if="!listpage">-->
<!--      <meter-info-manage :row="rowData" :f_start_date="f_start_date" :f_end_date="f_end_date"></meter-info-manage>-->
<!--    </div>-->
</template>

<script>
import TabButton from '../../common/TabButton.vue'
import Tabs from '../../common/Tabs.vue'

export default {
  name: 'EticketCommon',
  title: '发票公共管理',
  data () {
    return {// 页面开关
      f_start_date: '',
      f_end_date: '',
      listpage: true,
      width: {
        left: '100%',
        right: '0%'
      },
      // searchNumber:'',
      rowData: {},
      show: [true]
    }
  },
  components: {Tabs, TabButton},
  ready () {
    console.log(this.$refs.list)
    console.log('发票管理')
  },
  methods: {
    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>
