Browse Source

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

seyason 2 năm trước cách đây
mục cha
commit
9c9cd45d9f
18 tập tin đã thay đổi với 199 bổ sung123 xóa
  1. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java
  2. 4 4
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java
  3. 24 12
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TaskExecutor.java
  4. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ProjectService.java
  5. 2 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/TaskService.java
  6. 5 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java
  7. 15 15
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  8. 59 36
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java
  9. 3 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml
  10. 14 7
      fhKeeper/formulahousekeeper/timesheet/src/permissions.js
  11. 8 11
      fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue
  12. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue
  13. 4 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue
  14. 9 7
      fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue
  15. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue
  16. 30 7
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  17. 18 11
      fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js
  18. BIN
      项目任务导入模板.xlsx

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java

@@ -506,7 +506,7 @@ public class ProjectController {
         return projectService.exportWaitingReviewList(request,stateKey,userId,startDate,endDate);
     }
     @RequestMapping("/batchSetParticipation")
-    public HttpRespMsg batchSetParticipation(HttpServletRequest request,Integer[] projectIdArray,String[] userIds){
+    public HttpRespMsg batchSetParticipation(HttpServletRequest request,String projectIdArray,String userIds){
         return projectService.batchSetParticipation(request,projectIdArray,userIds);
     }
 }

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

@@ -515,8 +515,8 @@ public class TaskController {
                 taskExecutorMapper.updateById(oldExe);
             } else {
                 //不存在,新增一条
-                TaskExecutor executor = TaskExecutor.fromTask(t);
-                taskExecutorMapper.insert(executor);
+                List<TaskExecutor> executors = TaskExecutor.fromTask(t);
+                taskExecutorService.saveBatch(executors);
             }
         }
         return msg;
@@ -680,8 +680,8 @@ public class TaskController {
     }
 
     @RequestMapping("/importTask")
-    public HttpRespMsg importUser(Integer projectId, Integer groupId, Integer stagesId, @RequestParam MultipartFile file) {
-        return taskService.importTask(projectId, groupId, stagesId, file, request);
+    public HttpRespMsg importUser(Integer projectId, Integer groupId, @RequestParam MultipartFile file) {
+        return taskService.importTask(projectId, groupId, file, request);
     }
 
 

+ 24 - 12
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TaskExecutor.java

@@ -1,14 +1,17 @@
 package com.management.platform.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
-import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * <p>
  * 
@@ -63,15 +66,24 @@ public class TaskExecutor extends Model<TaskExecutor> {
         return this.id;
     }
 
-    public static TaskExecutor fromTask(Task task) {
-        TaskExecutor executor = new TaskExecutor();
-        executor.setTaskId(task.getId());
-        executor.setProjectId(task.getProjectId());
-        executor.setPlanHours(task.getPlanHours());
-        executor.setExecutorId(task.getExecutorId());
-        executor.setExecutorName(task.getExecutorName());
-        executor.setExecutorColor(task.getExecutorColor());
-        return executor;
+    public static List<TaskExecutor> fromTask(Task task) {
+        String[] executorIdString = task.getExecutorId().split(",");
+        String[] executorNameString = task.getExecutorName().split(",");
+        String[] executorColorString = task.getExecutorColor().split(",");
+        List<TaskExecutor> executorList=new ArrayList<>();
+        if(executorIdString.length>0){
+            for (int i=0;i<executorIdString.length;i++) {
+                TaskExecutor executor = new TaskExecutor();
+                executor.setTaskId(task.getId());
+                executor.setProjectId(task.getProjectId());
+                executor.setPlanHours(task.getPlanHours());
+                executor.setExecutorId(executorIdString[i]);
+                executor.setExecutorName(executorNameString[i]);
+                executor.setExecutorColor(executorColorString[i]);
+                executorList.add(executor);
+            }
+        }
+        return executorList;
     }
 
     public static void fromTask(Task task, TaskExecutor executor) {

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

@@ -145,5 +145,5 @@ public interface ProjectService extends IService<Project> {
 
     HttpRespMsg exportWaitingReviewList(HttpServletRequest request, Integer stateKey, String userId,String startDate,String endDate);
 
-    HttpRespMsg batchSetParticipation(HttpServletRequest request,Integer[] projectIdArray,String[] userIds);
+    HttpRespMsg batchSetParticipation(HttpServletRequest request,String projectIdArray , String userIds);
 }

+ 2 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/TaskService.java

@@ -1,11 +1,10 @@
 package com.management.platform.service;
 
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.management.platform.entity.Task;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.management.platform.entity.Task;
 import com.management.platform.entity.TaskGroup;
 import com.management.platform.util.HttpRespMsg;
-import org.apache.poi.ss.formula.functions.T;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
@@ -37,7 +36,7 @@ public interface TaskService extends IService<Task> {
 
     HttpRespMsg exportTask(Integer projectId, Integer taskType);
 
-    HttpRespMsg importTask(Integer projectId, Integer groupId, Integer stagesId, MultipartFile file, HttpServletRequest request);
+    HttpRespMsg importTask(Integer projectId, Integer groupId, MultipartFile file, HttpServletRequest request);
 
     HttpRespMsg delete(TaskGroup item);
 

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

@@ -267,7 +267,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
         try {
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
-            //当前用户所属部门 或者 管理部门
+            //当前用户管理部门
             List<Integer> deptIds=null;
             List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("manager_id", targetUser.getId()).eq("company_id", companyId));
             List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看全公司");
@@ -299,7 +299,9 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
                 queryWrapper.in("department_id",deptIds);
             }
             //获取第一级部门
+            System.out.println(deptIds);
             List<Department> masterList = departmentMapper.selectList(queryWrapper);
+            System.out.println(masterList);
             Map<String, Object> resultMap = new HashMap<>();
             List<DepartmentMasterVO> list = new ArrayList<>();
             BigDecimal totalCostMoney = new BigDecimal(0);
@@ -352,7 +354,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
             Map<String, Object> resultMap = new HashMap<>();
-            //当前用户所属部门 或者 管理部门
+            //当前用户管理部门
             List<Integer> deptIds=null;
             List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("manager_id", targetUser.getId()).eq("company_id", companyId));
             List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看全公司");
@@ -364,7 +366,6 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
                 if(functionDpartList.size()>0){
                     if(functionTimeList.size()>0||functionCostList.size()>0){
                         deptIds = departmentList.stream().map(dp -> dp.getDepartmentId()).distinct().collect(Collectors.toList());
-                        deptIds.add(targetUser.getDepartmentId());
                     }
                 }else {
                     deptIds=new ArrayList<>();
@@ -462,7 +463,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
         try {
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
-            //当前用户所属部门 或者 管理部门
+            //当前用户管理部门
             List<Integer> deptIds=null;
             List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("manager_id", targetUser.getId()).eq("company_id", companyId));
             List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看全公司");
@@ -474,7 +475,6 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
                 if(functionDpartList.size()>0){
                     if(functionTimeList.size()>0||functionCostList.size()>0){
                         deptIds = departmentList.stream().map(dp -> dp.getDepartmentId()).distinct().collect(Collectors.toList());
-                        deptIds.add(targetUser.getDepartmentId());
                     }
                 }else {
                     deptIds=new ArrayList<>();

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

@@ -655,7 +655,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
             Map<String, Object> resultMap = new HashMap<>();
-            //当前用户所属部门 或者 管理部门
+            //当前用户管理部门
             List<Integer> deptIds=null;
             List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("manager_id", targetUser.getId()).eq("company_id", companyId));
             List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看全公司");
@@ -667,7 +667,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 if(functionDpartList.size()>0){
                     if(functionTimeList.size()>0||functionCostList.size()>0){
                         deptIds = departmentList.stream().map(dp -> dp.getDepartmentId()).distinct().collect(Collectors.toList());
-                        deptIds.add(targetUser.getDepartmentId());
                     }
                 }else {
                     deptIds=new ArrayList<>();
@@ -793,7 +792,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
             Map<String, Object> resultMap = new HashMap<>();
-            //当前用户所属部门 或者 管理部门
+            //当前用户管理部门
             List<Integer> deptIds=null;
             List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("manager_id", targetUser.getId()).eq("company_id", companyId));
             List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看全公司");
@@ -805,7 +804,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 if(functionDpartList.size()>0){
                     if(functionTimeList.size()>0||functionCostList.size()>0){
                         deptIds = departmentList.stream().map(dp -> dp.getDepartmentId()).distinct().collect(Collectors.toList());
-                        deptIds.add(targetUser.getDepartmentId());
                     }
                 }else {
                     deptIds=new ArrayList<>();
@@ -2030,7 +2028,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             if(functionAllList.size()==0){
                 if(functionDeptList.size()>0){
                     deptIds = departmentList.stream().map(dp -> dp.getDepartmentId()).distinct().collect(Collectors.toList());
-                    deptIds.add(user.getDepartmentId());
                 }else {
                     deptIds=new ArrayList<>();
                     deptIds.add(-1);
@@ -2788,6 +2785,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     }
                 }
                 item.put("realcostList", proRealCost);
+                BigDecimal baseCost=new BigDecimal(String.valueOf(item.get("baseCost")));
+                baseCost=baseCost.subtract((BigDecimal) item.get("feeMan"));
+                BigDecimal baseCurcost=new BigDecimal(String.valueOf(item.get("baseCurcost")));
+                baseCurcost=baseCurcost.subtract((BigDecimal) item.get("feeMan"));
+                item.put("remainingBudget",baseCost);
+                item.put("currentRemainingBudget",baseCurcost);
             }
         }
 
@@ -2990,7 +2993,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
             Map<String, Object> resultMap = new HashMap<>();
-            //当前用户所属部门 或者 管理部门
+            //当前用户管理部门
             List<Integer> deptIds=null;
             List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("manager_id", targetUser.getId()).eq("company_id", companyId));
             List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看全公司");
@@ -3002,7 +3005,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 if(functionDpartList.size()>0){
                     if(functionTimeList.size()>0||functionCostList.size()>0){
                         deptIds = departmentList.stream().map(dp -> dp.getDepartmentId()).distinct().collect(Collectors.toList());
-                        deptIds.add(targetUser.getDepartmentId());
                     }
                 }else {
                     deptIds=new ArrayList<>();
@@ -3129,7 +3131,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
             Map<String, Object> resultMap = new HashMap<>();
-            //当前用户所属部门 或者 管理部门
+            //当前用户管理部门
             List<Integer> deptIds=null;
             List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("manager_id", targetUser.getId()).eq("company_id", companyId));
             List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看全公司");
@@ -3141,7 +3143,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 if(functionDpartList.size()>0){
                     if(functionTimeList.size()>0||functionCostList.size()>0){
                         deptIds = departmentList.stream().map(dp -> dp.getDepartmentId()).distinct().collect(Collectors.toList());
-                        deptIds.add(targetUser.getDepartmentId());
                     }
                 }else {
                     deptIds=new ArrayList<>();
@@ -3283,7 +3284,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         if(functionAllList.size()==0){
             if(functionDeptList.size()>0){
                     deptIds = departmentList.stream().map(dp -> dp.getDepartmentId()).distinct().collect(Collectors.toList());
-                    deptIds.add(user.getDepartmentId());
+
             }else {
                 deptIds=new ArrayList<>();
                 deptIds.add(-1);
@@ -3375,7 +3376,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         if(functionAllList.size()==0){
             if(functionDeptList.size()>0){
                 deptIds = userDepartmentList.stream().map(dp -> dp.getDepartmentId()).distinct().collect(Collectors.toList());
-                deptIds.add(targetUser.getDepartmentId());
             }else {
                 deptIds=new ArrayList<>();
                 deptIds.add(-1);
@@ -3523,12 +3523,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     }
 
     @Override
-    public HttpRespMsg batchSetParticipation(HttpServletRequest request,Integer[] projectIdArray,String[] userIds) {
+    public HttpRespMsg batchSetParticipation(HttpServletRequest request,String  projectIdArray,String userIds) {
         HttpRespMsg msg=new HttpRespMsg();
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
-        List<Integer> ids = Arrays.asList(projectIdArray);
-        List<String> userIdList = (List<String>) Arrays.asList(userIds);
-        List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId).in("id", ids));
+        List<Integer> array = JSONArray.parseArray(projectIdArray, Integer.class);
+        List<String> userIdList = JSONArray.parseArray(userIds, String.class);
+        List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId).in("id",array));
         List<Participation> list=new ArrayList<>();
         for (Project project : projectList) {
             List<Participation> participationList = participationMapper.selectList(new QueryWrapper<Participation>().eq("project_id", project.getId()));

+ 59 - 36
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java

@@ -3,17 +3,15 @@ package com.management.platform.service.impl;
 import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.util.StringUtil;
 import com.management.platform.entity.*;
 import com.management.platform.mapper.*;
 import com.management.platform.service.CompanyDingdingService;
-import com.management.platform.service.MilestoneTaskRefService;
 import com.management.platform.service.TaskExecutorService;
 import com.management.platform.service.TaskService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.management.platform.util.*;
+import com.management.platform.util.HttpRespMsg;
 import org.apache.poi.hssf.usermodel.*;
-import org.apache.poi.ss.formula.functions.T;
 import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFRow;
@@ -27,10 +25,6 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import java.io.*;
-import java.math.BigDecimal;
-import java.math.RoundingMode;
-import java.sql.Timestamp;
-import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
@@ -299,7 +293,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
     }
 
     @Override
-    public HttpRespMsg importTask(Integer projectId, Integer groupId, Integer stagesId, MultipartFile multipartFile, HttpServletRequest request) {
+    public HttpRespMsg importTask(Integer projectId, Integer groupId, MultipartFile multipartFile, HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
 
         //首先先搞到公司id
@@ -307,13 +301,6 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
         User creator = userMapper.selectById(userId);
         Integer companyId = creator.getCompanyId();
         List<User> allUserList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
-        //获取当前导入的任务列表
-        Stages stages = stagesMapper.selectById(stagesId);
-        List<Task> maxList = taskMapper.selectList(new QueryWrapper<Task>().eq("stages_id", stagesId).orderByDesc("seq").last("limit 1"));
-        int seq = 1;
-        if (maxList.size() > 0) {
-            seq = maxList.get(0).getSeq() + 1;
-        }
         HashMap<String, Integer> taskTypeMap = new HashMap<>();
         taskTypeMap.put("任务", 0);
         taskTypeMap.put("里程碑", 1);
@@ -357,12 +344,14 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                     break;
                 }
                 XSSFCell typeCell = row.getCell(1);
-                XSSFCell executorCell = row.getCell(2);
-                XSSFCell levelCell = row.getCell(3);
-                XSSFCell endDateCell = row.getCell(4);
-                XSSFCell planHoursCell = row.getCell(5);
+                XSSFCell stagesCell = row.getCell(2);
+                XSSFCell executorCell = row.getCell(3);
+                XSSFCell levelCell = row.getCell(4);
+                XSSFCell endDateCell = row.getCell(5);
+                XSSFCell planHoursCell = row.getCell(6);
                 nameCell.setCellType(CellType.STRING);
                 typeCell.setCellType(CellType.STRING);
+                stagesCell.setCellType(CellType.STRING);
                 endDateCell.setCellType(CellType.NUMERIC);
                 planHoursCell.setCellType(CellType.STRING);
                 String name = nameCell.getStringCellValue();
@@ -375,20 +364,51 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                 task.setCompanyId(companyId);
                 task.setProjectId(projectId);
                 task.setGroupId(groupId);
-                String executorName = executorCell.getStringCellValue();
-                System.out.println("姓名=="+executorCell.getStringCellValue());
-                Optional<User> first = allUserList.stream().filter(u -> u.getName().equals(executorName)).findFirst();
-                if (first.isPresent()) {
-                    User find = first.get();
-                    task.setExecutorId(find.getId());
-                    task.setExecutorName(find.getName());
-                    task.setExecutorColor(find.getColor());
+                String[] executorNameArray = executorCell.getStringCellValue().split(",");
+                List<String> executorNameList = Arrays.asList(executorNameArray);
+                String executorIdString="";
+                String executorNameString="";
+                String executorColorString="";
+                for (int i=0;i<executorNameList.size();i++) {
+                    String executorName = executorNameList.get(i);
+                    Optional<User> first = allUserList.stream().filter(u -> u.getName().equals(executorName)).findFirst();
+                    if (first.isPresent()) {
+                        User find = first.get();
+                        if(i==executorNameList.size()-1){
+                            executorIdString+=find.getId();
+                            executorNameString+=find.getName();
+                            executorColorString+=find.getColor();
+                        }else{
+                            executorIdString+=find.getId()+",";
+                            executorNameString+=find.getName()+",";
+                            executorColorString+=find.getColor()+",";
+                        }
+                    }else {
+                        httpRespMsg.setError("执行人["+executorName+"]不存在");
+                    }
+                }
+                task.setExecutorId(executorIdString);
+                task.setExecutorName(executorNameString);
+                task.setExecutorColor(executorColorString);
+                //获取当前导入的任务列表
+                List<Stages> stagesList = stagesMapper.selectList(new QueryWrapper<Stages>().eq("project_id",projectId).eq("group_id",groupId));
+                if(!stagesList.stream().anyMatch(sg->sg.getStagesName().equals(stagesCell.getStringCellValue()))){
+                    httpRespMsg.setError("任务列表["+stagesCell.getStringCellValue()+"]不存在");
+                    return httpRespMsg;
                 }
-                task.setStagesId(stagesId);
-                task.setStagesName(stages.getStagesName());
-                task.setSeq(seq++);
+                Optional<Stages> theFirst = stagesList.stream().filter(sg -> sg.getStagesName().equals(stagesCell.getStringCellValue())).findFirst();
                 task.setName(name);
                 task.setTaskType(taskTypeMap.get(typeCell.getStringCellValue()));
+                if(theFirst.isPresent()){
+                    List<Task> maxList = taskMapper.selectList(new QueryWrapper<Task>().eq("stages_id", theFirst.get().getId()).orderByDesc("seq").last("limit 1"));
+                    int seq = 1;
+                    if (maxList.size() > 0) {
+                        seq = maxList.get(0).getSeq() + 1;
+                    }
+                    task.setStagesId(theFirst.get().getId());
+                    task.setStagesName(theFirst.get().getStagesName());
+                    task.setSeq(seq++);
+                }
                 task.setTaskLevel(taskLevelMap.get(levelCell.getStringCellValue()));
                 Date dateCellValue = endDateCell.getDateCellValue();
                 System.out.println("日期=="+dateCellValue.toString());
@@ -404,15 +424,18 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
             }
             saveBatch(taskList);
             //保存到执行人表
-            List<TaskExecutor> executorList = new ArrayList<>();
+            List<List<TaskExecutor>> executorListAll=new ArrayList<>();
             for (Task t : taskList) {
                 if (!StringUtil.isEmpty(t.getExecutorId())) {
-                    TaskExecutor executor = TaskExecutor.fromTask(t);
-                    executorList.add(executor);
+                    List<TaskExecutor> executorList = TaskExecutor.fromTask(t);
+                    executorListAll.add(executorList);
                 }
             }
-            if (executorList.size() > 0) {
-                taskExecutorService.saveBatch(executorList);
+            if (executorListAll.size() > 0) {
+                for (List<TaskExecutor> executorList : executorListAll) {
+                    taskExecutorService.saveBatch(executorList);
+                }
+
             }
             //最后删掉这个文件
 //            if (!file.delete()) {

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml

@@ -228,7 +228,7 @@
         FROM report AS a
         JOIN user AS b ON a.creator_id = b.id
         left join department on department.department_id = a.dept_id
-        WHERE a.company_id=#{companyId} and a.state = 1
+        WHERE a.company_id=#{companyId} and (a.state = 1 or a.state =0)
         <if test="projectId != null">
             and a.project_id = #{projectId}
         </if>
@@ -686,6 +686,8 @@
 
     <select id="getBaseCostAndRealCost" resultType="java.util.HashMap">
         SELECT project.id,project_code as projectCode, project.`project_name` as projectName,
+        (SELECT IFNULL(SUM(base_amount), 0) FROM project_basecost LEFT JOIN project_basecost_setting
+        ON project_basecost_setting.id = project_basecost.`base_id` WHERE alarm_type=1 AND company_id=#{companyId} AND project_basecost.`project_id`=project.id) AS baseCost,
         (SELECT IFNULL(SUM(base_amount), 0) FROM project_currentcost LEFT JOIN project_basecost_setting
         ON project_basecost_setting.id = project_currentcost.`base_id` WHERE alarm_type=1 AND company_id=#{companyId} AND project_currentcost.`project_id`=project.id) AS baseCurcost,
         (SELECT IFNULL(SUM(cost), 0) FROM report WHERE report.`company_id` = #{companyId} AND project_id = project.id AND state=1 AND basecost_id >0) AS feeMan

+ 14 - 7
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -46,12 +46,15 @@ const StringUtil = {
         reportBalance : false, // 项目收支平衡表 // 
         reportProfits : false, // 客户项目利润表 // 
         reportPhase : false, // 项目阶段工时表 // 
-        reportOvertime : false, // 加班情况统计表 //
+        reportAllOvertime : false, // 全公司加班情况 //
+        reportOvertime : false, // 负责部门加班情况 //
         reportCost: false, // 查看加班成本 //
         reportCostWarning: false, // 工时成本预警表 //
         reportPhaseCost: false, // 查看阶段成本 //
-        reportTimeDivide: false, // 人员工时分配表 //
-        reportTimely: false, // 查看人员填报及时率 //
+        reportAllTimeDivide: false, // 全公司工时分配 //
+        reportTimeDivide: false, // 负责部门工时分配 //
+        reportAllTimely: false, // 全公司填报及时率 //
+        reportTimely: false, // 负责部门填报及时率 //
         reportAuditRate: false, // 查看日报待审核统计 // 
 
         // 请假模块
@@ -85,6 +88,7 @@ const StringUtil = {
         importAudit: false, // 查看导审记录 //
         
     }
+    console.log(arr);
     for(var i in arr) {
         arr[i] == '导入工时' ? obj.importReport = true : ''
         arr[i] == '查看导审记录' ? obj.importAudit = true : ''
@@ -118,7 +122,8 @@ const StringUtil = {
         arr[i] == '项目收支平衡表' ? obj.reportBalance = true : ''
         arr[i] == '客户项目利润表' ? obj.reportProfits = true : ''
         arr[i] == '项目阶段工时表' ? obj.reportPhase = true : ''
-        arr[i] == '加班情况统计表' ? obj.reportOvertime = true : ''
+        arr[i] == '全公司加班情况' ? obj.reportAllOvertime = true : ''
+        arr[i] == '负责部门加班情况' ? obj.reportOvertime = true : ''
         arr[i] == '请假填报' ? obj.leaveFil = true : ''
         arr[i] == '请假审核' ? obj.leaveAudit = true : ''
         arr[i] == '查看全部请假单' ? obj.leaveAll = true : ''
@@ -140,10 +145,12 @@ const StringUtil = {
         arr[i] == '下拨成本预算' ? obj.projectAllocate = true : ''
         arr[i] == '工时成本预警表' ? obj.reportCostWarning = true : ''
         arr[i] == '查看阶段成本' ? obj.reportPhaseCost = true : ''
-        arr[i] == '查看人员工时分配' ? obj.reportTimeDivide = true : ''
+        arr[i] == '全公司工时分配' ? obj.reportAllTimeDivide = true : ''
+        arr[i] == '负责部门工时分配' ? obj.reportTimeDivide = true : ''
         arr[i] == '自定义配置' ? obj.structureCustomConfig = true : ''
-        arr[i] == '查看人员填报及时率' ? obj.reportTimely = true : ''
-        arr[i] == '查看日报待审核统计' ? obj.reportAuditRate = true : ''
+        arr[i] == '全公司填报及时率' ? obj.reportAllTimely = true : ''
+        arr[i] == '负责部门填报及时率' ? obj.reportTimely = true : ''
+        arr[i] == '日报待审核统计' ? obj.reportAuditRate = true : ''
         arr[i] == '查看工时统计' ? obj.countHours = true : ''
         arr[i] == '查看成本统计' ? obj.countCost = true : ''
         arr[i] == '项目报表' ? obj.reportProject = true : ''

+ 8 - 11
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -20,14 +20,14 @@
                 <el-menu-item index="1-1" v-if="permissions.reportProject"><p @click="ssl(0)">项目报表</p></el-menu-item>
                 <el-menu-item index="1-2" v-if="permissions.reportTask"><p @click="ssl(1)">项目任务报表</p></el-menu-item>
                 <el-menu-item index="1-3" v-if="permissions.reportCostOf"><p @click="ssl(2)">项目成本报表</p></el-menu-item>
-                <el-menu-item index="1-9" v-if="permissions.reportTimeDivide"><p @click="ssl(8)">人员工时分配表</p></el-menu-item>
+                <el-menu-item index="1-9" v-if="permissions.reportAllTimeDivide || permissions.reportTimeDivide"><p @click="ssl(8)">人员工时分配表</p></el-menu-item>
                 <el-menu-item index="1-4" v-if="permissions.reportCostWarning"><p @click="ssl(7)">工时成本预警表</p></el-menu-item>
                 <el-menu-item index="1-5" v-if="permissions.reportBalance"><p @click="ssl(3)">项目收支平衡表</p></el-menu-item>
                 <el-menu-item index="1-6" v-if="user.company.packageCustomer == 1 && permissions.reportProfits"><p @click="ssl(4)">客户项目利润表</p></el-menu-item>
                 <el-menu-item index="1-7" v-if="permissions.reportPhase"><p @click="ssl(5)">项目阶段工时表</p></el-menu-item>
-                <el-menu-item index="1-8" v-if="permissions.reportOvertime"><p @click="ssl(6)">加班情况统计表</p></el-menu-item>
+                <el-menu-item index="1-8" v-if="permissions.reportAllOvertime || permissions.reportOvertime"><p @click="ssl(6)">加班情况统计表</p></el-menu-item>
 
-                <el-menu-item index="1-10" v-if="permissions.reportTimely"><p @click="ssl(9)">员工填报及时率</p></el-menu-item>
+                <el-menu-item index="1-10" v-if="permissions.reportAllTimely || permissions.reportTimely"><p @click="ssl(9)">员工填报及时率</p></el-menu-item>
                 <el-menu-item index="1-11" v-if="permissions.reportAuditRate"><p @click="ssl(10)">日报待审核统计</p></el-menu-item>
               </el-submenu>
             </el-menu>
@@ -71,7 +71,7 @@
           <el-option label="查看部门审核人" :value="0"></el-option>
         </el-select> -->
         <!-- 项目筛选 -->
-        <el-select v-if="(ins != 4 && ins != 8 && ins != 9 && ins != 10) || ins == 10" v-model="proJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
+        <el-select v-if="ins != 4 && ins != 8 && ins != 9 && ins != 10" v-model="proJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
           <el-option v-for="(item) in proListOvertime" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
             <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
             <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
@@ -79,7 +79,7 @@
         </el-select>
           
           <!-- 部门筛选 -->
-          <el-cascader v-if="ins == 9 || ins == 8 || ins == 6" v-model="departmentIdArray" :options="departmentList" placeholder="请选择部门"
+          <el-cascader v-if="(ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || ins == 10" v-model="departmentIdArray" :options="departmentList" placeholder="请选择部门"
             :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
             @change="selcts(9)" size="small" style="margin-left:10px"
           ></el-cascader>
@@ -441,7 +441,6 @@
             <!-- 日报待审核统计 -->
             <el-table v-if="ins == 10" key="10" border :data="auditRateList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
                 <el-table-column prop="userName" label="审核人" min-width="200" align="center"></el-table-column>
-                <el-table-column :prop="departmentOrProject == 0 ? 'departmentName' : 'projectName'" :label="departmentOrProject == 0 ? '所属部门' : '负责项目'" min-width="200" align="center"></el-table-column>
                 <el-table-column prop="num" label="待审核条数" min-width="200" align="center"></el-table-column>
             </el-table>
             
@@ -1088,9 +1087,7 @@ export default {
         endDate: this.rangeDatas[1],
       }
       // console.log(this.userId == false)
-      if(this.userId == '' || this.userId == null) {
-        
-      } else {
+      if(this.userId) {
         obj.userId = this.userId
       }
       if(this.departmentIdArray.length != 0){
@@ -1320,8 +1317,8 @@ export default {
       if(this.userId){
         parameter.userId = this.userId
       }
-      if(this.proJuctId){
-        parameter.projectId = this.proJuctId
+      if(this.departmentIdArray.length){
+        parameter.departmentId = this.departmentIdArray[this.departmentIdArray.length - 1]
       }
       this.listLoading = true
       this.http.post('/project/getWaitingReviewList',parameter,

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

@@ -898,7 +898,7 @@
                                     formatter: function (params,ticket,callback) {
                                         // var res = params[0].name + "<br/>工作成本"+" : " + params[0].data.money 
                                         // + "元 <br/>工作时长"+" : " + params[0].data.cost + "小时";
-                                        // _this.params = params;
+                                        _this.params = params;
                                         var res = params[0].name + "<br/>" + 
                                         ((_this.permissions.countCost) ? "工作成本"+" : " + params[0].data.money 
                                         + "元 <br/>" : '') + 

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

@@ -1148,6 +1148,7 @@ a {
                             message: '添加成功',
                             type: 'success'
                         })
+                        this.getList()
                     }else {
                         this.$message({
                             message: res.msg,
@@ -1182,7 +1183,9 @@ a {
                 let proArr = []
                 for(let i=0;i<this.checkedProjectArr.length;i++){
                     proArr.push(this.checkedProjectArr[i].id)
+                    // proArr += this.checkedProjectArr[i].id + ','
                 }
+                // proArr = proArr.substring(0,proArr.length - 1)
                 this.http.post('/project/batchSetParticipation',{
                     userIds: JSON.stringify(this.addGroupPersonData.person),
                     projectIdArray: JSON.stringify(proArr)
@@ -1195,6 +1198,7 @@ a {
                             message: '添加成功',
                             type: 'success'
                         })
+                        this.getList()
                     }else {
                         this.$message({
                             message: res.msg,

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

@@ -175,9 +175,9 @@
                                                     <el-link class="sub_task_num" @click.stop.native="showSubTaskList(element)"><i class="iconfont firerock-icontree" ></i><span style="margin-left:5px;">{{element.finishRefTaskCount}}/{{element.refTaskList.length}}</span></el-link>
                                                     </el-tooltip>
                                                 </div> -->
-                                                <div v-if="element.taskType == 1 && element.refTaskList.length != 0"  class="taskCardCircleBox">
-                                                    <el-progress type="circle" :percentage="(element.finishRefTaskCount/element.refTaskList.length) * 100" width="16" :show-text="false" stroke-linecap="butt" stroke-width="8"></el-progress>
-                                                    <span style="margin-left:5px;font-size:12px">{{element.finishRefTaskCount}}/{{element.refTaskList.length}}</span>
+                                                <div v-if="element.taskType == 1 && !(element.refTaskList == null || element.refTaskList.length == 0)"  class="taskCardCircleBox">
+                                                    <el-progress type="circle" :percentage="(element.finishRefTaskCount/(element.refTaskList ? element.refTaskList.length : 0)) * 100" width="16" :show-text="false" stroke-linecap="butt" stroke-width="8"></el-progress>
+                                                    <span style="margin-left:5px;font-size:12px">{{element.finishRefTaskCount}}/{{(element.refTaskList ? element.refTaskList.length : 0)}}</span>
                                                 </div>
                                             </div>
                                         </draggable>
@@ -825,11 +825,11 @@
                 <el-form-item label="1. 请先下载模板并填写后上传" >
                     <el-link type="primary" :underline="false" href="./upload/项目任务导入模板.xlsx" download="项目任务导入模板.xlsx">项目任务模板下载</el-link>
                 </el-form-item>
-                <el-form-item label="2. 选择要导入的任务列表">
+                <!-- <el-form-item label="2. 选择要导入的任务列表" v-if="false">
                     <el-select v-model="importToStageId" placeholder="任务列表"  style="width:350px;">
                         <el-option v-for="item in stageList" :label="item.stagesName" :value="item.id" :key="item.id"></el-option>
                     </el-select>
-                </el-form-item>
+                </el-form-item> -->
                 <div><span style="font-size:12px;color:#999;">如导入的任务属于多个列表,可在导入后拖拽来更改所属列表</span></div>
             </el-form>
             <div slot="footer" class="dialog-footer">
@@ -1585,7 +1585,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                     formData.append("file", item.file);
                     formData.append("projectId", this.curProjectId);
                     formData.append("groupId", this.selectedGroup.id);
-                    formData.append("stagesId", this.importToStageId);
+                    // formData.append("stagesId", this.importToStageId);
                     this.http.uploadFile('/task/importTask', formData,
                     res => {
                         this.$refs.upload.clearFiles();
@@ -2356,13 +2356,15 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                 this.times = `${Y}-${M}-${D}`
             },
             addStagePost() {
+                console.log('新增任务列表');
                 let param = JSON.parse(JSON.stringify(this.stageForm));
                 param.taskList = [];
                 this.http.post('/stages/save',param,
                 res => {
                     if (res.code == "ok") {
-                        this.stageList = res.data;
                         this.addStageDialog = false;
+                        this.stageList = res.data;
+                        
                     } else {
                         this.$message({
                         message: res.msg,

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

@@ -217,7 +217,7 @@
                     <span style="color:#666;margin-left:10px;">(说明:系统管理员为员工代填日报时不受补填时间的限制)</span>
                     <span class="lockworktime"><el-checkbox v-model="timeType.fillAhead" label="可提前填报" /></span>
                 </el-form-item>
-                <el-form-item label="员工填报及时日" prop="timeliness">
+                <el-form-item label="员工填报及时日" prop="timeliness" v-if="user.company.packageProject">
                     <el-select v-model="timeType.timeliness">
                         <el-option label="当天" :value="0"></el-option>
                         <el-option label="第二天" :value="1"></el-option>

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

@@ -322,11 +322,11 @@
                     
                     <el-form-item :label="user.companyId==781?'工作任务':'投入项目'" :prop="'domains.' + index + '.projectId'"
                         :rules="{ required: true, message: user.companyId==781?'请选择工作任务':'请选择投入项目', trigger: ['change','blur'] }">
-                        <el-select v-model="domain.projectId" :placeholder="user.companyId==781?'请选择工作任务':'请选择项目'" style="width:200px;" clearable="true"  filterable="true"
+                        <el-select v-model="domain.projectItem" :placeholder="user.companyId==781?'请选择工作任务':'请选择项目'" style="width:200px;" clearable="true"  filterable="true" value-key="id"
                         @change="selectProject(domain, index)"
                         :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
                             <!-- <el-option v-for="item in projectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName" :value="item.id"></el-option> -->
-                            <el-option v-for="item in fillProjectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
+                            <el-option v-for="item in fillProjectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item">
                                 <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
                                 <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
                             </el-option>
@@ -379,7 +379,7 @@
                         </el-select>
                     </el-form-item>
                     <!-- 相关维度/自定义维度 -->
-                    <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1" :rules="user.timeType.customDegreeStatus == 1 && domain.wuduList != undefined && domain.wuduList != [] ? { required: true, message: '请选择' + yonghuUser.customDegreeName, trigger: ['change','blur'] } : null" :prop="'domains.' + index + '.degreeId'">
+                    <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1" :rules="user.timeType.customDegreeStatus == 1 && domain.wuduList != undefined && domain.wuduList.length != 0 ? { required: true, message: '请选择' + yonghuUser.customDegreeName, trigger: ['change','blur'] } : null" :prop="'domains.' + index + '.degreeId'">
                         <el-select v-model="domain.degreeId" clearable placeholder="请选择" :disabled="!canEdit">
                             <el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
                             </el-option>
@@ -430,10 +430,10 @@
                     <div v-if="reportTimeType.multiWorktime==1">
                         <el-form-item label="投入项目" :prop="'domains.' + index + '.projectId'"
                             :rules="{ required: true, message: '请选择投入项目', trigger: ['change','blur'] }">
-                            <el-select v-model="domain.projectId" placeholder="请选择项目" style="width:200px;" clearable="true"  filterable="true"
+                            <el-select v-model="domain.projectItem" placeholder="请选择项目" style="width:200px;" clearable="true"  filterable="true" value-key="id"
                             @change="selectProject(domain, index)"
                             :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
-                                <el-option v-for="item in fillProjectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
+                                <el-option v-for="item in fillProjectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item">
                                     <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
                                     <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
                                 </el-option>
@@ -2606,8 +2606,14 @@
             },
             //项目选中了, 加载子项目
             selectProject(domain, index) {
-                if(domain.projectId == ""){
+                console.log(domain.projectItem);
+                
+                if(!domain.projectItem){
+                    
                     return
+                }else {
+                    domain.projectId = domain.projectItem.id
+                    domain.projectName = domain.projectItem.projectName
                 }
                 this.http.post('/sub-project/list',{
                     projectId: domain.projectId
@@ -2740,6 +2746,17 @@
             },
 
             getGroupStages(domain, index) {
+                console.log(domain);
+                if(!domain.groupId){
+                    domain.projectAuditorId = ''
+                    domain.stages = []
+                    let curProject = this.projectList.filter(p=>p.id == domain.projectId)[0];
+                    if(curProject.taskGpIncharge == 1){
+                        domain.auditUserList = []
+                    }
+                    this.$forceUpdate();
+                    return
+                }
                 this.http.post("/stages/getProjectStagesByGroup", {groupId: domain.groupId},
                     res => {
                         if (res.code == "ok") {
@@ -4923,7 +4940,13 @@
                                         message: "您在["+this.workForm.domains[i].projectName+"]项目上尚无参与的任务分组",
                                         type: "error"
                                     });
-                                } 
+                                } else if (this.workForm.domains[i].taskGroups.length > 0 && !this.workForm.domains[i].groupId) {
+                                    console.log(this.workForm.domains[i]);
+                                    this.$message({
+                                        message: "请选择["+this.workForm.domains[i].projectName+"]项目的任务分组",
+                                        type: "error"
+                                    });
+                                }
                                 
                                 return;
                             }

+ 18 - 11
fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

@@ -2,19 +2,20 @@ const autoprefixer = require("autoprefixer");
 const pxtorem = require("postcss-pxtorem");
 const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
+const Timestamp = new Date().getTime();
 
 // var ip = '47.101.180.183'
-// var ip = '192.168.2.30'
+var ip = '192.168.2.7'
 // var ip = '127.0.0.1'
-var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-for (var i in ifaces) {
-    for (var j in ifaces[i]) {
-        var val = ifaces[i][j]
-        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-            ip = val.address
-        }
-    }
-}
+// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+// for (var i in ifaces) {
+//     for (var j in ifaces[i]) {
+//         var val = ifaces[i][j]
+//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+//             ip = val.address
+//         }
+//     }
+// }
 
 module.exports = {
     // 关闭eslint检查
@@ -64,5 +65,11 @@ module.exports = {
                 }
             }
         }
-    }
+    },
+    configureWebpack: { // webpack 配置
+        output: { // 输出重构  打包编译后的 文件名称  【模块名称.时间戳】
+            filename: `static/js/[name].${Timestamp}.js`,
+            chunkFilename: `static/js/[name].${Timestamp}.js`
+        },
+    },
 };

BIN
项目任务导入模板.xlsx