Browse Source

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

cs 2 years ago
parent
commit
6b67233f4d
27 changed files with 544 additions and 65 deletions
  1. 13 0
      fhKeeper/formulahousekeeper/inva_4_tivo/css/homemovement/homemovement.css
  2. 6 4
      fhKeeper/formulahousekeeper/inva_4_tivo/index.html
  3. 2 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java
  4. 21 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/CorpwxPreAuthCodeController.java
  5. 21 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/CorpwxRegisterCodeController.java
  6. 134 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java
  7. 53 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/CorpwxPreAuthCode.java
  8. 46 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/CorpwxRegisterCode.java
  9. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/CorpwxPreAuthCodeMapper.java
  10. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/CorpwxRegisterCodeMapper.java
  11. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/CorpwxPreAuthCodeService.java
  12. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/CorpwxRegisterCodeService.java
  13. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/CorpwxPreAuthCodeServiceImpl.java
  14. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/CorpwxRegisterCodeServiceImpl.java
  15. 60 40
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  16. 18 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/CorpwxPreAuthCodeMapper.xml
  17. 18 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/CorpwxRegisterCodeMapper.xml
  18. BIN
      fhKeeper/formulahousekeeper/timesheet/src/assets/image/qwcode.png
  19. 2 1
      fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json
  20. 2 1
      fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json
  21. 16 8
      fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue
  22. 2 2
      fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue
  23. 3 2
      fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue
  24. 9 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue
  25. 11 1
      fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue
  26. 2 2
      fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue
  27. 1 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

+ 13 - 0
fhKeeper/formulahousekeeper/inva_4_tivo/css/homemovement/homemovement.css

@@ -18,6 +18,19 @@ img {
     width: 100%;
 }
 
+.header_qw {
+    width: 3.7333rem;
+    margin-left: 4.1333rem;
+    height: .6667rem;
+}
+.header_qx {
+    width: 3.7333rem;
+    margin-left: .5333rem;
+    height: .6667rem;
+}
+.header_qw img, .header_qx img {
+    height: 100%;
+}
 /* 头部 */
 .header {
     box-sizing: border-box;

+ 6 - 4
fhKeeper/formulahousekeeper/inva_4_tivo/index.html

@@ -711,10 +711,11 @@
                 type : "GET",
                 url : "https://worktime.ttkuaiban.com/api/wxcorp/getPreAuthCode",
                 success : function(data){
+                    console.log(data, '扫码')
                     let suiteId = 'ww4e237fd6abb635af'
                     let huidiao = 'https://worktime.ttkuaiban.com/api/wxcorp/installFromWebsite'
                     let url = `https://open.work.weixin.qq.com/3rdapp/install?suite_id=${suiteId}&pre_auth_code=${data.data.code}&redirect_uri=${huidiao}&state=4`
-                    window.location.href = url
+                    window.open(url)
                 },
                 error:function(){
                     alert('请求失败');
@@ -729,8 +730,10 @@
                 url : "https://worktime.ttkuaiban.com/api/wxcorp/getRegisterCode",
                 success : function(data){
                     if(data.code == 'ok') {
-                        let url = `https://open.work.weixin.qq.com/3rdservice/wework/register?register_code=${data.data.code}`
-                        window.location.href = url
+                        setTimeout(function (){
+                            let url = 'https://open.work.weixin.qq.com/3rdservice/wework/register?register_code=' + data.data.code
+                            window.open(url)
+                        }, 700);
                     } else {
                         console.log(data)
                         alert(data.msg)
@@ -740,7 +743,6 @@
                     alert('请求失败');
                 }
             });
-
         })
     </script>
 

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java

@@ -50,6 +50,8 @@ public class AuthRedirectController {
     @Resource
     WxCorpInfoMapper wxCorpInfoMapper;
 
+
+
     @RequestMapping("/corpWXAuth")
     public ModelAndView auth(String code, String state) {
         Map<String,Object> reqParam = new HashMap<String,Object>(16);

+ 21 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/CorpwxPreAuthCodeController.java

@@ -0,0 +1,21 @@
+package com.management.platform.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+@RestController
+@RequestMapping("/corpwx-pre-auth-code")
+public class CorpwxPreAuthCodeController {
+
+}
+

+ 21 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/CorpwxRegisterCodeController.java

@@ -0,0 +1,21 @@
+package com.management.platform.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+@RestController
+@RequestMapping("/corpwx-register-code")
+public class CorpwxRegisterCodeController {
+
+}
+

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

@@ -3,6 +3,7 @@ package com.management.platform.controller;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.google.gson.JsonObject;
 import com.management.platform.constant.Constant;
 import com.management.platform.entity.*;
 import com.management.platform.entity.vo.UserVO;
@@ -77,8 +78,7 @@ public class WeiXinCorpController {
 
     public static final String GET_CORP_TOKEN = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=ID&corpsecret=SECRET";
 
-
-
+    public static final String GET_REGISTER_CODE = "https://qyapi.weixin.qq.com/cgi-bin/service/get_register_code?provider_access_token=PROVIDER_ACCESS_TOKEN";
     @Value("${suitId}")
     private String suitId;
     @Value("${suitSecret}")
@@ -181,6 +181,123 @@ public class WeiXinCorpController {
     CorpwxJobResultMapper corpwxJobResultMapper;
     @Resource
     private AuditWorkflowTimeSettingMapper auditWorkflowTimeSettingMapper;
+    @Resource
+    private CorpwxPreAuthCodeMapper corpwxPreAuthCodeMapper;
+    @Resource
+    private CorpwxRegisterCodeMapper corpwxRegisterCodeMapper;
+
+    @CrossOrigin
+    @RequestMapping("/getPreAuthCode")
+    public HttpRespMsg getPreAuthCode() {
+        HttpRespMsg msg = new HttpRespMsg();
+        List<CorpwxPreAuthCode> corpwxPreAuthCodes = corpwxPreAuthCodeMapper.selectList(new QueryWrapper<CorpwxPreAuthCode>());
+        boolean shouldRefresh = false;
+        CorpwxPreAuthCode oldItem = null;
+        if (corpwxPreAuthCodes.size() == 0) {
+            //调接口获取
+            shouldRefresh = true;
+        } else {
+            oldItem = corpwxPreAuthCodes.get(0);
+            if (oldItem.getExpireTime().isBefore(LocalDateTime.now())) {
+                shouldRefresh = true;
+            } else {
+                msg.data = oldItem;
+            }
+        }
+        if (shouldRefresh) {
+            try {
+                String url = GET_PREAUTH_CODE_URL.replace("SUITE_ACCESS_TOKEN", getSuiteAccessToken());
+                String forObject = this.restTemplate.getForObject(url, String.class);
+                JSONObject json = JSONObject.parseObject(forObject);
+                log.info("返回:"+json.toJSONString());
+                if (json.getIntValue("errcode") == 0) {
+                    String code = json.getString("pre_auth_code");
+                    CorpwxPreAuthCode item = new CorpwxPreAuthCode();
+                    LocalDateTime now = LocalDateTime.now();
+                    item.setCode(code);
+                    item.setIndate(now);
+                    LocalDateTime expireTime = now.plusSeconds(json.getInteger("expires_in"));
+                    item.setExpireTime(expireTime);
+                    if (oldItem != null) {
+                        item.setId(oldItem.getId());
+                        corpwxPreAuthCodeMapper.updateById(item);
+                    } else {
+                        corpwxPreAuthCodeMapper.insert(item);
+                    }
+                    msg.data = item;
+                } else {
+                    msg.setError(json.toString());
+                }
+            } catch (Exception exception) {
+                exception.printStackTrace();
+                msg.setError(exception.getMessage());
+            }
+        }
+        return msg;
+    }
+
+    @CrossOrigin
+    @RequestMapping("/getRegisterCode")
+    public HttpRespMsg getRegisterCode() {
+        HttpRespMsg msg = new HttpRespMsg();
+        List<CorpwxRegisterCode> list = corpwxRegisterCodeMapper.selectList(new QueryWrapper<CorpwxRegisterCode>());
+        boolean shouldRefresh = false;
+        CorpwxRegisterCode oldItem = null;
+        if (list.size() == 0) {
+            //调接口获取
+            shouldRefresh = true;
+        } else {
+            oldItem = list.get(0);
+            if (oldItem.getExpireTime().isBefore(LocalDateTime.now())) {
+                shouldRefresh = true;
+            } else {
+                msg.data = oldItem;
+            }
+        }
+        if (shouldRefresh) {
+            try {
+                String url = GET_REGISTER_CODE.replace("PROVIDER_ACCESS_TOKEN", wxCorpInfoService.getProviderAccessToken());
+                HttpHeaders headers = new HttpHeaders();
+                headers.setContentType(MediaType.APPLICATION_JSON);
+                JSONObject reqParam = new JSONObject();
+                //注册模板 -- 推广包ID
+                reqParam.put("template_id",  "tpl42135b6584b8e5c0");
+//                reqParam.put("corp_name",  "南京火石闪信网络科技有限公司");
+//                reqParam.put("admin_name",  "南京火石闪信网络科技有限公司");
+//                reqParam.put("admin_mobile",  "南京火石闪信网络科技有限公司");
+//                reqParam.put("state",  "南京火石闪信网络科技有限公司");
+                HttpEntity<String> requestEntity = new HttpEntity<String>(reqParam.toJSONString(), headers);
+                ResponseEntity<String> responseEntity = this.restTemplate.exchange(url,
+                        HttpMethod.POST, requestEntity, String.class);
+                if (responseEntity.getStatusCode() == HttpStatus.OK) {
+                    JSONObject json = JSONObject.parseObject(responseEntity.getBody());
+                    log.info("返回:"+json.toJSONString());
+                    if (json.getIntValue("errcode") == 0) {
+                        String code = json.getString("register_code");
+                        CorpwxRegisterCode item = new CorpwxRegisterCode();
+                        LocalDateTime now = LocalDateTime.now();
+                        item.setCode(code);
+                        item.setIndate(now);
+                        LocalDateTime expireTime = now.plusSeconds(json.getInteger("expires_in"));
+                        item.setExpireTime(expireTime);
+                        if (oldItem != null) {
+                            item.setId(oldItem.getId());
+                            corpwxRegisterCodeMapper.updateById(item);
+                        } else {
+                            corpwxRegisterCodeMapper.insert(item);
+                        }
+                        msg.data = item;
+                    } else {
+                        msg.setError(json.toString());
+                    }
+                }
+            } catch (Exception exception) {
+                exception.printStackTrace();
+                msg.setError(exception.getMessage());
+            }
+        }
+        return msg;
+    }
 
     //"获取企业微信jssdk初始化配置参数"
     @RequestMapping("/getCorpWXConfig")
@@ -3123,4 +3240,19 @@ public class WeiXinCorpController {
             System.out.println("++++++++++++++++++++++"+"版本变更失败!"+"++++++++++++++++++++++++");
         }
     }
+
+    @GetMapping("/installFromWebsite")
+    public ModelAndView installFromWebsite(@RequestParam String auth_code, @RequestParam Integer expires_in, @RequestParam String state){
+        System.out.println("installFromWebsite接收到请求:auth_code="+auth_code+", expires_in="+expires_in+",state="+state);
+        HttpRespMsg msg = new HttpRespMsg();
+        String url = "https://www.ttkuaiban.com";
+        ModelAndView view = new ModelAndView("redirect:"+url);
+        try {
+            handleCorpAuth(auth_code);
+        } catch (Exception exception) {
+            exception.printStackTrace();
+            msg.setError(exception.getMessage());
+        }
+        return view;
+    }
 }

+ 53 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/CorpwxPreAuthCode.java

@@ -0,0 +1,53 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class CorpwxPreAuthCode extends Model<CorpwxPreAuthCode> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("code")
+    private String code;
+
+    @TableField("indate")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime indate;
+
+    @TableField("expire_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime expireTime;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 46 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/CorpwxRegisterCode.java

@@ -0,0 +1,46 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class CorpwxRegisterCode extends Model<CorpwxRegisterCode> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("code")
+    private String code;
+
+    @TableField("indate")
+    private LocalDateTime indate;
+
+    @TableField("expire_time")
+    private LocalDateTime expireTime;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/CorpwxPreAuthCodeMapper.java

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.CorpwxPreAuthCode;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+public interface CorpwxPreAuthCodeMapper extends BaseMapper<CorpwxPreAuthCode> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/CorpwxRegisterCodeMapper.java

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.CorpwxRegisterCode;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+public interface CorpwxRegisterCodeMapper extends BaseMapper<CorpwxRegisterCode> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/CorpwxPreAuthCodeService.java

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.CorpwxPreAuthCode;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+public interface CorpwxPreAuthCodeService extends IService<CorpwxPreAuthCode> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/CorpwxRegisterCodeService.java

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.CorpwxRegisterCode;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+public interface CorpwxRegisterCodeService extends IService<CorpwxRegisterCode> {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/CorpwxPreAuthCodeServiceImpl.java

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.CorpwxPreAuthCode;
+import com.management.platform.mapper.CorpwxPreAuthCodeMapper;
+import com.management.platform.service.CorpwxPreAuthCodeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+@Service
+public class CorpwxPreAuthCodeServiceImpl extends ServiceImpl<CorpwxPreAuthCodeMapper, CorpwxPreAuthCode> implements CorpwxPreAuthCodeService {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/CorpwxRegisterCodeServiceImpl.java

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.CorpwxRegisterCode;
+import com.management.platform.mapper.CorpwxRegisterCodeMapper;
+import com.management.platform.service.CorpwxRegisterCodeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-11-22
+ */
+@Service
+public class CorpwxRegisterCodeServiceImpl extends ServiceImpl<CorpwxRegisterCodeMapper, CorpwxRegisterCode> implements CorpwxRegisterCodeService {
+
+}

+ 60 - 40
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -3070,6 +3070,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     public HttpRespMsg importData(String userId, MultipartFile multipartFile,Integer key, HttpServletRequest request) {
         HttpRespMsg msg = new HttpRespMsg();
         User user = userMapper.selectById(userId);
+        TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
         //然后处理文件
         String fileName = multipartFile.getOriginalFilename();
         File file = new File(fileName == null ? "file" : fileName);
@@ -3215,20 +3217,24 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             }else s2=s1;
                             String[] split = s2.split("/");
                             Optional<User> first;
-                            Integer exception;
+                            Integer exception=null;
                             if(split.length==1){
-                                first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                if(wxCorpInfo.getSaasSyncContact()!=1){
+                                    first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                }else {first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();}
                                 exception=0;
                             }else {
-                                first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
-                                exception=1;
+                                if(wxCorpInfo.getSaasSyncContact()!=1){
+                                    first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
+                                    exception=1;
+                                }else first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
                             }
                             if (first.isPresent()) {
                                 project.setInchargerId(first.get().getId());
                                 project.setInchargerName(first.get().getName());
                             } else {
                                 switch (exception){
-                                    case 0:throw new Exception("项目负责人姓名/工号为["+split[0]+"]的人员不存在");
+                                    case 0:throw new Exception(wxCorpInfo.getSaasSyncContact()==1?"项目负责人工号为["+split[0]+"]的人员不存在":"项目负责人姓名/工号为["+split[0]+"]的人员不存在");
                                     case 1:throw new Exception("项目负责人["+split[0]+"]姓名与工号不匹配");
                                 }
                             }
@@ -3307,13 +3313,17 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         }else s2=s1;
                         String[] split = s2.split("/");
                         Optional<User> first;
-                        Integer exception;
+                        Integer exception=null;
                         if(split.length==1){
-                            first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                            if(wxCorpInfo.getSaasSyncContact()!=1){
+                                first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                            }else {first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();}
                             exception=0;
                         }else {
-                            first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
-                            exception=1;
+                            if(wxCorpInfo.getSaasSyncContact()!=1){
+                                first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
+                                exception=1;
+                            }else first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
                         }
                         Participation p = new Participation();
                         if (first.isPresent()) {
@@ -3322,9 +3332,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             participationList.add(p);
                         } else {
                             switch (exception){
-                                case 0:throw new Exception("参与人姓名/工号为["+split[0]+"]的人员不存在");
-
-                                case 1:throw new Exception("参与人["+split[0]+"]姓名工号不匹配");
+                                case 0:throw new Exception(wxCorpInfo.getSaasSyncContact()==1?"参与人工号为["+split[0]+"]的人员不存在":"参与人姓名/工号为["+split[0]+"]的人员不存在");
+                                case 1:throw new Exception("参与人["+split[0]+"]姓名与工号不匹配");
                             }
                         }
                     }
@@ -3344,13 +3353,17 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                                 }else s2=s1;
                                 String[] split = str.split("/");
                                 Optional<User> first;
-                                Integer exception;
+                                Integer exception=null;
                                 if(split.length==1){
-                                    first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                    if(wxCorpInfo.getSaasSyncContact()!=1){
+                                        first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                    }else {first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();}
                                     exception=0;
                                 }else {
-                                    first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
-                                    exception=1;
+                                    if(wxCorpInfo.getSaasSyncContact()!=1){
+                                        first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
+                                        exception=1;
+                                    }else first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
                                 }
                                 if (first.isPresent()) {
                                     User partMemb = first.get();
@@ -3362,11 +3375,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                                     }
                                 } else {
                                     switch (exception){
-                                        case 0:throw new Exception("参与人姓名/工号为["+split[0]+"]的人员不存在");
-
-                                        case 1:throw new Exception("参与人["+split[0]+"]姓名工号不匹配");
+                                        case 0:throw new Exception(wxCorpInfo.getSaasSyncContact()==1?"参与人工号为["+split[0]+"]的人员不存在":"参与人姓名/工号为["+split[0]+"]的人员不存在");
+                                        case 1:throw new Exception("参与人["+split[0]+"]姓名与工号不匹配");
                                     }
-
                                 }
                             }
                         }
@@ -3423,7 +3434,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
                 //获取所有节点
                 List<ProjectKeyNodesSetting> projectKeyNodesSettingList = projectKeyNodesSettingMapper.selectList(new QueryWrapper<ProjectKeyNodesSetting>().eq("company_id", user.getCompanyId()));
-                TimeType timeType = timeTypeMapper.selectById(company.getId());
                 List<Project> projectList = new ArrayList<Project>();
                 //由于第一行需要指明列对应的标题
                 int rowNum = sheet.getLastRowNum();
@@ -3718,20 +3728,24 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             }else s2=s1;
                             String[] split = s2.split("/");
                             Optional<User> first;
-                            Integer exception;
+                            Integer exception=null;
                             if(split.length==1){
-                                first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                if(wxCorpInfo.getSaasSyncContact()!=1){
+                                    first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                }else {first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();}
                                 exception=0;
                             }else {
-                                first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
-                                exception=1;
+                                if(wxCorpInfo.getSaasSyncContact()!=1){
+                                    first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
+                                    exception=1;
+                                }else first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
                             }
                             if (first.isPresent()) {
                                 project.setInchargerId(first.get().getId());
                                 project.setInchargerName(first.get().getName());
                             } else {
                                 switch (exception){
-                                    case 0:throw new Exception("项目负责人姓名/工号为["+split[0]+"]的人员不存在");
+                                    case 0:throw new Exception(wxCorpInfo.getSaasSyncContact()==1?"项目负责人工号为["+split[0]+"]的人员不存在":"项目负责人姓名/工号为["+split[0]+"]的人员不存在");
                                     case 1:throw new Exception("项目负责人["+split[0]+"]姓名与工号不匹配");
                                 }
                             }
@@ -4290,13 +4304,17 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         }else s2=s1;
                         String[] split = s2.split("/");
                         Optional<User> first;
-                        Integer exception;
+                        Integer exception=null;
                         if(split.length==1){
-                            first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                            if(wxCorpInfo.getSaasSyncContact()!=1){
+                                first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                            }else {first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();}
                             exception=0;
                         }else {
-                            first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
-                            exception=1;
+                            if(wxCorpInfo.getSaasSyncContact()!=1){
+                                first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
+                                exception=1;
+                            }else first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
                         }
                         Participation p = new Participation();
                         if (first.isPresent()) {
@@ -4305,9 +4323,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             participationList.add(p);
                         } else {
                             switch (exception){
-                                case 0:throw new Exception("参与人姓名/工号为["+split[0]+"]的人员不存在");
-
-                                case 1:throw new Exception("参与人["+split[0]+"]姓名工号不匹配");
+                                case 0:throw new Exception(wxCorpInfo.getSaasSyncContact()==1?"参与人工号为["+split[0]+"]的人员不存在":"参与人姓名/工号为["+split[0]+"]的人员不存在");
+                                case 1:throw new Exception("参与人["+split[0]+"]姓名与工号不匹配");
                             }
                         }
                     }
@@ -4326,13 +4343,17 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                                 }else s2=s1;
                                 String[] split = s2.split("/");
                                 Optional<User> first;
-                                Integer exception;
+                                Integer exception=null;
                                 if(split.length==1){
-                                    first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                    if(wxCorpInfo.getSaasSyncContact()!=1){
+                                        first= userList.stream().filter(u -> u.getName().equals(split[0])||(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();
+                                    }else {first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[0]))).findFirst();}
                                     exception=0;
                                 }else {
-                                    first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
-                                    exception=1;
+                                    if(wxCorpInfo.getSaasSyncContact()!=1){
+                                        first= userList.stream().filter(u -> u.getName().equals(split[0])&&(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
+                                        exception=1;
+                                    }else first= userList.stream().filter(u ->(u.getJobNumber()!=null&&u.getJobNumber().equals(split[1]))).findFirst();
                                 }
                                 Participation p = new Participation();
                                 if (first.isPresent()) {
@@ -4345,9 +4366,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                                     }
                                 } else {
                                     switch (exception){
-                                        case 0:throw new Exception("参与人姓名/工号为["+split[0]+"]的人员不存在");
-
-                                        case 1:throw new Exception("参与人["+split[0]+"]姓名工号不匹配");
+                                        case 0:throw new Exception(wxCorpInfo.getSaasSyncContact()==1?"参与人工号为["+split[0]+"]的人员不存在":"参与人姓名/工号为["+split[0]+"]的人员不存在");
+                                        case 1:throw new Exception("参与人["+split[0]+"]姓名与工号不匹配");
                                     }
                                 }
                             }

+ 18 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/CorpwxPreAuthCodeMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.management.platform.mapper.CorpwxPreAuthCodeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.CorpwxPreAuthCode">
+        <id column="id" property="id" />
+        <result column="code" property="code" />
+        <result column="indate" property="indate" />
+        <result column="expire_time" property="expireTime" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, code, indate, expire_time
+    </sql>
+
+</mapper>

+ 18 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/CorpwxRegisterCodeMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.management.platform.mapper.CorpwxRegisterCodeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.CorpwxRegisterCode">
+        <id column="id" property="id" />
+        <result column="code" property="code" />
+        <result column="indate" property="indate" />
+        <result column="expire_time" property="expireTime" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, code, indate, expire_time
+    </sql>
+
+</mapper>

BIN
fhKeeper/formulahousekeeper/timesheet/src/assets/image/qwcode.png


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

@@ -1448,5 +1448,6 @@
   "xiang-mu-chuang-jian-shi-jian-duan": "Project Creation Period",
   "dao-chu-jia-qi": "Export holidays",
   "an-ji-du-dao-chu": "export by quarter",
-  "han-qing-jia": "(including leave)"
+  "han-qing-jia": "(including leave)",
+  "ke-fu-wei-xin": "Customer service wechat"
 }

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

@@ -1448,5 +1448,6 @@
   "xiang-mu-chuang-jian-shi-jian-duan": "项目创建时间段",
   "dao-chu-jia-qi": "导出假期",
   "an-ji-du-dao-chu": "按季度导出",
-  "han-qing-jia": "(含请假)"
+  "han-qing-jia": "(含请假)",
+  "ke-fu-wei-xin": "客服微信"
 }

+ 16 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -36,11 +36,17 @@
                     </span> 
                     <el-dropdown-menu slot="dropdown">
                         <el-dropdown-item >
-                            <div>
-                            <div>{{$t('other.sweepWeChatYards')}}</div>
-                            <img
-                            style="width: 120px; height: 120px"
-                            src="../assets/image/code.jpg" />
+                            <div v-if="!isCorpWX">
+                                <div>{{$t('other.sweepWeChatYards')}}</div>
+                                <img
+                                style="width: 120px; height: 120px"
+                                src="../assets/image/code.jpg" />
+                            </div>
+                            <div v-if="isCorpWX">
+                                <div>{{ $t('ke-fu-wei-xin') }}</div>
+                                <img
+                                style="width: 120px; height: 120px"
+                                src="../assets/image/qwcode.png" />
                             </div>
                         </el-dropdown-item>
                     </el-dropdown-menu>
@@ -97,8 +103,8 @@
                     <el-dropdown-menu slot="dropdown">
                         <!-- <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{roleArray[user.role]}}</span></el-dropdown-item> -->
                         <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{user.roleName}}</span></el-dropdown-item>
-                        <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-medal" ></i>{{user.jobNumber}}</span></el-dropdown-item>
-                        <el-dropdown-item @click.native="reset">{{$t('other.changeThePassword')}}</el-dropdown-item>
+                        <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-medal" v-if="user.jobNumber"></i>{{user.jobNumber}}</span></el-dropdown-item>
+                        <el-dropdown-item @click.native="reset" v-if="!isCorpWX">{{$t('other.changeThePassword')}}</el-dropdown-item>
                         <!-- <el-dropdown-item @click.native="editInfoOpen">修改信息</el-dropdown-item> -->
                         <el-dropdown-item divided @click.native="logout" v-if="!isCorpWX" >{{$t('other.launchTheLogin')}}</el-dropdown-item>
                     </el-dropdown-menu>
@@ -264,7 +270,8 @@
                 popoverData: [],
                 num: 0,
 
-                language: ''
+                language: '',
+                setTimeLoad: null
             };
         },
         methods: {
@@ -472,6 +479,7 @@
                     });
                 });
             },
+
             //点击消息的跳转
             locationHerf(id, date, type) {
                 this.http.post( this.port.manage.check, { id: id },

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -321,14 +321,14 @@
         <div class="informant"><!--  报销人 -->
           <el-form :model="ParticularsList" label-width="80px">
             <el-form-item :label="$t('peopleconcerned')" style="width: 270px" :rules="{ required: true, message: $t('pleaseselecttheapplicant'), trigger: 'blur' }">
-              <!-- <el-input v-show="flg" v-model="ParticularsList.ownerName" disabled ></el-input> -->
+              <el-input v-show="flg" v-model="ParticularsList.ownerName" disabled v-if="user.userNameNeedTranslate != '1'"></el-input>
               <!-- <el-select v-model="ParticularsList.ownerId" :placeholder="$t('pleaseselecttheapplicant')" style="width: 150px" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId">
                 <span v-for="(item, index) in users" :key="index">
                   <el-option :label="item.name" :value="item.id"></el-option>
                 </span>
               </el-select> -->
 
-              <selectCat v-if="user.userNameNeedTranslate != '1'" :size="'medium'" :widthStr="'150'" :distinction="'3'" :subject="users" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId" :subjectId="ParticularsList.ownerId" ref="selectCat" @selectCal="selectCal"></selectCat>
+              <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'3'" :subject="users" :disabled="flg || ParticularsList.ownerId == ParticularsList.operatorId" :subjectId="ParticularsList.ownerId" ref="selectCat" @selectCal="selectCal"></selectCat>
 
             </el-form-item>
             <el-form-item :label="$t('fillinthedate')">

+ 3 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -188,8 +188,9 @@
             <el-table-column prop="name" :label="$t('lable.name')" sortable width="150" fixed="left">
                 <template slot-scope="scope">
                     <div>
-                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
-                        <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.name}}</span>
+                        <!-- <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span> -->
+                        <!-- <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.name}}</span> -->
+                        {{scope.row.name}}
                     </div>
                 </template>
             </el-table-column>

+ 9 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -1,5 +1,7 @@
 <template>
     <section class="sectionaa">
+        <div v-loading="!componentFlg" :style="'width: 100%;height:'+tableHeight+'px'" id="components">
+        <div v-if="componentFlg">
         <el-tabs v-model="activeName" @tab-click="handleClick">
             <el-tab-pane :label="$t('maincontent')" name="project" @click="null" disabled=true>
                 <template slot="label">
@@ -1041,6 +1043,8 @@
                 </el-upload>
             </div>
         </el-dialog>
+        </div>
+        </div>
     </section>
 </template>
 <script>
@@ -1084,6 +1088,7 @@
         
         data() {
             return {
+                componentFlg: false,
                 mileageCup: false,
                 loadingExport : false,
                 saveTemplateLoading: false,
@@ -3305,6 +3310,10 @@
                 that.stageListHeight = that.tableHeight - 45;
                 that.taskListinH = that.stageListHeight - 75;
             };
+
+            setTimeout(function(){
+                that.componentFlg = true
+            }, 1000)
         },
         mounted() {
 
@@ -3317,7 +3326,6 @@
             
             this.getInsideData();
             this.getGroupTemplate();
-            
         }
     };
 </script>

+ 11 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -348,7 +348,17 @@
                                                 <span @click="deleteTaskProgress(recentProgressInfo.id)"><i class="el-icon-delete"></i>{{ $t('deleteList ') }}</span></el-dropdown-item>
                                         </el-dropdown-menu>
                                 </el-dropdown>
-                                <div class="elCard_qu">{{recentProgressInfo.creatorName}}{{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}</div>
+                                <div class="elCard_qu">
+                                    <span>
+                                        <span v-if="user.userNameNeedTranslate != '1'">
+                                            {{recentProgressInfo.creatorName}}
+                                        </span>
+                                        <span v-if="user.userNameNeedTranslate == '1'">
+                                            <ww-open-data type='userName' :openid='recentProgressInfo.creatorName'></ww-open-data>
+                                        </span>
+                                    </span>
+                                    {{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}
+                                </div>
                                 <p style="padding-left: 20px;">{{recentProgressInfo.content}}</p>
                                 <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">{{ $t('viewingHistory') }}</el-button></div>
                             </div>

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

@@ -335,8 +335,8 @@
         <!-- 新增/编辑人员的Dialog -->
         <el-dialog :title="title" :visible.sync="dialogVisible" width="580px" :top="'7.5vh'">
             <div style="height: 62vh;overflow: auto;">
-              <el-form ref="form12" :model="insertForm" :rules="rules" label-width="80px" v-if="user.userNameNeedTranslate != '1'">
-                  <el-form-item :label="$t('lable.name')" prop="name">
+              <el-form ref="form12" :model="insertForm" :rules="rules" label-width="80px">
+                  <el-form-item :label="$t('lable.name')" prop="name" v-if="user.userNameNeedTranslate != '1'">
                       <el-input v-model="insertForm.name" :placeholder="$t('peaseenterthe')" clearable :disabled="user.userNameNeedTranslate == '1'"></el-input>
                   </el-form-item>
                   <el-form-item :label="$t('lable.name')" prop="name"  v-if="user.userNameNeedTranslate == '1'">

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

@@ -480,7 +480,7 @@
                             this.yanjiuzx()
                         } else {
                             this.$toast.clear();
-                            this.$toast.fail(this.form.id==null?'新增失败':'修改失败');
+                            this.$toast.fail(res.msg);
                         }
                     }).catch(err=> {this.$toast.clear();});
                 } else {