浏览代码

2022.7.31 任务分组报表

ggooalice 2 年之前
父节点
当前提交
217c69aefe
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10 2
      fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

+ 10 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -350,7 +350,7 @@
             <el-table v-if="ins == 12" border :data="groupWorktimeList" key="12"
             highlight-current-row v-loading="listLoading" :height="tableHeight" 
              style="width: 100%;" ref="table">
-                <el-table-column label="按任务分组统计" header-align="center">
+                <el-table-column :label="'按任务分组统计(共' + groupListTotal.left + '条)'" header-align="center">
                   <el-table-column prop="leftgroupName" label="分组名称" min-width="100"></el-table-column>
                   <el-table-column prop="leftworkingTime" label="工时(h)" min-width="50" align="right" header-align="center">
                     <template slot-scope="scope">
@@ -359,7 +359,7 @@
                   </el-table-column>
                 </el-table-column>
                 <el-table-column width="2" class-name="dividingLine" label-class-name="dividingLine"></el-table-column>
-                <el-table-column label="按项目统计" header-align="center">
+                <el-table-column :label="'按项目统计(共' + groupListTotal.right + '条)'" header-align="center">
                   <el-table-column prop="rightprojectCode" label="项目编号" min-width="100"></el-table-column>
                   <el-table-column prop="rightprojectName" label="项目名称" min-width="100"></el-table-column>
                   <el-table-column prop="rightgroupName" label="分组名称" min-width="100"></el-table-column>
@@ -732,6 +732,10 @@ export default {
       personnelList: [], //'人员工时统计表'
       groupWorktimeList: [], //任务分组工时表
       groupWorktimeAll: [],
+      groupListTotal:{
+        left: 0,
+        right: 0
+      }
     };
   },
   computed: {},
@@ -1471,6 +1475,7 @@ export default {
       if(this.proJuctId){
         parameter.projectId = this.proJuctId
       }
+      this.groupListTotal.right = 0
       this.listLoading = true
       this.http.post('/project/getTimeCostByGroup',parameter,
         res => {
@@ -1478,6 +1483,7 @@ export default {
           if(res.code == 'ok'){
             this.groupWorktimeList = []
             let list = res.data.records
+            this.groupListTotal.right = res.code.total
             this.groupWorktimeAll.length > res.data.total ? this.total = this.groupWorktimeAll.length : this.total = res.data.total
             let forlength = 0
             if(this.groupWorktimeAll.length - this.size*(this.page-1) < list.length){
@@ -1518,6 +1524,7 @@ export default {
         pageIndex: 1,
         pageSize: 9999
       }
+      this.groupListTotal.left = 0
       this.http.post('/project/getTimeCostByGroup',parameter,
         res => {
           if(res.code == 'ok'){
@@ -1535,6 +1542,7 @@ export default {
                   this.groupWorktimeAll.push(allList[m])
                 }
               }
+              this.groupListTotal.left = this.groupWorktimeAll.length
           }else {
             this.$message({
               message: res.msg,