Browse Source

登录调整

qymljy 1 year ago
parent
commit
87b6d632b6

+ 5 - 11
src/HManagement/accountManage/modules/account_detail.vue

@@ -140,7 +140,6 @@ export default {
         this.accountInfo = res.data
         console.log('合作商',this.accountInfo);
       }
-
       this.detailInfo = this.mainData.usertype === 1 || this.mainData.usertype === 0
       ?
         [{
@@ -174,20 +173,15 @@ export default {
         [{
           title:this.$t('基本信息'),
           info: [
-            {label:this.mainData.usertype == '21'?this.$t(`合作伙伴编号`):this.$t('经销商编号'),value:this.accountInfo.agentnum},
+            {label:this.mainData.usertype == '21' || this.mainData.usertype == '22'?this.$t(`合作伙伴编号`):this.$t('经销商编号'),value:this.accountInfo.agentnum},
             {label:this.$t('erp编号'),value:this.accountInfo.erpagentnum},
             {label:this.$t('是否服务经销商'),value:this.accountInfo.isservice?this.$t('是'):this.$t('否')},
             {label:this.$t('状态'),value:this.accountInfo.status},
             {label:this.$t('签约日期'),value:this.accountInfo.signdate},
-            /*{label:this.$t('经销商类型'),value:
-              this.accountInfo.type
-            },*/
-            {label:this.$t('经销商类型'),value:
-              this.accountInfo.type
-            },
-            {label:this.mainData.usertype == '21'?this.$t(`上级企业`):this.$t('上级经销商'),value:this.accountInfo.parent_enterprisename},
-            {label:this.mainData.usertype == '21'?this.$t(`企业等级`):this.$t('经销商等级'),value:this.accountInfo.grade},
-            {label:this.$t('省市县'),value:`${this.accountInfo.province}-${this.accountInfo.city}-${this.accountInfo.county}`},
+            {label:this.mainData.usertype == '21' || this.mainData.usertype == '22'?this.$t('合作伙伴类型'):this.$t('经销商类型'),value: this.accountInfo.type},
+            {label:this.mainData.usertype == '21' || this.mainData.usertype == '22'?this.$t(`上级企业`):this.$t('上级经销商'),value:this.accountInfo.parent_enterprisename},
+            {label:this.mainData.usertype == '21' || this.mainData.usertype == '22'?this.$t(`企业等级`):this.$t('经销商等级'),value:this.accountInfo.grade},
+            {label:this.$t('省市县'),value:this.accountInfo.province?`${this.accountInfo.province}-${this.accountInfo.city}-${this.accountInfo.county}`:'--'},
             {label:this.$t('详细地址'),value:this.accountInfo.address},
             {label:this.$t('企业联系人'),value:this.accountInfo.contact},
             {label:this.$t('联系电话'),value:this.accountInfo.phonenumber},

+ 11 - 2
src/components/detailInfo/index.vue

@@ -12,7 +12,17 @@
           v-for="(item2,j) in item1.info"
           :key="j"
           :label="$t(item2.label)"
-        >{{ item2.value ? $t(item2.value) : '--' }}</el-descriptions-item>
+        >
+          <span v-if="item2.label == '合作伙伴类型' || item2.label == '经销商类型'">
+            <span v-if="item2.value">
+              <el-tag  v-for="k in item2.value" :key="k.index" style="margin-left: 5px;margin-top: 5px">{{k}}</el-tag>
+            </span>
+            <span v-else>--</span>
+          </span>
+          <span v-else>
+            {{ item2.value ? $t(item2.value) : '--' }}
+          </span>
+        </el-descriptions-item>
       </el-descriptions>
     </div>
   </div>
@@ -28,7 +38,6 @@
         </el-descriptions-item>
       </el-descriptions>
     </div>
-
     <div class="container">
       <el-descriptions :title="$t(`系统信息`)" border>
         <el-descriptions-item

+ 4 - 2
src/views/login/login.vue

@@ -176,7 +176,7 @@ export default {
       this.checked = true;
     }
     this.languagelist();
-    this.qusetLanguage();
+    /*this.qusetLanguage();*/
   },
   methods: {
     setRules() {
@@ -340,9 +340,11 @@ export default {
         id: 10026401,
       });
       this.langusge = res.data;
-      this.nowType = sessionStorage.getItem("lang")
+      this.nowType = sessionStorage.getItem("lang") &&  sessionStorage.getItem("lang") !== null
         ? sessionStorage.getItem("lang")
         : "ZH";
+      sessionStorage.setItem('lang',this.nowType)
+      this.qusetLanguage()
     },
     async i18nChangeLanguage(type) {
       console.log(type, "type翻译");