<template>
<div style="text-align:center;margin-left: 10%">
  <table class="table">
    <tr >
      <td style="width: 200px">姓名</td>
      <td colspan="3" style="width: 600px">{{row[0].f_user_name}}</td>
    </tr>
    <tr>
      <td >电话</td>
      <td>{{row[0].f_user_phone}}</td>
      <td>用户状态</td>
      <td>{{row[0].f_user_state}}</td>
    </tr>
    <tr>
      <td >证件类型</td>
      <td>{{row[0].f_credentials}}</td>
      <td >证件号码</td>
      <td>{{row[0].f_idnumber}}</td>
    </tr>
    <tr>
      <td>用户类型</td>
      <td>{{row[0].f_user_type}}</td>
      <td>建档时间</td>
      <td>{{row[0].f_createfile_date}}</td>
    </tr>
    <tr>
      <td>用户编号</td>
      <td>{{row[0].f_userinfo_code}}</td>
      <td>用户卡号</td>
      <td>{{row[0].f_card_id}}</td>
    </tr>
    <tr>
      <td>街道</td>
      <td>{{row[0].f_street}}</td>
      <td>小区</td>
      <td>{{row[0].f_residential_area}}</td>
    </tr>
    <tr>
      <td>汽车品牌</td>
      <td>{{row[0].f_meter_brand}}</td>
      <td>表号</td>
      <td>{{row[0].f_meternumber}}</td>
    </tr>
    <tr>
      <td>用户地址</td>
      <td colspan="3">{{row[0].f_address}}</td>
    </tr>
    <tr>
      <td>气价类型</td>
      <td>{{row[0].f_gasproperties}}</td>
    </tr>
    <tr>
      <td colspan="4"></td>
    </tr>
    <tr>
      <td>开户银行</td>
      <td>{{row[0].f_bankname}}</td>
      <td>银行账号</td>
      <td>{{row[0].f_idofcard}}</td>
    </tr>
    <tr>
      <td>发票（增值税）信息</td>
      <td colspan="3"></td>
    </tr>
    <tr>
      <td>公司名称</td>
      <td colspan="3">{{row[0].f_gongsiname}}</td>
    </tr>
    <tr>
      <td>纳税人识别号</td>
      <td colspan="3">{{row[0].f_shibieid}}</td>
    </tr>
    <tr>
      <td>地址电话</td>
      <td colspan="3">{{row[0].f_addrphone}}</td>
    </tr>
    <tr>
      <td>开户行及账号</td>
      <td colspan="3">{{row[0].f_bankcardid}}</td>
    </tr>
    <tr>
      <!--<td><button class="btn btn-success width-60" @click="confirm()" v-if="this.row.length > 0">销户</button></td>
      <td colspan="3"><button class="btn btn-success width-60" @click="dele()" v-if="this.row.length > 0">删除</button></td>-->
    </tr>
  </table>
</div>
</template>

<script>
export default {
  title: '显示用户基本信息',
  props: ['row'],
  data () {
    return {
      showbtn: false
    }
  },
  ready () {
    console.log('this.row', this.row)
  },
  watch: {
    'row' (val) {
      console.log('this.row111111111', this.row)
    }
  },
  methods: {
    confirm () {
      this.$showMessage('确认要为【' + this.row[0].f_username + '】销户吗?', ['cancel', 'confirm']).then(
        (response) => {
          if (response === 'confirm') {
            this.$post('rs/logic/destoryuser', {data: this.row[0]}, {resolveMsg: '销户成功', rejectMsg: '销户失败'})
            this.$dispatch('refreshpage')
            this.row = []
          } else if (response === 'cancel') {
            // this.$dispatch('cancel')
          }
        })
    },
    dele () {
      this.$showMessage('删除后不可恢复，确认要用户【' + this.row[0].f_username + '】的档案吗?', ['cancel', 'confirm']).then(
        (response) => {
          if (response === 'confirm') {
            this.$post('rs/logic/deleuser', {data: {f_userid: this.row[0].f_userid}}, {resolveMsg: '删除成功', rejectMsg: '删除失败'})
            this.$dispatch('refreshpage')
            this.row = []
          } else if (response === 'cancel') {
            // this.$dispatch('cancel')
          }
        })
    }
  }
}
</script>

<style lang="css">
</style>
