<template>
  <div class="app-container">
    <div id="div_hd" class="transAccount">
      <div class="content">
        <div class="pp"><div class="tits">转账批次号：</div><div class="co">273313929</div></div>
        <div class="pp"><div class="tits">转出单位：</div><div class="co">工银融e贷</div></div>
        <div class="pp"><div class="tits">转出账户：</div><div class="co">622203***********308</div></div>
        <div class="pp"><div class="tits">转出账号地区：</div><div class="co">北京</div></div>
        <div class="pp"><div class="tits">收款人姓名：</div><div class="co">{{ info.realName }}</div></div>
        <div class="pp"><div class="tits">收款银行：</div><div class="co">{{ info.bankType }}</div></div>
        <div class="pp"><div class="tits">收款账户：</div><div class="co">{{ info.backCardNum }}</div></div>
        <div class="pp"><div class="tits">币种：</div><div class="co">人民币元</div></div>
        <div class="pp"><div class="tits">转账金额：</div><div class="co">{{ info.totalLoanMoney }}</div></div>
        <div class="pp"><div class="tits">转账时间：</div><div class="co">{{ parseDate(info.createTime, '{y}/{m}/{d}') }}<p></p></div></div>
        <div class="pp"><div class="tits">转账类型：</div><div class="co">签约金融企业--网贷放款预约转账</div></div>
        <div class="pp"><div class="tits">执行方式：</div><div class="co">实时到账</div></div>
        <div class="pp"><div class="tits">状态：</div><div class="co"><span style="color:#006600;">转账失败</span></div></div>
        <div class="pp"><div class="tits">银行备注：</div><div class="co"></div>{{ info.transRemark }}</div>
        <div class="pp"><div class="tits">处理结果：</div><div class="co"><span style="color:#E53333;">未处理</span></div></div>
        <div class="pp"><div class="tits">用户备注：</div><div class="co"></div></div>
      </div>
    </div>
  </div>

</template>

<script>
  import { getBorrow } from '@/api/dk/borrow'

  export default {
    components: {
    },
    data () {
      return {
        open: false,
        title: '',
        info:{
          id: undefined,
          borrowRemark: undefined,
        },
        buttonLoading:false,
      }
    },
    created() {
      const borrowId = this.$route.params && this.$route.params.borrowId;
      this.init(borrowId)
    },
    methods: {
      parseDate(dateStr){
        const date = new Date(dateStr);
        console.log(date,"123")
        return date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate();
      },
      init (id) {
        this.info.id = id || undefined;
        this.open = true;
        this.$nextTick(() => {
          getBorrow(id).then(response => {
            this.info = response.data;
            this.open = true;
            this.title = "转账记录";
          });
        })
      }
    }
  }
</script>
<style rel="stylesheet/scss" lang="scss">
.transAccount {
  margin: auto;
  width: 1170px;
  height: 888px;
  background-image: url("../../../assets/images/hd_bg.png");
  background-repeat: no-repeat;
  background-size: cover;
}
.pp {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: block;
  float: left;
  width: 100%;
  font-size: 12px;
  height: 30px;
  line-height: 30px;
}
.content {
  width: 100%;
  padding-top: 300px !important;
  *margin: 16px auto;
}
.tits {
  float: left;
  width: 585px;
  text-align: right;
}
.co {
  float: left;
}
</style>
