Jelajahi Sumber

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

seyason 3 tahun lalu
induk
melakukan
65381375a3
20 mengubah file dengan 933 tambahan dan 50 penghapusan
  1. 102 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/SubUserCustomController.java
  2. 3 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserController.java
  3. 96 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCustomController.java
  4. 42 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/SubUserCustom.java
  5. 30 18
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/User.java
  6. 48 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/UserCustom.java
  7. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/SubUserCustomMapper.java
  8. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/UserCustomMapper.java
  9. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/SubUserCustomService.java
  10. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/UserCustomService.java
  11. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/UserService.java
  12. 2 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  13. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/SubUserCustomServiceImpl.java
  14. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserCustomServiceImpl.java
  15. 44 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java
  16. 17 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/SubUserCustomMapper.xml
  17. 18 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserCustomMapper.xml
  18. 11 3
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserMapper.xml
  19. 3 3
      fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue
  20. 412 17
      fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

+ 102 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/SubUserCustomController.java

@@ -0,0 +1,102 @@
+package com.management.platform.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.management.platform.entity.SubUserCustom;
+import com.management.platform.entity.User;
+import com.management.platform.entity.UserCustom;
+import com.management.platform.mapper.SubUserCustomMapper;
+import com.management.platform.mapper.UserCustomMapper;
+import com.management.platform.mapper.UserMapper;
+import com.management.platform.service.SubUserCustomService;
+import com.management.platform.service.UserCustomService;
+import com.management.platform.util.HttpRespMsg;
+import org.springframework.beans.factory.annotation.Autowired;
+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>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-06-13
+ */
+@RestController
+@RequestMapping("/sub-user-custom")
+public class SubUserCustomController {
+    @Autowired
+    private SubUserCustomService subUserCustomService;
+    @Resource
+    private UserCustomService userCustomService;
+    @Resource
+    private SubUserCustomMapper subUserCustomMapper;
+    @Resource
+    private UserCustomMapper userCustomMapper;
+    @Resource
+    private UserMapper userMapper;
+    @RequestMapping("/addOrMod")
+    public HttpRespMsg addOrMod(SubUserCustom subUserCustom){
+        HttpRespMsg msg=new HttpRespMsg();
+        Integer cut = subUserCustomMapper.selectCount(new QueryWrapper<SubUserCustom>().eq("name", subUserCustom.getName()).eq("user_custom_id",subUserCustom.getUserCustomId()));
+        if(cut>0){
+            msg.setError("名称["+subUserCustom.getName()+"]已存在");
+            return msg;
+        }
+        subUserCustomService.saveOrUpdate(subUserCustom);
+        return msg;
+    }
+    @RequestMapping("/delete")
+    public HttpRespMsg delete(Integer id, HttpServletRequest request){
+        HttpRespMsg httpRespMsg=new HttpRespMsg();
+        SubUserCustom subUserCustom = subUserCustomService.getById(id);
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        List<UserCustom> userCustomList = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", companyId));
+        Integer num=null;
+        for(int i=0;i<userCustomList.size();i++){
+            if(subUserCustom.getUserCustomId().equals(userCustomList.get(i).getId())){
+                num=i;
+            }
+        }
+        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
+        for(User user:userList) {
+            Object result=null;
+            switch (num){
+                case 0:
+                    result=user.getPlate1();
+                    break;
+                case 1:
+                    result=user.getPlate2();
+                    break;
+                case 2:
+                    result=user.getPlate3();
+                    break;
+                case 3:
+                    result=user.getPlate4();
+                    break;
+                case 4:
+                    result=user.getPlate5();
+                    break;
+            }
+            if(result!=null && !result.equals("") &&result.equals(subUserCustom.getName())){
+                httpRespMsg.setError("当前配置["+subUserCustom.getName()+"]已使用");
+                return httpRespMsg;
+            }
+        }
+        subUserCustomService.removeById(id);
+        return new HttpRespMsg();
+    }
+    @RequestMapping("/list")
+    public HttpRespMsg list(Integer userCustomId){
+        HttpRespMsg msg=new HttpRespMsg();
+        List<SubUserCustom> subUserCustomList = subUserCustomMapper.selectList(new QueryWrapper<SubUserCustom>().eq("user_custom_id", userCustomId));
+        msg.data=subUserCustomList;
+        return msg;
+    }
+}
+

+ 3 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserController.java

@@ -129,9 +129,10 @@ public class UserController {
     public HttpRespMsg insertUser(String id, @RequestParam String name, String phone,
                                   @RequestParam Integer roleId, Double monthCost, Double cost,
                                   Integer departmentId, Integer salaryType, String costApplyDate,
-                                    String position, String certJson,String inductionDate) {
+                                    String position, String certJson,String inductionDate,String superiorId,
+                                    String plate1,String plate2,String plate3,String plate4,String plate5) {
         return userService.insertUser(id, name, phone, roleId, monthCost, cost, departmentId, salaryType, costApplyDate,
-                    position, certJson, request,inductionDate);
+                    position, certJson, request,inductionDate,superiorId,plate1, plate2, plate3,plate4,plate5);
     }
 
     /**

+ 96 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCustomController.java

@@ -0,0 +1,96 @@
+package com.management.platform.controller;
+
+
+import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.management.platform.entity.User;
+import com.management.platform.entity.UserCustom;
+import com.management.platform.mapper.UserCustomMapper;
+import com.management.platform.mapper.UserMapper;
+import com.management.platform.service.UserCustomService;
+import com.management.platform.util.HttpRespMsg;
+import org.springframework.beans.factory.annotation.Autowired;
+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>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-06-13
+ */
+@RestController
+@RequestMapping("/user-custom")
+public class UserCustomController {
+    @Autowired
+    private UserCustomService userCustomService;
+    @Resource
+    private UserCustomMapper userCustomMapper;
+    @Resource
+    private UserMapper userMapper;
+    @RequestMapping("/addOrMod")
+    public HttpRespMsg addOrMod(String json, HttpServletRequest request){
+        List<UserCustom> userCustomList = JSONArray.parseArray(json, UserCustom.class);
+        HttpRespMsg msg=new HttpRespMsg();
+        User user = userMapper.selectById(request.getHeader("token"));
+        for(UserCustom userCustom:userCustomList){
+            userCustom.setCompanyId(user.getCompanyId());
+        }
+        userCustomService.saveOrUpdateBatch(userCustomList);
+        return msg;
+    }
+    @RequestMapping("/list")
+    public HttpRespMsg getUserCustomList(HttpServletRequest request){
+        HttpRespMsg httpRespMsg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        List<UserCustom> userCustomList = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", companyId));
+        httpRespMsg.data=userCustomList;
+        return httpRespMsg;
+    }
+    @RequestMapping("/delete")
+    public HttpRespMsg delete(Integer id,HttpServletRequest request){
+        HttpRespMsg httpRespMsg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        List<UserCustom> userCustomList = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", companyId));
+        Integer num=null;
+        for(int i=0;i<userCustomList.size();i++){
+            if(id.equals(userCustomList.get(i).getId())){
+                num=i;
+            }
+        }
+        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
+        for(User user:userList) {
+            Object result=null;
+            switch (num){
+                case 0:
+                    result=user.getPlate1();
+                    break;
+                case 1:
+                    result=user.getPlate2();
+                    break;
+                case 2:
+                    result=user.getPlate3();
+                    break;
+                case 3:
+                    result=user.getPlate4();
+                    break;
+                case 4:
+                    result=user.getPlate5();
+                    break;
+            }
+            if(result!=null && !result.equals("")){
+                httpRespMsg.setError("当前配置已被使用");
+                return httpRespMsg;
+            }
+        }
+        userCustomService.removeById(id);
+        return new HttpRespMsg();
+    }
+}
+

+ 42 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/SubUserCustom.java

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

+ 30 - 18
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/User.java

@@ -3,11 +3,9 @@ package com.management.platform.entity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -21,7 +19,7 @@ import java.util.List;
  * </p>
  *
  * @author Seyason
- * @since 2022-04-15
+ * @since 2022-06-14
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -29,6 +27,7 @@ import java.util.List;
 public class User extends Model<User> {
 
     private static final long serialVersionUID=1L;
+
     /**
      * 主键 雪花算法生成
      */
@@ -167,28 +166,18 @@ public class User extends Model<User> {
     @TableField("corpwx_userid")
     private String corpwxUserid;
 
-
-    @TableField(exist = false)
-    private String departmentName;
-    /**
-     * 离职日期
-     */
-    @TableField("inactive_date")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    private LocalDate inactiveDate;
-
     /**
      * 入职日期
      */
     @TableField("induction_date")
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private LocalDate inductionDate;
 
+    /**
+     * 离职日期
+     */
+    @TableField("inactive_date")
+    private LocalDate inactiveDate;
 
-    @TableField(exist = false)
-    private double totalHours;
     /**
      * 岗位职级
      */
@@ -201,6 +190,29 @@ public class User extends Model<User> {
     @TableField("report_status")
     private Integer reportStatus;
 
+    @TableField("superior_id")
+    private String superiorId;
+
+    @TableField("plate1")
+    private String plate1;
+
+    @TableField("plate2")
+    private String plate2;
+
+    @TableField("plate3")
+    private String plate3;
+
+    @TableField("plate4")
+    private String plate4;
+
+    @TableField("plate5")
+    private String plate5;
+
+    @TableField(exist = false)
+    private String departmentName;
+
+    @TableField(exist = false)
+    private double totalHours;
 
     @TableField(exist = false)
     private List<UserCert> certList;

+ 48 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/UserCustom.java

@@ -0,0 +1,48 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-06-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class UserCustom extends Model<UserCustom> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("company_id")
+    private Integer companyId;
+
+    @TableField("name")
+    private String name;
+
+    /**
+     * 0-下拉框 1-输入框
+     */
+    @TableField("type")
+    private Integer type;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

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

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

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

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

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

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

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

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

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

@@ -33,7 +33,7 @@ public interface UserService extends IService<User> {
 
     HttpRespMsg insertUser(String id, String name, String phone, Integer roleId, Double monthCost, Double cost, Integer departmentId,
                            Integer salaryType, String costApplyDate, String position, String certJson,
-                           HttpServletRequest request,String inductionDate);
+                           HttpServletRequest request,String inductionDate, String superiorId,String plate1,String plate2,String plate3,String plate4,String plate5);
 
     HttpRespMsg importUser(MultipartFile multipartFile, HttpServletRequest request);
 

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

@@ -1157,8 +1157,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().in("id", ids));
                 List<Integer> collect = reportList.stream().map(rl -> rl.getProjectId()).distinct().collect(Collectors.toList());
                 List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().in("id", collect));
-                List<String> stringList = projectList.stream().map(pl -> pl.getProjectName()).distinct().collect(Collectors.toList());
-                String s = org.apache.commons.lang3.StringUtils.join(stringList, ",");
+                String pNames = projectList.stream().map(Project::getProjectName).collect(Collectors.joining(", ", "[", "]"));
                 //对导入审核,添加记录
                 int channel = oldState == -1?0:1; //0-导入审核, 项目报告审核
                 ReportAuditLog log = new ReportAuditLog();
@@ -1167,7 +1166,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 log.setResult("通过");
                 log.setUserId(user.getId());
                 log.setUserName(user.getName());
-                log.setProjectName(s);
+                log.setProjectName(pNames);
                 reportAuditLogMapper.insert(log);
                 //员工的日期
                 ReportAlogMembdate membdate = new ReportAlogMembdate();

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

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

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

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

+ 44 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -129,6 +129,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     private CompanyDingdingService companyDingdingService;
     @Resource
     private WxCorpInfoService wxCorpInfoService;
+    @Resource
+    private UserCustomMapper userCustomMapper;
     //登录网页端
     @Override
     public HttpRespMsg loginAdmin(String username, String password) {
@@ -423,6 +425,32 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                     li.put("cost", 0.0);
                 });
             }
+            List<UserCustom> userCustomList = userCustomMapper.selectList(new QueryWrapper<UserCustom>().eq("company_id", companyId));
+            if(!StringUtils.isEmpty(list)){
+                for(Map<String,Object> u:list) {
+                    HashMap map=new HashMap();
+                    for (int i = 0; i < userCustomList.size(); i++) {
+                        switch (i) {
+                            case 0:
+                                map.put(userCustomList.get(i).getName(), u.get("plate1"));
+                                break;
+                            case 1:
+                                map.put(userCustomList.get(i).getName(), u.get("plate2"));
+                                break;
+                            case 2:
+                                map.put(userCustomList.get(i).getName(), u.get("plate3"));
+                                break;
+                            case 3:
+                                map.put(userCustomList.get(i).getName(), u.get("plate4"));
+                                break;
+                            case 4:
+                                map.put(userCustomList.get(i).getName(), u.get("plate5"));
+                                break;
+                        }
+                    }
+                    u.put("plateMap",map);
+                }
+            }
             resultMap.put("records", list);
             resultMap.put("total", total);
             httpRespMsg.data = resultMap;
@@ -591,7 +619,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     //新增或修改用户
     @Override
     public HttpRespMsg insertUser(String targetId, String name, String phone, Integer roleId, Double monthCost, Double cost,
-                                  Integer departmentId, Integer salaryType, String costApplyDate, String position, String certJson, HttpServletRequest request,String inductionDate) {
+                                  Integer departmentId, Integer salaryType, String costApplyDate, String position, String certJson, HttpServletRequest request,String inductionDate,
+                                  String superiorId,   String plate1,String plate2,String plate3,String plate4,String plate5) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
         try {
@@ -629,7 +658,13 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                                 .setDepartmentId(departmentId == null ? 0 : departmentId)
                                 .setDepartmentCascade(departmentId == null ?
                                         convertDepartmentIdToCascade(0) :
-                                        convertDepartmentIdToCascade(departmentId));
+                                        convertDepartmentIdToCascade(departmentId))
+                                .setSuperiorId(superiorId)
+                                .setPlate1(plate1)
+                                .setPlate2(plate2)
+                                .setPlate3(plate3)
+                                .setPlate4(plate4)
+                                .setPlate5(plate5);
                         if(inductionDate!=null&&inductionDate!=""){
                             user.setInductionDate(LocalDate.parse(inductionDate,dtf));
                         }
@@ -682,7 +717,13 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                         .setDepartmentId(departmentId == null ? 0 : departmentId)
                         .setDepartmentCascade(departmentId == null ?
                                 convertDepartmentIdToCascade(0) :
-                                convertDepartmentIdToCascade(departmentId)));
+                                convertDepartmentIdToCascade(departmentId))
+                        .setSuperiorId(superiorId)
+                        .setPlate1(plate1)
+                        .setPlate2(plate2)
+                        .setPlate3(plate3)
+                        .setPlate4(plate4)
+                        .setPlate5(plate5));
                 if (salaryChange) {
                     UserSalary userSalary = UserSalary.copyFromUser(oldUser);
                     userSalaryMapper.insert(userSalary);

+ 17 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/SubUserCustomMapper.xml

@@ -0,0 +1,17 @@
+<?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.SubUserCustomMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.SubUserCustom">
+        <id column="id" property="id" />
+        <result column="user_custom_id" property="userCustomId" />
+        <result column="name" property="name" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, user_custom_id, name
+    </sql>
+
+</mapper>

+ 18 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserCustomMapper.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.UserCustomMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.UserCustom">
+        <id column="id" property="id" />
+        <result column="company_id" property="companyId" />
+        <result column="name" property="name" />
+        <result column="type" property="type" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, company_id, name, type
+    </sql>
+
+</mapper>

+ 11 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserMapper.xml

@@ -27,9 +27,16 @@
         <result column="dingding_userid" property="dingdingUserid" />
         <result column="dingding_unionid" property="dingdingUnionid" />
         <result column="corpwx_userid" property="corpwxUserid" />
+        <result column="induction_date" property="inductionDate" />
         <result column="inactive_date" property="inactiveDate" />
         <result column="position" property="position" />
         <result column="report_status" property="reportStatus" />
+        <result column="superior_id" property="superiorId" />
+        <result column="plate1" property="plate1" />
+        <result column="plate2" property="plate2" />
+        <result column="plate3" property="plate3" />
+        <result column="plate4" property="plate4" />
+        <result column="plate5" property="plate5" />
     </resultMap>
     <resultMap id="BaseResultMap2" type="com.management.platform.entity.User">
         <id column="id" property="id" />
@@ -39,13 +46,13 @@
     </resultMap>
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, name, phone, password, portrait_url, create_time, role, company_id, department_id, department_cascade, cost, month_cost, salary_type, manage_dept_id, color, is_active, wx_openid, role_id, role_name, cost_apply_date, dingding_userid, dingding_unionid, corpwx_userid, inactive_date, position,report_status
+        id, name, phone, password, portrait_url, create_time, role, company_id, department_id, department_cascade, cost, month_cost, salary_type, manage_dept_id, color, is_active, wx_openid, role_id, role_name, cost_apply_date, dingding_userid, dingding_unionid, corpwx_userid, induction_date, inactive_date, position, report_status, superior_id, plate1, plate2, plate3, plate4, plate5
     </sql>
     <!--单独分页获取人员-->
     <select id="getUserByDepartment" resultType="java.util.Map">
         SELECT a.id, a.role_id as roleId, a.role_name as roleName, a.name, a.phone, a.portrait_url AS portraitUrl, a.role, a.company_id AS companyId, a.cost,
         a.department_id AS departmentId, b.department_name AS departmentName, a.department_cascade AS departmentCascade,
-        a.month_cost as monthCost, a.salary_type as salaryType, a.is_active as isActive, a.cost_apply_date as costApplyDate
+        a.month_cost as monthCost, a.salary_type as salaryType, a.is_active as isActive, a.cost_apply_date as costApplyDate,a.plate1,a.plate2,a.plate3,a.plate4,a.plate5
         FROM user AS a
         LEFT JOIN department AS b ON a.department_id = b.department_id
         WHERE a.company_id = #{companyId}
@@ -67,7 +74,7 @@
     <select id="getUserByDepartmentList" resultType="java.util.Map">
         SELECT a.id,  a.role_id as roleId, a.role_name as roleName,  a.name, a.phone, a.portrait_url AS portraitUrl, a.role, a.company_id AS companyId, a.cost,
         a.department_id AS departmentId, b.department_name AS departmentName, a.department_cascade AS departmentCascade,
-        a.month_cost as monthCost, a.salary_type as salaryType, a.is_active as isActive, a.cost_apply_date as costApplyDate
+        a.month_cost as monthCost, a.salary_type as salaryType, a.is_active as isActive, a.cost_apply_date as costApplyDate,a.plate1,a.plate2,a.plate3,a.plate4,a.plate5
         FROM user AS a
         LEFT JOIN department AS b ON a.department_id = b.department_id
         WHERE a.company_id = #{companyId} AND a.department_id IN
@@ -130,4 +137,5 @@
         select user.id, name, department.department_name from user left join department on department.department_id = user.department_id
         ${ew.customSqlSegment}
     </select>
+
 </mapper>

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

@@ -33,7 +33,7 @@
                 <el-checkbox v-model="timeType.fillOvertime" label="可填报加班时长" />
                 <template v-if="timeType.fillOvertime">
                 <el-checkbox v-model="timeType.payOvertime" label="加班工时记入成本" />
-                <!-- <el-checkbox v-model="timeType.doubleOvertime" label="加班双倍成本" :disabled="!timeType.payOvertime"/> -->`
+                <!-- <el-checkbox v-model="timeType.doubleOvertime" label="加班双倍成本" :disabled="!timeType.payOvertime"/> -->
                 <el-input v-model="timeType.overtimeRatio" placeholder="" clearable style="width: 100px;margin: 0 10px 0 20px" v-if="timeType.payOvertime" @keyup.native="timeType.overtimeRatio = oninput(timeType.overtimeRatio, 1)"></el-input> <span v-if="timeType.payOvertime">倍工资</span>
                 </template>
             </el-form-item>
@@ -191,7 +191,7 @@
                     </el-form>
                     <div class="underpanel">
                         <div class="whiteList_head">
-                            <span style="float:left;">不提醒人员设置</span>
+                            <span style="float:left;color:#999">不提醒人员设置</span>
                             <el-link type="primary" style="float:left;margin-left:15px" :underline="false" @click="addWhite">添加</el-link>
                         </div>
                         <div class="whiteList_content">
@@ -1037,7 +1037,7 @@
     top: -12px;
 }
 .underpanel .whiteList_head{
-    padding: 5px 0 0 5px;
+    padding: 5px 0 0 0;
     height: 24px;
 }
 .underpanel .whiteList_content{

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

@@ -51,27 +51,23 @@
                     <el-form-item>
                         <div style="color:#999;font-size:13px;">共{{total}}人</div>
                     </el-form-item>
+                    <el-form-item style="float:right;" v-if="permissions.structureExport">
+                        <el-link type="primary" :underline="false" @click="customConfigShow">自定义配置</el-link>
+                    </el-form-item>
                     <el-form-item style="float:right;" v-if="permissions.structureExport">
                         <el-link type="primary" :underline="false" @click="showExportDialog">导出人员</el-link>
                     </el-form-item>
                     <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureAdd">
                         <el-link type="primary" :underline="false" @click="openInsertDialog(null)">添加人员</el-link>
                     </el-form-item>
-                    <!-- 原来的 -->
-                    <!-- <el-form-item style="float:right;" v-if="depData != null && depData.id != -1 && depData.id != 0">
-                        <el-upload ref="upload" action="#" :limit="1" :http-request="importUser" :show-file-list="false">
-                            <el-link type="primary" :underline="false">批量导入</el-link>
-                        </el-upload>
-                    </el-form-item> -->
+                    
                     <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
-                        <el-upload ref="upload" action="#" :limit="1" :http-request="importUser" :show-file-list="false">
-                            <el-link type="primary" :underline="false">批量导入</el-link>
-                        </el-upload>
+                            <el-link type="primary" :underline="false" @click="importUserC">批量导入</el-link>
                     </el-form-item>
 
-                    <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
+                    <!-- <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
                         <el-link type="primary" :underline="false" href="./upload/人员导入模板.xlsx" download="人员导入模板.xlsx">模板下载</el-link>
-                    </el-form-item>
+                    </el-form-item> -->
                     <!-- <el-form-item  v-if="depData != null && depData.id != -1 && depData.id != 0" style="float:right;border: 0.5px solid #20a0ff;height: 27px;margin-top: 6px;">
                     </el-form-item> -->
                     <!-- <el-form-item style="float:right;">
@@ -261,6 +257,14 @@
                     <el-cascader v-model="insertForm.departmentId" placeholder="请选择部门" style="width: 100%"
                     :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false"  clearable></el-cascader>
                 </el-form-item>
+                <el-form-item label="直属上司">
+                    <el-select v-model="insertForm.superiorId" placeholder="请选择角色" style="width: 100%">
+                        <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id">
+                            <span style="float: left">{{item.name}}</span>
+                            <span style="float: right; color: #8492a6; font-size: 13px">{{item.departmentName}}</span>
+                        </el-option>
+                    </el-select>
+                </el-form-item>
                 <el-form-item label="角色" prop="roleId">
                     <el-select v-model="insertForm.roleId" placeholder="请选择角色" style="width: 100%">
                         <el-option v-for="item in acquireRoleList" :label="item.rolename" :value="item.id" :key="item.name">
@@ -269,6 +273,13 @@
                         </el-option>
                     </el-select>
                 </el-form-item>
+                <el-form-item :label="item.name" v-for="item,index in userCustomConfig" :key="item.id">
+                    <el-select v-if="item.type == 0" v-model="insertForm[suoying[index]]" placeholder="请选择" clearable style="width: 100%">
+                        <el-option v-for="option in item.itemList" :label="option.name" :value="option.id" :key="option.id">
+                        </el-option>
+                    </el-select>
+                    <el-input v-else v-model="insertForm[suoying[index]]" placeholder="请输入" clearable></el-input>
+                </el-form-item>
                 <el-form-item label="入职时间" prop="phone">
                     <el-date-picker v-model="insertForm.inductionDate" value-format="yyyy-MM-dd"></el-date-picker>
                 </el-form-item>
@@ -443,6 +454,72 @@
                 <el-button type="primary" @click="addManagementForm('managementForm')">提 交</el-button>
             </span>
         </el-dialog>
+        <!-- 自定义配置项 -->
+        <el-dialog title="自定义配置项管理" show-header="false" v-if="customConfigDialog" :visible.sync="customConfigDialog" :close-on-click-modal="false" customClass="customWidth" width="650px" top="20px">
+            <div style="margin-left:30px;">
+            <p v-for="item,index in customConfigList" :key="index">
+                <el-input size="medium" v-model="item.name" placeholder="请输入自定义配置项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
+                    <el-radio size="medium" :disabled="!item.name" v-model="item.type" :label="0" style="margin-right:10px;margin-left:10px">下拉</el-radio>
+                    <el-radio size="medium" :disabled="!item.name" v-model="item.type" :label="1">输入</el-radio>
+                <span style="display:inline-block;width:100px"><el-button v-if="cusItemTypes[index] == 0" type="primary" size="small" @click="getConfigItemBtn(item)">配置选项</el-button></span>
+                <el-button type="danger" size="small" @click="customConfigDelete(item,index)" style="">删除</el-button>
+            </p>
+            
+            </div>
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="customConfigDialog = false" >关闭</el-button>
+                <el-button type="primary" @click="customConfigListAdd" :disabled="customConfigList.length >= 5">新增</el-button>
+                <el-button type="primary" @click="customConfigListSave" >保存</el-button>
+                
+            </div>
+
+
+            <!-- 为下拉时的选项配置 -->
+            <el-dialog title="配置选项" v-if="configItemDialog" :visible.sync="configItemDialog" :close-on-click-modal="false" customClass="customWidth" width="500px" append-to-body>
+                <el-table :data="configItemList" height="400px" style="width:100%" key="configItemTable">
+                    <el-table-column prop="id" width="60" label="序号">
+                        <template slot-scope="scope" >
+                            {{scope.$index + 1}}
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="name" label="名称" ></el-table-column>
+                    <el-table-column label="操作" width="150">
+                        <template slot-scope="scope" >
+                            <el-button size="small" type="primary" @click="configItemAorM(scope.row)">编辑</el-button>
+                            <el-button size="small" type="danger" @click="configItemDelete(scope.row)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <div slot="footer" class="dialog-footer">
+                    <el-button type="primary" @click="configItemDialog = false" >关闭</el-button>
+                    <el-button type="primary" @click="configItemAorM" >新增配置选项</el-button>
+                </div>
+
+                <el-dialog title="新增/编辑配置选项" v-if="configItemAorMDialog" :visible.sync="configItemAorMDialog" :close-on-click-modal="false" customClass="customWidth" width="500px" append-to-body>
+                    <span>名称</span>
+                    <el-input size="medium" v-model="AorMitem.name" placeholder="请输入自定义配置项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
+
+                    <div slot="footer" class="dialog-footer">
+                        <el-button type="primary" @click="configItemAorMDialog = false" >取消</el-button>
+                        <el-button type="primary" @click="configItemAorMSure" >提交</el-button>
+                    </div>
+                </el-dialog>
+            </el-dialog>
+        </el-dialog>
+
+
+        <!-- 批量导入 -->
+        <el-dialog title="人员批量导入" v-if="importDialog" :visible.sync="importDialog" customClass="customWidth" width="500px">
+            <p>1. 下载
+            <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/人员导入模板.xlsx" download="人员导入模板.xlsx">人员导入模板.xlsx</el-link>
+            </p>
+            <p>2. 填写excel模板,并上传。</p>
+            <p style="display: flex;justify-content: center;padding-bottom:1em;">
+                <el-upload ref="upload"  action="#" :limit="1" :http-request="importUser" :show-file-list="false">
+                <el-button type="primary" :underline="false" :loading="importingData">开始导入</el-button>
+            </el-upload>
+            </p>
+        </el-dialog>
     </section>
 </template>
 
@@ -519,7 +596,8 @@
                     costApplyDate: '2021-04-09',
                     inductionDate: '2021-04-09',
                     position: '',
-                    certJson: []
+                    certJson: [],
+                    plateMap:{}
                 },
                 rules: {
                     name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
@@ -592,7 +670,28 @@
                 },
                 managementTableData: [],
                 certificate: '',
-                addUserId: ''
+                addUserId: '',
+                userCustomConfig: [],
+
+                customConfigDialog: false,
+                importDialog: false,
+                importingData: false,
+                customConfigList: [],
+                cusItemTypes: [],
+                configItemList: [],
+                configItemId: null,
+                configItemDialog: false,
+
+                configItemAorMDialog: false,
+                AorMitem: {
+                    name: null,
+                    userCustomId: null,
+                    id: null
+                },
+                tableLoading: false,
+
+                suoying: ['plate1','plate2','plate3','plate4','plate5'],
+                insertFormPlates: []
             };
         },
         filters: {
@@ -608,6 +707,266 @@
             that = this;
         },
         methods: {
+            test(){
+                this.getCustomConfigList()
+            },
+            // 自定义配置项
+            customConfigShow(){
+                this.getCustomConfigList()
+                this.customConfigDialog = true
+            },
+            getConfigItemBtn(item){
+                this.configItemDialog = true
+                this.AorMitem.userCustomId = item.id
+                this.getConfigItem()
+            },
+            getConfigItem(){ // 获取配置下拉数据
+                this.http.post('/sub-user-custom/list',{
+                    userCustomId: this.AorMitem.userCustomId
+                },res => {
+                    if(res.code == 'ok'){
+                        this.configItemList = res.data
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.tableLoading = false
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
+            getCustomConfigList(){ // 获取自定义配置
+                this.http.post('/user-custom/list',{},
+                res => {
+                    if(res.code == 'ok'){
+                        let lists = JSON.parse(JSON.stringify(res.data))
+                        this.userCustomConfig = JSON.parse(JSON.stringify(res.data))
+                        // let lists = res.data
+                        this.customConfigList = res.data
+                        // this.customConfigList = [
+                        //     { name: '', id: null, type: 1, companyId: null },
+                        //     { name: '', id: null, type: 1, companyId: null },
+                        //     { name: '', id: null, type: 1, companyId: null },
+                        //     { name: '', id: null, type: 1, companyId: null },
+                        //     { name: '', id: null, type: 1, companyId: null },
+                        // ]
+                        // for(let i in lists){
+                        //     this.$set(this.customConfigList[i],'name',lists[i].name)
+                        //     this.$set(this.customConfigList[i],'id',lists[i].id)
+                        //     this.$set(this.customConfigList[i],'type',lists[i].type)
+                        //     this.$set(this.customConfigList[i],'companyId',lists[i].companyId)
+                        // }
+                        console.log('customConfigList',this.customConfigList);
+                        this.cusItemTypes = []
+                        for(let j in this.customConfigList){
+                            if(this.customConfigList[j].type == null || this.customConfigList[j].type == 0){
+                                this.customConfigList[j].type = 0
+                                this.cusItemTypes[j] = 0
+                            }else{
+                                this.cusItemTypes[j] = 1
+                            }
+                        }
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
+            customConfigListSave(){ // 保存/修改自定义配置
+                // let jsonStr = ''
+                // for(let i in this.customConfigList){
+                //     if(this.customConfigList[i].name){
+                //         jsonStr += JSON.stringify(this.customConfigList[i]) + ','
+                //     }
+                // }
+                // jsonStr = jsonStr.substring(0,jsonStr.length - 1)
+                // let jsonStr = []
+                for(let i in this.customConfigList){
+                    if(!this.customConfigList[i].name){
+                        this.customConfigList.splice(i,1)
+                    }
+                }
+                
+                this.http.post('/user-custom/addOrMod',{
+                    json: JSON.stringify(this.customConfigList)
+                },res => {
+                    if(res.code == 'ok'){
+                        this.getCustomConfigList()
+                        this.customConfigDialog = false
+                        this.$message({
+                            message: '保存成功',
+                            type: 'success'
+                        })
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
+            customConfigDelete(item,index){
+                if(item.id){
+                this.http.post('/user-custom/delete',{
+                    id: item.id
+                },res => {
+                    if(res.code == 'ok'){
+                        this.getCustomConfigList()
+                        this.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        })
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+                }else{
+                    this.customConfigList.splice(index,1)
+                }
+            },
+
+            configItemAorM(item){
+                this.configItemAorMDialog = true
+                if(item){
+                    this.AorMitem.name = item.name
+                    this.AorMitem.id = item.id
+                }else{
+                    this.AorMitem.name = null
+                    this.AorMitem.id = null
+                }
+            },
+            configItemAorMSure(){ // 新增/修改配置下拉选项
+                if(!this.AorMitem.name){
+                    this.$message({
+                        message: '名称不能为空',
+                        type: 'error'
+                    })
+                    return
+                }
+                this.http.post('/sub-user-custom/addOrMod',this.AorMitem,res => {
+                    if(res.code == 'ok'){
+                        this.configItemAorMDialog = false
+                        this.getConfigItem()
+                        this.$message({
+                            message: '提交成功',
+                            type: 'success'
+                        })
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
+            configItemDelete(item){ // 删除配置下拉选项
+                this.http.post('/sub-user-custom/delete',{
+                    id: item.id
+                },res => {
+                    if(res.code == 'ok'){
+                        this.getConfigItem()
+                        this.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        })
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
+
+
+            // 获取添加人员时的自定义配置信息
+            getUserCustomConfig(e){
+                this.http.post('/user-custom/list',{},
+                res => {
+                    if(res.code == 'ok'){
+                        this.userCustomConfig = JSON.parse(JSON.stringify(res.data))
+                        for(let i in this.userCustomConfig){
+                            if(this.userCustomConfig[i].type == 0){
+                                if(this.insertForm[this.suoying[i]]){this.insertForm[this.suoying[i]] = this.insertForm[this.suoying[i]]*1}
+                                this.http.post('/sub-user-custom/list',{
+                                    userCustomId: this.userCustomConfig[i].id
+                                },res => {
+                                    if(res.code == 'ok'){
+                                        // this.userCustomConfig[i].itemList = res.data
+                                        this.$set(this.userCustomConfig[i],'itemList',res.data)
+                                    }else { 
+                                        this.$message({
+                                            message: res.msg,
+                                            type: 'error'
+                                        })
+                                    }
+                                },err => {
+                                    this.$message({
+                                        message: err,
+                                        type: 'error'
+                                    })
+                                })
+                            }
+                        }
+                        this.$nextTick(()=>{
+                            // let opt = this.users[0].plateMap[this.userCustomConfig[0].name]
+                            console.log('userCustomConfig',this.userCustomConfig);
+                            console.log('insertForm',this.insertForm);
+                        })
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
+            customConfigListAdd(){
+                this.customConfigList.push({
+                    name: '',
+                    type: 1
+                })
+            },
             // 批量修改部门
             handleSelectionZzjg(e){
                 // if (e.length == 0) {
@@ -1002,7 +1361,10 @@
                         }
                     );
             },
-
+            
+            importUserC(){
+                this.importDialog = true
+            },
             // 批量导入人员
             importUser(item) {
                 //首先判断文件类型
@@ -1017,9 +1379,10 @@
                     this.listLoading = true;
                     let formData = new FormData();
                     formData.append("file", item.file);
-                    
+                    this.importingData = true
                     this.http.uploadFile( this.port.manage.import, formData,
                     res => {
+                        this.importingData = false
                         this.$refs.upload.clearFiles();
                         this.listLoading = false;
                         if (res.code == "ok") {
@@ -1037,6 +1400,7 @@
                         }
                     },
                     error => {
+                        this.importingData = false
                         this.$refs.upload.clearFiles();
                         this.listLoading = false;
                         this.$message({
@@ -1171,8 +1535,15 @@
                                 costApplyDate: res.data.costApplyDate,
                                 inductionDate: res.data.inductionDate,
                                 position: res.data.position,
-                                certJson: res.data.certList
+                                certJson: res.data.certList,
+                                plateMap: {},
+                                plate1: res.data.plate1,
+                                plate2: res.data.plate2,
+                                plate3: res.data.plate3,
+                                plate4: res.data.plate4,
+                                plate5: res.data.plate5,
                             };
+                            this.getUserCustomConfig(1)
                         } else {
                             this.$message({
                                 message: res.msg,
@@ -1204,8 +1575,17 @@
                         inductionDate: util.formatDate.format(new Date(), 'yyyy-MM-dd'),
                         position: '',
                         certJson: [],
+                        plateMap: {},
+                        plate1: null,
+                        plate2: null,
+                        plate3: null,
+                        plate4: null,
+                        plate5: null,
                     };
                     this.title = "新增人员"
+                    this.getUserCustomConfig()
+                    // this.insertForm.plateMap['定义测试文本'] = '测试文本'
+                    console.log('insertForm123',this.insertForm);
                 }
                 this.dialogVisible = true;
             },
@@ -1249,8 +1629,23 @@
                             position: this.insertForm.position,
                             certJson: JSON.stringify(this.insertForm.certJson),
                             // certJson: this.insertForm.certJson
-                            inductionDate: this.insertForm.inductionDate
+                            inductionDate: this.insertForm.inductionDate,
+                            plate1: this.insertForm.plate1,
+                            plate2: this.insertForm.plate2,
+                            plate3: this.insertForm.plate3,
+                            plate4: this.insertForm.plate4,
+                            plate5: this.insertForm.plate5,
                         };
+
+                        
+                        // for(let i=0;i<5;i++) {
+                        //     if(this.insertFormPlates[i]){
+                        //         form[this.suoying[i]] = this.insertFormPlates[i]
+                        //     }
+                        // }
+
+                        console.log(form, 'form')
+                        
                         if (this.insertForm.id != null) {
                             form.id = this.insertForm.id;
                         }