|
|
@@ -9,7 +9,7 @@
|
|
|
<div class="">
|
|
|
<label class="col-sm-2 mobile-x-required">企业名称:</label>
|
|
|
<div class="col-sm-5 mobile-x-input-kuang">
|
|
|
- <input :class="!validName.isValidTypeName || !validName.isValidName?'form-control error-box-border':'form-control'" type="text" @input="nameTypeCheck()" :disabled="!loginData.isSelf" v-model="data.name" name="name" required="" placeholder="填写营业执照上的企业名称">
|
|
|
+ <input :class="!validName.isValidTypeName || !validName.isValidName?'form-control error-box-border':'form-control'" type="text" @input="nameTypeCheck()" @change="nameCheck(3)" :disabled="!loginData.isSelf" v-model="data.name" name="name" required="" placeholder="填写营业执照上的企业名称">
|
|
|
<div class="mobile-x-text-help" v-show="validName.isValidTypeName && validName.isValidName && !validName.init">
|
|
|
<i class="glyphicon glyphicon-ok x-icon-left"></i>
|
|
|
</div>
|
|
|
@@ -266,46 +266,46 @@
|
|
|
this.data.address = val.address || val.enAddress || ''
|
|
|
},
|
|
|
sectionChange: function (type) {
|
|
|
- this.nameCheck(3, () => {
|
|
|
- if (!this.isValid) {
|
|
|
- // this.nameCheck(3)
|
|
|
- if (!this.validName.isValidName) {
|
|
|
- this.showBangdingPage = true
|
|
|
- } else {
|
|
|
- this.timeoutCount++
|
|
|
- this.collectResult = '请填写正确的注册信息'
|
|
|
- }
|
|
|
- // this.$message.error('请填写正确的注册信息')
|
|
|
+ // this.nameCheck(3, () => {
|
|
|
+ if (!this.isValid) {
|
|
|
+ // this.nameCheck(3)
|
|
|
+ if (!this.validName.isValidName) {
|
|
|
+ this.showBangdingPage = true
|
|
|
} else {
|
|
|
- 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(',')
|
|
|
- // }
|
|
|
- let data = {}
|
|
|
- data.enterprise = enterprise
|
|
|
- data.isValidRegister = this.isValid
|
|
|
- // 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 + '/updateInfo', this.enterpriseData)
|
|
|
- }
|
|
|
- this.$emit('registerAction', data)
|
|
|
- this.$emit('sectionEvent', type)
|
|
|
- // this.$emit('businessImgUrlAction', this.data.url)
|
|
|
+ this.timeoutCount++
|
|
|
+ this.collectResult = '请填写正确的注册信息'
|
|
|
}
|
|
|
- })
|
|
|
+ // this.$message.error('请填写正确的注册信息')
|
|
|
+ } else {
|
|
|
+ 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(',')
|
|
|
+// }
|
|
|
+ let data = {}
|
|
|
+ data.enterprise = enterprise
|
|
|
+ data.isValidRegister = this.isValid
|
|
|
+// 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 + '/updateInfo', 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]
|
|
|
@@ -402,7 +402,7 @@
|
|
|
this.validName.init = false
|
|
|
},
|
|
|
// 企业名称是否已存在验证
|
|
|
- nameCheck: function (num, cb) {
|
|
|
+ nameCheck: function (num) {
|
|
|
if (num > 0) {
|
|
|
this.$http.post('/basic/enterprise/register/valid/name?name=' + this.data.name)
|
|
|
.then(response => {
|
|
|
@@ -410,7 +410,7 @@
|
|
|
this.validName.init = false
|
|
|
this.validName.isValidName = response.data.success
|
|
|
this.validCheck()
|
|
|
- cb && cb()
|
|
|
+ // cb && cb()
|
|
|
} else {
|
|
|
this.nameCheck(num - 1)
|
|
|
}
|