<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_user_name}}</span>
      </div>
      <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-2" style="text-align:left">{{model.f_brand_spec}}</span>-->
        <label class = "col-sm-4">收费金额:</label>
        <span class = "col-sm-2" style="text-align:left">{{model.f_collection}}</span>
      </div>
      <div class="row">
        <label class = "col-sm-4">备注:</label>
        <span class = "col-sm-8" style="text-align:left">{{model.f_comments}}</span>
      </div>
      <div class="row">
        <label class = "col-sm-4">操作人:</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">{{data.f_operate_date}}</span>
      </div>
    </partial-view>
  </div>
</template>

<script>
export default {
  title: '其他收费详情',
  props: ['data'],
  data () {
    return {
      model: {}
    }
  },
  ready () {
    let sql = ''
    if (this.data.type === '其他收费欠费登记' || this.data.type === '其他收费欠费登记撤销') {
      sql = 'otherChangenopay'
    }else{
      sql = 'otherChange'
    }
    let condition = {
      id: this.data.id,
      f_userinfo_id: this.data.f_userinfo_id + ''
    }
    this.$info(`加载数据中, sqlname:${sql}`)
    this.$refs.pv.load('rs/logic/getOneData', {data: {sql: sql, params: {condition: condition}}}).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>
