Sfoglia il codice sorgente

针对赛元微电子,开放了日报审核,删除,导入记录修改时间的操作

seyason 1 anno fa
parent
commit
bde881d393

+ 10 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -1554,11 +1554,21 @@ public class ReportController {
         return reportService.batchApproveReport(ids, isDepartment, request,evaluate);
     }
 
+    @RequestMapping("/batchApproveByDate")
+    public HttpRespMsg batchApproveByDate(String startDate, String endDate, HttpServletRequest request) {
+        return reportService.batchApproveByDate(startDate, endDate, request);
+    }
+
     @RequestMapping("/batchDenyReport")
     public HttpRespMsg batchDenyReport(@RequestParam String ids, Integer isDepartment, String reason, HttpServletRequest request) {
         return reportService.batchDenyReport(ids, isDepartment, reason, request);
     }
 
+    @RequestMapping("/batchDelete")
+    public HttpRespMsg batchDelete(@RequestParam String userIds, String startDate, String endDate, HttpServletRequest request) {
+        return reportService.batchDelete(userIds,startDate, endDate, request);
+    }
+
     @RequestMapping("/getUserDailyWorkTime")
     public HttpRespMsg getUserDailyWorkTime(HttpServletRequest request, String startDate, String endDate) {
         return reportService.getUserDailyWorkTime(request, startDate, endDate);

+ 14 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportImportLogController.java

@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -48,5 +50,17 @@ public class ReportImportLogController {
         msg.data = map;
         return msg;
     }
+
+
+    @RequestMapping("/changeTime")
+    public HttpRespMsg changeTime(Integer id, String modLogDateTime) {
+        HttpRespMsg msg = new HttpRespMsg();
+        ReportImportLog reportImportLog = reportImportLogMapper.selectById(id);
+        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        LocalDateTime localDateTime = LocalDateTime.parse(modLogDateTime, dateTimeFormatter);
+        reportImportLog.setIndate(localDateTime);
+        reportImportLogMapper.updateById(reportImportLog);
+        return msg;
+    }
 }
 

+ 10 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCorpwxTimeController.java

@@ -478,13 +478,17 @@ public class UserCorpwxTimeController {
                     continue;
                 }
                 String username = row.getCell(2).getStringCellValue().trim();
-                String deptName = row.getCell(3).getStringCellValue().trim();
-                if (rowIndex == 0 && deptName.equals("部门")) {
-                    hasDept = true;
-                }
-                if(username.equals("员工")){
-                    continue;
+
+                if (rowIndex == 0) {
+                    String deptName = row.getCell(3).getStringCellValue().trim();
+                    if (deptName.equals("部门")) {
+                        hasDept = true;
+                    }
+                    if(username.equals("员工")){
+                        continue;
+                    }
                 }
+
                 if(!userNameList.contains(username)&&!username.equals("")){
                     userNameList.add(username);
                 }

+ 4 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -651,8 +651,8 @@ public class WeiXinCorpController {
                     org.json.JSONObject authUserJson = jsonObject.getJSONObject("AccountList");
                     String authUserId = authUserJson.getString("UserId");
                     System.out.println("authUserId="+authUserId);
-                    User oneUser = userMapper.selectOne(new QueryWrapper<User>().eq("corpwx_userid", authUserId));
-                    if (oneUser == null) {
+                    List<User> oneUserList = userMapper.selectList(new QueryWrapper<User>().eq("corpwx_userid", authUserId));
+                    if (oneUserList.size() == 0) {
                         //生成该用户
                         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectById(corpId);
                         if (wxCorpInfo != null && wxCorpInfo.getAuthMode() == 1) {//成员授权模式下,自动激活需要创建用户
@@ -689,6 +689,8 @@ public class WeiXinCorpController {
                                 sendCardMsg(authUserId);
                             }
                         }
+                    } else {
+                        System.err.println("该用户已存在,不需要创建:"+authUserId);
                     }
                 }
             }

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

@@ -116,4 +116,8 @@ public interface ReportService extends IService<Report> {
     HttpRespMsg getAIReport(HttpServletRequest request);
 
     HttpRespMsg getWeeklyReportData(String targetDate, HttpServletRequest request);
+
+    HttpRespMsg batchDelete(String userIds, String startDate, String endDate, HttpServletRequest request);
+
+    HttpRespMsg batchApproveByDate(String startDate, String endDate, HttpServletRequest request);
 }

+ 21 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java

@@ -599,6 +599,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                 headList.add(MessageUtils.message("entry.projectName"));
                 //headList.add("人员");
                 headList.add(MessageUtils.message("entry.personnel"));
+                headList.add("部门");
                 for (UserCustom userCustom : userCustoms) {
                     headList.add(userCustom.getName());
                 }
@@ -931,6 +932,8 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
             if (totalField3 != null) {
                 totalField3 = totalField3.setScale(2, BigDecimal.ROUND_HALF_UP);
             }
+            //查找所有部门
+            List<Department> allDepartments = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId));
             //按项目名称分组
             if (groupByCategory == 0) {
                 pList.forEach(p->{
@@ -952,6 +955,8 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     rowData.add(p.projectCode);
                     rowData.add(p.project);
                     rowData.add("项目合计");
+                    //部门空出来
+                    rowData.add("");
                     userCustoms.forEach(userCustom -> {rowData.add("");});
                     rowData.add(p.workingTime+"");
                     rowData.add(p.salary.toPlainString());
@@ -1009,6 +1014,13 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                             }else {
                                 membRowData.add(us.getName());
                             }
+                            //增加部门
+                            Optional<Department> findDept = allDepartments.stream().filter(dp -> dp.getDepartmentId().equals(us.getDepartmentId())).findFirst();
+                            if (findDept.isPresent()) {
+                                membRowData.add(findDept.get().getDepartmentName());
+                            } else {
+                                membRowData.add("");
+                            }
                             for (int i = 0; i < userCustoms.size(); i++) {
                                 switch (i){
                                     case 0:
@@ -1086,6 +1098,14 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                                     }else {
                                         membRowData.add(npu.getName());
                                     }
+
+                                    //增加部门
+                                    Optional<Department> first = allDepartments.stream().filter(dp -> dp.getDepartmentId().equals(us.getDepartmentId())).findFirst();
+                                    if (first.isPresent()) {
+                                        membRowData.add(first.get().getDepartmentName());
+                                    } else {
+                                        membRowData.add("");
+                                    }
                                     //自定义字段的显示
                                     for (int i = 0; i < userCustoms.size(); i++) {
                                         switch (i){
@@ -1219,6 +1239,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
             //sumRow.add("合计");
             sumRow.add(MessageUtils.message("entry.total"));
             if (groupByCategory == 0) {
+                sumRow.add("");
                 sumRow.add("");
                 sumRow.add("");
                 userCustoms.forEach(userCustom ->{sumRow.add("");});

+ 36 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -1307,6 +1307,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             List<SysRichFunction> functionDpartList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看负责部门");
             List<SysRichFunction> functionTimeList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看工时统计");
             List<SysRichFunction> functionCostList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看成本统计");
+            List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
             List<Integer> deptRelatedProjectIds = new ArrayList<>();
             List<Integer> manProjectIds = null;
             //判断查看权限
@@ -1367,6 +1368,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             BigDecimal totalMoneyCost = BigDecimal.valueOf(0);
             List<List<String>> allList=null ;
             List<String> sumRow = null;
+            List<UserCustom> userCustoms = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", companyId));
             if(type==0){
                 List<String> headList = new ArrayList<String>();
                 //headList.add("项目编号");
@@ -1379,6 +1381,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 headList.add(MessageUtils.message("entry.personnel"));
                 //headList.add("部门");
                 headList.add(MessageUtils.message("excel.department"));
+                for (UserCustom userCustom : userCustoms) {
+                    headList.add(userCustom.getName());
+                }
                 //hours:仅导出工时;cost:导出成本;hoursAndCost:导出成本和工时;
                 if ("hours".equals(exportContent) && functionTimeList.size()>0){
                     //headList.add("工时(h)");
@@ -1416,7 +1421,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     rowData.add((String)map.get("categoryName"));
                     rowData.add("");
                     rowData.add("");
-
+                    //针对项目合计行,自定义的字段要空出来
+                    for (UserCustom userCustom : userCustoms) {
+                        headList.add("");
+                    }
                     if ("hours".equals(exportContent) && functionTimeList.size()>0){
                         rowData.add(((Double)map.get("cost")).toString());
                     }else if ("cost".equals(exportContent) && functionCostList.size()>0){
@@ -1451,10 +1459,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             membRowData.add((String)map.get("projectCode"));
                             membRowData.add((String)map.get("project"));
                             membRowData.add((String)map.get("categoryName"));
+
                         } else {
                             membRowData.add("");
                             membRowData.add("");
                             membRowData.add("");
+
                         }
                         if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
                             membRowData.add((String)("$userName="+membMap.get("corpwxUserId")+"$"));
@@ -1467,7 +1477,27 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             membRowData.add((String)membMap.get("name"));
                             membRowData.add((String)membMap.get("departmentName"));
                         }
-
+                        String creatorId = (String)membMap.get("creatorId");
+                        User us = userList.stream().filter(u->u.getId().equals(creatorId)).findFirst().get();
+                        for (int i = 0; i < userCustoms.size(); i++) {
+                            switch (i){
+                                case 0:
+                                    membRowData.add(us.getPlate1()==null?"":us.getPlate1());
+                                    break;
+                                case 1:
+                                    membRowData.add(us.getPlate2()==null?"":us.getPlate2());
+                                    break;
+                                case 2:
+                                    membRowData.add(us.getPlate3()==null?"":us.getPlate3());
+                                    break;
+                                case 3:
+                                    membRowData.add(us.getPlate4()==null?"":us.getPlate4());
+                                    break;
+                                case 4:
+                                    membRowData.add(us.getPlate5()==null?"":us.getPlate5());
+                                    break;
+                            }
+                        }
                         if ("hours".equals(exportContent) && functionTimeList.size()>0){
                             membRowData.add(((Double)membMap.get("cost")).toString());
                         }else if ("cost".equals(exportContent) && functionCostList.size()>0){
@@ -1492,6 +1522,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 sumRow.add("");
                 sumRow.add("");
                 sumRow.add("");
+                sumRow.add("");
+                for (UserCustom userCustom : userCustoms) {
+                    headList.add("");
+                }
                 if ("hours".equals(exportContent) && functionTimeList.size()>0){
                     sumRow.add(""+new BigDecimal(totalCostTime).setScale(1, BigDecimal.ROUND_HALF_UP));
                 }else if ("cost".equals(exportContent) && functionCostList.size()>0){
@@ -1507,7 +1541,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 
                 allList.add(sumRow);
             }else{
-                List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
                 List<Object> projectNames = list.stream().map(mp -> mp.get("project")).collect(Collectors.toList());
                 List<Object> projectCodes = list.stream().map(mp -> mp.get("projectCode")).collect(Collectors.toList());
                 List<Object> projectIds = list.stream().map(mp -> mp.get("id")).collect(Collectors.toList());

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

@@ -3870,12 +3870,15 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     continue;
                 }
                 String username = withCheckIn==null?row.getCell(1).getStringCellValue().trim():row.getCell(2).getStringCellValue().trim();
-                String deptName = withCheckIn==null?row.getCell(1).getStringCellValue().trim():row.getCell(3).getStringCellValue().trim();
-                if (rowIndex == 0 && "部门".equals(deptName)) {
-                    hasDept = true;
-                }
-                if(username.equals("员工")){
-                    continue;
+
+                if (rowIndex == 0) {
+                    String deptName = withCheckIn==null?row.getCell(1).getStringCellValue().trim():row.getCell(3).getStringCellValue().trim();
+                    if ("部门".equals(deptName)) {
+                        hasDept = true;
+                    }
+                    if(username.equals("员工")){
+                        continue;
+                    }
                 }
                 if(!userNameList.contains(username)&&!username.equals("")){
                     userNameList.add(username);
@@ -6135,4 +6138,51 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         return msg;
     }
 
+    @Override
+    public HttpRespMsg batchDelete(String userIds, String startDate, String endDate, HttpServletRequest request) {
+        //限制只针对赛元微电子
+        HttpRespMsg msg = new HttpRespMsg();
+        String userId = request.getHeader("TOKEN");
+        User user = userMapper.selectById(userId);
+        if (user.getCompanyId() != 469) {
+            msg.setError("无权限");
+            return msg;
+        }
+        JSONArray array = JSONArray.parseArray(userIds);
+        List<String> userIdList = new ArrayList<>();
+        for (int i = 0; i < array.size(); i++) {
+            String id = array.getString(i);
+            userIdList.add(id);
+        }
+        if (userIdList.size() > 0) {
+            List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("id", userIdList));
+            boolean notAllowed = userList.stream().anyMatch(u -> !u.getCompanyId().equals(469));
+            if (!notAllowed) {
+                reportMapper.delete(new QueryWrapper<Report>().in("creator_id", userIdList).between("create_date", startDate, endDate));
+            } else {
+                msg.setError("无权限");
+            }
+        } else {
+            msg.setError("人员不能为空");
+        }
+        return msg;
+    }
+
+    @Override
+    public HttpRespMsg batchApproveByDate(String startDate, String endDate, HttpServletRequest request) {
+        HttpRespMsg msg = new HttpRespMsg();
+        //限制只针对赛元微电子
+        String userId = request.getHeader("TOKEN");
+        User user = userMapper.selectById(userId);
+        if (user.getCompanyId() != 469) {
+            msg.setError("无权限");
+            return msg;
+        }
+        Report r = new Report();
+        r.setState(1);
+        reportMapper.update(r, new QueryWrapper<Report>().eq("company_id", 469).between("create_date", startDate, endDate));
+        return msg;
+
+    }
+
 }

+ 12 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -1329,7 +1329,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                                         needRecaculate = true;
                                     }
                                 } else if (leaveText.startsWith("外出") || leaveText.startsWith("出差") || leaveText.startsWith("外勤")) {
-                                    //格式 "10/17 09:00 / 10/19 18:00"
+                                    //格式 "10/17 09:00 / 10/19 18:00", "10/17 上午 / 10/17 下午"
                                     String string = holiday.getJSONObject("sp_description").getJSONArray("data").getJSONObject(m).getString("text");
                                     String[] s = string.split(" \\/ | |\\~");
                                     if (showLog) {
@@ -1355,7 +1355,16 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                                     String outStart = s[1];
                                     if (sDate.isEqual(eDate)) {
                                         //外出在一天内
-
+                                        if (outStart.equals("上午")) {
+                                            outStart = baseMorningStart;
+                                        } else if (outStart.equals("下午")) {
+                                            outStart = baseAfternoonStart;
+                                        }
+                                        if (outEnd.equals("上午")) {
+                                            outEnd = baseMorningEnd;
+                                        } else if (outEnd.equals("下午")) {
+                                            outEnd = baseAfternoonEnd;
+                                        }
                                     } else {
                                         if (showLog) System.out.println("跨天外出===");
                                         if (showLog)
@@ -1413,6 +1422,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                         double timeDelta = 0;
                         //时间有变化,需要重新计算
                         if (needRecaculate) {
+                            System.out.println("corpwxUserId=="+ct.getCorpwxUserid()+", name=="+ct.getName()+"s=="+ct.getStartTime()+", e=="+ct.getEndTime());
                             timeDelta = DateTimeUtil.getHoursFromSeconds(DateTimeUtil.getSecondsFromTime(ct.getEndTime()) - DateTimeUtil.getSecondsFromTime(ct.getStartTime()));
                             //超过下午上班的开始时间,需要减去午休的时间
                             if (ct.getEndTime().compareTo(baseAfternoonStart) >= 0) {

+ 37 - 29
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/TestSample.java

@@ -1,39 +1,47 @@
 package com.management.platform.util;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import org.springframework.util.StringUtils;
+
+import java.util.*;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ForkJoinPool;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 public class TestSample {
     public static void main(String[] args) {
-        /* 创建数组,用来构建不同大小的List */
-        Integer[] intArr = new Integer[200];
-        List<Integer> intList = Arrays.asList(intArr);
-
-        List<Integer> forList = new ArrayList<>();
-        List<Integer> streamForList = new ArrayList<>();
-        List<Integer> parallelStreamForList = new ArrayList<>();
-
-
-        intList.forEach(l -> forList.add(l));
-        intList.stream().forEach(l -> streamForList.add(l));
-        ForkJoinPool forkJoinPool1 = new ForkJoinPool(Runtime.getRuntime().availableProcessors());
-        CountDownLatch countDownLatch = new CountDownLatch(2);
-        forkJoinPool1.submit(() -> {
-            intList.parallelStream().forEach(l -> parallelStreamForList.add(l));
-            countDownLatch.countDown();
-        });
-//        intList.parallelStream().forEach(l -> parallelStreamForList.add(l));
-//        try {
-//            countDownLatch.await();
-//        } catch (InterruptedException e) {
-//            throw new RuntimeException(e);
-//        }
+        String address = "张三18680419527湖南省岳阳市君山区许加派村";
+        String p = decodePhone(address);
+        System.out.println("电话号码是:"+p);
+        address = address.replaceAll(p, " ");
+        //按空格或者逗号分割地址
+        String[] addArray = address.split(" |,|,");
+        String add = "";
+        for (String s : addArray) {
+            //判断是否最小区单位
+            if (s.contains("省") || s.contains("市") || s.contains("区") || s.contains("自治区") || s.contains("自治州") || s.contains("县")) {
+                System.out.println("省市区地址是:" + s);
+                add = s;
+            } else {
+                System.out.println("姓名是:" + s);
+            }
+        }
+        System.out.println("==============");
+        //从数据库的区获取数据,去匹配add, 找到后进行拆分
+        String[] detailAdd = add.split("区|自治区|自治州|县");
+        System.out.println("省市区地址是:" + detailAdd[0]);
+        System.out.println("详细地址是:" + detailAdd[1]);
+    }
 
-        System.out.println(forList.size() + "---普通for循环数组");
-        System.out.println(streamForList.size() + "---stream流for循环数组");
-        System.out.println(parallelStreamForList.size() + "---parallelStream流for循环数组");
+    public static String decodePhone(String address) {
+        //通过正则表达式解析电话
+        String regEx = "(?<phone>(?:(?:\\+|00)86)?1[3-9]\\d{9})";
+        Matcher m = Pattern.compile(regEx).matcher(address);
+        String phone = null;
+        if (m.find()) {
+            phone = m.group("phone");
+        }
+        System.out.println(phone);
+        return phone;
     }
 }

+ 204 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1539,6 +1539,14 @@
                             </div>
                         </template>
                     </el-table-column>
+                    <el-table-column  label="操作" v-if="user.companyId == 469 && user.roleName=='超级管理员'">
+                        <template slot-scope="scope">
+                            <div>
+                                <el-button type="default" size="small" @click="openModImportTime(scope.row)">修改导入时间</el-button>
+                                <!-- <el-button type="primary" @click="delImportTime(scope.row)">删除记录</el-button> -->
+                            </div>
+                        </template>
+                    </el-table-column>
                 </el-table>
                 <el-col :span="24" class="paginatis">
                     <el-pagination
@@ -1629,6 +1637,8 @@
                 <el-link v-if="active==0"  style="float:right;margin-right:100px;" type="primary" @click="toView()">{{$t('other.viewLaborImportRecords')}}</el-link>
                 <el-link v-if="active==0"  style="float:right;margin-right:100px;" type="primary" @click="downloadProjectRatio">下载填报工时占比表</el-link>
                 <el-link v-if="active==0 && user.companyId == 469"  style="float:right;margin-right:100px;" type="primary" @click="importCardTimeVisi = true">导入考勤时长</el-link>
+                <el-link v-if="active==0 && user.companyId == 469 && user.roleName == '超级管理员'"  style="float:right;margin-right:50px;" type="primary" @click="showBatchDeleteReport = true; startDeleting = false;">批量删除日报</el-link>
+                <el-link v-if="active==0 && user.companyId == 469 && user.roleName == '超级管理员'"  style="float:right;margin-right:50px;" type="primary" @click="showBatchSimpleApproveReport = true; startDeleting = false;">批量审核日报</el-link>
             </div>
             
             <span slot="footer">
@@ -1647,6 +1657,62 @@
                 </el-upload>
             </p>
         </el-dialog>
+        <el-dialog title="批量删除日报" v-if="showBatchDeleteReport" :visible.sync="showBatchDeleteReport"  width="200">
+            <div>
+                <span>{{$t('time.selectdaterange')}}:</span><el-date-picker 
+                    v-model="deleteReportParam.date" :editable="false" 
+                    format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
+                    :clearable="true" 
+                    :range-separator="$t('other.to')"
+                    type="daterange" 
+                    :start-placeholder="$t('time.startDate')"
+                    :end-placeholder="$t('time.endDate')"
+                    ></el-date-picker>
+            </div>
+            <div style="margin-top:10px;">
+                <span>请选择员工:</span>
+                <el-select v-model="deleteReportParam.userIds" placeholder="请选择" style="width:500px;" filterable multiple>
+                    <el-option v-for="item in usersList" :key="item.id" :label="item.name" :value="item.id">
+                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span v-else>{{item.name}}</span>
+                    </el-option>
+                </el-select>
+            </div>
+            <span slot="footer">
+            <el-button @click="confirmBatchDelReport" :loading="startDeleting" >开始删除</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="批量审核日报" v-if="showBatchSimpleApproveReport" :visible.sync="showBatchSimpleApproveReport"  width="200">
+            <div>
+                <span>{{$t('time.selectdaterange')}}:</span><el-date-picker 
+                    v-model="deleteReportParam.date" :editable="false" 
+                    format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
+                    :clearable="true" 
+                    :range-separator="$t('other.to')"
+                    type="daterange" 
+                    :start-placeholder="$t('time.startDate')"
+                    :end-placeholder="$t('time.endDate')"
+                    ></el-date-picker>
+            </div>
+            <span slot="footer">
+            <el-button @click="confirmBatchApproveReport" :loading="startDeleting" >审批通过</el-button>
+            </span>
+        </el-dialog>
+        <el-dialog title="修改导入时间" v-if="showModImportTimeDialog" :visible.sync="showModImportTimeDialog"  width="200">
+            <div>
+                <span>选择时间:</span><el-date-picker 
+                    v-model="modImportTime" 
+                    format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" 
+                    :clearable="true" 
+                    type="datetime" 
+                    ></el-date-picker>
+            </div>
+            <span slot="footer">
+            <el-button @click="confirmChangeModTime" >确认</el-button>
+            </span>
+        </el-dialog>
+        
         
         <el-dialog title="导出员工填报工时占比" v-if="exportUserRatio" :visible.sync="exportUserRatio"  width="200">
             <div>
@@ -1758,6 +1824,13 @@
         },
         data() {
             return {
+                modItemDataId: null,
+                modImportTime: null,
+                showModImportTimeDialog: false,
+                showBatchSimpleApproveReport: false,
+                startDeleting: false,
+                showBatchDeleteReport: false,
+                deleteReportParam: {date:null, userIds:[]},
                 isDenying: false,
                 targetWeekDate: null,//填写周报中的周日期
                 importCardTimeVisi: false,
@@ -2091,6 +2164,137 @@
         },
         methods: {
             ...mapMutations(['upDataLoading']),
+            openModImportTime(row) {
+                this.showModImportTimeDialog = true;
+                this.modItemDataId = row.id;
+            },
+            confirmChangeModTime() {
+                if (this.modImportTime == null || this.modImportTime.length == 0) {
+                    this.$message({
+                                message: '请选择时间',
+                                type: "error"
+                            });
+                    return;
+                }
+                this.http.post('/report-import-log/changeTime',{ 
+                        modLogDateTime: this.modImportTime,
+                        id: this.modItemDataId
+                    },res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '修改成功',
+                                type: "success"
+                            });
+                            this.getToView();
+                            this.showModImportTimeDialog = false;
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+            },
+            confirmBatchApproveReport() {
+                if (this.deleteReportParam.date == null || this.deleteReportParam.date.length == 0) {
+                    this.$message({
+                                message: '请选择日期范围',
+                                type: "error"
+                            });
+                    return;
+                }
+                
+                this.$confirm('您确定要审核通过该时间段内全部的日报吗?',this.$t('other.prompts'), {
+                    confirmButtonText: this.$t('btn.determine'),
+                    cancelButtonText: this.$t('btn.cancel'),
+                    type: "warning"
+                })
+                .then(() => {
+                    this.startDeleting = true;
+                    this.http.post('/report/batchApproveByDate',{ 
+                        startDate: this.deleteReportParam.date[0],
+                        endDate: this.deleteReportParam.date[1],
+                    },res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '审核通过',
+                                type: "success"
+                            });
+                            this.getReportList();
+                            this.getDepartment();
+                            this.startDeleting = false;
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+                }).catch(() => {this.startDeleting = false});
+            },
+            confirmBatchDelReport() {
+                if (this.deleteReportParam.userIds.length == 0) {
+                    this.$message({
+                                message: '请选择人员',
+                                type: "error"
+                            });
+                    return;
+                }
+                if (this.deleteReportParam.date == null || this.deleteReportParam.date.length == 0) {
+                    this.$message({
+                                message: '请选择日期范围',
+                                type: "error"
+                            });
+                    return;
+                }
+                
+                this.$confirm('您确定要删除该时间段内选中人员的日报吗,删除后将不可恢复',this.$t('other.prompts'), {
+                    confirmButtonText: this.$t('btn.determine'),
+                    cancelButtonText: this.$t('btn.cancel'),
+                    type: "warning"
+                })
+                .then(() => {
+                    this.startDeleting = true;
+                    this.http.post('/report/batchDelete',{ 
+                        userIds: JSON.stringify(this.deleteReportParam.userIds),
+                        startDate: this.deleteReportParam.date[0],
+                        endDate: this.deleteReportParam.date[1],
+                    },res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: this.$t('message.successfullyDeleted'),
+                                type: "success"
+                            });
+                            this.getReportList();
+                            this.getDepartment();
+                            this.startDeleting = false;
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+                }).catch(() => {this.startDeleting = false});
+            },
             getRecentlyProject() {
                 this.http.post('/project/nearProject',{},res => {
                     if(res.code == 'ok'){