<template>
  <partial-view v-ref:pv>
    <div class="panel panel-info auto" >
      <div class="panel-heading"  style="height: 30px">
        <h4 style="display:inline-block;margin-top: auto">档案信息</h4>
      </div>
      <div class="auto info-content">
        <div class="row">
          <label class = "col-sm-5 ">客户名称:</label>
          <span class = "col-sm-7">{{data?data.f_user_name:dafault.f_user_name}}</span>
        </div>
        <div class="row">
          <label class = "col-sm-5 ">客户编号:</label>
          <span class = "col-sm-7" @click="dealmsg(data)"><a>{{data?data.f_userinfo_code:dafault.f_userinfo_code}}</a></span>
          <!--          <span class = "col-sm-7">{{data.f_userinfo_code}}</span>-->
        </div>
        <div class="row">
          <label class = "col-sm-5 ">身份证号:</label>
          <span class = "col-sm-7">{{data?data.f_idnumber:dafault.f_idnumber}}</span>
        </div>
        <div class="row">
          <label class = "col-sm-5 ">客户电话:</label>
          <span class = "col-sm-7">{{data?data.f_user_phone:dafault.f_user_phone}}</span>
        </div>
        <div class="row">
          <label class = "col-sm-5 " id="address1">客户地址:</label>
          <span class = "col-sm-7" id="address">{{data?data.f_address:dafault.f_address}}</span>
        </div>
        <div class="row">
          <label class = "col-sm-5 ">客户类型:</label>
          <span class = "col-sm-7">{{data?data.f_user_type:dafault.f_user_type}}</span>
        </div>
        <div class="row">
          <label class = "col-sm-5 ">开户时间:</label>
          <span class = "col-sm-7">{{data?data.f_open_date:dafault.f_open_date}}</span>
        </div>
      </div>
    </div>
  </partial-view>
</template>

<script>
  /**
   *用户档案相关信息组件
   */

  export default {
    ready () {
      console.log('看看userinfo里面接收的data数据：', this.data)
    },
    title: '客户基本信息',
    data () {
      return {
        dafault:{
          f_user_name:"**",
          f_userinfo_code:"********",
          f_idnumber:"****",
          f_user_phone:"************",
          f_address:"**街道**小区*栋*单元*层***室",
          f_user_type:"**",
          f_open_date:"****年**月**日"

        },
        model: null
      }
    },
    props: ['data'],
    methods:{
      dealmsg (val) {
        if (val != this.default.f_userinfo_code) {
          this.$dispatch('deal-msg', val)
        }
      },
    },
    watch: {
      'data' (val) {
      }
    }
  }
</script>
<style lang="less">
  .row {
    /*border-bottom:1px solid #F2F6FA;*/
    margin-left: 0;
    margin-right: 0;
  }
  // . {
  //   height: 23px;
  //   border-right: 1px solid #F2F6FA;
  //   margin-bottom: 0;
  //   text-align: left;
  // }
  // #address {
  //   border-left: 1px solid #F2F6FA;
  // }
  // #user-info {
  //   padding:6px;
  //   span {
  //     padding-left: 5px;
  //   }
  // }
  // #address1 {
  //   border-right: 0;
  // }
</style>
