|
|
@@ -27,14 +27,14 @@
|
|
|
<div class="row">
|
|
|
<label class="col-sm-2 x-required">营业执照号:</label>
|
|
|
<div class="col-sm-5">
|
|
|
- <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="请填写营业执照上的注册号">
|
|
|
+ <input type="text" :class="!validLicence.isValidLicence?'form-control error-box-border':'form-control x-input'" :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="validLicence.isValidLicence && !validLicence.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>
|
|
|
- <div class="row">
|
|
|
+ <!--<div class="row">
|
|
|
<label class="col-sm-2 x-required">营业执照:</label>
|
|
|
<div class="col-sm-5">
|
|
|
<a class="x-btn-blank" v-if="loginData.isSelf" title="请上传营业执照扫描件(≤5M的图片或PDF)">
|
|
|
@@ -58,11 +58,11 @@
|
|
|
<i class="glyphicon glyphicon-ok x-icon-left"></i>
|
|
|
</div>
|
|
|
<div class="col-sm-5" v-show="!validLawPerson.isValidLawPerson && !validLawPerson.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的法定代表人</p></div>
|
|
|
- </div>
|
|
|
+ </div>-->
|
|
|
<div class="row">
|
|
|
<label class="col-sm-2 x-required">企业地址:</label>
|
|
|
<div class="col-sm-5">
|
|
|
- <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowAddress" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="padding-left:20px;background-color: transparent;">
|
|
|
+ <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowAddress" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="padding-left:20px;background-color: transparent;">
|
|
|
<span class="fa fa-map-marker"></span>
|
|
|
<div v-show="showAddressBox"
|
|
|
@mouseenter="isInAddressBox = true"
|
|
|
@@ -111,7 +111,7 @@
|
|
|
</div>
|
|
|
<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">
|
|
|
+ <!--<div class="row">
|
|
|
<label class="col-sm-2">联系人:</label>
|
|
|
<div class="col-sm-5">
|
|
|
<input type="text" :disabled="!loginData.isSelf" class="form-control" title="请填写企业对外的联系人,为空则默认为管理员" v-model="data.linkman" name="name" required="" placeholder="请填写企业对外的联系人,为空则默认为管理员">
|
|
|
@@ -178,7 +178,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-sm-5"></div>
|
|
|
- </div>
|
|
|
+ </div>-->
|
|
|
<!--<div class="row" >
|
|
|
<label class="col-sm-2">企业LOGO:</label>
|
|
|
<div class="col-sm-5">
|
|
|
@@ -194,7 +194,7 @@
|
|
|
</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">
|
|
|
+ <!-- <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>
|
|
|
@@ -214,7 +214,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-sm-12 tags-lists" v-if="loginData.isSelf"><em class="pull-left">例如:</em><span>企业管理咨询</span><span>电子产品开发</span><span>货运代理</span></div>
|
|
|
- </div>
|
|
|
+ </div>-->
|
|
|
<div class="row next-btn"><button class="btn" :style="loginData.isSelf && !isValid ? 'opacity: .65;':''" @click="sectionChange(2)">下一步</button></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -225,28 +225,28 @@
|
|
|
return {
|
|
|
data: {
|
|
|
name: '',
|
|
|
- lawPerson: '',
|
|
|
- url: '',
|
|
|
+// lawPerson: '',
|
|
|
+// url: '',
|
|
|
licenceId: '',
|
|
|
- address: '',
|
|
|
- linkman: '',
|
|
|
- phone: '',
|
|
|
- email: '',
|
|
|
- fax: '',
|
|
|
- website: '',
|
|
|
- profession: '',
|
|
|
- logoUrl: '',
|
|
|
- tagsData: []
|
|
|
+ address: ''
|
|
|
+// linkman: '',
|
|
|
+// phone: '',
|
|
|
+// email: '',
|
|
|
+// fax: '',
|
|
|
+// website: '',
|
|
|
+// profession: '',
|
|
|
+// logoUrl: '',
|
|
|
+// tagsData: []
|
|
|
},
|
|
|
validName: {
|
|
|
isValidTypeName: true,
|
|
|
isValidName: true,
|
|
|
init: true
|
|
|
},
|
|
|
- validUpload: {
|
|
|
- isValidUpload: true,
|
|
|
- init: true
|
|
|
- },
|
|
|
+// validUpload: {
|
|
|
+// isValidUpload: true,
|
|
|
+// init: true
|
|
|
+// },
|
|
|
validLicence: {
|
|
|
isValidLicence: true,
|
|
|
init: true
|
|
|
@@ -255,32 +255,32 @@
|
|
|
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
|
|
|
- },
|
|
|
+// 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,
|
|
|
+// isPdf: false,
|
|
|
showAddressBox: false,
|
|
|
isInAddressBox: false,
|
|
|
- showProfessionBox: false,
|
|
|
- isInProfessionBox: false,
|
|
|
+// showProfessionBox: false,
|
|
|
+// isInProfessionBox: false,
|
|
|
temCityData: {},
|
|
|
cityData: {
|
|
|
province: [],
|
|
|
@@ -292,48 +292,58 @@
|
|
|
currentCity: '',
|
|
|
currentDistrict: '',
|
|
|
detail: ''
|
|
|
- },
|
|
|
- tempProfession: {},
|
|
|
- professionData: {
|
|
|
- profession: [],
|
|
|
- detail: [],
|
|
|
- thirdDetail: []
|
|
|
- },
|
|
|
- currentProfession: {
|
|
|
- profession: '',
|
|
|
- detail: '',
|
|
|
- thirdDetail: ''
|
|
|
- },
|
|
|
- tag: ''
|
|
|
+ }
|
|
|
+// tempProfession: {},
|
|
|
+// professionData: {
|
|
|
+// profession: [],
|
|
|
+// detail: [],
|
|
|
+// thirdDetail: []
|
|
|
+// },
|
|
|
+// currentProfession: {
|
|
|
+// profession: '',
|
|
|
+// detail: '',
|
|
|
+// thirdDetail: ''
|
|
|
+// },
|
|
|
+// tag: ''
|
|
|
}
|
|
|
},
|
|
|
props: ['loginData', 'enterpriseData', 'businessImgUrl'],
|
|
|
watch: {
|
|
|
enterpriseData: function (val, oldVal) {
|
|
|
- if (val !== {}) {
|
|
|
- if (this.loginData.isSelf) {
|
|
|
- this.initSelfData(val)
|
|
|
- this.nameCheck(3)
|
|
|
- this.nameTypeCheck()
|
|
|
- this.licenceCheck(3)
|
|
|
- this.addressCheck()
|
|
|
- this.imgUrlCheck()
|
|
|
- this.lawPersonCheck()
|
|
|
+ if (val.name) { // 个人
|
|
|
+ this.initData(val)
|
|
|
+ this.nameCheck(3)
|
|
|
+ this.nameTypeCheck()
|
|
|
+ this.licenceCheck(3)
|
|
|
+ this.addressCheck()
|
|
|
+// this.imgUrlCheck()
|
|
|
+// this.lawPersonCheck()
|
|
|
// this.phoneCheck()
|
|
|
// this.emailCheck()
|
|
|
// this.faxCheck()
|
|
|
- this.checkFullData()
|
|
|
- this.submitRegisterData()
|
|
|
- } else {
|
|
|
- this.initEnterpriseData(val)
|
|
|
- }
|
|
|
+ this.checkFullData()
|
|
|
+ this.submitRegisterData()
|
|
|
+ }
|
|
|
+ if (val.uu) { // 企业
|
|
|
+ this.initData(val)
|
|
|
+// this.nameCheck(3)
|
|
|
+// this.nameTypeCheck()
|
|
|
+// this.licenceCheck(3)
|
|
|
+ this.enAddressCheck()
|
|
|
+// this.imgUrlCheck()
|
|
|
+// this.lawPersonCheck()
|
|
|
+// this.phoneCheck()
|
|
|
+// this.emailCheck()
|
|
|
+// this.faxCheck()
|
|
|
+// this.checkFullData()
|
|
|
+ this.submitRegisterData()
|
|
|
}
|
|
|
- },
|
|
|
- businessImgUrl: function (val, oldVal) {
|
|
|
- this.data.url = val
|
|
|
- this.checkFullData()
|
|
|
- this.submitRegisterData()
|
|
|
}
|
|
|
+// businessImgUrl: function (val, oldVal) {
|
|
|
+// this.data.url = val
|
|
|
+// this.checkFullData()
|
|
|
+// this.submitRegisterData()
|
|
|
+// }
|
|
|
},
|
|
|
mounted () {
|
|
|
this.$http.get('/data/city.json').then(response => {
|
|
|
@@ -342,166 +352,147 @@
|
|
|
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)
|
|
|
- }
|
|
|
- })
|
|
|
+// this.$http.get('/data/profession.json').then(response => {
|
|
|
+// this.tempProfession = response.data
|
|
|
+// for (let profession in response.data) {
|
|
|
+// this.professionData.profession.push(profession)
|
|
|
+// }
|
|
|
+// })
|
|
|
},
|
|
|
methods: {
|
|
|
- initEnterpriseData: function (val) {
|
|
|
- this.data.name = val.name || ''
|
|
|
- this.data.licenceId = val.businessCode || ''
|
|
|
- this.data.url = val.businessCodeImage || ''
|
|
|
- this.data.lawPerson = val.corporation || ''
|
|
|
- this.data.address = val.address || ''
|
|
|
- this.data.website = val.url || ''
|
|
|
- this.data.linkman = val.contactMan || ''
|
|
|
- this.data.phone = val.contactTel || ''
|
|
|
- this.data.email = val.contactEmail || ''
|
|
|
- this.data.fax = val.fax || ''
|
|
|
- this.data.logoUrl = val.logoImage || ''
|
|
|
- this.data.profession = val.profession || ''
|
|
|
-// this.data.tagsData = val.tags || []
|
|
|
- if (typeof val.tags === 'string') {
|
|
|
-// let tmp = val.tags || ''
|
|
|
- this.data.tagsData = val.tags.split(',')
|
|
|
- } else {
|
|
|
- this.data.tagsData = []
|
|
|
- }
|
|
|
- },
|
|
|
- initSelfData: function (val) {
|
|
|
- this.data.name = val.name || ''
|
|
|
- this.data.licenceId = val.licenceId || ''
|
|
|
- this.data.url = val.url || ''
|
|
|
- this.data.lawPerson = val.lawPerson || ''
|
|
|
- this.data.address = val.address || ''
|
|
|
- this.data.website = val.website || ''
|
|
|
- this.data.linkman = val.linkman || ''
|
|
|
- this.data.phone = val.phone || ''
|
|
|
- this.data.email = val.email || ''
|
|
|
- this.data.fax = val.fax || ''
|
|
|
- this.data.logoUrl = val.logoUrl || ''
|
|
|
- this.data.profession = val.profession || ''
|
|
|
- if (typeof val.tagsData === 'string' || !val.tagsData) {
|
|
|
- this.data.tagsData = val.tagsData.split(',') || []
|
|
|
- } else {
|
|
|
- this.data.tagsData = val.tagsData || []
|
|
|
- }
|
|
|
+ initData: function (val) {
|
|
|
+ this.data.name = val.spaceName || val.enName || val.name || ''
|
|
|
+ this.data.licenceId = val.businessCode || val.licenceId || val.enBussinessCode || ''
|
|
|
+ this.data.address = val.address || val.enAddress || ''
|
|
|
},
|
|
|
sectionChange: function (type) {
|
|
|
- if (this.loginData.isSelf && !this.isValid) {
|
|
|
+ if (!this.isValid) {
|
|
|
this.$message.error('请填写正确的注册信息')
|
|
|
} else {
|
|
|
- this.checkFullData()
|
|
|
+ if (this.enterpriseData.uu) {
|
|
|
+ this.enCheckFullData()
|
|
|
+ } else {
|
|
|
+ this.checkFullData()
|
|
|
+ }
|
|
|
let enterprise = this.data
|
|
|
// enterprise.tagsData = enterprise.tagsData.toString()
|
|
|
- if (typeof this.data.tagsData === 'string') {
|
|
|
- this.data.tagsData = this.data.tagsData.split(',')
|
|
|
- }
|
|
|
+// if (typeof this.data.tagsData === 'string') {
|
|
|
+// this.data.tagsData = this.data.tagsData.split(',')
|
|
|
+// }
|
|
|
let data = {}
|
|
|
data.enterprise = enterprise
|
|
|
data.isValidRegister = this.isValid
|
|
|
- data.url = this.data.url
|
|
|
+// data.url = this.data.url
|
|
|
enterprise.enIsRead = false
|
|
|
// enterprise.enBussinessCodeImage = this.data.url
|
|
|
+ // 个人用户,提交保存缓存企业信息
|
|
|
if (this.loginData.isSelf) {
|
|
|
this.$http.post('/basic/user/userCacheEnterprise', enterprise)
|
|
|
this.$emit('isSelfCacheDataAction', enterprise)
|
|
|
+ } else { // 企业用户,更新当前企业信息,主要是更新企业地址
|
|
|
+ this.enterpriseData.enAddress = this.data.address
|
|
|
+ this.$http.post('/basic/enterprise/' + this.enterpriseData.uu + '/info', this.enterpriseData)
|
|
|
}
|
|
|
this.$emit('registerAction', data)
|
|
|
this.$emit('sectionEvent', type)
|
|
|
- this.$emit('businessImgUrlAction', this.data.url)
|
|
|
- }
|
|
|
- },
|
|
|
- upload: function (e) {
|
|
|
- let file = e.target.files[0]
|
|
|
- this.validUpload.init = false
|
|
|
- if (file.size > 5 * 1024 * 1024) {
|
|
|
- this.validUpload.isValidUpload = false
|
|
|
- } else {
|
|
|
- this.validUpload.isValidUpload = true
|
|
|
- if (file.type !== 'application/pdf') {
|
|
|
- this.isPdf = false
|
|
|
- let param = new FormData()
|
|
|
- param.append('file', file, file.name)
|
|
|
- param.append('chunk', '0')
|
|
|
- let config = {
|
|
|
- headers: {'Content-Type': 'multipart/form-data'}
|
|
|
- }
|
|
|
- this.$http.post('/api/images', param, config)
|
|
|
- .then(response => {
|
|
|
- this.data.url = response.data[0].path
|
|
|
- this.$emit('businessImgUrlAction', this.data.url)
|
|
|
- }, err => {
|
|
|
- console.log(err)
|
|
|
- this.validUpload.isValidUpload = false
|
|
|
- })
|
|
|
- } 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.isPdf = true
|
|
|
- this.data.url = response.data[0].path
|
|
|
- this.$emit('businessImgUrlAction', this.data.url)
|
|
|
- }, err => {
|
|
|
- console.log(err)
|
|
|
- this.validUpload.isValidUpload = false
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- 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('/api/images', param, config)
|
|
|
- .then(response => {
|
|
|
- this.validLogo.isValidLogo = true
|
|
|
- this.data.logoUrl = response.data[0].path
|
|
|
- }, err => {
|
|
|
- console.log(err)
|
|
|
- this.$message.error('图片上传失败')
|
|
|
- })
|
|
|
+// this.$emit('businessImgUrlAction', this.data.url)
|
|
|
}
|
|
|
},
|
|
|
+// upload: function (e) {
|
|
|
+// let file = e.target.files[0]
|
|
|
+// this.validUpload.init = false
|
|
|
+// if (file.size > 5 * 1024 * 1024) {
|
|
|
+// this.validUpload.isValidUpload = false
|
|
|
+// } else {
|
|
|
+// this.validUpload.isValidUpload = true
|
|
|
+// if (file.type !== 'application/pdf') {
|
|
|
+// this.isPdf = false
|
|
|
+// let param = new FormData()
|
|
|
+// param.append('file', file, file.name)
|
|
|
+// param.append('chunk', '0')
|
|
|
+// let config = {
|
|
|
+// headers: {'Content-Type': 'multipart/form-data'}
|
|
|
+// }
|
|
|
+// this.$http.post('/api/images', param, config)
|
|
|
+// .then(response => {
|
|
|
+// this.data.url = response.data[0].path
|
|
|
+// this.$emit('businessImgUrlAction', this.data.url)
|
|
|
+// }, err => {
|
|
|
+// console.log(err)
|
|
|
+// this.validUpload.isValidUpload = false
|
|
|
+// })
|
|
|
+// } 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.isPdf = true
|
|
|
+// this.data.url = response.data[0].path
|
|
|
+// this.$emit('businessImgUrlAction', this.data.url)
|
|
|
+// }, err => {
|
|
|
+// console.log(err)
|
|
|
+// this.validUpload.isValidUpload = false
|
|
|
+// })
|
|
|
+// }
|
|
|
+// }
|
|
|
+// 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('/api/images', 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.validUpload.isValidUpload && !this.validUpload.init &&
|
|
|
this.validName.isValidTypeName && !this.validName.init && this.validName.isValidName &&
|
|
|
this.validLicence.isValidLicence && !this.validLicence.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)
|
|
|
+ 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)
|
|
|
+ },
|
|
|
+ enValidCheck: function () {
|
|
|
+ this.isValid = this.validAddress.isValidAddress && !this.validAddress.init
|
|
|
},
|
|
|
checkFullData: function () {
|
|
|
this.isValid =
|
|
|
- this.validUpload.isValidUpload &&
|
|
|
+// this.validUpload.isValidUpload &&
|
|
|
this.validName.isValidTypeName && this.validName.isValidName &&
|
|
|
this.validLicence.isValidLicence &&
|
|
|
- this.validAddress.isValidAddress &&
|
|
|
- this.validLawPerson.isValidLawPerson
|
|
|
+ this.validAddress.isValidAddress
|
|
|
+// this.validLawPerson.isValidLawPerson
|
|
|
+ },
|
|
|
+ enCheckFullData: function () {
|
|
|
+ this.isValid = this.validAddress.isValidAddress
|
|
|
},
|
|
|
+ // 企业名称字符验证
|
|
|
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) {
|
|
|
if (num > 0) {
|
|
|
this.$http.post('/basic/enterprise/register/valid/name?name=' + this.data.name)
|
|
|
@@ -516,10 +507,10 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- imgUrlCheck: function () {
|
|
|
- this.validUpload.init = false
|
|
|
- this.validUpload.isValidUpload = this.data.url !== ''
|
|
|
- },
|
|
|
+// imgUrlCheck: function () {
|
|
|
+// this.validUpload.init = false
|
|
|
+// this.validUpload.isValidUpload = this.data.url !== ''
|
|
|
+// },
|
|
|
licenceCheck: function (num) {
|
|
|
if ((/^[\S-]{1,255}$/).test(this.data.licenceId)) {
|
|
|
if (num > 0) {
|
|
|
@@ -541,31 +532,38 @@
|
|
|
this.validCheck()
|
|
|
}
|
|
|
},
|
|
|
+ // 个人地址校验
|
|
|
addressCheck: function () {
|
|
|
this.validAddress.init = false
|
|
|
this.validAddress.isValidAddress = this.data.address !== ''
|
|
|
this.validCheck()
|
|
|
},
|
|
|
- lawPersonCheck: function () {
|
|
|
- this.validLawPerson.init = false
|
|
|
- this.validLawPerson.isValidLawPerson = (/^\S{1,255}$/).test(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()
|
|
|
- },
|
|
|
+ // 企业地址校验
|
|
|
+ enAddressCheck: function () {
|
|
|
+ this.validAddress.init = false
|
|
|
+ this.validAddress.isValidAddress = this.data.address !== ''
|
|
|
+ this.enValidCheck()
|
|
|
+ },
|
|
|
+// lawPersonCheck: function () {
|
|
|
+// this.validLawPerson.init = false
|
|
|
+// this.validLawPerson.isValidLawPerson = (/^\S{1,255}$/).test(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
|
|
|
},
|
|
|
@@ -574,12 +572,12 @@
|
|
|
let data = {}
|
|
|
data.enterprise = enterprise
|
|
|
data.isValidRegister = this.isValid
|
|
|
- data.url = this.data.url
|
|
|
+// data.url = this.data.url
|
|
|
this.$emit('registerAction', data)
|
|
|
},
|
|
|
onHideBox: function () {
|
|
|
this.onHideAddress()
|
|
|
- this.onHideProfession()
|
|
|
+// this.onHideProfession()
|
|
|
},
|
|
|
onShowAddress: function () {
|
|
|
if (this.showAddressBox) {
|
|
|
@@ -595,20 +593,20 @@
|
|
|
}
|
|
|
this.isClickInputAddress = false
|
|
|
},
|
|
|
- onShowProfession: function () {
|
|
|
- if (this.showProfessionBox) {
|
|
|
- this.onHideProfession()
|
|
|
- } else {
|
|
|
- this.showProfessionBox = true
|
|
|
- this.isClickInputProfession = true
|
|
|
- }
|
|
|
- },
|
|
|
- onHideProfession: function () {
|
|
|
- if (!this.isInProfessionBox && !this.isClickInputProfession) {
|
|
|
- this.showProfessionBox = false
|
|
|
- }
|
|
|
- this.isClickInputProfession = false
|
|
|
- },
|
|
|
+// onShowProfession: function () {
|
|
|
+// if (this.showProfessionBox) {
|
|
|
+// this.onHideProfession()
|
|
|
+// } else {
|
|
|
+// 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 = ''
|
|
|
@@ -632,7 +630,11 @@
|
|
|
if (this.address.detail !== '') {
|
|
|
this.data.address = this.address.currentProvince + this.address.currentCity + this.address.currentDistrict + this.address.detail
|
|
|
this.showAddressBox = false
|
|
|
- this.addressCheck()
|
|
|
+ if (this.enterpriseData.uu) {
|
|
|
+ this.enAddressCheck()
|
|
|
+ } else {
|
|
|
+ this.addressCheck()
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message.error('请输入详细地址')
|
|
|
}
|
|
|
@@ -640,65 +642,65 @@
|
|
|
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
|
|
|
- if (!this.tag || this.tag === '') {
|
|
|
- flag = false
|
|
|
- } else {
|
|
|
- this.data.tagsData.forEach(function (item) {
|
|
|
- if (item === _this.tag) {
|
|
|
- flag = false
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (flag) {
|
|
|
- this.data.tagsData.push(this.tag)
|
|
|
- this.tag = ''
|
|
|
- } else {
|
|
|
- this.tag = ''
|
|
|
- }
|
|
|
- },
|
|
|
- removeTag: function (index) {
|
|
|
- this.data.tagsData.splice(index, 1)
|
|
|
- },
|
|
|
+// 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
|
|
|
+// if (!this.tag || this.tag === '') {
|
|
|
+// flag = false
|
|
|
+// } else {
|
|
|
+// this.data.tagsData.forEach(function (item) {
|
|
|
+// if (item === _this.tag) {
|
|
|
+// flag = false
|
|
|
+// }
|
|
|
+// })
|
|
|
+// }
|
|
|
+// if (flag) {
|
|
|
+// this.data.tagsData.push(this.tag)
|
|
|
+// this.tag = ''
|
|
|
+// } else {
|
|
|
+// this.tag = ''
|
|
|
+// }
|
|
|
+// },
|
|
|
+// removeTag: function (index) {
|
|
|
+// this.data.tagsData.splice(index, 1)
|
|
|
+// },
|
|
|
onDetailAddressInput: function () {
|
|
|
this.address.detail = this.address.detail.trim()
|
|
|
}
|
|
|
@@ -707,6 +709,9 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+ .register{
|
|
|
+ height: 700px;
|
|
|
+ }
|
|
|
.register input[type="file"] {
|
|
|
display: block;
|
|
|
}
|
|
|
@@ -718,6 +723,9 @@
|
|
|
.x-union-menu {
|
|
|
width: 600px
|
|
|
}
|
|
|
+ .x-union-header{
|
|
|
+ margin-top: -40px;
|
|
|
+ }
|
|
|
.x-union-header>div{
|
|
|
background: #f5f8fa;
|
|
|
font-weight: 700;
|
|
|
@@ -848,6 +856,25 @@
|
|
|
.register .row .tags-box {
|
|
|
margin-top: 15px;
|
|
|
}
|
|
|
+ .register .row p {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ .register .row .form-control:focus{
|
|
|
+ border-color: #5078cb;
|
|
|
+ box-shadow: none;
|
|
|
+ }
|
|
|
+ .x-input:focus, .x-input-blank:focus {
|
|
|
+ border-color: #5078cb;
|
|
|
+ box-shadow: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .register .row .fa-map-marker{
|
|
|
+ position: relative;
|
|
|
+ top: -34px;
|
|
|
+ left: -5px;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
.register .row .tags-list ul{
|
|
|
list-style: none;
|
|
|
}
|