<!--
 * @Author: your name
 * @Date: 2019-09-29 10:02:11
 * @LastEditTime : 2019-12-24 16:52:59
 * @LastEditors  : Please set LastEditors
 * @Description: In User Settings Edit
 -->
<template>
  <h-view id="contract-content" class="public-style">
    <h-header :proportion="[5,1,1]" class="bar-custom">
      <div slot="left" class="h-header-btn">
        <img src="@/assets/userBind/arrow.png" @click="$routeGo()">
        <span>合同详情</span>
      </div>
    </h-header>

    <h-content class="dealer-guarantee">
      <div class="dealer">
        <img v-show="name ==='农行代扣授权书'" src="@/assets/constractSigning/twill.png" alt="">

        <img v-show="name === '融资租赁合同'" src="@/assets/constractSigning/contract-icon.png" alt="">
        <h1>{{ name }}</h1>
        <Distributors v-if="name === '经销商担保协议'"/>
        <Lessee v-if="name === '承租人确认意见'"/>
        <Transfer v-if="name === '租赁物所有权转移及接收确认书'"/>
        <LeasingContract v-if="name === '融资租赁合同'&&business_type === 'LEASE'"/>
        <LeasingContractBack v-if="name === '融资租赁合同'&&business_type === 'LEASEBACK'"/>
      </div>
    </h-content>
  </h-view>
</template>

<script>
import Check1 from '@/assets/distributorSign/conditionChecked.png'
import Check2 from '@/assets/distributorSign/textChecked.png'
import unCheck1 from '@/assets/distributorSign/conditionUncheck.png'
import unCheck2 from '@/assets/distributorSign/textUncheck.png'
import Lessee from '@/pages/contractSigning/lessee'
import Distributors from '@/pages/contractSigning/distributor-text'
import Transfer from '@/pages/contractSigning/transfer-book'
import LeasingContract from '@/pages/contractSigning/leasing-contract'
import LeasingContractBack from '@/pages/contractSigning/leasing-contract-back'

export default {
  name: 'ContractDetail',
  components: {
    Lessee,
    Transfer,
    Distributors,
    LeasingContract,
    LeasingContractBack,
  },
  data () {
    return {
      num: 1,
      check1: Check1,
      check2: Check2,
      uncheck1: unCheck1,
      uncheck2: unCheck2,
      res: '',
      name: '',
      business_type: '',
    }
  },
  computed: {},
  watch: {},
  activated () {
    this.name = this.$route.params.name
    this.business_type = this.$route.params.business_type
  },
  methods:
 {
   getTabNum (i) {
     this.tabNum = i
   },
 },
}
</script>
<style lang='less'>
#contract-content {
  .h-header-btn {
    img {
      width: 16px;
      height: 16px;
      margin-left: 4px;
    }

    span {
      font-family: PingFangSC-Semibold;
      margin-left: 16px;
      font-size: 17px;
      letter-spacing: 0.61px;
      line-height: 24px;
    }
  }

  .dealer-guarantee{
    padding: 10px;

    .dealer{
      background-color: #fff;
      box-shadow: 0 1px 2px 1px rgba(128,128,128,0.10);
      border-radius: 4px;
      position: relative;

      img:first-child{
        width: 100%;
      }

      img:nth-child(2){
          position: absolute;
          top: 0px;
          left: 25px;
          height: 40px;
      }

      h1{
        font-family: PingFangSC-Semibold;
        font-weight:700;
        font-size: 16px;
        color: #00469C;
        text-align: center;
        padding-top: 16px;
        margin: 0px;
      }
    }
  }
}
</style>
