<template>
  <div id="centeManage"  class="flex-row" :class="{'binary':appshow}" >
    <div :class="{'basic-main':!appshow,'binary-left':appshow}" style="height:98%" >
    <tab-button  v-ref:list >
      <tabs header="卡表收费补差" v-if="permission('卡表收费补差')">
        <card-selling-difference  ></card-selling-difference>
      </tabs>
      <tabs header="机表抄表补差" >
        <card-selling-difference   ></card-selling-difference>
      </tabs>
    </tab-button>
    </div>
    <div :class="{'binary-right':appshow}" v-if="appshow" style="height:98%;">
      <card-price-adjustment :id="sellids"></card-price-adjustment>
    </div>
  </div>
</template>

<script>
import TabButton from '../comprehen/common/TabButton'
import Tabs from '../comprehen/common/Tabs'
import cardSellingDifference from './cardMange/cardSellingDifference'
import cardPriceAdjustment from './CardPriceAdjustment'
export default {
  name: 'difference',
  title: '补差管理',
  components: {Tabs, TabButton,
    cardSellingDifference,cardPriceAdjustment  //卡表收费
  },
  data () {
    return {// 页面开关
      appshow:false,
      show:[],
      sellids:[],
    }
  },
  ready () {},
  methods: {
    permission (name) {
      if (!this.$login.r.find(value => value === name)) {
        return false
      }
      return true
    },
  },
  events:{
    person(row){
      this.sellids=[]
      console.log("什么")
      this.appshow=true
      // row.forEach(function (item) {
      //   console.log('item', item.id)
      //   this.sellids.push(item.id)
      // })
    },
    cancel(){
      this.appshow=false
      this.sellids=[]
    }
  }
}
</script>

<style lang="less">
  #centeManage {
    .form-horizontal {
      .row {
        background-color: white;
      }
    }
    .list_area {
      tr {
        th {
          text-align: center;
        }
        td {
          text-align: center;
        }
      }
    }
  }
</style>
