Bladeren bron

Merge remote-tracking branch 'origin/master'

yusm 2 weken geleden
bovenliggende
commit
31aff7ab63
14 gewijzigde bestanden met toevoegingen van 200 en 43 verwijderingen
  1. 5 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ContractBonusDetailController.java
  2. 32 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ContractBonusSummaryController.java
  3. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ContractBonusDetailMapper.java
  4. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ContractBonusDetailService.java
  5. 4 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ContractBonusSummaryService.java
  6. 5 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractBonusDetailServiceImpl.java
  7. 76 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractBonusSummaryServiceImpl.java
  8. 10 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  9. 3 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml
  10. 12 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ContractBonusDetailMapper.xml
  11. 3 0
      fhKeeper/formulahousekeeper/timesheet/src/permissions.js
  12. 21 17
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  13. 12 4
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue
  14. 13 6
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/view/index.vue

+ 5 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ContractBonusDetailController.java

@@ -3,6 +3,7 @@ package com.management.platform.controller;
 import com.management.platform.service.ContractBonusDetailService;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
+import com.sun.org.apache.xpath.internal.operations.Bool;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -38,10 +39,10 @@ public class ContractBonusDetailController {
     /**获取合同主体奖金*/
     @PostMapping("/getContractBonus")
     public HttpRespMsg getContractBonus(@RequestParam(value = "year")Integer year
-            , HttpServletRequest request) {
+            , Boolean isNegative,String bonusType, HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
-            httpRespMsg = contractBonusDetailService.getContractBonus(year,request);
+            httpRespMsg = contractBonusDetailService.getContractBonus(year,isNegative, bonusType,request);
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -49,10 +50,9 @@ public class ContractBonusDetailController {
     }
 
     @PostMapping("/exportContractBonus")
-    public void exportContractBonus(@RequestParam(value = "year")Integer year
-            , HttpServletRequest request, HttpServletResponse response) {
+    public void exportContractBonus(@RequestParam(value = "year")Integer year, Boolean isNegative,String bonusType, HttpServletRequest request, HttpServletResponse response) {
         try {
-           contractBonusDetailService.exportContractBonus(year,request,response);
+           contractBonusDetailService.exportContractBonus(year,isNegative, bonusType,request,response);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 32 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ContractBonusSummaryController.java

@@ -30,6 +30,26 @@ public class ContractBonusSummaryController {
         return httpRespMsg;
     }
 
+
+    /**
+     * 获取上传的正数奖金分摊列表,按年份和奖金类型查询
+     * @param year
+     * @param bonusType
+     * @param request
+     * @return
+     */
+    @PostMapping("/getBonusSummaryByYear")
+    public HttpRespMsg getBonusSummaryByYear(@RequestParam(value = "year")String year, String bonusType, HttpServletRequest request){
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        try {
+            httpRespMsg = contractBonusSummaryService.getBonusSummaryByYear(year,bonusType, request);
+        } catch (Exception e) {
+            e.printStackTrace();
+            httpRespMsg.setError(MessageUtils.message("other.error"));
+        }
+        return httpRespMsg;
+    }
+
     /**删除奖金概要数据【级联】*/
     @PostMapping("/deleteBonusSummary")
     public HttpRespMsg deleteBonusSummary(String ids, HttpServletRequest request){
@@ -43,4 +63,16 @@ public class ContractBonusSummaryController {
         return httpRespMsg;
     }
 
+    @PostMapping("/generateNegativeContractBonus")
+    public HttpRespMsg generateNegativeContractBonus(String ids, HttpServletRequest request){
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        try {
+            httpRespMsg = contractBonusSummaryService.generateNegativeContractBonus(ids,request);
+        } catch (Exception e) {
+            e.printStackTrace();
+            httpRespMsg.setError(MessageUtils.message("other.error"));
+        }
+        return httpRespMsg;
+    }
+
 }

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ContractBonusDetailMapper.java

@@ -11,7 +11,7 @@ import java.util.List;
 public interface ContractBonusDetailMapper extends BaseMapper<ContractBonusDetail> {
     void batchInsert(@Param("toAddList") List<ContractBonusDetail> toAddBonusDetailList);
 
-    List<ProjectContractBonusExcelHead> getExportContractProjectBonusForSpecial(Integer year, Integer companyId);
+    List<ProjectContractBonusExcelHead> getExportContractProjectBonusForSpecial(Integer year, Integer companyId, Boolean isNegative, String bonusType);
 
-    List<ContractBonusDetailVO> getExportContractProjectBonusForCommon(@Param("companyId") Integer companyId, @Param("year") Integer year);
+    List<ContractBonusDetailVO> getExportContractProjectBonusForCommon(@Param("companyId") Integer companyId, @Param("year") Integer year, Boolean isNegative, String bonusType);
 }

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ContractBonusDetailService.java

@@ -11,7 +11,7 @@ import javax.servlet.http.HttpServletResponse;
 public interface ContractBonusDetailService extends IService<ContractBonusDetail> {
     HttpRespMsg transTemplateData(String startYM, String endYM, String bonusType, MultipartFile file, HttpServletRequest request);
 
-    HttpRespMsg getContractBonus(Integer year, HttpServletRequest request);
+    HttpRespMsg getContractBonus(Integer year, Boolean isNegative,String bonusType, HttpServletRequest request);
 
-    void exportContractBonus(Integer year, HttpServletRequest request, HttpServletResponse response);
+    void exportContractBonus(Integer year, Boolean isNegative,String bonusType, HttpServletRequest request, HttpServletResponse response);
 }

+ 4 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ContractBonusSummaryService.java

@@ -10,4 +10,8 @@ public interface ContractBonusSummaryService extends IService<ContractBonusSumma
     HttpRespMsg getBonusSummary(String ym, HttpServletRequest request);
 
     HttpRespMsg deleteBonusSummary(String ids, HttpServletRequest request);
+
+    HttpRespMsg generateNegativeContractBonus(String ids, HttpServletRequest request);
+
+    HttpRespMsg getBonusSummaryByYear(String year, String bonusType, HttpServletRequest request);
 }

+ 5 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractBonusDetailServiceImpl.java

@@ -445,19 +445,19 @@ public class ContractBonusDetailServiceImpl extends ServiceImpl<ContractBonusDet
     }
 
     @Override
-    public HttpRespMsg getContractBonus(Integer year, HttpServletRequest request) {
+    public HttpRespMsg getContractBonus(Integer year, Boolean isNegative,String bonusType, HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("TOKEN"));
         if(null ==user){
             httpRespMsg.setError("登录凭证有误,请联系管理员");
         }
-        List<ProjectContractBonusExcelHead> contractProjectBonusList=contractBonusDetailMapper.getExportContractProjectBonusForSpecial(year,user.getCompanyId());
+        List<ProjectContractBonusExcelHead> contractProjectBonusList=contractBonusDetailMapper.getExportContractProjectBonusForSpecial(year,user.getCompanyId(),null, null);
         httpRespMsg.setData(contractProjectBonusList);
         return httpRespMsg;
     }
 
     @Override
-    public void exportContractBonus(Integer year, HttpServletRequest request, HttpServletResponse response) {
+    public void exportContractBonus(Integer year, Boolean isNegative,String bonusType,HttpServletRequest request, HttpServletResponse response) {
         User user = userMapper.selectById(request.getHeader("TOKEN"));
         if(null ==user){
             response.setContentType("application/json;charset=UTF-8");
@@ -477,7 +477,7 @@ public class ContractBonusDetailServiceImpl extends ServiceImpl<ContractBonusDet
         response.setContentType("application/vnd.ms-excel;chartset=utf-8");
         response.setHeader("Content-Disposition", "attachment;filename=" + null==fileName?"file":fileName);
         if(7737 == user.getCompanyId()){
-            List<ProjectContractBonusExcelHead> dataList=contractBonusDetailMapper.getExportContractProjectBonusForSpecial(year,user.getCompanyId());
+            List<ProjectContractBonusExcelHead> dataList=contractBonusDetailMapper.getExportContractProjectBonusForSpecial(year,user.getCompanyId(), isNegative,bonusType);
             try (ServletOutputStream outputStream = response.getOutputStream()){
                 EasyExcel.write(outputStream, ProjectContractBonusExcelHead.class)
                         .excelType(ExcelTypeEnum.XLSX)
@@ -513,7 +513,7 @@ public class ContractBonusDetailServiceImpl extends ServiceImpl<ContractBonusDet
             headList.add("年月");
             allDatas.add(headList);
 
-            List<ContractBonusDetailVO> contractBonusDetails = contractBonusDetailMapper.getExportContractProjectBonusForCommon(user.getCompanyId(),year);
+            List<ContractBonusDetailVO> contractBonusDetails = contractBonusDetailMapper.getExportContractProjectBonusForCommon(user.getCompanyId(),year, isNegative,bonusType);
             for (ContractBonusDetailVO detailVO : contractBonusDetails) {
                 List<String> rowData = new ArrayList<>();
                 if(checkExt1Exist){

+ 76 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractBonusSummaryServiceImpl.java

@@ -11,12 +11,18 @@ import com.management.platform.mapper.ContractBonusSummaryMapper;
 import com.management.platform.mapper.UserMapper;
 import com.management.platform.service.ContractBonusSummaryService;
 import com.management.platform.util.HttpRespMsg;
+import com.management.platform.util.ListUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -65,7 +71,77 @@ public class ContractBonusSummaryServiceImpl extends ServiceImpl<ContractBonusSu
             }
         }
 
+        return httpRespMsg;
+    }
+
+    @Override
+    public HttpRespMsg generateNegativeContractBonus(String ids, HttpServletRequest request) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        if(StringUtils.isBlank(ids)){
+            httpRespMsg.setError("id不能为空");
+            return httpRespMsg;
+        }
+        List<Integer> idList = ListUtil.convertIntegerIdsArrayToList(ids);
+        List<ContractBonusSummary> list = contractBonusSummaryMapper.selectBatchIds(idList);
+        for (ContractBonusSummary contractBonusSummary : list) {
+            //查找是否已经存在生成的负数核销数据
+            ContractBonusSummary existSummary = contractBonusSummaryMapper.selectOne(new LambdaQueryWrapper<ContractBonusSummary>()
+                    .eq(ContractBonusSummary::getYear,contractBonusSummary.getYear())
+                    .eq(ContractBonusSummary::getBonusType,contractBonusSummary.getBonusType())
+                    .eq(ContractBonusSummary::getIsNegative,true)
+                    .eq(ContractBonusSummary::getCompanyId,contractBonusSummary.getCompanyId())
+            );
+            if(null != existSummary){
+                BigDecimal negativeValue = contractBonusSummary.getTotalBonusValue().multiply(new BigDecimal(-1));
+                if (negativeValue.compareTo(existSummary.getTotalBonusValue()) != 0) {
+                    //金额发生变动,需要更新
+                    existSummary.setTotalBonusValue(contractBonusSummary.getTotalBonusValue().multiply(new BigDecimal(-1)));
+                    existSummary.setCreateTime(new Date());
+                    contractBonusSummaryMapper.updateById(existSummary);
+                    //更新核销明细,删除后重新生成
+                    contractBonusDetailMapper.delete(new LambdaQueryWrapper<ContractBonusDetail>().eq(ContractBonusDetail::getYear,contractBonusSummary.getYear())
+                            .eq(ContractBonusDetail::getBonusType,contractBonusSummary.getBonusType())
+                                    .between(ContractBonusDetail::getYm,contractBonusSummary.getStartYM(),contractBonusSummary.getEndYM())
+                                    .eq(ContractBonusDetail::getIsNagative,true)
+                            .eq(ContractBonusDetail::getCompanyId,contractBonusSummary.getCompanyId()));
+                    insertContractNegativeDetail(contractBonusSummary);
+                }
+            } else {
+                contractBonusSummary.setId(null);
+                contractBonusSummary.setIsNegative(true);
+                contractBonusSummary.setTotalBonusValue(contractBonusSummary.getTotalBonusValue().multiply(new BigDecimal(-1)));
+                contractBonusSummary.setCreateTime(null);
+                contractBonusSummaryMapper.insert(contractBonusSummary);
+                insertContractNegativeDetail(contractBonusSummary);
+            }
+        }
+        return httpRespMsg;
+    }
+
+    //生成负数核销详情
+    private void insertContractNegativeDetail(ContractBonusSummary contractBonusSummary) {
+        //查询出正数的奖金记录
+        List<ContractBonusDetail> contractBonusDetailList = contractBonusDetailMapper.selectList(new LambdaQueryWrapper<ContractBonusDetail>()
+                .eq(ContractBonusDetail::getYear,contractBonusSummary.getYear())
+                .eq(ContractBonusDetail::getBonusType,contractBonusSummary.getBonusType())
+                .between(ContractBonusDetail::getYm,contractBonusSummary.getStartYM(),contractBonusSummary.getEndYM())
+                .eq(ContractBonusDetail::getIsNagative,false)
+                .eq(ContractBonusDetail::getCompanyId,contractBonusSummary.getCompanyId()));
+        for (ContractBonusDetail contractBonusDetail : contractBonusDetailList) {
+            contractBonusDetail.setId(null);
+            contractBonusDetail.setIsNagative(true);
+            contractBonusDetailMapper.insert(contractBonusDetail);
+        }
+    }
 
+    @Override
+    public HttpRespMsg getBonusSummaryByYear(String year, String bonusType, HttpServletRequest request) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        User user = userMapper.selectById(request.getHeader("TOKEN"));
+        List<ContractBonusSummary> resList =  contractBonusSummaryMapper.selectList(
+                new LambdaQueryWrapper<ContractBonusSummary>().eq(ContractBonusSummary::getYear,year).eq(ContractBonusSummary::getBonusType,bonusType)
+                        .eq(ContractBonusSummary::getCompanyId,user.getCompanyId()).eq(ContractBonusSummary::getIsNegative,false));
+        httpRespMsg.setData(resList);
         return httpRespMsg;
     }
 }

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

@@ -10541,8 +10541,16 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         }
         List<User> needRangeUserList=new ArrayList<>();
         for (User u : allRangeUserList) {
-            if(u.getInactiveDate()==null||(u.getInactiveDate()!=null&&u.getInactiveDate().isAfter(LocalDate.parse(startDate))||u.getIsActive()==1)){
-                needRangeUserList.add(u);
+            if(u.getIsActive()==0) {
+                //离职人员,判断离职的日期要在所选开始日期之后。才显示该员工
+                if (u.getInactiveDate() == null || u.getInactiveDate().isAfter(LocalDate.parse(startDate))) {
+                    needRangeUserList.add(u);
+                }
+            } else {
+                //在职员工,如果有设置在职日期,判断在职日期在所选结束日期之前,才显示该员工
+                if (u.getInductionDate() == null || u.getInductionDate().isBefore(LocalDate.parse(endDate))) {
+                    needRangeUserList.add(u);
+                }
             }
         }
         List<LocalDate> days = getDays(LocalDate.parse(startDate, df), LocalDate.parse(endDate, df));

+ 3 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml

@@ -18,6 +18,9 @@ spring:
     url: jdbc:mysql://1.94.62.58:17089/man_dev?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: P011430@Huoshi*
+#    url: jdbc:mysql://47.100.37.243:7644/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
+#    username: root
+#    password: Ziyu20141026!@@
     hikari:
       maximum-pool-size: 60
       minimum-idle: 10

+ 12 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ContractBonusDetailMapper.xml

@@ -64,6 +64,12 @@
                          select contract,bonus_type,project_id,sum(bonus_value) as bonus
                          from contract_bonus_detail
                          where year = #{year} and company_id = #{companyId}
+                         <if test="isNegative != null">
+                             and is_negative = #{isNegative}
+                         </if>
+                         <if test="bonusType != null">
+                             and bonus_type = #{bonusType}
+                         </if>
                          group by contract,bonus_type,project_id
                      )tmp2 group by contract, project_id
             )tmp1
@@ -79,6 +85,12 @@
                  left join user u on cbd.user_id = u.id
                  left join project p on cbd.project_id = p.id
         where cbd.company_id = #{companyId} and cbd.year = #{year}
+        <if test="isNegative != null">
+            and is_negative = #{isNegative}
+        </if>
+        <if test="bonusType != null">
+            and bonus_type = #{bonusType}
+        </if>
     </select>
 
 </mapper>

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

@@ -55,6 +55,7 @@ const StringUtil = {
         reportBatch: false, //批量填报
         reportExport: false, //日报导出
         reportPush: false, //手动推送工时
+        reportHideWorkingHours: false, // 隐藏工时数 //
 
         // 财务核算成本 
         financialCustom: false, // 自定义薪资项 // 
@@ -309,6 +310,8 @@ const StringUtil = {
         arr[i] == '查看他人审核文件' ? obj.viewFilesReviewedByOthers = true : ''
         arr[i] == '全部项目任务工时填报及时表' ? obj.reportAllTimelyTaskHours = true : ''
         arr[i] == '部分项目任务工时填报及时表' ? obj.reportRartTimelyTaskHours = true : ''
+
+        arr[i] == '隐藏工时数' ? obj.reportHideWorkingHours = true : ''
     }
     return obj
   }

File diff suppressed because it is too large
+ 21 - 17
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue


+ 12 - 4
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -370,7 +370,7 @@
 
                     <!-- 常规选择时间的方式 -->
                     <!-- 全天上下午模式 -->
-                    <div v-if="reportTimeType.multiWorktime == 0">
+                    <div v-if="reportTimeType.multiWorktime == 0 && (hideWorkingHours && item.canEdit)">
                         <van-field v-if="reportTimeType.type < 2" readonly clickable :disabled="!item.canEdit"
                             :value="reportTimeType.type == 0 ? item.label : (parseFloat(item.workingTime).toFixed(1) + 'h')"
                             label="工作时长" placeholder="请选择工作时长(小时)" @click="clickTimePicker(index, item)"
@@ -428,7 +428,7 @@
                     </div>
 
                     <!-- 多个时间和工作事项的选择方式 -->
-                    <div v-if="reportTimeType.multiWorktime == 1">
+                    <div v-if="reportTimeType.multiWorktime == 1 && (hideWorkingHours && item.canEdit)">
                         <div v-for="(timeItem, tindex) in item.worktimeList" :key="tindex"
                             style="position:relative;border:#ccc 0.5px solid;margin:7px;">
                             <van-tag v-if="tindex > 0 && item.canEdit"
@@ -480,7 +480,7 @@
                     </div>
 
                     <div class="overtime"
-                        v-if="((user.timeType.fillOvertime || (isWeekend && user.timeType.lockWorktime != 1)) || (isCorpWX && canEdit))">
+                        v-if="((user.timeType.fillOvertime || (isWeekend && user.timeType.lockWorktime != 1)) || (isCorpWX && canEdit)) && (hideWorkingHours && item.canEdit)">
                         <div class="overTimeClas"
                             v-if="user.timeType.fillOvertime || (isWeekend && user.timeType.lockWorktime != 1)">
                             <van-checkbox :disabled="!item.canEdit" v-model="item.isOvertime"
@@ -752,7 +752,8 @@ export default {
 
             showAddMore: false,
             businessTripsArray: [],
-            doYouWantToDisplayTheWorkOrder: true
+            doYouWantToDisplayTheWorkOrder: true,
+            hideWorkingHours: false
         };
     },
 
@@ -3142,6 +3143,13 @@ export default {
 
         this.today = this.format(new Date(), 'yyyy-MM-dd')
         this.timeRange = []
+        const { functionList } = this.user
+        for (let i in functionList) {
+            if(functionList[i].name == '隐藏工时数') {
+                this.hideWorkingHours = true
+            }
+        }
+
         let i = 0.0; 
         while(true) {
             if (i < 48) {

+ 13 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/view/index.vue

@@ -69,7 +69,7 @@
                                 <span style="margin-right:20px;margin-left:5px;font-size:14px;">
                                     <span v-if="user.timeType.showCorpwxCardtime" :style="item.cardTime !=item.reportTime?'color:#ff0000;':''">考勤时长:{{item.cardTime | amounts}}h</span>
                                     总填报时长:
-                                    <span>{{ parseFloat(item.reportTime).toFixed(1) }}h</span>
+                                    <span>{{ hideWorkingHours ? '*' : parseFloat(item.reportTime).toFixed(1) }}h</span>
                                 </span>
                             </div>
                             <div v-if="user.timeType.enableNewWeeklyfill == 1 && item.summary != null" style="margin-left:20px;"
@@ -155,9 +155,9 @@
                                         <span v-if="item1.reportTimeType == 0" style="margin-right:10px;">{{
                                             fullDayTxt[item1.timeType] }}</span>
                                         <span v-if="item1.reportTimeType == 2" style="margin-right:10px;">{{ item1.startTime + '-' +
-                                            item1.endTime }}</span>{{ item1.time.toFixed(1) }}h
+                                            item1.endTime }}</span>{{ hideWorkingHours ? '*' : item1.time.toFixed(1) }}h
                                         <div class="button" v-if="item1.isOvertime == 1">加班<span v-if="item1.overtimeHours">{{
-                                            item1.overtimeHours.toFixed(1) }}h</span></div>
+                                            hideWorkingHours ? '*' : item1.overtimeHours.toFixed(1) }}h</span></div>
                                     </div>
                                     <div class="project_time" v-else>用时占比:
                                         {{ item1.progress }}%
@@ -167,9 +167,9 @@
 
                                 </div>
                                 <div v-if="item1.multiWorktime == 1">
-                                    <div>项目时长:<span style="margin-right:10px;">{{ item1.time.toFixed(1) }}h</span>
+                                    <div>项目时长:<span style="margin-right:10px;">{{ hideWorkingHours ? '*' : item1.time.toFixed(1) }}h</span>
                                         <div class="button" v-if="item1.isOvertime == 1">加班<span v-if="item1.overtimeHours">{{
-                                            item1.overtimeHours.toFixed(1) }}h</span></div>
+                                            hideWorkingHours ? '*' : item1.overtimeHours.toFixed(1) }}h</span></div>
                                     </div>
                                     <div style="position:relative;border:#ccc 0.5px solid;padding:3px;margin:5px 0px;"
                                         v-for="(timeItem, index) in item1.worktimeList" :key="index">
@@ -323,7 +323,8 @@ export default {
                 label: 'label'
             },
             reportsCompany: false,
-            reportsDept: false
+            reportsDept: false,
+            hideWorkingHours: false
         };
     },
     created() {
@@ -331,6 +332,9 @@ export default {
     filters:{
         // 过滤
         amounts(value) {
+            if(value == '*') {
+                return '*'
+            }
             if(value == NaN || value == undefined || value == 'undefined' || value == null || value == 'null') {
                 return 0
             }
@@ -577,6 +581,9 @@ export default {
             if (functionList[i].name == '查看本部门工时') {
                 this.查看本部门工时 = true
             }
+            if(functionList[i].name == '隐藏工时数') {
+                this.hideWorkingHours = true
+            }
         }
         this.getReport();
         this.getUsers()