<template>
  <div class="auto" style="overflow-y: hidden;height: 100%;">
    <!--<partial-view v-ref:pv>-->
      <div class="panel panel-info ">
        <div class="panel-heading auto" style="text-align: center">
          <h4 style="display:inline-block;">档案信息</h4>
        </div>
        <div class="panel-body auto">
          <div class="row">
            <label class="col-sm-3 control-label">客户名称:</label>
            <span class="col-sm-3">{{model.f_user_name}}</span>
            <label class="col-sm-3 control-label">客户编号:</label>
            <span class="col-sm-3">{{model.f_userinfo_code}}</span>
          </div>
          <div class="row">
            <label class="col-sm-3 control-label">客户结余:</label>
            <span class="col-sm-3">{{model.f_balance}}</span>
            <label class="col-sm-3">用户电话:</label>
            <span class="col-sm-3">{{model.f_user_phone}}</span>
          </div>

          <div class="row">
            <label class="col-sm-3 control-label">客户地址:</label>
            <span class="col-sm-9">{{model.f_address}}</span>
          </div>
          <div class="row">
            <label class="col-sm-3 control-label">建档时间:</label>
            <span class="col-sm-6">{{model.f_createfile_date}}</span>
          </div>
        </div>
      </div>
  </div>

</template>

<script>

  import { HttpResetClass } from 'vue-client'

  let getUserinfoGen = async function (self) {
    let http = new HttpResetClass()
    let res = await http.load('POST', 'rs/sql/sale_getUserinfoDetail', {
      data: {
        condition: `f_userinfo_id = '${self.data.f_userinfo_id}'`
      }
    }, {resolveMsg: null, rejectMsg: '获取用户信息失败'})
    console.log('获取的用户信息。。', res)
    self.model = Object.assign({}, self.model, res.data[0])
  }
  export default {
    title: '档案信息',
    data () {
      return {
        model: {}
      }
    },
    props: ['data'],
    ready () {
      console.log('用户详细信息', this.data)
      getUserinfoGen(this)
    }
  }
</script>

<style>

</style>
