<template>
<!--  <div v-if="listpage">-->
    <tab-button v-ref:list>
      <tabs header="批量销户审核" v-if="permission('批量销户审核')">
        <battch-canceluser-audit @deal-msg="dealMsg"></battch-canceluser-audit>
      </tabs>
      <tabs header="修改抄表员" v-if="permission('修改抄表员')">
        <batch-update-inputtor @deal-msg="dealMsg"></batch-update-inputtor>
      </tabs>
      <tabs header="修改表档案" v-if="permission('修改表档案')">
        <batch-edit-manage @deal-msg="dealMsg"></batch-edit-manage>
      </tabs>
      <tabs header="批量补扣费" v-if="permission('批量补扣费')">
        <batch-edit-manage @deal-msg="dealMsg"></batch-edit-manage>
      </tabs>
    </tab-button>
</template>

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

  export default {
    name: 'Batchmanage',
    title: '批量管理',
    data () {
      return {// 页面开关
        f_start_date: '',
        f_end_date: '',
        listpage: true,
        width: {
          left: '100%',
          right: '0%'
        },
        // searchNumber:'',
        rowData: {},
        show: [true]
      }
    },
    components: { Tabs, TabButton, Closeaccount },
    ready () {
      if (!this.permission('批量销户审核') && !this.permission('修改抄表员') && !this.permission('修改表档案') &&
      !this.permission('批量补扣费')) {
        this.$showAlert('您没有该页面的内容权限，请向管理员申请', 'warning', 3000)
      }
    },
    methods: {
      permission (name) {
        return this.$login.r.find(value => value == name)
      },
      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>
