snow 1 年之前
父節點
當前提交
9cc874ed59

+ 24 - 2
src/store/modules/user.js

@@ -56,6 +56,9 @@ export const userStoreActions = {
   setCurrentCompany: "user/setCurrentCompany",
 };
 const ids = ["36", "37", "44", "109"];
+
+const tearchChenId = "37"
+
 const state = {
   token: getToken(),
   name: "",
@@ -72,6 +75,7 @@ const state = {
   currentCompany: getUserCompany() ? getUserCompany().code : "",
   userInfo: _getUserInfo(),
   isSupertube: false,
+  isTeacherChen: false,
   is_super_admin_ids: false,
   companylist: [],
   originLevel: "0",
@@ -106,6 +110,10 @@ const mutations = {
     state.is_super_admin_ids = is;
   },
 
+  setIsTearcherChen(state, current){
+    state.isTeacherChen = current
+  },
+
   SET_ROLES: (state, roles) => {
     state.roles = roles;
   },
@@ -332,8 +340,11 @@ const actions = {
           const isSupplier = level === "3";
           //保存用户信息
           commit("setUserInfo", udata);
+          // const 
           const isOkIndex = ids.findIndex((s) => String(s) === String(id));
           commit("SET_IS_SUPER_ADMIN_IDS", isOkIndex !== -1);
+
+          commit("setIsTearcherChen", String(id) === tearchChenId)
           //保存是否超管
           commit("setSupplier", isSupplier);
           //保存是否超管用户
@@ -574,14 +585,25 @@ async function getRoleMenuList(level = "") {
     // const { id } = _getUserInfo();
     // const isOkIndex = ids.findIndex((s) => String(s) === String(id));
     const idok = state.is_super_admin_ids;
-    console.log(idok);
+    
     if (!idok) {
       list = data.filter(function (item) {
-        return item.menu_route !== "system";
+        return item.menu_route !== "system"
       });
     } else {
       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)
+
     list = list.filter((item) => item.child && item.child.length > 0);
     list.forEach((v1) => {
       const { menu_route, child } = v1;

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

@@ -197,7 +197,7 @@
 
         <el-tooltip effect="dark" content="修改" placement="top">
           <i
-            v-if="String(scope.row.status) === '1' && !isSupertube && powers.includes('005')"
+            v-if="String(scope.row.status) === '1' && !isSupertube && powers.includes('005') && Number(scope.row.wsm_has_account) === 1"
             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) === 0
+              && Number(scope.row.wsm_has_account) === 1
               && powers.includes('005')
             "
             class="el-icon-refresh-right tb-icon"

+ 12 - 6
src/views/supplierSellOut/supplierFiling/detail.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="report-detail__container">
     <el-tabs v-model="activeTabs" v-loading="loading">
-      <el-tab-pane name="1" :label="type === 'add' ? '报备单详情' : '新建报备单'">
+      <el-tab-pane name="1" :label="title">
         <el-collapse v-model="collapses">
-          <el-collapse-item v-if="type === 'add'" name="1" :title="title">
+          <el-collapse-item v-if="type === 'add' || type === 'edit'" name="1" :title="title">
             <base-form :id="id" :type="type" />
           </el-collapse-item>
 
@@ -29,7 +29,7 @@
         </el-collapse>
       </el-tab-pane>
 
-      <el-tab-pane label="审批记录" name="2">
+      <el-tab-pane label="审批记录" name="2" v-if="type === 'view'">
         <process-time-line
           v-if="newTime !== '' && id"
           :newTime="newTime"
@@ -38,7 +38,7 @@
         />
       </el-tab-pane>
 
-      <el-tab-pane label="流程图" name="3">
+      <el-tab-pane label="流程图" name="3" v-if="type === 'view'">
         <flow-chart process_id="28" type="BBD" :orderCode="id" />
       </el-tab-pane>
     </el-tabs>
@@ -75,10 +75,16 @@ export default {
   computed: {
     ...mapGetters(["isSupertube"]),
     title() {
-      return this.id && this.id !== "add" ? "报备单详情" : "新建报备单";
+      const mapTitle = {
+        add: "新建报备单",
+        edit: "编辑报备单",
+        view: "报备单详情"
+      };
+
+      return mapTitle[this.$route.query.type];
     },
     type() {
-      return this.id && this.id !== "add" ? "view" : "add";
+      return this.$route.query.type || "view";
     },
     id() {
       return this.$route.query.id;

+ 3 - 2
src/views/supplierSellOut/supplierFiling/index.vue

@@ -338,11 +338,12 @@ export default {
       this.parmValue.khName = e.label;
       this.searchList();
     },
-    getRouter(toRouter, queryId) {
+    getRouter(toRouter, queryId, type) {
       console.log(toRouter, queryId);
       if (toRouter && queryId) {
         let model = {
-          id: queryId
+          id: queryId,
+          type: type || "view"
         };
 
         //有多选框的条件