<!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" >
        <div class="supplierConfirm" v-if="showSupplierConfirm">
            <div class="cont">
                <h3>供应商注册需知</h3>
                <p>采美365网感谢您的关注！</p>
                <p>采美365网是美容行业一站式B2B 采购交易服务平台，供应商入驻需平台审核。注册说明如下，请您仔细阅读：</p>
                <ul>
                    <li>1、本网站为正品网站，谢绝非自营/自有品牌（以登记备案为准），代理商应出具授权书等说明文件，杜绝山寨、假冒伪劣等侵权、侵害他人利益的行为。</li>
                    <li>2、注册需要提供公司名称、营业执照、公司地址、联系人等基本信息。</li>
                    <li>3、供应商注册审核通过后需缴纳平台信息服务管理费用。</li>
                </ul>
                <div class="btnLine">
                    <p><input type="checkbox" checked readonly>已阅读供应商注册需知</p>
                    <button type="button" @click="showSupplier">同意</button>
                </div>
            </div>
        </div>
        <div v-else>
            <div class="title">欢迎供应商入驻</div>
            <div class="registerShop clear">
                <!--供应商注册表单-->
                <form>
                    <h6 class="tit">账户信息</h6>
                    <div class="formLine">
                        <p><em>*</em>手机号(<span>手机号可用作登录账号</span>)：</p>
                        <input class="massageBtn"  type="text" v-model.trim="supplierUser.bindMobile" 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="supplierUser.mobileCode" 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="supplierUser.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="supplierUser.passWordConfirm" 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>
                    <h6 class="tit">基本信息</h6>
                    <div class="formLine">
                        <p><em>*</em>公司名称：</p>
                        <input type="text" v-model.trim="supplierUser.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><em>*</em>联系人：</p>
                        <input type="text" v-model.trim="supplierUser.linkMan" placeholder="请输入联系人姓名" :rule="rule.name" maxlength="10" @blur="blurHandle($event)" needverify>
                        <i class="checked icon mIcon"></i>
                        <span class="errTips icon mIcon" tips="请输入正确的联系人姓名"></span>
                    </div>
                    <div class="formLine">
                        <p>邮箱(<span>邮箱可用作登录账号，请使用公司邮箱或法人邮箱</span>)：</p>
                        <input type="text" v-model.trim="supplierUser.email" placeholder="请输入邮箱地址" maxlength="40">
                        <span class="errTips"></span>
                    </div>
                    <h6 class="tit">详细信息</h6>
                    <div class="formLine">
                        <p>公司简称：</p>
                        <input type="text" v-model.trim="supplierUser.sname" placeholder="请输入公司简称" maxlength="10">
                        <span class="errTips"></span>
                    </div>
                    <div class="formLine">
                        <p><em>*</em>联系地址：</p>
                        <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="supplierUser.address"></textarea>
                        <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="supplierUser.socialCreditCode" placeholder="请输入统一社会信用代码" :rule="rule.license" maxlength="19" @blur="blurHandle($event)" needverify>
                        <i class="checked icon mIcon"></i>
                        <span class="errTips icon mIcon" tips="请输入正确的统一社会信用代码"></span>
                    </div>
                    <div class="formLine clear">
                        <div class="form-upload">
                            <p><em>*</em>营业执照图片：</p>
                            <div class="form-upload-image" v-if="supplierUser.businessLicenseImage!=''">
                                <img class="upload-img" :src="supplierUser.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 icon-wen"></i>
                            <div class="wen-tips">点击图片可放大图片</div>
                        </div>
                    </div>
                    <div class="formLine">
                        <p><em>*</em>公司类型：</p>
                        <label class="diyBox"><input type="radio" name="firstShopType" v-model="supplierUser.firstShopType" value="1" ><i class="icon mIcon">医疗</i></label>
                        <label class="diyBox"><input type="radio" name="firstShopType" v-model="supplierUser.firstShopType" value="2" checked><i class="icon mIcon">非医疗</i></label>
                        <span class="errTips icon mIcon mIcon" tips="请选择公司类型"></span>
                    </div>
                    <div v-if="supplierUser.firstShopType == 1" class="formLine">
                        <p><em>*</em>医疗类型：</p>
                        <label class="diyBox second"><input type="radio" name="secondShopType" v-model="supplierUser.secondShopType" value="1" ><i class="icon mIcon">一类器械</i></label>
                        <label class="diyBox second"><input type="radio" name="secondShopType" v-model="supplierUser.secondShopType" value="2" checked><i class="icon mIcon">二类器械</i></label>
                        <label class="diyBox second"><input type="radio" name="secondShopType" v-model="supplierUser.secondShopType" value="3" ><i class="icon mIcon">三类器械</i></label>
                        <label class="diyBox second"><input type="radio" name="secondShopType" v-model="supplierUser.secondShopType" value="4" checked><i class="icon mIcon">其他</i></label>
                        <span class="errTips icon mIcon" tips="请选择公司类型"></span>
                    </div>
                    <div class="formLine">
                        <p><em>*</em>主营产品：</p>
                        <p class="business">
                            <label v-for="pro in mentuzCampNullList" class="diyBox second"><input type="checkbox" name="secondShopType" v-model="userMainPros" :value="pro.name" ><i class="icon mIcon">{{pro.name}}</i></label>
                            <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">
                        <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" type="button" :class="loginLoading ? 'disabled':''"  @click="supplierRegister()">同意并提交审核</button>
                    </div>
                </form>
            </div>
        </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="请输入图形验证码" maxlength="4" v-model="imageCode">
                    <div class="image"><img :src="codeImagePath" alt=""></div>
                    <div class="refresh" @click="refreshCodeImage"><i class="icon mIcon"></i></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-supplier.js(v=${version})}"></script>
</body>
</html>
