ソースを参照

增加一个表

Lijy 2 年 前
コミット
e21af40568

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

@@ -86,6 +86,8 @@ const StringUtil = {
         reportResponsibleDepartmentParticipation: false, // 负责部门参与项目情况表 //
         reportPhaseHours: false, // 全部分组阶段工时 // 
         reportStageWorkingTime: false, // 负责项目分组阶段工时 //
+        reportAllManhourCost: false, // 全部子项目工时成本 //
+        reportResponsibleManhourCost: false, // 负责项目子项目工时成本 //
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -220,7 +222,8 @@ const StringUtil = {
         arr[i] == '导入合同' ? obj.contractImport = true : ''
         arr[i] == '合同类型管理' ? obj.contractType = true : ''
         arr[i] == '审核合同' ? obj.contractAudit = true : ''
-
+        arr[i] == '全部子项目工时成本' ? obj.reportAllManhourCost = true : ''
+        arr[i] == '负责项目子项目工时成本' ? obj.reportResponsibleManhourCost = true : ''
     }
     return obj
   }

+ 61 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -37,6 +37,7 @@
                   <el-menu-item index="1-15" v-if="permissions.reportMonthlyPersonnel || permissions.reportResponsiblePersonnel" @click="ssl(14)"><p>{{ $t('ren-yuan-yue-du-gong-shi-biao') }}</p></el-menu-item>
                   <el-menu-item index="1-16" v-if="permissions.reportAllDepartmentParticipation || permissions.reportResponsibleDepartmentParticipation" @click="ssl(15)"><p>{{ $t('bumenchanyuqingkuang') }}</p></el-menu-item>
                   <el-menu-item index="1-17" v-if="permissions.reportPhaseHours || permissions.reportStageWorkingTime" @click="ssl(16)"><p>{{ $t('xiang-mu-ge-fen-zu-yu-jie-duan-gong-shi-biao') }}</p></el-menu-item>
+                  <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-12"><p @click="ssl(11)">人员工时统计表</p></el-menu-item> -->
                 </el-submenu>
               </el-menu>
@@ -70,7 +71,7 @@
           </el-select>
         </template>
         <!-- 时间段筛选 -->
-          <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 12 || ins == 5 || ins == 16">
+          <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 12 || ins == 5 || ins == 16 || ins == 17">
             <span>
               <span class="demonstration" style="color:#999;padding:0 10px">
                 {{ ins == 15 ? $t('xiang-mu-chuang-jian-shi-jian-duan') : $t('message.period') }}
@@ -85,7 +86,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 && ins != 15" 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 && ins != 17" 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>
@@ -799,6 +800,16 @@
                 </el-table-column>
             </el-table>
 
+            <!-- 子项目工时成本表 -->
+            <el-table v-if="ins == 17"  key="17" border :data="subprojectArr" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
+                <el-table-column align="center" prop="projectCode" label="父项目编号" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="projectName" label="父项目名称" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="subProjectCode" label="子项目编号" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="subProjectName" label="子项目名称" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="workingTime" label="子项目工时" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="cost" label="子项目成本" min-width="150"></el-table-column>
+            </el-table>
+
         <!--工具条-->
         <el-col :span="24" class="toolbar" v-if="ins != 6">
           <el-pagination
@@ -1066,13 +1077,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')],
+      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表'],
 
       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')],
+      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表'],
 
       ins: 10000,
       user: JSON.parse(sessionStorage.user),
@@ -1134,7 +1145,9 @@ export default {
       },
       exportLoading: false,
       groupingItemsArr: [],
-      groupingItemsArrTitle: []
+      groupingItemsArrTitle: [],
+
+      subprojectArr: []
     };
   },
   computed: {},
@@ -1223,6 +1236,7 @@ export default {
       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}
       if(this.permissions.reportPhaseHours || this.permissions.reportStageWorkingTime) {this.ssl(16);this.defaultActive = '1-17';return}
+      if(this.permissions.reportAllManhourCost || this.permissions.reportResponsibleManhourCost) {this.ssl(17);this.defaultActive = '1-18';return}
       {this.allWrong = false}
     },
     rowspan(spanArr,position,spanName){
@@ -1464,8 +1478,10 @@ export default {
                   this.getDepartmentsInvolved()
                 } else if(this.ins == 16) {
                   this.groupingItems()
+                } else if(this.ins == 17) {
+                  this.getAubprojectArr()
                 }
-                if(this.ins != 16) {
+                if(this.ins != 16 && this.ins != 17) {
                   this.getUserList()
                 }
             },
@@ -1580,6 +1596,11 @@ export default {
           sl.startDate = this.rangeDatas[0]
           sl.endDate = this.rangeDatas[1]
           sl.projectId = this.proJuctId
+        } else if(this.ins == 17) {
+          fName = '子项目工时成本表' + '.xls'
+          url += "/exportSubProjectTimeCost"
+          sl.startDate = this.rangeDatas[0]
+          sl.endDate = this.rangeDatas[1]
         }
           this.http.post(url, sl,
             res => {
@@ -1882,6 +1903,37 @@ export default {
             });
         });
     },
+    // 子项目工时成本表
+    getAubprojectArr() {
+      // this.total = 0
+      this.listLoading = true
+      this.http.post('/project/getSubProjectTimeCost', {
+         startDate: this.rangeDatas[0],
+         endDate: this.rangeDatas[1],
+         projectId: this.proJuctId,
+         pageIndex: this.page,
+         pageSize: this.size,
+      },
+        res => {
+            this.listLoading = false
+            if (res.code == "ok") {
+                this.subprojectArr = res.data.record
+                this.total = res.data.total
+            } else {
+                this.listLoading = false
+                this.$message({
+                  message: res.msg,
+                  type: "error"
+                });
+            }
+        },
+        error => {
+            this.$message({
+                message: error,
+                type: "error"
+            });
+        });
+    },
     overTime() {
       this.listLoading = true;
       var obj = {
@@ -2442,6 +2494,9 @@ export default {
       if(this.ins == 5) {
         this.getProjectStages()
       }
+      if(this.ins == 17) {
+        this.getAubprojectArr()
+      }
     },
     // 日期
     getCurrentRangeTime() {