Bläddra i källkod

1. 车间增加删除日报功能
2. 优化发送企业微信通知消息模式:单个改成批量
3. 修复日报重复的bug

seyason 1 år sedan
förälder
incheckning
72f3f7eaec

+ 26 - 15
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WxCorpInfoController.java

@@ -10,6 +10,7 @@ import com.management.platform.mapper.UserMapper;
 import com.management.platform.service.WxCorpInfoService;
 import com.management.platform.task.TimingTask;
 import com.management.platform.util.HttpRespMsg;
+import com.management.platform.util.ListUtil;
 import org.springframework.http.HttpRequest;
 import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -18,7 +19,9 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -62,22 +65,30 @@ public class WxCorpInfoController {
 
     @RequestMapping("/testSendTemplateMsg")
     public HttpRespMsg testSendTemplateMsg(String userId) {
-        User user = userMapper.selectById(userId);
-        int companyId=user.getCompanyId();
-        WxCorpInfo corpInfo = wxCorpInfoService.getOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+        String corpwxuserIds = "";
+        //多个用户
+        String[] userIds = userId.split("\\|");
+        List<String> ids = Arrays.asList(userIds);
+        List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("id",ids));
+        corpwxuserIds = userList.stream().filter(u->!StringUtils.isEmpty(u.getCorpwxUserid())).map(User::getCorpwxUserid).collect(Collectors.joining("|"));
+        if (corpwxuserIds.length() > 0) {
+            int companyId=userList.get(0).getCompanyId();
+            WxCorpInfo corpInfo = wxCorpInfoService.getOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            System.out.println("发送给:"+corpwxuserIds);
+            //推送到企业微信
+//        String corpUid = user.getCorpwxUserid();
+            JSONObject json=new JSONObject();
+            JSONArray dataJson=new JSONArray();
+            JSONObject jsonObj=new JSONObject();
+            jsonObj.put("key", "提示");
+            jsonObj.put("value", "测试提醒消息21:12");
+            dataJson.add(jsonObj);
+            json.put("template_id","tty9TkCAAAYoevY-40ciWD5lDncDfR5w");
+            json.put("url", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://worktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
+            json.put("content_item",dataJson);
+            wxCorpInfoService.sendWXCorpTemplateMsg(corpInfo, corpwxuserIds, json);
 
-        //推送到企业微信
-        String corpUid = user.getCorpwxUserid();
-        JSONObject json=new JSONObject();
-        JSONArray dataJson=new JSONArray();
-        JSONObject jsonObj=new JSONObject();
-        jsonObj.put("key", "提示");
-        jsonObj.put("value", "测试提醒消息");
-        dataJson.add(jsonObj);
-        json.put("template_id","tty9TkCAAAYoevY-40ciWD5lDncDfR5w");
-        json.put("url", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://worktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
-        json.put("content_item",dataJson);
-        wxCorpInfoService.sendWXCorpTemplateMsg(corpInfo, corpUid, json);
+        }
         return new HttpRespMsg();
     }
 

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

@@ -7436,7 +7436,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         return httpRespMsg;
     }
 
-    @Async
+//    @Async
     public void  cancelReportPushSap(String reportIds){
         if(!StringUtils.isEmpty(reportIds)){
             List<Integer> reportIdList = ListUtil.convertIntegerIdsArrayToList(reportIds);

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

@@ -379,7 +379,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
     public void sendWXCorpTemplateMsg(WxCorpInfo corpInfo, String corpUserid, JSONObject msg) {
         try {
             if (isDev) return;
-            if(corpUserid==null||corpInfo.equals("")){
+            if(StringUtils.isEmpty(corpUserid)){
                 return;
             }
             String accessToken = getCorpAccessToken(corpInfo);
@@ -423,7 +423,6 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         } catch (Exception e) {
             e.printStackTrace();
         }
-
     }
 
     @Override

+ 98 - 23
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -1403,28 +1403,55 @@ public class TimingTask {
                 }
                 List<WxCorpInfo> cpList = wxCorpInfoMapper.selectList(new QueryWrapper<WxCorpInfo>().eq("company_id", t.getCompanyId()));
                 final boolean finalLastWeekNotFill = lastWeekNotFill;
-                userList.forEach(u->{
-                    if (u.get("corpwxUserid") != null){
-                        //推送到企业微信
-                        String corpUid = (String) u.get("corpwxUserid");
+//                userList.forEach(u->{
+//                    if (u.get("corpwxUserid") != null){
+//                        //推送到企业微信
+//                        String corpUid = (String) u.get("corpwxUserid");
+//                        JSONObject json=new JSONObject();
+//                        JSONArray dataJson = new JSONArray();
+//                        JSONObject jsonObj = new JSONObject();
+//                        jsonObj.put("key", "提示");
+//                        if (t.getAlertType() == 3) {
+//                            //每月提醒上个月的
+//                            if ((Integer)u.get("days") > 3) {
+//                                jsonObj.put("value", "您上个月有"+u.get("daysTxt")+"...共"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
+//                            } else {
+//                                jsonObj.put("value", "您上个月有"+u.get("daysTxt")+"共"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
+//                            }
+//                        } else {
+//                            if (finalLastWeekNotFill) {
+//                                jsonObj.put("value", "您上周有"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
+//                            } else {
+//                                jsonObj.put("value", StringUtils.isEmpty(t.getAlertMsg())?"":t.getAlertMsg());
+//                            }
+//                        }
+//                        dataJson.add(jsonObj);
+//                        if(isPrivateDeploy){
+//                            json.put("content",StringUtils.isEmpty(t.getAlertMsg())?"":t.getAlertMsg()+"\\n<a href=\\\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="+suitId+"&redirect_uri="+pcUrl+"/api/corpInsideWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect\\\">去填写</a>");
+//                        }else {
+//                            json.put("template_id","tty9TkCAAAYoevY-40ciWD5lDncDfR5w");
+//                            json.put("url", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://worktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
+//                            json.put("content_item",dataJson);
+//                        }
+//                        if (cpList.size() > 0) {
+////                            System.out.println("发送企业微信漏填提醒:" + LocalDateTime.now().toString() + ", corpUid=" + corpUid + ", json=" + json.toJSONString());
+//                            wxCorpInfoService.sendWXCorpTemplateMsg(cpList.get(0), corpUid, json);
+//                        }
+//                    } else if (u.get("wxOpenid") != null) {
+//                        push(u, t.getAlertMsg());
+//                    }
+//                });
+                //今天或者明天统一提醒,提醒内容大家都一样
+                if (t.getAlertType() == 0 || t.getAlertType() == 1) {
+                    //判断是企业微信用户还是微信用户
+                    List<String> corpUidList = userList.stream().filter(u -> u.get("corpwxUserid") != null).map(u -> (String) u.get("corpwxUserid")).distinct().collect(Collectors.toList());
+                    if (corpUidList.size() > 0) {
+                        //给企业微信用户发送
                         JSONObject json=new JSONObject();
                         JSONArray dataJson = new JSONArray();
                         JSONObject jsonObj = new JSONObject();
                         jsonObj.put("key", "提示");
-                        if (t.getAlertType() == 3) {
-                            //每月提醒上个月的
-                            if ((Integer)u.get("days") > 3) {
-                                jsonObj.put("value", "您上个月有"+u.get("daysTxt")+"...共"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
-                            } else {
-                                jsonObj.put("value", "您上个月有"+u.get("daysTxt")+"共"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
-                            }
-                        } else {
-                            if (finalLastWeekNotFill) {
-                                jsonObj.put("value", "您上周有"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
-                            } else {
-                                jsonObj.put("value", StringUtils.isEmpty(t.getAlertMsg())?"":t.getAlertMsg());
-                            }
-                        }
+                        jsonObj.put("value", StringUtils.isEmpty(t.getAlertMsg())?"":t.getAlertMsg());
                         dataJson.add(jsonObj);
                         if(isPrivateDeploy){
                             json.put("content",StringUtils.isEmpty(t.getAlertMsg())?"":t.getAlertMsg()+"\\n<a href=\\\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="+suitId+"&redirect_uri="+pcUrl+"/api/corpInsideWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect\\\">去填写</a>");
@@ -1434,13 +1461,61 @@ public class TimingTask {
                             json.put("content_item",dataJson);
                         }
                         if (cpList.size() > 0) {
-//                            System.out.println("发送企业微信漏填提醒:" + LocalDateTime.now().toString() + ", corpUid=" + corpUid + ", json=" + json.toJSONString());
-                            wxCorpInfoService.sendWXCorpTemplateMsg(cpList.get(0), corpUid, json);
+                            String collectCPIds = corpUidList.stream().collect(Collectors.joining("|"));
+                            if (!StringUtils.isEmpty(collectCPIds)) {
+//                                System.out.println("发送企业微信漏填提醒:" + LocalDateTime.now().toString() + ", corpUid=" + collectCPIds + ", json=" + json.toJSONString());
+                                wxCorpInfoService.sendWXCorpTemplateMsg(cpList.get(0), collectCPIds, json);
+                            }
                         }
-                    } else if (u.get("wxOpenid") != null) {
-                        push(u, t.getAlertMsg());
                     }
-                });
+                    //给微信用户发送
+                    userList.forEach(u->{
+                        if (u.get("corpwxUserid") == null && u.get("wxOpenid") != null) {
+                            push(u, t.getAlertMsg());
+                        }
+                    });
+                } else {
+                    //修改代码
+                    userList.forEach(u->{
+                        if (u.get("corpwxUserid") != null){
+                            //推送到企业微信
+                            String corpUid = (String) u.get("corpwxUserid");
+                            JSONObject json=new JSONObject();
+                            JSONArray dataJson = new JSONArray();
+                            JSONObject jsonObj = new JSONObject();
+                            jsonObj.put("key", "提示");
+                            if (t.getAlertType() == 3) {
+                                //每月提醒上个月的
+                                if ((Integer)u.get("days") > 3) {
+                                    jsonObj.put("value", "您上个月有"+u.get("daysTxt")+"...共"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
+                                } else {
+                                    jsonObj.put("value", "您上个月有"+u.get("daysTxt")+"共"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
+                                }
+                            } else {
+                                if (finalLastWeekNotFill) {
+                                    jsonObj.put("value", "您上周有"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
+                                } else {
+                                    jsonObj.put("value", StringUtils.isEmpty(t.getAlertMsg())?"":t.getAlertMsg());
+                                }
+                            }
+                            dataJson.add(jsonObj);
+                            if(isPrivateDeploy){
+                                json.put("content",StringUtils.isEmpty(t.getAlertMsg())?"":t.getAlertMsg()+"\\n<a href=\\\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="+suitId+"&redirect_uri="+pcUrl+"/api/corpInsideWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect\\\">去填写</a>");
+                            }else {
+                                json.put("template_id","tty9TkCAAAYoevY-40ciWD5lDncDfR5w");
+                                json.put("url", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://worktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
+                                json.put("content_item",dataJson);
+                            }
+                            if (cpList.size() > 0) {
+//                            System.out.println("发送企业微信漏填提醒:" + LocalDateTime.now().toString() + ", corpUid=" + corpUid + ", json=" + json.toJSONString());
+                                wxCorpInfoService.sendWXCorpTemplateMsg(cpList.get(0), corpUid, json);
+                            }
+                        } else if (u.get("wxOpenid") != null) {
+                            push(u, t.getAlertMsg());
+                        }
+                    });
+                }
+
             }
         });
         if (isDev) {

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

@@ -15,7 +15,7 @@ spring:
       location: C:/upload/
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://47.101.180.183:17089/man_dev?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
+    url: jdbc:mysql://47.101.180.183:17089/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: P011430@Huoshi*
     

+ 8 - 8
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/ReportController.java

@@ -1247,14 +1247,14 @@ public class ReportController {
 //        }
 //    }
 //
-//    /**
-//     * 删除报告
-//     * id 要删除的报告的id
-//     */
-//    @RequestMapping("/delete")
-//    public HttpRespMsg deleteReport(String userId, String date) {
-//        return reportService.deleteReport(userId, date);
-//    }
+    /**
+     * 删除报告
+     * id 要删除的报告的id
+     */
+    @RequestMapping("/deleteUserReport")
+    public HttpRespMsg deleteUserReport(String userId, String date) {
+        return reportService.deleteUserReport(userId, date);
+    }
 //
 //    /**
 //     * 根据审核状态获取报告

+ 1 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/ReportService.java

@@ -33,7 +33,7 @@ public interface ReportService extends IService<Report> {
 //
 //    HttpRespMsg editReport(List<Report> reportList, String date, List<User> userList, BigDecimal hourCost, Integer companyId);
 //
-//    HttpRespMsg deleteReport(String userId, String date);
+    HttpRespMsg deleteUserReport(String userId, String date);
 //
 //    HttpRespMsg getListByState(Integer state, Integer departmentId,
 //                               Integer projectId,

+ 52 - 47
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -867,49 +867,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
 //    }
 //
 //
-//    //删除报告
-//    @Override
-//    public HttpRespMsg deleteReport(String userId, String date) {
-//        HttpRespMsg httpRespMsg = new HttpRespMsg();
-//        Company company = companyMapper.selectById(userMapper.selectById(userId).getCompanyId());
-//        //某人删除自己某天的全部报告
-//        QueryWrapper<Report> queryWrapper = new QueryWrapper<Report>().eq("creator_id", userId).eq("create_date", date);
-//        List<Report> reportList = reportMapper.selectList(queryWrapper);
-//        List<Integer> collect = reportList.stream().map(Report::getId).collect(Collectors.toList());
-//        //删除日报相关的专业进度
-//        if (company.getPackageEngineering() == 1) {
-//            if (collect.size() > 0) {
-//                reportProfessionProgressService.remove(new QueryWrapper<ReportProfessionProgress>().in("report_id", collect));
-//            }
-//        }
-//        if (reportMapper.delete(queryWrapper) == 0) {
-//            //httpRespMsg.setError("操作失败");
-//            httpRespMsg.setError(MessageUtils.message("other.operationFail"));
-//        } else {
-//            //删除日报的日志
-//            reportLogMapper.delete(new QueryWrapper<ReportLog>().eq("creator_id", userId).eq("create_date", date));
-//        }
-//        if(company.getId()==862){
-//            String url = "http://183.194.0.98:3202/api/web-server/controlCenter/billRejected";
-//            HttpHeaders headers = new HttpHeaders();
-//            headers.setContentType(MediaType.APPLICATION_JSON);
-//            headers.add("token",getTokenOfYiWei());
-//            JSONObject body=new JSONObject();
-//            body.put("type","EXPENSE");
-//            body.put("billNo","GS"+reportList.get(0).getCreatorId()+reportList.get(0).getCreateDate());
-//            HttpEntity<String> requestEntity = new HttpEntity<String>(body.toJSONString(), headers);
-//            ResponseEntity<String> responseEntity = this.restTemplate.exchange(url,
-//                    HttpMethod.POST, requestEntity, String.class);
-//            if (responseEntity.getStatusCode() == HttpStatus.OK) {
-//                String resp = responseEntity.getBody();
-//                JSONObject json = JSONObject.parseObject(resp);
-//                if(json.getIntValue("status")==0){
-//                    JSONArray jsonArray = json.getJSONArray("data");
-//                }
-//            }
-//        }
-//        return httpRespMsg;
-//    }
+
 //
 //    //按状态获取报告列表
 //    @Override
@@ -4562,7 +4520,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     public HttpRespMsg deleteReport(String id) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
-        User user = userMapper.selectById(token);
         Report report = reportMapper.selectById(id);
         if (report == null) {
             httpRespMsg.setError("报工不存在");
@@ -4583,9 +4540,10 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             //更新自己执行的工序上的数据
             prodProcedureTeamMapper.updateById(prodProcedureTeam);
             //计算该计划工序的总完成工时和完成度
-            Double workingTime = reportMapper.selectOne(new QueryWrapper<Report>().select("sum(working_time) as working_time").eq("plan_id", planProcedureTotal.getPlanId()).eq("prod_procedure_id", planProcedureTotal.getProdProcedureId())).getWorkingTime();
-            if (workingTime == null) {
-                workingTime = 0.0;
+            Report curReportSumItem = reportMapper.selectOne(new QueryWrapper<Report>().select("sum(working_time) as working_time").eq("plan_id", planProcedureTotal.getPlanId()).eq("prod_procedure_id", planProcedureTotal.getProdProcedureId()));
+            Double workingTime = 0.0;
+            if (curReportSumItem != null) {
+                workingTime = curReportSumItem.getWorkingTime();
             }
             planProcedureTotal.setTotalFillTime(workingTime);
             planProcedureTotal.setTotalProgress((int)(workingTime / planProcedureTotal.getTotalWorkingHours()) * 100);
@@ -4593,4 +4551,51 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             return new HttpRespMsg();
         }
     }
+
+    //删除报告
+    @Override
+    public HttpRespMsg deleteUserReport(String userId, String date) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        //判断权限
+        User user = userMapper.selectById(request.getHeader("token"));
+        boolean canDeleteAll = sysFunctionService.hasPriviledge(user.getRoleId(), "删除全公司日报");
+        if (!canDeleteAll) {
+            httpRespMsg.setError("无权限");
+            return httpRespMsg;
+        }
+        //某人删除自己某天的全部报告
+        QueryWrapper<Report> queryWrapper = new QueryWrapper<Report>().eq("creator_id", userId).eq("create_date", date);
+        List<Report> reportList = reportMapper.selectList(queryWrapper);
+        for (Report report : reportList) {
+            if (report == null) {
+                httpRespMsg.setError("报工不存在");
+                return httpRespMsg;
+            } else {
+                //计算工作时长
+                ProdProcedureTeam prodProcedureTeam = prodProcedureTeamMapper.selectById(report.getUserProcedureTeamId());
+                //总计划任务的工序中有总工时和总工价
+                PlanProcedureTotal planProcedureTotal = planProcedureTotalMapper.selectOne(new QueryWrapper<PlanProcedureTotal>().eq("plan_id", report.getPlanId()).eq("prod_procedure_id", report.getProdProcedureId()));
+                //核算本次填报的件数是否合法
+                prodProcedureTeam.setStatus(1);//未完工
+                prodProcedureTeam.setUpdateTime(LocalDateTime.now());
+                //更新填写的钢印号
+                prodProcedureTeam.setSteelNumArray("[]");
+                reportMapper.deleteById(report.getId());
+                reportSteelNumMapper.delete(new QueryWrapper<ReportSteelNum>().eq("report_id", report.getId()));
+
+                //更新自己执行的工序上的数据
+                prodProcedureTeamMapper.updateById(prodProcedureTeam);
+                //计算该计划工序的总完成工时和完成度
+                Report curReportSumItem = reportMapper.selectOne(new QueryWrapper<Report>().select("sum(working_time) as working_time").eq("plan_id", planProcedureTotal.getPlanId()).eq("prod_procedure_id", planProcedureTotal.getProdProcedureId()));
+                Double workingTime = 0.0;
+                if (curReportSumItem != null) {
+                    workingTime = curReportSumItem.getWorkingTime();
+                }
+                planProcedureTotal.setTotalFillTime(workingTime);
+                planProcedureTotal.setTotalProgress((int)(workingTime / planProcedureTotal.getTotalWorkingHours()) * 100);
+                planProcedureTotalMapper.updateById(planProcedureTotal);
+            }
+        }
+        return httpRespMsg;
+    }
 }

+ 4 - 6
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/workReport/daily.vue

@@ -150,7 +150,7 @@
                                     </span>
                                     <div class="checkbtn" style="padding-right:20px;">
                                         <el-button v-if="item1.state >= 2 && user.id == item1.id" type="primary" size="small" @click="isSubstitude=false; fillInReport(index1,0)">{{$t('btn.editWorkReport')}}</el-button>
-                                        <el-button v-if="permissions.reportsDeleteAll && item1.state != 1" size="small" @click="guanli(item1)" style="float: right;">{{$t('btn.delete')}}</el-button>
+                                        <el-button v-if="permissions.reportsDeleteAll" size="small" @click="deleteUserReport(item1)" style="float: right;">{{$t('btn.delete')}}</el-button>
                                     </div>
                                     <div class="one_daily_body">
                                         <el-timeline>
@@ -3628,19 +3628,17 @@
                 
            },
             // 管理员删除日报
-            guanli(item) {
-                
+            deleteUserReport(item) {
                 let day = (this.choseDay + 1) > 9 ? "-" + (this.choseDay + 1) : "-0" + (this.choseDay + 1);
                 let param = {date: this.date + day, userId: item.id};
-                
-                this.$confirm(this.$t('message.Areyousureyouwanttodeletethisdaily'),this.$t('other.prompts'), {
+                this.$confirm('确定要删除该员工当天全部报工吗?',this.$t('other.prompts'), {
                     confirmButtonText: this.$t('btn.determine'),
                     cancelButtonText: this.$t('btn.cancel'),
                     type: "warning"
                 })
                 .then(() => {
                     this.listLoading = true;
-                    this.http.post('/report/delete',param,
+                    this.http.post('/report/deleteUserReport',param,
                     res => {
                         this.listLoading = false;
                         if (res.code == "ok") {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -3234,7 +3234,7 @@ export default {
           pageIndex: this.page,
           pageSize: this.size,
           keyword: this.keyword,
-          status: this.status,
+          status: this.keyword?'':this.status,//有姓名关键字时,按照全部状态搜索
           roleId: this.roleId,
           cursor: this.nextCursor,
           onlyDirect: this.onlyDirect ? "1" : "0",

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

@@ -2283,8 +2283,8 @@ import timetoolVue from '../timetool/timetool.vue';
                             }else{
                                 this.$toast.success(this.isDraft==0?'提交成功':'暂存成功');
                                 setTimeout(()=> {
-                                    that.$router.push("/index");
-                                }, 1000);
+                                    this.$router.push("/index");
+                                }, 500);
                             }
                         } else {
                             this.$toast.clear();

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -2092,8 +2092,8 @@
                         }else{
                             this.$toast.success(this.isDraft==0?'提交成功':'暂存成功');
                             setTimeout(()=> {
-                                that.$router.push("/index");
-                                that.summary = ''
+                                this.$router.push("/index");
+                                this.summary = ''
                             }, 1000);
                         }
                     } else {