Bladeren bron

提交代码

Lijy 6 maanden geleden
bovenliggende
commit
b3209976f8

+ 5 - 76
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -106,9 +106,6 @@ public class WeiXinCorpController {
     @Value("${configEnv.isPrivateDeploy}")
     private boolean isPrivateDeploy;//企业内部应用,私有化部署的情况
 
-    //自己公司的企业微信通讯录secret
-    private String concactSecret="irf7s8fy16wLhWGb8IxvGL2Nkm0sTB6dludpe_3VP6k";
-
     @Value("${token}")
     private String token;
     @Value("${encodingAesKey}")
@@ -1398,45 +1395,15 @@ public class WeiXinCorpController {
                         String editionId = wxOrder.getEditionId();
                         switch (editionId){
                             //基础版
-                            case "sp17da4a6e6f2a91f8":
-                                newCompany.setPackageProject(0);
-                                newCompany.setPackageOa(0);
-                                newCompany.setPackageExpense(0);
-                                newCompany.setPackageCustomer(0);
-                                newCompany.setPackageEngineering(0);
-                                newCompany.setPackageProvider(0);
+                            case "sp8f9473908bd5f6b0":
                                 break;
                             //专业版
-                            case "sp4a30d92ede178afd":
-                                newCompany.setPackageProject(1);//项目协作平台
-                                newCompany.setPackageOa(0);//OA平台;请假,出差等
-                                newCompany.setPackageExpense(1);//费用报销
-                                newCompany.setPackageCustomer(0);//客户管理
-                                newCompany.setPackageEngineering(0);//工程专业
-                                newCompany.setPackageProvider(0);//供应商模块
-                                break;
-                            //建筑版
-                            case "sp29bdb884f4a78392":
-                                newCompany.setPackageProject(1);//项目协作平台
-                                newCompany.setPackageOa(0);//OA平台;请假,出差等
-                                newCompany.setPackageExpense(1);//费用报销
-                                newCompany.setPackageCustomer(1);//客户管理
-                                newCompany.setPackageEngineering(1);//工程专业
-                                newCompany.setPackageProvider(0);//供应商模块
-                                break;
-                            //旗舰版
-                            case "sp852fec2d1198957a":
-                                newCompany.setPackageProject(1);//项目协作平台
-                                newCompany.setPackageOa(1);//OA平台;请假,出差等
-                                newCompany.setPackageExpense(1);//费用报销
-                                newCompany.setPackageCustomer(1);//客户管理
-                                newCompany.setPackageEngineering(0);//工程专业
-                                newCompany.setPackageProvider(1);//供应商模块
+                            case "sp158cbb42aebdeab0":
+                                newCompany.setSetMeal(1);
                                 break;
                         }
                         LocalDateTime endTime = wxOrder.getEndTime();
                         newCompany.setExpirationDate(endTime);
-                        newCompany.setSetMeal(1);
                         newCompany.setStaffCountMax(wxOrder.getUserCount());
                         companyMapper.updateById(newCompany);
                         System.out.println("版本变更成功,到期时间更新成功。");
@@ -1487,7 +1454,6 @@ public class WeiXinCorpController {
                         SysRole smanager = sysRoleMapper.selectOne(
                                 new QueryWrapper<SysRole>().eq("company_id", companyId).eq("rolename", "超级管理员"));
                         //授权人就当做是超级管理员吧
-                        log.info("===userDetail==" + userDetail.toJSONString());
                         SysRole defaultRole = null;
                         if (userMapper.selectCount(new QueryWrapper<User>().eq("role_id", smanager.getId()))> 0) {
                             //已经有超级管理员了,用默认权限
@@ -3322,45 +3288,8 @@ public class WeiXinCorpController {
             String edition_id = json.getJSONObject("edition_info").getJSONArray("agent")
                     .getJSONObject(0).getString("edition_id");
             //非体验版
-            if (!"sp4abb17b6c9df6f9f".equals(edition_id)) {
-                switch (edition_id){
-                    //基础版
-                    case "sp17da4a6e6f2a91f8":
-                        newCompany.setPackageProject(0);
-                        newCompany.setPackageOa(0);
-                        newCompany.setPackageExpense(0);
-                        newCompany.setPackageCustomer(0);
-                        newCompany.setPackageEngineering(0);
-                        newCompany.setPackageProvider(0);
-                        break;
-                    //专业版
-                    case "sp4a30d92ede178afd":
-                        newCompany.setPackageProject(1);//项目协作平台
-                        newCompany.setPackageOa(0);//OA平台;请假,出差等
-                        newCompany.setPackageExpense(1);//费用报销
-                        newCompany.setPackageCustomer(0);//客户管理
-                        newCompany.setPackageEngineering(0);//工程专业
-                        newCompany.setPackageProvider(0);//供应商模块
-                        break;
-                    //建筑版
-                    case "sp29bdb884f4a78392":
-                        newCompany.setPackageProject(1);//项目协作平台
-                        newCompany.setPackageOa(0);//OA平台;请假,出差等
-                        newCompany.setPackageExpense(1);//费用报销
-                        newCompany.setPackageCustomer(1);//客户管理
-                        newCompany.setPackageEngineering(1);//工程专业
-                        newCompany.setPackageProvider(0);//供应商模块
-                        break;
-                    //旗舰版
-                    case "sp852fec2d1198957a":
-                        newCompany.setPackageProject(1);//项目协作平台
-                        newCompany.setPackageOa(1);//OA平台;请假,出差等
-                        newCompany.setPackageExpense(1);//费用报销
-                        newCompany.setPackageCustomer(1);//客户管理
-                        newCompany.setPackageEngineering(0);//工程专业
-                        newCompany.setPackageProvider(1);//供应商模块
-                        break;
-                }
+            if (!"sp8f9473908bd5f6b0".equals(edition_id)) {
+                newCompany.setSetMeal(1);
                 companyMapper.updateById(newCompany);
                 System.out.println("已成功变更版本,版本号为:"+edition_id);
                 //开通模块和权限

+ 4 - 4
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -1930,15 +1930,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
             HashMap<String, Object> msgResult = new HashMap<>();
             nextCursor = result.get("nextCursor").get(0).toString();
             List users = result.get("user");
-            msgResult.put("nextCursor",nextCursor);
-            msg.data = msgResult;
+//            msgResult.put("nextCursor",nextCursor);
+
             if (users.size()!=0){
                 List<User> realUser = userMapper.selectList(new QueryWrapper<User>().in("corpwx_userid", users));
-                msgResult.put("retUser",realUser);
+                msg.data = realUser;
                 return msg;
             }else {
                 ArrayList<User> nullUser = new ArrayList<>();
-                msgResult.put("retUser",nullUser);
+                msg.data = nullUser;
                 return msg;
             }
         }else {

+ 13 - 0
fhKeeper/formulahousekeeper/management-platform/pom.xml

@@ -14,6 +14,19 @@
     <version>3.4.0</version>
 
     <dependencies>
+
+<!--        <dependency>-->
+<!--            <groupId>cn.hutool</groupId>-->
+<!--            <artifactId>hutool-all</artifactId>-->
+<!--            <version>5.8.9</version>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>commons-codec</groupId>-->
+<!--            <artifactId>commons-codec</artifactId>-->
+<!--            <version>1.10</version>-->
+<!--        </dependency>-->
+
+
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>

+ 3 - 11
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinancialAuditController.java

@@ -2,33 +2,25 @@ package com.management.platform.controller;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.management.platform.entity.FinancialAudit;
-import com.management.platform.entity.Project;
-import com.management.platform.entity.ProjectStage;
 import com.management.platform.entity.User;
 import com.management.platform.mapper.UserMapper;
 import com.management.platform.service.FinancialAuditService;
-import com.management.platform.service.ProjectStageService;
 import com.management.platform.util.HttpRespMsg;
-import com.management.platform.util.MessageUtils;
-import io.lettuce.core.pubsub.PubSubOutput;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
-import java.util.*;
-import java.util.stream.Collectors;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * <p>

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/WxCorpInfoService.java

@@ -48,7 +48,7 @@ public interface WxCorpInfoService extends IService<WxCorpInfo> {
 
     public String getTranslationMediaId(String fileName) throws Exception;
 
-    public String getTranslationJobId(String fileName,WxCorpInfo wxCorpInfo) throws Exception;
+    public String getTranslationJobId(String fileName,String md5,WxCorpInfo wxCorpInfo) throws Exception;
 
     public String syncTranslation(String authCorpid,String mediaId,String outPutFileName,String outputFileFormat) throws Exception;
 
@@ -87,4 +87,6 @@ public interface WxCorpInfoService extends IService<WxCorpInfo> {
     JSONArray getApprovalInfo(Integer companyId, String startDate, String endDate, String newCursor, JSONArray filterArray) throws Exception;
 
     public String applyEvent(HttpServletRequest request, JSONObject data) throws Exception;
+
+    String getAsyncJobResult(String tmpFileJobId,WxCorpInfo wxCorpInfo)  throws Exception;
 }

+ 18 - 15
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DingDingServiceImpl.java

@@ -2758,24 +2758,27 @@ public class DingDingServiceImpl implements DingDingService {
             String endTime = null;
             String realPlanStartTime = null;
             String realPlanEndTime = null;
-            for (int i=0;i<array.size(); i++) {
-                JSONObject obj = array.getJSONObject(i);
-                //出差类型
-                System.out.println(obj);
-                if (obj.getInteger("approve_biz_type") == 2) {
-                    if (obj.getString("check_type").equals("OnDuty")) {
-                        //出差开始时间
-                        System.out.println("出差开始时间=="+obj.getString("check_date_time"));
-                        startTime = obj.getString("check_date_time");
-                        realPlanStartTime = obj.getString("real_plan_time");
-                    } else {
-                        //出差结束时间
-                        System.out.println("出差结束时间=="+obj.getString("check_date_time"));
-                        endTime = obj.getString("check_date_time");
-                        realPlanEndTime = obj.getString("real_plan_time");
+            if (array != null) {
+                for (int i=0;i<array.size(); i++) {
+                    JSONObject obj = array.getJSONObject(i);
+                    //出差类型
+                    System.out.println(obj);
+                    if (obj.getInteger("approve_biz_type") == 2) {
+                        if (obj.getString("check_type").equals("OnDuty")) {
+                            //出差开始时间
+                            System.out.println("出差开始时间=="+obj.getString("check_date_time"));
+                            startTime = obj.getString("check_date_time");
+                            realPlanStartTime = obj.getString("real_plan_time");
+                        } else {
+                            //出差结束时间
+                            System.out.println("出差结束时间=="+obj.getString("check_date_time"));
+                            endTime = obj.getString("check_date_time");
+                            realPlanEndTime = obj.getString("real_plan_time");
+                        }
                     }
                 }
             }
+
             if (startTime != null && endTime != null) {
                 //获取到出差的时间,计算时长
                 DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

+ 18 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExcelExportServiceImpl.java

@@ -13,6 +13,7 @@ import com.management.platform.util.ExcelUtil;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.io.FileSystemResource;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
@@ -82,19 +83,33 @@ public class ExcelExportServiceImpl implements ExcelExportService {
         String resp = ExcelUtil.exportGeneralExcelByTitleAndList(title, list, downloadPath);
         String fileUrlSuffix = title + ".xlsx";
         if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
-//            FileSystemResource fileSystemResource = new FileSystemResource(path+fileUrlSuffix);
-//            Long checkSize = 20L*1024*1024;
+            FileSystemResource fileSystemResource = new FileSystemResource(path+fileUrlSuffix);
+//            String md5 = DigestUtils.md5Hex(FileUtil.readBytes(fileSystemResource.getFile()));
+
+            Long checkSize = 20L*1024*1024;
+            if(fileSystemResource.getFile().length() >= checkSize){
+                httpRespMsg.setError("文件过大,请缩短查询日期范围");
+                return httpRespMsg;
+            }
             String jobId = "";
             String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
             jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
 //            if(fileSystemResource.getFile().length() >= checkSize){
-//                jobId = wxCorpInfoService.getTranslationJobId(fileUrlSuffix,wxCorpInfo);
+//                String tmpFileJobId = wxCorpInfoService.getTranslationJobId(fileUrlSuffix,md5,wxCorpInfo);
+//                if(!StringUtils.isEmpty(tmpFileJobId)){
+//                    String mediaId = wxCorpInfoService.getAsyncJobResult(tmpFileJobId,wxCorpInfo);
+//                    jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
+//                }
 //            }else{
 //                String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
 //                jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
 //            }
 
             System.out.println("上传待转译文件到企业微信, jobId==" + jobId);
+//            if(StringUtils.isEmpty(jobId)){
+//                httpRespMsg.setError("转义jobId为空,请联系管理员");
+//                return httpRespMsg;
+//            }
             int i = 0;
             String syncTranslationResult = null;
             /**

+ 66 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -174,6 +174,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
     //获取服务商provider_access_token
     @Override
     public String getProviderAccessToken() throws Exception {
+        System.out.println("in getProviderAccessToken  method");
         String access_token="";
         String url = "https://qyapi.weixin.qq.com/cgi-bin/service/get_provider_token";
         HttpHeaders headers = new HttpHeaders();
@@ -192,6 +193,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
             }
             access_token= json.getString("provider_access_token");
         }
+        System.out.println("end getProviderAccessToken  method");
         return access_token;
     }
 
@@ -230,7 +232,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
     }
 
     @Override
-    public String getTranslationJobId(String fileName, WxCorpInfo wxCorpInfo) throws Exception {
+    public String getTranslationJobId(String fileName,String md5, WxCorpInfo wxCorpInfo) throws Exception {
         System.out.println("in getTranslationJobId method");
         String jobId="";
         //然后处理文件 通讯录id转译
@@ -240,8 +242,10 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         params.put("scene",1);
         params.put("type","file");
         params.put("filename",fileName);
-        params.put("url","https://worktime.ttkuaiban.com/upload/"+fileName);
-        params.put("md5","MD5");
+//        params.put("url","https://worktime.ttkuaiban.com/upload/"+fileName);
+        params.put("url","http://47.101.180.183:9097/upload/"+fileName);
+//        System.out.println("uploadJobFileUrl=== "+"http://47.101.180.183:9097/upload/"+fileName);
+        params.put("md5",md5);
         String requestBody = JSONObject.toJSONString(params);
         HttpEntity<String> entity = new HttpEntity<>(requestBody, headers);
         String apiUrl = "https://qyapi.weixin.qq.com/cgi-bin/media/upload_by_url?access_token="+getCorpAccessToken(wxCorpInfo);
@@ -253,7 +257,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         Map responseObj = objectMapper.readValue(responseBody, Map.class);
         if (responseEntity.getStatusCode() == HttpStatus.OK){
             if(null != responseObj.get("errcode") && 0 == Integer.parseInt(responseObj.get("errcode").toString())){
-                jobId = responseObj.get("job_id").toString();
+                jobId = responseObj.get("jobid").toString();
             }else{
                 System.out.println("error Trans====== "+responseObj.get("errmsg").toString());
             }
@@ -2574,4 +2578,62 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         }
         return "";
     }
+
+    @Override
+    public String getAsyncJobResult(String tmpFileJobId,WxCorpInfo wxCorpInfo) throws Exception{
+        System.out.println("in getAsyncJobResult method");
+        String mediaId = "";
+        HttpHeaders headers = new HttpHeaders();
+        headers.setContentType(MediaType.APPLICATION_JSON);
+        Map<String,Object> params = new HashMap<>();
+        params.put("jobid",tmpFileJobId);
+        String requestBody = JSONObject.toJSONString(params);
+        HttpEntity<String> entity = new HttpEntity<>(requestBody, headers);
+        String apiUrl = "https://qyapi.weixin.qq.com/cgi-bin/media/get_upload_by_url_result?access_token="+getCorpAccessToken(wxCorpInfo);
+        
+        int i = 0;
+        while(i < 100){
+            if (i < 10) {
+                Thread.sleep(300);
+            } else if (i < 20){
+                Thread.sleep(1000);
+            } else {
+                Thread.sleep(3000);
+            }
+            System.out.println("i=="+i+", "+LocalDateTime.now());
+            ResponseEntity<String> responseEntity = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class);
+            String responseBody = responseEntity.getBody();
+            System.out.println("getAsyncJobResult Response from API: " + responseBody);
+            JSONObject jsonRes = JSONObject.parseObject(responseBody);
+            if (responseEntity.getStatusCode() == HttpStatus.OK){
+                if(null != jsonRes.get("errcode") && 0 == Integer.parseInt(jsonRes.get("errcode").toString())){
+                    String status = jsonRes.get("status").toString();
+                    if("1".equals(status)){
+                        //处理中
+                    } else if ("2".equals(status)) {
+                        //已完成
+                        String detailStr = jsonRes.getString("detail");
+                        JSONObject detailJson = JSONObject.parseObject(detailStr);
+                        mediaId = detailJson.getString("media_id");
+                        break;
+                    } else if ("3".equals(status)) {
+                        //报错了
+                        String detailStr = jsonRes.getString("detail");
+                        System.out.println("detailStr==="+detailStr);
+                        JSONObject detailJson = JSONObject.parseObject(detailStr);
+                        System.out.println("企业微信转译报错:"+detailJson.getString("errmsg"));
+                        break;
+                    }
+                }else{
+                    System.out.println("error Trans====== "+jsonRes.get("errmsg").toString());
+                    break;
+                }
+            }
+            i++;
+        }
+
+
+        System.out.println("end getAsyncJobResult method");
+        return mediaId;
+    }
 }

+ 21 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -1564,11 +1564,23 @@ public class TimingTask {
                         return;
                     }
                     if (alertDay.equals(localDate.getDayOfMonth())) {
-                        //获取上个月的开始和节数日期
+                        //获取上个月的开始和结束日期
                         LocalDate startDate = localDate.minusMonths(1).with(TemporalAdjusters.firstDayOfMonth());
                         LocalDate endDate = localDate.minusMonths(1).with(TemporalAdjusters.lastDayOfMonth());
                         userList = reportService.getNotFullReportUserList(company.getId(), startDate, endDate);
                     }
+                } else if (t.getAlertType() == 5) {
+                    //3--每月固定日期提醒本月的
+                    Integer alertDay = t.getAlertDay();
+                    if (alertDay == null) {
+                        return;
+                    }
+                    if (alertDay.equals(localDate.getDayOfMonth())) {
+                        //获取本月的开始和结束日期
+                        LocalDate startDate = localDate.with(TemporalAdjusters.firstDayOfMonth());
+                        LocalDate endDate = localDate.with(TemporalAdjusters.lastDayOfMonth());
+                        userList = reportService.getNotFullReportUserList(company.getId(), startDate, endDate);
+                    }
                 } else if (t.getAlertType() == 4) {
                     //4--每周提醒上周漏填
                     LocalDate lastSunday = localDate.with(DayOfWeek.SUNDAY).minusWeeks(1);
@@ -1632,6 +1644,13 @@ public class TimingTask {
                                 } else {
                                     jsonObj.put("value", "您上个月有"+u.get("daysTxt")+"共"+(Integer)u.get("days")+"天未填写工时报告,请尽快填写");
                                 }
+                            } else if (t.getAlertType() == 5) {
+                                //每月提醒本月
+                                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) {
                                     String text = null;
@@ -1654,7 +1673,7 @@ public class TimingTask {
                                 json.put("content_item",dataJson);
                             }
                             if (cpList.size() > 0) {
-                                System.out.println("发送企业微信漏填提醒:" + LocalDateTime.now().toString() + ", corpUid=" + corpUid + ", json=" + json.toJSONString());
+//                                System.out.println("发送企业微信漏填提醒:" + LocalDateTime.now().toString() + ", corpUid=" + corpUid + ", json=" + json.toJSONString());
                                 wxCorpInfoService.sendWXCorpTemplateMsg(cpList.get(0), corpUid, json);
                             }
                         } else if (u.get("wxOpenid") != null) {

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -950,6 +950,7 @@
   "lastDayOfWeek": "Remind on the last day of current week",
   "alertLastWeek": "Remind last week's missing report",
   "monthAlert": "Remind last month's missed report on fixed day",
+  "curMonthAlert": "Remind current month's missed report on fixed day",
   "morningtime": "morning time",
   "owntimeframe": "Choose your own time frame",
   "personneltoset": "Don't remind people settings",

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -958,6 +958,7 @@
   "lastDayOfWeek": "每周最后一个工作日",
   "alertLastWeek": "每周提醒上周漏填",
   "monthAlert": "每月固定日期提醒上个月",
+  "curMonthAlert": "每月固定日期提醒本月",
   "remindertext": "提醒文本",
   "personneltoset": "不提醒人员设置",
   "addTian": "添加",

+ 8 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -223,9 +223,10 @@
                             <el-option :label="$t('missingfills')" :value="1"></el-option>
                             <el-option :label="$t('lastDayOfWeek')" :value="2"></el-option>
                             <el-option :label="$t('monthAlert')" :value="3"></el-option>
+                            <el-option :label="$t('curMonthAlert')" :value="5"></el-option>
                             <el-option :label="$t('alertLastWeek')" :value="4"></el-option>
                         </el-select>
-                        <span v-if="timeType.alertType == 3" style="color:#606266;">({{ $t('meiYue') }}
+                        <span v-if="timeType.alertType == 3 || timeType.alertType == 5" style="color:#606266;">({{ $t('meiYue') }}
                         <el-select v-model="timeType.alertDay" style="width:80px;">
                             <el-option v-for="item in alertDayRange" :label="item" :value="item" :key="item"></el-option>
                         </el-select>
@@ -236,7 +237,7 @@
                         </el-select>
                         {{ $t('tiXing') }})</span>
                     </el-form-item>
-                    <el-form-item v-if="timeType.alertType != 3" :label="$t('remindertext')" prop="alertMsg" style="margin-left:10px;">
+                    <el-form-item v-if="timeType.alertType != 3 && timeType.alertType != 5" :label="$t('remindertext')" prop="alertMsg" style="margin-left:10px;">
                             <el-input :placeholder="$t('peaseenterthe')" v-model="timeType.alertMsg" clearable class="apu" maxlength="50"></el-input>
                             <span v-if="timeType.alertType == 4" style="color:orange;margin-left:10px;">{{ $t('keYong_0BiaoShiLouTianRiQiLiRu_0JiangBeiTiHuanWei_05240525') }}</span>
                     </el-form-item>
@@ -809,7 +810,7 @@
                     onPreviousStep: this.myCustomPreviousStepCallback,   //在data中定义两个回调
                     onNextStep: this.myCustomNextStepCallback
                 },
-                alertDayRange: ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15'],
+                alertDayRange: [],
                 alertWeekDayRange: [{value:1,label:this.$t('weekDay.monday')},{value:2,label:this.$t('weekDay.tuesday')},{value:3,label:this.$t('weekDay.wednesday')},{value:4,label:this.$t('weekDay.thursday')},{value:5,label:this.$t('weekDay.friday')}],
                 pushParam:{
                     day:'05',
@@ -921,6 +922,10 @@
             };
         },
         mounted() {
+            this.alertDayRange = [];
+            for(let i=1; i<=30; i++){
+                this.alertDayRange.push(''+i)
+            }
             this.timeRange = []
             for(let i=0.5; i<=20; i+=0.5){
                 this.timeRange.push(i)