Browse Source

修改加入企业提示语bug

jinsy 7 years ago
parent
commit
ed7d66f2e4
1 changed files with 10 additions and 6 deletions
  1. 10 6
      frontend/saas-portal-web/src/components/conenter/addenterprise.vue

+ 10 - 6
frontend/saas-portal-web/src/components/conenter/addenterprise.vue

@@ -263,7 +263,7 @@ import { setTimeout, clearTimeout } from 'timers';
                                 this.islookup = true;
                                 this.companyId = null;
                                 this.isgsname = true;//公司是否存在
-                            } else if (res.data.success == false && res.data.message == '公司不存在') {
+                            } else if (res.data.success == false && res.data.message == '企业不存在') {
                                 this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/warning.png" alt=""> 企业或管理员不存在';
                                 this.islookup = false;
                                 this.isgsname = false;//公司是否存在 
@@ -279,11 +279,15 @@ import { setTimeout, clearTimeout } from 'timers';
             //企业名称2提示语显示
             showwarning(){
                 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="">'
-                }
+                if (!qyname) {
+                    this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/warning.png" alt=""> 企业或管理员不能为空';
+                } else if (this.isgsname) {
+                    if (this.companyId == null) {
+                        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)