ソースを参照

提交月度工时表

Lijy 2 年 前
コミット
b698f523b8

+ 5 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -1397,5 +1397,9 @@
   "yu-suan-gong-shi": "budgeted hours",
   "fan-hui": "return",
   "jie-duan": "phase",
-  "xiang-mu-cheng-ben": "project cost"
+  "xiang-mu-cheng-ben": "project cost",
+  "ren-yuan-yue-du-gong-shi-biao": "Monthly time sheet of personnel",
+  "biao-zhun-gong-shi": "Standard working hours",
+  "qing-jia-gong-shi": "Off hours",
+  "shi-fou-man-zu-gong-shi": "Whether the working hours are met"
 }

+ 5 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -1397,5 +1397,9 @@
   "yu-suan-gong-shi": "预算工时",
   "fan-hui": "返回",
   "xiang-mu-cheng-ben": "项目成本",
-  "jie-duan": "阶段"
+  "jie-duan": "阶段",
+  "ren-yuan-yue-du-gong-shi-biao": "人员月度工时表",
+  "biao-zhun-gong-shi": "标准工时",
+  "qing-jia-gong-shi": "请假工时",
+  "shi-fou-man-zu-gong-shi": "是否满足工时"
 }

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

@@ -70,6 +70,8 @@ const StringUtil = {
         reportGroup: false, // 负责项目任务分组工时 //
         reportAllOutputValue: false, // 全部项目成本基线表 //
         reportOutputValue: false, // 负责项目成本基线表 //
+        reportMonthlyPersonnel: false, // 全部人员月度工时表 //
+        reportResponsiblePersonnel: false, // 负责部门月度工时表   //
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -189,6 +191,8 @@ const StringUtil = {
         arr[i] == '日报导出' ? obj.reportExport = true : ''
         arr[i] == '查看全公司数值' ? obj.customDataAll = true : ''
         arr[i] == '删除出差' ? obj.awayOfficeDelete = true : ''
+        arr[i] == '全部人员月度工时表' ? obj.reportMonthlyPersonnel = true : ''
+        arr[i] == '负责部门月度工时表' ? obj.reportResponsiblePersonnel = true : ''
     }
 
     return obj

+ 87 - 9
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -34,6 +34,7 @@
                   <el-menu-item index="1-10" v-if="permissions.reportAllTimely || permissions.reportTimely"><p @click="ssl(9)">{{ $t('employeereporttimelinessrate') }}</p></el-menu-item>
                   <el-menu-item index="1-11" v-if="permissions.reportAuditRate"><p @click="ssl(10)">{{ $t('dailyreporttobereviewedstatistics') }}</p></el-menu-item>
                   <el-menu-item index="1-12" v-if="permissions.reportPersonnel || permissions.reportResponsible"><p @click="ssl(11)">{{ $t('statisticsofpersonnelhours') }}</p></el-menu-item>
+                  <el-menu-item index="1-13" v-if="permissions.reportMonthlyPersonnel || permissions.reportResponsiblePersonnel"><p @click="ssl(14)">{{ $t('ren-yuan-yue-du-gong-shi-biao') }}</p></el-menu-item>
                   <!-- <el-menu-item index="1-12"><p @click="ssl(11)">人员工时统计表</p></el-menu-item> -->
                 </el-submenu>
               </el-menu>
@@ -78,21 +79,23 @@
           <el-option label="查看部门审核人" :value="0"></el-option>
         </el-select> -->
         <!-- 项目筛选 -->
-        <el-select v-if="ins != 4 && ins != 8 && ins != 9 && ins != 10 && ins != 11" 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 != 10 && ins != 11 && ins != 14" 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>
           </el-option>
         </el-select>
+        <!-- 月份选择 -->
+        <el-date-picker v-if="ins == 14" value-format="yyyy-MM" v-model="monthPersonnel" type="month" placeholder="选择月份" @change="selcts()" size="small"></el-date-picker>
           
           <!-- 部门筛选 -->
-          <el-cascader v-if="((ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel)) && user.userNameNeedTranslate != 1" v-model="departmentIdArray" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"
+          <el-cascader v-if="((ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel) || (ins == 14)) && user.userNameNeedTranslate != 1" v-model="departmentIdArray" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"
             :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable
             @change="selcts(9)" size="small" style="margin-left:10px"
           ></el-cascader>
 
           <!-- 部门筛选 -->
-          <vueCascader :size="'small'" :widthStr="'125'" :clearable="true" :subject="departmentList" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="(((ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel)) && user.userNameNeedTranslate == 1)" :selectNameChuan="$t('qing-xuan-ze-bu-men')"></vueCascader>
+          <vueCascader :size="'small'" :widthStr="'125'" :clearable="true" :subject="departmentList" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="(((ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel) || (ins == 14)) && user.userNameNeedTranslate == 1)" :selectNameChuan="$t('qing-xuan-ze-bu-men')"></vueCascader>
 
           <!-- 任务筛选 -->
           <el-select v-if="ins == 1" v-model="taskTypeId" :placeholder="$t('pleaseselecttype')" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
@@ -101,11 +104,11 @@
           </el-select>
 
           <!-- 人员筛选 -->
-          <el-select v-if="(ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11)  && user.userNameNeedTranslate != '1'" v-model="userId" :placeholder="$t('pleaseselectpersonnel')" @change="selcts()" clearable filterable size="small" style="margin-left:10px;width:150px">
+          <el-select v-if="(ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 14)  && user.userNameNeedTranslate != '1'" v-model="userId" :placeholder="$t('pleaseselectpersonnel')" @change="selcts()" clearable filterable size="small" style="margin-left:10px;width:150px">
             <el-option v-for="(item, index) in selUserList" :key="index" :label="item.name" :value="item.id"></el-option>
           </el-select>
 
-          <selectCat :subject="selUserList" :subjectId="userId" :size="mini" @selectCal="selectCal" v-if="(ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11) && user.userNameNeedTranslate == '1'"></selectCat>
+          <selectCat :subject="selUserList" :subjectId="userId" :size="mini" @selectCal="selectCal" v-if="(ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 14) && user.userNameNeedTranslate == '1'"></selectCat>
           
 
           <!-- 待审核筛选切换 -->
@@ -663,7 +666,32 @@
                 </el-table-column>
             </el-table>
             
-
+            <!-- 人员月度工时表 -->
+            <el-table v-if="ins == 14" key="14" border :data="monthlyPersonnelList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
+                <el-table-column prop="name" :label="$t('ren-yuan')" min-width="150">
+                  <template slot-scope="scope">
+                    <div>
+                      <span v-if="user.userNameNeedTranslate == '1'">
+                        <ww-open-data type='userName' :openid='scope.row.name'></ww-open-data>
+                      </span>
+                      <span v-if="user.userNameNeedTranslate != '1'">
+                        {{scope.row.name}}
+                      </span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="jobNumber" :label="$t('Worknumber')" min-width="250"></el-table-column>
+                <el-table-column prop="standardHours" :label="$t('biao-zhun-gong-shi')" min-width="250"></el-table-column>
+                <el-table-column prop="workingTime" :label="$t('shi-ji-gong-shi')" min-width="250"></el-table-column>
+                <el-table-column prop="leaveTime" :label="$t('qing-jia-gong-shi')" min-width="250"></el-table-column>
+                <el-table-column prop="whether" :label="$t('shi-fou-man-zu-gong-shi')" min-width="250">
+                  <template slot-scope="scope">
+                    <div>
+                      <span>{{scope.row.whether == 0 ? '不满足' : '满足'}}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+            </el-table>
         <!--工具条-->
         <el-col :span="24" class="toolbar" v-if="ins != 6">
           <el-pagination
@@ -904,7 +932,8 @@ export default {
       shuz: [this.$t('projectreport'),this.$t('projectTaskReport'),this.$t('projectcoststatement'),
       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('statisticsofstafffillingintimerate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
+      this.$t('ren-yuan-yue-du-gong-shi-biao')],
       ins: 10000,
       user: JSON.parse(sessionStorage.user),
       overTimeList: [], // 项目加班情况统计列表
@@ -952,7 +981,10 @@ export default {
       outputValueTitle: [],
 
       timelyDetailList: [],
-      timelyDetailDialog: false
+      timelyDetailDialog: false,
+
+      monthlyPersonnelList: [],
+      monthPersonnel: ''
     };
   },
   computed: {},
@@ -974,6 +1006,12 @@ export default {
     this.getcustomerList()
     this.getcusProjectList()
     this.authorityToJudge()
+
+    var myDate = new Date();
+    let year = myDate.getFullYear();
+    let month = +myDate.getMonth() + 1
+    let yue = month >= 10 ? yue = month : yue = '0' + month
+    this.monthPersonnel = year + '-' + yue
   },
   filters: {
       
@@ -1006,7 +1044,9 @@ export default {
       if(this.permissions.reportTimely || this.permissions.reportAllTimely) {this.ssl(9);this.defaultActive = '1-10';return} else
       if(this.permissions.reportAllGroup || this.permissions.reportGroup) {this.ssl(12);this.defaultActive = '1-13';return} else
       if(this.permissions.reportAuditRate) {this.ssl(10);this.defaultActive = '1-11';return} else 
-      if(this.permissions.reportPersonnel || this.permissions.reportResponsible) {this.ssl(11);this.defaultActive = '1-12';return}{this.allWrong = false}
+      if(this.permissions.reportPersonnel || this.permissions.reportResponsible) {this.ssl(11);this.defaultActive = '1-12';return}
+      if(this.permissions.reportMonthlyPersonnel || this.permissions.reportResponsiblePersonnel) {this.ssl(14);this.defaultActive = '1-13';return}
+      {this.allWrong = false}
     },
     rowspan(spanArr,position,spanName){
       this.list1.forEach((item,index) => {
@@ -1235,6 +1275,8 @@ export default {
                     this.getGroupWorktimeAll()
                 }else if(this.ins == 13){
                   this.getOutputValueList()
+                } else if(this.ins == 14) {
+                  this.getMonthlyPersonnel()
                 }
             },
       exportExcel() {
@@ -1317,6 +1359,12 @@ export default {
         }else if(this.ins == 13){
           fName = this.$t('projectcostbaselinetable') + '.xls'
           url += "/exportProjectBaseCost"
+        } else if(this.ins == 14) {
+          fName = this.$t('ren-yuan-yue-du-gong-shi-biao') + '.xls'
+          url += "/project/exportEmpMonthHours"
+          sl.userId= this.userId,
+          sl.departmentId = this.departmentIdArray.length > 0 ? this.departmentIdArray[this.departmentIdArray.length - 1] : '',
+          sl.month = this.monthPersonnel + '-01'
         }
           this.http.post(url, sl,
             res => {
@@ -1487,6 +1535,36 @@ export default {
         })
       })
     },
+    // 人员月度工时表
+    getMonthlyPersonnel() {
+      let parameter = {
+        pageIndex: this.page,
+        pageSize: this.size,
+        userId: this.userId,
+        departmentId: this.departmentIdArray.length > 0 ? this.departmentIdArray[this.departmentIdArray.length - 1] : '',
+        // departmentId: '',
+        month: this.monthPersonnel + '-01'
+      }
+      this.listLoading = true
+      this.http.post('/project/getEmpMonthHours',parameter,
+      res => {
+      this.listLoading = false
+        if(res.code == 'ok'){
+          this.monthlyPersonnelList = res.data.result
+        }else {
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          })
+        }
+      },err => {
+        this.listLoading = false
+        this.$message({
+          message: err,
+          type: 'error'
+        })
+      })
+    },
     overTime() {
       this.listLoading = true;
       var obj = {