<template>
  <tab-button v-ref:list :active="-1">
    <tabs header="欠费查询" v-if="permission('欠费查询')">
      <arrears-query v-if="show.includes('欠费查询')"></arrears-query>
    </tabs>
    <tabs header="非收费业务查询" v-if="permission('非收费业务查询')">
      <no-business-query v-if="show.includes('非收费业务查询')"  @deal-msg="dealMsg"></no-business-query>
    </tabs>
    <tabs header="小区综合查询" v-if="!newWebHand&&permission('小区综合查询')">
      <area-general-query v-if="show.includes('小区综合查询')"  @deal-msg="dealMsg"></area-general-query>
    </tabs>
    <tabs header="小区综合查询" v-if="newWebHand&&permission('小区综合查询')">
      <new-area-general-query v-if="show.includes('小区综合查询')"  @deal-msg="dealMsg"></new-area-general-query>
    </tabs>
    <tabs header="小区收费查询" v-if="permission('小区收费查询')">
      <area-charge-query v-if="show.includes('小区收费查询')"  @deal-msg="dealMsg"></area-charge-query>
    </tabs>
    <tabs header="小区汇总（机表）" v-if="permission('小区汇总（机表）')">
      <residential-query v-if="show.includes('小区汇总（机表）')"  @deal-msg="dealMsg"></residential-query>
    </tabs>
    <tabs header="小区汇总（物联网）" v-if="permission('小区汇总（物联网）')">
      <web-residential-query v-if="show.includes('小区汇总（物联网）')"  @deal-msg="dealMsg"></web-residential-query>
    </tabs>
    <tabs header="小区汇总（卡表）" v-if="permission('小区汇总（卡表）')">
      <residential-card-query v-if="show.includes('小区汇总（卡表）')"  @deal-msg="dealMsg" ></residential-card-query>
    </tabs>
    <!--<tabs header="小区欠费汇总（机表）" v-if="permission('小区欠费汇总（机表）')">-->
      <!--<residential-arrears-query v-if="show.includes('小区欠费汇总（机表）')"  @deal-msg="dealMsg"></residential-arrears-query>-->
    <!--</tabs>-->
    <tabs header="收费员汇总表" v-if="permission('收费员汇总表')">
      <sell-people-query v-if="show.includes('收费员汇总表')" @deal-msg="dealMsg"></sell-people-query>
    </tabs>
    <tabs header="分公司汇总表" v-if="permission('分公司汇总表')">
      <sell-orgname-query v-if="show.includes('分公司汇总表')"  @deal-msg="dealMsg"></sell-orgname-query>
    </tabs>
    <tabs header="抄表员统计" v-if="permission('抄表员统计')">
      <hand-people-query v-if="show.includes('抄表员统计')"  @deal-msg="dealMsg"></hand-people-query>
    </tabs>
    <!--<tabs header="开户查询" v-if="permission('开户查询')">-->
      <!--<new-account-query v-if="show == '开户查询'"  @deal-msg="dealMsg"></new-account-query>-->
    <!--</tabs>-->
    <tabs header="用气查询" v-if="permission('用气查询')">
      <fmygas-query v-if="show.includes('用气查询')"  @deal-msg="dealMsg"></fmygas-query>
    </tabs>
    <tabs header="物联网用气查询" v-if="newWebHand && permission('物联网用气查询')">
      <newfmygas-query v-if="show.includes('物联网用气查询')"  @deal-msg="dealMsg"></newfmygas-query>
    </tabs>
    <tabs header="气费回收率" v-if="permission('气费回收率')">
      <hand-rate-query v-if="show.includes('气费回收率')"  @deal-msg="dealMsg"></hand-rate-query>
    </tabs>
    <tabs header="收费抄表" v-if="permission('收费抄表')">
      <selling-hand v-if="show.includes('收费抄表')" @deal-msg="dealMsg"></selling-hand>
    </tabs>
    <tabs header="月用气状况" v-if="permission('月用气状况')">
      <month-gas-query v-if="show.includes('月用气状况')"  @deal-msg="dealMsg"></month-gas-query>
    </tabs>
    <tabs header="用户余额分析" v-if="permission('用户余额分析')">
      <user-sell-head-detail v-if="show.includes('用户余额分析')" @deal-msg="dealMsg"></user-sell-head-detail>
    </tabs>
    <!--<tabs header="年度月份用量分析" v-if="permission('年度月份用量分析')">-->
      <!--<year-gas-query v-if="show == '年度月份用量分析'"  @deal-msg="dealMsg"></year-gas-query>-->
    <!--</tabs>-->
    <!--<tabs header="余额统计查询" v-if="permission('余额统计查询')">-->
      <!--<balance-query v-if="show == '余额统计查询'"  @deal-msg="dealMsg"></balance-query>-->
    <!--</tabs>-->
    <tabs header="用户余额表" v-if="permission('用户余额表')">
      <balance-table v-if="show.includes('用户余额表')"  @deal-msg="dealMsg"></balance-table>
    </tabs>
    <tabs header="抄表册统计" v-if="permission('抄表册统计')">
      <hand-book-query v-if="show.includes('抄表册统计')"  @deal-msg="dealMsg"></hand-book-query>
    </tabs>
    <tabs header="抄表册统计2" v-if="permission('抄表册统计2')">
      <hand-book-two-query v-if="show.includes('抄表册统计2')"  @deal-msg="dealMsg"></hand-book-two-query>
    </tabs>
    <tabs header="用气性质抄表率统计" v-if="permission('用气性质抄表率统计')">
      <hand-gas-properties-query v-if="show.includes('用气性质抄表率统计')"  @deal-msg="dealMsg"></hand-gas-properties-query>
    </tabs>
    <tabs header="每月应收汇总统计" v-if="permission('每月应收汇总统计')">
      <hand-gas-query v-if="show.includes('每月应收汇总统计')"  @deal-msg="dealMsg"></hand-gas-query>
    </tabs>
    <tabs header="小区缴费汇总(机表)" v-if="permission('小区缴费汇总(机表)')">
      <community-paymen v-if="show.includes('小区缴费汇总(机表)')"  @deal-msg="dealMsg"></community-paymen>
    </tabs>
    <tabs header="预存明细查询" v-if="permission('预存明细查询')">
      <deposit-detail v-if="show.includes('预存明细查询')" @deal-msg="dealMsg"></deposit-detail>
    </tabs>
    <tabs header="小区用户分布统计" v-if="permission('小区用户分布统计')">
      <plot-summary-query v-if="show.includes('小区用户分布统计')"  @deal-msg="dealMsg"></plot-summary-query>
    </tabs>
    <tabs header="用户用气收费情况" v-if="permission('用户用气收费情况')">
      <usergas v-if="show.includes('用户用气收费情况')"  @deal-msg="dealMsg"></usergas>
    </tabs>
    <tabs header="卡表用户结余明细" v-if="permission('卡表用户结余明细')">
      <yonghu-jieyu v-if="show.includes('卡表用户结余明细')"  @deal-msg="dealMsg"></yonghu-jieyu>
    </tabs>
    <tabs header="应收实收明细" v-if="permission('应收实收明细')">
      <ying-shou-ming-xi v-if="show.includes('应收实收明细')"  @deal-msg="dealMsg"></ying-shou-ming-xi>
    </tabs>
    <tabs header="操作员日结列表" v-if="permission('操作员日结列表')">
      <proceeds-oper v-if="show.includes('操作员日结列表')"  @deal-msg="dealMsg"></proceeds-oper>
    </tabs>
    <tabs header="抄表情况记录表" v-if="permission('抄表情况记录表')">
      <handplan-info v-if="show.includes('抄表情况记录表')"  @deal-msg="dealMsg"></handplan-info>
    </tabs>
    <tabs header="未抄表用户报表" v-if="permission('未抄表用户报表')">
      <unhand-business @deal-msg="dealMsg"></unhand-business>
    </tabs>
    <tabs header="明细报表查询" v-if="permission('明细报表查询')">
      <report-detail ></report-detail>
    </tabs>
    <tabs header="重点用户用气排行查询" v-if="permission('重点用户用气排行查询')">
      <key-user-gas-ranking v-if="show.includes('重点用户用气排行查询')"  @deal-msg="dealMsg" ></key-user-gas-ranking>
    </tabs>
  </tab-button>

</template>

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

  export default {
    title: '汇总查询',
    data () {
      return {
        f_start_date: '',
        f_end_date: '',
        listpage: true,
        width: {
          left: '100%',
          right: '0%'
        },
        // searchNumber:'',
        rowData: {},
        newWebHand: this.$appdata.getSingleValue('新抄表'),
        show: []
      }
    },
    components: {Tabs, TabButton},
    methods: {
      permission (name) {
        console.log(this.$login.r)
        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>
