1、新增帐号的时候一些改为非必填及对应的验证方式的修改

2、帐号刷表的职位的显示
3、机构里的职位改为非必填
pull/68/head
林锦峰 2021-03-25 09:27:16 +08:00
parent 99b0ac99d6
commit 92ed0a5020
6 changed files with 52 additions and 32 deletions

View File

@ -1380,7 +1380,7 @@ CREATE TABLE `sys_user_org` (
`user_org_id` bigint(20) NOT NULL COMMENT '企业员工主键id', `user_org_id` bigint(20) NOT NULL COMMENT '企业员工主键id',
`user_id` bigint(20) NOT NULL COMMENT '用户id', `user_id` bigint(20) NOT NULL COMMENT '用户id',
`org_id` bigint(20) NOT NULL COMMENT '所属机构id', `org_id` bigint(20) NOT NULL COMMENT '所属机构id',
`position_id` bigint(20) NOT NULL COMMENT '职位id', `position_id` bigint(20) NULL COMMENT '职位id',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间',
`create_user` bigint(20) NULL DEFAULT NULL COMMENT '添加人', `create_user` bigint(20) NULL DEFAULT NULL COMMENT '添加人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',

View File

@ -174,7 +174,7 @@ layui.use(['layer', 'form', 'table', 'util', 'admin', 'tree', 'dropdown', 'xmSel
{field: 'userId', hide: true, sort: true, title: 'id'}, {field: 'userId', hide: true, sort: true, title: 'id'},
{field: 'account', align: "center", sort: true, title: ''}, {field: 'account', align: "center", sort: true, title: ''},
{field: 'realName', align: "center", sort: true, title: ''}, {field: 'realName', align: "center", sort: true, title: ''},
{field: 'positionId', align: "center", sort: true, title: ''}, {field: 'positionName', align: "center", sort: true, title: ''},
{field: 'phone', align: "center", sort: true, title: ''}, {field: 'phone', align: "center", sort: true, title: ''},
{field: 'status', align: "center", templet: '#statusTpl', title: ''}, {field: 'status', align: "center", templet: '#statusTpl', title: ''},
{title: '', toolbar: '#userTbBar', width: 300} {title: '', toolbar: '#userTbBar', width: 300}

View File

@ -31,7 +31,6 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func
positionXmSel = xmSelect.render({ positionXmSel = xmSelect.render({
el: '#position', el: '#position',
radio: true, radio: true,
layVerify: 'required',
clickClose: true, clickClose: true,
data: data.data data: data.data
}); });
@ -65,10 +64,10 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func
Feng.success("添加成功!"); Feng.success("添加成功!");
admin.putTempData('formOk', true); admin.putTempData('formOk', true);
}, function (data) { }, function (data) {
admin.closeThisDialog();
Feng.error("添加失败!" + data.message); Feng.error("添加失败!" + data.message);
}); });
request.set(data.field); request.set(data.field);
request.start(true); request.start(true);
return false;
}); });
}); });

View File

@ -15,14 +15,24 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func
// 初始化职位 // 初始化职位
new HttpRequest(Feng.ctxPath + "/hrPosition/list", 'get', function (data) { new HttpRequest(Feng.ctxPath + "/hrPosition/list", 'get', function (data) {
positionXmSel = xmSelect.render({ let positionId = result.data.positionId;
el: '#position', if (positionId) {
radio: true, positionXmSel = xmSelect.render({
clickClose: true, el: '#position',
layVerify: 'required', radio: true,
data: data.data, clickClose: true,
initValue: [result.data.positionId] data: data.data,
}); initValue: [positionId]
});
} else {
positionXmSel = xmSelect.render({
el: '#position',
radio: true,
clickClose: true,
data: data.data,
});
}
}).start(); }).start();
// 初始化组织树 // 初始化组织树
@ -71,11 +81,11 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func
Feng.success("修改成功!"); Feng.success("修改成功!");
admin.putTempData('formOk', true); admin.putTempData('formOk', true);
}, function (data) { }, function (data) {
admin.closeThisDialog();
Feng.error("修改失败!" + data.message); Feng.error("修改失败!" + data.message);
}); });
request.set(data.field); request.set(data.field);
request.start(true); request.start(true);
return false;
}); });

View File

@ -33,9 +33,9 @@
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md6"> <div class="layui-inline layui-col-md6">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input name="realName" placeholder="请输入姓名" type="text" class="layui-input" lay-verify="required" required/> <input name="realName" placeholder="请输入姓名" type="text" class="layui-input" />
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md6"> <div class="layui-inline layui-col-md6">
@ -45,23 +45,28 @@
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md12"> <div class="layui-inline layui-col-md12">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input id="birthday" name="birthday" placeholder="请输入生日" type="text" class="layui-input date-icon" autocomplete="off" lay-verify="required" required/> <input id="birthday" name="birthday" placeholder="请输入生日" type="text" class="layui-input date-icon" autocomplete="off" />
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md6"> <div class="layui-inline layui-col-md6">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input name="email" placeholder="请输入邮箱" type="text" class="layui-input" lay-verify="required|email" autocomplete="off" required/> <input name="email" placeholder="请输入邮箱" type="text" class="layui-input" autocomplete="off" />
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md6"> <div class="layui-inline layui-col-md6">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input name="phone" placeholder="请输入电话" type="text" class="layui-input" lay-verify="required" required/> <input name="phone" placeholder="请输入手机" type="text" class="layui-input" />
</div>
</div>
<div class="layui-inline layui-col-md6">
<label class="layui-form-label "></label>
<div class="layui-input-block">
<input name="tel" placeholder="请输入电话" type="text" class="layui-input" />
</div> </div>
</div> </div>
</div> </div>
@ -78,7 +83,7 @@
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md12"> <div class="layui-inline layui-col-md12">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div class="layui-input-block"> <div class="layui-input-block">
<div id="position" class="xm-select-demo"></div> <div id="position" class="xm-select-demo"></div>
</div> </div>

View File

@ -17,9 +17,9 @@
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md6"> <div class="layui-inline layui-col-md6">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input name="realName" placeholder="请输入姓名" type="text" class="layui-input" lay-verify="required" required/> <input name="realName" placeholder="请输入姓名" type="text" class="layui-input" />
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md6"> <div class="layui-inline layui-col-md6">
@ -29,22 +29,28 @@
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md12"> <div class="layui-inline layui-col-md12">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input id="birthday" name="birthday" placeholder="请输入生日" type="text" class="layui-input date-icon" autocomplete="off" lay-verify="required" required/> <input id="birthday" name="birthday" placeholder="请输入生日" type="text" class="layui-input date-icon" autocomplete="off" />
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md6"> <div class="layui-inline layui-col-md6">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input name="email" placeholder="请输入邮箱" type="text" class="layui-input" lay-verify="required|email" autocomplete="off" required/> <input name="email" placeholder="请输入邮箱" type="text" class="layui-input" autocomplete="off" />
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md6"> <div class="layui-inline layui-col-md6">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input name="phone" placeholder="请输入电话" type="text" class="layui-input" lay-verify="required" required/> <input name="phone" placeholder="请输入手机" type="text" class="layui-input" />
</div>
</div>
<div class="layui-inline layui-col-md6">
<label class="layui-form-label "></label>
<div class="layui-input-block">
<input name="tel" placeholder="请输入电话" type="text" class="layui-input" />
</div> </div>
</div> </div>
</div> </div>
@ -61,7 +67,7 @@
</div> </div>
</div> </div>
<div class="layui-inline layui-col-md12"> <div class="layui-inline layui-col-md12">
<label class="layui-form-label layui-form-required"></label> <label class="layui-form-label "></label>
<div id="demo1" class="xm-select-demo"></div> <div id="demo1" class="xm-select-demo"></div>
<div class="layui-input-block"> <div class="layui-input-block">
<div id="position" class="xm-select-demo"></div> <div id="position" class="xm-select-demo"></div>