|
|
@@ -1,357 +1,336 @@
|
|
|
<template>
|
|
|
<div class="login container">
|
|
|
- <img class="logo" src="~/assets/img/logo.png" style="width:100px">
|
|
|
+ <img class="logo" src="~/assets/img/title_gongfang.png">
|
|
|
<el-row class="login-row" type="flex" justify="center">
|
|
|
<el-col :xs="{span: 14, offset: 5}" :sm="{span: 10, offset: 7}">
|
|
|
- <el-card style="height: 600px">
|
|
|
- <el-radio-group v-model="radio" style="margin-left: 140px">
|
|
|
- <el-radio-button label="区域公司注册"></el-radio-button>
|
|
|
- <el-radio-button label="客服代表注册"></el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
- <el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" class="demo-ruleForm" style="margin-left: 10px">
|
|
|
- <div v-if=" radio=='区域公司注册'">
|
|
|
- <div style="overflow-x: auto; overflow-y: auto; height: 500px; width:1050px;margin-left: 8px">
|
|
|
- <h4 style="color: black;width: 800px">企业信息</h4>
|
|
|
- <el-form-item label="公司名称" required style="width: 46%" prop="companyname" >
|
|
|
- <el-input v-model="ruleForm2.companyname" :placeholder="$t('signup.userplaceholder')">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
+ <el-card style="height: 600px">
|
|
|
+ <el-radio-group v-model="radio" style="margin-left: 37%">
|
|
|
+ <el-radio-button label="区域公司注册"></el-radio-button>
|
|
|
+ <el-radio-button label="客服代表注册"></el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-form ref="ruleForm2" :model="ruleForm2" :rules="rules2" class="demo-ruleForm" style="margin-left: 25%">
|
|
|
+ <div v-if=" radio=='区域公司注册'">
|
|
|
+ <div style="overflow-x: auto; overflow-y: auto; height: 500px; width:1050px; margin-left: 8px">
|
|
|
+ <h4 style="color: black;width: 800px">企业信息</h4>
|
|
|
+ <el-form-item label="公司名称" required style="width: 46%" prop="companyname">
|
|
|
+ <el-input v-model="ruleForm2.companyname" :placeholder="$t('signup.userplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="公司所在地" required style="width: 46%" prop="homeaddress"><br>
|
|
|
- <el-cascader
|
|
|
- expand-trigger="hover"
|
|
|
- :options="countryoptions"
|
|
|
- :props="countryprops"
|
|
|
- change-on-select
|
|
|
- v-model="ruleForm2.homeaddress">
|
|
|
- </el-cascader>
|
|
|
- </el-form-item>
|
|
|
+ <el-cascader
|
|
|
+ expand-trigger="hover"
|
|
|
+ :options="countryoptions"
|
|
|
+ :props="countryprops"
|
|
|
+ change-on-select
|
|
|
+ v-model="ruleForm2.homeaddress"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="详细地址" required style="width: 46%" prop="detailaddress">
|
|
|
- <el-input v-model="ruleForm2.detailaddress" :placeholder="$t('signup.Detailedaddressplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="固定电话" required style="width: 46%" prop="mobile">
|
|
|
- <el-input v-model="ruleForm2.mobile" :placeholder="$t('signup.telephoneplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
+ <el-input v-model="ruleForm2.detailaddress" :placeholder="$t('signup.Detailedaddressplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="固定电话" required style="width: 46%" prop="mobile">
|
|
|
+ <el-input v-model="ruleForm2.mobile" :placeholder="$t('signup.telephoneplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="社会统一机构代码证件号" required style="width: 46%" prop="number">
|
|
|
- <el-input v-model="ruleForm2.number" :placeholder="$t('signup.numberplaceholder')"></el-input>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- <h4 style="color: black;width: 800px">登录账户信息</h4>
|
|
|
- <el-form-item label="手机号码" required style="width: 46%" prop="telephone">
|
|
|
- <el-input v-model="ruleForm2.telephone" :placeholder="$t('signup.phoneplaceholder')" maxlength= 11 ></el-input>
|
|
|
+ <el-input v-model="ruleForm2.number" :placeholder="$t('signup.numberplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <h4 style="color: black;width: 800px">登录账户信息</h4>
|
|
|
+ <el-form-item label="手机号码" required style="width: 46%" prop="telephone">
|
|
|
+ <el-input v-model="ruleForm2.telephone" :placeholder="$t('signup.phoneplaceholder')" maxlength = 11 ></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="设置密码" required style="width: 46%" prop="pass" >
|
|
|
- <el-input type="password" v-model="ruleForm2.pass" auto-complete="off" :placeholder="$t('signup.passwordplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="确认密码" required style="width: 46%" prop="checkPass" >
|
|
|
- <el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off" :placeholder="$t('signup.ConfirmPassplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <h4 style="color: black;width: 800px">企业联系人信息</h4>
|
|
|
- <el-form-item label="姓名" required style="width: 46%" prop="realname">
|
|
|
- <el-input v-model="ruleForm2.realname" :placeholder="$t('signup.nameplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="手机号码" required style="width: 46%" prop="phone">
|
|
|
- <el-input v-model="ruleForm2.phone" :placeholder="$t('signup.phoneplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="邮箱" required style="width: 46%" prop="mail">
|
|
|
- <el-input v-model="ruleForm2.mail" :placeholder="$t('signup.mailplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="区域授权码" prop="acccode" required style="width: 46%" >
|
|
|
- <el-input v-model="ruleForm2.acccode" :placeholder="$t('signup.codeplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="验证码" prop="phonenumber" required style="width: 46%">
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="短信验证码" prop="phonenumber" required style="width: 46%">
|
|
|
- </el-form-item>
|
|
|
- <el-checkbox v-model="checked" style="margin-left: 80px">阅读并同意</el-checkbox>
|
|
|
- <router-link to= "#">《麦吉轮用户注册协议》</router-link>
|
|
|
- <router-link to= "#">《隐私政策》</router-link><br>
|
|
|
- <el-form-item></el-form-item>
|
|
|
- <!--<el-form-item prop="captcha" :rules="[{ required: true, message: $t('login.captchaRequired')}]">
|
|
|
- <el-col :span="12">
|
|
|
- <el-input v-model="user.captcha" :placeholder="$t('login.captchaPlaceholder')"></el-input>
|
|
|
- </el-col>
|
|
|
- <el-col :offset="1" :span="11" ref="captcha">
|
|
|
- <div v-html="captchaSvg" @click='refreshCaptcha' class="captcha"></div>
|
|
|
- </el-col>
|
|
|
- </el-form-item>-->
|
|
|
- <el-row>
|
|
|
- <template>
|
|
|
- <el-button type="primary" @click="open" style="width: 46%;margin-left: 10px">立即注册</el-button></template>
|
|
|
- </el-row>
|
|
|
- <!--<el-row>
|
|
|
- <el-col :span="5">
|
|
|
- <el-checkbox v-model="keepPwd">记住密码</el-checkbox>
|
|
|
- </el-col>
|
|
|
- <el-col :offset='14' :span="5">
|
|
|
- <label>忘记密码?</label>
|
|
|
- </el-col>
|
|
|
- </el-row>-->
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
- <el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" class="demo-ruleForm" style="margin-left: 10px">
|
|
|
- <div v-if=" radio=='客服代表注册'">
|
|
|
- <div style="overflow-x: auto; overflow-y: auto; height: 500px; width:1050px;margin-left: 8px">
|
|
|
- <el-form-item label="手机号" required style="width: 46%" prop="telephone1">
|
|
|
- <el-input v-model="ruleForm2.telephone1" :placeholder="$t('signup.phoneplaceholder')" maxlength= 11 ></el-input>
|
|
|
+ <el-form-item label="设置密码" required style="width: 46%" prop="pass" >
|
|
|
+ <el-input type="password" v-model="ruleForm2.pass" auto-complete="off" :placeholder="$t('signup.passwordplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="确认密码" required style="width: 46%" prop="checkPass" >
|
|
|
+ <el-input type="password" v-model="ruleForm2.checkPass" auto-complete="off" :placeholder="$t('signup.ConfirmPassplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <h4 style="color: black;width: 800px">企业联系人信息</h4>
|
|
|
+ <el-form-item label="姓名" required style="width: 46%" prop="realname">
|
|
|
+ <el-input v-model="ruleForm2.realname" :placeholder="$t('signup.nameplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="手机号码" required style="width: 46%" prop="phone">
|
|
|
+ <el-input v-model="ruleForm2.phone" :placeholder="$t('signup.phoneplaceholder')"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="设置密码" required style="width: 46%" prop="password">
|
|
|
- <el-input type="password" v-model="ruleForm2.password" auto-complete="off" :placeholder="$t('signup.passwordplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="确认密码" required style="width: 46%" prop="checkPass1">
|
|
|
- <el-input type="password" v-model="ruleForm2.checkPass1" auto-complete="off" :placeholder="$t('signup.ConfirmPassplaceholder')"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="客服代表授权码" required style="width: 46%" prop="acccode1">
|
|
|
- <el-input v-model="ruleForm2.acccode1" :placeholder="$t('signup.Customercodeplaceholder')"></el-input>
|
|
|
+ <el-form-item label="邮箱" required style="width: 46%" prop="mail">
|
|
|
+ <el-input v-model="ruleForm2.mail" :placeholder="$t('signup.mailplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="区域授权码" prop="acccode" required style="width: 46%" >
|
|
|
+ <el-input v-model="ruleForm2.acccode" :placeholder="$t('signup.codeplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="验证码" prop="phonenumber" required style="width: 46%">
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="短信验证码" prop="phonenumber" required style="width: 46%">
|
|
|
+ </el-form-item>
|
|
|
+ <el-checkbox v-model="checked" style="margin-left: 80px">阅读并同意</el-checkbox>
|
|
|
+ <router-link to= "#">《麦吉轮用户注册协议》</router-link>
|
|
|
+ <router-link to= "#">《隐私政策》</router-link><br>
|
|
|
+ <el-row style="margin-top: 10px; margin-bottom: 20px">
|
|
|
+ <el-button type="primary" @click="register" style="width: 46%">立即注册</el-button>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ <el-form ref="ruleForm2" :model="ruleForm2" :rules="rules2" class="demo-ruleForm" style="margin-left: 25%">
|
|
|
+ <div v-if=" radio=='客服代表注册'">
|
|
|
+ <div style="overflow-x: auto; overflow-y: auto; height: 500px; width:1050px; margin-left: 8px">
|
|
|
+ <el-form-item label="手机号" required style="width: 46%" prop="telephone1">
|
|
|
+ <el-input v-model="ruleForm2.telephone1" :placeholder="$t('signup.phoneplaceholder')" maxlength= 11 ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="设置密码" required style="width: 46%" prop="password">
|
|
|
+ <el-input type="password" v-model="ruleForm2.password" auto-complete="off" :placeholder="$t('signup.passwordplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="确认密码" required style="width: 46%" prop="checkPass1">
|
|
|
+ <el-input type="password" v-model="ruleForm2.checkPass1" auto-complete="off" :placeholder="$t('signup.ConfirmPassplaceholder')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="客服代表授权码" required style="width: 46%" prop="acccode1">
|
|
|
+ <el-input v-model="ruleForm2.acccode1" :placeholder="$t('signup.Customercodeplaceholder')"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="公司所在地" prop="homeaddress1" required style="width: 46%"><br>
|
|
|
- <el-cascader
|
|
|
- expand-trigger="hover"
|
|
|
- :options="countryoptions"
|
|
|
- :props="countryprops"
|
|
|
- change-on-select
|
|
|
- v-model="ruleForm2.homeaddress1">
|
|
|
- </el-cascader>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="验证码" prop="telep" required style="width: 46%">
|
|
|
+ <el-cascader
|
|
|
+ expand-trigger="hover"
|
|
|
+ :options="countryoptions"
|
|
|
+ :props="countryprops"
|
|
|
+ change-on-select
|
|
|
+ v-model="ruleForm2.homeaddress1"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="验证码" prop="telep" required style="width: 46%">
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="短信验证码" prop="phober" required style="width: 46%">
|
|
|
+ <el-form-item label="短信验证码" prop="phober" required style="width: 46%">
|
|
|
</el-form-item>
|
|
|
- <el-checkbox v-model="checked1" style="margin-left: 80px">阅读并同意</el-checkbox>
|
|
|
- <router-link to="#">《麦吉轮用户注册协议》</router-link><router-link to="#">《隐私政策》</router-link><el-form-item></el-form-item>
|
|
|
- <el-row>
|
|
|
- <template>
|
|
|
- <el-button type="primary" @click="open1" style="width: 46%;margin-left: 10px">立即注册</el-button></template>
|
|
|
- </el-row></div>
|
|
|
- </div>
|
|
|
-</el-form>
|
|
|
+ <el-checkbox v-model="checked1" style="margin-left: 80px">阅读并同意</el-checkbox>
|
|
|
+ <router-link to="#">《麦吉轮用户注册协议》</router-link><router-link to="#">《隐私政策》</router-link>
|
|
|
+ <el-row style="margin-top: 10px; margin-bottom: 20px">
|
|
|
+ <el-button type="primary" @click="register2" style="width: 46%">立即注册</el-button>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import Vue from 'vue'
|
|
|
-import axios from 'axios'
|
|
|
-import debounce from '@/utils/debounce'
|
|
|
-import Component from 'class-component'
|
|
|
-@Component
|
|
|
-export default class Signup extends Vue {
|
|
|
- countryoptions = []
|
|
|
- asyncData({ req, params }) {
|
|
|
- return axios.get('http://restapi.amap.com/v3/config/district?key=13f54664eb5a883195604db09d3fba5c&subdistrict=3')
|
|
|
- .then((res) => {
|
|
|
- let countstr = JSON.stringify(res.data.districts[0].districts)
|
|
|
- countstr = countstr.replace(/\,\"districts\"\:\[\]/g,'')
|
|
|
- return { countryoptions: JSON.parse(countstr) }
|
|
|
- })
|
|
|
- // thisinitdata()
|
|
|
- }
|
|
|
- captchaSvg = ''
|
|
|
- // keepPwd = false
|
|
|
- logging = false
|
|
|
- layout () {
|
|
|
- return 'empty'
|
|
|
- }
|
|
|
- open () {
|
|
|
- if (this.ruleForm2.companyname === '') {
|
|
|
- this.$alert('请填写公司名称!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.homeaddress === '') {
|
|
|
- this.$alert('请填写公司地址!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.detailaddress === '') {
|
|
|
- this.$alert('请填写公司详细地址!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.mobile === '') {
|
|
|
- this.$alert('请填写固定电话!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.number === '') {
|
|
|
- this.$alert('请填写社会统一机构代码证件号!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.telephone === '') {
|
|
|
- this.$alert('请填写登录信息手机号!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- if (this.ruleForm2.pass === '') {
|
|
|
- this.$alert('请填写密码!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.checkPass === '') {
|
|
|
- this.$alert('请确认密码!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.realname === '') {
|
|
|
- this.$alert('请填写姓名!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.phone === '') {
|
|
|
- this.$alert('请填写企业联系人手机号码!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.mail === '') {
|
|
|
- this.$alert('请填写邮箱!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.acccode === '') {
|
|
|
- this.$alert('请填写区域授权码!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- if (this.checked === '') {
|
|
|
- this.$alert('你是否同意注册协议!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- let re = /^[1][3456789]\d{9}$/
|
|
|
- if (!re.test(this.ruleForm2.telephone)) {
|
|
|
- this.$alert('请填写正确的手机号!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- let re1 = /^[1][3456789]\d{9}$/
|
|
|
- if (!re.test(this.ruleForm2.phone)) {
|
|
|
- this.$alert('请填写正确的手机号!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
+ import Vue from 'vue'
|
|
|
+ import axios from 'axios'
|
|
|
+ import debounce from '@/utils/debounce'
|
|
|
+ import Component from 'class-component'
|
|
|
+ @Component
|
|
|
+ export default class Signup extends Vue {
|
|
|
+ countryoptions = []
|
|
|
+ asyncData({ req, params }) {
|
|
|
+ return axios.get('http://restapi.amap.com/v3/config/district?key=13f54664eb5a883195604db09d3fba5c&subdistrict=3')
|
|
|
+ .then((res) => {
|
|
|
+ let countstr = JSON.stringify(res.data.districts[0].districts)
|
|
|
+ countstr = countstr.replace(/\,\"districts\"\:\[\]/g,'')
|
|
|
+ return { countryoptions: JSON.parse(countstr) }
|
|
|
+ })
|
|
|
+ // thisinitdata()
|
|
|
}
|
|
|
- // alert(this.ruleForm2.telephone)
|
|
|
- let params = {
|
|
|
- companyname: this.ruleForm2.companyname,
|
|
|
- password : this.ruleForm2.pass,
|
|
|
- acccode : this.ruleForm2.acccode,
|
|
|
- telephone: this.ruleForm2.telephone,
|
|
|
- email: this.ruleForm2.mail,
|
|
|
- homeaddress: this.ruleForm2.homeaddress[0]+ this.ruleForm2.homeaddress[1]+ this.ruleForm2.homeaddress[2],
|
|
|
- detailaddress: this.ruleForm2.detailaddress,
|
|
|
- mobile: this.ruleForm2.mobile,
|
|
|
- realname: this.ruleForm2.realname
|
|
|
+ captchaSvg = ''
|
|
|
+ // keepPwd = false
|
|
|
+ logging = false
|
|
|
+ layout () {
|
|
|
+ return 'empty'
|
|
|
}
|
|
|
- let _this = this
|
|
|
-
|
|
|
- this.$axios.put('/users/companyregistemanage', params )
|
|
|
- .then(function (response) {
|
|
|
- if (response.data.code === 0) {
|
|
|
+ register () {
|
|
|
+ if (this.ruleForm2.companyname === '') {
|
|
|
+ this.$alert('请填写公司名称!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.homeaddress === '') {
|
|
|
+ this.$alert('请填写公司地址!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.detailaddress === '') {
|
|
|
+ this.$alert('请填写公司详细地址!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.mobile === '') {
|
|
|
+ this.$alert('请填写固定电话!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.number === '') {
|
|
|
+ this.$alert('请填写社会统一机构代码证件号!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.telephone === '') {
|
|
|
+ this.$alert('请填写登录信息手机号!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
- _this.$alert(response.data.message, '提示', {
|
|
|
+ if (this.ruleForm2.pass === '') {
|
|
|
+ this.$alert('请填写密码!', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
})
|
|
|
- } else {
|
|
|
-
|
|
|
- _this.$alert(response.data.message, '提示', {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.checkPass === '') {
|
|
|
+ this.$alert('请确认密码!', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
})
|
|
|
+ return
|
|
|
}
|
|
|
- })
|
|
|
- .catch(function (error) {
|
|
|
- console.log(error)
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- open1 () {
|
|
|
- if (this.ruleForm2.telephone1 === '') {
|
|
|
- this.$alert('请填写手机号!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.password === '') {
|
|
|
- this.$alert('请设置密码!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.checkPass1 === '') {
|
|
|
- this.$alert('请确认密码!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.acccode1 === '') {
|
|
|
- this.$alert('请填写客服代表授权码!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.ruleForm2.homeaddress1 === '') {
|
|
|
- this.$alert('请填写公司所在地!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.checked1 === '') {
|
|
|
- this.$alert('你是否同意注册协议!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
+ if (this.ruleForm2.realname === '') {
|
|
|
+ this.$alert('请填写姓名!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.phone === '') {
|
|
|
+ this.$alert('请填写企业联系人手机号码!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.mail === '') {
|
|
|
+ this.$alert('请填写邮箱!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.acccode === '') {
|
|
|
+ this.$alert('请填写区域授权码!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.checked === '') {
|
|
|
+ this.$alert('你是否同意注册协议!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let re = /^[1][3456789]\d{9}$/
|
|
|
+ if (!re.test(this.ruleForm2.telephone)) {
|
|
|
+ this.$alert('请填写正确的手机号!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let re1 = /^[1][3456789]\d{9}$/
|
|
|
+ if (!re.test(this.ruleForm2.phone)) {
|
|
|
+ this.$alert('请填写正确的手机号!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ let params = {
|
|
|
+ companyname: this.ruleForm2.companyname,
|
|
|
+ password : this.ruleForm2.pass,
|
|
|
+ acccode : this.ruleForm2.acccode,
|
|
|
+ telephone: this.ruleForm2.telephone,
|
|
|
+ email: this.ruleForm2.mail,
|
|
|
+ homeaddress: this.ruleForm2.homeaddress[0]+ this.ruleForm2.homeaddress[1]+ this.ruleForm2.homeaddress[2],
|
|
|
+ detailaddress: this.ruleForm2.detailaddress,
|
|
|
+ mobile: this.ruleForm2.mobile,
|
|
|
+ realname: this.ruleForm2.realname
|
|
|
+ }
|
|
|
+
|
|
|
+ let _this = this
|
|
|
+ this.$axios.put('/users/companyregistemanage', params )
|
|
|
+ .then(function (response) {
|
|
|
+ if (response.data.code === 0) {
|
|
|
+
|
|
|
+ _this.$alert(response.data.message, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+
|
|
|
+ _this.$alert(response.data.message, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
- return
|
|
|
- }
|
|
|
- let re = /^[1][3456789]\d{9}$/
|
|
|
- if (!re.test(this.ruleForm2.telephone1)) {
|
|
|
- this.$alert('请填写正确的手机号!', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
+ .catch(function (error) {
|
|
|
+ console.log(error)
|
|
|
})
|
|
|
- return
|
|
|
- }
|
|
|
- //alert(this.ruleForm2.telephone)
|
|
|
- let params = {
|
|
|
- telephone: this.ruleForm2.telephone1,
|
|
|
- password : this.ruleForm2.password,
|
|
|
- acccode : this.ruleForm2.acccode1,
|
|
|
- homeaddress: this.ruleForm2.homeaddress1[0]+ this.ruleForm2.homeaddress1[1]+ this.ruleForm2.homeaddress1[2]
|
|
|
+
|
|
|
}
|
|
|
- let _this = this
|
|
|
- this.$axios.put('/users/customerregistemanage', params )
|
|
|
- .then(function (response) {
|
|
|
- if (response.data.code === 0) {
|
|
|
- _this.$alert(response.data.message, '提示', {
|
|
|
+ register2 () {
|
|
|
+ if (this.ruleForm2.telephone1 === '') {
|
|
|
+ this.$alert('请填写手机号!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.password === '') {
|
|
|
+ this.$alert('请设置密码!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.checkPass1 === '') {
|
|
|
+ this.$alert('请确认密码!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.acccode1 === '') {
|
|
|
+ this.$alert('请填写客服代表授权码!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.ruleForm2.homeaddress1 === '') {
|
|
|
+ this.$alert('请填写公司所在地!', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
})
|
|
|
- } else {
|
|
|
- _this.$alert(response.data.message, '提示', {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.checked1 === '') {
|
|
|
+ this.$alert('你是否同意注册协议!', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let re = /^[1][3456789]\d{9}$/
|
|
|
+ if (!re.test(this.ruleForm2.telephone1)) {
|
|
|
+ this.$alert('请填写正确的手机号!', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
})
|
|
|
+ return
|
|
|
}
|
|
|
- })
|
|
|
- .catch(function (error) {
|
|
|
- console.log(error)
|
|
|
- })
|
|
|
+ let params = {
|
|
|
+ telephone: this.ruleForm2.telephone1,
|
|
|
+ password : this.ruleForm2.password,
|
|
|
+ acccode : this.ruleForm2.acccode1,
|
|
|
+ homeaddress: this.ruleForm2.homeaddress1[0]+ this.ruleForm2.homeaddress1[1]+ this.ruleForm2.homeaddress1[2]
|
|
|
}
|
|
|
- data () {
|
|
|
- var validatePass2 = (rule, value, callback) => {
|
|
|
+ let _this = this
|
|
|
+ this.$axios.put('/users/customerregistemanage', params )
|
|
|
+ .then(function (response) {
|
|
|
+ if (response.data.code === 0) {
|
|
|
+ _this.$alert(response.data.message, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _this.$alert(response.data.message, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(function (error) {
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ data () {
|
|
|
+ var validatePass2 = (rule, value, callback) => {
|
|
|
// if (value === '') {
|
|
|
// callback(new Error('请再次输入密码'));
|
|
|
// } else
|
|
|
@@ -361,27 +340,27 @@ export default class Signup extends Vue {
|
|
|
callback();
|
|
|
}
|
|
|
}
|
|
|
- return {
|
|
|
- ruleForm2: {
|
|
|
+ return {
|
|
|
+ ruleForm2: {
|
|
|
pass: '',
|
|
|
checkPass: '',
|
|
|
checkPass1: '',
|
|
|
age: '',
|
|
|
- companyname: '',
|
|
|
- realname: '',
|
|
|
- detailaddress: '',
|
|
|
- mobile: '',
|
|
|
- number: '',
|
|
|
- telephone: '',
|
|
|
- telephone1: '',
|
|
|
- password: '',
|
|
|
- name: '',
|
|
|
- phone: '',
|
|
|
- mail:'',
|
|
|
- acccode:'',
|
|
|
- acccode1:'',
|
|
|
- homeaddress1:'',
|
|
|
- homeaddress:''
|
|
|
+ companyname: '',
|
|
|
+ realname: '',
|
|
|
+ detailaddress: '',
|
|
|
+ mobile: '',
|
|
|
+ number: '',
|
|
|
+ telephone: '',
|
|
|
+ telephone1: '',
|
|
|
+ password: '',
|
|
|
+ name: '',
|
|
|
+ phone: '',
|
|
|
+ mail:'',
|
|
|
+ acccode:'',
|
|
|
+ acccode1:'',
|
|
|
+ homeaddress1:'',
|
|
|
+ homeaddress:''
|
|
|
},
|
|
|
rules2: {
|
|
|
checkPass: [
|
|
|
@@ -393,7 +372,7 @@ export default class Signup extends Vue {
|
|
|
pass: [
|
|
|
{ required: true, message: '请设置密码', trigger: 'blur' }
|
|
|
],
|
|
|
- realname: [
|
|
|
+ realname: [
|
|
|
{ required: true, message: '请输入姓名', trigger: 'blur' }
|
|
|
],
|
|
|
companyname: [
|
|
|
@@ -436,56 +415,37 @@ export default class Signup extends Vue {
|
|
|
{ required: true, message: '请输入地址', trigger: 'blur' }
|
|
|
],
|
|
|
},
|
|
|
- companyname:'',
|
|
|
- homeaddress:'',
|
|
|
- detailaddress:'',
|
|
|
- mobile:'',
|
|
|
- Customercode:'',
|
|
|
- name:'',
|
|
|
- acccode:'',
|
|
|
- Companyname:'',
|
|
|
- Detailedaddress:'',
|
|
|
- telephone:'',
|
|
|
- number:'',
|
|
|
- mail:'',
|
|
|
- code:'',
|
|
|
- phone:'',
|
|
|
- phonenumber:'',
|
|
|
- password:'',
|
|
|
- ConfirmPass:'',
|
|
|
- checked:'',
|
|
|
- checked1:'',
|
|
|
- change:'',
|
|
|
- countryprops: {
|
|
|
- value: 'name',
|
|
|
- label: 'name',
|
|
|
- children: 'districts'
|
|
|
- },
|
|
|
- selectedOptions: [],
|
|
|
- selectedOptions2: [],
|
|
|
- radio: '区域公司注册'
|
|
|
+ companyname:'',
|
|
|
+ homeaddress:'',
|
|
|
+ detailaddress:'',
|
|
|
+ mobile:'',
|
|
|
+ Customercode:'',
|
|
|
+ name:'',
|
|
|
+ acccode:'',
|
|
|
+ Companyname:'',
|
|
|
+ Detailedaddress:'',
|
|
|
+ telephone:'',
|
|
|
+ number:'',
|
|
|
+ mail:'',
|
|
|
+ code:'',
|
|
|
+ phone:'',
|
|
|
+ phonenumber:'',
|
|
|
+ password:'',
|
|
|
+ ConfirmPass:'',
|
|
|
+ checked:'',
|
|
|
+ checked1:'',
|
|
|
+ change:'',
|
|
|
+ countryprops: {
|
|
|
+ value: 'name',
|
|
|
+ label: 'name',
|
|
|
+ children: 'districts'
|
|
|
+ },
|
|
|
+ selectedOptions: [],
|
|
|
+ selectedOptions2: [],
|
|
|
+ radio: '区域公司注册'
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- mounted () {
|
|
|
- // this.getCaptcha()
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // async getCaptcha () {
|
|
|
- // const params = {}
|
|
|
- // if (this.$refs.captcha) {
|
|
|
- // params.width = this.$refs.captcha.$el.clientWidth || 150
|
|
|
- // params.height = this.$refs.captcha.$el.clientHeight || 36
|
|
|
- // }
|
|
|
- // const {data: captcha} = await axios.get('/hpi/captcha', { params })
|
|
|
- // this.captchaSvg = captcha
|
|
|
- // }
|
|
|
-
|
|
|
- // refreshCaptcha = debounce(this.getCaptcha, 500)
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|