浏览代码

1. 工时成本统计点击项目后的柱状图增加人天单位的显示
2. 工时项目报告审核中支持fanwei考勤显示

QuYueTing 2 月之前
父节点
当前提交
a82a2de029

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -2255,7 +2255,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     for (Map map : nameList) {
                         String itemUid = (String)map.get("userId");
                         String dateStr = (String)map.get("dateStr");
-                        Optional<UserFvTime> first = timeList.stream().filter(time -> time.getUserId().equals(itemUid) && dtf.format(time.getWorkDate()).equals(dateStr)).findFirst();
+                        Optional<UserFvTime> first = timeList.stream().filter(time -> itemUid.equals(time.getUserId()) && dtf.format(time.getWorkDate()).equals(dateStr)).findFirst();
                         if (first.isPresent()) {
                             double wh = first.get().getWorkHours();
                             //赋值打卡时长

+ 7 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/detail.vue

@@ -225,7 +225,13 @@
                             normal: {
                                 show: true,
                                 position: 'top',
-                                formatter: `{c} ${this.yAxisValue == 0 ? '元' : '小时'}`,
+                                // formatter: `{c} ${this.yAxisValue == 0 ? '元' : '小时'}`,
+                                formatter: function (params) {
+                                    var value = params.value.toFixed(1);
+                                    const totalValue = _this.yAxisValue == 0 ? value + '元' : value + 'h';
+                                    const dayValue = _this.yAxisValue == 0 ? 0 : (value/_this.user.timeType.allday).toFixed(1);
+                                    return `${totalValue}${_this.yAxisValue == 0?'':('/'+dayValue+'人天')}`;
+                                }
                             }
                         }
                     }]

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/dailyReportReview.vue

@@ -235,7 +235,7 @@
                       {{scope.row.reportTime | amounts}}
                   </template>
               </el-table-column>
-              <el-table-column prop="cardHours" :label="$t('workAttendance') + '(h)'" v-if="user.timeType.showCorpwxCardtime==1||user.timeType.showDdCardtime==1">
+              <el-table-column prop="cardHours" :label="$t('workAttendance') + '(h)'" v-if="user.timeType.showCorpwxCardtime==1||user.timeType.showDdCardtime==1 || user.timeType.syncFanwei==1">
                   <template slot-scope="scope">
                       <span :style="scope.row.cardHours != scope.row.reportTime?'color:red':''">{{scope.row.cardHours?scope.row.cardHours.toFixed(1):'-'}}</span>
                   </template>