snow 1 год назад
Родитель
Сommit
a5665b1405

+ 13 - 10
src/store/modules/user.js

@@ -9,6 +9,7 @@ import {
   requsetSupertubeCompany,
   requsetSupertubeCompany,
   requsetUserBindingCompany,
   requsetUserBindingCompany,
   reuqsetRoleInfo,
   reuqsetRoleInfo,
+  userlist,
 } from "@/apis/user";
 } from "@/apis/user";
 
 
 import {
 import {
@@ -585,8 +586,9 @@ async function getRoleMenuList(level = "") {
     // const { id } = _getUserInfo();
     // const { id } = _getUserInfo();
     // const isOkIndex = ids.findIndex((s) => String(s) === String(id));
     // const isOkIndex = ids.findIndex((s) => String(s) === String(id));
     const idok = state.is_super_admin_ids;
     const idok = state.is_super_admin_ids;
-    
+
     if (!idok) {
     if (!idok) {
+      console.log(data)
       list = data.filter(function (item) {
       list = data.filter(function (item) {
         return item.menu_route !== "system"
         return item.menu_route !== "system"
       });
       });
@@ -595,9 +597,11 @@ async function getRoleMenuList(level = "") {
     }
     }
 
 
     //获取所有的超管账号
     //获取所有的超管账号
-    // const {} = awiat 
+    let isSuperOk = state.isSupertube && ids.includes(String(state.userInfo.id)) || !state.isSupertube
+
+    console.log(isSuperOk)
 
 
-    if(state.isTeacherChen){
+    if(!isSuperOk){
       const _i = list.findIndex(item => {
       const _i = list.findIndex(item => {
         return item.menu_route === "sellOut"
         return item.menu_route === "sellOut"
       })
       })
@@ -606,19 +610,18 @@ async function getRoleMenuList(level = "") {
         return item.menu_route === "supplierSellOut"
         return item.menu_route === "supplierSellOut"
       })
       })
 
 
-      if(_i !== -1){
-        list[_i] = list[_i].child.filter(item => {
-          return item => item.menu_route !=="filing" 
+      if(_i >= 0){
+        list[_i].child = list[_i].child.filter(item => {
+          return item.menu_route !=="filing" 
         })
         })
       }
       }
 
 
-      if(_s !== -1){
-        list[_s] = list[_s].child.filter(item => {
-          return item => item.menu_route !=="supplierFiling" 
+      if(_s >= 0){
+        list[_s].child = list[_s].child.filter(item => {
+          return item.menu_route !=="supplierFiling" 
         })
         })
       }
       }
     }
     }
-    console.log()
 
 
     list = list.filter((item) => item.child && item.child.length > 0);
     list = list.filter((item) => item.child && item.child.length > 0);
     list.forEach((v1) => {
     list.forEach((v1) => {

+ 5 - 1
src/views/sellOut/filing/index.vue

@@ -154,7 +154,11 @@
       <template #company="{scope}">
       <template #company="{scope}">
         <div style="display:flex;align-items:center">
         <div style="display:flex;align-items:center">
           <el-tooltip :content="'企业客户编码 : ' + (scope.row.companyCode || '--')" placement="top">
           <el-tooltip :content="'企业客户编码 : ' + (scope.row.companyCode || '--')" placement="top">
-            <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+            <i
+              v-if="scope.row.companyName"
+              class="el-icon-warning-outline"
+              style="margin-right:2px;cursor:pointer"
+            />
           </el-tooltip>
           </el-tooltip>
           {{scope.row.companyName}}
           {{scope.row.companyName}}
         </div>
         </div>

+ 5 - 1
src/views/supplierSellOut/supplierFiling/index.vue

@@ -150,7 +150,11 @@
       <template #company="{scope}">
       <template #company="{scope}">
         <div style="display:flex;align-items:center">
         <div style="display:flex;align-items:center">
           <el-tooltip :content="'企业客户编码 : ' + (scope.row.companyCode || '--')" placement="top">
           <el-tooltip :content="'企业客户编码 : ' + (scope.row.companyCode || '--')" placement="top">
-            <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+            <i
+              v-if="scope.row.companyName"
+              class="el-icon-warning-outline"
+              style="margin-right:2px;cursor:pointer"
+            />
           </el-tooltip>
           </el-tooltip>
           {{scope.row.companyName}}
           {{scope.row.companyName}}
         </div>
         </div>