Browse Source

Merge remote-tracking branch 'origin/dev' into dev

guq 7 years ago
parent
commit
1603fe67a1
1 changed files with 14 additions and 7 deletions
  1. 14 7
      frontend/saas-portal-web/src/components/conenter/addenterprise.vue

+ 14 - 7
frontend/saas-portal-web/src/components/conenter/addenterprise.vue

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