zx 1 年之前
父节点
当前提交
957d5a7984
共有 46 个文件被更改,包括 2890 次插入1239 次删除
  1. 7 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/PlanController.java
  2. 33 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/PlanProcedureTotalController.java
  3. 21 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/ProdProcedureTeamController.java
  4. 5 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/ReportController.java
  5. 63 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/TaskTypeController.java
  6. 5 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/Plan.java
  7. 57 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/PlanProcedureTotal.java
  8. 86 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/ProdProcedureTeam.java
  9. 4 6
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/vo/ReportVO.java
  10. 16 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/mapper/PlanProcedureTotalMapper.java
  11. 20 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/mapper/ProdProcedureTeamMapper.java
  12. 18 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/PlanProcedureTotalService.java
  13. 3 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/PlanService.java
  14. 16 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/ProdProcedureTeamService.java
  15. 2 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/ReportService.java
  16. 1 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/TaskTypeService.java
  17. 91 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanProcedureTotalServiceImpl.java
  18. 110 15
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanServiceImpl.java
  19. 20 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/ProdProcedureTeamServiceImpl.java
  20. 33 104
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  21. 4 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/TaskTypeServiceImpl.java
  22. 9 1
      fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/UserServiceImpl.java
  23. 2 2
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/application.yml
  24. 18 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/PlanProcedureTotalMapper.xml
  25. 36 0
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/ProdProcedureTeamMapper.xml
  26. 69 1
      fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/ReportMapper.xml
  27. 29 18
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/components/chooseSomeone.vue
  28. 9 0
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/router/index.js
  29. 14 3
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/groupView/groupView.vue
  30. 372 354
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/index/index.vue
  31. 1 1
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/login/index.vue
  32. 3 1
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/InsertionPlan/InsertionPlanAdd.vue
  33. 28 18
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/component/planComponent.vue
  34. 57 20
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/distribution.vue
  35. 50 13
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/todayPlan.vue
  36. 36 2
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/tomorrowPlan/tomorrowPlan.vue
  37. 6 2
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/statisticsView/statisticsView.vue
  38. 188 7
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/workView.vue
  39. 2 1
      fhKeeper/formulahousekeeper/timesheet-workshop-h5/vue.config.js
  40. 2 0
      fhKeeper/formulahousekeeper/timesheet-workshop/src/permissions.js
  41. 3 3
      fhKeeper/formulahousekeeper/timesheet-workshop/src/routes.js
  42. 954 15
      fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/orderInsert.vue
  43. 134 209
      fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponent.vue
  44. 17 7
      fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponentDetil.vue
  45. 205 0
      fhKeeper/formulahousekeeper/timesheet-workshop/src/views/product/list.vue
  46. 31 436
      fhKeeper/formulahousekeeper/timesheet-workshop/src/views/workReport/daily.vue

+ 7 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/PlanController.java

@@ -2,6 +2,7 @@ package com.management.platform.controller;
 
 
 import com.management.platform.entity.Plan;
+import com.management.platform.entity.PlanProcedureTotal;
 import com.management.platform.service.PlanService;
 import com.management.platform.util.HttpRespMsg;
 import org.apache.ibatis.annotations.Param;
@@ -36,6 +37,7 @@ public class PlanController {
     }
 
     @RequestMapping("/addOrUpdatePlan")
+    @Transactional
     public HttpRespMsg addOrUpdatePlan(Plan plan){
         return planService.addOrUpdatePlan(plan);
     }
@@ -76,6 +78,11 @@ public class PlanController {
     public HttpRespMsg exportData(String date,Integer planType,String steelStampNumber){
         return planService.exportData(date,planType,steelStampNumber);
     }
+    /*计划下产品工序组员分配*/
+    @RequestMapping("/teamAllocation")
+    public HttpRespMsg teamAllocation(PlanProcedureTotal planProcedureTotal, String teamIds){
+        return planService.teamAllocation(planProcedureTotal,teamIds);
+    }
 
 }
 

+ 33 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/PlanProcedureTotalController.java

@@ -0,0 +1,33 @@
+package com.management.platform.controller;
+
+
+import com.management.platform.entity.PlanProcedureTotal;
+import com.management.platform.service.PlanProcedureTotalService;
+import com.management.platform.util.HttpRespMsg;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-07-28
+ */
+@RestController
+@RequestMapping("/plan-procedure-total")
+public class PlanProcedureTotalController {
+
+    @Resource
+    private PlanProcedureTotalService planProcedureTotalService;
+
+    @RequestMapping("/getReportForWorkList")
+    public HttpRespMsg getReportForWorkList(){
+        return planProcedureTotalService.getReportForWorkList();
+    }
+}
+

+ 21 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/ProdProcedureTeamController.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 2023-07-28
+ */
+@RestController
+@RequestMapping("/prod-procedure-team")
+public class ProdProcedureTeamController {
+
+}
+

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

@@ -107,6 +107,11 @@ public class ReportController {
     public HttpRespMsg getReportList(@RequestParam String date, @RequestParam(required = false) Integer deptId, @RequestParam(required = false) String userId) {
         return reportService.getReportList(date, deptId, userId, request);
     }
+
+    @RequestMapping("/getCheckerList")
+    public HttpRespMsg getCheckerList(Integer checkType, Integer deptId) {
+        return reportService.getChekerList(checkType, deptId);
+    }
 //
 //    /**
 //     * 导出报告

+ 63 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/TaskTypeController.java

@@ -1,10 +1,22 @@
 package com.management.platform.controller;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.management.platform.entity.Plan;
+import com.management.platform.entity.TaskType;
+import com.management.platform.mapper.TaskTypeMapper;
+import com.management.platform.mapper.UserMapper;
+import com.management.platform.service.PlanService;
+import com.management.platform.service.TaskTypeService;
+import com.management.platform.util.HttpRespMsg;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
 /**
  * <p>
  *  前端控制器
@@ -17,5 +29,56 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/task-type")
 public class TaskTypeController {
 
+    @Resource
+    private TaskTypeService taskTypeService;
+    @Resource
+    private UserMapper userMapper;
+    @Resource
+    private HttpServletRequest request;
+    @Resource
+    private PlanService planService;
+
+    @RequestMapping("/merge")
+    public HttpRespMsg merge(TaskType taskType){
+        HttpRespMsg msg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        if(taskType.getId()==null){
+            taskType.setCompanyId(companyId);
+            if(taskTypeService.count(new QueryWrapper<TaskType>().eq("task_type_name",taskType.getTaskTypeName()).eq("company_id",companyId))>0){
+                msg.setError("重复的任务类型名称");
+                return msg;
+            }
+        }
+        if(!taskTypeService.saveOrUpdate(taskType)){
+            msg.setError("验证失败");
+        }
+        return msg;
+    }
+
+    @RequestMapping("/list")
+    public HttpRespMsg list(){
+        HttpRespMsg msg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        List<TaskType> list = taskTypeService.list(new QueryWrapper<TaskType>().eq("company_id", companyId));
+        msg.setData(list);
+        return msg;
+    }
+
+    @RequestMapping("/delete")
+    public HttpRespMsg delete(Integer id){
+        HttpRespMsg httpRespMsg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        int cut = planService.count(new QueryWrapper<Plan>().eq("company_id", companyId).eq("task_type_id", id));
+        if(cut>0){
+            httpRespMsg.setError("当前类型已被使用,无法删除");
+            return httpRespMsg;
+        }
+        if(!taskTypeService.removeById(id)){
+            httpRespMsg.setError("验证失败");
+            return httpRespMsg;
+        }
+        return httpRespMsg;
+    }
+
 }
 

+ 5 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/Plan.java

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -25,6 +26,7 @@ import org.springframework.format.annotation.DateTimeFormat;
 @Data
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
 public class Plan extends Model<Plan> {
 
     private static final long serialVersionUID=1L;
@@ -192,6 +194,9 @@ public class Plan extends Model<Plan> {
     @TableField("version_number")
     private String versionNumber;
 
+    @TableField(exist = false)
+    private Product product;
+
 
     @Override
     protected Serializable pkVal() {

+ 57 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/PlanProcedureTotal.java

@@ -0,0 +1,57 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+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 2023-07-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PlanProcedureTotal extends Model<PlanProcedureTotal> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 计划id
+     */
+    @TableField("plan_id")
+    private Integer planId;
+
+    /**
+     * 相关工序id
+     */
+    @TableField("prod_procedure_id")
+    private Integer prodProcedureId;
+
+    /**
+     * 总工价
+     */
+    @TableField("total_wages")
+    private Double totalWages;
+
+    /**
+     * 总工时
+     */
+    @TableField("total_working_hours")
+    private Double totalWorkingHours;
+
+    @TableField(exist = false)
+    private ProdProcedure prodProcedure;
+
+    @Override
+    protected Serializable pkVal() {
+        return null;
+    }
+
+}

+ 86 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/ProdProcedureTeam.java

@@ -0,0 +1,86 @@
+package com.management.platform.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-07-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class ProdProcedureTeam extends Model<ProdProcedureTeam> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("company_id")
+    private Integer companyId;
+
+    @TableField("user_id")
+    private String userId;
+
+    @TableField("prod_procedure_id")
+    private Integer prodProcedureId;
+
+    @TableField("plan_id")
+    private Integer planId;
+
+    /**
+     * 工时
+     */
+    @TableField("work_time")
+    private Double workTime;
+
+    /**
+     * 工价
+     */
+    @TableField("job_of_money")
+    private BigDecimal jobOfMoney;
+
+    /**
+     * 完成度,百分比
+     */
+    @TableField("progress")
+    private Integer progress;
+
+    /**
+     * 检验人
+     */
+    @TableField("checker_id")
+    private String checkerId;
+
+    /**
+     * 检查人姓名
+     */
+    @TableField("checker_name")
+    private String checkerName;
+
+    /**
+     * 最近更新时间
+     */
+    @TableField("update_time")
+    private LocalDateTime updateTime;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 4 - 6
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/entity/vo/ReportVO.java

@@ -12,10 +12,8 @@ import java.time.LocalDateTime;
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 public class ReportVO extends Report {
-    private String name;//用户姓名
-    private String project;//项目名称
-    private String subProjectName;//子项目名称
-    private String taskName;//任务名称
-    private String degreeName;//自定义维度名称
-    private String groupName;//分组名称
+    private String creatorName;//用户姓名
+    private String productName;//产品名称
+    private String procedureName;//工序名称
+    private String checkerName;//质检人姓名
 }

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

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.PlanProcedureTotal;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-07-28
+ */
+public interface PlanProcedureTotalMapper extends BaseMapper<PlanProcedureTotal> {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/mapper/ProdProcedureTeamMapper.java

@@ -0,0 +1,20 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.ProdProcedureTeam;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-07-28
+ */
+public interface ProdProcedureTeamMapper extends BaseMapper<ProdProcedureTeam> {
+
+    public List<HashMap> getReportForWorkList(String userId);
+}

+ 18 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/PlanProcedureTotalService.java

@@ -0,0 +1,18 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.PlanProcedureTotal;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.management.platform.util.HttpRespMsg;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-07-28
+ */
+public interface PlanProcedureTotalService extends IService<PlanProcedureTotal> {
+
+    HttpRespMsg getReportForWorkList();
+}

+ 3 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/PlanService.java

@@ -2,6 +2,7 @@ package com.management.platform.service;
 
 import com.management.platform.entity.Plan;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.management.platform.entity.PlanProcedureTotal;
 import com.management.platform.util.HttpRespMsg;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -32,4 +33,6 @@ public interface PlanService extends IService<Plan> {
     HttpRespMsg planDetail(Integer id, Integer type);
 
     HttpRespMsg hasSetDeptDetail();
+
+    HttpRespMsg teamAllocation(PlanProcedureTotal planProcedureTotal, String teamIds);
 }

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

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.ProdProcedureTeam;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-07-28
+ */
+public interface ProdProcedureTeamService extends IService<ProdProcedureTeam> {
+
+}

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

@@ -114,4 +114,6 @@ public interface ReportService extends IService<Report> {
 //    HttpRespMsg batchApproveByDate(String startDate, String endDate, HttpServletRequest request);
 
     HttpRespMsg submitReport(Report report, HttpServletRequest request);
+
+    HttpRespMsg getChekerList(Integer checkType, Integer deptId);
 }

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

@@ -2,6 +2,7 @@ package com.management.platform.service;
 
 import com.management.platform.entity.TaskType;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.management.platform.util.HttpRespMsg;
 
 /**
  * <p>

+ 91 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanProcedureTotalServiceImpl.java

@@ -0,0 +1,91 @@
+package com.management.platform.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.management.platform.entity.*;
+import com.management.platform.mapper.*;
+import com.management.platform.service.PlanProcedureTotalService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.management.platform.util.HttpRespMsg;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-07-28
+ */
+@Service
+public class PlanProcedureTotalServiceImpl extends ServiceImpl<PlanProcedureTotalMapper, PlanProcedureTotal> implements PlanProcedureTotalService {
+
+    @Resource
+    private PlanProcedureTotalMapper planProcedureTotalMapper;
+    @Resource
+    private ProductMapper productMapper;
+    @Resource
+    private PlanMapper planMapper;
+    @Resource
+    private UserMapper userMapper;
+    @Resource
+    private HttpServletRequest request;
+    @Resource
+    private ProdProcedureMapper prodProcedureMapper;
+    @Resource
+    private ProdProcedureTeamMapper prodProcedureTeamMapper;
+
+    @Override
+    public HttpRespMsg getReportForWorkList() {
+        HttpRespMsg msg=new HttpRespMsg();
+        User user = userMapper.selectById(request.getHeader("token"));
+        /*获取作为组员参与的数据*/
+        List<HashMap> dataList = prodProcedureTeamMapper.getReportForWorkList(user.getId());
+        //抽取出所有的planId
+        List<Integer> planIdList = dataList.stream().map(item -> (Integer) item.get("planId")).collect(Collectors.toList());
+        //重新封装成两层结构,第一层为planId,第二层为planId下的数据
+        List<HashMap> resultList = new ArrayList<>();
+        Integer prePlanId = null;
+        for (int i = 0; i < dataList.size(); i++) {
+            HashMap map = dataList.get(i);
+            Integer curPlanId = (Integer) dataList.get(i).get("plan_id");
+            List<HashMap> procedureList = new ArrayList<>();
+            if (prePlanId == null || !prePlanId.equals(curPlanId)) {
+                prePlanId = curPlanId;
+                HashMap planMap = new HashMap();
+                planMap.put("plan_d", curPlanId);
+                planMap.put("plan_name", map.get("plan_name"));
+                planMap.put("start_date", map.get("start_date"));
+                planMap.put("end_date", map.get("end_date"));
+                planMap.put("product_name", map.get("product_name"));
+                planMap.put("product_scheduling_num", map.get("product_scheduling_num"));
+                planMap.put("task_type_name", map.get("task_type_name"));
+                planMap.put("task_name", map.get("task_name"));
+                planMap.put("task_change_notice_num", map.get("task_change_notice_num"));
+                planMap.put("plan_type", map.get("plan_type"));
+                planMap.put("procedureList", procedureList);
+                resultList.add(planMap);
+            } else {
+                procedureList = (List<HashMap>) resultList.get(resultList.size() - 1).get("procedureList");
+            }
+            //放进去的是procedureList
+            HashMap procedureMap = new HashMap();
+            procedureMap.put("id", map.get("id"));
+            procedureMap.put("procedure_name", map.get("procedure_name"));
+            procedureMap.put("work_time", map.get("work_time"));
+            procedureMap.put("job_of_money", map.get("job_of_money"));
+            procedureMap.put("progress", map.get("progress"));
+            procedureMap.put("checker_name", map.get("checker_name"));
+            procedureMap.put("checker_id", map.get("checker_id"));
+            procedureMap.put("check_type", map.get("check_type"));
+            procedureList.add(procedureMap);
+        }
+
+        msg.setData(resultList);
+        return msg;
+    }
+}

+ 110 - 15
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanServiceImpl.java

@@ -8,10 +8,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.management.platform.entity.*;
 import com.management.platform.entity.vo.SysRichFunction;
 import com.management.platform.mapper.*;
-import com.management.platform.service.PlanDeptService;
-import com.management.platform.service.PlanService;
+import com.management.platform.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.management.platform.service.WxCorpInfoService;
 import com.management.platform.util.ExcelUtil;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
@@ -79,6 +77,12 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
     private PlanMaterialMapper planMaterialMapper;
     @Resource
     private TaskTypeMapper taskTypeMapper;
+    @Resource
+    private ProdProcedureTeamService prodProcedureTeamService;
+    @Resource
+    private PlanProcedureTotalService planProcedureTotalService;
+    @Resource
+    private TaskTypeService taskTypeService;
 
     @Value(value = "${upload.path}")
     private String path;
@@ -86,7 +90,8 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
     @Override
     public HttpRespMsg getList(String date, String steelStampNumber, Integer planType,Integer deptId,Integer pageIndex,Integer pageSize) {
         HttpRespMsg msg=new HttpRespMsg();
-        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        User user = userMapper.selectById(request.getHeader("token"));
+        Integer companyId = user.getCompanyId();
         QueryWrapper<Plan> queryWrapper=new QueryWrapper();
         DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd");
         queryWrapper.eq("company_id",companyId);
@@ -96,7 +101,9 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
             queryWrapper.eq("plan_type",1);
         }
         if(planType!=2){
-            queryWrapper.eq("station_id",deptId);
+            if(deptId!=null){
+                queryWrapper.eq("station_id",deptId);
+            }
         }
         if(!StringUtils.isEmpty(date)){
             LocalDate parse = LocalDate.parse(date,df);
@@ -107,14 +114,38 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                 queryWrapper.eq("start_date",planType==0?now:now.plusDays(1));
             }
         }
+        /*作为工长看到的数据*/
+        if(count(new QueryWrapper<Plan>().eq("foreman_id",user.getId()))>0){
+            queryWrapper.eq("foreman_id",user.getId());
+        }else {
+            /*作为组员可以查看的数据*/
+            List<ProdProcedureTeam> prodProcedureTeams = prodProcedureTeamService.list(new QueryWrapper<ProdProcedureTeam>().eq("company_id", companyId).eq("user_id", user.getId()));
+            List<Integer> collect=new ArrayList<>();
+            if(prodProcedureTeams!=null&&prodProcedureTeams.size()>0){
+                List<Integer> ids = prodProcedureTeams.stream().map(ProdProcedureTeam::getProdProcedureId).collect(Collectors.toList());
+                List<PlanProcedureTotal> list = planProcedureTotalService.list(new QueryWrapper<PlanProcedureTotal>().in("prod_procedure_id", ids));
+                collect = list.stream().map(PlanProcedureTotal::getPlanId).distinct().collect(Collectors.toList());
+            }
+            collect.add(-1);
+            queryWrapper.in("id",collect);
+        }
         if(!StringUtils.isEmpty(steelStampNumber)){
-            queryWrapper.gt("steel_stamp_number_start",steelStampNumber);
-            queryWrapper.lt("steel_stamp_number_end",steelStampNumber);
+            queryWrapper.apply("'"+steelStampNumber+"'"+" between steel_stamp_number_start AND steel_stamp_number_end");
         }
         IPage<Plan> planIPage = planMapper.selectPage(new Page<>(pageIndex, pageSize), queryWrapper);
+        List<Plan> records = planIPage.getRecords();
+        List<Integer> ids = records.stream().map(Plan::getProductId).distinct().collect(Collectors.toList());
+        ids.add(-1);
+        List<Product> productList = productMapper.selectList(new QueryWrapper<Product>().in("id", ids));
+        records.forEach(rs->{
+            Optional<Product> first = productList.stream().filter(pl -> pl.getId().equals(rs.getProductId())).findFirst();
+            if(first.isPresent()){
+                rs.setProduct(first.get());
+            }
+        });
         Map map=new HashMap();
         map.put("total",planIPage.getTotal());
-        map.put("records",planIPage.getRecords());
+        map.put("records",records);
         msg.setData(map);
         return msg;
     }
@@ -129,10 +160,18 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
             plan.setStationName(department.getDepartmentName());
         }
         if(plan.getProductId()!=null){
-                Product product = productMapper.selectById(plan.getProductId());
-                plan.setProductName(product.getName());
+            Product product = productMapper.selectById(plan.getProductId());
+            plan.setProductName(product.getName());
+        }
+        if(plan.getTaskTypeId()!=null){
+            TaskType taskType = taskTypeMapper.selectById(plan.getTaskTypeId());
+            plan.setTaskTypeName(taskType.getTaskTypeName());
         }
+        List<ProdProcedure> procedureList = prodProcedureMapper.selectList(new QueryWrapper<ProdProcedure>().eq("company_id", companyId).eq("product_id",plan.getProductId()).orderByDesc("id"));
+        List<PlanProcedureTotal> planProcedureTotals=new ArrayList<>();
+        List<ProdProcedure> list;
         if(plan.getId()==null){
+            list = procedureList.stream().filter(pl -> pl.getVersionNumber().equals(procedureList.get(0).getVersionNumber())).collect(Collectors.toList());
             if(plan.getProductSchedulingNum()!=null){
                 if(count(new QueryWrapper<Plan>().eq("product_scheduling_num",plan.getProductSchedulingNum()))>0){
                     msg.setError("当前排产工单号已存在");
@@ -152,6 +191,10 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
             }else {
                 plan.setPlanType(1);
             }
+            if(procedureList!=null&&procedureList.size()>0){
+                String versionNumber = procedureList.get(0).getVersionNumber();
+                plan.setVersionNumber(versionNumber);
+            }
             if(planMapper.insert(plan)<0){
                 msg.setError("验证失败");
                 return msg;
@@ -166,7 +209,23 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                 msg.setError("验证失败");
                 return msg;
             }
+            list = procedureList.stream().filter(pl -> pl.getVersionNumber().equals(plan.getVersionNumber())).collect(Collectors.toList());
+            planProcedureTotalService.remove(new QueryWrapper<PlanProcedureTotal>().eq("plan_id",plan.getId()));
         }
+        list=list.stream().sorted(Comparator.comparing(ProdProcedure::getId)).collect(Collectors.toList());
+        list.forEach(ps->{
+            PlanProcedureTotal p=new PlanProcedureTotal();
+            p.setPlanId(plan.getId());
+            p.setProdProcedureId(ps.getId());
+            BigDecimal totalWages=new BigDecimal(String.valueOf(ps.getUnitPrice()));
+            totalWages=totalWages.multiply(new BigDecimal(plan.getNum()));
+            p.setTotalWages(totalWages.doubleValue());
+            BigDecimal totalWorkingHours=new BigDecimal(String.valueOf(ps.getWorkingTime()));
+            totalWorkingHours=totalWorkingHours.multiply(new BigDecimal(plan.getNum()));
+            p.setTotalWorkingHours(totalWorkingHours.doubleValue());
+            planProcedureTotals.add(p);
+        });
+        planProcedureTotalService.saveBatch(planProcedureTotals);
         return msg;
     }
 
@@ -186,9 +245,9 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                 if(first.isPresent()){
                     //todo:推送到企业微信
                     StringBuilder stringBuilder=new StringBuilder();
-                    stringBuilder.append(planType==0?"今日计划":planType==1?"明日计划":"插单计划"+": ");
-                    stringBuilder.append(planType==2?"任务名称"+plan.getTaskName()+"\n"+"任务变更通知号"+plan.getTaskChangeNoticeNum():"产品名称"+plan.getProductName()+"\n"+"排产工单号"+plan.getProductSchedulingNum());
-                    wxCorpInfoService.sendWXCorpMsg(wxCorpInfo,first.get().getCorpwxUserid(),stringBuilder.toString(),planType==0?"plan/today":planType==1?"plan/tomorrow":"plan/orderInsert",null);
+                    stringBuilder.append((planType==0?"今日计划":planType==1?"明日计划":"插单计划")+"\n");
+                    stringBuilder.append(planType==2?"任务名称: "+plan.getTaskName()+"\n"+"任务变更通知号: "+plan.getTaskChangeNoticeNum():"产品名称: "+plan.getProductName()+"\n"+"排产工单号: "+plan.getProductSchedulingNum());
+                    wxCorpInfoService.sendWXCorpMsg(wxCorpInfo,first.get().getCorpwxRealUserid(),stringBuilder.toString(),planType==0?"plan/today":planType==1?"plan/tomorrow":"plan/orderInsert",null);
                 }else msg.setError("验证失败");
             }
         }
@@ -539,13 +598,14 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                 item.add(plan.getCheckType()==0?"自检":plan.getCheckType()==1?"互检":plan.getCheckType()==2?"专检":"");
                 item.add(plan.getStationName());
                 item.add(plan.getForemanName());
+                item.add(df.format(plan.getStartDate()));
                 item.add(df.format(plan.getEndDate()));
                 item.add(plan.getDescribtion()==null?"":plan.getDescribtion());
             }
             dataList.add(item);
         }
         Company company = companyMapper.selectById(companyId);
-        String fileName=(planType==0?"今日计划":planType==1?"明日计划":planType==1?"插单计划":"")+company.getCompanyName()+System.currentTimeMillis();
+        String fileName=(planType==0?"今日计划":planType==1?"明日计划":planType==2?"插单计划":"")+company.getCompanyName()+System.currentTimeMillis();
         String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName, dataList, path);
         msg.setData(resp);
         return msg;
@@ -573,6 +633,34 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
         return httpRespMsg;
     }
 
+    @Override
+    public HttpRespMsg teamAllocation(PlanProcedureTotal planProcedureTotal,String teamIds) {
+        HttpRespMsg msg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        BigDecimal totalWages=new BigDecimal(planProcedureTotal.getTotalWages());
+        BigDecimal totalWorkingHours=new BigDecimal(planProcedureTotal.getTotalWorkingHours());
+        List<ProdProcedureTeam> list=new ArrayList<>();
+        if(StringUtils.isEmpty(teamIds)){
+            String[] team = teamIds.split(",");
+            totalWages=totalWages.divide(new BigDecimal(team.length));
+            totalWorkingHours=totalWorkingHours.divide(new BigDecimal(team.length));
+            for (String s : team) {
+                ProdProcedureTeam prodProcedureTeam=new ProdProcedureTeam();
+                prodProcedureTeam.setCompanyId(companyId);
+                prodProcedureTeam.setProdProcedureId(planProcedureTotal.getProdProcedureId());
+                prodProcedureTeam.setUserId(s);
+                prodProcedureTeam.setPlanId(planProcedureTotal.getPlanId());
+                prodProcedureTeam.setWorkTime(totalWorkingHours.doubleValue());
+                prodProcedureTeam.setJobOfMoney(totalWages);
+                list.add(prodProcedureTeam);
+            }
+        }
+        if(!prodProcedureTeamService.saveBatch(list)){
+            msg.setError("验证失败");
+        }
+        return msg;
+    }
+
     @Override
     public HttpRespMsg planDetail(Integer id, Integer type) {
         HttpRespMsg msg=new HttpRespMsg();
@@ -580,8 +668,15 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
         if(plan!=null){
             switch (type){
                 case 0:
+                    List<PlanProcedureTotal> procedureTotals = planProcedureTotalService.list(new QueryWrapper<PlanProcedureTotal>().eq("plan_id", plan.getId()));
                     List<ProdProcedure> prodProcedureList = prodProcedureMapper.selectList(new QueryWrapper<ProdProcedure>().eq("product_id", plan.getProductId()).eq("version_number",plan.getVersionNumber()));
-                    msg.setData(prodProcedureList);
+                    procedureTotals.forEach(ps->{
+                        Optional<ProdProcedure> first = prodProcedureList.stream().filter(pl -> pl.getId().equals(ps.getProdProcedureId())).findFirst();
+                        if(first.isPresent()){
+                            ps.setProdProcedure(first.get());
+                        }
+                    });
+                    msg.setData(procedureTotals);
                     break;
 //                case 1:
 //                    Map map=new HashMap();

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

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.ProdProcedureTeam;
+import com.management.platform.mapper.ProdProcedureTeamMapper;
+import com.management.platform.service.ProdProcedureTeamService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-07-28
+ */
+@Service
+public class ProdProcedureTeamServiceImpl extends ServiceImpl<ProdProcedureTeamMapper, ProdProcedureTeam> implements ProdProcedureTeamService {
+
+}

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

@@ -93,6 +93,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     @Value("${wx.app_secret}")
     public String appSecret;
 
+
+    @Resource
+    private HttpServletRequest request;
     @Resource
     private ProjectAuditorMapper projectAuditorMapper;
     @Resource
@@ -101,11 +104,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     private DepartmentOtherManagerMapper departmentOtherManagerMapper;
     @Resource
     private ReportService reportService;
-
     @Resource
     WxCorpInfoService wxCorpInfoService;
-
-
     @Resource
     WxCorpInfoMapper wxCorpInfoMapper;
     @Resource
@@ -132,6 +132,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
 
     @Resource
     private ExcelExportService excelExportService;
+    @Resource
+    private PlanProcedureTotalMapper planProcedureTotalMapper;
     @Autowired
     RestTemplate restTemplate;
 
@@ -143,6 +145,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         report.setCreatorId(token);
+        //计算工作时长
+        planProcedureTotalMapper.selectOne(new QueryWrapper<PlanProcedureTotal>().eq("plan_id", report.getPlanId()).eq("procedure_id", report.getProdProcedureId()));
+
         if (report.getId() == null) {
             reportMapper.insert(report);
         } else {
@@ -150,7 +155,29 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         }
         return httpRespMsg;
     }
-//
+
+    @Override
+    public HttpRespMsg getChekerList(Integer checkType, Integer deptId) {
+        //根据checkType获取检查人列表
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        List<User> userList = new ArrayList<>();
+        String token = request.getHeader("TOKEN");
+        User user = userMapper.selectById(token);
+        if (checkType == 0) {
+            user.setPassword(null);
+            userList.add(user);
+        } else if (checkType == 1) {
+            userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, corpwx_userid").eq("department_id", deptId));
+        } else if (checkType == 2) {
+            List<DepartmentOtherManager> otherManagers = departmentOtherManagerMapper.selectList(new QueryWrapper<DepartmentOtherManager>().eq("department_id", deptId));
+            List<String> userIds = otherManagers.stream().map(DepartmentOtherManager::getOtherManagerId).collect(Collectors.toList());
+            userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, corpwx_userid").in("id", userIds));
+        }
+        httpRespMsg.data = userList;
+        return httpRespMsg;
+    }
+
+    //
     //获取报告列表
     @Override
     public HttpRespMsg getReportList(String date,  Integer deptId, String targetUid, HttpServletRequest request) {
@@ -178,26 +205,13 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         map.put("data", list);
                         double reportTime = 0;
                         BigDecimal total = new BigDecimal(0);
-                        int state = (int)list.get(0).get("state");
-                        boolean hasDeny = false;
-                        boolean hasWaiting = false;
+                        int state = 1;
                         for (Map<String, Object> m : list) {
                             double t = (double) m.get("time");
                             reportTime += t;
                             total = total.add((BigDecimal)m.get("cost"));
-                            int curState = (int)m.get("state");
-                            if (curState == 2) {
-                                hasDeny = true;
-                            }
-                            if (curState == 0) {
-                                hasWaiting = true;
-                            }
-                        }
-                        if(hasDeny) {
-                            state = 2;
-                        } else if (hasWaiting) {
-                            state = 0;
                         }
+
                         DecimalFormat df = new DecimalFormat("0.00");
                         map.put("reportTime", df.format(reportTime));
                         map.put("cost", total);
@@ -243,24 +257,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                             double reportTime = 0;
                             if (rList.size() > 0) {
                                 int state = 1;
-                                for (Map<String, Object> m : rList) {
-                                    double t = (double) m.get("time");
-                                    reportTime += t;
-
-                                    //取最低的状态
-                                    if (state == 2) {
-                                        continue;
-                                    }
-                                    if (state == 0) {
-                                        if ((int)m.get("state") == 2) {
-                                            state = 2;
-                                        } else {
-                                            continue;
-                                        }
-                                    } else {
-                                        state = (int)m.get("state");
-                                    }
-                                }
                                 memb.put("state", state);
                             }
                             DecimalFormat df = new DecimalFormat("0.00");
@@ -268,56 +264,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         }
                     }
                 }
-                if(deptId==null&&targetUid==null){
-                    //担任项目经理或者日报审核人,查找相关的人员的日报
-                    List<Map<String, Object>> puserNames = reportMapper.getReportNameByDate(date, user.getCompanyId(), leaderId);
-                    List<Map<String, Object>> inchargeReportList= reportMapper.getInchargeReportByDate(date, leaderId, null);
-
-                    for (Map<String, Object> map2 : puserNames) {
-
-                        if (nameList.size() > 0) {
-                            String myUserId = (String)nameList.get(0).get("id");
-                            if (myUserId.equals(map2.get("id"))) {
-                                //自己的报告,之前已经添加过了,排重
-                                continue;
-                            }
-                        }
-                        List<Object> collect = nameList.stream().map(nl -> nl.get("")).collect(Collectors.toList());
-                        if(!collect.contains(map2.get("id"))){
-                            nameList.add(map2);
-                        }
-                        //再根据人分别获取当天的报告
-                        List<Map<String, Object>> list2 =
-                                inchargeReportList.stream().filter(i->i.get("creatorId").equals(map2.get("id"))).collect(Collectors.toList());
-                        map2.put("data", list2);
-
-                        double reportTime = 0;
-                        BigDecimal total = new BigDecimal(0);
-                        int state = 1;
-                        for (Map<String, Object> m : list2) {
-                            double t = (double) m.get("time");
-                            reportTime += t;
-                            total = total.add((BigDecimal)m.get("cost"));
-                            //取最低的状态
-                            if (state == 2) {
-                                continue;
-                            }
-                            if (state == 0) {
-                                if ((int)m.get("state") == 2) {
-                                    state = 2;
-                                } else {
-                                    continue;
-                                }
-                            } else {
-                                state = (int)m.get("state");
-                            }
-                        }
-                        DecimalFormat df = new DecimalFormat("0.00");
-                        map2.put("reportTime", df.format(reportTime));
-                        map2.put("cost", total);
-                        map2.put("state", state);
-                    }
-                }
             } else {
                 Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
                 List<Integer> ids = null;
@@ -364,23 +310,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         double reportTime = 0;
                         if (list.size() > 0) {
                             int state = 1;
-                            for (Map<String, Object> m : list) {
-                                double t = (double) m.get("time");
-                                reportTime += t;
-                                //取最低的状态
-                                if (state == 2) {
-                                    continue;
-                                }
-                                if (state == 0) {
-                                    if ((int)m.get("state") == 2) {
-                                        state = 2;
-                                    } else {
-                                        continue;
-                                    }
-                                } else {
-                                    state = (int)m.get("state");
-                                }
-                            }
                             map.put("state", state);
                         }
                         DecimalFormat df = new DecimalFormat("0.00");

+ 4 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/TaskTypeServiceImpl.java

@@ -1,11 +1,15 @@
 package com.management.platform.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.management.platform.entity.TaskType;
 import com.management.platform.mapper.TaskTypeMapper;
 import com.management.platform.service.TaskTypeService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.management.platform.util.HttpRespMsg;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+
 /**
  * <p>
  *  服务实现类

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

@@ -571,7 +571,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 //                mainMenu.setChildren(categoryMenuList);
             }
         }
-
+        //担任部门主要负责人的,有‘班组人员’的权限,用于手机端匹配菜单
+        int cnt = departmentMapper.selectCount(new QueryWrapper<Department>().eq("manager_id", user.getId()));
+        if (cnt > 0) {
+            SysModule module = new SysModule();
+            module.setName("班组人员");
+            module.setPath("/groupView");
+            module.setChildren(new ArrayList<>());
+            menuList.add(module);
+        }
         user.setModuleList(menuList);
         //此处返回权限集合
         List<Integer> functionIdList = new ArrayList<>();

+ 2 - 2
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/application.yml

@@ -122,7 +122,7 @@ management:
   security:
     enabled:false:
   server:
-    port: 10012
+    port: 10092
 #  endpoints:
 #    web:
 #      exposure:
@@ -159,7 +159,7 @@ providerSecret: wlwGIUXskWKsNtCfKUsAfJ6ueba55rZnqZvcC-rUM6nQ-LnRDyYgISQ2BO-UlL_A
 configEnv:
   isDev: true
   # 是否是私有化部署,企业内部应用
-  isPrivateDeploy: false
+  isPrivateDeploy: true
 
 privateDeployURL:
   pcUrl: http://dev.huoshishanxin.com/#/

+ 18 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/PlanProcedureTotalMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.management.platform.mapper.PlanProcedureTotalMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.PlanProcedureTotal">
+        <result column="plan_id" property="planId" />
+        <result column="prod_procedure_id" property="prodProcedureId" />
+        <result column="total_wages" property="totalWages" />
+        <result column="total_working_hours" property="totalWorkingHours" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        plan_id, prod_procedure_id, total_wages, total_working_hours
+    </sql>
+
+</mapper>

+ 36 - 0
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/ProdProcedureTeamMapper.xml

@@ -0,0 +1,36 @@
+<?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.ProdProcedureTeamMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.ProdProcedureTeam">
+        <id column="id" property="id" />
+        <result column="company_id" property="companyId" />
+        <result column="user_id" property="userId" />
+        <result column="prod_procedure_id" property="prodProcedureId" />
+        <result column="plan_id" property="planId" />
+        <result column="work_time" property="workTime" />
+        <result column="job_of_money" property="jobOfMoney" />
+        <result column="progress" property="progress" />
+        <result column="checker_id" property="checkerId" />
+        <result column="checker_name" property="checkerName" />
+        <result column="update_time" property="updateTime" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, company_id, user_id, prod_procedure_id, plan_id, work_time, job_of_money, progress, checker_id, checker_name, update_time
+    </sql>
+
+
+    <select id="getReportForWorkList" resultType="java.util.HashMap" >
+        SELECT a.*, date_format(plan.`start_date`,'%Y-%m-%d') as start_date, date_format(plan.`end_date`,'%Y-%m-%d') as end_date, plan.`plan_type`, plan.`product_scheduling_num`,plan.task_type_name,plan.task_name,plan.task_change_notice_num,
+               product.`name` AS product_name,prod_procedure.name AS procedure_name, prod_procedure.check_type
+        FROM prod_procedure_team a
+                 LEFT JOIN plan ON plan.id = a.plan_id
+                 LEFT JOIN product ON product.id = plan.`product_id`
+                 LEFT JOIN prod_procedure ON prod_procedure.id = a.prod_procedure_id
+        where 1 = 1 and a.progress &lt; 100 and a.user_id=#{userId}
+        order by a.plan_id desc
+    </select>
+</mapper>

+ 69 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/mapper/ReportMapper.xml

@@ -1,7 +1,6 @@
 <?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.ReportMapper">
-
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.management.platform.entity.Report">
         <id column="id" property="id" />
@@ -24,6 +23,12 @@
         <result column="task_type_id" property="taskTypeId" />
         <result column="task_type_name" property="taskTypeName" />
     </resultMap>
+    <resultMap id="FullMap" type="com.management.platform.entity.vo.ReportVO" extends="BaseResultMap">
+        <result column="creatorName" property="creatorName" />
+        <result column="productName" property="productName" />
+        <result column="procedureName" property="procedureName" />
+        <result column="checkerName" property="checkerName" />
+    </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
@@ -69,4 +74,67 @@
         </if>
         GROUP BY user.id, report.create_date;
     </select>
+
+
+    <!--根据日期,部门,指定人员获取报告上传人-->
+    <select id="getReportNameByDateAndDept" resultType="java.util.Map">
+        SELECT DISTINCT b.id, b.name
+        FROM report AS a
+        JOIN user AS b ON a.creator_id=b.id
+        WHERE 1=1
+        <if test="date != null and date != ''">
+            AND a.create_date=#{date}
+        </if>
+        <if test="deptIds != null">
+            AND b.department_id in
+            <foreach item="item" collection="deptIds" separator="," open="(" close=")" index="">
+                #{item, jdbcType=INTEGER}
+            </foreach>
+        </if>
+        <if test="companyId != null">
+            AND b.company_id = #{companyId}
+        </if>
+        <if test="userId != null">
+            AND b.id=#{userId}
+        </if>
+    </select>
+
+
+    <!--根据员工id,日期获取当天全部报告信息-->
+    <select id="getReportByDate" resultMap="FullMap">
+        select a.*,product.name as productName,prod_procedure.name as procedureName,checker.name as checkerName,u.name as creatorName
+        FROM report AS a
+        left JOIN product AS b ON a.product_id=b.id
+        left join prod_procedure on prod_procedure.id = a.prod_procedure_id
+        left join sub_project as d on d.id = a.sub_project_id
+        left join user u on u.id = a.project_auditor_id
+        left join user checker on checker.id = a.checker_id
+        WHERE 1=1
+        <if test="date != null and date != ''">
+            AND a.create_date=#{date}
+        </if>
+        AND a.creator_id=#{id}
+        ORDER BY a.creator_id ASC
+    </select>
+
+    <!-- 批量获取员工某天的报告 -->
+    <select id="getUserReportByDate" resultMap="FullMap">
+        select a.*,product.name as productName,prod_procedure.name as procedureName,checker.name as checkerName,u.name as creatorName
+        FROM report AS a
+        left JOIN product AS b ON a.product_id=b.id
+        left join prod_procedure on prod_procedure.id = a.prod_procedure_id
+        left join sub_project as d on d.id = a.sub_project_id
+        left join user u on u.id = a.project_auditor_id
+        left join user checker on checker.id = a.checker_id
+        WHERE 1=1
+        <if test="date != null and date != ''">
+            AND a.create_date=#{date}
+        </if>
+        AND a.creator_id in
+        <foreach item="item" collection="userIds" separator="," open="(" close=")" index="">
+            #{item, jdbcType=VARCHAR}
+        </foreach>
+        ORDER BY a.creator_id ASC
+    </select>
+
 </mapper>

+ 29 - 18
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/components/chooseSomeone.vue

@@ -20,7 +20,7 @@
         <van-checkbox :name="item.id" v-for="item, index in personnelList" :key="index">
           <div class="chooseSomeone_group_item">
             <div>{{ item.name }}</div>
-            <div class="textBeyondHiding">{{ item.workStation }}</div>
+            <div class="textBeyondHiding">{{ item.jobNumber }}</div>
           </div>
         </van-checkbox>
       </van-checkbox-group>
@@ -53,7 +53,11 @@ export default {
     groupViewBack: {
       type: Boolean,
       default: () => false // 是否显示从其他工位选择员工
-    } 
+    },
+    peopleList: {
+      type: Array,
+      default: () => []
+    }
   },
   components: {},
   data() {
@@ -63,22 +67,7 @@ export default {
       groupVal: [],
       treeVal: [],
       // 人员数组
-      personnelList: [
-        { id: 1, name: '张山', workNumber: '123', workStation: '工位1' },
-        { id: 2, name: '李四', workNumber: '123', workStation: '工位2' },
-        { id: 3, name: '王五', workNumber: '123', workStation: '工位3' },
-        { id: 4, name: '赵六', workNumber: '123', workStation: '工位4' },
-        { id: 5, name: '张山', workNumber: '123', workStation: '工位5' },
-        { id: 6, name: '李四', workNumber: '123', workStation: '工位6' },
-        { id: 7, name: '王五', workNumber: '123', workStation: '工位7' },
-        { id: 8, name: '赵六', workNumber: '123', workStation: '工位8' },
-        { id: 9, name: '张山', workNumber: '123', workStation: '工位9' },
-        { id: 10, name: '李四', workNumber: '123', workStation: '工位10' },
-        { id: 11, name: '王五', workNumber: '123', workStation: '工位11' },
-        { id: 12, name: '赵六', workNumber: '123', workStation: '工位12' },
-        { id: 13, name: '张山', workNumber: '123', workStation: '工位13' },
-        { id: 14, name: '李四', workNumber: '123', workStation: '工位14' },
-      ],
+      personnelList: [],
       personnelTree: [{
         label: '一级 1',
         children: [{
@@ -129,6 +118,7 @@ export default {
   mounted() { 
     this.newGroupView = JSON.parse(JSON.stringify(this.groupView)) 
     this.newGroupViewBack = JSON.parse(JSON.stringify(this.groupViewBack))
+    this.personnelList = JSON.parse(JSON.stringify(this.peopleList))
    },
   methods: {
     onSearch() {
@@ -137,6 +127,27 @@ export default {
     newGroupViewBackCli(flg, i) {
       this.newGroupViewBack = flg
       this.newGroupView = i
+    },
+    // 获取所有人员
+    getPeople() {
+      this.$axios.post('/user/getSimpleActiveUserList', {})
+      .then(res => {
+        if (res.code == "ok") {
+          if(!this.peopleList) {
+            this.peopleList = res.data.map(item => {
+              return {
+                name: item.name,
+                id: item.id,
+                phone: item.phone,
+                jobNumber: item.jobNumber
+              }
+            })
+          }
+        } else {
+          this.$toast.clear();
+          this.$toast.fail(res.msg);
+        }
+      }).catch(err => { this.$toast.clear(); });
     }
   },
 };

+ 9 - 0
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/router/index.js

@@ -98,6 +98,15 @@ const router = new Router({
             keepAlive: false
         }
     },
+    
+    {
+        path: "/fillReport",
+        component: () => import("@/views/workView/fillReport"),
+        meta: {
+            title: "报工",
+            keepAlive: false
+        }
+    },
     {
         path: "/test",
         meta: {

+ 14 - 3
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/groupView/groupView.vue

@@ -1,6 +1,12 @@
 <template>
   <div>
-    班组人员
+    <van-nav-bar title="班组成员" left-text="返回"  @click-left="back" fixed left-arrow/>
+    <div style="margin-top: 44px;">
+      <van-list  :finished="true" >
+      <van-cell v-for="item in list" :key="item" :title="item" />
+      </van-list>
+    </div>
+    
   </div>
 </template>
 
@@ -10,14 +16,19 @@ export default {
   components: {},
   data() {
     return {
-
+        list:['张三','李四','王五']
     };
   },
   computed: {},
   watch: {},
   created() {},
   mounted() {},
-  methods: {},
+  methods: {
+    back() {
+      this.$router.go(-1);
+    },
+
+  },
 };
 </script>
 

+ 372 - 354
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/index/index.vue

@@ -2,13 +2,12 @@
     <div class="body">
         <van-swipe class="my-swipe" :autoplay="3000" :height="200" indicator-color="white">
             <van-swipe-item v-for="(item, index) in images" :key="index" class="swipe-img">
-                <img :src="item"/>
-            </van-swipe-item> 
+                <img :src="item" />
+            </van-swipe-item>
         </van-swipe>
         <van-grid :column-num="3">
-            <van-grid-item v-for="(item,index) in routers" :key="index" :icon="item.icon" :text="item.name" 
-            :info="(item.name=='消息记录'&&unreadNum>0)?unreadNum:''"
-            :to="item.url" @click="pfdClick(item)">
+            <van-grid-item v-for="(item, index) in routers" :key="index" :icon="item.icon" :text="item.name"
+                :info="(item.name == '消息记录' && unreadNum > 0) ? unreadNum : ''" :to="item.url" @click="pfdClick(item)">
             </van-grid-item>
         </van-grid>
         <div v-if="isCorpWX" class="kefu" @click="tokefu"><img src="../../assets/icon/kefu.png" alt=""></div>
@@ -16,260 +15,277 @@
     </div>
 </template>
 <script>
-    import Footer from "@/components/Footer";
-    import Vue from "vue";
-    import { ImagePreview } from "vant";
-    Vue.use(ImagePreview);
-    export default {
-        data() {
-            return {
-                isCorpWX:false,
-                isWX:false,
-                user: null,
-                unreadNum:0,
-                images: [
-                    require('../../assets/img/index/banner4.jpeg'),
-                ],
-                routers: [],
-                key: 0,
-                isSyncData: false
-            };
-        },
-        created() {
-            if(localStorage.userInfo) {
-                this.user = JSON.parse(localStorage.userInfo)
-                // 是否为钉钉同步
-                this.isSyncData = this.user.timeType.syncDingding || this.user.timeType.syncFanwei;
-            } 
-        },
-        mounted() {
-            //有错误信息,优先跳转到登录页面去
-            if(window.location.href.indexOf('errorMsg') != '-1') {
-                this.$router.push("/login");
-            }
-            var ua = navigator.userAgent.toLowerCase();
-            if (ua.indexOf("wxwork") > 0) {
-                this.isCorpWX = true;
-            } else if (ua.indexOf("micromessenger") > 0) {
-                this.isWX = true;
-            }
-            let that = this;
-            //企业微信或个人微信是从后台授权后跳转过来的
-            if (this.isCorpWX || this.isWX) {
-                //后台自动授权登录的用户
-                if(window.location.href.indexOf('userId') != '-1') {
-                    let href = window.location.href;
-                    var loginUserId = href.substring(href.indexOf("userId=")+"userId=".length);
-                    if (loginUserId.includes('#/')) {
-                        loginUserId = loginUserId.substring(0, loginUserId.indexOf('#/'));
-                    }
-                    that.getAccountInfo(loginUserId)
-                } else {
-                    //存在一部分用户,没有绑定企业微信,进来后跳到登录页面,登录页面输入账号密码进来后不带userId
-                    if (this.user) {
-                        that.getAccountInfo(that.user.id);
-                    } else {
-                        that.$router.push("/login");
-                    }
+import Footer from "@/components/Footer";
+import Vue from "vue";
+import { ImagePreview } from "vant";
+Vue.use(ImagePreview);
+export default {
+    data() {
+        return {
+            isCorpWX: false,
+            isWX: false,
+            user: null,
+            unreadNum: 0,
+            images: [
+                require('../../assets/img/index/banner4.jpeg'),
+            ],
+            routers: [],
+            key: 0,
+            isSyncData: false
+        };
+    },
+    created() {
+        if (localStorage.userInfo) {
+            this.user = JSON.parse(localStorage.userInfo)
+            // 是否为钉钉同步
+            this.isSyncData = this.user.timeType.syncDingding || this.user.timeType.syncFanwei;
+        }
+    },
+    mounted() {
+        //有错误信息,优先跳转到登录页面去
+        if (window.location.href.indexOf('errorMsg') != '-1') {
+            this.$router.push("/login");
+        }
+        var ua = navigator.userAgent.toLowerCase();
+        if (ua.indexOf("wxwork") > 0) {
+            this.isCorpWX = true;
+        } else if (ua.indexOf("micromessenger") > 0) {
+            this.isWX = true;
+        }
+        let that = this;
+        //企业微信或个人微信是从后台授权后跳转过来的
+        if (this.isCorpWX || this.isWX) {
+            //后台自动授权登录的用户
+            if (window.location.href.indexOf('userId') != '-1') {
+                let href = window.location.href;
+                var loginUserId = href.substring(href.indexOf("userId=") + "userId=".length);
+                if (loginUserId.includes('#/')) {
+                    loginUserId = loginUserId.substring(0, loginUserId.indexOf('#/'));
                 }
+                that.getAccountInfo(loginUserId)
             } else {
-                //其他情况,刷新用户信息
-                if (localStorage.userInfo != null && localStorage.userInfo != 'undefined') {
-                    that.user = JSON.parse(localStorage.userInfo);
+                //存在一部分用户,没有绑定企业微信,进来后跳到登录页面,登录页面输入账号密码进来后不带userId
+                if (this.user) {
                     that.getAccountInfo(that.user.id);
-                } else{
-                    //无用户信息,跳到登录页面去
-                    this.$router.push("/login");
+                } else {
+                    that.$router.push("/login");
                 }
             }
-            if (this.user) {
-                let userss = this.user;
-                if(userss.isMobFirstLogin == 1 && userss.createTime[0] > '2022' && userss.roleName == '超级管理员') {
-                    // 第一次登陆显示
-                    this.previewPicture()
+        } else {
+            //其他情况,刷新用户信息
+            if (localStorage.userInfo != null && localStorage.userInfo != 'undefined') {
+                that.user = JSON.parse(localStorage.userInfo);
+                that.getAccountInfo(that.user.id);
+            } else {
+                //无用户信息,跳到登录页面去
+                this.$router.push("/login");
+            }
+        }
+        if (this.user) {
+            let userss = this.user;
+            if (userss.isMobFirstLogin == 1 && userss.createTime[0] > '2022' && userss.roleName == '超级管理员') {
+                // 第一次登陆显示
+                this.previewPicture()
+            }
+        }
+    },
+    components: {
+        Footer
+    },
+    methods: {
+        pfdClick(item) {
+            if (item.name == '使用说明') {
+                let url = 'http://celiang.oss-cn-hangzhou.aliyuncs.com/measurement/2022-01/18/75it6phpocqYFV1642488558220118.pdf'
+                let name = '使用说明书'
+                // 将要传过去的值
+                this.previewPDF(url, name)
+            }
+        },
+        // 预览pdf
+        previewPDF(url, name) {
+            this.$router.push({
+                path: '/pdf',
+                query: {
+                    url: '',
+                    name: name
                 }
-            } 
+            })
         },
-        components: {
-            Footer
+        // 图片预览
+        previewPicture() {
+            let that = this
+            let arr = [
+                'https://mobworktime.ttkuaiban.com/upload/b9cf863819924106a65255ccffae446d.png',
+                'https://mobworktime.ttkuaiban.com/upload/65afcaed7ad84c51a309db69c888fe6c.png',
+                'https://mobworktime.ttkuaiban.com/upload/3452d33a68bb4092b04147e5482fd0e9.png',
+                'https://mobworktime.ttkuaiban.com/upload/af5b430f48b24b2683fb48a43deab98c.png',
+                'https://mobworktime.ttkuaiban.com/upload/b69779d86be44ef3a1d3585816fde5f3.png'
+            ]
+            ImagePreview({
+                images: arr,
+                startPosition: 0,
+                showIndicators: true,
+                closeable: true,
+                onClose() {
+                    that.previewPictureClose()
+                },
+            });
         },
-        methods: {
-            pfdClick(item) {
-                if(item.name == '使用说明') {
-                    let url = 'http://celiang.oss-cn-hangzhou.aliyuncs.com/measurement/2022-01/18/75it6phpocqYFV1642488558220118.pdf'
-                    let name = '使用说明书'
-                    // 将要传过去的值
-                    this.previewPDF(url, name)
-                }
-            },
-            // 预览pdf
-            previewPDF(url, name) {
-                this.$router.push({
-                    path:  '/pdf',
-                    query: {
-                        url: '',
-                        name: name
-                    }
-                })
-            },
-            // 图片预览
-            previewPicture() {
-                let that = this
-                let arr = [
-                    'https://mobworktime.ttkuaiban.com/upload/b9cf863819924106a65255ccffae446d.png',
-                    'https://mobworktime.ttkuaiban.com/upload/65afcaed7ad84c51a309db69c888fe6c.png',
-                    'https://mobworktime.ttkuaiban.com/upload/3452d33a68bb4092b04147e5482fd0e9.png',
-                    'https://mobworktime.ttkuaiban.com/upload/af5b430f48b24b2683fb48a43deab98c.png',
-                    'https://mobworktime.ttkuaiban.com/upload/b69779d86be44ef3a1d3585816fde5f3.png'
-                ]
-                ImagePreview({
-                    images: arr,
-                    startPosition: 0,
-                    showIndicators: true,
-                    closeable: true,
-                    onClose() {
-                        that.previewPictureClose()
-                    },
-                });
-            },
-            // 处理关闭事件
-            previewPictureClose() {
-                this.$axios.post("/user/mobSkipGuidance", {
-                })
+        // 处理关闭事件
+        previewPictureClose() {
+            this.$axios.post("/user/mobSkipGuidance", {
+            })
                 .then(res => {
-                    if(res.code == "ok") {
-                       let userss = JSON.parse(localStorage.userInfo)
-                       userss.isMobFirstLogin = 0
-                       localStorage.userInfo = JSON.stringify(userss);
-                    } 
-                }).catch(err=> {this.$toast.clear();});
-            },
-            tokefu(){
-                wx.invoke('openThirdAppServiceChat', {
-                    }, function(res) {
-                        console.log('invoke',res);
-                        if (res.err_msg == "openThirdAppServiceChat:ok" || res.err_msg == "openThirdAppServiceChat:cancel") {
-                        }else{
-                            this.$toast.fail('请联系管理员添加客服');
-                        }
-                        
+                    if (res.code == "ok") {
+                        let userss = JSON.parse(localStorage.userInfo)
+                        userss.isMobFirstLogin = 0
+                        localStorage.userInfo = JSON.stringify(userss);
                     }
-                );
-            },
-            // 模块
-            getModule() {
-                if(this.user.userNameNeedTranslate == '1'){
-                    this.agentConfig()
+                }).catch(err => { this.$toast.clear(); });
+        },
+        tokefu() {
+            wx.invoke('openThirdAppServiceChat', {
+            }, function (res) {
+                console.log('invoke', res);
+                if (res.err_msg == "openThirdAppServiceChat:ok" || res.err_msg == "openThirdAppServiceChat:cancel") {
+                } else {
+                    this.$toast.fail('请联系管理员添加客服');
                 }
 
-                this.routers = [
-                    {
-                        name: '今日计划',
-                        url: '/todayPlan',
-                        icon: 'balance-list-o'
-                    },
-                    {
-                        name: '明日计划',
-                        url: '/tomorrowPlan',
-                        icon: 'balance-list-o'
-                    },
-                    {
-                        name: '插单计划',
-                        url: '/InsertionPlan',
-                        icon: 'balance-list-o'
-                    },
-                    {
-                        name: '数据统计',
-                        url: '/statisticsView',
-                        icon: 'balance-list-o'
-                    },
-                    {
-                        name: '班组人员',
-                        url: '/groupView',
-                        icon: 'balance-list-o'
-                    },
-                    {
-                        name: '报工',
-                        url: '/groupView',
-                        icon: 'balance-list-o'
-                    },
-                ]
-            },
-
-            // 获取企业微信参数
-            agentConfig(){
-                let curUrl = window.location.href.split('#')[0]
-                this.$axios.post('/wxcorp/getCorpWXConfig',{
-                    url: curUrl,
-                    token: this.user.id
-                }).then(res => {
-                    if(res.code == 'ok'){
-                        wx.config({
-                            beta: true,
-                            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                            appId: res.data.appid, // 必填,公众号的唯一标识 
-                            timestamp: res.data.timestamp, // 必填,生成签名的时间戳 
-                            nonceStr: res.data.noncestr, // 必填,生成签名的随机串 
-                            signature: res.data.sign, // 必填,签名,见附录1 
-                            jsApiList: ['chooseImage','previewImage','uploadImage','downloadImage','previewFile','getLocation','agentConfig'] 
-                        })
-                        let that = this
-                        wx.ready(function(){
+            }
+            );
+        },
+        // 模块
+        getModule() {
+            if (this.user.userNameNeedTranslate == '1') {
+                this.agentConfig()
+            }
+            const moduleList = this.user.moduleList
+            const modelNameList = []
+            // 取出所有名字,在更具后端返回的名字来判断是否显示
+            moduleList.forEach(module => {
+              modelNameList.push(module.name);
+              if (module.children) {
+                module.children.forEach(child => {
+                  modelNameList.push(child.name);
+                });
+              }
+            });
+            const routersList = [
+                {
+                    name: '今日计划',
+                    moudelName: '今日计划',
+                    url: '/todayPlan',
+                    icon: 'balance-list-o'
+                },
+                {
+                    name: '明日计划',
+                    moudelName: '明日计划',
+                    url: '/tomorrowPlan',
+                    icon: 'balance-list-o'
+                },
+                {
+                    name: '插单计划',
+                    moudelName: '插单计划',
+                    url: '/InsertionPlan',
+                    icon: 'balance-list-o'
+                },
+                {
+                    name: '数据统计',
+                    moudelName: '数据统计',
+                    url: '/statisticsView',
+                    icon: 'balance-list-o'
+                },
+                {
+                    name: '班组人员',
+                    moudelName: '班组人员',
+                    url: '/groupView',
+                    icon: 'balance-list-o'
+                },
+                {
+                    name: '报工',
+                    moudelName: '查看报工',
+                    url: '/workView',
+                    icon: 'balance-list-o'
+                },
+            ]
+            console.log(routersList, modelNameList)
+            this.routers = routersList.filter(item => modelNameList.includes(item.moudelName))
+        },
+        // 获取企业微信参数
+        agentConfig() {
+            let curUrl = window.location.href.split('#')[0]
+            this.$axios.post('/wxcorp/getCorpWXConfig', {
+                url: curUrl,
+                token: this.user.id
+            }).then(res => {
+                if (res.code == 'ok') {
+                    wx.config({
+                        beta: true,
+                        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+                        appId: res.data.appid, // 必填,公众号的唯一标识 
+                        timestamp: res.data.timestamp, // 必填,生成签名的时间戳 
+                        nonceStr: res.data.noncestr, // 必填,生成签名的随机串 
+                        signature: res.data.sign, // 必填,签名,见附录1 
+                        jsApiList: ['chooseImage', 'previewImage', 'uploadImage', 'downloadImage', 'previewFile', 'getLocation', 'agentConfig']
+                    })
+                    let that = this
+                    wx.ready(function () {
                         // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
-                            that.$axios.post('/wxcorp/getCorpWXAgentConfig', {
-                                url: curUrl,
-                                token: that.user.id
-                            }).then(res => {
-                                if(res.code == 'ok'){
-                                    wx.agentConfig({
-                                        corpid: res.data.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
-                                        agentid: res.data.agentid, // 必填,企业微信的应用id (e.g. 1000247)
-                                        timestamp: res.data.timestamp, // 必填,生成签名的时间戳
-                                        nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
-                                        signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
-                                        jsApiList: ['selectExternalContact','openThirdAppServiceChat', 'openAppManage'], //必填,传入需要使用的接口名称
-                                        success: function (result) {
-                                            // console.log(result, '请求微信成功')
-                                            // console.log(window, 'window')
-                                            //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
-                                            window.WWOpenData.bind(document.querySelector('ww-open-data'))
-                                            // that.kefuShow = true
-                                        },
-                                        fail: function (res) {
-                                            // console.log('查看错误信息', res)
-                                            if (res.errMsg.indexOf('function not exist') > -1) {
-                                                alert('版本过低请升级')
-                                            } else {
-                                                // alert('agentConfig出错:'+res.errMsg);
-                                            }
-                                        },
-                                    })
-                                }
-                            }).catch(err => {
-                                if (err.errMsg.indexOf('function not exist') > -1) {
-                                    alert('版本过低请升级')
-                                }else {
-                                    // alert(res.errMsg);
-                                }
-                            })
-                        });
-                        wx.error(function(res){
-                            // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
-                            // alert('wxConfig发生异常:'+JSON.stringify(res));
-                            // 企业第一次授权安装进入后会报not in reliable domain的错误,刷新后正常
-                            location.reload();
-                        });
-                    } else {
-                        // alert(''+res);
-                    }
-                }).catch(err => {
-                    alert(err);
-                })
-            },
+                        that.$axios.post('/wxcorp/getCorpWXAgentConfig', {
+                            url: curUrl,
+                            token: that.user.id
+                        }).then(res => {
+                            if (res.code == 'ok') {
+                                wx.agentConfig({
+                                    corpid: res.data.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
+                                    agentid: res.data.agentid, // 必填,企业微信的应用id (e.g. 1000247)
+                                    timestamp: res.data.timestamp, // 必填,生成签名的时间戳
+                                    nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
+                                    signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
+                                    jsApiList: ['selectExternalContact', 'openThirdAppServiceChat', 'openAppManage'], //必填,传入需要使用的接口名称
+                                    success: function (result) {
+                                        // console.log(result, '请求微信成功')
+                                        // console.log(window, 'window')
+                                        //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
+                                        window.WWOpenData.bind(document.querySelector('ww-open-data'))
+                                        // that.kefuShow = true
+                                    },
+                                    fail: function (res) {
+                                        // console.log('查看错误信息', res)
+                                        if (res.errMsg.indexOf('function not exist') > -1) {
+                                            alert('版本过低请升级')
+                                        } else {
+                                            // alert('agentConfig出错:'+res.errMsg);
+                                        }
+                                    },
+                                })
+                            }
+                        }).catch(err => {
+                            if (err.errMsg.indexOf('function not exist') > -1) {
+                                alert('版本过低请升级')
+                            } else {
+                                // alert(res.errMsg);
+                            }
+                        })
+                    });
+                    wx.error(function (res) {
+                        // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
+                        // alert('wxConfig发生异常:'+JSON.stringify(res));
+                        // 企业第一次授权安装进入后会报not in reliable domain的错误,刷新后正常
+                        location.reload();
+                    });
+                } else {
+                    // alert(''+res);
+                }
+            }).catch(err => {
+                alert(err);
+            })
+        },
 
-            //获取账户信息
-            getAccountInfo(userId) {
-                this.$axios.get('/user/loginByUserId', {params:{userId: userId}})
+        //获取账户信息
+        getAccountInfo(userId) {
+            this.$axios.get('/user/loginByUserId', { params: { userId: userId } })
                 .then(res => {
                     // console.log(res);
                     if (res.code == 'error') {
@@ -286,134 +302,136 @@
                         this.redirectIfNess();
                         this.$forceUpdate()
                         // this.bindIfNessary();
-                    } 
-                }).catch(err=> {
+                    }
+                }).catch(err => {
                     alert('err=' + err);
                 });
-            },
-            redirectIfNess() {
-                var href = window.location.href;
-                if (href.indexOf('path') > 0) {
-                    var path = href.split('path=')[1].split('&')[0];
-                    if (path == 'expense' || path == 'task') {
-                        this.$router.push(path);
-                    }
+        },
+        redirectIfNess() {
+            var href = window.location.href;
+            if (href.indexOf('path') > 0) {
+                var path = href.split('path=')[1].split('&')[0];
+                if (path == 'expense' || path == 'task') {
+                    this.$router.push(path);
                 }
-            },
-            bindIfNessary() {
-                let href = window.location.href;
-                var requestUrl = "";
-                if (this.isCorpWX && (this.user.corpwxUserid == null|| this.user.corpwxUserid == undefined || this.user.corpwxUserid == 'undefined')) {//优先检查企业微信环境
-                    requestUrl = "/wxcorp/bindCorpWeiXin";
-                } else if (this.isWX && (this.user.wxOpenid == null || this.user.wxOpenid == undefined || this.user.wxOpenid == 'undefined')) {
-                    requestUrl = "/wechat/bindWeiXin";
-                } 
-                
-                if (requestUrl.length > 0) {
-                    // localStorage.openId = 'o1L3L5lOrOl3_UEJjONaoT2Rne1I';
-                    //会自动跳转到首页
-                    // let href = 'http://hq.tangusoft.com/?code=011Ptjgc2rx1eI09Irgc2Rvsgc2PtjgF&state=1#/index';
-                    
-                    if (href.includes("com/?code")) {  //url包括 com/?code 证明为从微信跳转回来的
-                        var url = href; //vue自动在末尾加了 #/ 符号,截取去掉
-                        var jingPosit = url.indexOf("com/") + 4; //获取域名结束的位置
+            }
+        },
+        bindIfNessary() {
+            let href = window.location.href;
+            var requestUrl = "";
+            if (this.isCorpWX && (this.user.corpwxUserid == null || this.user.corpwxUserid == undefined || this.user.corpwxUserid == 'undefined')) {//优先检查企业微信环境
+                requestUrl = "/wxcorp/bindCorpWeiXin";
+            } else if (this.isWX && (this.user.wxOpenid == null || this.user.wxOpenid == undefined || this.user.wxOpenid == 'undefined')) {
+                requestUrl = "/wechat/bindWeiXin";
+            }
 
-                        // var urlLeft = url.substring(0, jingPosit);//url左侧部分
-                        var urlRight = url.substring(jingPosit, url.length); //url右侧部分
-                        // console.log('urlRight=' + urlRight);
-                        // window.location = urlLeft + "#/home" + urlRight;//拼接跳转
-                        //获取code
-                        var code = urlRight.substring('?code='.length,urlRight.indexOf('#/index'));
-                        if (code.indexOf('&state=1') > 0) {
-                            code = code.substring(0, code.indexOf('&state=1'));
-                        }
+            if (requestUrl.length > 0) {
+                // localStorage.openId = 'o1L3L5lOrOl3_UEJjONaoT2Rne1I';
+                //会自动跳转到首页
+                // let href = 'http://hq.tangusoft.com/?code=011Ptjgc2rx1eI09Irgc2Rvsgc2PtjgF&state=1#/index';
 
-                        //调用后台接口,注册用户
-                        // console.log('获取到code=='+code);
+                if (href.includes("com/?code")) {  //url包括 com/?code 证明为从微信跳转回来的
+                    var url = href; //vue自动在末尾加了 #/ 符号,截取去掉
+                    var jingPosit = url.indexOf("com/") + 4; //获取域名结束的位置
 
-                        this.$axios.get(requestUrl, {params:{code:code, userId: this.user.id}})
-                            .then(res => {
-                                // console.log(res);
-                                if (res == null) {
-                                    this.$toast.fail('绑定失败');
-                                } else if(res.errcode != null) {
-                                    //报错了
-                                    console.log(res.errmsg);
-                                } else {
-                                    //获取openId
-                                    if (res.data != null && ((this.isWX && res.data.wxOpenid != undefined)
-                                                || (this.isCorpWX && res.data.corpwxUserid != undefined))) {
-                                        localStorage.userInfo = JSON.stringify(res.data);
-                                        // console.log('绑定成功');
-                                        this.user = res.data;
-                                        window.location.href = '/#/my/center';
-                                    }
-                                }
-                            }).catch(err=> {
-                                alert('err=' + err);
-                            });
+                    // var urlLeft = url.substring(0, jingPosit);//url左侧部分
+                    var urlRight = url.substring(jingPosit, url.length); //url右侧部分
+                    // console.log('urlRight=' + urlRight);
+                    // window.location = urlLeft + "#/home" + urlRight;//拼接跳转
+                    //获取code
+                    var code = urlRight.substring('?code='.length, urlRight.indexOf('#/index'));
+                    if (code.indexOf('&state=1') > 0) {
+                        code = code.substring(0, code.indexOf('&state=1'));
                     }
+
+                    //调用后台接口,注册用户
+                    // console.log('获取到code=='+code);
+
+                    this.$axios.get(requestUrl, { params: { code: code, userId: this.user.id } })
+                        .then(res => {
+                            // console.log(res);
+                            if (res == null) {
+                                this.$toast.fail('绑定失败');
+                            } else if (res.errcode != null) {
+                                //报错了
+                                console.log(res.errmsg);
+                            } else {
+                                //获取openId
+                                if (res.data != null && ((this.isWX && res.data.wxOpenid != undefined)
+                                    || (this.isCorpWX && res.data.corpwxUserid != undefined))) {
+                                    localStorage.userInfo = JSON.stringify(res.data);
+                                    // console.log('绑定成功');
+                                    this.user = res.data;
+                                    window.location.href = '/#/my/center';
+                                }
+                            }
+                        }).catch(err => {
+                            alert('err=' + err);
+                        });
                 }
-            },
+            }
+        },
 
-            //获取消息
-            getMessage() {
-                this.$axios.post("/information/list", {
-                })
+        //获取消息
+        getMessage() {
+            this.$axios.post("/information/list", {
+            })
                 .then(res => {
-                    if(res.code == "ok") {
+                    if (res.code == "ok") {
                         var list = res.data;
-                        this.unreadNum = list.filter(l=>l.checked==0).length;
+                        this.unreadNum = list.filter(l => l.checked == 0).length;
                         // console.log(this.unreadNum);
-                        
-                    } 
-                }).catch(err=> {this.$toast.clear();});
-            },
 
+                    }
+                }).catch(err => { this.$toast.clear(); });
         },
-        activated(){
-            this.getMessage()
-        },
-        
-    };
+
+    },
+    activated() {
+        this.getMessage()
+    },
+
+};
 </script>
 
 <style lang="less" scoped>
-    .swipe-img {
-        img {
-            width: 100%;
-            height: 100%;
-        }
+.swipe-img {
+    img {
+        width: 100%;
+        height: 100%;
     }
+}
 
-    .body {
-        height: calc(100vh - 50px);
-        position: relative;
-    }
-    .kefu{
-        position: fixed;
-        right: 35px;
-        bottom: 120px;
-        width: 36px;
-        height: 36px;
-        background-color: #fff;
-        z-index: 1000;
-        border-radius: 50%;
-        img{
-            margin: 4px;
-            width: 28px;
-            height: 28px;
-        }
-    }
+.body {
+    height: calc(100vh - 50px);
+    position: relative;
+}
 
-    .tip {
-        position: absolute;
-        width: 100%;
-        bottom: 5px;
-        font-size: 14px;
-        color: #8f8f8f;
-        margin-top: 20px;
-        text-align: center;
-        line-height: 20px;
+.kefu {
+    position: fixed;
+    right: 35px;
+    bottom: 120px;
+    width: 36px;
+    height: 36px;
+    background-color: #fff;
+    z-index: 1000;
+    border-radius: 50%;
+
+    img {
+        margin: 4px;
+        width: 28px;
+        height: 28px;
     }
+}
+
+.tip {
+    position: absolute;
+    width: 100%;
+    bottom: 5px;
+    font-size: 14px;
+    color: #8f8f8f;
+    margin-top: 20px;
+    text-align: center;
+    line-height: 20px;
+}
 </style>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/login/index.vue

@@ -26,7 +26,7 @@
                 defaultHeight: '0',  //默认屏幕高度
                 nowHeight:  '0',  //实时屏幕高度
                 form: {
-                    username: "",
+                    username: "屈跃庭",
                     password: "",
                 },
                 rules: {

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/InsertionPlan/InsertionPlanAdd.vue

@@ -92,7 +92,7 @@ export default {
     },
     onConfirmDate(value) {
       console.log(value);
-      this.inserFrom.statrTime = value;
+      this.inserFrom.statrTime =  this.formatDate(value);
       this.showPickerDate = false;
     },
     // 日期格式化
@@ -128,6 +128,8 @@ export default {
     flex: 1;
     height: 100%;
     overflow-y: auto;
+    margin: 14px 14px 0 14px;
+    border-radius: 6px;
   }
 
   .InsertionPlanBtn {

+ 28 - 18
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/component/planComponent.vue

@@ -4,38 +4,38 @@
       <div class="planComponent_box" v-for="item, index in productList" :key="index">
         <div class="planComponent_Item">
           <div class="planComponent_ItemTop">
-            <div>产品1</div>
-            <div>001</div>
+            <div>{{ item.productName }}</div>
+            <div>{{ item.productSchedulingNum }}</div>
             <div>
-              <p>20220616-2020618</p><span @click="workShowHide(index)">{{ item.flg ? paiArr[0] : paiArr[1] }}</span>
+              <p>{{ item.startDate }}-{{ item.endDate }}</p><span @click="workShowHide(index)">{{ item.flg ? paiArr[0] : paiArr[1] }}</span>
             </div>
-          </div>
+          </div> 
           <collapse>
             <div v-if="item.flg">
               <div :class="`planComponent_ItemBom planComponent_show`">
                 <div class="PlanItem">
-                  <div>项目代码:</div><span>年后年后年后年后年后年后年后年后年后年后年后年后年后年后年后年后年后</span>
+                  <div>项目代码:</div><span>{{ item.product.code }}</span>
                 </div>
                 <div class="PlanItem">
-                  <div>计划总工价:</div><span class="textBeyondHiding">321</span>
+                  <div>计划总工价:</div><span class="textBeyondHiding">'-'</span>
                 </div>
                 <div class="PlanItem">
-                  <div>数量:</div><span class="textBeyondHiding">123</span>
+                  <div>数量:</div><span class="textBeyondHiding">{{ item.num }}</span>
                 </div>
                 <div class="PlanItem">
-                  <div>单位:</div><span class="textBeyondHiding">321</span>
+                  <div>单位:</div><span class="textBeyondHiding">{{ item.product.unit }}</span>
                 </div>
                 <div class="PlanItem">
-                  <div>订单数量:</div><span class="textBeyondHiding">123</span>
+                  <div>订单数量:</div><span class="textBeyondHiding">{{ item.product.orderNumber }}</span>
                 </div>
                 <div class="PlanItem">
-                  <div>编组:</div><span class="textBeyondHiding">321</span>
+                  <div>编组:</div><span class="textBeyondHiding">{{item.product.groupNumber}}</span>
                 </div>
                 <div class="PlanItem">
-                  <div>每列数量:</div><span class="textBeyondHiding">123</span>
+                  <div>每列数量:</div><span class="textBeyondHiding">{{ item.product.columnNumber }}</span>
                 </div>
                 <div class="PlanItem">
-                  <div>每辆数量:</div><span class="textBeyondHiding">321</span>
+                  <div>每辆数量:</div><span class="textBeyondHiding">{{ item.product.vehicleNumber }}</span>
                 </div>
                 <div class="PlanItemBtn">
                   <van-button type="info" size="small" @click="toDistribution(item)">派工单</van-button>
@@ -56,6 +56,10 @@ export default {
     titleText: {
       type: String,
       default: '今日计划'
+    },
+    planList: {
+      type: Array,
+      default: []
     }
   },
   components: {
@@ -64,31 +68,37 @@ export default {
   data() {
     return {
       activeNames: ['1'],
-      productList: [{ flg: false }, { flg: false }, { flg: false }, { flg: false }, { flg: false }, { flg: false }, { flg: false }, { flg: false }, { flg: false }, { flg: false }, { flg: false }],
-      paiArr: ['收起', '派工']
+      productList: [],
+      paiArr: ['收起', '派工'],
+      type: 0
     };
   },
   computed: {},
   watch: {},
   created() { },
   mounted() { 
-    console.log(this.titleText)
     if(this.titleText == '今日计划') {
       this.paiArr = ['收起', '派工']
+      this.type = 0
     } else {
       this.paiArr = ['收起', '展开']
+      this.type = 1
     }
+    this.productList = this.planList
    },
   methods: {
     workShowHide(index) {
       this.productList[index].flg = !this.productList[index].flg;
     },
     toDistribution(item) {
+      console.log(item, '点击的数据')
       this.$router.push({
         path: '/distribution',
         query: {
-          // id: item.id
-          titleText: this.titleText
+          id: item.id,
+          departmentId: item.stationId,
+          titleText: this.titleText,
+          type: this.type
         }
       })
     }
@@ -182,7 +192,7 @@ export default {
             width: 100%;
 
             span {
-              width: 230px;
+              width: 200px;
               word-break: break-all;
             }
           }

+ 57 - 20
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/distribution.vue

@@ -10,7 +10,7 @@
       <div class="distribution_box" v-for="item,index in distributionList" :key="index">
         <div class="distribution_ItemBom">
           <div class="PlanItem">
-            <span>东湾2号线电池箱东湾2号线电池箱</span>
+            <span>{{ item.prodProcedure.name }}</span>
           </div>
           <div class="PlanItem" v-show="todayAndTomorrow">
             <div>组员:</div>
@@ -18,29 +18,31 @@
             <span style="color: #1989fa;" v-if="!item.personnel" @click="distributionProp(item,index)">分配</span>
           </div>
           <div class="PlanItem">
-            <div>单件工价:</div><span class="textBeyondHiding">123</span>
+            <div>单件工价:</div><span class="textBeyondHiding">{{ item.prodProcedure.workingTime }}</span>
           </div>
           <div class="PlanItem">
-            <div>总工价:</div><span class="textBeyondHiding">123</span>
+            <div>总工价:</div><span class="textBeyondHiding">{{ item.totalWages }}</span>
           </div>
           <div class="PlanItem">
-            <div>单件工时:</div><span class="textBeyondHiding">123</span>
+            <div>单件工时:</div><span class="textBeyondHiding">{{ item.prodProcedure.unitPrice }}</span>
           </div>
           <div class="PlanItem">
-            <div>总工时:</div><span class="textBeyondHiding">123</span>
+            <div>总工时:</div><span class="textBeyondHiding">{{ item.totalWorkingHours }}</span>
           </div>
           <div class="PlanItem" v-if="todayAndTomorrow">
-            <div>进度:</div><span class="textBeyondHiding">123</span>
+            <div>进度:</div><span class="textBeyondHiding">'V'</span>
           </div>
           <div class="PlanItem">
-            <div>质检类型:</div><span class="textBeyondHiding">123</span>
+            <div>质检类型:</div><span class="textBeyondHiding">
+              {{ item.prodProcedure.checkType == 0 ? '自检' : item.prodProcedure.checkType == 1 ? '互检' : '专检' }}
+            </span>
           </div>
         </div>
       </div>
     </div>
     <!-- 弹出层选人 -->
     <van-popup v-model="popupShow" round position="bottom" :style="{ height: '80%',background: '#F4F4F4' }" >
-      <ChooseSomeone :groupView="2" :groupViewBack="true"></ChooseSomeone>
+      <ChooseSomeone :groupView="2" :groupViewBack="true" :peopleList="peopleList"></ChooseSomeone>
     </van-popup>
   </div>
 </template>
@@ -54,34 +56,33 @@ export default {
   },
   data() {
     return {
-      distributionList: [
-        {personnel: ''},
-        {personnel: '张三'},
-        {personnel: ''},
-        {personnel: '李四'},
-        {personnel: '王五'},
-        {personnel: ''},
-        {personnel: ''},
-        {personnel: ''},
-        {personnel: ''},
-        {personnel: ''},
-      ],
+      distributionList: [],
       distributionIndex: null,
       popupShow: false,
       titleText: '今日计划', // 默认文字
       todayAndTomorrow: true, // true 今日计划,false 明日计划
+      id: '', // 传过来的id
+      type: '', // 传过来的type
+      departmentId: '', // 部门id
+      peopleList: [], // 人员数据
     };
   },
   computed: {},
   watch: {},
   created() {},
   mounted() {
+    this.id = this.$route.query.id
+    this.type = this.$route.query.type
+    this.departmentId = this.$route.query.departmentId
+    console.log(this.id)
     this.titleText = this.$route.query.titleText
     if(this.titleText == '今日计划') {
       this.todayAndTomorrow = true
     } else {
       this.todayAndTomorrow = false
     }
+    this.getDistributionList()
+    this.getPeople()
   },
   methods: {
     back() {
@@ -94,6 +95,42 @@ export default {
     distributionProp(item, index) {
       this.distributionIndex = index
       this.popupShow = true
+    },
+    getDistributionList() {
+      this.$axios.post('/plan/planDetail', {
+        id: this.id,
+        type: this.type
+      })
+      .then(res => {
+        if (res.code == "ok") {
+          this.distributionList = res.data
+        } else {
+          this.$toast.clear();
+          this.$toast.fail(res.msg);
+        }
+      }).catch(err => { this.$toast.clear(); });
+    },
+    // 获取人员
+    getPeople() {
+      this.$axios.post('/user/getSimpleActiveUserList', {
+        departmentId: this.departmentId,
+      })
+      .then(res => {
+        if (res.code == "ok") {
+          this.peopleList = res.data.map(item => {
+            return {
+              name: item.name,
+              id: item.id,
+              phone: item.phone,
+              jobNumber: item.jobNumber
+            }
+          })
+          console.log(this.peopleList, '人员数据')
+        } else {
+          this.$toast.clear();
+          this.$toast.fail(res.msg);
+        }
+      }).catch(err => { this.$toast.clear(); });
     }
   },
 };

+ 50 - 13
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/todayPlan.vue

@@ -1,8 +1,9 @@
 <template>
   <div class="flexCoum">
-    <van-nav-bar title="今日计划" left-text="返回" @click-left="back" fixed left-arrow/>
+    <van-nav-bar title="今日计划" left-text="返回" @click-left="back" fixed left-arrow />
     <div class="todayPlan flexCoum-box">
-      <PlanComponent :titleText="'今日计划'"></PlanComponent>
+      <PlanComponent :titleText="'今日计划'" :planList="planList" v-if="planList.length > 0"></PlanComponent>
+      <van-empty description="展无数据" v-else />
     </div>
   </div>
 </template>
@@ -16,28 +17,64 @@ export default {
   },
   data() {
     return {
-
+      planList: [], // 今日计划数据
     };
   },
   computed: {},
   watch: {},
-  created() {},
-  mounted() {},
+  created() { },
+  mounted() {
+    this.getPlanList()
+  },
   methods: {
     back() {
       this.$router.go(-1);
     },
+    getPlanList() {
+      this.$axios.post('/plan/list', {
+        pageIndex: 0,
+        pageSize: 10000,
+        planType: 0,
+        date: this.getNowFormatDate()
+      })
+      .then(res => {
+        if (res.code == "ok") {
+          res.data.records.forEach(item => { item.flg = false })
+          this.planList = res.data.records;
+        } else {
+          this.$toast.clear();
+          this.$toast.fail(res.msg);
+        }
+      }).catch(err => { this.$toast.clear(); });
+    },
+    // 返回当天的日期 格式:yyyy-MM-dd
+    getNowFormatDate() {
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
+    },
   },
 };
 </script>
 
 <style scoped>
-  * {
-    box-sizing: border-box;
-  }
-  .todayPlan {
-    height: 100%;
-    background-color: #F4F4F4;
-    padding-top: 46px;
-  }
+* {
+  box-sizing: border-box;
+}
+
+.todayPlan {
+  height: 100%;
+  background-color: #F4F4F4;
+  padding-top: 46px;
+}
 </style>

+ 36 - 2
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/tomorrowPlan/tomorrowPlan.vue

@@ -2,7 +2,8 @@
   <div class="flexCoum">
     <van-nav-bar title="明日计划" left-text="返回" @click-left="back" fixed left-arrow/>
     <div class="todayPlan flexCoum-box">
-      <PlanComponent :titleText="'明日计划'"></PlanComponent>
+      <PlanComponent :titleText="'明日计划'" :planList="planList" v-if="planList.length > 0"></PlanComponent>
+      <van-empty description="展无数据" v-else />
     </div>
   </div>
 </template>
@@ -16,7 +17,7 @@ export default {
   },
   data() {
     return {
-
+      planList: [], // 明日计划数据
     };
   },
   computed: {},
@@ -27,6 +28,39 @@ export default {
     back() {
       this.$router.go(-1);
     },
+    getPlanList() {
+      this.$axios.post('/plan/list', {
+        pageIndex: 0,
+        pageSize: 10000,
+        planType: 1,
+        date: this.getNowFormatDate()
+      })
+      .then(res => {
+        if (res.code == "ok") {
+          res.data.records.forEach(item => { item.flg = false })
+          this.planList = res.data.records;
+        } else {
+          this.$toast.clear();
+          this.$toast.fail(res.msg);
+        }
+      }).catch(err => { this.$toast.clear(); });
+    },
+    // 返回当天的日期 格式:yyyy-MM-dd
+    getNowFormatDate() {
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
+    },
   },
 };
 </script>

+ 6 - 2
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/statisticsView/statisticsView.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    数据统计
+    <van-nav-bar title="数据统计" left-text="返回"  @click-left="back" fixed left-arrow/>
   </div>
 </template>
 
@@ -17,7 +17,11 @@ export default {
   watch: {},
   created() {},
   mounted() {},
-  methods: {},
+  methods: {
+    back() {
+      this.$router.go(-1);
+    },
+  },
 };
 </script>
 

+ 188 - 7
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/workView/workView.vue

@@ -1,26 +1,207 @@
 <template>
-  <div>
-    报工
+  <div class="distribution">
+    <van-nav-bar title="报工" left-text="返回"  @click-left="back" fixed left-arrow/>
+    
+    <div class="distribution_con contentRoll">
+      <div v-for="(prod, prodIndex) in myPlanProcedureList">
+          <div class="distribution_header">
+            <div>{{prod.product_name}}</div>
+            <div>{{prod.plan_type == 0? prod.product_scheduling_num:prod.task_change_notice_num}}</div>
+            <div>{{prod.start_date}}至{{prod.end_date}}</div>
+          </div>
+          <div class="distribution_box" v-for="item,index in prod.procedureList" :key="index" @click="reportItem(item)">
+            <div >
+              <van-row >
+                <van-col span="20">{{ item.procedure_name }}</van-col>
+                <van-col span="4">{{ item.working_time }}小时</van-col>
+              </van-row>
+              <div style="margin-top:10px;">
+                <van-row gutter="20" >
+                  <van-col span="8">
+                      <div class="valueCls">
+                        {{item.progress}}%
+                      </div>
+                      <div class="labelCls">
+                        进度
+                      </div>
+                  </van-col>
+                  <van-col span="8">
+                    <div class="valueCls">
+                        {{checkTypeTxt[item.check_type]}}
+                      </div>
+                      <div class="labelCls">
+                        质检方式
+                      </div>
+                  </van-col>
+                  <van-col span="8">
+                    <div class="valueCls">
+                        {{item.checker_name?item.checker_name:'待设置'}}
+                      </div>
+                      <div class="labelCls">
+                        质检人
+                      </div>
+                  </van-col>
+                </van-row>
+              </div>
+            </div>
+          </div>
+      </div>
+    </div>
+    <!-- 弹出层选人 -->
+    <van-popup v-model="popupShow" round position="bottom" :style="{ height: '80%',background: '#F4F4F4' }" >
+    </van-popup>
   </div>
 </template>
 
 <script>
 export default {
   props: {},
-  components: {},
+  components: {
+  },
   data() {
     return {
-
+      checkTypeTxt:['自检','互检','专检'],
+      myPlanProcedureList:[],
+      
+      distributionIndex: null,
+      popupShow: false,
+      titleText: '今日计划', // 默认文字
+      todayAndTomorrow: true, // true 今日计划,false 明日计划
     };
   },
   computed: {},
   watch: {},
   created() {},
-  mounted() {},
-  methods: {},
+  mounted() {
+    this.getMyPlanProcedureList();
+  },
+  methods: {
+    back() {
+      this.$router.go(-1);
+    },
+    // 下单计划
+    placeAnOrder() {
+      console.log('点击了下单计划')
+    },
+    distributionProp(item, index) {
+      this.distributionIndex = index
+      this.popupShow = true
+    },
+
+    getMyPlanProcedureList() {
+      const toast = this.$toast.loading({
+          forbidClick: true,
+          duration: 0
+      });
+      this.$axios.post("/plan-procedure-total/getReportForWorkList", this.form)
+      .then(res => {
+          if(res.code == "ok") {
+              this.$toast.clear();
+              this.myPlanProcedureList = res.data;
+          } else {
+              this.$toast.clear();
+              this.$toast.fail(res.msg);
+          }
+      }).catch(err=> {this.$toast.clear();});
+    },
+
+    //打开报工页面
+    reportItem(item) {
+      this.$router.push({
+        path: '/fillReport',
+        query: {
+          id: item.id
+        }
+      })
+    },
+  },
 };
 </script>
 
-<style scoped>
+<style scoped lang="less">
+  * {
+    box-sizing: border-box;
+  }
+  .valueCls {
+    color:#20a0ff;
+    margin-top: 5px;
+    margin-bottom: 5px;;
+  }
+  .labelCls {
+    color:#666;
+  }
+  .distribution {
+    width: 100%;
+    height: 100%;
+    padding: 54px 15px 15px 15px;
+    display: flex;
+    flex-direction: column;
+    flex-wrap: wrap;
+    background-color: #F4F4F4;
+    color: #333;
+
+    .distribution_header {
+      font-size: 16px;
+      div {
+        margin-top: 6px;
+      }
+    }
+
+    .distribution_con {
+      flex: 1;
+      overflow: auto;
+      margin-top: 14px;
+
+      .distribution_box {
+        width: 100%;
+        background-color: #fff;
+        border-radius: 4px;
+        padding: 10px;
+        margin-bottom: 15px;
+        position: relative;
+        overflow: hidden;
+
+        .distribution_ItemBom {
+          font-size: 16px;
+          display: flex;
+          flex-wrap: wrap;
+          padding: 0px 6px 6px 6px;
+
+          .PlanItem {
+            width: 50%;
+            display: flex;
+            padding-top: 12px;
+
+            &:first-child {
+              width: 100%;
+              padding-top: 10px;
+              span {
+                font-size: 18px;
+                color: #333;
+              }
+            }
+
+            &:nth-child(2) {
+              width: 100%;
+              span {
+                width: 230px;
+                word-break: break-all;
+              }
+            }
+
+            div {
+              width: 80px;
+              text-align: right;
+              color: #666;
+            }
 
+            span {
+              display: inline-block;
+              color: #333;
+            }
+          }
+        }
+      }
+    }
+  }
 </style>

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/vue.config.js

@@ -5,7 +5,8 @@ const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 const Timestamp = new Date().getTime();
 
 // var ip = '47.101.180.183'
-var ip = '47.100.37.243'
+// var ip = '47.100.37.243'
+var ip = '192.168.2.12'
 // var ip = '192.168.2.12'
 // var ip = '127.0.0.1'
 

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet-workshop/src/permissions.js

@@ -40,6 +40,7 @@ const StringUtil = {
         reportsCompany: false, // 查看全公司工时 // 后台
         reportsPersonnel: false, // 查看相关人员工时 // 后台
         reportsFillOut: false, // 代填日报 //
+        reportSettings: false, //补报设置
         reportsDeleteAll: false, // 删除全公司日报
         importReport: false, //导入工时lij
         reportsDept: false, //查看本部门工时
@@ -154,6 +155,7 @@ const StringUtil = {
         arr[i] == '查看本部门工时' ? obj.reportsDept = true : ''
         arr[i] == '查看相关人员工时' ? obj.reportsPersonnel = true : ''
         arr[i] == '代填日报' ? obj.reportsFillOut = true : ''
+        arr[i] == '补报设置' ? obj.reportSettings = true : ''
         arr[i] == '自定义薪资项' ? obj.financialCustom = true : ''
         arr[i] == '分摊比例设置' ? obj.financialProportion = true : ''
         arr[i] == '薪资数据上传' ? obj.financialUpload = true : ''

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet-workshop/src/routes.js

@@ -28,8 +28,8 @@ import team from './views/team/index.vue'
 import settings from './views/settings/settings.vue';
 
 
-//企业报表
-import corpReport from './views/corpreport/list';
+//数据统计报表
+import statistic from './views/statistic/index';
 
 // 任务管理
 import tasks from './views/task/list';
@@ -134,7 +134,7 @@ export const allRouters = [
         iconCls: 'iconfont firerock-iconbaobiao',
         leaf: true,
         children: [
-            { path: '/statistic', component: corpReport, name: '数据统计' }
+            { path: '/statistic', component: statistic, name: '数据统计' }
         ],
     },
     

+ 954 - 15
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/orderInsert.vue

@@ -1,23 +1,962 @@
 <template>
-<div class='layout-container'>
+  <div class="layout-container">
+    <div class="layout-container-header">
+      <div class="OutSide">
+        <div class="OutSide_left">
+          <div>{{ titleText }}</div>
+          <div>{{ todayDate }}</div>
+        </div>
+        <div class="OutSide_center">
+          <div class="block" style="padding-left: 30px;">
+            <span class="demonstration">查询以往{{ titleText }}</span>
+            <el-date-picker v-model="planDate" type="date" value-format="yyyy-MM-dd" @change="getTableData(hasChooseDept)"
+              placeholder="选择日期" size="small">
+            </el-date-picker>
+          </div>
+        </div>
+        <div class="OutSide_right">
+          <el-link type="primary" :underline="false" @click="(taskTypeDialog = true)">{{ "任务类型管理"
+          }}</el-link>
+          <el-link type="primary" :underline="false" @click="addPlan()">{{
+            `新增${titleText}`
+          }}</el-link>
+          <el-upload ref="upload" action="#" :limit="1" :http-request="importData" :show-file-list="false">
+            <el-link type="primary" :underline="false">{{ "导入" }}</el-link>
+          </el-upload>
+          <el-link type="primary" :underline="false" @click="exportData()"
+            :download="this.planType == 0 ? '今日计划' : this.planType == 1 ? '明日计划' : this.planType == 2 ? '插单计划' : '' + '.xlsx'">{{
+              "导出"
+            }}</el-link>
+        </div>
+      </div>
+    </div>
+    <div class="layout-container-center">
+      <!-- tab 切换 -->
+      <div class="today-tab">
+        <div v-for="(item, index) in hasSetDeptList" :key="index" :class="`${todayTabIndex === index ? 'on' : ''}`"
+          @click="tabChange(item, index)">
+          {{ item.departmentName }}
+        </div>
+      </div>
 
-</div>
-</template>
+      <!-- 各部分数据列表 -->
+      <el-table :data="tableData" style="width: 100%; flex: 1" v-loading="tableDataLoading"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"> </el-table-column>
+        <el-table-column prop="taskChangeNoticeNum" label="通知号" width="180"></el-table-column>
+        <el-table-column prop="taskName" label="任务名称" width="180"></el-table-column>
+        <el-table-column prop="taskTypeName" label="任务类型" width="180"></el-table-column>
+        <el-table-column prop="planManNum" label="计划人数" width="180"> </el-table-column>
+        <el-table-column prop="num" label="数量" width="180"></el-table-column>
+        <el-table-column prop="planWorkHour" label="计划工时" width="180"></el-table-column>
+        <el-table-column prop="moneyOfJob" label="工钱" width="180"></el-table-column>
+        <el-table-column prop="foremanName" label="工长" width="180"></el-table-column>
+        <el-table-column prop="startDate" label="开工时间" width="180"></el-table-column>
+        <el-table-column prop="endDate" label="完工时间" width="180"></el-table-column>
+        <el-table-column label="编辑">
+          <template slot-scope="scope">
+            <div @click="editPlan(scope.row)" class="colorText">编辑</div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div class="layout-container-floor">
+      <el-button type="primary" size="mini" @click="allocationPlan">下发计划</el-button>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageIndex"
+        :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, prev, pager, next, sizes, jumper"
+        :total="total">
+      </el-pagination>
+    </div>
+
+    <!-- 新增今日计划 -->
+    <el-dialog :title="titleName" :visible.sync="editPlanDiaLog" width="800px" top="18.5vh" :before-close="handleClose">
+      <div class="planDialog">
+        <el-form ref="todayPlanForm" :rules="todayPlanFormrules" :model="todayPlanForm" label-width="120px">
+          <el-form-item label="任务变更通知号" style="width: 100%" prop="taskChangeNoticeNum">
+            <el-input v-model="todayPlanForm.taskChangeNoticeNum" placeholder="请输入"></el-input>
+          </el-form-item>
+          <el-form-item label="任务名称" style="width: 100%" prop="taskName">
+            <el-input v-model="todayPlanForm.taskName" placeholder="请输入"></el-input>
+          </el-form-item>
+          <el-form-item label="任务类型" prop="taskTypeId">
+            <el-select v-model="todayPlanForm.taskTypeId" placeholder="请选择" class="w100">
+              <el-option v-for="item in taskTypeList" :key="item.id" :label="item.taskTypeName" :value="item.id">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="计划人数" prop="planManNum">
+            <el-input v-model="todayPlanForm.planManNum" type="number" placeholder="请输入"></el-input>
+          </el-form-item>
+          <el-form-item label="数量" prop="num">
+            <el-input v-model="todayPlanForm.num" type="number" placeholder="请输入"></el-input>
+          </el-form-item>
+          <el-form-item label="计划工时" prop="planWorkHour">
+            <div style="display: flex;">
+              <el-input v-model="todayPlanForm.planWorkHour" type="number" placeholder="请输入" style="flex: 1;"></el-input>
+              <div style="margin-left: 10px;">小时</div>
+            </div>
+          </el-form-item>
+          <el-form-item label="单价" prop="moneyOfJob">
+            <div style="display: flex;">
+              <el-input v-model="todayPlanForm.moneyOfJob" type="number" placeholder="请输入" style="flex: 1;"></el-input>
+              <div style="margin-left: 10px;">元/小时</div>
+            </div>
+          </el-form-item>
+          <el-form-item label="质检类型" prop="productId">
+            <el-select v-model="todayPlanForm.checkType" placeholder="请选择" class="w100">
+              <el-option v-for="item in checkTypeList" :key="item.id" :label="item.name" :value="item.id">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="工位" prop="stationId">
+            <el-cascader v-model="todayPlanForm.stationId" :options="departmentList" :props="{ checkStrictly: true }"
+              collapse-tags class="w100" clearable @change="getIncharger()">
+            </el-cascader>
+          </el-form-item>
+          <el-form-item label="工长" prop="foremanName">
+            <el-input v-model="todayPlanForm.foremanName"></el-input>
+          </el-form-item>
+          <el-form-item label="开工时间" prop="startDate">
+            <el-date-picker class="w100" v-model="todayPlanForm.startDate" type="date" placeholder="选择日期"
+              value-format="yyyy-MM-dd">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="完工时间" prop="endDate">
+            <el-date-picker class="w100" v-model="todayPlanForm.endDate" type="date" placeholder="选择日期"
+              value-format="yyyy-MM-dd">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="描述" style="width: 100%">
+            <el-input type="textarea" :rows="6" placeholder="请输入描述" v-model="todayPlanForm.describtion">
+            </el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="
+          (editPlanDiaLog = false), $refs['todayPlanForm'].resetFields()
+          ">取 消</el-button>
+        <el-button type="primary" @click="addPlanData('todayPlanForm')">确 定</el-button>
+      </span>
+    </el-dialog>
 
+    <!-- 部门设置弹框 -->
+    <el-dialog title="部门设置" :visible.sync="deptSetDialog" width="800" :before-close="handleClose">
+      <div>
+        你好
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="deptSetDialog = false">取 消</el-button>
+        <el-button type="primary" @click="deptSetDialog = false">确 定</el-button>
+      </span>
+    </el-dialog>
+    
+    <!-- 任务类型管理 -->
+    <el-dialog title="任务类型管理" :visible.sync="taskTypeDialog" width="800" :before-close="handleClose">
+      <div>
+        <el-table :data="taskTypeList" style="width: 100%; flex: 1" v-loading="tableDataLoading">
+        <el-table-column prop="taskName" label="序号" width="180">
+          <template slot-scope="scope">
+            <div>{{scope.$index+1}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="taskTypeName" label="类型名称" width="180"></el-table-column>
+        <el-table-column label="操作">
+          <template slot-scope="scope">
+            <span @click="taskTypeAddDialog=true ,editTaskType(scope.row)" class="colorText">编辑</span>
+            <span @click="deleteTaskType(scope.row)" class="colorText">删除</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="
+          (taskTypeDialog = false)
+          ">取 消</el-button>
+        <el-button type="primary" @click="taskTypeAddDialog=true">新增</el-button>
+      </span>
+    </el-dialog>
+
+    <!-- 任务类型新增 -->
+    <el-dialog title="新增任务类型" :visible.sync="taskTypeAddDialog" width="800" :before-close="handleClose">
+        <div>
+          <el-form ref="taskTypeForm" :rules="taskTypeFormrules" :model="taskTypeForm" label-width="120px">
+          <el-form-item label="分类名称" style="width: 100%" prop="taskTypeName">
+            <el-input v-model="taskTypeForm.taskTypeName" placeholder="请输入"></el-input>
+          </el-form-item>
+          </el-form>
+        </div>
+        <span slot="footer" class="dialog-footer">
+        <el-button @click="
+          (taskTypeAddDialog = false), $refs['taskTypeForm'].resetFields()
+          ">取 消</el-button>
+        <el-button type="primary" @click="addTaskType('taskTypeForm')">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+  
 <script>
+import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
 export default {
-name: '',
-components: {},
-props: { },
-data() { 
-return {}
-},
-computed: {},
-watch: {},
-created () {},
-mounted () {},
-methods: {},
-}
+  name: "planComponent",
+  components: {},
+  props: {
+    planType: {
+      type: String,
+      default: "2",
+    },
+    titleText: {
+      type: String,
+      default: "插单计划",
+    }
+  },
+  data() {
+    return {
+      steelStampNumber: "",
+      todayDate: this.dayjs().format('YYYY-MM-DD'),
+      planDate: this.dayjs().format('YYYY-MM-DD'),
+      deptSetDialog: false,
+      departmentList: [],
+      departmentIdArray: [],
+      deptSetData: "",
+      props: { multiple: true },
+      hasSetDeptList: [],
+      titleName: "",
+      taskTypeDialog:false,
+      todayPlanForm: {
+        id: null,
+        taskChangeNoticeNum: "",
+        taskName: "",
+        taskTypeId: "",
+        taskTypeName: "",
+        planManNum: "",
+        num: "",
+        planWorkHour: "",
+        moneyOfJob: "",
+        foremanId: "",
+        foremanName: "",
+        startDate: "",
+        endDate: "",
+        describtion: "",
+        versionNumber: "",
+      },
+       taskTypeForm: {
+        id: null,
+        companyId: "",
+        taskTypeName: "",
+      },
+      taskTypeList:[],
+      checkTypeList:[
+        {id:0,name:"自检"},{id:1,name:"互检"},{id:2,name:"专检"}
+      ],
+      taskTypeAddDialog:false,
+      todayTabIndex: 0,
+      tableDataLoading: false,
+      tableData: [],
+      editPlanDiaLog: false,
+      pageIndex: 0,
+      pageSize: 20,
+      total: 0,
+      hasChooseDept: "",
+      productList: [],
+      multipleSelection: [],
+      // 表单规则验证
+      todayPlanFormrules: {
+        taskChangeNoticeNum: [
+          { required: true, message: "任务变更通知号", trigger: "blur" },
+        ],
+        taskName: [{ required: true, message: "任务名称", trigger: "blur" }],
+        taskTypeId: [{ required: true, message: "任务类型", trigger: "blur" }],
+        planManNum: [
+          { required: true, message: "计划人数", trigger: "blur" },
+        ],
+        planWorkHour: [
+          { required: true, message: "计划工时", trigger: "blur" },
+        ],
+        num: [{ required: true, message: "数量", trigger: "blur" }],
+        moneyOfJob: [{ required: true, message: "工钱", trigger: "blur" }],
+        stationId: [{ required: true, message: "工位", trigger: "blur" }],
+        startDate: [{ required: true, message: "开工时间", trigger: "blur" }],
+        endDate: [{ required: true, message: "完工时间", trigger: "blur" }],
+      },
+      taskTypeFormrules: {
+        taskTypeName: [
+          { required: true, message: "分类名称", trigger: "blur" },
+        ],
+      },
+    };
+  },
+  computed: {},
+  watch: {},
+  created() { },
+  mounted() {
+    this.getDepartmentList(),
+      this.getPlanDeptSet(),
+      this.getHasSetPlanDeptList(),
+      this.getProductList(),
+      this.getTaskTypeList();
+  },
+  methods: {
+    today() {
+      let date = new Date();
+      let year = date.getFullYear();
+      let month = (date.getMonth() + 1 + "").padStart(2, "0");
+      let day = (date.getDate() + "").padStart(2, "0");
+      return `${year}-${month}-${day}`;
+    },
+    getDepartmentList() {
+      this.http.post(
+        this.port.manage.depList,
+        {},
+        (res) => {
+          if (res.code == "ok") {
+            let dptlist = JSON.parse(JSON.stringify(res.data));
+            this.departmentList = this.changeArr(dptlist);
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
+    },
+    changeArr(arr) {
+      for (var i = 0; i < arr.length; i++) {
+        if (arr[i].id != -1 && arr[i].id != 0) {
+          if (arr[i].children != null && arr[i].children.length > 0) {
+            arr[i].children = this.changeArr(arr[i].children);
+          }
+          arr[i].id && (arr[i].value = arr[i].id);
+          delete arr[i].id;
+        }
+      }
+      for (var i in arr) {
+        if (arr[i].id == -1 || arr[i].id == 0) {
+          arr.splice(i, 1);
+        }
+      }
+      return arr;
+    },
+    deptSet() {
+      console.log(
+        this.departmentIdArray,
+        JSON.stringify(this.departmentIdArray)
+      );
+      // return
+      let arr = [];
+      for (var i in this.departmentIdArray) {
+        arr.push(
+          this.departmentIdArray[i][this.departmentIdArray[i].length - 1]
+        );
+      }
+      this.http.post(
+        "/plan/deptSet",
+        { deptIds: arr.join(",") },
+        (res) => {
+          if (res.code == "ok") {
+            this.$message({
+              message: "设置成功",
+              type: "success",
+            });
+            this.getHasSetPlanDeptList();
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
+    },
+    getPlanDeptSet() {
+      this.http.post(
+        "/plan/deptList",
+        {},
+        (res) => {
+          if (res.code == "ok") {
+            let arr = res.data.split(",") || [];
+            for (var i in arr) {
+              arr[i] = +arr[i];
+            }
+            console.log(arr);
+            this.departmentIdArray = arr;
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
+    },
+    getHasSetPlanDeptList() {
+      this.http.post(
+        "/plan/hasSetDeptDetail",
+        {},
+        (res) => {
+          if (res.code == "ok") {
+            this.hasSetDeptList = res.data;
+            if (res.data.length > 0) {
+              this.tableDataLoading = true;
+              this.hasChooseDept = res.data[0].departmentId;
+              this.getTableData(res.data[0].departmentId);
+            }
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
+    },
+
+    // tab 切换事件
+    tabChange(item, index) {
+      console.log(item, "item");
+      this.todayTabIndex = index;
+      this.hasChooseDept = item.departmentId;
+      this.getTableData(item.departmentId);
+    },
+    // 获取车间数据
+    getTableData(departmentId) {
+      console.log(this.planDate);
+      this.tableDataLoading = true;
+      this.http.post(
+        "/plan/list",
+        {
+          deptId: departmentId,
+          planType: this.planType,
+          date: this.planDate,
+          steelStampNumber: this.steelStampNumber,
+          pageIndex: this.pageIndex,
+          pageSize: this.pageSize,
+        },
+        (res) => {
+          this.tableDataLoading = false;
+          if (res.code == "ok") {
+            this.tableData = res.data.records;
+            this.total = res.data.total;
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.tableDataLoading = false;
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
+    },
+    handleSizeChange(val) {
+      console.log(val, "handleSizeChange");
+      this.pageSize = val;
+      this.pageIndex = 1;
+      this.getTableData(this.hasChooseDept);
+    },
+    handleCurrentChange(val) {
+      console.log(val, "handleCurrentChange");
+      this.pageIndex = val;
+      this.getTableData(this.hasChooseDept);
+    },
+    addPlan() {
+      this.titleName = `新增${this.titleText}`;
+      this.editPlanDiaLog = true;
+      this.getDepartmentList();
+      this.getProductList();
+      this.getTaskTypeList();
+      // this.todayPlanForm
+    },
+    addPlanData(formName) {
+      console.log(this.todayPlanForm);
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          console.log(this.todayPlanForm, "传给后端的值");
+          let stationId =
+            this.todayPlanForm.stationId[
+            this.todayPlanForm.stationId.length - 1
+            ];  
+          this.http.post(
+            "/plan/addOrUpdatePlan",
+            {
+              ...this.todayPlanForm,
+              stationId,
+              planType: this.planType,
+            },
+            (res) => {
+              if (res.code == "ok") {
+                this.$message({
+                  message:
+                    this.todayPlanForm.id == null ? "新增成功" : "修改成功",
+                  type: "success",
+                });
+                this.editPlanDiaLog = false;
+                this.getTableData()
+              } else {
+                this.$message({
+                  message: res.msg,
+                  type: "error",
+                });
+              }
+            },
+            (error) => {
+              this.$message({
+                message: error,
+                type: "error",
+              });
+            }
+          );
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    editPlan(item) {
+      (this.titleName = `编辑${this.titleText}`), (this.editPlanDiaLog = true);
+      this.todayPlanForm = item;
+      console.log(item);
+    },
+    getProductList() {
+      this.http.post(
+        "/product/getProductPage",
+        {
+          pageIndex: null,
+          pageSize: null,
+        },
+        (res) => {
+          if (res.code == "ok") {
+            this.productList = res.data.records;
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
+    },
+    getIncharger() {
+      console.log(this.todayPlanForm.stationId);
+      this.http.post(
+        "/department/getIncharger",
+        {
+          deptId:
+            this.todayPlanForm.stationId[
+            this.todayPlanForm.stationId.length - 1
+            ],
+        },
+        (res) => {
+          if (res.code == "ok") {
+            this.todayPlanForm.foremanId = res.data ? res.data.id : '';
+            this.todayPlanForm.foremanName = res.data ? res.data.name : ''
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
+    },
+    // 跳转至详情
+    toPlanDetil(item) {
+      console.log(item, "详情页面数据");
+      let pathUrl = "";
+      if (this.planType == 1) {
+        pathUrl = "/plan/planDetil";
+      } else {
+        pathUrl = "/plan/planDetil";
+      }
+      console.log(pathUrl);
+      this.$router.push({
+        path: pathUrl,
+        name: "计划详情",
+        params: {
+          id: item.id,
+          topText: item.productSchedulingNum,
+          leftText: item.productName,
+        },
+      });
+    },
+    // 导入数据
+    importData(item) {
+      this.tableDataLoading = true;
+      let formData = new FormData();
+      formData.append("file", item.file);
+      formData.append("planType", this.planType);
+      this.http.uploadFile('/plan/importData', formData,
+        res => {
+          this.$refs.upload.clearFiles();
+          this.tableDataLoading = false;
+          if (res.code == "ok") {
+            this.$message({
+              message: '导入成功',
+              type: "success"
+            });
+            this.getTableData(this.hasChooseDept);
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
+        },
+        error => {
+          this.$refs.upload.clearFiles();
+          this.tableDataLoading = false;
+          this.$message({
+            message: error,
+            type: "error"
+          });
+        });
+    },
+    exportData() {
+      let param = {
+        planType: this.planType,
+        date: this.planDate,
+        steelStampNumber: this.steelStampNumber,
+      }
+      this.http.post('/plan/exportData', param,
+        res => {
+          if (res.code == "ok") {
+            var filePath = res.data;
+            const a = document.createElement('a'); // 创建a标签
+            a.setAttribute('download',(this.planType == 0 ? '今日计划' : this.planType == 1 ? '明日计划' : this.planType == 2 ? '插单计划' : '' )+ '.xlsx');// download属性
+            a.setAttribute('href', filePath);// href链接
+            a.click(); //自执行点击事件
+            a.remove();
+          }
+        },
+        error => {
+          this.$message({
+            message: error,
+            type: "error"
+          });
+        }
+      );
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val.map(item => item.id);
+      console.log(this.multipleSelection)
+    },
+    allocationPlan() {
+      if (this.multipleSelection.length == 0) {
+        return
+      }
+      this.http.post(
+        "/plan/allocationPlan",
+        {
+          ids: this.multipleSelection.join(","),
+          planType: this.planType
+        },
+        (res) => {
+          if (res.code == "ok") {
+            this.$message({
+              message: '下发成功',
+              type: "success",
+            });
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
+    },
+    getTaskTypeList(){
+        this.http.post(
+        "/task-type/list",
+        {},
+        (res) => {
+          if (res.code == "ok") {
+            this.taskTypeList=res.data
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        },
+        (error) => {
+          this.$message({
+            message: error,
+            type: "error",
+          });
+        }
+      );
+    },
+    addTaskType(formName){
+      console.log(this.taskTypeForm);
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          console.log(this.taskTypeForm, "传给后端的值");
+          this.http.post(
+            "/task-type/merge",
+            {
+              ...this.taskTypeForm,
+            },
+            (res) => {
+              if (res.code == "ok") {
+                this.getTaskTypeList();
+                this.$message({
+                  message:
+                    this.taskTypeForm.id == null ? "新增成功" : "修改成功",
+                  type: "success",
+                });
+                this.taskTypeForm=[];
+                this.taskTypeAddDialog = false;
+              } else {
+                this.$message({
+                  message: res.msg,
+                  type: "error",
+                });
+              }
+            },
+            (error) => {
+              this.$message({
+                message: error,
+                type: "error",
+              });
+            }
+          );
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    deleteTaskType(item){
+      let param = {id: item.id};
+      this.$confirm('是否确认删除该分类',this.$t('other.prompts'), {
+          confirmButtonText: this.$t('btn.determine'),
+          cancelButtonText: this.$t('btn.cancel'),
+          type: "warning"
+      })
+      .then(() => {
+          this.http.post('/task-type/delete',param,
+          res => {
+              if (res.code == "ok") {
+                this.getTaskTypeList();
+                  this.$message({
+                      message: this.$t('message.successfullyDeleted'),
+                      type: "success"
+                  });
+              } else {
+                  this.$message({
+                      message: res.msg,
+                      type: "error"
+                  });
+              }
+          },
+          error => {
+              this.$message({
+                  message: error,
+                  type: "error"
+              });
+              }
+          );
+      })
+      .catch(() => {});
+    },
+    editTaskType(row){
+      if (row == null) {
+          this.taskTypeForm = {}
+      } else {
+          this.taskTypeForm = row;
+      }
+    },
+  },
+};
 </script>
 <style scoped lang='scss'>
+.colorText {
+  color: #02a7f0;
+  cursor: pointer;
+}
+
+.layout-container {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-wrap: wrap;
+  flex-direction: column;
+  box-sizing: border-box;
+  padding: 10px;
+
+  .layout-container-header,
+  .layout-container-center,
+  .layout-container-floor {
+    width: 100%;
+  }
+
+  .layout-container-center {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+  }
+
+  .layout-container-floor {
+    box-sizing: border-box;
+    display: flex;
+    justify-content: space-between;
+    padding: 10px 20px;
+  }
+
+  .OutSide {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    flex-direction: initial;
+    padding-bottom: 10px;
+
+    .demonstration {
+      margin-right: 20px;
+      min-width: 48px;
+    }
+
+    .OutSide_left {
+      width: 200px;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+
+      div {
+        font-size: 16px;
+      }
+
+      div:first-child {
+        font-size: 20px;
+      }
+    }
+
+    .OutSide,
+    .block {
+      max-width: 400px;
+    }
+
+    .OutSide_center {
+      flex: 1;
+      display: flex;
+      // justify-content: space-between;
+      align-items: center;
+
+      .block {
+        display: flex;
+        align-items: center;
+        margin-right: 30px;
+      }
+    }
+
+    .OutSide_right {
+      display: flex;
+      align-items: center;
+
+      .el-link {
+        margin-right: 15px;
+      }
+    }
+  }
+
+  .today-tab {
+    display: flex;
+    overflow-x: auto;
+    margin-bottom: 10px;
+
+    div {
+      font-size: 16px;
+      margin-left: 15px;
+      cursor: pointer;
+    }
+
+    .on {
+      color: #02a7f0;
+    }
+  }
+
+  .planDialog::-webkit-scrollbar {
+    display: none;
+    /* Chrome Safari */
+  }
+
+  // 新增样式
+  .planDialog {
+    max-height: 50vh;
+    overflow-y: auto;
+    scrollbar-width: none;
+    /* Firefox */
+    -ms-overflow-style: none;
+
+    /* IE 10+ */
+    .el-form {
+      display: flex;
+      flex-wrap: wrap;
+      justify-content: space-between;
+    }
+
+    .w100 {
+      width: 100%;
+    }
+
+    .el-form-item {
+      width: 50%;
+
+      .w45 {
+        width: 49%;
+      }
+    }
+  }
+}
 </style>
+  

+ 134 - 209
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponent.vue

@@ -9,73 +9,44 @@
         <div class="OutSide_center">
           <div class="block">
             <span class="demonstration">查询以往{{ titleText }}</span>
-            <el-date-picker
-              v-model="planDate"
-              type="date"
-              value-format="yyyy-MM-dd"
-              @change="getTableData(hasChooseDept)"
-              placeholder="选择日期"
-              size="small"
-            >
+            <el-date-picker v-model="planDate" type="date" value-format="yyyy-MM-dd" @change="getTableData(hasChooseDept)"
+              placeholder="选择日期" size="small">
             </el-date-picker>
           </div>
-          <div class="OutSide">
-            <span class="demonstration">{{ "钢印号" }}</span
-            ><el-input
-              v-model="steelStampNumber"
-              size="small"
-              @change="getTableData(hasChooseDept)"
-              placeholder="请输入内容"
-            ></el-input>
+          <div class="OutSide" style="padding-bottom: 0;">
+            <span class="demonstration">{{ "钢印号" }}</span><el-input v-model="steelStampNumber" size="small"
+              @change="getTableData(hasChooseDept)" placeholder="请输入内容" clearable="true"></el-input>
           </div>
         </div>
         <div class="OutSide_right">
-          <div>
-            <span>
-              <el-link
-                type="primary"
-                :underline="false"
-                @click="(deptSetDialog = true), getPlanDeptSet()"
-                >{{ "部门设置" }}</el-link
-              >
+              <el-link type="primary" :underline="false" @click="(deptSetDialog = true), getPlanDeptSet()">{{ "部门设置"
+              }}</el-link>
               <el-link type="primary" :underline="false" @click="addPlan()">{{
                 `新增${titleText}`
               }}</el-link>
               <el-upload ref="upload" action="#" :limit="1" :http-request="importData" :show-file-list="false">
-                    <el-link type="primary" :underline="false">{{ "导入" }}</el-link>
+                <el-link type="primary" :underline="false">{{ "导入" }}</el-link>
               </el-upload>
-              <el-link type="primary" :underline="false" @click="exportData()" :download="this.planType==0?'今日计划':this.planType==1?'明日计划':this.planType==1?'插单计划':''+'.xlsx'">{{ "导出" }}</el-link>
-            </span>
-          </div>
+              <el-link type="primary" :underline="false" @click="exportData()"
+                :download="this.planType == 0 ? '今日计划' : this.planType == 1 ? '明日计划' : this.planType == 2 ? '插单计划' : '' + '.xlsx'">{{ "导出"
+                }}</el-link>
         </div>
       </div>
     </div>
     <div class="layout-container-center">
       <!-- tab 切换 -->
       <div class="today-tab">
-        <div
-          v-for="(item, index) in hasSetDeptList"
-          :key="index"
-          :class="`${todayTabIndex === index ? 'on' : ''}`"
-          @click="tabChange(item, index)"
-        >
+        <div v-for="(item, index) in hasSetDeptList" :key="index" :class="`${todayTabIndex === index ? 'on' : ''}`"
+          @click="tabChange(item, index)">
           {{ item.departmentName }}
         </div>
       </div>
 
       <!-- 各部分数据列表 -->
-      <el-table
-        :data="tableData"
-        style="width: 100%; flex: 1"
-        v-loading="tableDataLoading"
-        @selection-change="handleSelectionChange"
-      >
+      <el-table :data="tableData" style="width: 100%; flex: 1" v-loading="tableDataLoading"
+        @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55"> </el-table-column>
-        <el-table-column
-          prop="productSchedulingNum"
-          label="排产工单号"
-          width="180"
-        >
+        <el-table-column prop="productSchedulingNum" label="排产工单号" width="180">
           <template slot-scope="scope">
             <div @click="toPlanDetil(scope.row)" class="colorText">
               {{ scope.row.productSchedulingNum }}
@@ -106,72 +77,32 @@
     </div>
     <div class="layout-container-floor">
       <el-button type="primary" size="mini" @click="allocationPlan">下发计划</el-button>
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="pageIndex"
-        :page-sizes="[10, 20, 50, 100]"
-        :page-size="pageSize"
-        layout="total, prev, pager, next, sizes, jumper"
-        :total="total"
-      >
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageIndex"
+        :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, prev, pager, next, sizes, jumper"
+        :total="total">
       </el-pagination>
     </div>
 
     <!-- 新增今日计划 -->
-    <el-dialog
-      :title="titleName"
-      :visible.sync="editPlanDiaLog"
-      width="800px"
-      top="18.5vh"
-      :before-close="handleClose"
-    >
+    <el-dialog :title="titleName" :visible.sync="editPlanDiaLog" width="800px" top="18.5vh" :before-close="handleClose">
       <div class="planDialog">
-        <el-form
-          ref="todayPlanForm"
-          :rules="todayPlanFormrules"
-          :model="todayPlanForm"
-          label-width="120px"
-        >
-          <el-form-item
-            label="排产工单号"
-            style="width: 100%"
-            prop="productSchedulingNum"
-          >
+        <el-form ref="todayPlanForm" :rules="todayPlanFormrules" :model="todayPlanForm" label-width="120px">
+          <el-form-item label="排产工单号" style="width: 100%" prop="productSchedulingNum">
             <el-input v-model="todayPlanForm.productSchedulingNum"></el-input>
           </el-form-item>
           <el-form-item label="产品名称" style="width: 100%" prop="productId">
-            <el-select
-              v-model="todayPlanForm.productId"
-              placeholder="请选择"
-              class="w100"
-            >
-              <el-option
-                v-for="item in productList"
-                :key="item.id"
-                :label="item.name"
-                :value="item.id"
-              >
+            <el-select v-model="todayPlanForm.productId" placeholder="请选择" class="w100">
+              <el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
               </el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="项目代码" style="width: 100%" prop="projectCode">
             <el-input v-model="todayPlanForm.projectCode"></el-input>
           </el-form-item>
-          <el-form-item
-            label="钢印号"
-            style="width: 100%"
-            prop="steelStampNumberStart"
-          >
-            <el-input
-              class="w45"
-              v-model="todayPlanForm.steelStampNumberStart"
-            ></el-input>
+          <el-form-item label="钢印号" style="width: 100%" prop="steelStampNumberStart">
+            <el-input class="w45" v-model="todayPlanForm.steelStampNumberStart"></el-input>
             {{ "-" }}
-            <el-input
-              class="w45"
-              v-model="todayPlanForm.steelStampNumberEnd"
-            ></el-input>
+            <el-input class="w45" v-model="todayPlanForm.steelStampNumberEnd"></el-input>
           </el-form-item>
           <el-form-item label="数量" prop="num">
             <el-input v-model="todayPlanForm.num"></el-input>
@@ -189,71 +120,39 @@
                   >
                   </el-option>
                 </el-select> -->
-            <el-cascader
-              v-model="todayPlanForm.stationId"
-              :options="departmentList"
-              :props="{ checkStrictly: true }"
-              collapse-tags
-              class="w100"
-              clearable
-              @change="getIncharger()"
-            >
+            <el-cascader v-model="todayPlanForm.stationId" :options="departmentList" :props="{ checkStrictly: true }"
+              collapse-tags class="w100" clearable @change="getIncharger()">
             </el-cascader>
           </el-form-item>
-          <el-form-item label="工长" prop="foremanId">
+          <el-form-item label="工长" prop="foremanName">
             <el-input v-model="todayPlanForm.foremanName"></el-input>
           </el-form-item>
           <el-form-item label="开工时间" prop="startDate">
-            <el-date-picker
-              class="w100"
-              v-model="todayPlanForm.startDate"
-              type="date"
-              placeholder="选择日期"
-              value-format="yyyy-MM-dd"
-            >
+            <el-date-picker class="w100" v-model="todayPlanForm.startDate" type="date" placeholder="选择日期"
+              value-format="yyyy-MM-dd">
             </el-date-picker>
           </el-form-item>
           <el-form-item label="完工时间" prop="endDate">
-            <el-date-picker
-              class="w100"
-              v-model="todayPlanForm.endDate"
-              type="date"
-              placeholder="选择日期"
-              value-format="yyyy-MM-dd"
-            >
+            <el-date-picker class="w100" v-model="todayPlanForm.endDate" type="date" placeholder="选择日期"
+              value-format="yyyy-MM-dd">
             </el-date-picker>
           </el-form-item>
           <el-form-item label="描述" style="width: 100%">
-            <el-input
-              type="textarea"
-              :rows="6"
-              placeholder="请输入描述"
-              v-model="todayPlanForm.describtion"
-            >
+            <el-input type="textarea" :rows="6" placeholder="请输入描述" v-model="todayPlanForm.describtion">
             </el-input>
           </el-form-item>
         </el-form>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button
-          @click="
-            (editPlanDiaLog = false), $refs['todayPlanForm'].resetFields()
-          "
-          >取 消</el-button
-        >
-        <el-button type="primary" @click="addPlanData('todayPlanForm')"
-          >确 定</el-button
-        >
+        <el-button @click="
+          (editPlanDiaLog = false), $refs['todayPlanForm'].resetFields()
+          ">取 消</el-button>
+        <el-button type="primary" @click="addPlanData('todayPlanForm')">确 定</el-button>
       </span>
     </el-dialog>
 
     <!-- 部门设置弹框 -->
-    <el-dialog
-      title="部门设置"
-      :visible.sync="deptSetDialog"
-      width="30%"
-      :before-close="handleClose"
-    >
+    <el-dialog title="部门设置" :visible.sync="deptSetDialog" width="30%" :before-close="handleClose">
       <div>
         <span>{{ "选择部门" }}</span>
         <!-- <el-cascader
@@ -264,11 +163,8 @@
           clearable
         >
         </el-cascader> -->
-        <el-cascader
-          v-model="departmentIdArray"
-          :options="departmentList"
-          :props="{ multiple: true, checkStrictly: true }"
-          clearable>
+        <el-cascader v-model="departmentIdArray" :options="departmentList"
+          :props="{ multiple: true, checkStrictly: true }" clearable>
         </el-cascader>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -279,7 +175,7 @@
   </div>
 </template>
   
-  <script>
+<script>
 export default {
   name: "planComponent",
   components: {},
@@ -295,7 +191,7 @@ export default {
     },
   },
   data() {
-    return { 
+    return {
       steelStampNumber: "",
       planDate: this.todayDate,
       deptSetDialog: false,
@@ -320,6 +216,7 @@ export default {
         startDate: "",
         endDate: "",
         describtion: "",
+        versionNumber: "",
       },
       todayTabIndex: 0,
       tableDataLoading: false,
@@ -354,7 +251,7 @@ export default {
   },
   computed: {},
   watch: {},
-  created() {},
+  created() { },
   mounted() {
     this.getDepartmentList(),
       this.getPlanDeptSet(),
@@ -568,8 +465,9 @@ export default {
           console.log(this.todayPlanForm, "传给后端的值");
           let stationId =
             this.todayPlanForm.stationId[
-              this.todayPlanForm.stationId.length - 1
+            this.todayPlanForm.stationId.length - 1
             ];
+          this.$delete(this.todayPlanForm, 'product')  
           this.http.post(
             "/plan/addOrUpdatePlan",
             {
@@ -642,7 +540,7 @@ export default {
         {
           deptId:
             this.todayPlanForm.stationId[
-              this.todayPlanForm.stationId.length - 1
+            this.todayPlanForm.stationId.length - 1
             ],
         },
         (res) => {
@@ -685,80 +583,80 @@ export default {
       });
     },
     // 导入数据
-    importData(item){
-        this.tableDataLoading = true;
-        let formData = new FormData();
-        formData.append("file", item.file);
-        formData.append("planType",this.planType);
-        this.http.uploadFile('/plan/importData', formData,
+    importData(item) {
+      this.tableDataLoading = true;
+      let formData = new FormData();
+      formData.append("file", item.file);
+      formData.append("planType", this.planType);
+      this.http.uploadFile('/plan/importData', formData,
         res => {
-            this.$refs.upload.clearFiles();
-            this.tableDataLoading = false;
-            if (res.code == "ok") {
-                this.$message({
-                    message: '导入成功',
-                    type: "success"
-                });
-                this.getTableData(this.hasChooseDept);
-            } else {
-                this.$message({
-                    message: res.msg,
-                    type: "error"
-                });
-            }
-        },
-        error => {
-            this.$refs.upload.clearFiles();
-            this.tableDataLoading = false;
+          this.$refs.upload.clearFiles();
+          this.tableDataLoading = false;
+          if (res.code == "ok") {
             this.$message({
-                message: error,
-                type: "error"
+              message: '导入成功',
+              type: "success"
             });
+            this.getTableData(this.hasChooseDept);
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
+        },
+        error => {
+          this.$refs.upload.clearFiles();
+          this.tableDataLoading = false;
+          this.$message({
+            message: error,
+            type: "error"
+          });
         });
     },
-    exportData(){
+    exportData() {
       let param = {
-          planType: this.planType,
-          date: this.planDate,
-          steelStampNumber: this.steelStampNumber,
+        planType: this.planType,
+        date: this.planDate,
+        steelStampNumber: this.steelStampNumber,
       }
-      this.http.post('/plan/exportData',param,
-      res => {
+      this.http.post('/plan/exportData', param,
+        res => {
           if (res.code == "ok") {
-              var filePath = res.data;
-              const a = document.createElement('a'); // 创建a标签
-              a.setAttribute('download', this.$t('projectexport') + '.xlsx');// download属性
-              a.setAttribute('href', filePath);// href链接
-              a.click(); //自执行点击事件
-              a.remove();
-          } 
-      },
-      error => {
+            var filePath = res.data;
+            const a = document.createElement('a'); // 创建a标签
+            a.setAttribute('download',(this.planType == 0 ? '今日计划' : this.planType == 1 ? '明日计划' : this.planType == 2 ? '插单计划' : '')+ '.xlsx');// download属性
+            a.setAttribute('href', filePath);// href链接
+            a.click(); //自执行点击事件
+            a.remove();
+          }
+        },
+        error => {
           this.$message({
-              message: error,
-              type: "error"
+            message: error,
+            type: "error"
           });
-          }
+        }
       );
     },
     handleSelectionChange(val) {
-        this.multipleSelection = val.map(item => item.id);
-        console.log(this.multipleSelection)
+      this.multipleSelection = val.map(item => item.id);
+      console.log(this.multipleSelection)
     },
-    allocationPlan(){
-      if(this.multipleSelection.length==0){
-          return
+    allocationPlan() {
+      if (this.multipleSelection.length == 0) {
+        return
       }
       this.http.post(
         "/plan/allocationPlan",
         {
-          ids:this.multipleSelection.join(","),
-          planType:this.planType
+          ids: this.multipleSelection.join(","),
+          planType: this.planType
         },
         (res) => {
           if (res.code == "ok") {
             this.$message({
-              message:'下发成功',
+              message: '下发成功',
               type: "success",
             });
           } else {
@@ -779,11 +677,12 @@ export default {
   },
 };
 </script>
-  <style scoped lang='scss'>
+<style scoped lang='scss'>
 .colorText {
   color: #02a7f0;
   cursor: pointer;
 }
+
 .layout-container {
   width: 100%;
   height: 100%;
@@ -792,22 +691,26 @@ export default {
   flex-direction: column;
   box-sizing: border-box;
   padding: 10px;
+
   .layout-container-header,
   .layout-container-center,
   .layout-container-floor {
     width: 100%;
   }
+
   .layout-container-center {
     flex: 1;
     display: flex;
     flex-direction: column;
   }
+
   .layout-container-floor {
     box-sizing: border-box;
     display: flex;
-    justify-content: end;
+    justify-content: space-between;
     padding: 10px 20px;
   }
+
   .OutSide {
     width: 100%;
     display: flex;
@@ -815,29 +718,38 @@ export default {
     justify-content: space-between;
     flex-direction: initial;
     padding-bottom: 10px;
+
     .demonstration {
       margin-right: 20px;
       min-width: 48px;
     }
+
     .OutSide_left {
       width: 200px;
       display: flex;
       justify-content: space-between;
       align-items: center;
+
       div {
         font-size: 16px;
       }
+
       div:first-child {
         font-size: 20px;
       }
     }
-    .OutSide, .block {
+
+    .OutSide,
+    .block {
       max-width: 400px;
     }
+
     .OutSide_center {
       flex: 1;
       display: flex;
       justify-content: center;
+      align-items: center;
+
       .block {
         display: flex;
         align-items: center;
@@ -846,44 +758,57 @@ export default {
     }
 
     .OutSide_right {
+      display: flex;
+      align-items: center;
       .el-link {
         margin-right: 15px;
       }
     }
   }
+
   .today-tab {
     display: flex;
     overflow-x: auto;
     margin-bottom: 10px;
+
     div {
       font-size: 16px;
       margin-left: 15px;
       cursor: pointer;
     }
+
     .on {
       color: #02a7f0;
     }
   }
 
   .planDialog::-webkit-scrollbar {
-    display: none; /* Chrome Safari */
+    display: none;
+    /* Chrome Safari */
   }
+
   // 新增样式
   .planDialog {
     max-height: 50vh;
     overflow-y: auto;
-    scrollbar-width: none; /* Firefox */
-    -ms-overflow-style: none; /* IE 10+ */
+    scrollbar-width: none;
+    /* Firefox */
+    -ms-overflow-style: none;
+
+    /* IE 10+ */
     .el-form {
       display: flex;
       flex-wrap: wrap;
       justify-content: space-between;
     }
+
     .w100 {
       width: 100%;
     }
+
     .el-form-item {
       width: 50%;
+
       .w45 {
         width: 49%;
       }

+ 17 - 7
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponentDetil.vue

@@ -17,15 +17,25 @@
                 :key="tableKey"
                 style="width: 100%;height: 80vh;"
                 v-loading="tableDataLoading">
-                    <el-table-column prop="name" label="工序名称"></el-table-column>
-                    <el-table-column prop="workingTime" label="单件工时"></el-table-column>
-                    <el-table-column prop="productName" label="总工时" width="180"></el-table-column>
-                    <el-table-column prop="unitPrice" label="单件工价" width="180"></el-table-column>
-                    <el-table-column prop="productName" label="总工价" width="180"></el-table-column>
+                    <el-table-column label="工序名称">
+                        <template slot-scope="scope">{{ scope.row.prodProcedure.name }}</template>
+                    </el-table-column>
+                    <el-table-column label="单件工时">
+                        <template slot-scope="scope">{{ scope.row.prodProcedure.workingTime }}</template>
+                    </el-table-column>
+                    <el-table-column label="总工时" width="180">
+                        <template slot-scope="scope">{{ scope.row.totalWorkingHours }}</template>
+                    </el-table-column>
+                    <el-table-column label="单件工价" width="180">
+                        <template slot-scope="scope">{{ scope.row.prodProcedure.unitPrice }}</template>
+                    </el-table-column>
+                    <el-table-column label="总工价" width="180">
+                        <template slot-scope="scope">{{ scope.row.totalWages }}</template>
+                    </el-table-column>
                     <el-table-column label="质检类型" width="180">
-                        <template slot-scope="scope">{{ scope.row.checkType==0?"自检": scope.row.checkType==1?"互检":"专检"}}</template>
+                        <template slot-scope="scope">{{ scope.row.prodProcedure.checkType==0?"自检": scope.row.prodProcedure.checkType==1?"互检":"专检"}}</template>
                     </el-table-column>
-                    <el-table-column prop="productName" label="组员" width="180"></el-table-column>
+                    <el-table-column label="组员" width="180"></el-table-column>
                 </el-table>
             </div>
             <!-- <div v-if="TabIndex == 1"  v-loading="tableDataLoading">

+ 205 - 0
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/product/list.vue

@@ -18,11 +18,19 @@
                 </el-form-item>
                 <!--操作按钮-->
                 <el-form-item style="float:right;">
+<<<<<<< HEAD
                     <el-link type="primary" :underline="false"  :disabled="productSelections.length==0" @click="importProduct()">导出产品</el-link>
                 </el-form-item>
                 <el-form-item style="float:right;">
                     <el-upload class="filter-item" name="file" action :on-error="uploadFalse" :on-success="uploadSuccess"
                         :before-upload="beforeAvatarUpload"  ref="upload" accept=".xlsx,.xls"
+=======
+                    <el-link type="primary" :underline="false" @click="importProduct()">导出产品</el-link>
+                </el-form-item>
+                <el-form-item style="float:right;">
+                    <el-upload class="filter-item" name="file" action :on-error="uploadFalse" :on-success="uploadSuccess"
+                        :before-upload="beforeAvatarUpload" :limit="1" ref="upload" accept=".xlsx,.xls"
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
                         :show-file-list="false" :file-list="fileList" :http-request="uploadFile">
 
                         <el-link type="primary" :underline="false">导入产品</el-link>
@@ -110,7 +118,11 @@
 
             <el-table-column type="selection" width="55">
             </el-table-column>
+<<<<<<< HEAD
             <el-table-column prop="name" label="产品名称"  width="300"></el-table-column>
+=======
+            <el-table-column prop="name" label="产品名称" sortable="custom" width="300"></el-table-column>
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
             <el-table-column prop="code" label="项目代码" width="200"></el-table-column>
             <el-table-column prop="orderNumber" label="订单数量" width="100"></el-table-column>
             <el-table-column prop="unit" label="单位" width="100"></el-table-column>
@@ -186,11 +198,16 @@
                         <el-input v-model="addForm.name" :placeholder="$t('peaseenterthe')" clearable maxlength="50"
                             show-word-limit="true"></el-input>
                     </el-form-item>
+<<<<<<< HEAD
                     <el-form-item label="项目代码" prop="code">
+=======
+                    <el-form-item label="项目代码">
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
                         <!-- <el-input v-model="addForm.code" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目编号" clearable></el-input> -->
                         <el-input v-model="addForm.code" :placeholder="$t('peaseenterthe')" clearable maxlength="50"
                             show-word-limit="true"></el-input>
                     </el-form-item>
+<<<<<<< HEAD
                     <el-form-item label="订单数量" prop="orderNumber">
                         <el-input-number v-model="addForm.orderNumber" :placeholder="$t('peaseenterthe')" clearable
                             :min="1" :max="10000"></el-input-number>
@@ -200,16 +217,35 @@
                             maxlength="10"></el-input>
                     </el-form-item>
                     <el-form-item label="编组" prop="groupNumber">
+=======
+                    <el-form-item label="订单数量">
+                        <el-input-number v-model="addForm.orderNumber" :placeholder="$t('peaseenterthe')" clearable
+                            :min="1"></el-input-number>
+                    </el-form-item>
+                    <el-form-item label="单位">
+                        <el-input v-model="addForm.unit" :placeholder="$t('peaseenterthe')" clearable
+                            maxlength="10"></el-input>
+                    </el-form-item>
+                    <el-form-item label="编组">
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
                         <el-input v-model="addForm.groupNumber" :placeholder="$t('peaseenterthe')" clearable
                             maxlength="10"></el-input>
                     </el-form-item>
                     <el-form-item label="每列数量">
                         <el-input-number v-model="addForm.columnNumber" :placeholder="$t('peaseenterthe')"
+<<<<<<< HEAD
                             :min="1" :max="10000"></el-input-number>
                     </el-form-item>
                     <el-form-item label="每辆数量">
                         <el-input-number v-model="addForm.vehicleNumber" :placeholder="$t('peaseenterthe')"
                             :min="1" :max="10000"></el-input-number>
+=======
+                            :min="1"></el-input-number>
+                    </el-form-item>
+                    <el-form-item label="每辆数量">
+                        <el-input-number v-model="addForm.vehicleNumber" :placeholder="$t('peaseenterthe')"
+                            :min="1"></el-input-number>
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
                     </el-form-item>
 
                     <el-form-item label="描述" prop="description">
@@ -401,6 +437,23 @@
                 <el-button type="primary" @click=" saveCopyProduct()">确定</el-button>
             </span>
         </el-dialog>
+<<<<<<< HEAD
+=======
+        <!-- 复制产品 -->
+        <el-dialog :title="title" :visible.sync="copyVisible" width="30%">
+            <div>
+                <el-form ref="form" :model="category" label-width="80px">
+                    <el-form-item label="产品名称">
+                        <el-input v-model="pdName"></el-input>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="copyVisible = false">取 消</el-button>
+                <el-button type="primary" @click=" saveCopyProduct()">确定</el-button>
+            </span>
+        </el-dialog>
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
 
         <!-- 新增产品分类 -->
         <el-dialog :title="title" :visible.sync="isganttshowCa" width="30%">
@@ -636,14 +689,20 @@ a {
 import util from "../../common/js/util";
 // 自定义select组件
 import selectCat from "@/components/select.vue"
+<<<<<<< HEAD
 import { version } from 'vue';
+=======
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
 export default {
     components: {
         selectCat
     },
     data() {
         return {
+<<<<<<< HEAD
             
+=======
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
             copyVisible: false,
             pdName: '',
             productSelections: [], //选中的产品id集合
@@ -788,6 +847,7 @@ export default {
             rules: {
                 name: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
                 code: [{ required: true, message: this.$t('qing-shu-ru-bian-hao'), trigger: "blur" }],
+<<<<<<< HEAD
                 orderNumber: [{ required: true, message:' 请输入订单数量', trigger: "blur" }],
                 unit: [{ required: true, message: '请输入单位', trigger: "blur" }],
                 groupNumber: [{ required: true, message: '请输入编组', trigger: "blur" }],
@@ -879,6 +939,94 @@ export default {
 
             createDate: [], // 项目筛选时间段
 
+=======
+                projectStageName: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
+                projectLevelName: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
+            },
+            ause: [],
+            auseList: [],
+            yonghuUser: [],
+            filterText: '',
+            filterText2: '',
+            showClfDialog: false,
+            addClfDialog: false,
+            addClf: { name: '', id: '' },
+            addMainForm: {
+                name: '',
+                id: '',
+                code: '',
+                categoryId: ''
+            },
+            addPanthForm: {
+                id: '',
+                projectStageName: ''
+            },
+            addLevelForm: {
+                id: '',
+                projectStageName: ''
+            },
+            statusClf: null,
+            permissionsObj: {},
+            checkedPForSubArr: [],
+            checkedProjectArr: [],
+            checkedWuduDialog: false,
+            checkedWuduArr: [],
+            checkoradd: true,
+
+            addGroupPersonBtnLoading: false,
+            addGroupPersonDialog: false,
+            addGroupList: [],
+            addGroupPersonData: {
+                group: [],
+                person: null,
+                personNames: ''
+            },
+            addGroupPersonPdialog: false,
+            showColumnWidth: '300',
+            deleteVif: null,
+            isAddGroupPerson: true,
+            projectMainId: '',
+            supplierList: '',
+            sortProp: '',
+            sortOrder: null,
+            currentCell: null, // 当前单击的是哪一个单元格
+            phaseList: [],
+            phaseProjectId: '', // 阶段项目id
+            phaseProjectValie: null, // 阶段项目值
+            listHeader: [], // 列表表头
+            rowid: '',
+            phaseProjectDialog: false, // 项目阶段
+            levelList: [],  // 项目级别
+            departmentList: [],
+            deptId: [],
+            buOption: [],
+            contractAmountOld: 0,
+            contractAmountReasonShow: false,
+            centerNameDegree: '',
+
+            batchInchargerDialog: false,
+            paramInchargerId: '',
+
+            inchagerId: '',
+
+            keyNodesIsShow: false,
+            keyNodesList: [],
+            projectKeyNodesData: [],
+            addBasekeyNodesialog: false,
+            addFormkeyNodes: {
+                name: ''
+            },
+            participationId: '',
+
+            importProjectBeforeDialog: false,
+            paramData1: false,
+            chosenListBackup: [], // 备份
+            searchPersonnelFlg: false,
+            searchPersonnelFlgnum: 1,
+
+            createDate: [], // 项目筛选时间段
+
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
             exportDisabled: false,
             exportNotification: null,
             dataList: [],
@@ -934,9 +1082,15 @@ export default {
             this.$refs.productTbl.doLayout();
         })
     },
+<<<<<<< HEAD
 
     methods: {
         uploadFile(params) {
+=======
+    methods: {
+        uploadFile(params) {
+
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
             let str = params.file.name.split(".");
             let format1 = str[str.length - 1];
             if (format1 != "xls" && format1 != "xlsx") {
@@ -1044,7 +1198,11 @@ export default {
 
         getCategoryList() {
             this.isganttshow = true
+<<<<<<< HEAD
            
+=======
+            console.log("======")
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
             console.log(this.categoryList)
             this.http.post("/prod-category/getList", null,
                 res => {
@@ -1138,6 +1296,7 @@ export default {
 
         },
         submitSequence(addSequence) {
+<<<<<<< HEAD
             let flag=true
             
 
@@ -1183,6 +1342,34 @@ export default {
                             } else {
                                 this.addFormVisible = false;
                             }
+=======
+            this.addLoading = true;
+            let procedureString = JSON.stringify(this.procedureLit);
+            this.http.post('/prod-procedure/changeProdProcedure', {
+                productId: this.productId,
+                version: this.procedureVersion,
+                prodProcedures: procedureString,
+                productName: this.productName
+            },
+                res => {
+                    this.addLoading = false;
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: (this.addForm.id != null ? this.$t('xiu-gai') : this.$t('create')) + this.$t('other.successful'),
+                            type: "success"
+                        });
+                        if (addSequence) {
+                            //进入物料录入
+
+                            this.http.post('/prod-material/getProdMaterialList', { productId: this.productId },
+                                res => {
+                                    this.prodMaterialList = res.data.prodMaterialList;
+                                    this.prodMaterialVersion = res.data.version;
+                                })
+                            this.prodEditActive = 2;
+
+
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
                         } else {
                             this.$message({
                                 message: res.msg,
@@ -1202,10 +1389,14 @@ export default {
                     message: "版本号或工序中部分数据为空",
                     type: "error"
                 });
+<<<<<<< HEAD
             }
 
            
 
+=======
+
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
         },
 
         //删除工序
@@ -1233,7 +1424,10 @@ export default {
                 name: '',
                 unitPrice: '',
                 workingTime: '',
+<<<<<<< HEAD
                 checkType: 0
+=======
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
 
             }]
         },
@@ -3010,7 +3204,11 @@ export default {
         //复制产品
         copyProduct(item) {
             this.copyVisible = true
+<<<<<<< HEAD
             this.pdName = item.name
+=======
+            this.pdName = ''
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
             this.productId = item.id
 
         },
@@ -3193,11 +3391,15 @@ export default {
         },
         submitInsert(addSequence) {
             this.$refs.form1.validate(valid => {
+<<<<<<< HEAD
                 console.log(valid)
                 if (valid) {
 
                     if(Number.isInteger(this.addForm.orderNumber)&& Number.isInteger(this.addForm.columnNumber) && Number.isInteger(this.addForm.vehicleNumber)){    
                     //console.log("valid",valid)
+=======
+                if (valid) {
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
                     this.addLoading = true;
                     this.addForm.categoryId = this.cateId;
                     this.http.post('/product/saveProductInfo', this.addForm,
@@ -3238,6 +3440,7 @@ export default {
                                 type: "error"
                             });
                         });;
+<<<<<<< HEAD
                     } else {
                          this.$message({
                             message: "数量要为整数",
@@ -3245,6 +3448,8 @@ export default {
                         });
                     }
 
+=======
+>>>>>>> fc473965b2e11496bab2d6f4b9626eabdc7ea16b
                 }
             });
         },

+ 31 - 436
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/workReport/daily.vue

@@ -126,16 +126,11 @@
                                 </span>
                                 <span style="float:right;">
                                     <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,0)">{{$t('textLink.fillInTheWork')}}</el-link>
-                                    <el-link v-if="reportTimeType.type != 0" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">{{$t('textLink.fillInAWeek')}}</el-link>
                                     <el-link type="primary" v-if="permissions.reportsFillOut" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,2)">{{$t('textLink.helpToFillIn')}}</el-link>
-                                    <el-link type="primary" v-if="permissions.reportBatch" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">{{$t('textLink.batchFillIn')}}</el-link>
-                                    <el-link type="primary" v-if="permissions.importReport || user.manageDeptId != 0" style="margin-right:10px;" :underline="false" @click="imports()">{{$t('textLink.workHoursImport')}}</el-link>
+                                    <el-link type="primary" v-if="permissions.reportSettings" style="margin-right:10px;" :underline="false" @click="fillInReport(-1,2)">补报设置</el-link>
                                     <el-link type="primary" style="margin-right:10px;" :underline="false" @click="showExportDialog" v-if="permissions.reportExport">{{$t('textLink.exportWork')}}</el-link>
                                     <!--部门负责人给个导出工时的功能 -->
                                     <el-link type="primary" v-if="user.manageDeptId != 0" style="margin-right:10px;" :underline="false" @click="showExportTimeDialog">{{$t('textLink.exportingTimeStatistics')}}</el-link>
-                                    <el-link type="primary" v-if="user.timeType.pushReportData == 1 && permissions.reportPush" :underline="false" @click="pushWorkTime">推送工时</el-link>
-                                    <!-- <el-button v-if="user.timeType.pushReportData == 1 && permissions.reportPush" style="margin-left:10px;" icon="iconfont firerock-icontuisong" size="mini" @click="pushWorkTime"></el-button> -->
-
                                 </span>
                             </div>
                             <div :style="'height:'+(tableHeight-50)+'px;overflow:scroll;padding-top:10px;'">
@@ -2132,8 +2127,8 @@
             this.exportParam.dateRange = [startStr,t];
             this.getAllDate(1);
             // this.getReportList();
-            this.getProjectList();
-            this.getFillProjectList();
+            
+            // this.getFillProjectList();
             // this.getTimeType();
             this.getDepartment();
             this.scrollFunction()
@@ -4315,7 +4310,6 @@
                                 this.leaveAllNum += 1
                             } 
                         }
-                        this.stateChange()
                     } else {
                         this.$message({
                             message: res.msg,
@@ -4737,62 +4731,34 @@
             },
 
             //获取项目列表
-            getProjectList() {
-                this.listLoading = true;
-                this.http.post( this.port.project.list, {},
-                res => {
-                    this.listLoading = false;
-                    if (res.code == "ok") {
-                        for(var i in res.data) {
-                            if(res.data[i].projectCode == null || res.data[i].projectCode == 'null') {
-                                res.data[i].projectCode = ''
-                            }
-                        }
-                        this.projectList = res.data;
-                        
-                        // console.log("项目列表",this.projectList);
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.listLoading = false;
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
+            
             // 获取填报日报的项目下拉列表
-            getFillProjectList() {
-                this.http.post( this.port.project.list, {
-                    forReport: 1
-                },res => {
-                    if (res.code == "ok") {
-                        for(var i in res.data) {
-                            if(res.data[i].projectCode == null || res.data[i].projectCode == 'null') {
-                                res.data[i].projectCode = ''
-                            }
-                        }
-                        this.fillProjectList = res.data;
-                        this.getRecentlyProject() 
-                    } else {
-                        this.$message({
-                            message: res.msg,
-                            type: "error"
-                        });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
-                    });
-                });
-            },
+            // getFillProjectList() {
+            //     this.http.post( this.port.project.list, {
+            //         forReport: 1
+            //     },res => {
+            //         if (res.code == "ok") {
+            //             for(var i in res.data) {
+            //                 if(res.data[i].projectCode == null || res.data[i].projectCode == 'null') {
+            //                     res.data[i].projectCode = ''
+            //                 }
+            //             }
+            //             this.fillProjectList = res.data;
+            //             this.getRecentlyProject() 
+            //         } else {
+            //             this.$message({
+            //                 message: res.msg,
+            //                 type: "error"
+            //             });
+            //         }
+            //     },
+            //     error => {
+            //         this.$message({
+            //             message: error,
+            //             type: "error"
+            //         });
+            //     });
+            // },
             
             getAIReport(createDate) {
                 this.http.post('/report/getAIReport', {},
@@ -5113,209 +5079,6 @@
                 this.dialogVisible = true;
                 
             },
-            // 按周填报里内容的填写
-            tianxies(item, i, names, row) {
-                if (item.state == 0) {
-                    this.$message({
-                        message: '待审核状态不可修改,请返回到查看日报中先撤回',
-                        type: "error"
-                    });
-                    return;
-                }
-                if (item.state == 1) {
-                    this.$message({
-                        message: '已通过状态不可修改',
-                        type: "error"
-                    });
-                    return;
-                }
-                
-                if(this.user.timeType.notAllowedNoAttendance == 1){
-                    if(this.zhoData[i].corpTime){
-                        if(this.zhoData[i].corpTime.workHours == 0){
-                            this.$message({
-                                message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
-                                type: 'error'
-                            })
-                            return
-                        }
-                    }else{
-                        this.$message({
-                            message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
-                            type: 'error'
-                        })
-                        return
-                    }
-                }
-                var idd = ''
-                var obj = {}
-                for(var l in this.projectList) {
-                    if(this.projectList[l].projectName == names) idd = this.projectList[l].id
-                }
-                obj.projectId = idd
-                this.selectProject(obj, 0)
-                // console.log(this.workForm.domains[0], '打印出来的')
-                this.tianxieDialogVisible = true
-                this.scopess = item
-                var sss = {}
-                if (item.id != null) {
-                    sss.id = item.id;
-                    sss.state = item.state;
-                } else {
-                    sss.id = -1;
-                    sss.state = 3;
-                }
-                sss.projectId = idd;
-                sss.con = item.con
-                sss.progress = item.progress
-                sss.time = item.time
-                if (sss.time == '' && this.reportTimeType.type == 2) {
-                    //取已填时间范围中最大的一个作为开始时间
-                    var startTime = '09:00';
-                    var fillStartTime = '00:00';
-                    for (var t in this.selProjectList) {
-                        var fillItem = this.zhoData[i][this.selProjectList[t].projectName];
-                        if (fillItem.time) {
-                            if (fillItem.time[1] > fillStartTime) {
-                                fillStartTime = fillItem.time[1];
-                            }
-                        }
-                    }
-                    if (fillStartTime == '00:00') {
-                        fillStartTime = '09:00';
-                    }
-                    var fillEndMax = '18:00';
-                    if (fillStartTime >= '18:00') {
-                        fillEndMax = '23:59';
-                    }
-                    sss.time = [fillStartTime, fillEndMax];
-                }
-                sss.groupId = item.groupId
-                sss.stage = item.stage;
-                sss.workingTime = item.workingTime
-                sss.projectAuditorId = item.projectAuditorId;
-                if (this.timeBasecostList && this.timeBasecostList.length > 0) {
-                    //默认选中第一个
-                    sss.basecostId = this.timeBasecostList[0].id;
-                }
-                var that = this
-                setTimeout(() =>{
-                    var isFirstEdit = false;
-                    if(Object.keys(item).length < 5) {
-                        //首次点开当前的这个cell,初始化数据
-                        isFirstEdit = true;
-                        sss.subProjectId = that.workForm.domains[0].subProjectId
-                        sss.stage = that.workForm.domains[0].stage
-                        sss.subProjectList = that.workForm.domains[0].subProjectList
-                        sss.stages = that.workForm.domains[0].stages
-                        sss.taskGroups = that.workForm.domains[0].taskGroups;
-                        sss.auditUserList = obj.auditUserList;
-                    } else {
-                        sss.subProjectId = item.subProjectId
-                        sss.stage = item.stage
-                        sss.subProjectList = item.subProjectList
-                        sss.stages = item.stages
-                        sss.taskGroups = item.taskGroups;
-                        sss.auditUserList = obj.auditUserList;
-                        sss.degreeId = item.degreeId;
-                        sss.customData = item.customData;
-                    }
-                    if (sss.auditUserList != null && sss.auditUserList.length==1) {
-                        //只有一个审核人,自动设置上去
-                        sss.projectAuditorId = sss.auditUserList[0].auditorId;
-                    }
-                    sss.wuduList = row[0].wuduList
-                    // console.log(sss, '数据')
-                    that.zhoBaoIdx = i
-                    that.zhoBaoName = names
-                    that.zhoBao = sss
-                    that.zhis = row
-                    if (sss.groupId) {
-                        //最后一个参数表示是否保留stage的值,不要重置为空
-                        this.getGroupStages(that.zhoBao, 0, !isFirstEdit)
-                    }
-                    that.$forceUpdate();
-                },600);
-            },
-            // 按周填报里内容的填写点击确定
-            setWeekProItemData() {
-                //检查子项目是否必填
-                if (this.user.timeType.subProMustFill == 1 && this.zhoBao.subProjectList && this.zhoBao.subProjectList.length > 0 && !this.zhoBao.subProjectId) {
-                    this.$message({
-                        message: '子项目必填,请检查',
-                        type: "error"
-                    });
-                    return;
-                }
-                if (!this.zhoBao.projectAuditorId &&(this.user.timeType.reportAuditType == 0 || this.user.timeType.reportAuditType == 4)) {
-                    this.$message({
-                        message: this.$t('message.Pleaseselectareviewer'),
-                        type: "error"
-                    });
-                    return
-                }
-                if(this.user.timeType.reportAuditType == 3){
-                    let auditTips = ''
-                    if(!this.zhoBao.auditorFirst){ auditTips += this.$t('di-yi') }
-                    // if(!this.zhoBao.auditorSec && this.user.timeType.auditLevel > 1){ auditTips += '第二、' }
-                    // if(!this.zhoBao.auditorThird && this.user.timeType.auditLevel > 2){ auditTips += '第三、' }
-                    if(auditTips){
-                        auditTips = auditTips.substring(0,auditTips.length - 1)
-                        this.$message({
-                            message: this.$t('defaultText.pleaseChoose') + auditTips + this.$t('other.reviewer'),
-                            type: 'error'
-                        })
-                        return
-                    }
-                }
-                let errtips = ''
-                if(this.user.timeType.customDegreeStatus == 1 && this.zhoBao.wuduList.length != 0 && !this.zhoBao.degreeId) {
-                    errtips += this.user.timeType.customDegreeName + '、'
-                }
-                if(this.user.timeType.customDataStatus == 1 && !this.zhoBao.customData){
-                    errtips += this.user.timeType.customDataName + '、'
-                }
-                if(this.user.timeType.customTextStatus == 1 && !this.zhoBao.customText){
-                    errtips += this.user.timeType.customTextName + '、'
-                }
-                if(this.user.timeType.workContentState == 1 && !this.zhoBao.con){
-                    errtips +=  this.user.companyId==781?this.$t('other.specificcontentandresults')+'、': this.$t('other.workMatters') +'、'
-                }
-                if(errtips){
-                    errtips = errtips.substring(0,errtips.length - 1)
-                    this.$message({
-                        message: this.$t('other.pleaseYes') + errtips + this.$t('other.tofillin'),
-                        type: 'error'
-                    })
-                    return
-                }
-
-                this.tianxieDialogVisible = false
-                var zhong = this.zhoData
-                zhong[this.zhoBaoIdx][this.zhoBaoName] = this.zhoBao
-                this.zhoData = zhong
-                if(this.reportTimeType.type == 1) this.zhoXuan(this.zhoBao, this.zhoBaoIdx)
-                if(this.reportTimeType.type == 2) this.zhoTimes(this.zhoBao, this.zhoBaoIdx)
-                if(this.reportTimeType.type == 3) this.addBli(this.zhoBao, this.zhoBaoIdx)
-            },
-            // 获取本周
-            getCurrentWeek() {
-                //今天
-                this.targetWeekDate = new Date();
-                this.initWeekFormData();
-                // this.jiazai()
-            },
-            // 获取上周
-            handleGetPrevWeek() {
-                this.targetWeekDate = new Date(this.targetWeekDate.getTime() - 7*24*3600*1000);
-                this.initWeekFormData();
-                // this.jiazai()
-            },
-            // 获取下周
-            handleGetNextvWeek() {
-                this.targetWeekDate = new Date(this.targetWeekDate.getTime() + 7*24*3600*1000);
-                this.initWeekFormData()
-            },
             
             // 加载动画 
             jiazai() {
@@ -5333,117 +5096,6 @@
                 const d = (dt.getDate() + '').padStart(2, '0')
                 return `${y}-${m}-${d}`
             },
-            // 按周填报
-            fillInReportss() {
-                window.addEventListener('scroll', this.handleScroll, true)
-                // this.jiazai()
-                this.fillWeekDialogVisi = true
-                this.getCurrentWeek();
-                if (!this.timeBasecostList || this.timeBasecostList.length == 0) {
-                    //重新获取工时预警类型的预算项
-                    this.http.post('/project-basecost-setting/getReportBasecostList', {
-                        companyId: this.user.companyId
-                    },
-                    res => {
-                        if (res.code == "ok") {
-                            this.timeBasecostList = res.data;
-                        }
-                    });
-                }
-            },
-            // 按周填报的项目筛选
-            selListFun(){
-                this.selProjectList = []
-                if(this.selCon.length){
-                    for (let i = 0; i < this.selCon.length; i++) {
-                        this.selProjectList.push(this.projectList.find(item => item.id == this.selCon[i]))
-                    }
-                    this.selConShow = false ;
-                    for (let i in this.zhoData) {
-                        var obj = this.zhoData[i];
-                        for(var j in this.selProjectList) {
-                            var xinzhi = this.selProjectList[j].projectName 
-                            obj[xinzhi] = {}
-                            obj[xinzhi].time = ''
-                            obj[xinzhi].con = ''
-                            obj[xinzhi].progress = 0
-                            obj[xinzhi].workingTime = 0
-                        }
-                    }
-                    this.initWeekFormData();
-                }else{
-                    this.$message({
-                        message:this.$t('defaultText.pleaseSelectTheItemYouWantToFillIn'),
-                        type:'error'
-                    })
-                }
-            },
-            setWeekCardTimeData(list) {
-                for(let i in list){
-                    let datei = '';
-                    if (this.user.timeType.showDdCardtime == 1) {
-                        datei = list[i].workDate;
-                    } else if (this.user.timeType.showCorpwxCardtime == 1) {
-                        datei = list[i].createDate;
-                    } else if (this.user.timeType.syncFanwei == 1) {
-                        datei = list[i].workDate;
-                    }
-                    
-                    for(let m in this.zhoData) {
-                        if(datei == this.zhoData[m].zhoDataTime){
-                            let item = {
-                                startTime: list[i].startTime,
-                                endTime: list[i].endTime,
-                                workHours: list[i].workHours
-                            }
-                            this.$set(this.zhoData[m],'corpTime',item)
-                        }
-                    }
-                }
-            },
-            getWeeklyCardTime(){ //按周填报获取考勤信息
-                let dateStr = []
-                        for(let i in this.zhoData){
-                            dateStr.push(this.zhoData[i].zhoDataTime)
-                        }
-                        this.http.post('/report/getWeeklyCardTime',{
-                            dateStr: JSON.stringify(dateStr)
-                        },res => {
-                            if(res.code == 'ok'){
-                                for(let i in res.data){
-                                    let datei = '';
-                                    if (this.user.timeType.showDdCardtime == 1) {
-                                        datei = res.data[i].workDate.split('-');
-                                    } else if (this.user.timeType.showCorpwxCardtime == 1) {
-                                        datei = res.data[i].createDate.split('-');
-                                    }
-                                    
-                                    for(let m in this.zhoData){
-                                        let datem = new Date(this.zhoData[m].zhoDataTime)
-                                        
-                                        if(datei[0] == datem.getFullYear() && datei[1] == (datem.getMonth() + 1) && datei[2] == datem.getDate()){
-                                            let item = {
-                                                startTime: res.data[i].startTime,
-                                                endTime: res.data[i].endTime,
-                                                workHours: res.data[i].workHours
-                                            }
-                                            this.$set(this.zhoData[m],'corpTime',item)
-                                        }
-                                    }
-                                }
-                            }else{
-                                this.$message({
-                                    message: res.msg,
-                                    type: 'error'
-                                })
-                            }
-                        },err => {
-                            this.$message({
-                                message: err,
-                                type: 'error'
-                            })
-                        })
-            },
             
             selListqx(){
                 this.fillWeekDialogVisi = false
@@ -5453,64 +5105,7 @@
             handleScroll() {
                 this.changdu = this.projectList.length + 1
             },
-            // 自动选择时间点的事件
-            // async zhoTimes(item, i) {
-            //     var iss = i
-            //     if(item.time == null) {
-            //         return
-            //     } else {
-            //         const zhi = this.zhoData[iss];
-            //         let he = 0;
-            //         const timeArr = Object.values(zhi)
-            //         .filter(item => item.time && item.time.length > 0 && item !== zhi.zhoDataTime && item !== zhi.he)
-            //         .map(item => ({ startTime: item.time[0], endTime: item.time[1] }));
-            //         const data = await this.getWeekHoursByTimeRange(timeArr);
-            //         console.log(data, 'data');
-            //         zhi.he = `${he}h`;
-
-            //     }
-            // },
-            async zhoTimes(item, index) {
-                const zho = this.zhoData[index];
-                if (!item.time) {
-                    return;
-                }
-                const timeArr = Object.values(zho)
-                .filter(({ time }) => time && time.length > 0 && time !== zho.zhoDataTime && time !== zho.he)
-                .map(({ time }) => ({ startTime: time[0], endTime: time[1] }));
-                const totalHours = await Promise.all([{}].map(() => this.getWeekHoursByTimeRange(timeArr)));
-                zho.he = `${totalHours[0]}h`;
-            },
-            // 判断两个时间段是否重叠
-            timeOverlap(idx, dateAr) {
-                let zhi = 0
-                for (let k in dateAr) {
-                    if (idx !== k) {
-                        if (((dateAr[k].s <= dateAr[idx].s && dateAr[k].e >= dateAr[idx].s) || (dateAr[k].s <= dateAr[idx].s && dateAr[k].e <= dateAr[idx].e))) {
-                            // 选择的时间包含设置的休息时间段 (选择的开始时间和结束时间大于设置的休息时间段)
-                            if(dateAr[idx].s > dateAr[k].s && dateAr[idx].e < dateAr[k].e) {
-                                zhi += +this.getHour(dateAr[idx].s, dateAr[idx].e)
-                            }
-                            // 选择的时间包含在设置的休息时间 (选择的开始时间和结束时间都处于在设置的休息时间段内)
-                            if(dateAr[idx].s > dateAr[k].s && dateAr[idx].e > dateAr[k].e) {
-                                zhi += +this.getHour(dateAr[idx].s, dateAr[k].e)
-                            } else if(dateAr[idx].s < dateAr[k].s && dateAr[idx].e > dateAr[k].e) {
-                                zhi += +this.getHour(dateAr[k].e, dateAr[idx].s)
-                            } else {
-                                // 选择的结束时间处于设置的休息时间段内 (选择的结束时间处于的休息时间段)
-                                if(dateAr[k].e < dateAr[idx].e && dateAr[k].e > dateAr[idx].s) {
-                                    zhi += +this.getHour(dateAr[k].e, dateAr[idx].e)
-                                }
-                                // 选择的开始时间处于设置的休息时间段内 (选择的开始时间处于的休息时间段)
-                                if(dateAr[idx].s > dateAr[k].s && dateAr[idx].s < dateAr[k].e) {
-                                    zhi += +this.getHour(dateAr[k].e, dateAr[idx].s)
-                                }
-                            }
-                        }
-                    }
-                }
-                return zhi
-            },
+            
             // 计算时间
             getHourMinutes(str, end) {
                 var he = 0