Commit cebace75 authored by liuchao's avatar liuchao

no message

parent 7355188e
...@@ -54,9 +54,10 @@ public class UserController extends BaseController<Object>{ ...@@ -54,9 +54,10 @@ public class UserController extends BaseController<Object>{
@RequestMapping("/user/add") @RequestMapping("/user/add")
public ModelAndView index() throws Exception { public ModelAndView index() throws Exception {
ModelAndView t_view = new ModelAndView(); ModelAndView view = new ModelAndView();
t_view.setViewName("user/saveuser"); view.setViewName("user/saveuser");
return t_view; view.getModel().put("dict", dict());
return view;
} }
@Auth(verifyLogin = false, verifyURL = false) @Auth(verifyLogin = false, verifyURL = false)
......
...@@ -212,6 +212,8 @@ public class BaseController<Entity> extends MultiActionController { ...@@ -212,6 +212,8 @@ public class BaseController<Entity> extends MultiActionController {
String[] relation = rb.getString("relation").split(","); //关系 String[] relation = rb.getString("relation").split(","); //关系
String[] education = rb.getString("education").split(","); //学历 String[] education = rb.getString("education").split(","); //学历
String[] paperType = rb.getString("paperType").split(","); //证件类型 String[] paperType = rb.getString("paperType").split(","); //证件类型
String[] nationality = rb.getString("nationality").split(","); //国籍
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("nation", nation); map.put("nation", nation);
...@@ -221,6 +223,7 @@ public class BaseController<Entity> extends MultiActionController { ...@@ -221,6 +223,7 @@ public class BaseController<Entity> extends MultiActionController {
map.put("relation", relation); map.put("relation", relation);
map.put("education", education); map.put("education", education);
map.put("paperType", paperType); map.put("paperType", paperType);
map.put("nationality", nationality);
return map; return map;
......
...@@ -26,4 +26,4 @@ bloodType=\u672a\u77e5,A,B,O,AB,A:RH+,B:RH+,AB:RH+,O:RH+,A:RH-,B:RH-,AB:RH-,O:RH ...@@ -26,4 +26,4 @@ bloodType=\u672a\u77e5,A,B,O,AB,A:RH+,B:RH+,AB:RH+,O:RH+,A:RH-,B:RH-,AB:RH-,O:RH
relation=\u7236\u6bcd,\u5144\u59b9,\u914d\u5076,\u5b50\u5973,\u4eb2\u5c5e,\u670b\u53cb relation=\u7236\u6bcd,\u5144\u59b9,\u914d\u5076,\u5b50\u5973,\u4eb2\u5c5e,\u670b\u53cb
education=\u521d\u4e2d,\u9ad8\u4e2d,\u4e13\u79d1,\u672c\u79d1,\u7855\u58eb,\u535a\u58eb education=\u521d\u4e2d,\u9ad8\u4e2d,\u4e13\u79d1,\u672c\u79d1,\u7855\u58eb,\u535a\u58eb
paperType=\u8eab\u4efd\u8bc1,\u62a4\u7167,\u519b\u5b98\u8bc1 paperType=\u8eab\u4efd\u8bc1,\u62a4\u7167,\u519b\u5b98\u8bc1
nationality=\u4e2d\u56fd,\u5176\u4ed6
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/hsCheckData/hsCheckData.css" /> <link rel="stylesheet" href="<webpath:path/>/resources/assets/css/hsCheckData/hsCheckData.css" />
<link rel="stylesheet" href="<webpath:path/>/resources/css/page.css"/> <link rel="stylesheet" href="<webpath:path/>/resources/css/page.css"/>
<link rel="stylesheet" href="<webpath:path/>/resources/css/style.css"/>
<!--[if lte IE 8] > <!--[if lte IE 8] >
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-ie.min.css"/> <link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-ie.min.css"/>
<![endif] --> <![endif] -->
......
...@@ -1047,4 +1047,8 @@ a.a15:active { ...@@ -1047,4 +1047,8 @@ a.a15:active {
font-size: 14px; font-size: 14px;
letter-spacing: 0.47px; letter-spacing: 0.47px;
line-height: 30px; line-height: 30px;
}
.form-group{
margin-bottom: 10px;
} }
\ No newline at end of file
$(document).ready(function(){ $(document).ready(function(){
if ($('#userForm').length>0){
$('#userForm').validate({
doNotHideMessage : true, //this option enables to show the error/success messages on tab switch.
errorElement : 'span', //default input error message container
errorClass : 'validate-inline', // default input error message class
focusInvalid : false, // do not focus the last invalid input
rules : {
"firstName" : {
required : true
},
"lastName" : {
required : true
},
"roleId" : {
required : true
},
"email" : {
required : true,
email : true
},
"password" : {
required : "#changePassword:checked"
},
"confirm_password" : {
required : "#changePassword:checked",
equalTo: "#password"
},
"roleId": {
required : true
},
"jobNumber" : {
required : "#isEmployee:checked"
},
"hireOnDateValue" : {
required : "#isEmployee:checked"
},
"clockId" : {
required : "#isEmployee:checked",
number : "#isEmployee:checked",
min : 1
},
"payId" : {
required : "#isEmployee:checked"
},
"paygroupId" : {
required : "#isEmployee:checked"
},
"departmentValue" : {
required : true
}
},
errorPlacement: function (error, element) { // render error placement for each input type
error.insertAfter(element); // for other inputs, just perform default behavoir
if (element.attr("name") == "roleId") {
$("#roleId-controls div a").attr("style","border-color: #b94a48 !important");
}
},
invalidHandler: function (event, validator) { //display error alert on form submit
parent.Loading.stop();
},
highlight: function (element) { // hightlight error inputs
$(element).closest('.help-inline').removeClass('ok'); // display OK icon
$(element).closest('.control-group').removeClass('success').addClass('error'); // set error class to the control group
},
unhighlight: function (element) { // revert the change dony by hightlight
$(element).closest('.control-group').removeClass('error'); // set error class to the control group
if ($(element).attr("name") == "roleId") {
$("#roleId-controls div a").attr("style","");
}
},
success: function (label) {
label.addClass('valid').closest('.control-group').removeClass('error'); // set success class to the control group
label.remove();
},
submitHandler: function(form){
user.save(form,false);
},
onfocusin: function( element, event ) {
}
});
}
$('#birthday').datepicker() $('#birthday').datepicker()
$("#nation").select2({ $("#nation").select2({
...@@ -6,20 +108,43 @@ $(document).ready(function(){ ...@@ -6,20 +108,43 @@ $(document).ready(function(){
allowClear : true allowClear : true
}); });
$("#nationality").select2({ $("#nativePlace").select2({
placeholder : "请选择", placeholder : "请选择",
allowClear : true allowClear : true
}); });
/* $("#domicilePlace").hsCheckData({
$("#nativePlace").hsCheckData({
isShowCheckBox: false, //默认为false isShowCheckBox: false, //默认为false
data: cityData data: cityData
}); });*/
$("#domicilePlace").hsCheckData({
isShowCheckBox: false, //默认为false
data: cityData
});
}) })
\ No newline at end of file
var user = {
save : function(form){
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment