<template>
  <div class="enterprise">
    <div class="firstPage">
      <div class="title">
        尊敬的 &nbsp;<span class="impotTips comName">{{
          company.qymc
        }}</span>
        &nbsp; 企业用户，你好！
      </div>
      <div class="titMsg" v-if="isnew">
        欢迎你首次登录“园区企业服务平台”，为了更好地为企业提供相关服务，请先<span
          class="impotTips"
      >完善贵公司的相关企业信息</span
      >，并提交登记！
      </div>
      <div class="titMsg" v-if="isnew">
        后续信息
        <span class="impotTips">如有变动，请及时在“企业信息”中维护更新</span>。
        感谢您的支持与配合！
      </div>
      <div class="titMsg" v-if="!isnew">
        企业信息
        <span class="impotTips">如有变动，请及时在“企业信息”中维护更新</span>。
        感谢您的支持与配合！
      </div>
    </div>
    <div class="secendPage">
      <ul>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            统一社会信用代码：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.shxydm"
              readonly
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            注册资金（万元）：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.zczj"
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            注册时间：
          </div>
          <input
              type="text"
              placeholder="请选择"
              readonly
              v-model="company.zcsj"
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            法定代表人：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.fddbr"
          />
        </li>
        <li class="titleLi">
          法人电话：
          <input
              type="text"
              placeholder="请填写"
              v-model="company.legalPersonPhone"
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            企业联系人：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.qylxr"
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            联系人手机：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.lxdh"
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            联系人邮箱：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.email"
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            财务负责人：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.cwfzr"
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            负责人电话：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.cwfzrdh"
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            注册地址：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.zcdz"
          />
        </li>
        <li class="titleLi">
          <div>
            <span class="required">*</span>
            经营地址：
          </div>
          <input
              type="text"
              placeholder="请填写"
              v-model="company.jydz"
          />
        </li>
        <li class="titleLi area-Li">
          经营范围：
          <textarea
              class="text-area"
              type="text"
              rows="4"
              placeholder="请说明"
              v-model="company.jyfw"
          />
        </li>
        <li class="titleLi titleLiLast">
          <div>
            <span class="required">*</span>
            营业执照副本（限1张）：
          </div>
        </li>
        <li class="titleLi titleLiUploader">
          <van-uploader
              v-model="fileList"
              multiple
              max-count="1"
              :after-read="afterRead"
              :before-delete="beforeDelete"
          >
          </van-uploader>
        </li>
        <li class="titleLi titleLiLast">
          荣誉信息（限6张）：
        </li>
        <li class="titleLi area-Li titleLiLast " style="padding: 0;margin: 0">
                    <textarea
                        class="text-area"
                        type="text"
                        rows="6"
                        placeholder="请说明"
                        v-model="company.honorInformation"
                        style="margin: 0"
                    />
        </li>
        <li class="titleLi titleLiUploader2">
          <van-uploader
              v-model="fileList2"
              multiple
              max-count="6"
              :after-read="afterRead2"
              :before-delete="beforeDelete2"
          />
        </li>
        <li class="titleLi titleLiLast">
          法人身份证：
        </li>
        <li class="titleLi titleLiLast titleLiUploader">
          <div>
            <van-uploader
                v-model="fileList3"
                multiple
                max-count="1"
                :after-read="afterRead3"
                :before-delete="beforeDelete3"
            >
              <img src="https://www.idea-co-sf.com/gardenProduct/image/zm.png" class="sfzImg">
            </van-uploader>
            <van-uploader
                v-model="fileList4"
                multiple
                max-count="1"
                :after-read="afterRead4"
                :before-delete="beforeDelete4"
            >
              <img src="https://www.idea-co-sf.com/gardenProduct/image/fm.png" class="sfzImg">
            </van-uploader>
          </div>
        </li>
      </ul>
    </div>
    <div class="buttonBox" v-if="btnShow">
      <button class="turnOff" @click="commit">暂存</button>
      <button class="preservation btn2" @click="submit">
        提交
      </button>
    </div>
    <div v-if="!btnShow" style="padding: 5vw 0;color: orangered;text-align: center">
      入库审核中......
    </div>
    <!-- 时间弹框 -->
    <van-popup v-model="show" position="bottom" :style="{ height: '50%' }">
      <van-datetime-picker
          v-model="currentDate"
          type="date"
          title="选择年月日"
          :min-date="minDate"
          :max-date="maxDate"
          @cancel="show = false"
          @confirm="selectTime"
      /></van-popup>
    <van-popup v-model="show2" position="bottom" :style="{ height: '50%' }">
      <van-datetime-picker
          v-model="currentDate"
          type="date"
          title="选择年月日"
          :min-date="minDate"
          :max-date="maxDate"
          @cancel="show2 = false"
          @confirm="selectTime2"
      /></van-popup>
  </div>
</template>
<script>
import { isFinishComInfo, getById, addCompanyExamine,upload } from "@/js_sdk/http.js"
// import auth from '@/js_sdk/auth.js'
import constant from '@/pages/utils/constant.js'
export default {
  data() {
    return {
      isnew: true,
      radio: '1',
      fileList: [],
      fileList2: [],
      fileIdList2: [],
      fileIdList3: [],
      fileIdList4: [],
      fileIdList5: [],
      fileList3: [],
      fileList4: [],
      frsfzzm: '',
      frsfzfm: '',
      selectTag: 0,
      tagList: [
      ],
      checkBoxList: [
        ],
      company: {
        id: '',
        qymc: '',
        shxydm: '',
        zcsj: '',
        zczj: '',
        fddbr: '',
        jyfw: '',
        qylxr: '',
        lxdh: '',
        rzsj: '',
        ssztmc: '',
        qylbbq: '',
        yyzzfbzp: '',
        ryxxzp: '',
        legalPersonPhone: '',
        email: '',
        cwfzr: '',
        cwfzrdh: '',
        zcdz: '',
        jydz: '',
        honorInformation: '',
        rdInvestment: '',
        jgInvestment: '',
        fourOpennessAmount: '',
        fourConsultAmount: '',
        fourServiceAmount: '',
        fourTransferenceAmount: '',
        qybq: ''
      },
      show: false,
      show2: false,
      minDate: new Date(1980, 0, 1),
      maxDate: new Date(2025, 10, 1),
      currentDate: new Date(),
      selectTagId: '',
      btnShow: true,
      qybqList: []
    }
  },
  mounted() {
  },
  methods: {

  }
}
</script>
<style lang="scss">
.enterprise {
  font-size: 4vw;
  margin: 5vw 2vw;
  .firstPage {
    background: white;
    padding: 3vw 3vw 3vw 3vw;
    margin-top: 5vw;
    border-radius: 15px;
    .title {
      height: 10vw;
      // display: inline-flex;
      align-items: center;
      border-bottom: 1px solid rgb(243, 236, 236);
      margin-bottom: 3vw;
    }
    .titMsg {
      text-indent: 8vw;
      line-height: 6vw;
    }
    .impotTips {
      color: rgb(0, 47, 167);
    }
    .comName {
      white-space: nowrap;
    }
    input {
      width: 80%;
    }
    li {
      display: flex;
      align-items: center;
      height: 10vw;
      padding: 5vw 0;
      border-bottom: 1px solid rgb(243, 236, 236);
    }
  }
  .secendPage {
    background: white;
    padding: 3vw 3vw 3vw 3vw;
    margin-top: 5vw;
    border-radius: 15px;
    li {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 10vw;
      padding: 3vw 0;
      border-bottom: 1px solid rgb(243, 236, 236);
    }
    .titleLi {
      font-size: 3.5vw;
      //font-weight: 700;
      white-space: nowrap;
      color: #333333;
      .required {
        color: red;
      }
      .van-uploader {
        padding: 3vw 0;
      }
    }
    .titleLiRadio {
      .van-radio-group {
        display: flex;
        width: 100%;
        justify-content: space-evenly;
      }
    }
    .titleLiLast {
      border-bottom: none;
      padding-bottom: 0;
    }
    .titleLiUploader {
      padding: 10vw 0;
    }
    .titleLiUploader2 {
      padding: 20vw 0;
    }
    .van-uploader {
      padding: 10vw 0;
    }
    input {
      padding: 15px 0 15px 20px;
      width: 60%;
    }
    textarea {
      padding: 15px 0 15px 20px;
    }
  }

  .buttonBox {
    //background: white;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    margin-top: 3vw;
    margin-bottom: 0;
    padding: 5vw 0;
    button {
      padding: 2vw 10vw;
      border-radius: 15px;
    }
    .turnOff {
      background: white;
      border: 1px solid rgb(0, 47, 167);
      color: rgb(0, 47, 167);
    }
    .btn2 {
      background-color: rgb(0, 47, 167);
      color: white;
      border: white solid 1px;
    }
  }
  input::placeholder {
    color: #777777;
  }
  .area-Li{
    height: auto !important;
    flex-direction: column;
    align-items: flex-start !important;
    .text-area{
      background: #F9F9F9;
      width: 95%;
      margin-top: 2vw;
      resize: none;
      &::placeholder{
        color:#AAAAAA
      }
    }
  }
  .upLoadImg{
    width: 10vw;
  }
  .sfzImg{
    width: 18vw;
    height: 16vw;
    margin: 0vw 2vw 2vw 2vw
  }
  .myTag{
    width: 20vw;
    height: 7vw;
    display: flex;
    font-size: 3.5vw;
    font-weight: 400;
    justify-content: center;
    align-items: center;
    color: #777777;
    border: 1px solid rgba(204, 204, 204, 0.51);
    border-radius: 5px;
    margin: 1vw 0;
    box-sizing: border-box;
  }
  .selectTag{
    width: 20vw;
    height: 7vw;
    display: flex;
    font-size: 3.5vw;
    font-weight: 400;
    justify-content: center;
    align-items: center;
    color: #1D18BC;
    background: rgba(29, 24, 188, 0.05);
    border-radius: 5px;
    margin: 1vw 0;
  }
  .checkBoxContant{
    font-size: 3.5vw;
    color: rgba(119, 119, 119, 1);
    line-height: 5vw;
    padding-left: 8vw;
  }
}
</style>
