<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %>
|
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
|
<%
|
String path = request.getContextPath();
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
|
+ path + "/";
|
%>
|
|
<!DOCTYPE HTML>
|
<html>
|
<head>
|
<base href="<%=basePath%>">
|
<meta name="viewport" charset="width=device-width, initial-scale=1.0">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<title>用户注册</title>
|
<!--[if !IE]><!-->
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<!--<![endif]-->
|
<!--[if gte IE 8]>
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<![endif]-->
|
<link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
|
<link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/common.css" type="text/css">
|
<link rel="stylesheet" href="static/plugins/layer/skin/default/layer.css" type="text/css">
|
|
<script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
|
<script type="text/javascript" src="static/scripts/easyuiExtend.js"></script>
|
<script type="text/javascript" src="static/scripts/jquery-extend.js"></script>
|
<script type="text/javascript" src="static/plugins/layer/layer.js"></script>
|
<script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
|
<script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
|
|
<script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
|
|
<!--[if lt IE 9]>
|
<script type="text/javascript" src="static/plugins/json2.js"></script>
|
<![endif]-->
|
|
<style>
|
html {
|
overflow: hidden;
|
}
|
|
body {
|
font-size: 14px;
|
font-family: "Microsoft YaHei"
|
color: #e3e6f4;
|
cursor: default;
|
}
|
|
.register {
|
}
|
|
.registerbg {
|
position: fixed;
|
top: 0;
|
left: 0;
|
bottom: 0;
|
right: 0;
|
z-index: -1;
|
}
|
|
.registerbg img {
|
height: 100%;
|
width: 100%;
|
border: 0;
|
}
|
|
.registercontent {
|
width: 860px;
|
margin: 0 auto;
|
background: #fff;
|
border-radius: 20px;
|
min-height: 100%;
|
}
|
|
.registerlogo {
|
text-align: center;
|
padding: 50px 0 50px 0;
|
}
|
|
.registertxt {
|
margin: 0 100px;
|
}
|
|
.registertxt p {
|
height: 30px;
|
line-height: 30px;
|
margin: 0 0 20px 0;
|
}
|
|
.registertxt p span {
|
display: inline-block;
|
text-align: right;
|
width: 130px;
|
font-size: 16px;
|
font-weight: bold;
|
color: #444;
|
}
|
|
.registertxt p input {
|
height: 30px;
|
line-height: 30px;
|
border: 1px solid #cfcfcf;
|
border-radius: 4px;
|
width: 486px;
|
padding: 0 20px;
|
}
|
|
.registercontent .user_btn {
|
text-align: center;
|
}
|
|
.registercontent .user_btn input {
|
border: 0 none;
|
background: url(static/styles/images/login7registerbtn.png);
|
width: 270px;
|
height: 96px;
|
margin: 0 0 0 30px;
|
cursor: pointer;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="register">
|
<div class="registerbg"><img src="static/styles/images/login7register.jpg"/></div>
|
<div class="registercontent">
|
<div class="registerlogo"><img src="static/styles/images/login7register7.png"/></div>
|
<form id="formRegister" method="post">
|
<div class="registertxt">
|
<p><span>真实姓名:</span><input class="easyui-textbox" id="USER_NAME"
|
name="USER_NAME" type="text"
|
value="" data-options="required:true"/></p>
|
<p><span>身份证:</span><input class="easyui-textbox" id="ID_CARD"
|
name="ID_CARD" type="text"
|
value="" data-options="required:true"/></p>
|
<p><span>性别:</span><input class="easyui-combobox" id="SEX"
|
name="SEX" type="text"
|
value="" style="height:30px;text-align: left; width: 486px;"
|
data-options="
|
panelHeight: 'auto',
|
valueField: 'label',
|
textField: 'value',
|
editable: false,
|
width:100,
|
data: [{
|
label: '0',
|
value: '男'
|
},{
|
label: '1',
|
value: '女'
|
}]"/></p>
|
<p><span>所属省份:</span><input class="easyui-combobox" id="PROVINCE"
|
name="PROVINCE" type="text"
|
style="height:30px;text-align: left; width: 486px;"
|
value=""
|
data-options=" editable: false, panelHeight: '200',valueField:'id', textField:'name'"
|
/></p>
|
<p><span>所属城市:</span><input class="easyui-combobox" id="CITY"
|
name="CITY" type="text"
|
style="height:30px;text-align: left; width: 486px;"
|
value=""
|
data-options=" editable: false,panelHeight: '200',valueField:'id', textField:'name'"/>
|
</p>
|
<p><span>单位:</span><input class="easyui-combobox" id="DEPT"
|
name="DEPT" type="text"
|
style="height:30px;text-align: left; width: 486px;"
|
value=""
|
data-options=" editable: true, required:true,panelHeight: '200',valueField:'id', textField:'name'"/>
|
</p>
|
<p><span>单位性质:</span><input class="easyui-combobox" id="DEPT_NATURE"
|
name="DEPT_NATURE" type="text"
|
style="height:30px;text-align: left; width: 486px;"
|
value=""
|
data-options=" editable: false, panelHeight: '200',valueField:'id', textField:'name'"/>
|
</p>
|
<p><span>单位地址:</span><input class="easyui-textbox" id="DEPT_ADDRESS"
|
name="DEPT_ADDRESS" type="text"
|
value=""/></p>
|
<p><span>邮政编码:</span><input class="easyui-textbox" id="POST_CODE"
|
name="POST_CODE" type="text"
|
value=""/></p>
|
<p><span>涉密证书编号:</span><input class="easyui-textbox" id="CERTIFICATE_NUMBER"
|
name="CERTIFICATE_NUMBER" type="text"
|
value=""/></p>
|
<p><span>职称:</span><input class="easyui-combobox" id="JOB"
|
name="JOB" type="text"
|
style="height:30px;text-align: left; width: 486px;"
|
value=""
|
data-options="
|
panelHeight: 'auto',
|
valueField: 'label',
|
textField: 'value',
|
editable: false,
|
width:100,
|
data: [{
|
label: '0',
|
value: '正高级'
|
},{
|
label: '1',
|
value: '副高级'
|
},{
|
label: '2',
|
value: '中级'
|
},{
|
label: '3',
|
value: '初级'
|
},{
|
label: '4',
|
value: '无'
|
}
|
]"
|
/></p>
|
<p><span>手机号码:</span><input class="easyui-textbox" id="MOBILE"
|
name="MOBILE" type="text"
|
value="" data-options="required:true"/></p>
|
<p><span>电话:</span><input class="easyui-textbox" id="TEL_NUMBER"
|
name="TEL_NUMBER" type="text"
|
value=""/></p>
|
<p><span>电子邮箱:</span><input class="easyui-textbox" id="EMAIL"
|
name="EMAIL" type="text"
|
value=""/></p>
|
<p><span>QQ号:</span><input class="easyui-textbox" id="QQ_NUM"
|
name="QQ_NUM" type="text"
|
value=""/></p>
|
<p><span>项目类型:</span><input class="easyui-combobox" id="PROJECT_TYPE"
|
name="PROJECT_TYPE" type="text"
|
style="height:30px;text-align: left; width: 486px;"
|
value="" data-options="
|
panelHeight: 'auto',
|
valueField: 'label',
|
textField: 'value',
|
editable: false,
|
width:100,
|
data: [{
|
label: '0',
|
value: '地调项目'
|
},{
|
label: '1',
|
value: '863项日'
|
},{
|
label: '2',
|
value: '973项日'
|
},{
|
label: '3',
|
value: '全国潜力评价项目'
|
},{
|
label: '4',
|
value: '国家自然科学基金项目'
|
},{
|
label: '5',
|
value: '其它项目'
|
}
|
]"/></p>
|
<p><span>项目名称:</span><input class="easyui-textbox" id="PROJECT_NAME"
|
name="PROJECT_NAME" type="text"
|
value=""/></p>
|
<p><span>所属行业:</span><input class="easyui-combobox" id="TRADE"
|
name="TRADE" type="text"
|
value=""
|
style="height:30px;text-align: left; width: 486px;"
|
data-options=" editable: false, panelHeight: '200',valueField:'id', textField:'name'"/>
|
</p>
|
<p><span>资料使用范围:</span><input class="easyui-textbox" id="MATERIAL_SCOPE"
|
name="MATERIAL_SCOPE" type="text"
|
value=""/></p>
|
<p><span>资料用途:</span><input class="easyui-textbox" id="MATERIAL_PURPOSE"
|
name="MATERIAL_PURPOSE" type="text"
|
value=""/></p>
|
|
</div>
|
</form>
|
<p class="user_btn"><input id="btnSave" type="button" value=""/></p>
|
</div>
|
</div>
|
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
|
<script>
|
//窗口参数,用于弹窗传递
|
var params = {
|
callBack: null
|
};
|
|
$(function () {
|
new ResizeScroll({
|
"id": ".register",
|
fun: function () {
|
var wh = $(window).height();
|
return (wh - 2);
|
}
|
});
|
//绑定按钮事件
|
$("#btnSave").click(function () {
|
//验证表单信息
|
var isValid = $('#formRegister').form('validate');
|
if (!isValid) {
|
wcp.notify.warn('表单验证有误,请检查表单输入项!');
|
return false;
|
}
|
var obj = $("#formRegister").serializeObject();
|
var reg = /(^\d{17}(\d|X|x)$)/;
|
if (!reg.test(obj.ID_CARD)) {
|
wcp.notify.warn("身份证格式不正确!");
|
return;
|
}
|
|
var reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
if (!reg.test(obj.MOBILE)) {
|
wcp.notify.warn("手机号格式不正确!");
|
return;
|
}
|
obj.PROVINCE = $("#PROVINCE").combobox("getText");
|
obj.DEPT = $("#DEPT").combobox("getText");
|
obj.CITY = $("#CITY").combobox("getText");
|
obj.DEPT_NATURE = $("#DEPT_NATURE").combobox("getText");
|
obj.TRADE = $("#TRADE").combobox("getText");
|
obj.SEX = $("#SEX").combobox("getText");
|
obj.JOB = $("#JOB").combobox("getText");
|
obj.PROJECT_TYPE = $("#PROJECT_TYPE").combobox("getText");
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "utilizationUser/saveRegister",
|
data: JSON.stringify(obj),
|
}).done(function (result) {
|
//判断是否需要执行回调函数
|
if (params.callBack) {
|
params.callBack();
|
}
|
//关闭窗口
|
closeWindow();
|
top.wcp.notify.success("注册成功,等待管理员审批!");
|
}));
|
});
|
|
$("#btnClose").click(function () {
|
closeWindow();
|
});
|
addProvince();
|
bindChangeEvent();
|
initDept();
|
initDeptType();
|
initTrade()
|
})
|
|
setTimeout(function () {
|
|
})
|
function addProvince() {
|
var data = [];
|
$.ajax({
|
type: "GET",
|
url: "static/scripts/gdmis/XZQ.xml",
|
dataType: "xml",
|
success: function (xml) {
|
$(xml).find("Province").each(function () { //遍历国家那一级
|
var cityName = $(this).attr("Name");//读取节点属性
|
var cityCode = $(this).attr("Code");
|
if (cityCode != "010000" && cityCode != "000000" && cityCode != "110000") {
|
var city = {
|
id: cityCode,
|
name: cityName
|
}
|
// var city = ['{"id":"120000","name":"天津市"}', '{"id":"130000","name":"河北省"}', '{"id":"140000","name":"山西省"}', '{"id":"150000","name":"内蒙古自治区"}', '{"id":"210000","name":"辽宁省"}', '{"id":"220000","name":"吉林省"}', '{"id":"230000","name":"黑龙江省"}', '{"id":"310000","name":"上海市"}', '{"id":"320000","name":"江苏省"}', '{"id":"330000","name":"浙江省"}', '{"id":"340000","name":"安徽省"}', '{"id":"350000","name":"福建省"}', '{"id":"360000","name":"江西省"}', '{"id":"370000","name":"山东省"}', '{"id":"410000","name":"河南省"}', '{"id":"420000","name":"湖北省"}', '{"id":"430000","name":"湖南省"}', '{"id":"440000","name":"广东省"}', '{"id":"450000","name":"广西壮族自治区"}', '{"id":"460000","name":"海南省"}', '{"id":"500000","name":"重庆市"}', '{"id":"510000","name":"四川省"}', '{"id":"520000","name":"贵州省"}', '{"id":"530000","name":"云南省"}', '{"id":"540000","name":"西藏自治区"}', '{"id":"610000","name":"陕西省"}', '{"id":"620000","name":"甘肃省"}', '{"id":"630000","name":"青海省"}', '{"id":"640000","name":"宁夏回族自治区"}', '{"id":"650000","name":"新疆维吾尔自治区"}', '{"id":"710000","name":"台湾省"}', '{"id":"810000","name":"香港特别行政区"}', '{"id":"910000","name":"澳门特别行政区"}', '{"id":"00H000","name":"中国海域"}', '{"id":"W00000","name":"境外"}']
|
var jsonString = JSON.stringify(city);
|
data.push(JSON.parse(jsonString))
|
}
|
});
|
$('#PROVINCE').combobox('loadData', data);
|
},
|
});
|
}
|
|
function bindChangeEvent() {
|
$('#PROVINCE').combobox({
|
onChange: function (name, value) {
|
$('#CITY').combobox('setValue', '');
|
initChildOption(name);
|
}
|
})
|
}
|
|
function initChildOption(value) {
|
var data = [];
|
value = value.toString().substring(0, 2);
|
$.ajax({
|
type: "GET",
|
url: "static/scripts/gdmis/XZQ.xml",
|
dataType: "xml",
|
success: function (xml) {
|
$("#CITY option:gt(0)").remove();
|
$(xml).find("City").each(function () { //遍历国家那一级
|
var cityName = $(this).attr("Name");//读取节点属性
|
var cityCode = $(this).attr("Code");
|
var sonCode = cityCode.toString().substring(0, 2);
|
if (value != "000000") {
|
if (value == sonCode) {
|
var city = {
|
id: cityCode,
|
name: cityName
|
}
|
// var city = ['{"id":"120000","name":"天津市"}', '{"id":"130000","name":"河北省"}', '{"id":"140000","name":"山西省"}', '{"id":"150000","name":"内蒙古自治区"}', '{"id":"210000","name":"辽宁省"}', '{"id":"220000","name":"吉林省"}', '{"id":"230000","name":"黑龙江省"}', '{"id":"310000","name":"上海市"}', '{"id":"320000","name":"江苏省"}', '{"id":"330000","name":"浙江省"}', '{"id":"340000","name":"安徽省"}', '{"id":"350000","name":"福建省"}', '{"id":"360000","name":"江西省"}', '{"id":"370000","name":"山东省"}', '{"id":"410000","name":"河南省"}', '{"id":"420000","name":"湖北省"}', '{"id":"430000","name":"湖南省"}', '{"id":"440000","name":"广东省"}', '{"id":"450000","name":"广西壮族自治区"}', '{"id":"460000","name":"海南省"}', '{"id":"500000","name":"重庆市"}', '{"id":"510000","name":"四川省"}', '{"id":"520000","name":"贵州省"}', '{"id":"530000","name":"云南省"}', '{"id":"540000","name":"西藏自治区"}', '{"id":"610000","name":"陕西省"}', '{"id":"620000","name":"甘肃省"}', '{"id":"630000","name":"青海省"}', '{"id":"640000","name":"宁夏回族自治区"}', '{"id":"650000","name":"新疆维吾尔自治区"}', '{"id":"710000","name":"台湾省"}', '{"id":"810000","name":"香港特别行政区"}', '{"id":"910000","name":"澳门特别行政区"}', '{"id":"00H000","name":"中国海域"}', '{"id":"W00000","name":"境外"}']
|
var jsonString = JSON.stringify(city);
|
data.push(JSON.parse(jsonString))
|
}
|
}
|
});
|
$('#CITY').combobox('loadData', data);
|
},
|
});
|
}
|
|
|
// function initDept() {
|
// var data = [];
|
// wcp.ui.setBusy("body", wcp.ajax({
|
// url: "utilizationUser/getDept",
|
// }).done(function (result) {
|
// result.forEach(function (item) {
|
// var dept = {
|
// id: item.id,
|
// name: item.deptName
|
// }
|
// var jsonString = JSON.stringify(dept);
|
// data.push(JSON.parse(jsonString))
|
// });
|
// $('#DEPT').combobox('loadData', data);
|
// }));
|
// }
|
|
// function initDeptType() {
|
// var name = "单位性质";
|
// var data = [];
|
// wcp.ui.setBusy("body", wcp.ajax({
|
// url: "utilizationUser/getValue?name=" + name,
|
// }).done(function (result) {
|
// result.forEach(function (item) {
|
// var deptType = {
|
// id: item.paramId,
|
// name: item.paramName
|
// }
|
// var jsonString = JSON.stringify(deptType);
|
// data.push(JSON.parse(jsonString))
|
// });
|
// $('#DEPT_NATURE').combobox('loadData', data);
|
// }));
|
// }
|
|
function initTrade() {
|
var name = "所属行业";
|
var data = [];
|
wcp.ui.setBusy("body", wcp.ajax({
|
url: "utilizationUser/getValue?name=" + name,
|
}).done(function (result) {
|
result.forEach(function (item) {
|
var deptType = {
|
id: item.paramId,
|
name: item.paramName
|
}
|
var jsonString = JSON.stringify(deptType);
|
data.push(JSON.parse(jsonString))
|
});
|
$('#TRADE').combobox('loadData', data);
|
}));
|
}
|
|
|
function closeWindow() {
|
var index = top.layer.getFrameIndex(window.name); //获取窗口索引
|
top.layer.close(index);
|
}
|
|
function validateApplyForm() {
|
var textBoxList = $("#ptbody").find(".easyui-textbox");
|
for (var i = 0; i < textBoxList.length; i++) {
|
var validate = $("#ptbody").find(".easyui-textbox").eq(i).textbox("isValid");
|
if (validate == false) {
|
return false;
|
}
|
}
|
return true;
|
}
|
|
|
</script>
|
</body>
|
</html>
|