<template>
  <div class="col-sm-12">
      <div class="col-sm-5 auto" style="height: 100%;">
        <meter-msg :searchdata="row"></meter-msg>
      </div>
    <div class="col-sm-7" style="padding-right:10px;height: 100%;">
      <criteria partial='criteria' v-ref:criteria  @condition-changed='search'>
        <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
        </div>
      </criteria>
      <tabset v-ref:tabs :close="false">
        <tab header="流水查询" >
          <meter-ls-query  :searchdata="row" :args="args" v-if="$refs.tabs.active === 0"></meter-ls-query>
        </tab>
        <tab header="收费查询" >
          <meter-charge-query  :searchdata="row" :args="args" v-if="$refs.tabs.active === 1"></meter-charge-query>
        </tab>
        <tab header="换表查询">
          <meter-change-meter-query :searchdata="row" :args="args" v-if="$refs.tabs.active === 2"></meter-change-meter-query>
        </tab>
        <tab header="补卡查询">
          <meter-fill-card-query :searchdata="row" :args="args" v-if="$refs.tabs.active === 3"></meter-fill-card-query>
        </tab>
        <tab header="补气查询">
          <meter-fill-gas-query :searchdata="row" :args="args" v-if="$refs.tabs.active === 4"></meter-fill-gas-query>
        </tab>
      </tabset>
    </div>
    </div>
</template>

<script>
  import ChargeQuery from './ChargeQuery'
  import OtherChargeQuery from './OtherChargeQuery'
  import HandQuery from './HandQuery'
  import ReversalQuery from './ReversalQuery'

  export default {
    title: '机表',
    components: {
      ChargeQuery,
      OtherChargeQuery,
      HandQuery,
      ReversalQuery
    },
    props:
      {
        row:'',
        isdeal:{},
        f_start_date:'',
        f_end_date:''
      },
    data() {
      return {
        args:null,
        condition: '',
        rowdata: {},
      }
    },
    methods: {
      search (args) {
        console.log('-------------search')
        this.args = args
      },
    },
    ready () {
      console.log(this.f_end_date,'---------------------ready')
      console.log(this.f_start_date,'---------------------ready')
      this.$refs.criteria.model.f_start_date = this.f_start_date
      this.$refs.criteria.model.f_end_date = this.f_end_date
      this.$refs.criteria.search()
    },
    watch: {

    }
  }
</script>
