Ver Fonte

福达权限限制 2024-2-01

caojunjie há 1 ano atrás
pai
commit
acf07812ed

+ 6 - 0
src/components/price-Library/configuration/mainList.json

@@ -62,6 +62,8 @@
       "prop": "price",
       "index": 5,
       "width": 100,
+      "hide": true,
+      "showColumn":false,
       "overHidden": true
     },
     {
@@ -69,6 +71,8 @@
       "prop": "purchaseAmount",
       "index": 6,
       "width": 100,
+      "hide": true,
+      "showColumn":false,
       "overHidden": true
     },
     {
@@ -85,6 +89,8 @@
       "prop": "taxRate",
       "index": 8,
       "width": 100,
+      "hide": true,
+      "showColumn":false,
       "overHidden": true
     },
     {

+ 8 - 1
src/components/price-Library/main.vue

@@ -137,7 +137,14 @@ export default {
         res.data.data.records;
       // this.treeData = res.data.data.records;
     });
-    if (localStorage.getItem("roleName") == "贸易") {
+    if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+      this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+      this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+      this.findObject(this.tableOption.column, "taxRate").hide = false;
+      this.findObject(this.tableOption.column, "taxRate").showColumn = true;
+      this.findObject(this.tableOption.column, "price").hide = false;
+      this.findObject(this.tableOption.column, "price").showColumn = true;
+    }else {
       this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
       this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
       this.findObject(this.tableOption.column, "taxRate").hide = true;

+ 35 - 35
src/views/exportTrade/EcommerceStocking/components/goodsInfo.vue

@@ -419,22 +419,18 @@ export default {
       goodsOption
     );
 
-      // 查看是否有admin 权限 没有admin的话按钮都不显示
-      if (JSON.parse(localStorage.getItem('saber-userInfo')).content.role_name.indexOf('运营') != -1) {
-          this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-          this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
+      if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+          this.findObject(this.tableOption.column, "purchaseCost").hide = false;
+          this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
+          this.findObject(this.tableOption.column, "partsPrice").hide = false;
+          this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
+          this.findObject(this.tableOption.column, "partsCost").hide = false;
+          this.findObject(this.tableOption.column, "partsCost").showColumn = true;
+          this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+          this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+          this.findObject(this.tableOption.column, "corpName").hide = false;
+          this.findObject(this.tableOption.column, "corpName").showColumn = true;
       }
-
-    if (localStorage.getItem("roleName") == "贸易") {
-      this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-      this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
-      this.findObject(this.tableOption.column, "partsCost").hide = true;
-      this.findObject(this.tableOption.column, "partsCost").showColumn = false;
-      this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
-      this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
-      this.findObject(this.tableOption.column, "corpName").hide = true;
-      this.findObject(this.tableOption.column, "corpName").showColumn = false;
-    }
     this.getWorkDicts("Thread").then(res => {
       this.ThreadList = res.data.data;
     });
@@ -1327,16 +1323,18 @@ export default {
         this.getColumnName(5.1),
         this.tableOption
       );
-      if (localStorage.getItem("roleName") == "贸易") {
-        this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-        this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
-        this.findObject(this.tableOption.column, "partsCost").hide = true;
-        this.findObject(this.tableOption.column, "partsCost").showColumn = false;
-        this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
-        this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
-        this.findObject(this.tableOption.column, "corpName").hide = true;
-        this.findObject(this.tableOption.column, "corpName").showColumn = false;
-      }
+        if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+            this.findObject(this.tableOption.column, "purchaseCost").hide = false;
+            this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
+            this.findObject(this.tableOption.column, "partsPrice").hide = false;
+            this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
+            this.findObject(this.tableOption.column, "partsCost").hide = false;
+            this.findObject(this.tableOption.column, "partsCost").showColumn = true;
+            this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+            this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+            this.findObject(this.tableOption.column, "corpName").hide = false;
+            this.findObject(this.tableOption.column, "corpName").showColumn = true;
+        }
       if (inSave) {
         this.$nextTick(() => {
           this.$refs.crud.doLayout();
@@ -1360,16 +1358,18 @@ export default {
         this.$nextTick(() => {
           this.$refs.crud.doLayout();
         });
-        if (localStorage.getItem("roleName") == "贸易") {
-          this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-          this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
-          this.findObject(this.tableOption.column, "partsCost").hide = true;
-          this.findObject(this.tableOption.column, "partsCost").showColumn = false;
-          this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
-          this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
-          this.findObject(this.tableOption.column, "corpName").hide = true;
-          this.findObject(this.tableOption.column, "corpName").showColumn = false;
-        }
+          if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+              this.findObject(this.tableOption.column, "purchaseCost").hide = false;
+              this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
+              this.findObject(this.tableOption.column, "partsPrice").hide = false;
+              this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
+              this.findObject(this.tableOption.column, "partsCost").hide = false;
+              this.findObject(this.tableOption.column, "partsCost").showColumn = true;
+              this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+              this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+              this.findObject(this.tableOption.column, "corpName").hide = false;
+              this.findObject(this.tableOption.column, "corpName").showColumn = true;
+          }
         this.$message.success("重置成功");
         //关闭窗口
         setTimeout(() => {

+ 10 - 3
src/views/exportTrade/EcommerceStocking/config/customerContact.json

@@ -310,6 +310,8 @@
       "width": 100,
       "align": "right",
       "span": 6,
+      "hide": true,
+      "showColumn":false,
       "disabled": true,
       "display": false,
       "overHidden": true
@@ -321,6 +323,8 @@
       "width": 100,
       "align": "right",
       "span": 6,
+      "hide": true,
+      "showColumn":false,
       "disabled": true,
       "display": false,
       "overHidden": true
@@ -332,9 +336,10 @@
       "width": 100,
       "align": "right",
       "span": 6,
+      "hide": true,
+      "showColumn":false,
       "disabled": true,
       "display": false,
-      "hide": true,
       "overHidden": true
     },
     {
@@ -344,9 +349,10 @@
       "width": 100,
       "align": "right",
       "span": 6,
+      "hide": true,
+      "showColumn":false,
       "disabled": true,
-      "overHidden": true,
-      "hide": true
+      "overHidden": true
     },
     {
       "label": "配件价格描述",
@@ -367,6 +373,7 @@
       "disabled": true,
       "display": false,
       "hide": true,
+      "showColumn":false,
       "overHidden": true
     },
     {

+ 34 - 28
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -413,15 +413,17 @@ export default {
             this.getColumnName(26),
             goodsOption
         );
-        if (localStorage.getItem("roleName") == "贸易") {
-          this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-          this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
-          this.findObject(this.tableOption.column, "partsCost").hide = true;
-          this.findObject(this.tableOption.column, "partsCost").showColumn = false;
-          this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
-          this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
-          this.findObject(this.tableOption.column, "corpName").hide = true;
-          this.findObject(this.tableOption.column, "corpName").showColumn = false;
+        if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+          this.findObject(this.tableOption.column, "purchaseCost").hide = false;
+          this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
+          this.findObject(this.tableOption.column, "partsPrice").hide = false;
+          this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
+          this.findObject(this.tableOption.column, "partsCost").hide = false;
+          this.findObject(this.tableOption.column, "partsCost").showColumn = true;
+          this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+          this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+          this.findObject(this.tableOption.column, "corpName").hide = false;
+          this.findObject(this.tableOption.column, "corpName").showColumn = true;
         }
         this.getWorkDicts("Thread").then(res => {
             this.ThreadList = res.data.data;
@@ -1230,16 +1232,18 @@ export default {
         },
         async saveColumn() {
           const inSave = await this.saveColumnData(this.getColumnName(1),this.tableOption);
-          if (localStorage.getItem("roleName") == "贸易") {
-            this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-            this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
-            this.findObject(this.tableOption.column, "partsCost").hide = true;
-            this.findObject(this.tableOption.column, "partsCost").showColumn = false;
-            this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
-            this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
-            this.findObject(this.tableOption.column, "corpName").hide = true;
-            this.findObject(this.tableOption.column, "corpName").showColumn = false;
-          }
+            if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+                this.findObject(this.tableOption.column, "purchaseCost").hide = false;
+                this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
+                this.findObject(this.tableOption.column, "partsPrice").hide = false;
+                this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
+                this.findObject(this.tableOption.column, "partsCost").hide = false;
+                this.findObject(this.tableOption.column, "partsCost").showColumn = true;
+                this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+                this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+                this.findObject(this.tableOption.column, "corpName").hide = false;
+                this.findObject(this.tableOption.column, "corpName").showColumn = true;
+            }
             if (inSave) {
                 this.$nextTick(() => {
                     this.$refs.crud.doLayout();
@@ -1264,15 +1268,17 @@ export default {
                     this.$refs.crud.doLayout();
                 });
                 this.$message.success("重置成功");
-                if (localStorage.getItem("roleName") == "贸易") {
-                  this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-                  this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
-                  this.findObject(this.tableOption.column, "partsCost").hide = true;
-                  this.findObject(this.tableOption.column, "partsCost").showColumn = false;
-                  this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
-                  this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
-                  this.findObject(this.tableOption.column, "corpName").hide = true;
-                  this.findObject(this.tableOption.column, "corpName").showColumn = false;
+                if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+                    this.findObject(this.tableOption.column, "purchaseCost").hide = false;
+                    this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
+                    this.findObject(this.tableOption.column, "partsPrice").hide = false;
+                    this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
+                    this.findObject(this.tableOption.column, "partsCost").hide = false;
+                    this.findObject(this.tableOption.column, "partsCost").showColumn = true;
+                    this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+                    this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+                    this.findObject(this.tableOption.column, "corpName").hide = false;
+                    this.findObject(this.tableOption.column, "corpName").showColumn = true;
                 }
                 //关闭窗口
                 setTimeout(() => {

+ 10 - 4
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -289,9 +289,10 @@
             "width": 100,
             "align": "right",
             "span": 6,
+            "hide": true,
+            "showColumn":false,
             "disabled": true,
             "display": false,
-            "hide": true,
             "overHidden": true
         },
         {
@@ -301,9 +302,10 @@
             "width": 100,
             "align": "right",
             "span": 6,
+            "hide": true,
+            "showColumn":false,
             "disabled": true,
             "display": false,
-            "hide": true,
             "overHidden": true
         },
         {
@@ -313,9 +315,10 @@
             "width": 100,
             "align": "right",
             "span": 6,
+            "hide": true,
+            "showColumn":false,
             "disabled": true,
             "display": false,
-            "hide": true,
             "overHidden": true
         },
         {
@@ -325,6 +328,8 @@
             "width": 100,
             "align": "right",
             "span": 6,
+            "hide": true,
+            "showColumn":false,
             "disabled": true,
             "overHidden": true
         },
@@ -343,9 +348,10 @@
             "index": 33,
             "width": 200,
             "span": 6,
+            "hide": true,
+            "showColumn":false,
             "disabled": true,
             "display": false,
-            "hide": true,
             "overHidden": true
         },
         {

+ 36 - 31
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -418,17 +418,18 @@ export default {
       this.getColumnName(28),
       goodsOption
     );
-
-    if (localStorage.getItem("roleName") == "贸易") {
-      this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-      this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
-      this.findObject(this.tableOption.column, "partsCost").hide = true;
-      this.findObject(this.tableOption.column, "partsCost").showColumn = false;
-      this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
-      this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
-      this.findObject(this.tableOption.column, "corpName").hide = true;
-      this.findObject(this.tableOption.column, "corpName").showColumn = false;
-    }
+      if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+          this.findObject(this.tableOption.column, "purchaseCost").hide = false;
+          this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
+          this.findObject(this.tableOption.column, "partsPrice").hide = false;
+          this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
+          this.findObject(this.tableOption.column, "partsCost").hide = false;
+          this.findObject(this.tableOption.column, "partsCost").showColumn = true;
+          this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+          this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+          this.findObject(this.tableOption.column, "corpName").hide = false;
+          this.findObject(this.tableOption.column, "corpName").showColumn = true;
+      }
     this.getWorkDicts("Thread").then(res => {
       this.ThreadList = res.data.data;
     });
@@ -1321,16 +1322,18 @@ export default {
         this.getColumnName(5),
         this.tableOption
       );
-      if (localStorage.getItem("roleName") == "贸易") {
-        this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-        this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
-        this.findObject(this.tableOption.column, "partsCost").hide = true;
-        this.findObject(this.tableOption.column, "partsCost").showColumn = false;
-        this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
-        this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
-        this.findObject(this.tableOption.column, "corpName").hide = true;
-        this.findObject(this.tableOption.column, "corpName").showColumn = false;
-      }
+        if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+            this.findObject(this.tableOption.column, "purchaseCost").hide = false;
+            this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
+            this.findObject(this.tableOption.column, "partsPrice").hide = false;
+            this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
+            this.findObject(this.tableOption.column, "partsCost").hide = false;
+            this.findObject(this.tableOption.column, "partsCost").showColumn = true;
+            this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+            this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+            this.findObject(this.tableOption.column, "corpName").hide = false;
+            this.findObject(this.tableOption.column, "corpName").showColumn = true;
+        }
       if (inSave) {
         this.$nextTick(() => {
           this.$refs.crud.doLayout();
@@ -1354,16 +1357,18 @@ export default {
         this.$nextTick(() => {
           this.$refs.crud.doLayout();
         });
-        if (localStorage.getItem("roleName") == "贸易") {
-          this.findObject(this.tableOption.column, "purchaseCost").hide = true;
-          this.findObject(this.tableOption.column, "purchaseCost").showColumn = false;
-          this.findObject(this.tableOption.column, "partsCost").hide = true;
-          this.findObject(this.tableOption.column, "partsCost").showColumn = false;
-          this.findObject(this.tableOption.column, "purchaseAmount").hide = true;
-          this.findObject(this.tableOption.column, "purchaseAmount").showColumn = false;
-          this.findObject(this.tableOption.column, "corpName").hide = true;
-          this.findObject(this.tableOption.column, "corpName").showColumn = false;
-        }
+          if (localStorage.getItem("roleName").indexOf('贸易') == -1 && localStorage.getItem("roleName").indexOf('运营') == -1) {
+              this.findObject(this.tableOption.column, "purchaseCost").hide = false;
+              this.findObject(this.tableOption.column, "purchaseCost").showColumn = true;
+              this.findObject(this.tableOption.column, "partsPrice").hide = false;
+              this.findObject(this.tableOption.column, "partsPrice").showColumn = true;
+              this.findObject(this.tableOption.column, "partsCost").hide = false;
+              this.findObject(this.tableOption.column, "partsCost").showColumn = true;
+              this.findObject(this.tableOption.column, "purchaseAmount").hide = false;
+              this.findObject(this.tableOption.column, "purchaseAmount").showColumn = true;
+              this.findObject(this.tableOption.column, "corpName").hide = false;
+              this.findObject(this.tableOption.column, "corpName").showColumn = true;
+          }
         this.$message.success("重置成功");
         //关闭窗口
         setTimeout(() => {

+ 9 - 0
src/views/exportTrade/salesContract/config/customerContact.json

@@ -292,6 +292,8 @@
       "width": 100,
       "align": "right",
       "span": 6,
+      "hide": true,
+      "showColumn":false,
       "disabled": true,
       "display": false,
       "overHidden": true
@@ -303,6 +305,8 @@
       "width": 100,
       "align": "right",
       "span": 6,
+      "hide": true,
+      "showColumn":false,
       "disabled": true,
       "display": false,
       "overHidden": true
@@ -314,6 +318,8 @@
       "width": 100,
       "align": "right",
       "span": 6,
+      "hide": true,
+      "showColumn":false,
       "disabled": true,
       "display": false,
       "overHidden": true
@@ -325,6 +331,8 @@
       "width": 100,
       "align": "right",
       "span": 6,
+      "hide": true,
+      "showColumn":false,
       "disabled": true,
       "overHidden": true
     },
@@ -346,6 +354,7 @@
       "disabled": true,
       "display": false,
       "hide": true,
+      "showColumn":false,
       "overHidden": true
     },
     {