<template>
  <view class="item-box">
    <item-title label="基本信息" :line-type="1"></item-title>
    <item-text label="贷款额度" :value="applyFor.quota"  :type-keys="typeKeys" key-str="quota"  right-text="万元"></item-text>
    <item-text label="批复额度" v-if="applyFor.out_total>0" :value="applyFor.out_total"  :type-keys="typeKeys" key-str="out_total"  right-text="万元"></item-text>
    <item-text label="回款额度" v-if="applyFor.returned_total>0" :value="applyFor.returned_total"  :type-keys="typeKeys" key-returned_total="insurance_name"  right-text="万元"></item-text>
    <item-text label="是否涉农" :value="applyFor.is_farming"  :type-keys="typeKeys" key-str="is_farming" :radio-data="isNo" ></item-text>
    <item-text label="贷款类型" :value="applyFor.loan_form_name"  :type-keys="typeKeys" key-str="loan_form"  ></item-text>
    <item-text label="贷款类别" :value="applyFor.loan_type_name"  :type-keys="typeKeys" key-str="loan_type"  ></item-text>
    <item-text label="投向行业" :value="applyFor.loan_industry_name"  :type-keys="typeKeys" key-str="loan_industry"  ></item-text>
    <item-text label="企业类型" :value="applyFor.enterprise_type_name"  :type-keys="typeKeys" key-str="enterprise_type"  ></item-text>
    <item-text label="材料费支付状态" :value="applyFor.pay_status"  :type-keys="typeKeys" key-str="pay_status"  :radio-data="{'1':'已缴纳','0':'未缴纳'}"></item-text>
    <view class="apply-item" v-for="(applyItem,applyKey) in applyFor.apply_data">
      <item-title :label="(applyItem.apply_type*1===1?'抵押':'买卖')+'抵押信息('+(applyKey+1)+')'" ></item-title>
      <item-text label="申请类型" :value="applyItem.apply_type"  :type-keys="typeKeys" key-str="apply_type" :radio-data="{'1':'抵押','2':'买卖'}"  ></item-text>
      <view v-if="applyItem.propertyName!==''">
        <item-title label="绑定资产信息" ></item-title>
        <item-text label="资产信息" :value="applyItem.propertyName"   ></item-text>
      </view>
      <view  v-if="applyItem.apply_type*1===2">
        <item-text label="成交价" :value="applyItem.transaction"  :type-keys="typeKeys" key-str="transaction"  right-text="万元"></item-text>
        <item-text label="定金" :value="applyItem.pricing"  :type-keys="typeKeys" key-str="pricing"  right-text="万元"></item-text>
        <item-text label="资金监管" :value="applyItem.supervise"  :type-keys="typeKeys" key-str="supervise"  right-text="万元"></item-text>
        <item-text label="批复类型" :value="applyItem.reply_type"  :type-keys="typeKeys" key-str="reply_type"  :radio-data="{'1':'商业','2':'组合'}"></item-text>
        <item-text label="成交中介" :value="applyItem.intermediary"  :type-keys="typeKeys" key-str="intermediary"  ></item-text>
      </view>
     <view class="applyBank" v-for="(repayment,repaymentKey) in applyItem.repayment_data">
       <item-title :label="(applyItem.apply_type*1===1?'还款信息':'监管银行卡信息')+'('+(repaymentKey+1)+')'"  :title-type="2"></item-title>
       <item-text label="还款金额" :value="repayment.money"  v-if="applyItem.apply_type*1===1"  right-text="万元"></item-text>
       <item-text label="银行卡号" :value="repayment.bank_num"    ></item-text>
       <item-text label="所属银行" :value="repayment.bank_name"   ></item-text>
     </view>
      <view class="applyBank" v-for="(loan,loanKey) in applyItem.loan_data">
        <item-title :label="'放款银行卡信息('+(loanKey+1)+')'"  :title-type="2"></item-title>
        <item-text label="批复金额" :value="loan.money"   right-text="万元"></item-text>
        <item-text label="银行卡号" :value="loan.bank_num"    ></item-text>
        <item-text label="所属银行" :value="loan.bank_name"    ></item-text>
      </view>



    </view>

  </view>
</template>

<script>
import ItemTitle from "@/pages-task/task-info/module/item-title";
import ItemText from "@/pages-task/task-info/module/item-text";
export default {
  name: "task-apply-for",
  components: {ItemText, ItemTitle},
  props: {
    applyFor:{
      default:{}
    },
    typeKeys:{
      default:[]
    }
  },
  data() {
    return {
      isNo:{'1':'是','0':'否'}
    }
  },
  watch: {},
  mounted() {

  },
  methods: {
    onShowImg(img){
      this.$emit('onShowImg',img)
    }
  }
}
</script>

<style scoped lang="scss">
@import "@/static/css/task-info/item";
</style>
