<template>
  <div class="auto">
    <partial-view v-ref:pv>
      <!-- <div class="row"> -->
        <!-- <label class = "col-sm-4">客户姓名:</label> -->
        <!-- <span style="padding:0" class = "col-sm-3" style="text-align:left">{{model[0].f_user_name}}</span> -->
        <!-- <label class = "col-sm-4">操作人:</label>
        <span class = "col-sm-8" style="text-align:left">{{model.f_operator}}</span> -->
      <!-- </div> -->
      <table class="table table-bordered table-condensed self-table" id="table" >
          <!-- <tr>
             <td><b>缴费账户</b></td>
             <td>{{data.f_user_name}}</td>
          </tr> -->
          <tr>
             <td><b>缴费类型</b></td>
             <td>{{model.f_paytype}}</td>
          </tr>
          <tr>
            <td><b>缴费金额</b></td>
            <td>{{model.f_fee}}</td>
          </tr>
          <tr>
            <td><b>交款人</b></td>
            <td>{{model.f_payer}}</td>
          </tr>
          <tr>
            <td><b>缴费日期</b></td>
            <td>{{model.f_date}}</td>
          </tr>
      </table>

    </partial-view>
  </div>
</template>

<script>
import Table from '../../../../Table'
export default {
  title: '报建收费',
  props: ['data'],
  data () {
    return {
      model: {}
    }
  },
  ready () {
    console.log('rrrrrrrrrrrrrrr', this.data)
    let sql = 'singleTable_OrderBy'
    let condition = {
      items: '*',
      tablename: 't_paydetail',
      condition: 'id = ' + this.data.id,
      orderitem: '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
      console.log('1111111model', this.model)
      console.log('1111111data', a.data)
    }).catch((error) => {
      if (error.status) {
        this.$warn(`加载数据出错, ${JSON.stringify(error)}`)
        return
      }
      throw error
    })
  },
  methods: {
    // 获取表中字段对应的中文名
    getValue (key) {
      return Table.data[key]
    }
  }
}
</script>
