<template>
  <div class="auto">
    <partial-view v-ref:pv>
      <div class="row">
        <label class = "col-sm-4">客户编号:</label>
        <span class = "col-sm-8" style="text-align:left">{{model.f_userinfo_code}}</span>
      </div>
      <div class="row">
        <label class = "col-sm-4">客户名称:</label>
        <span class = "col-sm-8" style="text-align:left">{{model.f_user_name}}</span>
      </div>
      <div class="row">
        <label class = "col-sm-4">开&ensp;通&ensp;人:</label>
        <span class = "col-sm-8" style="text-align:left">{{model.f_operator}}</span>
      </div>
      <div class="row">
        <label class = "col-sm-4">开通时间:</label>
        <span class = "col-sm-8" style="text-align:left">{{model.f_open_date}}</span>
      </div>
    </partial-view>
  </div>
</template>

<script>
  export default {
    title: '开通详情',
    props: ['data'],
    data () {
      return {
        model: {}
      }
    },
    ready () {
      let sql = 'sale_openMeter'
      this.$info(`加载数据中, sqlname:${sql}`)
      this.$refs.pv.load('rs/logic/getOneData', {data: {sql: sql, params: {id: this.data.id}}}).then((a) => {
        this.model = a.data
        this.$info(`加载数据成功, model:${JSON.stringify(this.model)}`)
      }).catch((error) => {
        if (error.status) {
          this.$warn(`加载数据出错, ${JSON.stringify(error)}`)
          return
        }
        throw error
      })
    }
  }
</script>
