<template>
  <div class="auto">
    <partial-view v-ref:pv>
      <div class="col-sm-12">
        <label>客户名称：</label>{{model.f_user_name}}
      </div>
      <div class="col-sm-12">
        <label>接表状态：</label>{{model.f_ispick_table}}
      </div>
      <div class="col-sm-12">
        <label>补卡原因：</label>{{model.f_comments}}
      </div>
      <div class="col-sm-12" v-if ="model.f_comments=== 'IC卡丢失' ">
        <label>卡费：</label>{{model.f_cardfees}}
      </div>
      <div class="col-sm-12">
        <label>操作人：</label>{{model.f_operator}}
      </div>
    </partial-view>
  </div>
</template>

<script>
  export default {
    title: '补卡管理详情',
    props: ['data'],
    data () {
      return {
        model: {}
      }
    },
    ready () {
      let sql = 'fillCardMsg'
      let condition = {
        id: this.data.id,
        f_userinfo_id: this.data.f_userinfo_id
      }
      this.$info(`加载数据中..., sql:${sql}`)
      this.$refs.pv.load('rs/logic/getOneData', {data: {sql: sql, params: condition}}).then((a) => {
        this.$info(`成功获取到数据！, data:${JSON.stringify(a.data)}`)
        this.model = a.data
      }).catch((error) => {
        if (error.status) {
          this.$warn(`加载数据出错, ${JSON.stringify(error)}`)
          return
        }
        throw error
      })
    }
  }
</script>
