<template>
  <div class="common-wrap-cnt">
    <section class="header-top">
      <p class="common-title">法人信息</p>
    </section>
    <el-form :model="baseInfo" label-width="140px" style="margin-top:20px;">
      <el-row>
        <el-col :span="8">
          <el-form-item prop="operatorName" label="经营者姓名：">
            <span>{{ baseInfo.operatorName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="operatorCustIdc" label="身份证号：">
            <span>{{ baseInfo.operatorCustIdc }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="operatorGender" label="性别：">
            <span>{{ baseInfo.operatorGender }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item prop="operatorBirth" label="出生日期：">
            <span>{{ baseInfo.operatorBirth }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="operatorAge" label="年龄：">
            <span>{{ baseInfo.operatorAge }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="operatorPhone" label="经营者手机号：">
            <span>{{ baseInfo.operatorPhone }}</span>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <section class="header-top">
      <p class="common-title">商户信息</p>
    </section>
    <el-form :model="baseInfo" label-width="140px" style="margin-top:20px;">
      <el-row>
        <el-col :span="8">
          <el-form-item prop="custName" label="商户名称：">
            <span>{{ baseInfo.custName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="usci" label="统信码：">
            <span>{{ baseInfo.usci }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="operaStatus" label="经营状态：">
            <span>{{ baseInfo.operaStatus }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item prop="operaScope" label="经营范围：">
            <span>{{ baseInfo.operaScope }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="operaAddress" label="经营地址：">
            <span>{{ baseInfo.operaAddress }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="operaAddressDetail" label="门牌号：">
            <span>{{ baseInfo.operaAddressDetail }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item prop="lng" label="经度：">
            <span>{{ baseInfo.lng }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="lat" label="维度：">
            <span>{{ baseInfo.lat }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="regAddress" label="注册地址：">
            <span>{{ baseInfo.regAddress }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item prop="regAddressDetail" label="门牌号：">
            <span>{{ baseInfo.regAddressDetail }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="industry" label="行业名称：">
            <span>{{ baseInfo.industry }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="custPhone" label="企业电话：">
            <span>{{ baseInfo.custPhone }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item prop="regStatus" label="建档状态：">
            <span>{{ baseInfo.regStatus?'是':'否' }}</span>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <section class="header-top">
      <p class="common-title">关联人信息</p>
    </section>
    <el-table :data="relatePersonsList" style="margin-top:20px;">
      <el-table-column label="关联人" prop="relatePerson" min-width="100" show-overflow-tooltip />
      <el-table-column label="身份证号" prop="relateCustIdc" min-width="100" show-overflow-tooltip />
    </el-table>
    <section class="header-top" style="margin-top:20px;">
      <p class="common-title">其他信息</p>
    </section>
    <el-form :model="baseInfo" label-width="140px" style="margin-top:20px;">
      <el-row>
        <el-col :span="8">
          <el-form-item prop="relateDeptName" label="客户经理归属机构：">
            <span>{{ baseInfo.relateDeptName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item prop="relateUserName" label="客户经理：">
            <span>{{ baseInfo.relateUserName }}</span>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <section class="header-top">
      <p class="common-title">照片信息</p>
    </section>
    <div class="top_item">
      <div
        style="display:flex;flex-wrap:wrap;flex:1"
        v-if="baseInfo.imageList && baseInfo.imageList.length != 0"
      >
        <div v-for="(item, index) in baseInfo.imageList" :key="index">
          <img
            :src="`data:image/png;base64,${item}`"
            alt
            style="width: 50px; height: 50px; margin: 10px"
          />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { custLeadSelect } from "@/api/system/listByRetailKeywords.js";
export default {
  data() {
    return {
      baseInfo: {
        imageList: []
      },
      relatePersonsList: []
    };
  },
  computed: {
    custId() {
      return this.$route.query.custId;
    }
  },
  created() {
    custLeadSelect({ custId: this.custId }).then(res => {
      if (res.code == 200) {
        this.baseInfo = res.data;
        if (this.baseInfo.relatePersons) {
          this.relatePersonsList = JSON.parse(this.baseInfo.relatePersons);
        }
      }
    });
  }
};
</script>

<style lang="scss" scoped>
.common-wrap-cnt {
  background-color: #ffffff;
  overflow: hidden;
  box-shadow: 0 3px 8px 0 #00000017;
  border-radius: 16px 16px 0 0;
  height: calc(100vh - 135px);
  overflow-y: auto;
  padding: 30px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.t360-production {
  display: flex;
  align-items: center;
}

.t360-production-item {
  width: 250px;
  height: 43px;
  background: #eaf5ff;
  border-radius: 4px;
  text-align: center;
  line-height: 43px;
  margin-right: 20px;
  margin-top: 25px;
  margin-bottom: 25px;
}

.t360-production-1 {
  display: flex;
  align-items: center;
}

.t360-production-item-1 {
  width: 250px;
  height: 43px;
  background: #eaf5ff;
  border-radius: 4px;
  text-align: center;
  line-height: 43px;
  margin-right: 20px;
  margin-top: 25px;
  margin-bottom: 25px;
}

.file-upload {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: space-between;
  height: 320px;

  .group-input {
    width: 702px;
    height: 288px;
    margin-top: 25px;
  }

  .group-select {
    width: 702px;
    height: 288px;
    margin-top: 25px;
  }

  .file-upload-bg {
    width: 702px;
    height: 288px;
    background: #f7f8fa;
    // display: flex;
    // align-items: center;
    // justify-content: center;
  }

  .el-icon-upload {
    text-align: center;
    font-size: 47.36px;
    color: #cccccc;
  }

  .file-upload-desc {
    font-weight: 400;
    font-size: 14px;
    color: #666666;
    letter-spacing: 0;
    text-align: center;
    line-height: 12px;
    margin-top: 8px;
  }

  .file-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    margin-top: 20px;
  }

  .file-upload-download {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    margin-top: 15px;
    font-size: 14px;
  }

  .file-upload-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    margin-top: 15px;
    font-size: 14px;
  }
}

.preview-table {
  width: 100%;
  margin-top: 16px;
}

.preview-cnt {
  margin-top: 40px;
}

.chose-cnt {
  ::v-deep .el-form-item__content {
    display: flex;
    justify-content: space-between;

    .el-button {
      width: 88px;
      margin-left: 24px;
    }

    .el-select {
      flex: 1;
    }
  }
}

.title_box1 {
  position: relative;
}

.title_box1:hover .ejTitle {
  display: block;
}

.title_box2 {
  position: relative;
}

.title_box2:hover .ejTitle {
  display: block;
}

.title_box3 {
  position: relative;
}

.title_box3:hover .ejTitle {
  display: block;
}

.title_box4 {
  position: relative;
}

.title_box4:hover .ejTitle {
  display: block;
}

.ejTitle {
  width: 250px;
  line-height: 32px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 6px 16px 0 #1e1f2714;
  margin-right: 20px;
  margin-top: 8px;
  padding-left: 10px;
  padding-bottom: 10px;
  position: absolute;
  top: 80px;
  z-index: 10;
  display: none;
}

.ejTitle_item {
  line-height: 32px;
  font-size: 14px;
}

.message-box {
  display: flex;
  margin: 20px;
}

.message-box-left {
  display: flex;
  width: 10%;
  justify-content: center;
  align-items: center;
}

.tag-box {
  margin-bottom: 10px;
}

::v-deep .el-input {
  width: 200px;
}
.ccyc {
  display: inline-block;
  width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.common-title {
  position: relative;
  color: #222222;
  line-height: 16px;
  font-weight: 600;
  font-size: 16px;
  padding-left: 10px;
  margin: 0;

  &::before {
    position: absolute;
    top: 50%;
    transform: translatey(-50%);
    left: 0;
    content: "";
    width: 3px;
    background-color: #4886f8;
    height: 16px;
    border-radius: 2px;
  }
}

.add_btn {
  text-align: right;
  padding-bottom: 20px;
}

.fimalyDialog {
  ::v-deep .el-dialog__header {
    border-bottom: 1px solid #ebedf0;
    padding-bottom: 10px;
  }

  ::v-deep .el-dialog__footer {
    border-top: 1px solid #ebedf0;
    padding-bottom: 10px;
  }

  ::v-deep .el-dialog__body {
    padding: 30px 37px;
  }

  ::v-deep .el-input {
    width: 250px;
  }
}

.glShBox {
  display: flex;
  margin-top: 20px;
}

.bottomBox {
  display: flex;
}

.left {
  text-align: center;
  min-width: 250px;
  height: 60px;
  background-color: rgb(221, 233, 244);
  line-height: 60px;
}

.right {
  text-align: center;
  min-width: 250px;
  height: 60px;
  background-color: rgb(247, 247, 247);
  line-height: 60px;
}

.top_item {
  background-color: #ffffff;
  padding: 10px 20px;
  display: flex;
}
</style>