Browse Source

分配的按钮添加权限

gjy 2 years ago
parent
commit
1a071389c7
1 changed files with 33 additions and 5 deletions
  1. 33 5
      src/views/profitable/expensemanagementdetails.vue

+ 33 - 5
src/views/profitable/expensemanagementdetails.vue

@@ -235,6 +235,13 @@
         var title=''
           if(status==1){
             title='确定删除分配信息?'
+            if(localStorage.getItem('ws-pf_roleName')!='销售内勤'&&localStorage.getItem('ws-pf_roleName')!='采购内勤'){
+              this.$message({
+                message: '暂无此权限!',
+                type: 'warning',
+              })
+              return
+            }
           }else{
             if(row.expensesType==1){
               title='确定删除收款信息?'
@@ -313,8 +320,15 @@
         this.$router.push({name:'cashoutedit',query:{id:row.id}})
       },
       expenseedit(row){
-        localStorage.setItem('expensebh',JSON.stringify(row.expenseAllocationInfoListBH))
-        this.$router.push({name:'expensemanagentedit',query:{id:row.id}})
+         if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
+          localStorage.setItem('expensebh',JSON.stringify(row.expenseAllocationInfoListBH))
+          this.$router.push({name:'expensemanagentedit',query:{id:row.id}})
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
       },
       shoukuanqueren(row){
         this.$router.push({name:'receiptaduit',query:{id:row.id}})
@@ -330,8 +344,15 @@
         }
       },
       allotaduit(row){
-        localStorage.setItem('expenseqr',JSON.stringify(row.expenseAllocationInfoList))
-        this.$router.push({name:'expenseallotaduit',query:{id:row.id}})
+        if(localStorage.getItem('ws-pf_roleName')=='单证中心主任'){
+          localStorage.setItem('expenseqr',JSON.stringify(row.expenseAllocationInfoList))
+          this.$router.push({name:'expenseallotaduit',query:{id:row.id}})
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
       },
       payment(row){
         if(localStorage.getItem('ws-pf_roleName')=='出纳'){
@@ -345,7 +366,14 @@
         
       },
       allot(row){
-        this.$router.push({name:'expenseallot',query:{id:row.id}})
+        if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
+          this.$router.push({name:'expenseallot',query:{id:row.id}})
+        }else{
+          this.$message({
+            message: '暂无此权限!',
+            type: 'warning',
+          })
+        }
       },
       cashout(){
         this.$router.push({name:'cashout'})