|
@@ -75,7 +75,7 @@
|
|
|
<ul style="padding:0;position: relative;">
|
|
<ul style="padding:0;position: relative;">
|
|
|
<li>
|
|
<li>
|
|
|
<span class="qy-biaoti"><span class="xingxing marght">*</span>查找企业</span>
|
|
<span class="qy-biaoti"><span class="xingxing marght">*</span>查找企业</span>
|
|
|
- <input @input="Testingqyname" @focus="Testingqyname" @blur="showwarning" ref="lookupqyname" class="inpind" :class= "{showborder:isgsname}" type="text" placeholder="输入企业名称或管理员">
|
|
|
|
|
|
|
+ <input @click.stop @input="Testingqyname" @focus="Testingqyname" @blur="showwarning" ref="lookupqyname" class="inpind" :class= "{showborder:isgsname}" type="text" placeholder="输入企业名称或管理员">
|
|
|
<span v-show="iswarning" class="warning" ref="warningqyname"></span>
|
|
<span v-show="iswarning" class="warning" ref="warningqyname"></span>
|
|
|
</li>
|
|
</li>
|
|
|
<!-- 匹配企业后显示的内容 -->
|
|
<!-- 匹配企业后显示的内容 -->
|
|
@@ -228,11 +228,11 @@ import { setTimeout, clearTimeout } from 'timers';
|
|
|
this.isqyname1 = false;
|
|
this.isqyname1 = false;
|
|
|
},
|
|
},
|
|
|
showqyname1(){
|
|
showqyname1(){
|
|
|
- this.isqyname1 = true;
|
|
|
|
|
let qyname = this.$refs.qyname.value.replace(/\s+/g, "");//公司名字过滤空格
|
|
let qyname = this.$refs.qyname.value.replace(/\s+/g, "");//公司名字过滤空格
|
|
|
if(qyname == ''){
|
|
if(qyname == ''){
|
|
|
this.$refs.qyno.innerHTML = ' <img style="width:14px" src="/static/img/warning.png" alt=""> 企业名称不能为空';
|
|
this.$refs.qyno.innerHTML = ' <img style="width:14px" src="/static/img/warning.png" alt=""> 企业名称不能为空';
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
|
|
+ this.isqyname1 = true;
|
|
|
},
|
|
},
|
|
|
//检测企业名称2
|
|
//检测企业名称2
|
|
|
Testingqyname(){
|
|
Testingqyname(){
|
|
@@ -278,7 +278,15 @@ import { setTimeout, clearTimeout } from 'timers';
|
|
|
},
|
|
},
|
|
|
//企业名称2提示语显示
|
|
//企业名称2提示语显示
|
|
|
showwarning(){
|
|
showwarning(){
|
|
|
- this.iswarning = true;
|
|
|
|
|
|
|
+ let qyname = this.$refs.lookupqyname.value.replace(/\s+/g, "");//企业名字
|
|
|
|
|
+ if (!this.companyId && qyname!='') {
|
|
|
|
|
+ this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/warning.png" alt=""> 请选择要加入的企业';
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/ok.png" alt="">'
|
|
|
|
|
+ }
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
|
+ this.iswarning = true;
|
|
|
|
|
+ },100)
|
|
|
},
|
|
},
|
|
|
//验证个人姓名1
|
|
//验证个人姓名1
|
|
|
yzusername(){
|
|
yzusername(){
|
|
@@ -340,7 +348,7 @@ import { setTimeout, clearTimeout } from 'timers';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (this.iscompanyname || this.admin == this.mytoken.account.realname) {
|
|
if (this.iscompanyname || this.admin == this.mytoken.account.realname) {
|
|
|
- this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/warning.png" alt=""> 账号已在企业服务中,不能重复加入';
|
|
|
|
|
|
|
+ this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/warning.png" alt=""> 您的账户已在企业服务中,请勿重复加入';
|
|
|
} else {
|
|
} else {
|
|
|
this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/ok.png" alt="">';
|
|
this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/ok.png" alt="">';
|
|
|
// this.$refs.lookupqyname.style.border = '1px solid #1E88F5';
|
|
// this.$refs.lookupqyname.style.border = '1px solid #1E88F5';
|
|
@@ -362,7 +370,7 @@ import { setTimeout, clearTimeout } from 'timers';
|
|
|
} else if (!this.companyId) {
|
|
} else if (!this.companyId) {
|
|
|
this.$message.error('请选择要加入的企业');
|
|
this.$message.error('请选择要加入的企业');
|
|
|
} else if (this.admin == this.mytoken.account.realname || this.iscompanyname) {
|
|
} else if (this.admin == this.mytoken.account.realname || this.iscompanyname) {
|
|
|
- this.$message.error('账号已在企业服务中,不能重复加入');
|
|
|
|
|
|
|
+ this.$message.error('您的账户已在企业服务中,请勿重复加入');
|
|
|
} else if (!this.isTestingname) {
|
|
} else if (!this.isTestingname) {
|
|
|
this.$message.error('姓名不能为空');
|
|
this.$message.error('姓名不能为空');
|
|
|
} else if (!this.isregname) {
|
|
} else if (!this.isregname) {
|
|
@@ -489,7 +497,6 @@ import { setTimeout, clearTimeout } from 'timers';
|
|
|
this.$router.push({path: '/enterprise'});
|
|
this.$router.push({path: '/enterprise'});
|
|
|
},3000)
|
|
},3000)
|
|
|
})
|
|
})
|
|
|
- this.$message.success('保存成功,待管理员批准');
|
|
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error('企业名称不能包含符号等非法字符');
|
|
this.$message.error('企业名称不能包含符号等非法字符');
|
|
|
}
|
|
}
|