<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="https://www.thymeleaf.org ">
<head>
    <title>采美365网-中国美业全方位线上交易服务互动平台，做美业，上采美</title>
    <template th:replace="components/head-link"></template>
    <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/account/register.css(v=${version})}" rel="stylesheet" type="text/css">
</head>
<body>
<!-- 引用头部 -->
<template th:replace="account/components/header"></template>

<!-- 注册账号 -->
<div id="registerPage">
    <div class="signAccount clear" v-show="showTabContentIndex == 1">
        <div class="title">欢迎机构入驻</div>
        <div class="advisory" >
            <span v-if="isPC" class="icon">入驻咨询</span>
            <div v-else class="duv" @click="showVadvisory"><span class="mIcon" ></span><span>入驻咨询</span> </div>
            <div class="mask" :class="showClass" @click="closeVadvisory"></div>
            <div class="advisoryInfo" :class="showClass">
                <div class="info">若暂不方便入驻机构或无法入驻，您可以留下您的姓名和联系方式，采美工作人员会第一时间联系您。</div>
                <div v-if="!isPC" class="icon-close" @click="closeVadvisory"></div>
                <form>
                    <div class="formLine">
                        <p><em>*</em>姓名：</p>
                        <input type="text" v-model.trim="advisory.name" placeholder="请输入您的姓名" :rule="rule.name" maxlength="6" @blur="blurHandle($event)" unselectable="on" needverify>
                        <i class="checked icon mIcon"></i>
                        <span class="errTips icon mIcon" tips="请输入正确的联系人姓名"></span>
                    </div>
                    <div class="formLine">
                        <p><em>*</em>手机号：</p>
                        <input type="text" v-model.trim="advisory.phone" placeholder="请输入您的常用手机号" :rule="rule.phone" maxlength="11" @blur="blurHandle($event)" needverify>
                        <i class="checked icon mIcon"></i>
                        <span class="errTips icon mIcon" tips="请输入有效电话号码"></span>
                    </div>
                    <button class="btn" type="button" @click="postAdvisory()">提交</button>
                </form>
            </div>
        </div>
        <div class="registerClub">
            <!--机构注册表单-->
            <form>
                <div class="formLine">
                    <p><em>*</em>联系人：</p>
                    <input type="text" v-model.trim="clubUser.name" placeholder="请输入联系人姓名" :rule="rule.name" maxlength="6" @blur="blurHandle($event)" needverify>
                    <i class="checked icon mIcon"></i>
                    <span class="errTips icon mIcon" tips="请输入正确的联系人姓名"></span>
                </div>
                <div class="formLine" >
                    <p><em>*</em>手机号(<span>手机号可用作登录账号</span>)：</p>
                    <input  class="massageBtn"  type="text" v-model.trim="clubUser.phone" placeholder="请输入您的常用手机号" :rule="rule.phone" maxlength="11" @blur="blurHandle($event)" needverify>
                    <i class="checked icon mIcon"></i>
                    <span class="errTips icon mIcon" tips="请输入有效电话号码"></span>
                </div>
                <div class="formLine code">
                    <p><em>*</em>短信验证码：</p>
                    <input type="text" v-model.trim="clubUser.code" autocomplete="off" placeholder="请输入短信验证码" :rule="rule.code"  maxlength="6" @blur="blurHandle($event)" needverify>
                    <i class="checked icon mIcon"></i>
                    <span class="errTips icon mIcon" tips="请输入有效短信验证码"></span>
                    <a class="getCode" href="javascript:void(0);" @click="getMobileImage" :class="[isMobileDisabled  ? 'disabled' : '']">{{ mobileCodeText }}</a>
                </div>
                <div class="formLine">
                    <p><em>*</em>登录密码：</p>
                    <input type="password" v-model.trim="clubUser.password" autocomplete="new-password" placeholder="请输入8-16位数字和字母组合" :rule="rule.password" maxlength="32" @blur="blurHandle($event)" needverify>
                    <i class="checked icon mIcon"></i>
                    <span class="errTips icon mIcon" tips="8-16位数字或字母或字符"></span>
                    <i class="icon showPwd" @click="showPassword($event)"></i>
                </div>
                <div class="formLine">
                    <p><em>*</em>确认密码：</p>
                    <input type="password" v-model.trim="clubUser.password2" autocomplete="new-password" placeholder="请再次确认密码" :rule="rule.password" maxlength="32" @blur="blurHandle($event)" needverify>
                    <i class="checked icon mIcon"></i>
                    <span class="errTips icon mIcon" tips="8-16位数字或字母或字符"></span>
                    <i class="icon showPwd" @click="showPassword($event)"></i>
                </div>
                <div class="subLine">
                    <p>
                        <span class="iconfont icon-weigouxuan" :class="isAgree ? 'icon-gouxuan' : 'icon-weigouxuan' " @click="checkedIsAgreeFn"></span>
                        我已阅读并同意<a href="javascript:void(0);">《机构协议》</a><a href="javascript:void(0);">《用户协议》</a>及<a href="javascript:void(0);">《隐私权政策》</a>
                    </p>
                    <span class="errTips icon mIcon show" v-if="isShowAgree">请阅读并同意协议</span>
                    <button class="btn" :class="loginLoading ? 'disabled':''"  @click="clubRegister()">注册</button>
                </div>
            </form>
        </div>
    </div>
    <div class="signAccount upgrade clear" v-show="showTabContentIndex == 2">
        <div class="title">升级会员机构</div>
        <div class="title-tips"><p>补充以下详细信息即可升级为会员机构，享受更多更好的服务</p></div>
        <div class="registerClub clear">
            <!--机构注册表单-->
            <form>
                <div class="formLine">
                    <p><em>*</em>邮箱(<span>邮箱可用作登录账号，请使用公司邮箱或法人邮箱</span>)：</p>
                    <input type="text" v-model.trim="clubUpgradeUser.contractEmail1" placeholder="请输入邮箱地址" :rule="rule.email" maxlength="32" @blur="blurHandle($event)" needverify>
                    <i class="checked icon mIcon"></i>
                    <span class="errTips icon mIcon" tips="请输入正确的邮箱地址"></span>
                </div>
                <div class="formLine">
                    <p><em>*</em>机构名称：</p>
                    <input type="text" v-model.trim="clubUpgradeUser.name" placeholder="请与营业执照的注册名称保持一致" :rule="rule.name" maxlength="30" @blur="blurHandle($event)" needverify>
                    <i class="checked icon mIcon"></i>
                    <span class="errTips icon mIcon" tips="请输入正确的联系人姓名"></span>
                </div>
                <div class="formLine">
                    <p>机构简称：</p>
                    <input type="text" v-model.trim="clubUpgradeUser.sname" placeholder="请输入机构简称" maxlength="10" >
                </div>
                <div class="formLine">
                    <p><em>*</em>联系地址：</p>
                    <div class="address">
                        <select name="provinceID" id="cProvince" @change="ChangeProvince">
                            <option value="" >请选择</option>
                            <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.provinceID' >{{item.name}}</option>
                        </select>
                        <select name="cityID" id="cCity" @change="ChangeGetcity($event)" >
                            <option value="" >请选择</option>
                            <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID" >{{item.name}}</option>
                        </select>
                        <select name="townID" id="cTown" @change="ChangeGetcTown($event)">
                            <option value="" >请选择</option>
                            <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
                        </select>
                        <textarea placeholder="建议您如实填写详细地址，例如：街道名称，门牌号码，楼层和房间号等信息"  v-model="clubUpgradeUser.address"></textarea>
                    </div>
                    <i class="checked icon mIcon"></i>
                    <span class="errTips icon mIcon" tips="请输入正确的联系地址"></span>
                </div>
                <div class="formLine">
                    <p>营业执照编号：</p>
                    <input type="text" v-model.trim="clubUpgradeUser.socialCreditCode" placeholder="请输入统一社会信用代码" maxlength="18">
                </div>
                <div class="formLine clear">
                    <div class="form-upload">
                        <p><em>*</em>营业执照图片：</p>
                        <div class="form-upload-image" v-if="clubUpgradeUser.businessLicenseImage!=''">
                            <img class="upload-img" :src="clubUpgradeUser.businessLicenseImage" alt="" id="businessLicenseImage" @click="showViewerImageFn()">
                            <i class="icon mIcon" @click="deleteBusinessImage()"></i>
                        </div>
                        <div class="formLine-file" v-else>
                            <input ref="businessLicenseImage" class="file" type="file" accept="image/png,image/jpeg,image/gif,image/jpg"  @change="uploadBusinessLicenseImageFn">
                            <i class="icon mIcon file-biss"></i>
                        </div>
                        <span class="errTips icon mIcon"></span>
                    </div>
                    <div class="form-upload-tips">
                        <i class="icon mIcon icon-wen"></i>
                        <div class="wen-tips">点击图片可放大图片</div>
                    </div>
                </div>
                <div class="formLine clear">
                    <div class="form-upload">
                        <p>门头照：</p>
                        <div class="form-upload-image" v-if="clubUpgradeUser.headpic!=''">
                            <img class="upload-img" :src="clubUpgradeUser.headpic" alt="" id="uploadMentuzImage" @click="showViewerImageFn1()">
                            <i class="icon mIcon" @click="deleteMentuzImage()"></i>
                        </div>
                        <div class="formLine-file" v-else>
                            <input ref="businessMentuImage" class="file" type="file" accept="image/png,image/jpeg,image/gif,image/jpg"  @change="uploadMentuzImageFn">
                            <i class="icon mIcon file-door"></i>
                        </div>
                    </div>
                </div>
                <div class="formLine">
                    <p><em>*</em>机构类型：</p>
                    <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="0" ><i class="icon mIcon">医美</i></label>
                    <label class="diyBox"><input type="radio" name="firstShopType" v-model="clubUpgradeUser.firstClubType" value="1" checked><i class="icon mIcon">生美</i></label>
                    <span class="errTips icon mIcon" tips="请选择公司类型"></span>
                </div>
                <div v-show="clubUpgradeUser.firstClubType == 0" class="formLine">
                    <label class="diyBox second"><input type="radio" name="secondClubType" v-model="clubUpgradeUser.secondClubType" value="1" checked><i class="icon mIcon">诊所</i></label>
                    <label class="diyBox second"><input type="radio" name="secondClubType" v-model="clubUpgradeUser.secondClubType" value="2" ><i class="icon mIcon">门诊</i></label>
                    <label class="diyBox second"><input type="radio" name="secondClubType" v-model="clubUpgradeUser.secondClubType" value="3" ><i class="icon mIcon">医院</i></label>
                    <span class="errTips icon mIcon" tips="请选择公司类型"></span>
                </div>
                <div v-show="clubUpgradeUser.firstClubType == 0" class="formLine">
                    <div class="form-upload">
                        <p>资质：</p>
                        <div class="form-upload-image" v-if="clubUpgradeUser.medicalPracticeLicenseImg!=''">
                            <img class="upload-img" :src="clubUpgradeUser.medicalPracticeLicenseImg" alt="" id="medicalPracticeLicenseImg" @click="showViewerImageFn2()">
                            <i class="icon mIcon" @click="deleteMedicalImage()"></i>
                        </div>
                        <div class="formLine-file" v-else>
                            <input ref="businessMedicaImage" class="file" type="file"  accept="image/png,image/jpeg,image/gif,image/jpg" @change="uploadMedicaImageFn">
                            <i class="icon mIcon file-zizhi"></i>
                        </div>
                        <span class="errTips icon mIcon"></span>
                    </div>
                    <div class="form-upload-tips">
                        <i class="icon icon-wen"></i>
                        <div class="wen-tips">点击图片可放大图片</div>
                    </div>
                </div>
                <div v-if="clubUpgradeUser.secondClubType == 2 || clubUpgradeUser.secondClubType == 3" class="formLine">
                    <p>科室：</p>
                    <input type="text" v-model.trim="clubUpgradeUser.department" placeholder="请填写您所经营的科室,用逗号隔开.(至少三个)" maxlength="50">
                </div>
                <div class="formLine clear" v-if="clubUpgradeUser.firstClubType == 0">
                    <p><em>*</em>主营内容：</p>
                    <p class="business clear">
                        <label v-for="pro in mentuzCampNullList" class="diyBox second" >
                            <input type="checkbox" name="secondClubType" v-model="userMainPros" :value="pro.name" >
                            <i class="icon mIcon">{{pro.name}}</i>
                        </label>
                    </p>
                    <p class="business">
                        <input type="text" placeholder="请输入其他自定义品项目" v-model.trim="mainProEdit">
                        <a href="javascript:void(0);" @click="mainProAdd()">确认添加</a>
                    </p>
                    <span class="errTips icon mIcon" tips="请选择或添加主营产品"></span>
                </div>
                <div class="formLine clear" v-if="clubUpgradeUser.firstClubType == 1">
                    <p><em>*</em>主营内容：</p>
                    <p class="business clear">
                        <label v-for="pro in medicaCampNullList" class="diyBox second">
                            <input type="checkbox" name="secondClubType" v-model="userMainPros" :value="pro.name" >
                            <i class="icon mIcon">{{pro.name}}</i>
                        </label>
                    </p>
                    <p class="business">
                        <input type="text" placeholder="请输入其他自定义品项目" v-model.trim="mainProEdit">
                        <a href="javascript:void(0);" @click="mainProAdd()">确认添加</a>
                    </p>
                    <span class="errTips icon mIcon" tips="请选择或添加主营产品"></span>
                </div>
                <div class="subLine">
                    <button class="btn-upgrade none" type="button" @click="clubLoginIndex()">先跳过,以后再升级</button>
                    <button class="btn-upgrade" :class="loginLoading ? 'disabled':''" type="button" @click="clubUpgrade()">确认升级并提交审核</button>
                </div>
            </form>
        </div>
    </div>
    <div class="content-model"  :class="isCodeModel ? 'active' : ''">
        <div class="model-main">
            <div class="model-title"><p>获取短信验证码</p><i class="icon mIcon icon-close"  @click="closeCodeModel"></i></div>
            <div class="model-content">
                <div class="model-form">
                    <input class="input" type="text" placeholder="请输入图形验证码" v-model="imageCode" maxlength="4">
                    <div class="image"><img :src="codeImagePath" alt=""></div>
                    <div class="refresh" @click="refreshCodeImage">
                        <i class="icon mIcon"></i>
                        <span>刷新</span>
                    </div>
                </div>
                <div class="model-button">
                    <div class="button"  @click="getMobileCodeFn">获取短信验证码</div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 引入底部 -->
<template th:replace="components/footer"></template>
<template th:replace="components/foot-link"></template>
<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/user.service.js(v=${version})}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/account/register-club.js(v=${version})}"></script>
</body>
</html>
