Browse Source

有效工时率

seyason 1 năm trước cách đây
mục cha
commit
af3927b566

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

@@ -93,6 +93,7 @@ const StringUtil = {
         reportResponsibleManhourCost: false, // 负责项目子项目工时成本 //
         reportFTEAll: false, // 全部部门FTE报表 //
         reportFTEPart: false, // 负责部门FTE报表 // 
+        reportEfficent: false, // 有效工时率 // 
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -226,6 +227,7 @@ const StringUtil = {
         arr[i] == '负责项目分组阶段工时' ? obj.reportStageWorkingTime = true : ''
         arr[i] == '全部部门FTE报表' ? obj.reportFTEAll = true : ''
         arr[i] == '负责部门FTE报表' ? obj.reportFTEPart = true : ''
+        arr[i] == '有效工时率表' ? obj.reportEfficent = true : ''
 
         arr[i] == '新增合同' ? obj.contractNew = true : ''
         arr[i] == '查看全部合同' ? obj.contractView = true : ''

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

@@ -40,6 +40,7 @@
                   <el-menu-item index="1-18" v-if="permissions.reportAllManhourCost || permissions.reportResponsibleManhourCost" @click="ssl(17)"><p>子项目工时成本表</p></el-menu-item>
                   <el-menu-item index="1-19" v-if="user.timeType.restartTaskNeedReason == 1" @click="ssl(18)"><p>任务重启表</p></el-menu-item>
                   <el-menu-item index="1-20" v-if="permissions.reportFTEAll || permissions.reportFTEPart" @click="ssl(19)"><p>FTE报表</p></el-menu-item>
+                  <el-menu-item index="1-21" v-if="permissions.reportEfficent"  @click="ssl(20)"><p>有效工时率表</p></el-menu-item>
                   <!-- <el-menu-item index="1-12"><p @click="ssl(11)">人员工时统计表</p></el-menu-item> -->
                 </el-submenu>
               </el-menu>
@@ -65,7 +66,7 @@
             <el-option v-for="(item) in customerList" :key="item.id" :label="item.customerName" :value="item.id">
             </el-option>
           </el-select>
-          <el-select v-model="cusProJuctId" :placeholder="$t('defaultText.pleaseSelectSnItem')" clearable filterable size="small" @change="selcts()" popper-class="projectSelectPopperClass">
+          <el-select v-if="ins != 20" v-model="cusProJuctId" :placeholder="$t('defaultText.pleaseSelectSnItem')" clearable filterable size="small" @change="selcts()" popper-class="projectSelectPopperClass">
             <el-option v-for="(item) in cusProListOvertime" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
               <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
               <span style="float: right;font-size: 13px;">{{ item.projectName }}</span>
@@ -73,7 +74,7 @@
           </el-select>
         </template>
         <!-- 时间段筛选 -->
-          <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 12 || ins == 5 || ins == 16 || ins == 17 || ins == 18">
+          <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 12 || ins == 5 || ins == 16 || ins == 17 || ins == 18 || ins == 20">
             <span>
               <span class="demonstration" style="color:#999;padding:0 10px">
                 {{ ins == 15 ? $t('xiang-mu-chuang-jian-shi-jian-duan') : $t('message.period') }}
@@ -88,7 +89,7 @@
           <el-option label="查看部门审核人" :value="0"></el-option>
         </el-select> -->
         <!-- 项目筛选 -->
-        <el-select v-if="ins != 4 && ins != 8 && ins != 9 && ins != 19 && ins != 10 && ins != 11 && ins != 14 && ins != 15 && ins != 17" v-model="proJuctId" :placeholder="$t('defaultText.pleaseSelectSnItem')" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
+        <el-select v-if="ins != 4 && ins != 8 && ins != 9 && ins != 19 && ins != 10 && ins != 11 && ins != 14 && ins != 15 && ins != 17 && ins != 20" v-model="proJuctId" :placeholder="$t('defaultText.pleaseSelectSnItem')" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
           <el-option v-for="(item) in proListOvertime" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
             <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
             <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
@@ -896,8 +897,20 @@
                 <el-table-column align="center" prop="FTE" label="FTE(工时/当月工时基数)" min-width="250"></el-table-column>
             </el-table>
 
+            <!-- 有效工时率表 -->
+            <el-table  v-if="ins == 20" key="20" border :data="efficentList" highlight-current-row v-loading="listLoading" :height="+tableHeight - 1" style="width: 100%;" >
+                <el-table-column align="center" prop="department_name" label="所属部门" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="working_time" label="实报工时(小时)" min-width="150"></el-table-column>
+                <el-table-column align="center" label="应工时(小时)" >
+                    <el-table-column align="center" prop="count" label="在职人数" min-width="150"></el-table-column>
+                    <el-table-column align="center" prop="date_count" label="应报工时天数" min-width="150"></el-table-column>
+                    <el-table-column align="center" prop="day_time" label="日标准工时" min-width="150"></el-table-column>
+                    <el-table-column align="center" prop="total_time" label="应报工时" min-width="150"></el-table-column>
+                </el-table-column>
+                <el-table-column align="center" prop="rate" label="有效工时率" min-width="150"></el-table-column>
+            </el-table>
         <!--工具条-->
-        <el-col :span="24" class="toolbar" v-if="ins != 6">
+        <el-col :span="24" class="toolbar" v-if="ins != 6 && ins != 20">
           <el-pagination
                 v-if="ins == 12"
                 @size-change="groupSizeChange"
@@ -1129,6 +1142,7 @@ export default {
   props: {},
   data() {
     return {
+      efficentList:[],
       groupNames: [],
       taskgroupList: [],
       customNameChoose: '',
@@ -1182,13 +1196,13 @@ export default {
       this.$t('pojectbalancesheetincomestatement'),this.$t('customerprojectprofitstatement'),this.$t('projectphasetimesheet'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('statisticsofstafffillingintimerate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
-      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表'],
+      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表', '有效工时率表'],
 
       shuzArr: [this.$t('projectreport'),this.$t('projectTaskReport'),this.$t('projectcoststatement'),
       this.$t('projectbalancesheet'),this.$t('customerprojectincomestatement'),this.$t('projectphasetimesheet'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('employeereporttimelinessrate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
-      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表'],
+      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表','有效工时率表'],
 
       ins: 10000,
       user: JSON.parse(sessionStorage.user),
@@ -1641,8 +1655,10 @@ export default {
                 } else if(this.ins == 19) {
                   this.getETF()
                   this.getArea()
+                } else if (this.ins == 20) {
+                  this.getEffectiveLaborHourRate();
                 }
-                if(this.ins != 16 && this.ins != 17 && this.ins != 18 && this.ins != 19) {
+                if(this.ins != 16 && this.ins != 17 && this.ins != 18 && this.ins != 19 && this.ins != 20) {
                   this.getUserList()
                 }
             },
@@ -1874,6 +1890,32 @@ export default {
       this.page = 1
       this.getAuditRateList()
     },
+    //获取有效工时率表
+    getEffectiveLaborHourRate() {
+      this.listLoading = true;
+      let parameter = {
+        startDate: this.rangeDatas[0],
+        endDate: this.rangeDatas[1],
+      }
+      this.http.post('/project/getEffectiveLaborHourRate', parameter,
+      res => {
+          if (res.code == "ok") {
+              this.efficentList = res.data;
+              this.listLoading = false; 
+          } else {
+              this.$message({
+              message: res.msg,
+              type: "error"
+              });
+          }
+      },
+      error => {
+          this.$message({
+              message: error,
+              type: "error"
+          });
+      });
+    },
     // 获取EFT报表的数据
     getETF() {
       this.getCustomName();
@@ -2825,6 +2867,9 @@ export default {
       if(this.ins == 18) {
         this.taskRestart()
       }
+      if (this.ins == 20) {
+        this.getEffectiveLaborHourRate();
+      }
     },
     // 任务重启表
     taskRestart() {

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -4607,16 +4607,16 @@
 
             // 获取部门列表
             getDepartment() {
+                //如果没有权限,就不需要获取
+                if (!(this.permissions.reportsCompany || this.user.manageDeptId != 0 || this.permissions.reportsDept)) {
+                    return;
+                }
                 let day = (this.choseDay+1) > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
                 var param = {date:this.date + day};
                 this.http.post("/report/getMembList", param,
                 res => {
                     if (res.code == "ok") {
                         if(res.data.length == 0){
-                            // this.$message({
-                            //     message: '请联系管理员设置负责部门',
-                            //     type: 'error'
-                            // })
                             return
                         }
                         this.departmentList = JSON.parse(JSON.stringify(res.data))