<template>
  <div class="auto">
    <div class="row" style="display: flex;justify-content: center;" v-if="billshow" id="testbill">
      {{{ admiss.data}}}
    </div>
    <div style="text-align:right;height:auto;margin-top:30px;margin-right:50px;">
      <report-print id='testbill' v-if="billshow" top='55mm' left='60mm' width='100%' height='80%' style='td,th{font-size: 10pt!important;border: 0;font-size: 19px;} tdright {text-align:right}'
       :notrepeat="true" v-if= 'bill.data && clean.f_bill_id'></report-print>
      <button class="btn btn-default" @click="clean()">取消</button>
    </div>
  </div>
</template>
<script>
/**
*票据补打
*/
import { DataModel } from 'vue-client'
export default {
  title: '机表发卡',
  data () {
    return {
      admiss: new DataModel('rs/report/machineCard_bill2'),
      billshow: false
    }
  },
  props: ['data'],
  watch: {
    'data' (val) {
      if (val) {
        console.log(val, val)
        this.billshow = true
      }
    }
  },
  methods: {
    clean () {
      this.$dispatch('hiddenModal')
    }
  },
  events: {
    'print-success' () {
      this.$dispatch('hiddenModal')
    }
  }
}
</script>
