|
|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<!--填写注册信息-->
|
|
|
- <div class="section" @click="onHideAddress">
|
|
|
+ <div class="section" @click="onHideBox">
|
|
|
<div class="register">
|
|
|
<div class="x-form-set-header">
|
|
|
- <h4>企业注册信息</h4>
|
|
|
+ <h4>企业基本信息</h4>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<label class="col-sm-2 x-required">企业名称:</label>
|
|
|
<div class="col-sm-5">
|
|
|
- <input type="text" @change="nameCheck(3)" :disabled="!loginData.isSelf" v-model="data.name" class="form-control" name="name" required="" placeholder="填写营业执照上的企业名称">
|
|
|
+ <input :class="!validName.isValidTypeName || !validName.isValidName?'form-control error-box-border':'form-control'" type="text" @change="nameCheck(3)" @input="nameTypeCheck()" :disabled="!loginData.isSelf" v-model="data.name" name="name" required="" placeholder="填写营业执照上的企业名称">
|
|
|
</div>
|
|
|
<div class="x-text-help" v-show="validName.isValidTypeName && validName.isValidName && !validName.init">
|
|
|
<i class="glyphicon glyphicon-ok x-icon-left"></i>
|
|
|
@@ -25,18 +25,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
- <label class="col-sm-2 x-required">企业简称:</label>
|
|
|
+ <label class="col-sm-2 x-required">营业执照号:</label>
|
|
|
<div class="col-sm-5">
|
|
|
- <input type="text" :disabled="!loginData.isSelf" @change="simpleNameCheck" v-model="data.simpleName" class="form-control" name="name" required="" placeholder="请填写正确的企业名称,2~40个字符">
|
|
|
+ <input type="text" :class="!validLicence.isValidLicence?'form-control error-box-border':'form-control'" :disabled="!loginData.isSelf" @input="validLicence.init=false" @change="licenceCheck(3)" v-model="data.licenceId" name="name" required="" placeholder="请填写营业执照上的注册号">
|
|
|
</div>
|
|
|
- <div class="x-text-help" v-show="validSimpleName.isValidSimpleName && !validSimpleName.init">
|
|
|
+ <div class="x-text-help" v-show="validLicence.isValidLicence && !validLicence.init">
|
|
|
<i class="glyphicon glyphicon-ok x-icon-left"></i>
|
|
|
</div>
|
|
|
- <div class="col-sm-5" v-show="!validSimpleName.isValidSimpleName && !validSimpleName.init">
|
|
|
- <p>
|
|
|
- <i class="fa fa-info-circle"></i>请填写正确的企业名称,2~40个字符
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ <div class="col-sm-5" v-show="!validLicence.isValidLicence && !validLicence.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的注册号</p></div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<label class="col-sm-2 x-required">营业执照:</label>
|
|
|
@@ -54,14 +50,14 @@
|
|
|
<div class="col-sm-5" v-show="!validUpload.isValidUpload && !validUpload.init"><p><i class="fa fa-info-circle"></i>请上传营业执照扫描件(≤5M的图片或PDF)</p></div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
- <label class="col-sm-2 x-required">营业执照号:</label>
|
|
|
+ <label class="col-sm-2 x-required">法定代表人:</label>
|
|
|
<div class="col-sm-5">
|
|
|
- <input type="text" :disabled="!loginData.isSelf" @change="licenceCheck(3)" v-model="data.licenceId" class="form-control" name="name" required="" placeholder="请填写营业执照上的注册号">
|
|
|
+ <input type="text" :class="!validLawPerson.isValidLawPerson?'form-control error-box-border':'form-control'" @input="lawPersonCheck()" v-model="data.lawPerson" name="name" required="" placeholder="请填写营业执照上的法定代表人">
|
|
|
</div>
|
|
|
- <div class="x-text-help" v-show="validLicence.isValidLicence && !validLicence.init">
|
|
|
+ <div class="x-text-help" v-show="validLawPerson.isValidLawPerson && !validLawPerson.init">
|
|
|
<i class="glyphicon glyphicon-ok x-icon-left"></i>
|
|
|
</div>
|
|
|
- <div class="col-sm-5" v-show="!validLicence.isValidLicence && !validLicence.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的注册号</p></div>
|
|
|
+ <div class="col-sm-5" v-show="!validLawPerson.isValidLawPerson && !validLawPerson.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的法定代表人</p></div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<label class="col-sm-2 x-required">企业地址:</label>
|
|
|
@@ -116,13 +112,107 @@
|
|
|
<div class="col-sm-5" v-show="!validAddress.isValidAddress && !validAddress.init"><p><i class="fa fa-info-circle"></i>填写总部所在地详细地址</p></div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
- <label class="col-sm-2">官网地址:</label>
|
|
|
+ <label class="col-sm-2">联系人:</label>
|
|
|
+ <div class="col-sm-5">
|
|
|
+ <input type="text" class="form-control" title="请填写企业对外的联系人,为空则默认为管理员" v-model="data.linkman" name="name" required="" placeholder="请填写企业对外的联系人,为空则默认为管理员">
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-5"></div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <label class="col-sm-2">联系电话:</label>
|
|
|
+ <div class="col-sm-5">
|
|
|
+ <input :class="!validPhone.isValidPhone?'form-control error-box-border':'form-control'" type="text" v-model="data.phone" @input="phoneCheck()" name="name" required="" placeholder="例如:13838883888">
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-5"></div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <label class="col-sm-2">邮箱:</label>
|
|
|
+ <div class="col-sm-5">
|
|
|
+ <input type="text" :class="!validEmail.isValidEmail?'form-control error-box-border':'form-control'" v-model="data.email" @input="emailCheck()" required="" placeholder="例如:123123@usoft.com">
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-5"></div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <label class="col-sm-2">企业传真:</label>
|
|
|
+ <div class="col-sm-5">
|
|
|
+ <input type="text" :class="!validFax.isValidFax?'form-control error-box-border':'form-control'" v-model="data.fax" @input="faxCheck()" required="" placeholder="例如:0755-268XXXXX">
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-5"></div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <label class="col-sm-2">企业官网:</label>
|
|
|
<div class="col-sm-5">
|
|
|
- <input type="url" :disabled="!loginData.isSelf" @change="websiteCheck" v-model="data.website" class="form-control" name="name" required="" placeholder="例如:http://www.example.com">
|
|
|
- <!-- <span class="web">http://</span>-->
|
|
|
+ <input type="text" class="form-control" v-model="data.website" name="name" required="" placeholder="www.usoftchina.com" style="padding-left:55px;">
|
|
|
+ <span class="web">http://</span>
|
|
|
</div>
|
|
|
<div class="col-sm-5"></div>
|
|
|
</div>
|
|
|
+ <div class="row">
|
|
|
+ <label class="col-sm-2">行业:</label>
|
|
|
+ <div class="col-sm-5 select-dot">
|
|
|
+ <input type="text" readonly aria-haspopup="true" aria-expanded="false" @focus="onShowProfession()" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.profession" class="form-control" name="name" required="" placeholder="请选择所在行业">
|
|
|
+ <div v-show="showProfessionBox"
|
|
|
+ @mouseenter="isInProfessionBox = true"
|
|
|
+ @mouseleave="isInProfessionBox = false"
|
|
|
+ style="display: block; left: 14px; width: 473px" class="dropdown-menu x-union-menu">
|
|
|
+ <div class="x-union-list">
|
|
|
+ <ul class="list-unstyled auto-width">
|
|
|
+ <li v-for="profession in professionData.profession"
|
|
|
+ :class="profession == currentProfession.profession ? 'active' : ''"
|
|
|
+ v-text="profession"
|
|
|
+ @click="getProfessionDetail(profession)"></li>
|
|
|
+ </ul>
|
|
|
+ <ul class="list-unstyled auto-width">
|
|
|
+ <li v-for="detail in professionData.detail"
|
|
|
+ :class="detail == currentProfession.detail ? 'active' : ''"
|
|
|
+ v-text="detail"
|
|
|
+ @click="chooseProfessionDetail(detail)"></li>
|
|
|
+ </ul>
|
|
|
+ <ul class="list-unstyled auto-width">
|
|
|
+ <li v-for="detail in professionData.thirdDetail"
|
|
|
+ :class="detail == currentProfession.thirdDetail ? 'active' : ''"
|
|
|
+ v-text="detail"
|
|
|
+ @click="chooseProfessionThirdDetail(detail)"></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-5"></div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <label class="col-sm-2">企业LOGO:</label>
|
|
|
+ <div class="col-sm-5">
|
|
|
+ <input type="file" @change="uploadLogo" class="form-control file-input upload-area" required="" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png">
|
|
|
+ <img class="preview-logo-img" :src="data.logoUrl == ''?'/images/all/upload-bg.png':data.logoUrl" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-5" v-show="!validLogo.isValidLogo"><p><i class="fa fa-info-circle"></i>logo大小不能超过100K</p></div>
|
|
|
+ <div class="logo-text">个性化展示您的企业形象,图片不超过100Kb,建议宽x高=100x60</div>
|
|
|
+ <!-- <div class="x-text-help" v-show="validUpload.isValidUpload && !validUpload.init">
|
|
|
+ <i class="glyphicon glyphicon-ok x-icon-left"></i>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-5" v-show="!validUpload.isValidUpload && !validUpload.init"><p><i class="fa fa-info-circle"></i>请上传营业执照扫描件(≤5M的图片或PDF)</p></div>-->
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <label class="col-sm-2">经营范围标签:</label>
|
|
|
+ <div class="col-sm-8">
|
|
|
+ <div class="no-tags" v-if="!data.tagsData || data.tagsData.length == 0">暂无标签</div>
|
|
|
+ <div class="tags-list">
|
|
|
+ <ul>
|
|
|
+ <li v-for="(tag, index) in data.tagsData"><span v-text="tag"></span><i class="glyphicon glyphicon-remove" @click="removeTag(index)"></i></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-5 tags-box">
|
|
|
+ <input type="text" @input="tagCheck()" class="form-control" v-model="tag" name="name" required="">
|
|
|
+ <span class="add-tag-btn" @click="addTags()">+添加标签</span>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-5">
|
|
|
+ <div class="x-text-tip">
|
|
|
+ <i class="glyphicon glyphicon-info-sign x-icon-left"></i>标签长度不超过10个字
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-12 tags-lists"><em class="pull-left">例如:</em><span>企业管理咨询</span><span>电子产品开发</span><span>货运代理</span></div>
|
|
|
+ </div>
|
|
|
<div class="row next-btn"><button class="btn" :style="loginData.isSelf && !isValid ? 'opacity: .65;':''" @click="sectionChange(2)">下一步</button></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -133,11 +223,18 @@
|
|
|
return {
|
|
|
data: {
|
|
|
name: '',
|
|
|
- simpleName: '',
|
|
|
+ lawPerson: '',
|
|
|
url: '',
|
|
|
licenceId: '',
|
|
|
address: '',
|
|
|
- website: ''
|
|
|
+ linkman: '',
|
|
|
+ phone: '',
|
|
|
+ email: '',
|
|
|
+ fax: '',
|
|
|
+ website: '',
|
|
|
+ profession: '',
|
|
|
+ logoUrl: '',
|
|
|
+ tagsData: []
|
|
|
},
|
|
|
validName: {
|
|
|
isValidTypeName: true,
|
|
|
@@ -152,18 +249,36 @@
|
|
|
isValidLicence: true,
|
|
|
init: true
|
|
|
},
|
|
|
- validSimpleName: {
|
|
|
- isValidSimpleName: true,
|
|
|
- init: true
|
|
|
- },
|
|
|
validAddress: {
|
|
|
isValidAddress: true,
|
|
|
init: true
|
|
|
},
|
|
|
+ validLawPerson: {
|
|
|
+ isValidLawPerson: true,
|
|
|
+ init: true
|
|
|
+ },
|
|
|
+ validPhone: {
|
|
|
+ isValidPhone: true,
|
|
|
+ init: true
|
|
|
+ },
|
|
|
+ validEmail: {
|
|
|
+ isValidEmail: true,
|
|
|
+ init: true
|
|
|
+ },
|
|
|
+ validFax: {
|
|
|
+ isValidFax: true,
|
|
|
+ init: true
|
|
|
+ },
|
|
|
+ validLogo: {
|
|
|
+ isValidLogo: true,
|
|
|
+ init: true
|
|
|
+ },
|
|
|
isValid: false,
|
|
|
isPdf: false,
|
|
|
showAddressBox: false,
|
|
|
isInAddressBox: false,
|
|
|
+ showProfessionBox: false,
|
|
|
+ isInProfessionBox: false,
|
|
|
temCityData: {},
|
|
|
cityData: {
|
|
|
province: [],
|
|
|
@@ -175,7 +290,19 @@
|
|
|
currentCity: '',
|
|
|
currentDistrict: '',
|
|
|
detail: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ tempProfession: {},
|
|
|
+ professionData: {
|
|
|
+ profession: [],
|
|
|
+ detail: [],
|
|
|
+ thirdDetail: []
|
|
|
+ },
|
|
|
+ currentProfession: {
|
|
|
+ profession: '',
|
|
|
+ detail: '',
|
|
|
+ thirdDetail: ''
|
|
|
+ },
|
|
|
+ tag: ''
|
|
|
}
|
|
|
},
|
|
|
props: ['loginData', 'enterpriseData', 'businessImgUrl'],
|
|
|
@@ -183,18 +310,20 @@
|
|
|
enterpriseData: function (val, oldVal) {
|
|
|
if (val !== {}) {
|
|
|
this.data.name = val.enName || ''
|
|
|
- this.data.simpleName = val.enShortname || ''
|
|
|
this.data.licenceId = val.enBussinessCode || ''
|
|
|
this.data.address = val.enAddress || ''
|
|
|
this.data.website = val.enUrl || ''
|
|
|
this.data.url = val.enBussinessCodeImage || ''
|
|
|
if (this.loginData.isSelf) {
|
|
|
this.nameCheck(3)
|
|
|
- this.simpleNameCheck()
|
|
|
+ this.nameTypeCheck()
|
|
|
this.licenceCheck(3)
|
|
|
this.addressCheck()
|
|
|
- this.websiteCheck()
|
|
|
this.imgUrlCheck()
|
|
|
+ this.lawPersonCheck()
|
|
|
+ this.phoneCheck()
|
|
|
+ this.emailCheck()
|
|
|
+ this.faxCheck()
|
|
|
this.checkFullData()
|
|
|
this.submitRegisterData()
|
|
|
}
|
|
|
@@ -213,6 +342,12 @@
|
|
|
this.cityData.province.push(province)
|
|
|
}
|
|
|
})
|
|
|
+ this.$http.get('/data/profession.json').then(response => {
|
|
|
+ this.tempProfession = response.data
|
|
|
+ for (let profession in response.data) {
|
|
|
+ this.professionData.profession.push(profession)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
sectionChange: function (type) {
|
|
|
@@ -220,13 +355,8 @@
|
|
|
this.$message.error('请填写正确的注册信息')
|
|
|
} else {
|
|
|
this.checkFullData()
|
|
|
- let enterprise = {
|
|
|
- enName: this.data.name,
|
|
|
- enShortName: this.data.simpleName,
|
|
|
- enBussinessCode: this.data.licenceId,
|
|
|
- enAddress: this.data.address,
|
|
|
- enUrl: this.data.website
|
|
|
- }
|
|
|
+ let enterprise = this.data
|
|
|
+ enterprise.tagsData = enterprise.tagsData.toString()
|
|
|
let data = {}
|
|
|
data.enterprise = enterprise
|
|
|
data.isValidRegister = this.isValid
|
|
|
@@ -284,52 +414,70 @@
|
|
|
}
|
|
|
this.validCheck()
|
|
|
},
|
|
|
+ uploadLogo: function (e) {
|
|
|
+ this.validLogo.init = false
|
|
|
+ let file = e.target.files[0]
|
|
|
+ if (file.size > 100 * 1024) {
|
|
|
+ this.validLogo.isValidLogo = false
|
|
|
+// this.$message.error('图片请勿超过100Kb')
|
|
|
+ } else {
|
|
|
+ let param = new FormData()
|
|
|
+ param.append('file', file, file.name)
|
|
|
+ let config = {
|
|
|
+ headers: {'Content-Type': file.type}
|
|
|
+ }
|
|
|
+ this.$http.post('/file', param, config)
|
|
|
+ .then(response => {
|
|
|
+ this.validLogo.isValidLogo = true
|
|
|
+ this.data.logoUrl = response.data[0].path
|
|
|
+ }, err => {
|
|
|
+ console.log(err)
|
|
|
+ this.$message.error('图片上传失败')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
validCheck: function () {
|
|
|
this.isValid =
|
|
|
this.validUpload.isValidUpload && !this.validUpload.init &&
|
|
|
this.validName.isValidTypeName && !this.validName.init && this.validName.isValidName &&
|
|
|
this.validLicence.isValidLicence && !this.validLicence.init &&
|
|
|
- this.validSimpleName.isValidSimpleName && !this.validSimpleName.init &&
|
|
|
- this.validAddress.isValidAddress && !this.validAddress.init
|
|
|
+ this.validAddress.isValidAddress && !this.validAddress.init &&
|
|
|
+ this.validLawPerson.isValidLawPerson && !this.validLawPerson.init &&
|
|
|
+ (this.validPhone.init || this.validPhone.isValidPhone) &&
|
|
|
+ (this.validEmail.init || this.validEmail.isValidEmail) &&
|
|
|
+ (this.validFax.init || this.validFax.isValidFax)
|
|
|
},
|
|
|
checkFullData: function () {
|
|
|
this.isValid =
|
|
|
this.validUpload.isValidUpload &&
|
|
|
this.validName.isValidTypeName && this.validName.isValidName &&
|
|
|
this.validLicence.isValidLicence &&
|
|
|
- this.validSimpleName.isValidSimpleName &&
|
|
|
- this.validAddress.isValidAddress
|
|
|
+ this.validAddress.isValidAddress &&
|
|
|
+ this.validLawPerson.isValidLawPerson
|
|
|
+ },
|
|
|
+ nameTypeCheck: function () {
|
|
|
+ this.validName.isValidTypeName = this.data.name !== '' && this.data.name.length >= 2 && this.data.name.length <= 99 && this.commonValid(this.data.name)
|
|
|
+ this.validName.init = false
|
|
|
},
|
|
|
nameCheck: function (num) {
|
|
|
- // let tmpInit = this.validName.init
|
|
|
- // this.validName.init = true
|
|
|
if (num > 0) {
|
|
|
this.$http.post('/basic/enterprise/register/valid/name?name=' + this.data.name)
|
|
|
.then(response => {
|
|
|
if (response.data.code !== 12) {
|
|
|
this.validName.init = false
|
|
|
this.validName.isValidName = response.data.success
|
|
|
- this.validName.isValidTypeName = this.data.name !== '' && this.data.name.length >= 2 && this.data.name.length <= 99 && this.commonValid(this.data.name)
|
|
|
this.validCheck()
|
|
|
} else {
|
|
|
- // this.validName.init = tmpInit
|
|
|
this.nameCheck(num - 1)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- simpleNameCheck: function () {
|
|
|
- this.validSimpleName.init = false
|
|
|
- this.validSimpleName.isValidSimpleName = this.data.simpleName !== '' && this.data.simpleName.length >= 2 && this.data.simpleName.length <= 40 && this.commonValid(this.data.simpleName)
|
|
|
- this.validCheck()
|
|
|
- },
|
|
|
imgUrlCheck: function () {
|
|
|
this.validUpload.init = false
|
|
|
this.validUpload.isValidUpload = this.data.url !== ''
|
|
|
},
|
|
|
licenceCheck: function (num) {
|
|
|
- // let tmpInit = this.validLicence.init
|
|
|
- // this.validLicence.init = true
|
|
|
if (num > 0) {
|
|
|
this.$http.post('/basic/enterprise/register/valid/businessCode?businessCode=' + this.data.licenceId)
|
|
|
.then(response => {
|
|
|
@@ -349,8 +497,25 @@
|
|
|
this.validAddress.isValidAddress = this.data.address !== ''
|
|
|
this.validCheck()
|
|
|
},
|
|
|
- websiteCheck: function () {
|
|
|
- // (/^([\w-]+\.)+[\w-]+(/[\w-./?%&=])?$/).test(this.messageBoard.userTel)
|
|
|
+ lawPersonCheck: function () {
|
|
|
+ this.validLawPerson.init = false
|
|
|
+ this.validLawPerson.isValidLawPerson = this.data.lawPerson !== ''
|
|
|
+ this.validCheck()
|
|
|
+ },
|
|
|
+ phoneCheck: function () {
|
|
|
+ this.validPhone.init = false
|
|
|
+ this.validPhone.isValidPhone = (/^[\d-]{8,}$/).test(this.data.phone) || this.data.phone === ''
|
|
|
+ this.validCheck()
|
|
|
+ },
|
|
|
+ emailCheck: function () {
|
|
|
+ this.validEmail.init = false
|
|
|
+ this.validEmail.isValidEmail = (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/).test(this.data.email) || this.data.email === ''
|
|
|
+ this.validCheck()
|
|
|
+ },
|
|
|
+ faxCheck: function () {
|
|
|
+ this.validFax.init = false
|
|
|
+ this.validFax.isValidFax = (/^(([\0]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/).test(this.data.fax) || this.data.fax === ''
|
|
|
+ this.validCheck()
|
|
|
},
|
|
|
commonValid: function (str) {
|
|
|
return str.indexOf(' ') === -1
|
|
|
@@ -358,7 +523,6 @@
|
|
|
submitRegisterData: function () {
|
|
|
let enterprise = {
|
|
|
enName: this.data.name,
|
|
|
- enShortName: this.data.simpleName,
|
|
|
enBussinessCode: this.data.licenceId,
|
|
|
enAddress: this.data.address,
|
|
|
enUrl: this.data.website
|
|
|
@@ -369,6 +533,10 @@
|
|
|
data.url = this.data.url
|
|
|
this.$emit('registerAction', data)
|
|
|
},
|
|
|
+ onHideBox: function () {
|
|
|
+ this.onHideAddress()
|
|
|
+ this.onHideProfession()
|
|
|
+ },
|
|
|
onShowAddress: function () {
|
|
|
this.showAddressBox = true
|
|
|
this.isClickInputAddress = true
|
|
|
@@ -379,6 +547,16 @@
|
|
|
}
|
|
|
this.isClickInputAddress = false
|
|
|
},
|
|
|
+ onShowProfession: function () {
|
|
|
+ this.showProfessionBox = true
|
|
|
+ this.isClickInputProfession = true
|
|
|
+ },
|
|
|
+ onHideProfession: function () {
|
|
|
+ if (!this.isInProfessionBox && !this.isClickInputProfession) {
|
|
|
+ this.showProfessionBox = false
|
|
|
+ }
|
|
|
+ this.isClickInputProfession = false
|
|
|
+ },
|
|
|
getCity: function (province) {
|
|
|
this.cityData.city = []
|
|
|
this.address.currentCity = ''
|
|
|
@@ -409,6 +587,60 @@
|
|
|
} else {
|
|
|
this.$message.error('请输入省、市、区')
|
|
|
}
|
|
|
+ },
|
|
|
+ getProfessionDetail: function (profession) {
|
|
|
+ this.currentProfession.profession = profession
|
|
|
+ this.currentProfession.detail = ''
|
|
|
+ this.professionData.detail = []
|
|
|
+ this.currentProfession.thirdDetail = ''
|
|
|
+ this.professionData.thirdDetail = []
|
|
|
+ let _this = this
|
|
|
+ _this.professionData.detail = []
|
|
|
+ for (let item in this.tempProfession[profession]) {
|
|
|
+ if (typeof this.tempProfession[profession][item] !== 'object') {
|
|
|
+ _this.professionData.detail.push(this.tempProfession[profession][item])
|
|
|
+ } else {
|
|
|
+ _this.professionData.detail.push(item)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ chooseProfessionDetail: function (detail) {
|
|
|
+ this.currentProfession.detail = detail
|
|
|
+ this.currentProfession.thirdDetail = ''
|
|
|
+ this.professionData.thirdDetail = []
|
|
|
+ if (typeof this.tempProfession[this.currentProfession.profession][detail] !== 'object') {
|
|
|
+ this.data.profession = detail
|
|
|
+ this.showProfessionBox = false
|
|
|
+ } else {
|
|
|
+ this.professionData.thirdDetail = this.tempProfession[this.currentProfession.profession][detail]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ chooseProfessionThirdDetail: function (thirdDetail) {
|
|
|
+ this.currentProfession.thirdDetail = thirdDetail
|
|
|
+ this.data.profession = thirdDetail
|
|
|
+ this.showProfessionBox = false
|
|
|
+ },
|
|
|
+ tagCheck: function () {
|
|
|
+ if (this.tag.length > 10) {
|
|
|
+ this.tag = this.tag.substring(0, 10)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addTags: function () {
|
|
|
+ let flag = true
|
|
|
+ let _this = this
|
|
|
+ this.data.tagsData.forEach(function (item) {
|
|
|
+ if (item === _this.tag) {
|
|
|
+ flag = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (flag) {
|
|
|
+ this.data.tagsData.push(this.tag)
|
|
|
+ } else {
|
|
|
+ this.tag = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ removeTag: function (index) {
|
|
|
+ this.data.tagsData.splice(index, 1)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -493,4 +725,109 @@
|
|
|
.x-text-help {
|
|
|
color: green;
|
|
|
}
|
|
|
+ .register .row .upload-area {
|
|
|
+ width: 130px;
|
|
|
+ height: 130px;
|
|
|
+ left: 15px;
|
|
|
+ padding: 0;
|
|
|
+ z-index: 100;
|
|
|
+ }
|
|
|
+ .error-box-border {
|
|
|
+ border-color: #f4645f!important;
|
|
|
+ }
|
|
|
+ .x-btn-blank:hover, .x-btn-blank[disabled] {
|
|
|
+ border: 1px solid #adadad;
|
|
|
+ background: #e6e6e6;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ .register .row .auto-width {
|
|
|
+ width: auto!important;
|
|
|
+ }
|
|
|
+ .select-dot input {
|
|
|
+ background: url("../../../static/images/all/dot.png") no-repeat;
|
|
|
+ background-position-x: 353px;
|
|
|
+ background-position-y: 10px;
|
|
|
+ }
|
|
|
+ .register .row .logo-text {
|
|
|
+ font-size: 12px;
|
|
|
+ width: 180px;
|
|
|
+ position: relative;
|
|
|
+ top: 5px;
|
|
|
+ left: 175px;
|
|
|
+ text-align: center;
|
|
|
+ color: #999;
|
|
|
+ line-height: 20px;
|
|
|
+ }
|
|
|
+ .preview-logo-img {
|
|
|
+ width: 130px;
|
|
|
+ height: 130px;
|
|
|
+ }
|
|
|
+ .no-tags {
|
|
|
+ float: left;
|
|
|
+ padding: 2px 14px;
|
|
|
+ line-height: 20px;
|
|
|
+ border: #5078cb 1px solid;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: 12px;
|
|
|
+ margin: 0 3px;
|
|
|
+ background: #5078cb;
|
|
|
+ color: #fff;
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+ .register .row .add-tag-btn {
|
|
|
+ position: absolute;
|
|
|
+ right: 24px;
|
|
|
+ color: #5078cb;
|
|
|
+ font-size: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .register .row .tags-box {
|
|
|
+ margin-top: 15px;
|
|
|
+ }
|
|
|
+ .register .row .tags-list ul{
|
|
|
+ list-style: none;
|
|
|
+ }
|
|
|
+ .register .row .tags-list ul li {
|
|
|
+ display: inline-block;
|
|
|
+ padding: 2px 14px;
|
|
|
+ line-height: 20px;
|
|
|
+ border: #5078cb 1px solid;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #5078cb;
|
|
|
+ margin: 0 3px;
|
|
|
+ }
|
|
|
+ .register .row .tags-list ul li i{
|
|
|
+ font-size: 12px;
|
|
|
+ color: red;
|
|
|
+ position: relative;
|
|
|
+ top: -3px;
|
|
|
+ right: -12px;
|
|
|
+ }
|
|
|
+ .register .row .tags-lists {
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .register .row .tags-lists em {
|
|
|
+ font-style: inherit;
|
|
|
+ margin-left: 163px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+ .register .row .tags-lists span {
|
|
|
+ float: left;
|
|
|
+ padding: 2px 14px;
|
|
|
+ line-height: 20px;
|
|
|
+ border: #5078cb 1px solid;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #5078cb;
|
|
|
+ margin: 0 3px;
|
|
|
+ }
|
|
|
+ .register .row .x-text-tip {
|
|
|
+ color: #777;
|
|
|
+ margin-top: 15px;
|
|
|
+ }
|
|
|
+ .register .row .x-text-tip i {
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
</style>
|