瀏覽代碼

部门参与项目情况表完成

Lijy 2 年之前
父節點
當前提交
dea3371d17

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

@@ -1440,5 +1440,9 @@
   "chu-cha": "evection",
   "xuan-xiang-1": "Option 1",
   "xuan-xiang-2": "Option 2",
-  "zi-yuan-xu-qiu-dao-chu": "Exporting Resource Requirements"
+  "zi-yuan-xu-qiu-dao-chu": "Exporting Resource Requirements",
+  "bumenchanyuqingkuang": "Project information of the departments involved",
+  "can-yu-de-xiang-mu-de-shu-liang": "number of projects involved",
+  "can-yu-ren-ci": "Number of participants",
+  "chu-cha-de-tian-shu": "Days of business trip"
 }

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

@@ -1440,5 +1440,9 @@
   "xuan-xiang-1": "选项1",
   "xuan-xiang-2": "选项2",
   "zi-yuan-xu-qiu-dao-chu": "资源需求导出",
-  "chu-cha": "出差"
+  "chu-cha": "出差",
+  "bumenchanyuqingkuang": "部门参与项目情况表",
+  "can-yu-de-xiang-mu-de-shu-liang": "参与的项目的数量",
+  "can-yu-ren-ci": "参与人次",
+  "chu-cha-de-tian-shu": "出差的天数"
 }

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

@@ -72,6 +72,8 @@ const StringUtil = {
         reportOutputValue: false, // 负责项目成本基线表 //
         reportMonthlyPersonnel: false, // 全部人员月度工时表 //
         reportResponsiblePersonnel: false, // 负责部门月度工时表   //
+        reportAllDepartmentParticipation: false, // 全部部门参与项目情况表 //
+        reportResponsibleDepartmentParticipation: false, // 负责部门参与项目情况表 //
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -193,6 +195,8 @@ const StringUtil = {
         arr[i] == '删除出差' ? obj.awayOfficeDelete = true : ''
         arr[i] == '全部人员月度工时表' ? obj.reportMonthlyPersonnel = true : ''
         arr[i] == '负责部门月度工时表' ? obj.reportResponsiblePersonnel = true : ''
+        arr[i] == '全部部门参与项目情况表' ? obj.reportAllDepartmentParticipation = true : ''
+        arr[i] == '负责部门参与项目情况表' ? obj.reportResponsibleDepartmentParticipation = true : ''
     }
 
     return obj

+ 69 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -35,6 +35,7 @@
                   <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-15" 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-16" v-if="permissions.reportAllDepartmentParticipation || permissions.reportResponsibleDepartmentParticipation"><p @click="ssl(15)">{{ $t('bumenchanyuqingkuang') }}</p></el-menu-item>
                   <!-- <el-menu-item index="1-12"><p @click="ssl(11)">人员工时统计表</p></el-menu-item> -->
                 </el-submenu>
               </el-menu>
@@ -68,9 +69,11 @@
           </el-select>
         </template>
         <!-- 时间段筛选 -->
-          <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 12">
-            <span class="demonstration" style="color:#999;padding:0 10px">{{ $t('message.period') }}</span>
-            <el-date-picker v-model="rangeDatas" type="daterange" value-format="yyyy-MM-dd" :placeholder="$t('selectstartdate')" @change="picks()" :range-separator="$t('other.to')" :start-placeholder="$t('time.startDate')" :end-placeholder="$t('time.endDate')" style="width:300px" :clearable="false" size="small"> </el-date-picker>
+          <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 12 || ins == 15">
+            <span>
+              <span class="demonstration" style="color:#999;padding:0 10px">{{ $t('message.period') }}</span>
+              <el-date-picker v-model="rangeDatas" type="daterange" value-format="yyyy-MM-dd" :placeholder="$t('selectstartdate')" @change="picks()" :range-separator="$t('other.to')" :start-placeholder="$t('time.startDate')" :end-placeholder="$t('time.endDate')" style="width:300px" :clearable="ins == 15" size="small"> </el-date-picker>
+            </span>
           </template>
 
         <!-- 按部门/项目筛选 -->
@@ -79,7 +82,7 @@
           <el-option label="查看部门审核人" :value="0"></el-option>
         </el-select> -->
         <!-- 项目筛选 -->
-        <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-select v-if="ins != 4 && ins != 8 && ins != 9 && ins != 10 && ins != 11 && ins != 14 && ins != 15" 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>
@@ -89,13 +92,13 @@
         <el-date-picker v-if="ins == 14" value-format="yyyy-MM" v-model="monthPersonnel" type="month" :placeholder="$t('Selectmonth')" :clearable="false" @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) || (ins == 14)) && user.userNameNeedTranslate != 1" v-model="departmentIdArray" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"
+          <el-cascader v-if="(ins == 15 || (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) || (ins == 14)) && 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 == 15 || (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">
@@ -716,6 +719,15 @@
                   </template>
                 </el-table-column>
             </el-table>
+
+            <!-- 部门参与项目情况表 -->
+            <el-table v-if="ins == 15"  key="15" border :data="tableList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
+                <el-table-column align="center" prop="deptName" :label="$t('departmentname')" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="projectCount" :label="$t('can-yu-de-xiang-mu-de-shu-liang')" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="peopleCount" :label="$t('can-yu-ren-ci')" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="tripCount" :label="$t('chu-cha-de-tian-shu')" min-width="150"></el-table-column>
+            </el-table>
+
         <!--工具条-->
         <el-col :span="24" class="toolbar" v-if="ins != 6">
           <el-pagination
@@ -1008,7 +1020,9 @@ export default {
       timelyDetailDialog: false,
 
       monthlyPersonnelList: [],
-      monthPersonnel: ''
+      monthPersonnel: '',
+
+      tableList: []
     };
   },
   computed: {},
@@ -1063,7 +1077,7 @@ export default {
         if (rs < 0) {  
             rs = s.length;  
             s += '.';  
-        }  
+        }  15
         while (s.length <= rs + 1) {  
             s += '0';  
         }  
@@ -1087,6 +1101,7 @@ export default {
       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}
       if(this.permissions.reportMonthlyPersonnel || this.permissions.reportResponsiblePersonnel) {this.ssl(14);this.defaultActive = '1-15';return}
+      if(this.permissions.reportAllDepartmentParticipation || this.permissions.reportResponsibleDepartmentParticipation) {this.ssl(15);this.defaultActive = '1-16';return}
       {this.allWrong = false}
     },
     rowspan(spanArr,position,spanName){
@@ -1283,6 +1298,11 @@ export default {
                 this.getGroupWorktimeAll()
             },
             getList() {
+              if(this.ins == 15) {
+                this.rangeDatas = null
+              } else {
+                this.rangeDatas = this.getCurrentRangeTime()
+              }
                 if (this.ins == 0) {
                     this.getProjectList();
                 } else if (this.ins == 1) {
@@ -1318,6 +1338,8 @@ export default {
                   this.getOutputValueList()
                 } else if(this.ins == 14) {
                   this.getMonthlyPersonnel()
+                } else if(this.ins == 15) {
+                  this.getDepartmentsInvolved()
                 }
             },
       exportExcel() {
@@ -1407,6 +1429,12 @@ export default {
           sl.departmentId = this.departmentIdArray.length > 0 ? this.departmentIdArray[this.departmentIdArray.length - 1] : '',
           sl.month = this.monthPersonnel + '-01',
           sl.whether = this.whether
+        } else if(this.ins == 15) {
+          fName = this.$t('bumenchanyuqingkuang') + '.xls'
+          url += "/exportDeptPartInProjects"
+          sl.startDate= this.rangeDatas ? this.rangeDatas[0] : '',
+          sl.endDate = this.rangeDatas ? this.rangeDatas[1] : '',
+          sl.departmentId = this.departmentIdArray.length > 0 ? this.departmentIdArray[this.departmentIdArray.length - 1] : ''
         }
           this.http.post(url, sl,
             res => {
@@ -1609,6 +1637,36 @@ export default {
         })
       })
     },
+    // 部门参与项目情况表
+    getDepartmentsInvolved() {
+      let parameter = {
+        pageIndex: this.page,
+        pageSize: this.size,
+        startDate: this.rangeDatas ? this.rangeDatas[0] : '',
+        endDate: this.rangeDatas ? this.rangeDatas[1] : '',
+        departmentId: this.departmentIdArray.length > 0 ? this.departmentIdArray[this.departmentIdArray.length - 1] : '',
+      }
+      this.listLoading = true
+      this.http.post('/project/deptPartInProjects',parameter,
+      res => {
+      this.listLoading = false
+        if(res.code == 'ok'){
+          this.tableList = res.data.resultList
+          this.total = res.data.total
+        }else {
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          })
+        }
+      },err => {
+        this.listLoading = false
+        this.$message({
+          message: err,
+          type: 'error'
+        })
+      })
+    },
     overTime() {
       this.listLoading = true;
       var obj = {
@@ -2144,6 +2202,9 @@ export default {
         this.proJuctId = ''
         this.getList()
       }
+      if(this.ins == 15) {
+        this.getDepartmentsInvolved()
+      }
     },
     // 日期
     getCurrentRangeTime() {