Преглед изворни кода

调整项目报表的权限

Lijy пре 2 година
родитељ
комит
7f7f8ffdf9

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -40,6 +40,7 @@ const StringUtil = {
         setFinanceAuditor: false, //设置财务审核人
 
         // 项目报表服务 // 
+        reportProject: false, // 项目报表 //
         reportTask : false, // 项目任务报表 //
         reportCostOf : false, // 项目成本报表 // 
         reportBalance : false, // 项目收支平衡表 // 
@@ -145,6 +146,7 @@ const StringUtil = {
         arr[i] == '查看日报待审核统计' ? obj.reportAuditRate = true : ''
         arr[i] == '查看工时统计' ? obj.countHours = true : ''
         arr[i] == '查看成本统计' ? obj.countCost = true : ''
+        arr[i] == '项目报表' ? obj.reportProject = true : ''
     }
 
     return obj

+ 34 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -5,7 +5,7 @@
       <div ref="abbisd" style="width: 100%;overflow: hidden;">
         <el-col :span="12">
           <el-menu
-            default-active="1-1"
+            :default-active="defaultActive"
             class="el-menu-vertical-demo"
             @select="staffs"
             background-color="#ffffff"
@@ -17,7 +17,7 @@
                 <i class="iconfont firerock-iconbaobiao"></i>
                 <span>项目报表服务</span>
               </template>
-                <el-menu-item index="1-1" ><p @click="ssl(0)">项目报表</p></el-menu-item>
+                <el-menu-item index="1-1" v-if="permissions.reportProject"><p @click="ssl(0)">项目报表</p></el-menu-item>
                 <el-menu-item index="1-2" v-if="permissions.reportTask"><p @click="ssl(1)">项目任务报表</p></el-menu-item>
                 <el-menu-item index="1-3" v-if="permissions.reportCostOf"><p @click="ssl(2)">项目成本报表</p></el-menu-item>
                 <el-menu-item index="1-9" v-if="permissions.reportTimeDivide"><p @click="ssl(8)">人员工时分配表</p></el-menu-item>
@@ -42,7 +42,7 @@
         <div class="spans" ref="side" style="left: -19px;"><i  ref="sideI" class="el-icon-arrow-left"></i></div>
       </div> -->
     <!-- 内容主体区域 -->
-  <div class="contents">
+  <div class="contents" v-if="allWrong">
     <div class="headine" ref="headine">
       <h3 ref="headHe" style="padding-left: 210px">{{shuz[ins]}}</h3>
       <div class="headScreen">
@@ -402,8 +402,8 @@
                     <span>¥{{scope.row.baseCurcost | numberToCurrency}}</span>
                   </template>
                 </el-table-column>
-                <el-table-column  prop="projectName" label="当前剩余预算" min-width="200"></el-table-column>
-                <el-table-column  prop="projectName" label="总剩余预算" min-width="200"></el-table-column>
+                <el-table-column  prop="currentRemainingBudget" label="当前剩余预算" min-width="200"></el-table-column>
+                <el-table-column  prop="remainingBudget" label="总剩余预算" min-width="200"></el-table-column>
                 <el-table-column prop="feeMan" label="已发生工时成本" min-width="160" align="right">
                   <template slot-scope="scope">
                     <span :class="scope.row.baseCurcost * 0.9 < scope.row.feeMan ? 'warntext' : ''">¥{{scope.row.feeMan | numberToCurrency}}</span>
@@ -627,7 +627,7 @@ export default {
       "项目收支平衡表(利润表)","客户项目利润报表","项目阶段工时表",
       "加班情况统计表","工时成本预警表","人员工时分配表",
       "员工填报及时率统计","日报待审核统计"],
-      ins: 0,
+      ins: 10000,
       user: JSON.parse(sessionStorage.user),
       overTimeList: [], // 项目加班情况统计列表
       proList: [],
@@ -653,8 +653,10 @@ export default {
       departmentList: [],
       departmentIdArray: [],
       selUserList: [],
-      departmentOrProject: 1
+      departmentOrProject: 1,
 
+      allWrong: true,
+      defaultActive: '1-1'
     };
   },
   computed: {},
@@ -675,6 +677,7 @@ export default {
     this.getDepartmentList()
     this.getcustomerList()
     this.getcusProjectList()
+    this.authorityToJudge()
   },
   filters: {
       
@@ -693,6 +696,30 @@ export default {
       }
   },
   methods: {
+    authorityToJudge() {
+      // if(this.permissions.reportProject) {this.ins = 0;return} else
+      // if(this.permissions.reportTask) {this.ins = 1;return} else
+      // if(this.permissions.reportCostOf) {this.ins = 2;return} else
+      // if(this.permissions.reportTimeDivide) {this.ins = 8;return} else
+      // if(this.permissions.reportCostWarning) {this.ins = 7;return} else
+      // if(this.permissions.reportBalance) {this.ins = 3;return} else
+      // if(this.permissions.reportProfits) {this.ins = 4;return} else
+      // if(this.permissions.reportPhase) {this.ins = 5;return} else
+      // if(this.permissions.reportOvertime) {this.ins = 6;return} else
+      // if(this.permissions.reportTimely) {this.ins = 9;return} else
+      // if(this.permissions.reportAuditRate) {this.ins = 10;return} else {this.allWrong = false}
+      if(this.permissions.reportProject) {this.ssl(0);this.defaultActive = '1-1';return} else
+      if(this.permissions.reportTask) {this.ssl(1);this.defaultActive = '1-2';return} else
+      if(this.permissions.reportCostOf) {this.ssl(2);this.defaultActive = '1-3';return} else
+      if(this.permissions.reportTimeDivide) {this.ssl(8);this.defaultActive = '1-9';return} else
+      if(this.permissions.reportCostWarning) {this.ssl(7);this.defaultActive = '1-4';return} else
+      if(this.permissions.reportBalance) {this.ssl(3);this.defaultActive = '1-5';return} else
+      if(this.permissions.reportProfits) {this.ssl(4);this.defaultActive = '1-6';return} else
+      if(this.permissions.reportPhase) {this.ssl(5);this.defaultActive = '1-7';return} else
+      if(this.permissions.reportOvertime) {this.ssl(6);this.defaultActive = '1-8';return} else
+      if(this.permissions.reportTimely) {this.ssl(9);this.defaultActive = '1-10';return} else
+      if(this.permissions.reportAuditRate) {this.ssl(10);this.defaultActive = '1-11';return} else {this.allWrong = false}
+    },
     rowspan(spanArr,position,spanName){
       this.list1.forEach((item,index) => {
         if(index == 0){