<template>
  <div class="enterpriseInfo">
    <div class="enterpriseInfo-title">
      <h1>
        <img src="@/assets/imgs/company/companyicon.png" alt="" />
        <p>{{ enterpriseName }}</p>
        <div>
          <span v-for="(item, index) in companynamequery" :key="index">{{
            item.name
          }}</span>
        </div>
      </h1>
    </div>
    <div class="enterpriseInfo-main">
      <table>
        <tr>
          <td>法人代表</td>
          <td>
            {{
              companyInfo.legalRepresentative
                ? companyInfo.legalRepresentative
                : "--"
            }}
          </td>
          <td>注册资本</td>
          <td>
            {{
              companyInfo.registeredCapital
                ? companyInfo.registeredCapital
                : "--"
            }}
          </td>
          <td>营业期限</td>
          <td>
            {{ companyInfo.businessTerm ? companyInfo.businessTerm : "--" }}
          </td>
        </tr>
        <tr>
          <td>统一社会信用代码</td>
          <td>{{ companyInfo.creditCode ? companyInfo.creditCode : "--" }}</td>
          <td>企业地址</td>
          <td>
            {{
              companyInfo.businessAddress ? companyInfo.businessAddress : "--"
            }}
          </td>
          <td>公司类型</td>
          <td>
            {{
              companyInfo.company_org_type ? companyInfo.company_org_type : "--"
            }}
          </td>
        </tr>
        <tr>
          <td>注册号</td>
          <td>{{ companyInfo.registrID ? companyInfo.registrID : "--" }}</td>
          <td>组织机构代码</td>
          <td>
            {{
              companyInfo.organizationCode ? companyInfo.organizationCode : "--"
            }}
          </td>
          <td>所属行业</td>
          <td>
            {{
              companyInfo.gsb_company_cate_1
                ? companyInfo.gsb_company_cate_1
                : "--"
            }}
          </td>
        </tr>
        <tr>
          <td>成立日期</td>
          <td>{{ companyInfo.dateIssue ? companyInfo.dateIssue : "--" }}</td>
          <td>发照日期</td>
          <td>{{ companyInfo.dateIssue ? companyInfo.dateIssue : "--" }}</td>
          <td>登记机关</td>
          <td>
            {{ companyInfo.registerOffice ? companyInfo.registerOffice : "--" }}
          </td>
        </tr>
        <tr>
          <td>经营范围</td>
          <td colspan="5">
            {{ companyInfo.scope ? companyInfo.scope : "--" }}
          </td>
        </tr>
      </table>
    </div>
    <div class="enterpriseInfo-container">
      <div class="enterpriseInfo-container-title"><i></i>股东信息</div>
      <!--  -->
      <div class="enterpriseInfo-container-table">
        <table>
          <thead>
            <tr>
              <td>股东类型</td>
              <td>股东</td>
              <td>认缴出资（金额/时间）</td>
              <td>实缴出资（金额/时间）</td>
            </tr>
          </thead>
          <tbody v-if="list.length!=0">
            <tr v-for="(item,index) in list" :key="index">
              <td>自然人股东</td>
              <td>{{item.shareholdersName}}</td>
              <td>{{item.subcribe}}</td>
              <td>-</td>
            </tr>
          </tbody>
          <tbody v-else>
            <tr>
              <td colspan="4">暂无数据</td>
            </tr>
          </tbody>
        </table>
      </div>
      <!--  -->
      <!-- <div class="enterpriseInfo-container-title"><i></i>其他信息</div>
     
      <div class="enterpriseInfo-container-tableB">
        <table>
          <tr>
            <td>电话</td>
            <td>010-62509123、010-62509123、010-62509123、010-62509123</td>
            <td>官网</td>
            <td>http://www.joyvio.com</td>
          </tr>
          <tr>
            <td>邮箱</td>
            <td>info.joyvio@joyvio.com</td>
            <td>地址</td>
            <td>北京市海淀区科学院南路2号融科资讯中心B-17</td>
          </tr>
          <tr>
            <td>简介</td>
            <td colspan="3">
              中西餐饮服务;制作餐厅食品和冷热饮料;销售食品;货物专用运输(冷藏保鲜)(道路运输经营许可证有效期至2018年10月20日);图书报刊、电子出版物批发及零售(零售限分支机构凭许可证经营);向在本公司消费的客人零售带百胜旗下品牌商标的促销用品。
            </td>
          </tr>
        </table>
      </div> -->
    </div>
  </div>
</template>

<script>
// import { getEntregistryByCompanyName } from "@/api/tmTools.js";
import {getGuDong} from "@/api/tmTools.js"
export default {
  props: ["enterpriseName", "companyInfo", "companynamequery"],
  data() {
    return {
      list:[]
    };
  },
  mounted() {
    getGuDong(this.enterpriseName).then(res=>{
      console.log(res,"股东信息");
      if(res.data.status == 0){
        this.list = res.data.data.list
      }
    })
  },
  methods: {}
};
</script>

<style lang="scss">
.enterpriseInfo {
  width: 100%;
}
.enterpriseInfo-title {
  width: 100%;
  margin-bottom: 17px;
  h1 {
    display: flex;
    // align-items: center;
    img {
      width: 26px;
      height: 26px;
      margin-right: 8px;
    }
    p {
      font-size: 22px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(18, 18, 18, 1);
      line-height: 30px;
      margin-right: 20px;
    }
    div {
      max-width: 800px;
      display: flex;
      flex-wrap: wrap;
      span {
        padding: 3px 10px;
        background: #fdf2ec;
        color: #f0a67c;
        margin-right: 10px;
        margin-bottom: 10px;
        font-size: 12px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: rgba(240, 166, 124, 1);
        line-height: 17px;
      }
    }
  }
}
.enterpriseInfo-main {
  width: 100%;
  table {
    width: 100%;
    tr {
      td {
        padding: 15px;
        border: 1px solid #e4eef6;
        font-size: 14px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: rgba(67, 67, 67, 1);
        line-height: 18px;
      }
      td:nth-child(odd) {
        width: 150px;
        background: #f2f9fc;
      }
    }
  }
}
.enterpriseInfo-container {
  width: 100%;
  .enterpriseInfo-container-title {
    width: 100%;
    padding: 30px 0 21px 0;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #333333;
    line-height: 22px;
    i {
      width: 2.5px;
      height: 14px;
      background: #1478f0;
      margin-right: 5px;
    }
  }
  .enterpriseInfo-container-table {
    width: 100%;
    table {
      width: 100%;
      thead {
        width: 100%;
        tr {
          td {
            width: 25%;
            padding: 15px 0;
            text-align: center;
            font-size: 14px;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: rgba(67, 67, 67, 1);
            line-height: 18px;
            background: #f2f9fc;
            border: 1px solid #e4eef6;
          }
        }
      }
      tbody {
        width: 100%;
        tr {
          td {
            width: 25%;
            padding: 15px 0;
            text-align: center;
            font-size: 14px;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: rgba(67, 67, 67, 1);
            line-height: 18px;
            background: #fff;
            border: 1px solid #e4eef6;
          }
        }
      }
    }
  }
  .enterpriseInfo-container-tableB {
    width: 100%;
    table {
      width: 100%;
      tr {
        td {
          padding: 15px;
          border: 1px solid #e4eef6;
          font-size: 14px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: rgba(67, 67, 67, 1);
          line-height: 18px;
        }
        td:nth-child(odd) {
          width: 100px;
          background: #f2f9fc;
        }
      }
    }
  }
}
</style>
