Selaa lähdekoodia

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

ggooalice 2 vuotta sitten
vanhempi
commit
501b8681a8
47 muutettua tiedostoa jossa 12114 lisäystä ja 1260 poistoa
  1. 9 10
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java
  2. 21 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/CorpwxJobResultController.java
  3. 5 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java
  4. 275 101
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java
  5. 54 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/CorpwxJobResult.java
  6. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/LeaveSheet.java
  7. 4 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/ReportAuditorSetting.java
  8. 7 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java
  9. 7 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/User.java
  10. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/CorpwxJobResultMapper.java
  11. 2 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/LeaveSheetMapper.java
  12. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/CorpwxJobResultService.java
  13. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/WxCorpInfoService.java
  14. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/CorpwxJobResultServiceImpl.java
  15. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/CustomerInfoServiceImpl.java
  16. 5 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  17. 42 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  18. 105 9
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java
  19. 143 54
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java
  20. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java
  21. 11 4
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/DateTimeUtil.java
  22. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/CorpwxJobResultMapper.xml
  23. 6 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/LeaveSheetMapper.xml
  24. 6 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml
  25. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml
  26. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TimeTypeMapper.xml
  27. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserMapper.xml
  28. 10639 909
      fhKeeper/formulahousekeeper/management-platform/workTime.log
  29. 59 27
      fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue
  30. 6 2
      fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue
  31. 220 44
      fhKeeper/formulahousekeeper/timesheet/src/components/select.vue
  32. 4 0
      fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue
  33. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue
  34. 33 8
      fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue
  35. 16 2
      fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue
  36. 7 2
      fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue
  37. 65 16
      fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue
  38. 101 27
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue
  39. 48 9
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue
  40. 12 1
      fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue
  41. 54 4
      fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue
  42. 4 4
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  43. 15 1
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue
  44. 17 2
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_import.vue
  45. 23 2
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_profession.vue
  46. 1 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/login/index.vue
  47. 2 3
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/center.vue

+ 9 - 10
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java

@@ -56,24 +56,22 @@ public class AuthRedirectController {
     UserMapper userMapper;
 
     @RequestMapping("/corpWXAuth")
-    public ModelAndView auth(String code, Integer state) {
+    public ModelAndView auth(String code, String state) {
         Map<String,Object> reqParam = new HashMap<String,Object>(16);
         String userAgent = request.getHeader("User-Agent");
         //获取设备类型
         String deviceType = UserAgentUtils.getDeviceType(userAgent);
-        if ("MOBILE".equals(deviceType)) {
-            state = 0;
-        } else {
-            state = 1;
-        }
+        boolean isMobile = "MOBILE".equals(deviceType);
+        System.out.println("corpWXAuth state=="+state);
         System.out.println("企微用户登录 code="+code);
         String url = WeiXinCorpController.GET_CORP_USERINFO_URL.replace("SUITE_ACCESS_TOKEN", getSuiteAccessToken()).replace("CODE", code);
         String forObject = this.restTemplate.getForObject(url, String.class);
         JSONObject obj = JSONObject.parseObject(forObject);
         System.out.println("企微身份:"+obj.toString());
         String wxUserId = obj.getString("UserId");
-
-        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("corpwx_userid", wxUserId));
+        String openUserId = obj.getString("open_userid");
+        System.out.println("wxUserId="+wxUserId+", openUserId="+openUserId);
+        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("corpwx_userid", openUserId));
         if (userList.size() > 0) {
             //该用户已存在
             User curUser = userList.get(0);
@@ -88,9 +86,9 @@ public class AuthRedirectController {
         }
         reqParam.put("hasTriedAutoLogin", 1);
         String redirecUrl = null;
-        if (state == 0) {
+        if (isMobile) {
             redirecUrl = "http://mobworktime.ttkuaiban.com";
-        } else if (state == 1) {
+        } else {
             redirecUrl = "http://worktime.ttkuaiban.com";
         }
         ModelAndView modelAndView = new ModelAndView(
@@ -99,6 +97,7 @@ public class AuthRedirectController {
         return modelAndView;
     }
 
+
     @GetMapping("testClient")
     @ResponseBody
     public String test(HttpServletRequest request) {

+ 21 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/CorpwxJobResultController.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-10-06
+ */
+@RestController
+@RequestMapping("/corpwx-job-result")
+public class CorpwxJobResultController {
+
+}
+

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

@@ -323,8 +323,13 @@ public class ReportController {
                 msg.setError("请设置审批人");
                 return msg;
             } else {
+                auditorSettingList = new ArrayList<>();
                 for (int i=0;i<auditorSettingArray.length; i++) {
                     String str = auditorSettingArray[i];
+                    System.out.println(str);
+                    if (str.contains("@")) {
+                        str = str.replaceAll("@", ",");
+                    }
                     ReportAuditorSetting reportAuditorSetting = JSONObject.parseObject(str, ReportAuditorSetting.class);
                     auditorSettingList.add(reportAuditorSetting);
                     //检查审核人层级是否设置满

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 275 - 101
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java


+ 54 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/CorpwxJobResult.java

@@ -0,0 +1,54 @@
+package com.management.platform.entity;
+
+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-10-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class CorpwxJobResult extends Model<CorpwxJobResult> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId("job_id")
+    private String jobId;
+
+    @TableField("job_type")
+    private String jobType;
+
+    @TableField("err_code")
+    private Integer errCode;
+
+    @TableField("err_msg")
+    private String errMsg;
+
+    /**
+     * 授权企业corpid
+     */
+    @TableField("auth_corp_id")
+    private String authCorpId;
+
+    @TableField("indate")
+    private LocalDateTime indate;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.jobId;
+    }
+
+}

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/LeaveSheet.java

@@ -73,6 +73,7 @@ public class LeaveSheet extends Model<LeaveSheet> {
 
     /**
      * 0-审核通过,1-待审核,2-驳回,3-已撤回
+     * WX状态:1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付
      */
     @TableField("status")
     private Integer status;

+ 4 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/ReportAuditorSetting.java

@@ -1,9 +1,12 @@
 package com.management.platform.entity;
 
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
+
+import jdk.nashorn.internal.ir.annotations.Ignore;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -50,10 +53,9 @@ public class ReportAuditorSetting extends Model<ReportAuditorSetting> {
     /**
      * 抄送人
      */
-    @TableField("cc_userid")
+    @TableField(value = "cc_userid",updateStrategy = FieldStrategy.IGNORED)
     private String ccUserid;
 
-
     @Override
     protected Serializable pkVal() {
         return this.reportId;

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Seyason
- * @since 2022-09-27
+ * @since 2022-09-30
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -371,6 +371,12 @@ public class TimeType extends Model<TimeType> {
     @TableField("audit_level")
     private Integer auditLevel;
 
+    /**
+     * 任务列表是否有预估工时功能
+     */
+    @TableField("stage_has_evtime")
+    private Integer stageHasEvtime;
+
 
     @Override
     protected Serializable pkVal() {

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/User.java

@@ -21,7 +21,7 @@ import org.springframework.format.annotation.DateTimeFormat;
  * </p>
  *
  * @author Seyason
- * @since 2022-09-28
+ * @since 2022-10-08
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -245,6 +245,12 @@ public class User extends Model<User> {
     @TableField(exist = false)
     private String type;
 
+    /**
+     * 企业微信用户userid
+     */
+    @TableField("corpwx_real_userid")
+    private String corpwxRealUserid;
+
 
     @Override
     protected Serializable pkVal() {

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

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

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

@@ -16,4 +16,6 @@ import java.util.List;
 public interface LeaveSheetMapper extends BaseMapper<LeaveSheet> {
 
      List<LeaveSheet> summaryData(String keyword, String startDate, String endDate, Integer companyId);
+
+    List<LeaveSheet> selectApprovalList();
 }

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

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

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

@@ -32,7 +32,7 @@ public interface WxCorpInfoService extends IService<WxCorpInfo> {
 
     HttpRespMsg syncMembByCardTime(WxCorpInfo wxCorpInfo);
 
-    public List<LeaveSheet> WxLeaveNumber(String startTime,String endTime,List<WxCorpInfo> wxCorpInfos) throws Exception;
+    public List<LeaveSheet> WxLeaveNumber(String startTime,String endTime,List<WxCorpInfo> wxCorpInfos,List<LeaveSheet> ApprovalLeave) throws Exception;
 
     public String getProviderAccessToken() throws Exception;
 

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

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.CorpwxJobResult;
+import com.management.platform.mapper.CorpwxJobResultMapper;
+import com.management.platform.service.CorpwxJobResultService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-10-06
+ */
+@Service
+public class CorpwxJobResultServiceImpl extends ServiceImpl<CorpwxJobResultMapper, CorpwxJobResult> implements CorpwxJobResultService {
+
+}

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

@@ -104,8 +104,8 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
                     row.getCell(3).setCellType(CellType.STRING);
                     customerInfo.setContactPhone(row.getCell(3).getStringCellValue());
                 }
-                customerInfo.setEmail(StringUtils.isEmpty(row.getCell(3))?"":row.getCell(3).toString());
-                customerInfo.setAddress(StringUtils.isEmpty(row.getCell(4))?"":row.getCell(4).toString());
+                customerInfo.setEmail(StringUtils.isEmpty(row.getCell(4))?"":row.getCell(4).toString());
+                customerInfo.setAddress(StringUtils.isEmpty(row.getCell(5))?"":row.getCell(5).toString());
                 customerInfo.setCompanyId(companyId);
                 if(collect.size()>0){
                     Integer id=collect.get(0).getId();

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

@@ -5507,8 +5507,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             List<Map<String,Object>> dataList=new ArrayList<>();
             long days =dateTimeList.size();
             List<LeaveSheet> leaveSheets = leaveSheetList.stream().filter(ls -> ls.getOwnerId().equals(user.getId())
-                    &&(ls.getStartDate().isBefore(ChronoLocalDate.from(sDate))||ls.getStartDate().isEqual(ChronoLocalDate.from(sDate))||ls.getEndDate().isAfter(ChronoLocalDate.from(eDate))||ls.getEndDate().isEqual(ChronoLocalDate.from(eDate)))
-                    &&(ls.getEndDate().isAfter(ChronoLocalDate.from(eDate))||ls.getEndDate().isEqual(ChronoLocalDate.from(eDate))||ls.getEndDate().isAfter(ChronoLocalDate.from(sDate))||ls.getEndDate().isEqual(ChronoLocalDate.from(sDate)))).collect(Collectors.toList());
+                    &&(ls.getStartDate().isAfter(ChronoLocalDate.from(sDate))||ls.getStartDate().isEqual(ChronoLocalDate.from(sDate))||ls.getStartDate().isBefore(ChronoLocalDate.from(eDate))||ls.getStartDate().isEqual(ChronoLocalDate.from(eDate)))
+                    &&(ls.getEndDate().isBefore(ChronoLocalDate.from(eDate))||ls.getEndDate().isEqual(ChronoLocalDate.from(eDate))||ls.getEndDate().isAfter(ChronoLocalDate.from(sDate))||ls.getEndDate().isEqual(ChronoLocalDate.from(sDate)))).collect(Collectors.toList());
             TimelinessRateVO timelinessRateVO=new TimelinessRateVO();
             timelinessRateVO.setUserName(user.getName());
             timelinessRateVO.setJobNumber(user.getJobNumber());
@@ -5519,6 +5519,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             }
             List<Map<String, Object>> mapList = listMap.get(user.getName());
             //请假的不参与及时率统计
+            System.out.println(leaveSheets);
             if(leaveSheets.size()>0){
                 for (LeaveSheet leaveSheet : leaveSheets) {
                     List<LocalDateTime> leaveDateList = getDays(leaveSheet.getStartDate().atTime(LocalTime.MIN), leaveSheet.getEndDate().atTime(LocalTime.MIN));
@@ -5597,6 +5598,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     }
                     dataList.add(objectMap);
                 }
+                System.out.println(days);
+                System.out.println(num);
                 BigDecimal bigDecimal=new BigDecimal(num);
                 BigDecimal divide;
                 if(days!=0){

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

@@ -155,6 +155,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     @Resource
     private UserSalaryService userSalaryService;
     @Resource
+    LocaleInformationMapper localeInformationMapper;
+    @Resource
     private AuditWorkflowTimeSettingMapper auditWorkflowTimeSettingMapper;
     @Resource
     private ReportAlogMembdateService reportAlogMembdateService;
@@ -1830,13 +1832,24 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         String pNames = projectList.stream().map(Project::getProjectName).collect(Collectors.joining(", ", "[", "]"));
         String str = null;
         String fillUserId = null;
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", company.getId()));
         if (oneReport.getState() == -1) {//待部门直属领导审核
             //str = "您"+date+"导入的日报中"+pNames+"项目被["+user.getName()+"]驳回。原因:" + reason+",请重新导入。";
-            str = MessageUtils.message("profession.impProReject",date,pNames,user.getName(),reason);
+            String sendToUser = user.getName();
+            if (wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1) {
+                //需要转译
+                sendToUser = "$userName="+user.getCorpwxUserid()+"$";
+            }
+            str = MessageUtils.message("profession.impProReject",date,pNames,sendToUser,reason);
             fillUserId = oneReport.getFillUserid();
         } else {
             //str = "您"+date+"填写的日报中"+pNames+"项目被["+user.getName()+"]驳回。原因:" + reason;
-            str = MessageUtils.message("profession.fillProReject",date,pNames,user.getName(),reason);
+            String sendToUser = user.getName();
+            if (wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1) {
+                //需要转译
+                sendToUser = "$userName="+user.getCorpwxUserid()+"$";
+            }
+            str = MessageUtils.message("profession.fillProReject",date,pNames,sendToUser,reason);
             fillUserId = oneReport.getCreatorId();
         }
 
@@ -2173,7 +2186,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             if (timeType.getReportAuditType() == 2) {
                 allUsers = userMapper.selectList(new QueryWrapper<User>().select("id, name, department_id").eq("company_id", company.getId()));
                 //先分组负责人审核,再项目负责人审核
-                List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().select("id, state, group_audit_state, project_id, project_audit_state, creator_id, create_date").in("id", ids));
+                List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().select("id, state, group_audit_state, project_id, project_audit_state, creator_id, create_date, company_id").in("id", ids));
                 allReports = reportList;
                 List<Integer> assProjectIds = reportList.stream().map(Report::getProjectId).collect(Collectors.toList());
                 List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().select("id, incharger_id").in("id", assProjectIds));
@@ -3461,7 +3474,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             //检查模式,是否是一个项目多个工作事项的情况
             TimeType timeType = timeTypeMapper.selectOne(new QueryWrapper<TimeType>().eq("company_id", user.getCompanyId()));
             Company company = companyMapper.selectById(user.getCompanyId());
-
+            Integer companyId = company.getId();
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
             //准备导出
             HSSFWorkbook workbook = new HSSFWorkbook();
@@ -3684,6 +3697,26 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             }
             DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
             DecimalFormat df = new DecimalFormat("#0.0");
+            int offsetSeconds = 0;
+            if (company.getIsInternational() == 1) {
+                //国际化版本
+                LocaleInformation locale = localeInformationMapper.selectById(companyId);
+                TimeZone curZone = TimeZone.getTimeZone(locale.getTimezone());
+                offsetSeconds = (curZone.getRawOffset() - TimeZone.getTimeZone("GMT+8").getRawOffset())/1000;
+                //时区转换,默认数据库存的是GMT+8
+                for (Map<String, Object> map : allReportByDate) {
+                    String createTime = sdf.format((Date)map.get("time"));
+                    LocalDateTime time = LocalDateTime.parse(createTime, dtf);
+                    time = time.plusSeconds(offsetSeconds);
+                    map.put("time", DateTimeUtil.localDateTimeToDate(time));
+
+                    //审核时间
+                    String projectAuditTime = sdf.format((Date)map.get("projectAuditTime"));
+                    LocalDateTime auditTime = LocalDateTime.parse(projectAuditTime, dtf);
+                    auditTime = auditTime.plusSeconds(offsetSeconds);
+                    map.put("projectAuditTime", DateTimeUtil.localDateTimeToDate(auditTime));
+                }
+            }
             for (Map<String, Object> map : allReportByDate) {
                 HSSFRow row = sheet.createRow(rowNum);
                 row.createCell(0).setCellValue(rowNum);
@@ -3766,7 +3799,11 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         StringBuilder sb = new StringBuilder();
                         boolean isFirst = true;
                         for (ReportLogDetail audit:detailList) {
-                            String time = dtf.format(audit.getOperateDate());
+                            LocalDateTime operateDate = audit.getOperateDate();
+                            if (company.getIsInternational() == 1) {
+                                operateDate = operateDate.plusSeconds(offsetSeconds);
+                            }
+                            String time = dtf.format(operateDate);
                             String msg = time+" " + audit.getMsg();
                             if (!isFirst) {
                                 sb.append("->");

+ 105 - 9
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.management.platform.constant.Constant;
+import com.management.platform.controller.WeiXinCorpController;
 import com.management.platform.entity.*;
 import com.management.platform.entity.vo.UserVO;
 import com.management.platform.mapper.*;
@@ -26,9 +27,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
+import org.springframework.http.*;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 import org.springframework.web.client.RestTemplate;
@@ -64,6 +63,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     public String appId;
     @Value("${wx.app_secret}")
     public String appSecret;
+    @Value("${corpId}")
+    private String corpId;
+    @Value("${providerSecret}")
+    private String providerSecret;
     public static final String GET_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
     public static final String GET_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=accessToken&openid=openId&lang=zh_CN";
     @Resource
@@ -84,6 +87,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     @Resource
     private SysFunctionMapper sysFunctionMapper;
     @Resource
+    private CorpwxJobResultMapper corpwxJobResultMapper;
+    @Resource
     private SysRoleModuleService sysRoleModuleService;
     @Resource
     private SysRoleFunctionService sysRoleFunctionService;
@@ -143,6 +148,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     private CompanyReportMapper companyReportMapper;
     @Resource
     private ThirdPartyInterfaceMapper thirdPartyInterfaceMapper;
+    @Resource
+    SysConfigMapper sysConfigMapper;
     //登录网页端
     @Override
     public HttpRespMsg loginAdmin(String username, String password) {
@@ -398,7 +405,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         }
     }
 
-
     private boolean judgeIsLeader(String userId) {
         int cnt = projectAuditorMapper.selectCount(new QueryWrapper<ProjectAuditor>().eq("auditor_id", userId));
         return cnt>0;
@@ -425,11 +431,80 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         return httpRespMsg;
     }
 
-
     //获取员工的列表
     @Override
     public HttpRespMsg getEmployeeList(Integer departmentId, String keyword, Integer status, Integer roleId, Integer onlyDirect, Integer pageIndex, Integer pageSize, HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
+        Integer WXCompanyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", WXCompanyId));
+        if (wxCorpInfo!=null && keyword!=null && keyword.trim().length()!=0 && departmentId == -1){
+            if (wxCorpInfo.getSaasSyncContact()==1){
+                String AccessUrl = "https://qyapi.weixin.qq.com/cgi-bin/service/get_provider_token";
+                String url = "https://qyapi.weixin.qq.com/cgi-bin/service/contact/search?provider_access_token=ACCESS_TOKEN";
+                HttpHeaders headers = new HttpHeaders();
+                RestTemplate restTemplate = new RestTemplate();
+                MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
+                headers.setContentType(type);
+                headers.add("Accept", MediaType.APPLICATION_JSON.toString());
+                //获取服务商id
+                JSONObject AccessRequestMap = new JSONObject();
+                AccessRequestMap.put("corpid", corpId);
+                AccessRequestMap.put("provider_secret", providerSecret);
+                HttpEntity<JSONObject> AccessEntity = new HttpEntity<>(AccessRequestMap, headers);
+                ResponseEntity<String> AccessResponseEntity = restTemplate.postForEntity(AccessUrl, AccessEntity, String.class);
+                String providerToken ="";
+                if (AccessResponseEntity.getStatusCode() == HttpStatus.OK){
+                    String AccessResp = AccessResponseEntity.getBody();
+                    JSONObject json = JSONObject.parseObject(AccessResp);
+                    providerToken = json.getString("provider_access_token");
+                }else {
+                    httpRespMsg.setError("服务商token获取失败");
+                    return httpRespMsg;
+                }
+                //搜索通讯录名单
+                url = url.replace("ACCESS_TOKEN", providerToken);
+                JSONObject requestMap = new JSONObject();
+                requestMap.put("auth_corpid", wxCorpInfo.getCorpid());
+                requestMap.put("query_word", keyword);
+                requestMap.put("query_type", 1);
+                requestMap.put("query_range", 1);
+                requestMap.put("limit", 200);
+                //requestMap.put("cursor", pageSize);
+                HttpEntity<JSONObject> entity = new HttpEntity<>(requestMap, headers);
+                ResponseEntity<String> ResponseEntity = restTemplate.postForEntity(url, entity, String.class);
+                if (ResponseEntity.getStatusCode() == HttpStatus.OK) {
+                    String resp = ResponseEntity.getBody();
+                    JSONObject json = JSONObject.parseObject(resp);
+                    JSONObject queryResult = json.getJSONObject("query_result");
+                    if (!queryResult.isEmpty()){
+                        JSONArray jsonArray = queryResult.getJSONObject("user").getJSONArray("open_userid");
+                        if (jsonArray.size()!=0){
+                            Object[] user = jsonArray.toArray();
+                            List<User> users = userMapper.selectList(new QueryWrapper<User>().in("corpwx_userid", user));
+                            HashMap<String, Object> data = new HashMap<>();
+                            data.put("records",users);
+                            data.put("total",0);
+                            httpRespMsg.data=data;
+                            return httpRespMsg;
+                        }else {
+                            HashMap<String, Object> data = new HashMap<>();
+                            ArrayList<Object> records = new ArrayList<>();
+                            data.put("records",records);
+                            data.put("total",0);
+                            httpRespMsg.data=data;
+                            return httpRespMsg;
+                        }
+                    }else{
+                        HashMap<String, Object> data = new HashMap<>();
+                        ArrayList<Object> records = new ArrayList<>();
+                        data.put("records",records);
+                        data.put("total",0);
+                        httpRespMsg.data=data;
+                        return httpRespMsg;
+                    }
+                }
+            }
+        }
         try {
             Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
             TimeType timeType = timeTypeMapper.selectById(companyId);
@@ -1514,10 +1589,31 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                     file.delete();
                 }
             }*/
-                Thread.sleep(3000);
-                String syncTranslationResult = wxCorpInfoService.getSyncTranslationResult(jobId);
-                //返回生成的文件地址/upload文件夹下
-                httpRespMsg.data = syncTranslationResult;
+                int i = 0;
+                String syncTranslationResult = null;
+                /**
+                 * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
+                 * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+                 */
+                while (i < 10) {
+                    Thread.sleep(300);
+                    CorpwxJobResult corpwxJobResult = corpwxJobResultMapper.selectById(jobId);
+                    if (corpwxJobResult != null) {
+                        if (corpwxJobResult.getErrCode() == 0) {
+                            syncTranslationResult = wxCorpInfoService.getSyncTranslationResult(jobId);
+                        } else {
+                            httpRespMsg.setError(corpwxJobResult.getErrMsg());
+                            return httpRespMsg;
+                        }
+                        break;
+                    }
+                    i++;
+                }
+                if (syncTranslationResult != null) {
+                    httpRespMsg.data = syncTranslationResult;
+                } else {
+                    httpRespMsg.setError("处理超时...");
+                }
             }else {
                 httpRespMsg.data = "/upload/" + fileUrlSuffix;
             }

+ 143 - 54
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -8,10 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.gson.JsonObject;
 import com.management.platform.controller.WeiXinCorpController;
 import com.management.platform.entity.*;
-import com.management.platform.mapper.SysConfigMapper;
-import com.management.platform.mapper.UserCorpwxTimeMapper;
-import com.management.platform.mapper.UserMapper;
-import com.management.platform.mapper.WxCorpInfoMapper;
+import com.management.platform.mapper.*;
 import com.management.platform.service.WxCorpInfoService;
 import com.management.platform.util.*;
 import lombok.extern.slf4j.Slf4j;
@@ -87,6 +84,9 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
     @Resource
     UserCorpwxTimeMapper userCorpwxTimeMapper;
 
+    @Resource
+    LeaveSheetMapper leaveSheetMapper;
+
 
     //获取服务商provider_access_token
     @Override
@@ -862,7 +862,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
 
     //查询某时间段的微信请假审批单号及详情
     @Override
-    public List<LeaveSheet> WxLeaveNumber(String startTime,String endTime,List<WxCorpInfo> wxCorpInfos) throws Exception {
+    public List<LeaveSheet> WxLeaveNumber(String startTime,String endTime,List<WxCorpInfo> wxCorpInfos,List<LeaveSheet> ApprovalLeave) throws Exception {
         //存储更新失败的公司名称
         List<String> fail = new ArrayList<>();
         String url = "https://qyapi.weixin.qq.com/cgi-bin/oa/getapprovalinfo?access_token=ACCESS_TOKEN";
@@ -874,18 +874,82 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         headers.setContentType(type);
         headers.add("Accept", MediaType.APPLICATION_JSON.toString());
         for (WxCorpInfo wxCorpInfo : wxCorpInfos) {
-            //获取更新Access_token查询审批号
+            //更新Access_token
             String accessToken = getCorpAccessToken(wxCorpInfo);
             url = url.replace("ACCESS_TOKEN", accessToken);
+            //查询并更新审核中的审批单
+            if (ApprovalLeave.size()!=0){
+                for (LeaveSheet corpInfo : ApprovalLeave) {
+                    if (corpInfo.getCompanyId()==wxCorpInfo.getCompanyId()&&corpInfo.getProcinstId()!=null&&corpInfo.getProcinstId()!=""){
+                        detailUrl = detailUrl.replace("ACCESS_TOKEN", accessToken);
+                        JSONObject detailMap = new JSONObject();
+                        detailMap.put("sp_no",corpInfo.getProcinstId());
+                        HttpEntity<JSONObject> detailEntity = new HttpEntity<>(detailMap, headers);
+                        ResponseEntity<String> detailResponseEntity = restTemplate.postForEntity(detailUrl, detailEntity, String.class);
+                        if (detailResponseEntity.getStatusCode() == HttpStatus.OK){
+                            String detailResp = detailResponseEntity.getBody();
+                            JSONObject info = JSONObject.parseObject(detailResp).getJSONObject("info");
+                            Integer status = info.getInteger("sp_status");
+                            switch (status){
+                                //审批中
+                                case 1:
+                                    status=1;
+                                    break;
+                                //已通过
+                                case 2:
+                                    status=0;
+                                    break;
+                                //已驳回
+                                case 3:
+                                    status=2;
+                                    break;
+                                //已撤销
+                                case 4:
+                                    status=3;
+                                    break;
+                                //通过后撤销
+                                case 5:
+                                    status=5;
+                                    break;
+                                //通过后撤销
+                                case 6:
+                                    status=6;
+                                    break;
+                                //7-已删除
+                                case 7:
+                                    status=7;
+                                    break;
+                                default:
+                                    status=8;
+                            }
+                            if (status!=1){
+                                LeaveSheet leaveSheet = new LeaveSheet();
+                                leaveSheet.setId(corpInfo.getId());
+                                leaveSheet.setStatus(status);
+                                //添加审核人信息
+                                String approverUserId = info.getJSONArray("sp_record").getJSONObject(0)
+                                        .getJSONArray("details").getJSONObject(0)
+                                        .getJSONObject("approver").getString("userid");
+                                User approverUser = new User();
+                                if (approverUserId!=""&&approverUserId!=null){
+                                    approverUser= userMapper.selectOne(new QueryWrapper<User>().eq("corpwx_real_userid", approverUserId));
+                                }
+                                leaveSheet.setAuditorName(approverUser==null?approverUserId:approverUser.getName());
+                                leaveSheet.setAuditorId(approverUser==null?"":approverUser.getId());
+                                leaveSheetMapper.updateById(leaveSheet);
+                            }
+                        }else{
+                            System.err.println("请假单号错误");
+                        }
+                    }
+                }
+            }
+            //批量获取审批单号
             ArrayList<HashMap> list = new ArrayList<>();
             HashMap<String, String> record_type = new HashMap<>();
-            HashMap<String, String> sp_status = new HashMap<>();
             list.add(record_type);
-            list.add(sp_status);
             record_type.put("key", "record_type");
             record_type.put("value", "1");
-            sp_status.put("key", "sp_status");
-            sp_status.put("value", "2");
             JSONObject requestMap = new JSONObject();
             requestMap.put("starttime", startTime);
             requestMap.put("endtime", endTime);
@@ -908,42 +972,69 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                     if(ResponseEntity.getStatusCode() == HttpStatus.OK){
                         //封装请假单数据
                         String detailResp = detailResponseEntity.getBody();
-                        JSONObject detailJson = JSONObject.parseObject(detailResp);
-                        String info = detailJson.getString("info");
-                        JSONObject infoJson = JSONObject.parseObject(info);
+                        JSONObject infoJson = JSONObject.parseObject(detailResp).getJSONObject("info");
+                        //审核状态
+                        Integer sp_status = infoJson.getInteger("sp_status");
+                        switch (sp_status){
+                            //审批中
+                            case 1:
+                                sp_status=1;
+                                break;
+                            //已通过
+                            case 2:
+                                sp_status=0;
+                                break;
+                            //已驳回
+                            case 3:
+                                sp_status=2;
+                                break;
+                            //已撤销
+                            case 4:
+                                sp_status=3;
+                                break;
+                            //通过后撤销
+                            case 5:
+                                sp_status=5;
+                                break;
+                            //通过后撤销
+                            case 6:
+                                sp_status=6;
+                                break;
+                            //7-已删除
+                            case 7:
+                                sp_status=7;
+                                break;
+                            default:
+                                sp_status=8;
+                        }
                         //审批申请提交时间,Unix时间戳
                         LocalDateTime applyTime = LocalDateTime.ofEpochSecond(Long.parseLong(infoJson.getString("apply_time")), 0, ZoneOffset.ofHours(8));
                         //申请人姓名
                         String applyer = infoJson.getString("applyer");
                         String userId = JSONObject.parseObject(applyer).getString("userid");
-                        User user = userMapper.selectOne(new QueryWrapper<User>().eq("corpwx_userid", userId));
-                        if(user == null){
-                            System.out.println("申请人WxId查询不到");
-                            continue;
-                        }
-                        String name = user.getName();
+                        User user = userMapper.selectOne(new QueryWrapper<User>().eq("corpwx_real_userid", userId));
+                        String name = user==null?userId:user.getName();
                         //审批人姓名
-                        Object[] sp_record = infoJson.getJSONArray("sp_record").toArray();
-                        Object[] details = JSONObject.parseObject(sp_record[0].toString()).getJSONArray("details").toArray();
-                        String approver = JSONObject.parseObject(details[0].toString()).getString("approver");
-                        String approverUserId = JSONObject.parseObject(approver).getString("userid");
-                        User approverUser = userMapper.selectOne(new QueryWrapper<User>().eq("corpwx_userid", approverUserId));
-                        if(approverUser == null){
-                            System.out.println("审批人WxId为空");
-                            continue;
+                        String approverUserId = infoJson.getJSONArray("sp_record").getJSONObject(0)
+                                .getJSONArray("details").getJSONObject(0)
+                                .getJSONObject("approver").getString("userid");
+                        User approverUser = new User();
+                        if (approverUserId!=null&&approverUserId!=""){
+                            approverUser = userMapper.selectOne(new QueryWrapper<User>().eq("corpwx_real_userid", approverUserId));
                         }
-                        String approverName = approverUser.getName();
+                        String approverName = approverUser==null?approverUserId:approverUser.getName();
+                        JSONArray contents = infoJson.getJSONObject("apply_data")
+                                .getJSONArray("contents");
                         //请假类型
-                        String apply_data = infoJson.getString("apply_data");
-                        Object[] contents = JSONObject.parseObject(apply_data).getJSONArray("contents").toArray();
-                        String value = JSONObject.parseObject(contents[0].toString()).getString("value");
-                        String remarkValue = JSONObject.parseObject(contents[1].toString()).getString("value");
-                        String remark = JSONObject.parseObject(remarkValue).getString("text");
-                        String vacation = JSONObject.parseObject(value).getString("vacation");
-                        String selector = JSONObject.parseObject(vacation).getString("selector");
-                        Object[] options = JSONObject.parseObject(selector).getJSONArray("options").toArray();
-                        Object[] values = JSONObject.parseObject(options[0].toString()).getJSONArray("value").toArray();
-                        String text = JSONObject.parseObject(values[0].toString()).getString("text");
+                        JSONObject vacation = contents.getJSONObject(0)
+                                .getJSONObject("value")
+                                .getJSONObject("vacation");
+                        String text = vacation.getJSONObject("selector")
+                                .getJSONArray("options").getJSONObject(0)
+                                .getJSONArray("value").getJSONObject(0)
+                                .getString("text");
+                        //请假事由
+                        String remark = contents.getJSONObject(1).getJSONObject("value").getString("text");
                         Integer leave_type = 0;
                         switch (text){
                             case "事假":
@@ -975,39 +1066,40 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                                 break;
                         }
                         //请假开始时间
-                        String attendance = JSONObject.parseObject(vacation).getString("attendance");
-                        String date_range = JSONObject.parseObject(attendance).getString("date_range");
-                        String startDate = JSONObject.parseObject(date_range).getString("new_begin");
+                        JSONObject date_range = vacation.getJSONObject("attendance")
+                                .getJSONObject("date_range");
+                        String startDate =date_range.getString("new_begin");
                         SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
                         long startDateTemp = Long.valueOf(startDate);
                         String startDateString = sdf.format(new Date(startDateTemp * 1000L));
                         DateTimeFormatter startfmt = DateTimeFormatter.ofPattern("yyyy-MM-dd");
                         LocalDate sDate = LocalDate.parse(startDateString, startfmt);
                         //请假结束时间
-                        String endDate = JSONObject.parseObject(date_range).getString("new_end");
+                        String endDate = date_range.getString("new_end");
                         long endDatetemp = Long.valueOf(endDate);
                         String endDateString = sdf.format(new Date(endDatetemp * 1000L));
                         DateTimeFormatter endfmt = DateTimeFormatter.ofPattern("yyyy-MM-dd");
                         LocalDate eDate = LocalDate.parse(endDateString, endfmt);
                         //请假时长
-                        String timeHours = JSONObject.parseObject(date_range).getString("new_duration");
-                        String leaveType = JSONObject.parseObject(date_range).getString("type");
+                        String timeHours = date_range.getString("new_duration");
+                        String leaveType = date_range.getString("type");
                         LeaveSheet leaveSheet = new LeaveSheet();
+                        leaveSheet.setProcinstId(sp_no_lists[i].toString());
                         leaveSheet.setIsFinalAudit(1);
                         leaveSheet.setIndate(applyTime);
                         leaveSheet.setOwnerName(name);
-                        leaveSheet.setOwnerId(user.getId());
+                        leaveSheet.setOwnerId(user==null?"":user.getId());
                         leaveSheet.setCompanyId(user.getCompanyId());
                         leaveSheet.setTel(user.getPhone()==null?"":user.getPhone());
                         //审批人信息
                         leaveSheet.setAuditorName(approverName);
-                        leaveSheet.setAuditorId(approverUser.getId());
+                        leaveSheet.setAuditorId(approverUser==null?"":approverUser.getId());
                         //请假日期
                         leaveSheet.setStartDate(sDate);
                         leaveSheet.setEndDate(eDate);
                         //请假类型
                         leaveSheet.setLeaveType(leave_type);
-                        leaveSheet.setStatus(0);
+                        leaveSheet.setStatus(sp_status);
                         //请假说明
                         leaveSheet.setRemark(remark==null?"":remark);
                         //请假时长和天数
@@ -1020,24 +1112,21 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                             leaveSheet.setTimeDays(time/3600/24);
                         }
                         result.add(leaveSheet);
-                        for (LeaveSheet sheet : result) {
-                            System.out.println(sheet);
-                        }
                     }else{
-                        System.out.println(sp_no_lists[i]+"审批单详情查询失败");
+                        System.err.println(sp_no_lists[i]+"审批单详情查询失败");
                     }
                 }
             }else{
                 fail.add(wxCorpInfo.getCorpFullName());
-                System.out.println(wxCorpInfo.getCorpFullName()+"审批单查询失败");
+                System.err.println(wxCorpInfo.getCorpFullName()+"审批单查询失败");
             }
         }
         if (fail.size() == 0){
-            System.out.println("全部同步成功");
+            System.err.println("全部同步成功");
         }else{
             System.out.print("同步失败的公司有:");
             for (String s : fail) {
-                System.out.print(s+",");
+                System.err.print(s+",");
                 System.out.println();
             }
         }

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -313,8 +313,11 @@ public class TimingTask {
         if (isDev) return;
         String startTime = Long.toString(System.currentTimeMillis()/1000L-86400);
         String endTime = Long.toString(System.currentTimeMillis()/1000L);
+        //查询更新审批中的请假单
+        List<LeaveSheet> ApprovalLeave = leaveSheetMapper.selectApprovalList();
+        //插入请假单并更新审核中的请假单
         List<WxCorpInfo> wxCorpInfos = wxCorpInfoMapper.selectList(null);
-        List<LeaveSheet> leaveSheets = wxCorpInfoService.WxLeaveNumber(startTime,endTime, wxCorpInfos);
+        List<LeaveSheet> leaveSheets = wxCorpInfoService.WxLeaveNumber(startTime,endTime, wxCorpInfos,ApprovalLeave);
         for (LeaveSheet leaveSheet : leaveSheets) {
             leaveSheetMapper.insert(leaveSheet);
         }

+ 11 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/DateTimeUtil.java

@@ -3,13 +3,11 @@ package com.management.platform.util;
 import org.apache.tomcat.jni.Local;
 
 import java.math.BigDecimal;
-import java.time.Instant;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.ZoneId;
+import java.time.*;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.TemporalAccessor;
 import java.util.Arrays;
+import java.util.Date;
 
 public class DateTimeUtil {
     public static final String[] WEEK_DAYS = {"周一","周二","周三","周四","周五","周六", "周日"};
@@ -56,6 +54,15 @@ public class DateTimeUtil {
         return WEEK_DAYS[day-1];
     }
 
+    public static Date localDateTimeToDate(final LocalDateTime localDateTime) {
+        if (null == localDateTime) {
+            return null;
+        }
+        final ZoneId zoneId = ZoneId.systemDefault();
+        final ZonedDateTime zdt = localDateTime.atZone(zoneId);
+        final Date date = Date.from(zdt.toInstant());
+        return date;
+    }
 
     public static void main(String[] args) {
 

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/CorpwxJobResultMapper.xml

@@ -0,0 +1,20 @@
+<?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.CorpwxJobResultMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.CorpwxJobResult">
+        <id column="job_id" property="jobId" />
+        <result column="job_type" property="jobType" />
+        <result column="err_code" property="errCode" />
+        <result column="err_msg" property="errMsg" />
+        <result column="auth_corp_id" property="authCorpId" />
+        <result column="indate" property="indate" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        job_id, job_type, err_code, err_msg, auth_corp_id, indate
+    </sql>
+
+</mapper>

+ 6 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/LeaveSheetMapper.xml

@@ -41,4 +41,10 @@
         and company_id = #{companyId}
         group by owner_id
     </select>
+
+    <!-- 查询审核中的请假单信息 -->
+    <select id="selectApprovalList" resultType="com.management.platform.entity.LeaveSheet">
+       select * from leave_sheet
+       where procinst_id is not NULL AND procinst_id != '' and status = 1 and DATEDIFF(NOW(),indate) &lt; 30
+   </select>
 </mapper>

+ 6 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml

@@ -696,6 +696,7 @@
         left join project on project.id = report.project_id
         WHERE
         report.`state` = 1
+        AND user.`is_active` = 1
         AND report.`create_date` BETWEEN #{startDate} and #{endDate}
         AND user.`company_id` =#{companyId}
         <if test="userId!=null">
@@ -732,6 +733,7 @@
         left join project on project.id = report.project_id
         WHERE
         report.`state` = 1
+        AND user.`is_active` = 1
         AND report.`create_date` BETWEEN #{startDate} and #{endDate}
         AND user.`company_id` =#{companyId}
         <if test="userId!=null">
@@ -858,6 +860,7 @@
                 left join user u on u.id = a.project_auditor_id
                 WHERE a.company_id =#{companyId}
                 and a.state = 0
+                and u.is_active = 1
                 <if test="startDate!=null and endDate!=null">
                     AND a.create_date between #{startDate} and #{endDate}
                 </if>
@@ -893,6 +896,7 @@
                 left join department dp on u.department_id=dp.department_id
                 WHERE a.company_id =#{companyId}
                 and a.state = 0
+                and u.is_active = 1
                 <if test="startDate!=null and endDate!=null">
                     AND a.create_date between #{startDate} and #{endDate}
                 </if>
@@ -936,6 +940,7 @@
             left join user u on u.id = a.project_auditor_id
             WHERE a.company_id =#{companyId}
             and a.state = 0
+            and u.is_active = 1
             <if test="startDate!=null and endDate!=null">
                 AND a.create_date between #{startDate} and #{endDate}
             </if>
@@ -971,6 +976,7 @@
             left join department dp on u.department_id=dp.department_id
             WHERE a.company_id =#{companyId}
             and a.state = 0
+            and u.is_active = 1
             <if test="startDate!=null and endDate!=null">
                 AND a.create_date between #{startDate} and #{endDate}
             </if>

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -683,6 +683,7 @@
         where rl.company_id=#{companyId}
         and rl.create_date between  #{startDate} and #{endDate}
         and rl.msg like '%提交了%'
+        and `user`.is_active = 1
         group by user.id,rl.create_date
     </select>
 </mapper>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TimeTypeMapper.xml


+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserMapper.xml

@@ -40,6 +40,7 @@
         <result column="is_ops" property="isOps" />
         <result column="job_number" property="jobNumber" />
         <result column="corpwx_deptid" property="corpwxDeptid" />
+        <result column="corpwx_real_userid" property="corpwxRealUserid" />
     </resultMap>
     <resultMap id="BaseResultMap2" type="com.management.platform.entity.User">
         <id column="id" property="id" />
@@ -49,7 +50,7 @@
     </resultMap>
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, name, phone, password, portrait_url, create_time, role, company_id, department_id, department_cascade, cost, month_cost, salary_type, manage_dept_id, color, is_active, wx_openid, role_id, role_name, cost_apply_date, dingding_userid, dingding_unionid, corpwx_userid, induction_date, inactive_date, position, report_status, superior_id, plate1, plate2, plate3, plate4, plate5, is_ops, job_number, corpwx_deptid
+        id, name, phone, password, portrait_url, create_time, role, company_id, department_id, department_cascade, cost, month_cost, salary_type, manage_dept_id, color, is_active, wx_openid, role_id, role_name, cost_apply_date, dingding_userid, dingding_unionid, corpwx_userid, induction_date, inactive_date, position, report_status, superior_id, plate1, plate2, plate3, plate4, plate5, is_ops, job_number, corpwx_deptid, corpwx_real_userid
     </sql>
     <!--单独分页获取人员-->
     <select id="getUserByDepartment" resultType="java.util.Map">

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 10639 - 909
fhKeeper/formulahousekeeper/management-platform/workTime.log


+ 59 - 27
fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue

@@ -1,8 +1,8 @@
 <template>
   <div tabindex="0" @blur="selectClihide()" style="display: inline-block;position: relative;">  
     <div :class="disabled ? 'disabledTrue' : 'disabledFalse'" @mouseenter="moveIonDiv" @mouseleave="outIonDiv">
-        <div :style="`width:${selectWidth}px;height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'">
-            <div :style="'line-height: '+selectHeight+'px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
+        <div :style="`width:${selectWidth}px;height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click.stop="selectCli" :ref="disabled ? '' : 'selectDiv'">
+            <div :style="'line-height: '+selectHeight+'px;font-size: '+selectFontSize+'px;'" :class="(selectName == $t('defaultText.pleaseChoose') || selectName == $t('qing-xuan-ze-bu-men')) ? 'selecttex selecttexXuan' : 'selecttex'">
                 <ww-open-data type='departmentName' :openid='selectName'></ww-open-data>
                 <!-- {{selectName}} -->
             </div>
@@ -106,12 +106,17 @@ export default {
         widthStr: {
             type: String,
             default: false
-        }
+        },
+        // 默认文字
+        selectNameChuan: {
+            type: String
+        },
     },
     data() {
         return {
             selectWidth: '150',
             selectHeight: '28',
+            selectFontSize: '12',
             show: false, // 下拉框
             options: [], // 列表数据
             transitionBoxLiIdx: '-1', // hover 背景色
@@ -131,8 +136,8 @@ export default {
     watch: {
         subject: {
             handler(newValue, oldValue) {
-                console.log(newValue, '看看值')
                 this.options = newValue
+                console.log(this.options, '我收到的数据')
                 if(newValue) {
                     
                 }
@@ -150,36 +155,40 @@ export default {
                 console.log(newValue, oldValue)
                 this.optionsOId = newValue
                 if(this.optionsOId) {
-                    for(let i in this.options) {
-                        if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
-                            this.selectName = this.options[i].name || this.options[i].auditorName
-                        }
-                    }
+                    this.traverseArr(this.options, this.optionsOId)
                 }
             },
         },
         widthStr: {
             handler(newValue, oldValue) {
-                console.log('卧槽')
                 this.selectWidth = newValue
             },
         }
     },
-    created() {},
-    mounted() {
+    created() {
+        console.log(this.size)
         if(this.size == 'mini') {
             this.selectWidth = '150'
             this.selectHeight = '28'
         } else if(this.size == 'small') {
             this.selectWidth = '191'
             this.selectHeight = '32'
-        } 
+        } else if(this.size == 'medium') {
+            this.selectWidth = '205'
+            this.selectHeight = '40'
+            this.selectFontSize = '14'
+        }
         if(this.widthStr) {
-            console.log('one')
             this.selectWidth = this.widthStr
         }
+    },
+    mounted() {
+        if(this.selectNameChuan) {
+            this.selectName = this.selectNameChuan
+        }
         if(this.subject) {
             this.options = JSON.parse(JSON.stringify(this.subject))
+            console.log(this.options, '我收到的数据')
         }
         if(this.subjectId) {
             this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
@@ -189,13 +198,28 @@ export default {
                 }
             }
         }
-        console.log(this.subjectId)
         this.dailyListIndex = this.idx
+        console.log(this.selectWidth, this.selectHeight)
         // this.moveIon = JSON.parse(JSON.stringify(this.clearable))
     },
     methods: {
+        // 循环取值
+        traverseArr(arr, idd){
+            console.log(arr, idd, '传过来的值')
+            let id = idd[0]
+            if(arr) {
+                for(var i in arr) {
+                    if(arr[i].value == id) {
+                        this.selectName = arr[i].label
+                        return
+                    }
+                    if(arr[i].children) {
+                        this.traverseArr(arr[i].children, idd)
+                    }
+                }
+            }
+        },
         selectCli() {
-            console.log('我被你触发了')
             if(!this.disabled) {
                 this.$refs.selectDiv.focus()
                 this.classDiv = !this.classDiv
@@ -205,10 +229,13 @@ export default {
         },
         selectClihide() {
             if(this.classDiv) {
-                this.transitionBoxLiIdx = ''
-                this.show = !this.show
-                this.classDiv = false
-                this.move = false
+                let that = this
+                setTimeout(function () {
+                    that.transitionBoxLiIdx = ''
+                    that.show = !that.show
+                    that.classDiv = false
+                    that.move = false
+                }, 100)
             }
         },
         liMouseOver(index, item) {
@@ -223,6 +250,7 @@ export default {
         },
         // 点击
         liClist(item) {
+            console.log('我被你点击了')
             if(!item.children) {
                 this.selectName = item.label
                 let obj = {
@@ -235,14 +263,16 @@ export default {
                 this.selectName = item.label
                 let obj = {
                     id: item.value,
-                    distinction: this.distinction
+                    distinction: this.distinction,
+                    item: item
                 }
                 this.$emit('vueCasader', obj)
+            } else {
+                this.transitionBoxLiIdx = ''
+                this.show = !this.show
+                this.classDiv = false
+                this.move = false
             }
-            this.transitionBoxLiIdx = ''
-            this.show = !this.show
-            this.classDiv = false
-            this.move = false
         },
         // 接受子组件传过来的值
         cascaderOptionClick(item) {
@@ -267,7 +297,9 @@ export default {
                 label: this.$t('defaultText.pleaseChoose'),
                 value: ''
             }
-            this.show = true
+            this.show = false
+            this.classDiv = false
+            this.move = false
             this.liClist(obj)
         }
     },
@@ -344,7 +376,7 @@ export default {
         box-sizing: border-box;
         margin: 5px 0;
         // box-shadow: 0 2px 12px #dfdfdf;
-        max-height: 274px;
+        height: 274px;
         overflow: auto;
         z-index: 500 !important;
     }

+ 6 - 2
fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue

@@ -2,8 +2,11 @@
   <div class="childComponents">
     <div class="child">
         <ul class="transitionBoxUl">
-            <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click="liClick(item)"> 
-                <span :class="item.children ? 'idxspan' : ''" v-if="!radios">{{item.label}}</span>
+            <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click.stop="liClick(item)"> 
+                <span :class="item.children ? 'idxspan' : ''" v-if="!radios">
+                    <!-- {{item.label}} -->
+                    <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                </span>
                 <span v-if="radios" style="margin-left: -15px">
                     <el-radio v-model="departmentId" :label="item.value">
                         <span class="idxspan" style="margin-left: -10px"> 
@@ -97,6 +100,7 @@ export default {
         }
     },
     liClick(item) {
+        console.log('我是子组件')
         if(!item.children) {
             this.$emit("cascaderOptionClick", item);
         }

+ 220 - 44
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -3,26 +3,57 @@
     <!-- <div :style="'width:' + selectWidth + 'px;height:' + selectHeight + 'px'" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'"> -->
     <div :class="disabled ? 'disabledTrue' : 'disabledFalse'" @mouseenter="moveIonDiv" @mouseleave="outIonDiv">
         <div :style="`width:${selectWidth}px;height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'">
-            <div :style="'line-height: '+selectHeight+'px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
+            <div v-if="!multiSelect" :style="'line-height: '+selectHeight+'px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
                 <ww-open-data type='userName' :openid='selectName'></ww-open-data>
                 <!-- {{selectName}} -->
             </div>
+            <div v-if="multiSelect" :style="'line-height: '+selectHeight+'px;margin-left: -10px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
+                <span v-if="multiSelectList.length > 0">
+                    <span v-if="!tile">
+                        <span class="all">
+                            <ww-open-data type='userName' :openid='multiSelectList[0].name'></ww-open-data>
+                            <!-- {{multiSelectList[0].name}} -->
+                            <i class="el-icon-error" v-if="!disabled" @click.stop="deleteMultiSelectList('-1')"></i>
+                        </span>
+                        <span class="all" v-if="multiSelectList.length > 1"> + {{multiSelectList.length - 1}}</span>
+                    </span>
+                    <span v-if="tile">
+                        <span class="all" style="margin-right: 6px" v-for="(items, indexs) in multiSelectList" :key="indexs">
+                            <ww-open-data type='userName' :openid='multiSelectList[0].name'></ww-open-data>
+                            <!-- {{items.name}} -->
+                            <i class="el-icon-error" @click.stop="deleteMultiSelectList(indexs)" v-if="!disabled"></i>
+                        </span>
+                    </span>
+                </span>
+                <span v-else class="allTwo">{{$t('defaultText.pleaseChoose')}}</span>
+            </div>
             <i :class=" move ? 'el-icon-arrow-down iostu iostuHover' : 'el-icon-arrow-down iostu'" v-if="!moveIon"></i>
-            <i v-if="moveIon" class="el-icon-circle-close iostu" @click="clearDelete"></i>
+            <i v-if="moveIon" class="el-icon-circle-close iostu" @click.stop="clearDelete"></i>
         </div>
     </div>
     <transition name="el-zoom-in-top">
       <div v-show="show" style="position: relative;z-index: 99;">
         <div class="transitionBox">
             <ul class="transitionBoxUl">
-                <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index)" @click="liClick(item)"> 
-                    <span v-if="item.name">
-                        <ww-open-data type='userName' :openid='item.name'></ww-open-data>
-                    </span> 
-                    <span v-if="item.auditorName">
-                        <ww-open-data type='userName' :openid='item.auditorName'></ww-open-data>
+                <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index)" @click="liClick(item, index)"> 
+                    <span v-if="!multiSelect">
+                        <span v-if="item.name">
+                            <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                        </span> 
+                        <span v-if="item.auditorName">
+                            <ww-open-data type='userName' :openid='item.auditorName'></ww-open-data>
+                        </span>
+                    </span>
+
+                    <span v-if="multiSelect">
+                        <span :class="item.flg ? 'hoverSpan hoverSpanHover' : 'hoverSpan'">
+                            <span>
+                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                <!-- {{item.name}} -->
+                            </span>
+                            <span v-if="item.flg"><i class="el-icon-check"></i></span>
+                        </span>
                     </span>
-                    <!-- {{item.name || item.auditorName}} -->
                 </li>
             </ul>
         </div>
@@ -41,7 +72,17 @@ export default {
             type: String,
         },
         subjectId: {
-            type: [String, Number]
+            type: [String, Number, Array]
+        },
+        // 是否支持多选
+        multiSelect: {
+            type: Boolean,
+            default: false
+        },
+        // 是否平铺 (需要 multiSelect 为 true)
+        tile: {
+            type: Boolean,
+            default: false
         },
         // 当前页面用到的第几个
         distinction: {
@@ -56,6 +97,11 @@ export default {
             type: Boolean,
             default: false, // 默认值,不是填写日报
         },
+        // 宽度
+        widthStr: {
+            type: String,
+            default: false
+        },
         // 剩下统一索引
         index: {
             type: String
@@ -89,6 +135,7 @@ export default {
         return {
             selectWidth: '150',
             selectHeight: '28',
+            selectFontSize: '12',
             show: false, // 下拉框
             options: [], // 列表数据
             transitionBoxLiIdx: '', // hover 背景色
@@ -98,7 +145,8 @@ export default {
             dailyListObj: null, // 填写日报的数据
             dailyListIndex: null, // 日报点的索引
             move: false,
-            moveIon: false
+            moveIon: false,
+            multiSelectList: []
         };
     },
     computed: {},
@@ -125,14 +173,32 @@ export default {
             handler(newValue, oldValue) {
                 console.log(newValue, oldValue)
                 this.optionsOId = newValue
-                if(this.optionsOId) {
-                    for(let i in this.options) {
-                        if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
-                            this.selectName = this.options[i].name || this.options[i].auditorName
+                this.multiSelectList = []
+                if(!this.multiSelect) {
+                    if(this.optionsOId) {
+                        for(let i in this.options) {
+                            if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
+                                this.selectName = this.options[i].name || this.options[i].auditorName
+                            }
+                        }
+                    }
+                }
+                if(this.multiSelect) {
+                    for(var i in this.options) {
+                        for(var j in this.optionsOId) {
+                            if(this.options[i].id == this.optionsOId[j] || this.options[i].auditorId == this.optionsOId[j]) {
+                                this.multiSelectList.push(this.options[i])
+                                this.options[i].flg = true
+                            }
                         }
                     }
                 }
             },
+        },
+        widthStr: {
+            handler(newValue, oldValue) {
+                this.selectWidth = newValue
+            },
         }
     },
     created() {},
@@ -143,21 +209,41 @@ export default {
         } else if(this.size == 'small') {
             this.selectWidth = '191'
             this.selectHeight = '32'
-        } 
+        } else if(this.size == 'medium') {
+            this.selectWidth = '205'
+            this.selectHeight = '40'
+            this.selectFontSize = '14'
+        }
+        if(this.widthStr) {
+            this.selectWidth = this.widthStr
+        }
+        
         if(this.subject) {
             this.options = JSON.parse(JSON.stringify(this.subject))
         }
         if(this.subjectId) {
-            this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
-            for(let i in this.options) {
-                if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
-                     this.selectName = this.options[i].name || this.options[i].auditorName
+            this.multiSelectList = []
+            if(!this.multiSelect) {
+                this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
+                for(let i in this.options) {
+                    if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
+                        this.selectName = this.options[i].name || this.options[i].auditorName
+                    }
+                }
+            }
+            if(this.multiSelect) {
+                for(var i in this.options) {
+                    for(var j in this.optionsOId) {
+                        if(this.options[i].id == this.optionsOId[j] || this.options[i].auditorId == this.optionsOId[j]) {
+                            this.multiSelectList.push(this.options[i])
+                            this.options[i].flg = true
+                        }
+                    }
                 }
             }
         }
-        console.log(this.subjectId)
+        console.log(this.subject)
         this.dailyListIndex = this.idx
-        // this.moveIon = JSON.parse(JSON.stringify(this.clearable))
     },
     methods: {
         selectCli() {
@@ -174,33 +260,59 @@ export default {
                 this.show = !this.show
                 this.classDiv = false
                 this.move = false
+                if(this.multiSelect) {
+                    let obj = {
+                        // id: nameId,
+                        distinction: this.distinction,
+                        index: this.index, // 选中的索引
+                        other: this.other,
+                        arrUserList: this.multiSelectList
+                    }
+                    this.$emit("selectCal", obj)
+                }
             }
         },
         liMouseOver(index) {
             this.transitionBoxLiIdx = index
         },
-        liClick(item) {
+        liClick(item, itemIndex) {
             let nameId = item.id || item.auditorId
-            if(this.flg) {
-                let obj = {
-                    id: nameId,
-                    idx: this.dailyListIndex
+            if(!this.multiSelect) {
+                if(this.flg) {
+                    let obj = {
+                        id: nameId,
+                        idx: this.dailyListIndex
+                    }
+                    this.$emit("selectCatCli", obj);
+                } else {
+                    let obj = {
+                        id: nameId,
+                        distinction: this.distinction,
+                        index: this.index, // 选中的索引
+                        other: this.other
+                    }
+                    this.$emit("selectCal", obj)
                 }
-                this.$emit("selectCatCli", obj);
-            } else {
-                let obj = {
-                    id: nameId,
-                    distinction: this.distinction,
-                    index: this.index, // 选中的索引
-                    other: this.other
+                this.selectName = item.name || item.auditorName
+                this.transitionBoxLiIdx = ''
+                this.show = false
+                this.classDiv = false
+                this.move = false
+            }
+            if(this.multiSelect) {
+                if(this.options[itemIndex].flg) {
+                    this.options[itemIndex].flg = !this.options[itemIndex].flg
+                    for(var i in this.multiSelectList) {
+                        if(this.multiSelectList[i].id == item.id) {
+                            this.multiSelectList.splice(i, 1)
+                        }
+                    }
+                } else {
+                    this.options[itemIndex].flg = false
+                    this.options[itemIndex].flg = !this.options[itemIndex].flg
+                    this.multiSelectList.push(item)
                 }
-                this.$emit("selectCal", obj)
             }
-            this.selectName = item.name || item.auditorName
-            this.transitionBoxLiIdx = ''
-            this.show = !this.show
-            this.classDiv = false
-            this.move = false
         },
         moveIonDiv() {
             if(this.clearable) {
@@ -213,12 +325,54 @@ export default {
             }
         },
         clearDelete() {
-            this.selectName = this.$t('defaultText.pleaseChoose')
+            if(!this.multiSelect) {
+                this.selectName = this.$t('defaultText.pleaseChoose')
+                let obj = {
+                    name: this.$t('defaultText.pleaseChoose'),
+                    id: ''
+                }
+                this.liClick(obj)
+            }
+            if(this.multiSelect) {
+                this.multiSelectList = []
+                let obj = {
+                    distinction: this.distinction,
+                    index: this.index, // 选中的索引
+                    other: this.other,
+                    arrUserList: []
+                }
+                for(var i in this.options) {
+                    if(this.options[i].flg) {
+                        this.options[i].flg = false
+                    }
+                }
+                this.$emit("selectCal", obj)
+            }
+        },
+        deleteMultiSelectList(str) {
+            let userId
+            if(str == '-1') {
+                userId = this.multiSelectList[0].id
+                this.multiSelectList.splice(0, 1)
+            } else {
+                userId = this.multiSelectList[str].id
+                this.multiSelectList.splice(str, 1)
+            }
+            for(var i in this.options) {
+                if(this.options[i].id == userId) {
+                    if(this.options[i].flg) {
+                        this.options[i].flg = false
+                    }
+                }
+            }
+            
             let obj = {
-                name: this.$t('defaultText.pleaseChoose'),
-                id: ''
+                distinction: this.distinction,
+                index: this.index, // 选中的索引
+                other: this.other,
+                arrUserList: this.multiSelectList
             }
-            this.liClick(obj)
+            this.$emit("selectCal", obj)
         }
     },
     triggerOption(){
@@ -325,4 +479,26 @@ export default {
     .selecttexXuan {
         color: #C0C4CC;;
     }
+    .all {
+        display: inline-block;
+        font-size: 10px;
+        background: #f4f4f5;
+        height: 20px;
+        line-height: 24px;
+        padding: 0px 8px;
+        color: #909399;
+    }
+    .allTwo {
+        display: inline-block;
+        margin-left: 10px;
+    }
+    .hoverSpan {
+        display: flex;
+        width: 100%;
+        justify-content: space-between;
+    }
+    .hoverSpanHover {
+        color: #409eff;
+        font-weight: 700;
+    }
 </style>

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -503,6 +503,10 @@
                                                 console.log(window, 'window')
                                                 //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
                                                 window.WWOpenData.bind(document.querySelector('ww-open-data'))
+                                                if (WWOpenData.initCanvas) {
+                                                    WWOpenData.initCanvas()
+                                                    console.log('我企业微信 canvas 应该执行了吧')
+                                                }
                                             },
                                             fail: function (res) {
                                                 console.log('查看错误信息', res)

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue

@@ -196,7 +196,7 @@
             },
             tryAutoLogin() {
                 var appId = "ww4e237fd6abb635af";//企业微信第三方的SUIT ID
-                var url = "http://mobworktime.ttkuaiban.com/api/corpWXAuth";//授权回调页面
+                var url = "http://worktime.ttkuaiban.com/api/corpWXAuth";//授权回调页面
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
                 window.location.href = weixinUrl;
             },

+ 33 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue

@@ -397,7 +397,8 @@
             <el-dialog  :title="$t('pleaseselectapprover')" v-if="dialogVisible" :visible.sync="dialogVisible"  width="460px">
                 <el-form label-width="140px">
                     <el-form-item :label="$t('selectdepartmentsdesignatepersonnel')" >
-                        <el-cascader filterable ref="deptCascader" v-model="curDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" @change="chooseDept" :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
+                        <el-cascader filterable ref="deptCascader" v-model="curDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" @change="chooseDept" v-if="user.userNameNeedTranslate != 1" :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
+                        <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
                     </el-form-item>
                 </el-form>
                 <div slot="footer" class="dialog-footer">
@@ -660,9 +661,14 @@
 // 自定义select组件
 import selectCat from "@/components/select.vue"
 import citys from '../../assets/citys/shju.json'
+
+ // 引入自定义级联组件
+import vueCascader from "@/components/cascader.vue"
+
 export default {
     components: {
-        selectCat
+        selectCat,
+        vueCascader
     },
     name: "awayOffice",
     data(){
@@ -1670,14 +1676,33 @@ export default {
         addNode() {
             this.dialogVisible = false;
             if (this.curDeptId == null) return;
-            var node = this.$refs.deptCascader.getCheckedNodes()[0];
+
+            var node = this.user.userNameNeedTranslate != '1' ? this.vueCasaderItem : this.$refs.deptCascader.getCheckedNodes()[0];
+
+            // var node = this.$refs.deptCascader.getCheckedNodes()[0];
             if (this.isAdd) {
-                if(node.path[0] == 1){
-                    var node = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
-                }else if(node.path[0] == 2){
-                    var node = {userId: node.value, userName: node.label, auditorType: 2};
+                // if(node.path[0] == 1){
+                //     var node = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
+                // }else if(node.path[0] == 2){
+                //     var node = {userId: node.value, userName: node.label, auditorType: 2};
+                // }
+                var nodes
+                if(this.user.userNameNeedTranslate != 1) {
+                  if(node.path[0] == 1){
+                    nodes = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
+                  }else if(node.path[0] == 2){
+                    nodes = {userId: node.value, userName: node.label, auditorType: 2};
+                  }
+                } else {
+                  if(node.managerId) {
+                    nodes = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
+                  } else {
+                    nodes = {userId: node.value, userName: node.label, auditorType: 2};
+                  }
                 }
-                this.dataArray.splice(this.sindex, 0, node);
+
+
+                this.dataArray.splice(this.sindex, 0, nodes);
             } else {
             //编辑
                 this.dataArray[this.sindex].auditDeptId = node.value;

+ 16 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -86,11 +86,14 @@
         </el-select>
           
           <!-- 部门筛选 -->
-          <el-cascader v-if="(ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel)" v-model="departmentIdArray" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"
+          <el-cascader v-if="((ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel)) && user.userNameNeedTranslate != 1" v-model="departmentIdArray" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"
             :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable
             @change="selcts(9)" size="small" style="margin-left:10px"
           ></el-cascader>
 
+          <!-- 部门筛选 -->
+          <vueCascader :size="'small'" :widthStr="'125'" :clearable="true" :subject="departmentList" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="(((ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel)) && user.userNameNeedTranslate == 1)" :selectNameChuan="$t('qing-xuan-ze-bu-men')"></vueCascader>
+
           <!-- 任务筛选 -->
           <el-select v-if="ins == 1" v-model="taskTypeId" :placeholder="$t('pleaseselecttype')" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
             <el-option v-for="(item) in taskTypeObj" :key="item.id" :label="item.value" :value="item.id">
@@ -840,11 +843,14 @@
 
 // 自定义select组件
 import selectCat from "@/components/select.vue"
+// 引入自定义级联组件
+import vueCascader from "@/components/cascader.vue"
 
 export default {
   name: "expense",
   components: {
-    selectCat
+    selectCat,
+    vueCascader
   },
   props: {},
   data() {
@@ -2078,6 +2084,14 @@ export default {
         this.userId = obj.id
         this.selcts()
       }
+    },
+    vueCasader(obj) {
+      if(obj.distinction == 1) {
+        let arr = []
+        arr.push(obj.id)
+        this.departmentIdArray = arr
+        this.selcts(9)
+      }
     }
   },
 };

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

@@ -217,7 +217,7 @@
               </el-select>
             </el-form-item>
             <!-- 填报日期 -->
-            <el-form-item label="$t('fillinthedate')" >
+            <el-form-item :label="$t('fillinthedate')" >
               <el-date-picker
                 v-model="date"
                 type="daterange"
@@ -526,10 +526,15 @@
 <script>
 // 自定义select组件
 import selectCat from "@/components/select.vue"
+
+ // 引入自定义级联组件
+import vueCascader from "@/components/cascader.vue"
+
 export default {
   name: "expense",
   components: {
-    selectCat
+    selectCat,
+    vueCascader
   },
   props: {},
   data() {

+ 65 - 16
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -438,7 +438,10 @@
               <el-form label-width="140px">
               <el-form-item :label="$t('selectdepartmentsdesignatepersonnel')" >
                   <el-cascader filterable ref="deptCascader"  v-model="curDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" @change="chooseDept"
-                    :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
+                    :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable v-if="user.userNameNeedTranslate != 1"></el-cascader>
+
+                  <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
+
               </el-form-item>
               </el-form>
             <div slot="footer" class="dialog-footer">
@@ -473,8 +476,9 @@
                 clearable
                 :options="Nsdata"
                 :props="{ checkStrictly: true, expandTrigger: 'hover' }"
-                :show-all-levels="false">
+                :show-all-levels="false" v-if="user.userNameNeedTranslate != 1">
               </el-cascader>
+              <vueCascader :size="'small'" :widthStr="'120'" :clearable="true" :subject="Nsdata" :radios="true" :distinction="'2'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
             </div>
             
         </div>
@@ -679,11 +683,15 @@ import { config, error } from 'dingtalk-jsapi';
 import selectCat from "@/components/select.vue"
 import Select from '../../components/select.vue';
 
+ // 引入自定义级联组件
+import vueCascader from "@/components/cascader.vue"
+
 export default {
   name: "expense",
   components: {
     selectCat,
-    Select
+    Select,
+    vueCascader
   },
   props: {},
   data() {
@@ -842,7 +850,9 @@ export default {
       userSelId: '',
       synchronizeLoading: false,
       kuanBl: 0,
-      hubs: 0
+      hubs: 0,
+      vueCasaderItem: [], // 仿数据
+      vueIAlDataSItems: undefined, // 仿数据
     };
   },
   computed: {},
@@ -1156,17 +1166,17 @@ export default {
       )
     },
     selAl(){
-        let e = this.$refs.selectAl.getCheckedNodes()[0]
+        let e = this.user.userNameNeedTranslate != 1 ? this.$refs.selectAl.getCheckedNodes()[0] : this.vueIAlDataSItems
         if(e == undefined){
           this.iAlDataS = this.iAlData
         }else{
           this.iAlDataS = []
-        for (let i = 0; i < this.iAlData.length; i++) {
-          if (e.label == this.iAlData[i].department) {
-            this.iAlDataS.push(this.iAlData[i])
+          for (let i = 0; i < this.iAlData.length; i++) {
+            if (e.label == this.iAlData[i].department) {
+              this.iAlDataS.push(this.iAlData[i])
+            }
           }
         }
-        }
     },
     // ---------
 
@@ -1281,18 +1291,33 @@ export default {
                 
             },
     addNode() {
+      // console.log(this.curDeptId, 'zhilail')
+      // return
               this.dialogVisible = false;
               if (this.curDeptId == null) return;
-              var node = this.$refs.deptCascader.getCheckedNodes()[0];
-              // console.log("node",node);
+              // if(this.user.userNameNeedTranslate != '1') {
+              var node = this.user.userNameNeedTranslate != '1' ? this.vueCasaderItem : this.$refs.deptCascader.getCheckedNodes()[0];
+              // var node = this.$refs.deptCascader.getCheckedNodes()[0];
+              console.log(this.vueCasaderItem)
+              console.log("node",node);
               
               if (this.isAdd) {
-                if(node.path[0] == 1){
-                  var node = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
-                }else if(node.path[0] == 2){
-                  var node = {userId: node.value, userName: node.label, auditorType: 2};
+                if(this.user.userNameNeedTranslate != 1) {
+                  var nodes
+                  if(node.path[0] == 1){
+                    nodes = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
+                  }else if(node.path[0] == 2){
+                    nodes = {userId: node.value, userName: node.label, auditorType: 2};
+                  }
+                } else {
+                  if(node.managerId) {
+                    nodes = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
+                  } else {
+                    nodes = {userId: node.value, userName: node.label, auditorType: 2};
+                  }
                 }
-                this.dataArray.splice(this.sindex, 0, node);
+                
+                this.dataArray.splice(this.sindex, 0, nodes);
                 
               } else {
                 //编辑
@@ -1896,6 +1921,30 @@ export default {
         this.addForm.ownerId = obj.id
         this.selts()
       }
+    },
+    vueCasader(obj) {
+      if(obj.distinction == 1) {
+        let arr = []
+        arr.push(obj.id)
+        this.curDeptId = arr
+        this.vueCasaderItem = obj.item
+        console.log(obj)
+      } else if(obj.distinction == 2) {
+        let arr = []
+        arr.push(obj.id)
+        this.NcurDeptId = arr
+        console.log(obj, '闯过奥的值')
+        if(obj.item) {
+          if(obj.item.label != this.$t('defaultText.pleaseChoose')) {
+            this.vueIAlDataSItems = obj.item
+          } else {
+            this.vueIAlDataSItems = undefined
+          }
+        } else {
+          this.vueIAlDataSItems = undefined
+        }
+        this.selAl()
+      }
     }
   }
 };

+ 101 - 27
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -81,7 +81,7 @@
         <!--导出报表条件选择 -->
         <el-dialog :title="$t('timeReportExport')" v-if="exportDialog" :visible.sync="exportDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <el-form ref="form3" :model="exportParam" >
-                <el-form-item prop="projectId" :label="$t('defaultText.selectProject')" v-if="radio != $t('ren-yuan') && radio != $t('projectclassification')">
+                <el-form-item prop="projectId" :label="$t('defaultText.selectProject')" v-if="radio != $t('ren-yuan') && radio != $t('projectclassification') && radio != $t('lable.department')">
                     <el-select v-model="exportParam.projectId" :placeholder="$t('other.allProject')"  clearable style="width:350px;" filterable="true" popper-class="projectSelectPopperClass">
                         <el-option v-for="item in projectList"  :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
                             <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
@@ -128,14 +128,14 @@
                     ></el-date-picker>
                 </el-form-item>
                 
-                <el-form-item :label="$t('screening.selectPeople')" v-if="radio == $t('other.project') || radio == $t('lable.department') || radio == $t('projectclassification')">
+                <el-form-item :label="$t('screening.selectPeople')" v-if="radio == $t('other.project') || radio == $t('projectclassification')">
                     <el-select v-model="exportParam.userId"  :placeholder="$t('lable.allStaff')" style="width: 350px" filterable="true" clearable="true">
                         <span v-for="(item, index) in users" :key="index">
                         <el-option :label="item.name" :value="item.id"></el-option>
                         </span> 
                     </el-select>
                 </el-form-item>
-                <el-form-item prop="type" :label="$t('choosethestyle')" v-if="radio == $t('other.project') || radio == $t('lable.department') || radio == $t('projectclassification')">
+                <el-form-item prop="type" :label="$t('choosethestyle')" v-if="radio == $t('other.project') || radio == $t('projectclassification')">
                     <el-select v-model="exportParam.type" :placeholder="$t('choosethestyle')" style="width:350px;" >
                         <el-option :label="radio == $t('projectclassification') ? $t('classifiedontheline') : $t('Itemontheline')" value="0"></el-option>
                         <el-option :label="radio == $t('projectclassification') ? $t('classifiedcolumns') : $t('itemisonthecolumn')" value="1"></el-option>
@@ -148,7 +148,7 @@
                         </el-popover>
                     </div>
                 </el-form-item>
-                <el-form-item v-if="(radio == $t('other.project') || radio == $t('lable.department') || radio == $t('projectclassification')) && exportParam.type == '0'">
+                <el-form-item v-if="(radio == $t('other.project') || radio == $t('projectclassification')) && exportParam.type == '0'">
                     <el-checkbox v-model="exportParam.projectSum" >{{ $t('individualprojectdata') }}</el-checkbox>
                 </el-form-item>
 
@@ -437,10 +437,25 @@
                         // 
                         this.personnelAll = res.data
                         this.allListData = res.data
-                        this.gtff()
+
+                        if(this.user.userNameNeedTranslate == '1') {
+                            let list = res.data.list
+                            let dealWithList = []
+                            for(var i in list) {
+                                let obj = {}
+                                obj.type = list[i].type
+                                obj.id = list[i].name
+                                dealWithList.push(obj)
+                            }
+                            this.dealWithTranslationPlone(dealWithList, res.data.list)
+                        } else {
+                            this.personnelAll = res.data
+                            this.allListData = res.data
+                            this.gtff()
+                        }
                     } else {
                         this.$message({
-                        message: res.msg,
+                        message: res.msg + '里面',
                         type: "error"
                         });
                     }
@@ -448,7 +463,7 @@
                 error => {
                     this.listLoading = false;
                     this.$message({
-                        message: error,
+                        message: error + '外面',
                         type: "error"
                     });
                 });
@@ -742,10 +757,28 @@
                 this.http.post(url, param,
                 res => {
                     if (res.code == "ok") {
+                        // additionName // 未转译的数据另外存储一份,用作 DOM 上渲染
+                        if(this.user.userNameNeedTranslate == '1') {
+                            for(var i in res.data.costList) {
+                                res.data.costList[i].additionName = res.data.costList[i].departmentName
+                            }
+                        }
                         this.allListData = res.data
+                        console.log(this.allListData, '部门数据')
                         this.page = 1
-                        
-                        this.jieliu_echarts()
+                        if(this.user.userNameNeedTranslate == '1' && this.radio == this.$t('lable.department')) {
+                            console.log('进入我处理的方法')
+                            let arr = []
+                            for(var i in this.allListData.costList) {
+                                let obj = {}
+                                obj.type = this.allListData.costList[i].type
+                                obj.id = this.allListData.costList[i].departmentName
+                                arr.push(obj)
+                            }
+                            this.dealWithTranslation(arr)
+                        } else {
+                            this.jieliu_echarts()
+                        }
                     } else {
                         this.$message({
                             message: res.msg,
@@ -760,11 +793,54 @@
                     });
                 });
             },
+            dealWithTranslation(items) {
+                    if (WWOpenData.initCanvas) {
+                        WWOpenData.initCanvas()
+                    }
+                    const myFunOne = async () => {
+                        const result = await new Promise((resolve, reject) => {
+                            if(WWOpenData.prefetch) {
+                                 WWOpenData.prefetch({ items }, (err, data) => {
+                                    console.log(items)
+                                    console.log(err)
+                                    console.log(data)
+                                    if (err) { return reject(err) }
+                                    resolve(data)
+                                })
+                            }
+                           
+                        })
+                        for(var i in this.allListData.costList) {
+                            this.allListData.costList[i].departmentName = result.items[i].data
+                        }
+                        this.jieliu_echarts()
+                    }
+                    
+                    myFunOne()
+            },
+            dealWithTranslationPlone(items, dataList) {
+                    if (WWOpenData.initCanvas) {
+                        WWOpenData.initCanvas()
+                    }
+                    const myFunOne = async () => {
+                        const result = await new Promise((resolve, reject) => {
+                            if(WWOpenData.prefetch) {
+                                 WWOpenData.prefetch({ items }, (err, data) => {
+                                    if (err) { return reject(err) }
+                                    resolve(data)
+                                })
+                            }
+                        })
+                        for(var i in this.allListData.list) {
+                            this.allListData.list[i].name = result.items[i].data
+                        }
+                        this.gtff()
+                    }
+                    myFunOne()
+            },
             jieliu_echarts(){
                 var _this = this;
                 // 更具数据的长度去加每个柱子的间距
-                        
-
                         var xList = []
                         var yList = []
                         var list
@@ -896,7 +972,7 @@
                             }
                         }
                         totalHours = totalHours.toFixed(1);
-                var myChart = echarts.init(document.getElementById("container"));
+                        var myChart = echarts.init(document.getElementById("container"));
                         myChart.resize({
                             width: this.widthHtval
                         })
@@ -923,23 +999,21 @@
                                     trigger:'axis',
                                     formatter: function (params,ticket,callback) {
                                         _this.params = params;
-                                        var res = params[0].name + "<br/>" + 
-                                        ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
-                                        + _this.$t('yuan')+"<br/>" : '') + 
-                                        ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
-                                        // console.log(res, '将要渲染的数据')
+                                        var res 
+                                        if(_this.user.userNameNeedTranslate != '1') {
+                                            var res = params[0].name + "<br/>" + 
+                                            ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
+                                            + _this.$t('yuan')+"<br/>" : '') + 
+                                            ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
+                                        } else {
+                                            var res = "<ww-open-data type='departmentName' :openid='"+ _this.allListData.costList[params[0].dataIndex].additionName +"'></ww-open-data>" + "<br/>" + 
+                                            ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
+                                            + _this.$t('yuan')+"<br/>" : '') + 
+                                            ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
+                                        }
+                                        
                                         return res;
                                     }
-                                    // trigger:'axis',
-                                    //  formatter: function (params,ticket,callback) {
-                                    //      _this.params = params;
-                                    //      var res = params[0].name + "<br/>" + 
-                                    //      ((_this.permissions.countCost) ? "工作成本"+" : " + params[0].data.money 
-                                    //      + "元 <br/>" : '') + 
-                                    //      ((_this.permissions.countHours) ? "工作时长"+" : " + params[0].data.cost + "小时" : '');
-                                    //      return res;
-                                    //  }
-
                                 },
                                 xAxis: {
                                     data: xList,

+ 48 - 9
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -512,9 +512,10 @@
 
                 </el-form-item>
                 <el-form-item :label="$t('newspaperauditor')" v-show="user.timeType.reportAuditType==0">
-                    <el-select v-model="addForm.auditUserIds" multiple="true" :disabled=" !(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('defaultistheprojectleader')" style="width:100%;" >
+                    <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.auditUserIds" multiple="true" :disabled=" !(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('defaultistheprojectleader')" style="width:100%;" >
                         <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
+                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :tile="true" :widthStr="'800'" :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" :subjectId="addForm.auditUserIds" :subject="participator" :clearable="false" :distinction="'10'"  :multiSelect="true" @selectCal="selectCal"></selectCat>
                 </el-form-item>
                 <!--专业项目协作版本功能 -->
                 <el-form-item :label="$t('ji-bie')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.company.packageProject==1">
@@ -1011,11 +1012,25 @@
                 <el-scrollbar style="height:100%">
                     <el-input
                     :placeholder="$t('keywordfiltering')"
-                    v-model="filterText">
+                    v-model="filterText" v-if="user.userNameNeedTranslate != '1'">
                     </el-input>
-                <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
-                    ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
-                    highlight-current  :filter-node-method="filterNode"></el-tree>
+                    <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
+                        ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
+                        highlight-current  :filter-node-method="filterNode">
+                        <span class="custom-tree-node" slot-scope="{ node, data }">
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <span v-if="node.data.children">
+                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                </span>
+                                <span v-else>
+                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                </span>
+                            </span>
+                            <span v-if="user.userNameNeedTranslate != '1'">
+                                {{ node.label }}
+                            </span>
+                        </span>
+                    </el-tree>
                 </el-scrollbar>
             </div>
             <div>{{ $t('btn.choose') }}&nbsp;{{chosenMembCount}}&nbsp;{{ $t('other.people') }}</div>
@@ -1133,11 +1148,26 @@
                     <el-scrollbar style="height:100%">
                         <el-input
                         :placeholder="$t('keywordfiltering')"
-                        v-model="filterText2">
+                        v-model="filterText2"
+                        v-if="user.userNameNeedTranslate != 1">
                         </el-input>
                     <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
                         ref="chooseMembTree2" @check-change="addPersonCheck"
-                        highlight-current  :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person"></el-tree>
+                        highlight-current  :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person">
+                        <span class="custom-tree-node" slot-scope="{ node, data }">
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <span v-if="node.data.children">
+                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                </span>
+                                <span v-else>
+                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                </span>
+                            </span>
+                            <span v-if="user.userNameNeedTranslate != '1'">
+                                {{ node.label }}
+                            </span>
+                        </span>
+                        </el-tree>
                     </el-scrollbar>
                 </div>
                 <div>{{ $t('btn.choose') }}&nbsp;{{chosenMembCount}}&nbsp;{{ $t('other.people') }}</div>
@@ -1157,7 +1187,7 @@
                             <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
                         </el-option>
                     </el-select>
-                    <!-- <selectCat :size="'small'" :subject="users" :subjectId="paramInchargerId" :distinction="'5'" @selectCal="selectCal"></selectCat> -->
+                    <selectCat :size="'small'" :widthStr="'272'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="paramInchargerId" :distinction="'5'" @selectCal="selectCal"></selectCat>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
@@ -3391,6 +3421,7 @@ a {
             handleAdd(i, item) {
                 // console.log('handleadd',i,item);
                 this.contractAmountReasonShow = false
+                console.log(this.levelList, '看看打印出来的值')
                 if(i == -1) {
                     this.title = this.$t('newproject');
                     this.addForm = {
@@ -3400,7 +3431,7 @@ a {
                         userNames:'',
                         code:'',
                         inchargerId:null,
-                        level: this.user.timeType.projectLevelState == 1 ? this.levelList[0].id : 1,
+                        level: this.user.timeType.projectLevelState == 1 ? (this.levelList.length > 0 ? this.levelList[0].id : null) : 1,
                         customerId:null,
                         notifyUserNames:'',
                         chosenLeaders:[],
@@ -3599,6 +3630,7 @@ a {
                                this.addForm.auditUserIds = res.data.map(function(item) {
                                    return item.auditorId;
                                });
+                               this.$forceUpdate()
                             } else {
                                 this.$message({
                                     message: res.msg,
@@ -4043,6 +4075,13 @@ a {
                     this.projectProfessionList[obj.index].inchargerId == obj.id
                 } else if(obj.distinction =='5') {
                     this.paramInchargerId = obj.id
+                } else if(obj.distinction == '10') {
+                    let userList = obj.arrUserList
+                    let arr = []
+                    for(var i in userList) {
+                        arr.push(userList[i].id)
+                    }
+                    this.addForm.auditUserIds = arr
                 }
             }
         },

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

@@ -135,7 +135,12 @@
                     <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" sortable width="130">
                         <template slot-scope="scope">
                             <!-- <el-link type="primary" @click="showUser(scope.row.executorId)">{{scope.row.executorName}}</el-link> -->
-                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.departmentName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <span v-for="(item, index) in scope.row.executorNameList" :key="index">
+                                    <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                    <span v-if="index < scope.row.executorNameList.length - 1">,</span>
+                                </span>
+                            </span>
                             <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.executorName}}</span>
                         </template>
                     </el-table-column>
@@ -974,6 +979,12 @@ import { error } from 'dingtalk-jsapi';
                 res => {
                     this.listLoading = false;
                     if(res.code == 'ok') {
+                        if(this.user.userNameNeedTranslate == 1) {
+                            for(var i in res.data.records) {
+                                let arr = res.data.records[i].executorName.split(',')
+                                res.data.records[i].executorNameList = arr
+                            }
+                        }
                         this.list = res.data.records
                         this.total = res.data.total
                     } else {

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

@@ -24,6 +24,18 @@
                           <span v-else>
                             {{ node.label }}
                           </span>
+
+                          <!-- <span v-if="user.userNameNeedTranslate == '1'">
+                              <span v-if="node.data.children">
+                                  <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                              </span>
+                              <span v-else>
+                                  <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                              </span>
+                          </span>
+                          <span v-if="user.userNameNeedTranslate != '1'">
+                              {{ node.label }}
+                          </span> -->
                         </span>
 
                         <!-- <span v-if="node.label != '全部人员'" class="node none"> -->
@@ -66,7 +78,12 @@
                         </div>
                         <div v-else-if="depData != null && depData.id != -1 && depData.id != 0" class="nowTime" @click="createDepartment(0)">
                             <i class="fa fa-pencil-square-o"></i>
-                            {{depData!=null?depData.label:''}}
+                            <!-- {{depData !=null ? depData.label : ''}} -->
+                            <span v-if="translation == '1' && user.userNameNeedTranslate == '1'">{{depData != null ?depData.label:""}}</span>
+                            <span v-if="translation == '2' && user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='depData.label'></ww-open-data></span>
+                            <span v-if="translation == '3' && user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='depData.label'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate != '1'">{{depData != null ?depData.label:""}}</span>
+                            <!-- {{translation}} -->
                         </div>
                     </el-form-item>
                     <el-form-item>
@@ -241,8 +258,11 @@
                 <el-form-item :label="$t('setupdepartment')">
                     <!-- <el-cascader v-model="handleSelectionZzjgwillchange" placeholder="请选择部门" style="width: 60%;"
                     :options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader> -->
-                    <el-cascader v-model="handleSelectionZzjgwillchange" :placeholder="$t('qing-xuan-ze-bu-men')" style="width: 100%;"
+
+                    <el-cascader v-model="handleSelectionZzjgwillchange" v-if="user.userNameNeedTranslate != 1" :placeholder="$t('qing-xuan-ze-bu-men')" style="width: 100%;"
                     :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
+
+                    <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="option" :radios="false" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
@@ -332,7 +352,10 @@
                     <!-- <el-cascader v-model="insertForm.departmentId" placeholder="请选择部门" style="width: 100%"
                     :options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader> -->
                     <el-cascader v-model="insertForm.departmentId" :placeholder="$t('qing-xuan-ze-bu-men')" style="width: 100%"
-                    :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false"  clearable></el-cascader>
+                    :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false"  clearable v-if="user.userNameNeedTranslate != 1"></el-cascader>
+
+                    <vueCascader :size="'medium'" :widthStr="'430'" :clearable="true" :subject="option" :subjectId="insertForm.departmentId" :radios="true" :distinction="'2'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
+
                 </el-form-item>
                 <el-form-item :label="$t('immediatesuperior')">
                     <el-select v-model="insertForm.superiorId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" filterable clearable>
@@ -652,10 +675,14 @@
 // 左右滑動
 import dragMixin from "@/common/js/tensile.js";
 import util from "../../common/js/util";
+ // 引入自定义级联组件
+import vueCascader from "@/components/cascader.vue"
 let that
 export default {
   name: "Home",
-  components: {},
+  components: {
+    vueCascader
+  },
   mixins: [dragMixin],
   created() {
     let height = window.innerHeight;
@@ -703,6 +730,7 @@ export default {
   },
   data() {
     return {
+      translation: '1', // 1、文字, 2、部门, 3、人员
       fullscreenLoading: false,
       syncMembByCardTimeResultGialog:false,
       syncMembByCardTimeMsg:null,
@@ -2555,6 +2583,8 @@ export default {
 
     // 部门列表点击
     handleNodeClick(data) {
+      this.theValues(data)
+      console.log(data)
       if (this.depData == null || data.id != this.depData.id) {
         this.depData = data;
         this.page = 1;
@@ -2562,6 +2592,13 @@ export default {
       }
     },
 
+    theValues(obj) {
+        if(obj.id != '-1') {
+          this.translation = '2'
+        } else {
+          this.translation = '1'
+        }
+    },
     // 新增、修改部门
     createDepartment(i) {
       console.log(i, '看看')
@@ -3094,6 +3131,19 @@ export default {
     //       console.log(error, '哦耶')
     //    })
     // },
+
+    // 自定义组件事件
+    vueCasader(obj) {
+        if(obj.distinction == '1') {
+          let arr = []
+          arr.push(obj.id)
+          this.handleSelectionZzjgwillchange = arr
+        } else if(obj.distinction == '2') {
+          let arr = []
+          arr.push(obj.id)
+          this.insertForm.departmentId = arr
+        } 
+    } 
   },
   mounted() {
     this.deactiveDate = util.formatDate.format(new Date(), "yyyy-MM-dd");

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

@@ -4120,10 +4120,10 @@
                                     customText: list.report[i].customText,
                                     basecostId: list.report[i].basecostId,
 
-                                        auditorFirst: list.report[i].auditorSetting.auditorFirst ? list.report[i].auditorSetting.auditorFirst : '',
-                                        auditorSec: list.report[i].auditorSetting.auditorSec ? list.report[i].auditorSetting.auditorSec : '',
-                                        auditorThird: list.report[i].auditorSetting.auditorThird ? list.report[i].auditorSetting.auditorThird : '',
-                                        ccUserid: list.report[i].auditorSetting.ccUserid ? list.report[i].auditorSetting.ccUserid : '',
+                                        auditorFirst: list.report[i].auditorSetting && list.report[i].auditorSetting.auditorFirst ? list.report[i].auditorSetting.auditorFirst : '',
+                                        auditorSec: list.report[i].auditorSetting && list.report[i].auditorSetting.auditorSec ? list.report[i].auditorSetting.auditorSec : '',
+                                        auditorThird: list.report[i].auditorSetting && list.report[i].auditorSetting.auditorThird ? list.report[i].auditorSetting.auditorThird : '',
+                                        ccUserid: list.report[i].auditorSetting && list.report[i].auditorSetting.ccUserid ? list.report[i].auditorSetting.ccUserid : '',
 
                                     canEdit: list.report[i].state >= 2 ? true : false
                                 })

+ 15 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -12,12 +12,14 @@
                 </el-form-item>
 
                 <el-form-item :label="$t('ren-yuan')" style="width: 210px">
-                    <el-select v-model="search.userIdArray" :placeholder="$t('defaultText.pleaseChoose')" clearable @visible-change="usersSearch" @remove-tag="usersSearch(false)" @clear="usersSearch(false)" filterable="true" size="mini" style="width: 150px" multiple collapse-tags>
+                    <el-select v-if="user.userNameNeedTranslate != '1'" v-model="search.userIdArray" :placeholder="$t('defaultText.pleaseChoose')" clearable @visible-change="usersSearch" @remove-tag="usersSearch(false)" @clear="usersSearch(false)" filterable="true" size="mini" style="width: 150px" multiple collapse-tags>
                         <el-option v-for="item in searchUsersList" :key="item.id" :label="item.name" :value="item.id">
                             <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
                             <span style="float: left" v-if="user.userNameNeedTranslate != '1'">{{item.name}}</span>
                         </el-option>
                     </el-select>
+
+                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'size'" :subject="searchUsersList" :clearable="true" :multiSelect="true" @selectCal="selectCal"></selectCat>
                 </el-form-item>
 
                 <el-form-item :label="$t('other.project')" style="width: 215px">
@@ -913,6 +915,18 @@
                     }
                     this.getList(1)
                 }
+            },
+            selectCal(obj) {
+                console.log(obj, '过来的数据')
+                // search.userIdArray
+                let userListId = obj.arrUserList
+                let arr = []
+                for(var i in userListId) {
+                    arr.push(userListId[i].id)
+                }
+                this.search.userIdArray = arr
+                console.log(this.search.userIdArray, '数据看看')
+                this.usersSearch(false)
             }
         },
         created() {

+ 17 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_import.vue

@@ -6,8 +6,9 @@
                 <el-form-item :label="$t('lable.department') + ':'">
                     <el-cascader v-model="search.departmentId" :placeholder="$t('qing-xuan-ze-bu-men')" style="width: 100%"
                     :options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
-                    @change="getList()" size="small"
+                    @change="getList()" size="small" v-if="user.userNameNeedTranslate != 1"
                     ></el-cascader>
+                    <vueCascader :size="'small'" :widthStr="'191'" :clearable="true" :subject="option" :radios="false" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
                 </el-form-item>
                 <el-form-item :label="$t('other.project') + ':'">
                     <el-select v-model="search.projectId" :placeholder="$t('defaultText.pleaseChoose')" clearable @change="getList()" filterable="true" size="small">
@@ -229,8 +230,12 @@
 
 <script>
     import util from "../../common/js/util";
-
+    // 引入自定义级联组件
+    import vueCascader from "@/components/cascader.vue"
     export default {
+        components: {
+            vueCascader
+        },
         data() {
             return {
                 denyForm:null,
@@ -590,6 +595,16 @@
                         type: "error"
                     });
                 });
+            },
+            // 自定义组件
+            vueCasader(obj) {
+                console.log(obj)
+                if(obj.distinction == '1') {
+                    let arr = []
+                    arr.push(obj.id)
+                    this.search.departmentId = arr
+                    this.getList()
+                }
             }
         },
         created() {

+ 23 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_profession.vue

@@ -9,10 +9,13 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="部门:">
-                    <el-cascader v-model="search.departmentIdArray" placeholder="请选择部门" style="width: 100%"
+                    <el-cascader v-if="user.userNameNeedTranslate != 1" v-model="search.departmentIdArray" placeholder="请选择部门" style="width: 100%"
                     :options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
                     @change="getList()"
                     ></el-cascader>
+
+                    <vueCascader :size="'medium'" :clearable="true" :subject="option" :radios="false" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
+
                 </el-form-item>
                 <el-form-item label="日期:" style="margin-left:20px;">
                     <el-date-picker v-model="search.date" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
@@ -117,8 +120,12 @@
 
 <script>
     import util from "../../common/js/util";
-
+    // 引入自定义级联组件
+    import vueCascader from "@/components/cascader.vue"
     export default {
+        components: {
+            vueCascader
+        },
         data() {
             return {
                 isAllSelect:false,
@@ -351,6 +358,20 @@
                         type: "error"
                     });
                 });
+            },
+            // 自定义级联选择器
+            vueCasader(obj) {
+                console.log(obj, '级联选择器')
+                if(obj.distinction == '1') {
+                    if(obj.id != '') {
+                        let arr = []
+                        arr.push(obj.id)
+                        this.search.departmentIdArray = arr
+                    } else {
+                        this.search.departmentIdArray = []
+                    }
+                    this.getList()
+                }
             }
         },
         created() {

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

@@ -161,7 +161,7 @@
             },
             tryAutoLogin() {
                 var appId = "ww4e237fd6abb635af";//企业微信第三方的SUIT ID
-                var url = "http://mobworktime.ttkuaiban.com/api/corpWXAuth";//授权回调页面
+                var url = "http://worktime.ttkuaiban.com/api/corpWXAuth";//授权回调页面
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=0#wechat_redirect";
                 window.location.href = weixinUrl;
             },

+ 2 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/center.vue

@@ -71,11 +71,10 @@
                     appId = "ww4e237fd6abb635af"; //企业微信第三方的SUIT ID
                 } 
 
-                var url = "http://mobworktime.ttkuaiban.com/";//授权回调页面
-                var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state="+this.userInfo.id+"#wechat_redirect";
+                var url = "http://worktime.ttkuaiban.com/api/wxcorp/bindCorpWeiXin?userId="+this.userInfo.id;//授权回调页面
+                var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=0#wechat_redirect";
                 window.location.href = weixinUrl;
             },
-
         },
         create() {