Lijy 4 giorni fa
parent
commit
baf3de282e

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

@@ -117,6 +117,7 @@ const StringUtil = {
         reportMonthlyFinancialWorkSchedule: false, // 月度财务工时表 //
         reportAllTimelyTaskHours: false,  // 全部项目任务工时填报及时表 //
         reportRartTimelyTaskHours: false, // 部分项目任务工时填报及时表 //
+        reportOnProductionAndManufacturingCosts: false, // 生产制造成本表 //
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -312,6 +313,7 @@ const StringUtil = {
         arr[i] == '部分项目任务工时填报及时表' ? obj.reportRartTimelyTaskHours = true : ''
 
         arr[i] == '隐藏工时数' ? obj.reportHideWorkingHours = true : ''
+        arr[i] == '生产制造成本表' ? obj.reportOnProductionAndManufacturingCosts = true : ''
     }
     return obj
   }

+ 53 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -53,6 +53,7 @@
                   <el-menu-item index="1-31" v-if="permissions.reportFTEPlanAll || permissions.reportFTEPlanPart" @click="ssl(30)"><p>FTE计划报表</p></el-menu-item>
                   <el-menu-item index="1-32" v-if="permissions.reportMonthlyFinancialWorkSchedule" @click="ssl(31)"><p>月度财务工时表</p></el-menu-item>
                   <el-menu-item index="1-33" v-if="permissions.reportAllTimelyTaskHours || permissions.reportRartTimelyTaskHours" @click="ssl(32)"><p>任务工时填报及时表</p></el-menu-item>
+                  <el-menu-item index="1-34" v-if="permissions.reportOnProductionAndManufacturingCosts" @click="ssl(33)"><p>生产制造成本报表</p></el-menu-item>
                 </el-submenu>
               </el-menu>
           </el-col>
@@ -1694,9 +1695,27 @@
               <el-table-column prop="averageLeavePercentage" align="center" label="总填报及时率(含请假)"></el-table-column>
             </el-table>
           </template>
+
+          <!-- 生产制造成本报表 -->
+          <template v-if="ins == 33">
+            <el-table key="33" border :data="manufacturingCost" highlight-current-row v-loading="manufacturingCostLoading" :height="+tableHeight + 50" style="width: 100%;" :max-height="+tableHeight + 50">
+              <el-table-column prop="projectCode" align="center" width="200" label="项目编号"></el-table-column>
+              <el-table-column prop="projectName" align="center" width="300" label="项目名称"></el-table-column>
+              <el-table-column prop="userName" align="center" width="160" label="人员"></el-table-column>
+              <el-table-column prop="departmentName" align="center" width="220" label="部门"></el-table-column>
+              <el-table-column prop="totalTime" align="center" width="120" label="工时(h)"></el-table-column>
+              <el-table-column prop="produceTime" align="center" width="160" label="生产工时"></el-table-column>
+              <el-table-column prop="worksheetDeptName" align="center" width="160" label="工单部门"></el-table-column>
+              <el-table-column prop="produceCost" align="center" width="160" label="生产成本-工资"></el-table-column>
+              <el-table-column prop="projectTime" align="center" width="160" label="项目工时"></el-table-column>
+              <el-table-column prop="manufactureCost" align="center" width="160" label="制造成本-工资"></el-table-column>
+              <el-table-column prop="rdCost" align="center" width="160" label="研发支出-工资"></el-table-column>
+              <el-table-column prop="salesCost" align="center" width="160" label="销售费用-工资"></el-table-column>
+            </el-table>
+          </template>
           
         <!--工具条-->
-        <el-col :span="24" class="toolbar" v-if="ins != 6 && ins != 20 && ins != 21 && tabPosition==0 && tabsType == 'all' && ins != 31 && ins != 32">
+        <el-col :span="24" class="toolbar" v-if="ins != 6 && ins != 20 && ins != 21 && tabPosition==0 && tabsType == 'all' && ins != 31 && ins != 32 && ins != 33">
           <el-pagination
                 v-if="ins == 12"
                 @size-change="groupSizeChange"
@@ -2129,7 +2148,7 @@ export default {
         monthRange: [19, 30], // 月份区间筛选条件 (等于)
         staff: [6, 8, 9, 19, 11, 14, 18, 23, 25, 26,28, 30, 32], // 人员筛选条件 (等于)
         departments: [14, 15, 23,21,26,28,19, 30], // 部门筛选条件 (等于)
-        timePeriod: [5, 6, 8, 9, 10, 11, 12, 16, 17, 18, 20, 21, 22, 24, 25, 26,28], // 时间段筛选条件 (等于)
+        timePeriod: [5, 6, 8, 9, 10, 11, 12, 16, 17, 18, 20, 21, 22, 24, 25, 26,28,33], // 时间段筛选条件 (等于)
       },
       efficentList:[],
       groupNames: [],
@@ -2188,14 +2207,14 @@ export default {
       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('ziXiangMuGongShiChengBenBiao'), this.$t('renWuZhongQiBiao'), this.$t('fteBaoBiao'), this.$t('youXiaoGongShiShuaiBiao'), this.$t('xiangMuFenLeiGongShiZhanBiBiao'), this.$t('fenLeiGongShiMingXiBiao'),
-      this.$t('yuanGongXiangMuJinDuBiao'), this.$t('fenZuHaoYongJinDuBiao'), this.$t('xiangMuHaoYongJinDuBiao'), this.$t('yuanGongRenWuJinDuBiao'), this.$t('xiangMuYuGuGongShiBiao'),this.$t('yuanGongRenWuWanChengQingKuangBiao'), this.$t('taskPlanCostReport'), 'FTE计划报表', '月度财务工时表', '任务工时填报及时表'],
+      this.$t('yuanGongXiangMuJinDuBiao'), this.$t('fenZuHaoYongJinDuBiao'), this.$t('xiangMuHaoYongJinDuBiao'), this.$t('yuanGongRenWuJinDuBiao'), this.$t('xiangMuYuGuGongShiBiao'),this.$t('yuanGongRenWuWanChengQingKuangBiao'), this.$t('taskPlanCostReport'), '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'), this.$t('ziXiangMuGongShiChengBenBiao'), this.$t('renWuZhongQiBiao'), this.$t('fteBaoBiao'),this.$t('youXiaoGongShiShuaiBiao'), this.$t('xiangMuFenLeiGongShiZhanBiBiao'), this.$t('fenLeiGongShiMingXiBiao'),
-      this.$t('yuanGongXiangMuJinDuBiao'), this.$t('fenZuHaoYongJinDuBiao'), this.$t('xiangMuHaoYongJinDuBiao'), this.$t('yuanGongRenWuJinDuBiao'), this.$t('xiangMuYuGuGongShiBiao'),this.$t('yuanGongRenWuWanChengQingKuangBiao'), this.$t('taskPlanCostReport'), 'FTE计划报表', '月度财务工时表', '任务工时填报及时表'],
+      this.$t('yuanGongXiangMuJinDuBiao'), this.$t('fenZuHaoYongJinDuBiao'), this.$t('xiangMuHaoYongJinDuBiao'), this.$t('yuanGongRenWuJinDuBiao'), this.$t('xiangMuYuGuGongShiBiao'),this.$t('yuanGongRenWuWanChengQingKuangBiao'), this.$t('taskPlanCostReport'), 'FTE计划报表', '月度财务工时表', '任务工时填报及时表', '生产制造成本报表'],
 
       ins: 10000,
       user: JSON.parse(sessionStorage.user),
@@ -2388,6 +2407,9 @@ export default {
       unallocatedPublicWorkingHoursVisable: false,
       unallocatedPublicWorkingHoursList: [],
       unallocatedPublicWorkingHoursLoading: false,
+
+      manufacturingCost: [],
+      manufacturingCostLoading: false,
     };
   },
   computed: {},
@@ -2889,7 +2911,7 @@ export default {
                 this.getGroupWorktimeAll()
             },
             getList(e) {
-              let noUserList = [16, 17, 18, 19, 20, 21, 22, 24, 25, 26,27,29,30,31,32]
+              let noUserList = [16, 17, 18, 19, 20, 21, 22, 24, 25, 26,27,29,30,31,32,33]
               if(this.ins == 24) {
                 if(this.tabsType == 'all') {
                   this.rangeDatas = []
@@ -2995,6 +3017,9 @@ export default {
                 if (this.ins == 32) {
                   this.getTimelyReportingOfTaskHours();
                 }
+                if (this.ins == 33) {
+                  this.getManufacturingCost();
+                }
             },
       exportExcel() {
         var url = "/project";
@@ -3256,6 +3281,12 @@ export default {
             '按任务查看': 0,
             '按人员查看': 1,
           }[this.timelyTaskHoursRadio]
+        } else if(this.ins == 33) {
+          fName = `生产制造成本报表.xlsx`
+          url = `/report/exportProduceTimeReport`
+          sl.projectId = this.proJuctId
+          sl.startDate = this.rangeDatas[0]
+          sl.endDate = this.rangeDatas[1]
         }
         this.exportReportLoading = true
           this.http.post(url, sl,
@@ -4490,6 +4521,9 @@ export default {
       if(this.ins == 29) {
         this.getTaskPlanAndRealCost()
       }
+      if(this.ins == 33) {
+        this.getManufacturingCost()
+      }
     },
     getTaskPlanAndRealCost() {
       this.listLoading = true;
@@ -5287,6 +5321,20 @@ export default {
         this.timelyReportingOfTaskHoursLoading = false
       })
     },
+
+    // 生产制造成本表
+    getManufacturingCost() {
+      let sl = {}
+      sl.projectId = this.proJuctId
+      sl.startDate = this.rangeDatas[0]
+      sl.endDate = this.rangeDatas[1]
+      this.manufacturingCostLoading = true
+      this.postData(`/report/getProduceTimeReport`, { ...sl }).then(res => { 
+        this.manufacturingCost = res.data || []
+      }).finally(() => {
+        this.manufacturingCostLoading = false
+      })
+    },
     
     // 任务工时填报及时表开始合并
     timelyFormForFillingInTaskHoursSpanMethod({ row, column, rowIndex }) {