Browse Source

入职流程变更+按钮权限

jzh 1 year ago
parent
commit
b4b824ca19

+ 5 - 1
zjugis-business/src/main/java/com/zjugis/business/flow/interview/service/InterviewServiceImpl.java

@@ -1,6 +1,7 @@
 package com.zjugis.business.flow.interview.service;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson2.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.zjugis.business.constants.DictConstants;
@@ -70,7 +71,10 @@ public class InterviewServiceImpl implements InterviewService {
 
     @Override
     public void update(InterviewVO vo) {
-        validMobile(vo.getMobile());
+        //当userid为空时说明是新用户 这时候需要校验手机号唯一性
+        if(StrUtil.isEmpty(vo.getUserId())){
+            validMobile(vo.getMobile());
+        }
         validIdCard(vo.getSfzh());
         InterviewDO interviewDO = InterviewConvert.INSTANCE.convert(vo);
         update(interviewDO);

+ 37 - 32
zjugis-business/src/main/resources/templates/RecruitDemand/js/index.js

@@ -239,44 +239,49 @@
         z.ui.textarea("[name='RecruitDetailDO[" + index + "]$remark']").setValue(isTimes[index].remark);
 
 
-        $("#editBtn_" + index).click(function () {
-            const span = $(this).find("span");
-            const html = span.html();
-            if (html === '编辑') {
-                span.html('保存')
-                detailWrite(index)
-                addData.attr('disabled', "true");
-                $("#qjsj_" + index).removeClass("form-table-disable")
-                return;
-            }
-            if (html === '保存') {
-                span.html('编辑')
-                detailReadonly(index)
-                addData.removeAttr('disabled')
-                $("#qjsj_" + index).addClass("form-table-disable")
-                return;
-            }
-        })
-
-        $("#delBtn_" + index).click(function () {
-            z.ui.confirm("compid").init({
-                content: "确定删除吗?",
-                onConfirm: function () {
-                    var element = document.getElementById("qjsj_" + index);
-                    element.remove();
-                    buildQjsjSeq();
-                    isTimes.splice(index, 1)
-                },
-                onCancel: function () {
-
+        if (read === '1') {
+            $("#editBtn_" + index).click(function () {
+                const span = $(this).find("span");
+                const html = span.html();
+                if (html === '编辑') {
+                    span.html('保存')
+                    detailWrite(index)
+                    addData.attr('disabled', "true");
+                    $("#qjsj_" + index).removeClass("form-table-disable")
+                    return;
+                }
+                if (html === '保存') {
+                    span.html('编辑')
+                    detailReadonly(index)
+                    addData.removeAttr('disabled')
+                    $("#qjsj_" + index).addClass("form-table-disable")
+                    return;
                 }
             })
 
-        })
+            $("#delBtn_" + index).click(function () {
+                z.ui.confirm("compid").init({
+                    content: "确定删除吗?",
+                    onConfirm: function () {
+                        var element = document.getElementById("qjsj_" + index);
+                        element.remove();
+                        buildQjsjSeq();
+                        isTimes.splice(index, 1)
+                    },
+                    onCancel: function () {
 
-        if (read === '1') {
+                    }
+                })
+
+            })
+
+        }else {
             detailReadonly(index)
         }
+
+
+
+
     }
 }());
 

+ 74 - 69
zjugis-business/src/main/resources/templates/Resign/js/index.js

@@ -247,50 +247,54 @@
                     z.ui.selecttree("[name='review1[" + i + "]']").setValue(finishedArray[i].reviewer)
                 }
 
-                $("#editBtnF_" + i).click(function () {
-                    const span = $(this).find("span");
-                    const html = span.html();
-                    if (html === '编辑') {
-                        span.html('保存')
-                        detailWrite(i);
-                        addDataFinished.attr('disabled', "true");
-                        $("#qjsjF_" + i).removeClass("form-table-disable")
-                        return;
-                    }
-                    if (html === '保存') {
-                        span.html('编辑')
-                        detailReadonly(i);
-                        addDataFinished.removeAttr('disabled')
-                        $("#qjsjF_" + i).addClass("form-table-disable")
-                        return;
-                    }
-                })
 
+                if (read !== '1') {
+                    $("#editBtnF_" + i).click(function () {
+                        const span = $(this).find("span");
+                        const html = span.html();
+                        if (html === '编辑') {
+                            span.html('保存')
+                            detailWrite(i);
+                            addDataFinished.attr('disabled', "true");
+                            $("#qjsjF_" + i).removeClass("form-table-disable")
+                            return;
+                        }
+                        if (html === '保存') {
+                            span.html('编辑')
+                            detailReadonly(i);
+                            addDataFinished.removeAttr('disabled')
+                            $("#qjsjF_" + i).addClass("form-table-disable")
+                            return;
+                        }
+                    })
 
-                $("#delBtnF_" + i).click(function () {
-                    z.ui.confirm("compid").init({
-                        content: "确定删除吗?",
-                        onConfirm: function () {
-                            var element = document.getElementById("qjsjF_" + i);
-                            element.remove();
-                            buildQjsjSeq();
-                            finishedArray.splice(i, 1)
-                        },
-                        onCancel: function () {
 
-                        }
+                    $("#delBtnF_" + i).click(function () {
+                        z.ui.confirm("compid").init({
+                            content: "确定删除吗?",
+                            onConfirm: function () {
+                                var element = document.getElementById("qjsjF_" + i);
+                                element.remove();
+                                buildQjsjSeq();
+                                finishedArray.splice(i, 1)
+                            },
+                            onCancel: function () {
+
+                            }
+                        })
+
                     })
 
-                })
+                } else {
+                    detailReadonly(i)
+                }
+
+
             },
             error: function () {
             }
         })
 
-
-        if (read === '1') {
-            detailReadonly(i)
-        }
     }
 
 
@@ -381,50 +385,51 @@
                     z.ui.selecttree("[name='confirm[" + i + "]']").setValue(unfinishedArray[i].confirmor)
                 }
 
-                $("#editBtnU_" + i).click(function () {
-                    const span = $(this).find("span");
-                    const html = span.html();
-                    if (html === '编辑') {
-                        span.html('保存')
-                        detailWriteU(i);
-                        addDataUnFinished.attr('disabled', "true");
-                        $("#qjsj_" + i).removeClass("form-table-disable")
-                        return;
-                    }
-                    if (html === '保存') {
-                        span.html('编辑')
-                        detailReadonlyU(i);
-                        addDataUnFinished.removeAttr('disabled')
-                        $("#qjsj_" + i).addClass("form-table-disable")
-                        return;
-                    }
-                })
+                if (read !== '1') {
+                    $("#editBtnU_" + i).click(function () {
+                        const span = $(this).find("span");
+                        const html = span.html();
+                        if (html === '编辑') {
+                            span.html('保存')
+                            detailWriteU(i);
+                            addDataUnFinished.attr('disabled', "true");
+                            $("#qjsj_" + i).removeClass("form-table-disable")
+                            return;
+                        }
+                        if (html === '保存') {
+                            span.html('编辑')
+                            detailReadonlyU(i);
+                            addDataUnFinished.removeAttr('disabled')
+                            $("#qjsj_" + i).addClass("form-table-disable")
+                            return;
+                        }
+                    })
 
 
-                $("#delBtnU_" + i).click(function () {
-                    z.ui.confirm("compid").init({
-                        content: "确定删除吗?",
-                        onConfirm: function () {
-                            var element = document.getElementById("qjsj_" + i);
-                            element.remove();
-                            buildQjsjSeq();
-                            unfinishedArray.splice(i, 1)
-                        },
-                        onCancel: function () {
+                    $("#delBtnU_" + i).click(function () {
+                        z.ui.confirm("compid").init({
+                            content: "确定删除吗?",
+                            onConfirm: function () {
+                                var element = document.getElementById("qjsj_" + i);
+                                element.remove();
+                                buildQjsjSeq();
+                                unfinishedArray.splice(i, 1)
+                            },
+                            onCancel: function () {
+
+                            }
+                        })
 
-                        }
                     })
+                } else {
+                    detailReadonlyU(i)
+                }
+
 
-                })
             },
             error: function () {
             }
         })
-
-
-        if (read === '1') {
-            detailReadonlyU(i)
-        }
     }
 
 

+ 6 - 0
zjugis-module-system/zjugis-module-system-biz/src/main/java/com/zjugis/module/system/service/user/AdminUserServiceImpl.java

@@ -572,6 +572,12 @@ public class AdminUserServiceImpl implements AdminUserService {
         if (user != null) {
             user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 开启账号
             user.setPassword(encodePassword(userInitPassword)); // 默认密码
+            if (StrUtil.isNotEmpty(dto.getNickname())) {
+                user.setNickname(dto.getNickname());
+            }
+            if (StrUtil.isNotEmpty(dto.getMobile())) {
+                user.setMobile(dto.getMobile());
+            }
             userMapper.updateById(user); //数据更新
             userId = dto.getUserId();
         } else {