Browse Source

入库登记功能只开放给admin账号

lxf 1 year ago
parent
commit
cd72ed117f
1 changed files with 15 additions and 8 deletions
  1. 15 8
      src/views/production/warehouse/putInStorage/index.vue

+ 15 - 8
src/views/production/warehouse/putInStorage/index.vue

@@ -11,10 +11,12 @@
             :searchConfig="searchConfig"
             highlight-current-row
             :action-list="[
-              // {
-              //   text: '入库登记',
-              //   action: () => clickModal(),
-              // },
+              judgeUser()
+                ? {
+                    text: '入库登记',
+                    action: () => clickModal(),
+                  }
+                : {},
             ]"
             @get-list="getList"
             @clickReset="clickReset">
@@ -34,10 +36,12 @@
             :searchConfig="searchConfigTwo"
             highlight-current-row
             :action-list="[
-              // {
-              //   text: '入库登记',
-              //   action: () => clickModal(),
-              // },
+              judgeUser()
+                ? {
+                    text: '入库登记',
+                    action: () => clickModal(),
+                  }
+                : {},
               {
                 text: '导出Excel',
                 action: () => deriveExcel(),
@@ -437,6 +441,9 @@ const deriveExcel = () => {
     })
     .catch(() => {});
 };
+const judgeUser = () => {
+  return proxy.useUserStore().user.userId === "1";
+};
 </script>
 
 <style lang="scss" scoped>