<!-- 企业股东信息 -->
<template>
  <!--    <div class="business-info">-->
  <!--      <el-divider></el-divider>-->
  <!--    </div>-->
  <div class="scrollClass">
    <el-form :model="holderFormf" label-width="130px" label-position="right" ref="holderForm">
      <el-card class="margin-bottom10" v-for="(holderForm) in holderForms" :key="holderForm.keyId">
        <el-row class="margin-bottom20">
          <el-col :span="24">
            <div>
              <i class="iconfont iconrenyuantiaozheng"></i>
              <span class="margin-left10">{{$t('enterpriseInfoManage.supplierInfoManage.shareholder') + holderForm.name}}</span>
            </div>
          </el-col>
        </el-row>
        <div v-for="(item, index) in holderForm.partnerCapitalDtos" :key="item.keyId">
          <el-row :gutter="10">
            <!-- 股东类型 -->
            <el-col :xs="24" :sm="24" :md="24" :lg="8">
              <div v-if="index === 0">
                <span class="margin-left24">{{$t('enterpriseInfoManage.supplierInfoManage.holderType')}}{{holderForm.type | formatDict('ZDC0144') }}</span>
              </div>
            </el-col>
            <!-- 出资比例 -->
            <el-col :xs="24" :sm="24" :md="24" :lg="8">
              <div v-if="index === 0">
                <span class="margin-left24">{{$t('enterpriseInfoManage.supplierInfoManage.investmentsRatio')}}{{itemPercent(item.percent)}}</span>
              </div>
            </el-col>
            <!-- 认缴出资额 -->
            <el-col :xs="24" :sm="24" :md="24" :lg="8">
              <div>
                <span class="margin-left24">{{$t('enterpriseInfoManage.supplierInfoManage.subCapital')}}{{ Number(item.amomon)}} {{item.amomonCurrency | formatDict('ZDC0141')}}</span>
              </div>
            </el-col>
            <!-- 认缴出资时间 -->
            <el-col :xs="24" :sm="24" :md="24" :lg="8">
              <div>
                <span class="margin-left24">{{$t('enterpriseInfoManage.supplierInfoManage.subCapitalDate')}}{{ item.shoudDate | formatDateTpcModify() }}</span>
              </div>
            </el-col>
            <!-- 认缴出资方式 -->
            <el-col :xs="24" :sm="24" :md="24" :lg="8">
              <div>
                <span class="margin-left24">{{$t('enterpriseInfoManage.supplierInfoManage.subCapitalWay')}}{{ item.payType === '1' ? '认缴' : '实缴' }}</span>
              </div>
            </el-col>
          </el-row>
        </div>
      </el-card>
    </el-form>
  </div>
</template>

<script>
import * as format from '@/filters/index'
export default {
  name: 'shareholderInfo',
  data () {
    return {
      holderFormf: {}
    }
  },
  props: {
    holderForms: {
      type: Array,
      default: function () {
        return []
      }
    }
  },
  methods: {
    itemPercent (item) {
      let a = 0
      try {
        a = Number(item)
        return format.thousandFilter(a) + '%'
      } catch (e) {
        return '0.00%'
      }
    }
  }
}
</script>

<style scoped lang="scss">
  @import '@/styles/enterpriseInfoManage/supplierInfoManage/businessInfo.scss';
</style>
