<template>
  <div class="club-info page">
    <div class="page-top flex flex-col justify-center items-center">
      <img class="logo" :src="supplierInfo.logo" />
      <div class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
    </div>
    <div class="page-content">
      <div class="page-title">机构认证</div>
      <el-form
        :model="formData"
        :rules="rules"
        ref="form"
        label-position="left"
      >
        <el-form-item prop="mobile" label="机构名称:">
          <el-input placeholder="请输入机构名称"></el-input>
        </el-form-item>
        <el-form-item prop="mobile" label="联系电话:">
          <el-input placeholder="请输入对外联系电话"></el-input>
        </el-form-item>
        <el-form-item prop="mobile" label="所在地区:">
          <br />
          <div class="flex items-center justify-between">
            <el-select placeholder="请选择" v-model="formData.a">
              <el-option label="湖北" :value="1"> </el-option>
              <el-option label="广东" :value="1"> </el-option>
            </el-select>
            <el-select placeholder="请选择" v-model="formData.b" class="mx-2">
              <el-option label="湖北" :value="1"> </el-option>
              <el-option label="广东" :value="1"> </el-option>
            </el-select>
            <el-select placeholder="请选择" v-model="formData.c">
              <el-option label="湖北" :value="1"> </el-option>
              <el-option label="广东" :value="1"> </el-option>
            </el-select>
          </div>
          <el-input
            class="mt-4"
            type="textarea"
            :rows="4"
            placeholder="建议您如实填写详细收货地址，例如：街道名称，门牌号码，楼层和房间号等信息"
          ></el-input>
        </el-form-item>
        <el-form-item prop="mobile" label="">
          <div class="normal-row">
            <div class="label">
              所在位置:<span>（提示：打开地图，将定位图标移到具体位置）</span>
            </div>
            <div class="postion-btn">定位</div>
          </div>
          <!-- <el-input placeholder="地图坐标" v-show="false"></el-input> -->
        </el-form-item>
        <el-form-item prop="mobile" label="logo:">
          <br />
          <el-input v-show="false"></el-input>
          <SimpleUploadImage :limit="1" />
        </el-form-item>
        <el-form-item prop="mobile">
          <div class="normal-row">
            <div class="label">门头照:<span>（可上传6张）</span></div>
            <el-input v-show="false"></el-input>
            <SimpleUploadImage :limit="6" />
          </div>
        </el-form-item>

        <el-form-item label="机构类型:">
          <br />
          <SimpleRadio
            :list="clubTypeList"
            type="defalut"
            v-model="formData.clubType"
          />
        </el-form-item>

        <el-form-item label="医美类型:" v-if="formData.clubType === 1">
          <br />
          <SimpleRadio
            :list="medicalTypeList1"
            type="rect"
            v-model="formData.medicalType"
          />
        </el-form-item>

        <el-form-item label="生美类型:" v-if="formData.clubType === 2">
          <br />
          <SimpleRadio
            :list="medicalTypeList2"
            type="rect"
            v-model="formData.medicalType"
          />
        </el-form-item>

        <el-form-item label="医疗许可证:" prop="licenseImage">
          <br />
          <el-input v-show="false" v-model="formData.licenseImage" />
          <SimpleUploadImage :limit="1" />
        </el-form-item>

        <el-form-item label="员工人数:" prop="memberCount">
          <el-input
            v-model.number="formData.memberCount"
            placeholder="请输入员工人数"
            clearable
          />
        </el-form-item>
      </el-form>
      <div class="control flex flex-col items-center">
        <div class="button submit flex justify-center items-center">提交</div>
      </div>
    </div>
  </div>
</template>

<script>
import SimpleUploadImage from '@/components/SimpleUploadImage'
import SimpleRadio from '@/components/SimpleRadio'
import { mapGetters } from 'vuex'
export default {
  layout: 'app',
  components: {
    SimpleUploadImage,
    SimpleRadio,
  },
  computed: {
    ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix']),
  },
  data() {
    return {
      clubTypeList: [
        { value: 1, name: '医美' },
        { value: 2, name: '生美' },
        { value: 3, name: '项目公司' },
        { value: 4, name: '个人' },
        { value: 5, name: '其他' },
      ],
      medicalTypeList1: [
        { value: 1, name: '诊所' },
        { value: 2, name: '门诊' },
        { value: 3, name: '医院' },
        { value: 4, name: '其他' },
      ],
      medicalTypeList2: [
        { value: 5, name: '美容院' },
        { value: 6, name: '养生馆' },
        { value: 7, name: '其他' },
      ],
      formData: {
        clubType: 1,
        medicalType: 1,
        licenseImage: '',
        memberCount: '',
        a: '',
        b: '',
        c: '',
      },
      rules: {},
    }
  },
}
</script>

<style lang="scss" scoped>
@media screen and (min-width: 768px) {
  .page {
    background: #fff;
  }
  .page-top {
    height: 360px;
    @include themify($themes) {
      background: themed('banner-club-register');
      background-size: auto 360px;
    }
    .logo {
      display: block;
      width: 120px;
      height: 120px;
      border-radius: 50%;
      background: #fff;
    }
    .name {
      font-size: 30px;
      color: #fff;
    }
  }
  .page-content {
    width: 700px;
    margin: 0 auto;
    overflow: hidden;
    min-height: calc(100vh - 80px - 80px - 360px);
    box-sizing: border-box;
    padding-bottom: 40px;

    .page-title {
      font-size: 24px;
      font-weight: bold;
      text-align: center;
      padding: 40px 0;
    }

    .control {
      margin-top: 62px;
      .button {
        width: 295px;
        height: 50px;

        cursor: pointer;

        &.submit {
          @include themify($themes) {
            background-color: themed('color');
            color: #fff;
          }
        }
      }
    }
    .normal-row {
      position: relative;
      .label {
        font-size: 14px;
        color: #606266;

        span {
          color: #b2b2b2;
        }
      }
      .postion-btn {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 62px;
        height: 28px;
        line-height: 28px;
        font-size: 14px;
        color: #fff;
        background: #1890ff;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        border-radius: 4px;

        &::before {
          content: '';
          display: inline-block;
          width: 16px;
          height: 16px;
          background: url(https://static.caimei365.com/www/authentic/pc/icon-position.png)
            no-repeat center;
          background-size: 16px 16px;
        }
      }
    }
  }
}

@media screen and (max-width: 768px) {
  ::v-deep {
    .el-form-item__label {
      font-size: 3.4vw;
    }
  }

  .page {
    background: #fff;
  }

  .page-top {
    height: 46vw;
    @include themify($themes) {
      background: themed('banner-home-h5');
      background-size: auto 46vw;
    }
    .logo {
      display: block;
      width: 14.8vw;
      height: 14.8vw;
      border-radius: 50%;
      background: #fff;
    }
    .name {
      font-size: 4vw;
      color: #fff;
    }
  }

  .page-content {
    box-sizing: border-box;
    padding: 8vw 7vw;

    .page-title {
      font-size: 4.2vw;
      font-weight: bold;
      text-align: center;
      margin-bottom: 8vw;
      color: #282828;
    }

    .control {
      .button {
        width: 100%;
        height: 12vw;

        cursor: pointer;

        &.submit {
          @include themify($themes) {
            background-color: themed('color');
            color: #fff;
          }
        }
      }
    }
    .normal-row {
      position: relative;
      .label {
        font-size: 14px;
        color: #606266;

        span {
          color: #b2b2b2;
          font-size: 2.6vw;
        }
      }
      .postion-btn {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 14vw;
        height: 6.8vw;
        line-height: 6.8vw;
        font-size: 3.2vw;
        color: #fff;
        background: #1890ff;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        border-radius: 0.4vw;

        &::before {
          content: '';
          display: inline-block;
          width: 3.58vw;
          height: 3.58vw;
          background: url(https://static.caimei365.com/www/authentic/pc/icon-position.png)
            no-repeat center;
          background-size: 3.58vw;
        }
      }
    }
  }
}
</style>
