snow 1 jaar geleden
bovenliggende
commit
95a12747bc

+ 9 - 0
src/apis/user/index.js

@@ -35,6 +35,15 @@ export function menuList(data) {
     data
   })
 }
+
+export function userlist(data) {
+  return http({
+    url: `${urlConfig.baseURL}admin/userlist`,
+    method: 'post',
+    data
+  })
+}
+
 // 钉钉获取用户信息
 export function dingdingdetail(data) {
   return http({

+ 25 - 9
src/store/modules/user.js

@@ -594,15 +594,31 @@ async function getRoleMenuList(level = "") {
       list = data ?? [];
     }
 
-    // console.log(state.isTeacherChen)
-    // if(state.isTeacherChen){
-    //   const _i = list.find(item => {
-
-    //   })
-    //   // tearchChenId
-    //   list = list.filter(item => item.menu_route !=="filing" && item.menu_route !== "supplierFiling")
-    // }
-    // console.log(list)
+    //获取所有的超管账号
+    // const {} = awiat 
+
+    if(state.isTeacherChen){
+      const _i = list.findIndex(item => {
+        return item.menu_route === "sellOut"
+      })
+
+      const _s = list.findIndex(item => {
+        return item.menu_route === "supplierSellOut"
+      })
+
+      if(_i !== -1){
+        list[_i] = list[_i].child.filter(item => {
+          return item => item.menu_route !=="filing" 
+        })
+      }
+
+      if(_s !== -1){
+        list[_s] = list[_s].child.filter(item => {
+          return item => item.menu_route !=="supplierFiling" 
+        })
+      }
+    }
+    console.log()
 
     list = list.filter((item) => item.child && item.child.length > 0);
     list.forEach((v1) => {

+ 3 - 3
src/views/sellOut/filing/index.vue

@@ -148,7 +148,7 @@
       </template>
 
       <template #wsm_has_account="{ scope }">
-        <el-tag size="mini">{{Number(scope.row.wsm_has_account) === 0 ? '开通' :'未开通'}}</el-tag>
+        <el-tag size="mini">{{Number(scope.row.wsm_has_account) === 1 ? '开通' :'未开通'}}</el-tag>
       </template>
 
       <template #company="{scope}">
@@ -197,7 +197,7 @@
 
         <el-tooltip effect="dark" content="修改" placement="top">
           <i
-            v-if="String(scope.row.status) === '1' && !isSupertube && powers.includes('005') && Number(scope.row.wsm_has_account) === 1"
+            v-if="String(scope.row.status) === '1' && !isSupertube && powers.includes('005') && Number(scope.row.wsm_has_account) === 0"
             class="el-icon-edit tb-icon"
             @click="getRouter('/sellOut/filingDetail', scope.row.id,'edit')"
           />
@@ -208,7 +208,7 @@
             v-if="
               String(scope.row.status) !== '4' 
               && String(scope.row.status) !== '5' 
-              && Number(scope.row.wsm_has_account) === 1
+              && Number(scope.row.wsm_has_account) === 0
               && powers.includes('005')
             "
             class="el-icon-refresh-right tb-icon"

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

@@ -144,7 +144,7 @@
       </template>
 
       <template #wsm_has_account="{ scope }">
-        <el-tag size="mini">{{Number(scope.row.wsm_has_account) === 0 ? '开通' :'未开通'}}</el-tag>
+        <el-tag size="mini">{{Number(scope.row.wsm_has_account) === 1 ? '开通' :'未开通'}}</el-tag>
       </template>
 
       <template #company="{scope}">