请上传有效证件<\/div>");
ajaxLoadEnd();//--移除遮罩--
return false;
}
if($("#term a").length==0){
$.messager.defaults = { ok: "确定"};
$.messager.alert('提示信息',"
请选择申请开通业务<\/div>");
ajaxLoadEnd();//--移除遮罩--
return false;
}*/
//$("#OrgReg").submit();
$.ajax({
type : "POST",
//url : projectAllName + "/potal/userReg/orgRegister.action?roleArray="+ roleArray+"&orgFile="+orgFile,
url : projectAllName + "/orgUserReg.do",
async : true,
data : $('#OrgReg').serialize(),
success : function(reults) {
var result = JSON.parse(reults);
if (result.result == "1") {
$.messager.defaults = { ok: "确定"};
$.messager.alert('提示信息',"
注册成功!密码已发送手机<\/div>",'info',function(){
applySubmit(result.appid);
ajaxLoadEnd();// --移除遮罩--
window.location.href = projectAllName+"/userReg/userRegister.jsp";
});
} else {
$("#term a").remove();
$.messager.defaults = { ok: "确定"};
$.messager.alert('提示信息',"
"+result.info+"<\/div>",'info',function(){
ajaxLoadEnd();// --移除遮罩--
window.location.href = projectAllName+"/userReg/userRegister.jsp";
});
}
ajaxLoadEnd();//--移除遮罩--
},
error : function(result) {
$.messager.defaults = { ok: "确定"};
$.messager.alert('提示信息',"
系统错误,请联系管理员<\/div>");
ajaxLoadEnd();//--移除遮罩--
}
});
}
function SubmitShipRegister() {
/*if ($('#slt_maritimeagencyShip').val() == "") {
var html = "
海事机构不能为空!<\/span>";
$(HSJGShip).append(html);
document.getElementById("slt_maritimeagencyShipCheck").style.opacity = "1";
$("#slt_maritimeagencyShip").focus();
return false;
}
if ($('#slt_maritimeagencyShip').val() != ""
&& $("#slt_maritimeagencyShipCheck").length > 0) {
document.getElementById("slt_maritimeagencyShipCheck").style.opacity = "0";
}*/
if ($('#ShipName').val() == "") {
var html = "中文船名不能为空!<\/span>";
$(shipZWCM).append(html);
document.getElementById("ShipNameCheck").style.opacity = "1";
$("#ShipName").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#ShipName').val() != "" && $("#ShipNameCheck").length > 0) {
document.getElementById("ShipNameCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
if ($('#shipIdNumber').val() == "" || $('#shipIdNumber').val() == "CN") {
var html = "船舶识别号不能为空!<\/span>";
$(shipCBSBH).append(html);
document.getElementById("shipIdNumberCheck").style.opacity = "1";
$("#shipIdNumber").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#shipIdNumber').val() != "" && $('#shipIdNumber').val() != "CN"
&& $("#shipIdNumberCheck").length > 0) {
document.getElementById("shipIdNumberCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
/*if ($('#shipMMSI').val() == "") {
var html = "MMSI不能为空!<\/span>";
$(MMSI).append(html);
document.getElementById("shipMMSICheck").style.opacity = "1";
$("#shipMMSI").focus();
return false;
}
if ($('#shipMMSI').val() != "" && $("#shipMMSICheck").length > 0) {
document.getElementById("shipMMSICheck").style.opacity = "0";
}*/
if ($('#shipLinkName').val() == "") {
var html = "申办人名称不能为空!<\/span>";
$(shipSBRMC).append(html);
document.getElementById("shipLinkNameCheck").style.opacity = "1";
$("#shipLinkName").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#shipLinkName').val() != "" && $("#shipLinkNameCheck").length > 0) {
document.getElementById("shipLinkNameCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
if ($('#ShipIdNumber').val() == "") {
if ($("#ShipIdNumberCheck").length > 0) {
$("#ShipIdNumberCheck").remove();
}
var html = "身份证号码不能为空!<\/span>";
$(shipSFZHM).append(html);
document.getElementById("ShipIdNumberCheck").style.opacity = "1";
$("#ShipIdNumber").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#ShipIdNumber').val() != "" && $("#ShipIdNumberCheck").length > 0) {
document.getElementById("ShipIdNumberCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
var IdNumber = $('#ShipIdNumber').val();
if (!validateIdCard(IdNumber)) {
if ($("#ShipIdNumberCheck").length > 0) {
$("#ShipIdNumberCheck").remove();
}
var html = "身份证格式不正确!<\/span>";
$(shipSFZHM).append(html);
document.getElementById("ShipIdNumberCheck").style.opacity = "1";
$("#ShipIdNumber").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
/*if ($('#shipMail').val() == "") {
if ($("#shipMailCheck").length > 0) {
$("#shipMailCheck").remove();
}
var html = "电子邮箱不能为空!<\/span>";
$(shipDZYX).append(html);
document.getElementById("shipMailCheck").style.opacity = "1";
$("#shipMail").focus();
return false;
}
if ($('#shipMail').val() != "" && $("#shipMailCheck").length > 0) {
document.getElementById("shipMailCheck").style.opacity = "0";
}
var isEmail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;// 验证邮箱的正则
var email = $('#shipMail').val();
if (!isEmail.test(email)) {
if ($("#shipMailCheck").length > 0) {
$("#shipMailCheck").remove();
}
var html = "邮箱格式不正确!<\/span>";
$(shipDZYX).append(html);
document.getElementById("shipMailCheck").style.opacity = "1";
$("#shipMail").focus();
return false;
}*/
/*if ($('#shipApplyPassword').val() == "") {
var html = "申报密码不能为空!<\/span>";
$(shipSBMM).append(html);
document.getElementById("shipApplyPasswordCheck").style.opacity = "1";
$("#shipApplyPassword").focus();
return false;
}
if ($('#shipApplyPassword').val() != ""
&& $("#shipApplyPasswordCheck").length > 0) {
document.getElementById("shipApplyPasswordCheck").style.opacity = "0";
}*/
if ($('#shipMobilePhone').val() == "") {
if ($("#shipMobilePhoneCheck").length > 0) {
$("#shipMobilePhoneCheck").remove();
}
var html = "手机号码不能为空!<\/span>";
$(SJ).append(html);
document.getElementById("shipMobilePhoneCheck").style.opacity = "1";
$("#shipMobilePhone").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#shipMobilePhone').val() != ""
&& $("#shipMobilePhoneCheck").length > 0) {
document.getElementById("shipMobilePhoneCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
var isMobile = /^1[3|4|5|6|7|8|9]\d{9}$/;
var mobile = $("#shipMobilePhone").val();
if(!isMobile.test(mobile)){
if($("#shipMobilePhoneCheck").length > 0){
$("#shipMobilePhoneCheck").remove();
}
var html = "手机号码格式不正确!<\/span>";
$(SJ).append(html);
document.getElementById("shipMobilePhoneCheck").style.opacity = "1";
$("#shipMobilePhone").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#shipVerifyCode').val() == "") {
var html = "短信验证码不能为空!<\/span>";
$(shipYZM).append(html);
document.getElementById("shipVerifyCodeCheck").style.opacity = "1";
$("#shipVerifyCode").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#shipVerifyCode').val() != ""
&& $("#shipVerifyCodeCheck").length > 0) {
document.getElementById("shipVerifyCodeCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
/*if ($("#selectIsTransport").is(":checked")) {
if ($('#shipCertificateNo').val() == "") {
var html = "证书编号不能为空!<\/span>";
$(ShipZSBH).append(html);
document.getElementById("shipCertificateNoCheck").style.opacity = "1";
$("#shipCertificateNo").focus();
return false;
}
if ($('#shipCertificateNo').val() != ""
&& $("#shipCertificateNoCheck").length > 0) {
document.getElementById("shipCertificateNoCheck").style.opacity = "0";
}
if ($('#txt_establishDate').val() == "") {
var html = "有效期止不能为空!<\/span>";
$(ShipYXQZ).append(html);
document.getElementById("txt_establishDateCheck").style.opacity = "1";
$("#txt_establishDate").focus();
return false;
}
if ($('#txt_establishDate').val() != ""
&& $("#txt_establishDateCheck").length > 0) {
document.getElementById("txt_establishDateCheck").style.opacity = "0";
}
if ($('#shipMaritimeOrgs').val() == "") {
var html = "发证机关名称不能为空!<\/span>";
$(ShipFZJGMC).append(html);
document.getElementById("shipMaritimeOrgsCheck").style.opacity = "1";
$("#shipMaritimeOrgs").focus();
return false;
}
if ($('#shipMaritimeOrgs').val() != ""
&& $("#shipMaritimeOrgsCheck").length > 0) {
document.getElementById("shipMaritimeOrgsCheck").style.opacity = "0";
}
if ($('#shipBusinessScope').val() == "") {
var html = "本船核定的经营范围不能为空!<\/span>";
$(ShipBCHDDJYFW).append(html);
document.getElementById("shipBusinessScopeCheck").style.opacity = "1";
$("#shipBusinessScope").focus();
return false;
}
if ($('#shipBusinessScope').val() != ""
&& $("#shipBusinessScopeCheck").length > 0) {
document.getElementById("shipBusinessScopeCheck").style.opacity = "0";
}
}
if ($("#WYYDBTY").is(":checked")) {
if ($("#WYYDBTYCheck").length > 0) {
$("#WYYDBTYCheck").remove();
}
} else {
var html = "请阅读并勾选同意!<\/span>";
$(WYYDBTYtwo).append(html);
document.getElementById("WYYDBTYCheck").style.opacity = "1";
$("#WYYDBTY").focus();
return false;
}
$('#ipShip').val(ip);*/
$("#ShipReg").submit();
/*if ($("#selectIsTransport").is(":checked")) {
$('#isTransport').val("1");
} else {
$('#isTransport').val("0");
}
$.ajax({
type : "POST",
url : projectAllName + "/potal/userReg/shipRegister.action?roleArray="
+ roleArray+"&shipFile="+shipFile,
async : false,
data : $('#ShipReg').serialize(), // 要提交的表单
success : function(result) {
if (result.result == "1") {
$.messager.alert('提示信息',""+result.info+"<\/div>");
applySubmit(result.appid);
ajaxLoadEnd();//--移除遮罩--
} else {
arr.length = 0;
$.messager.alert('提示信息',"
数据提交失败,请联系管理员<\/div>");
ajaxLoadEnd();//--移除遮罩--
}
},
error : function(result) {
alert(result.toString);
arr.length = 0;
alert("注册失败1");
ajaxLoadEnd();//--移除遮罩--
}
});*/
}
var i = 5;
var intervalid;
function SubmitNaturalRegister() {
if ($('#NaturalName').val() == "") {
var html = "
身份证姓名不能为空!<\/span>";
$(SFZXMNatural).append(html);
document.getElementById("NaturalNameCheck").style.opacity = "1";
$("#NaturalName").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#NaturalName').val() != "" && $("#NaturalNameCheck").length > 0) {
document.getElementById("NaturalNameCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
if ($('#NaturalIdNumber').val() == "") {
if ($("#NaturalIdNumberCheck").length > 0) {
$("#NaturalIdNumberCheck").remove();
}
var html = "身份证号码不能为空!<\/span>";
$(SFZHMNatural).append(html);
document.getElementById("NaturalIdNumberCheck").style.opacity = "1";
$("#NaturalIdNumber").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#NaturalIdNumber').val() != ""
&& $("#NaturalIdNumberCheck").length > 0) {
document.getElementById("NaturalIdNumberCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
var IdNumber = $('#NaturalIdNumber').val();
if (!validateIdCard(IdNumber)) {
if ($("#NaturalIdNumberCheck").length > 0) {
$("#NaturalIdNumberCheck").remove();
}
var html = "身份证格式不正确!<\/span>";
$(SFZHMNatural).append(html);
document.getElementById("NaturalIdNumberCheck").style.opacity = "1";
$("#NaturalIdNumber").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#mobileNatural').val() == "") {
if ($("#mobileNaturalCheck").length > 0) {
$("#mobileNaturalCheck").remove();
}
var html = "手机号码不能为空!<\/span>";
$(HM).append(html);
document.getElementById("mobileNaturalCheck").style.opacity = "1";
$("#mobileNatural").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#mobileNatural').val() != "" && $("#mobileNaturalCheck").length > 0) {
document.getElementById("mobileNaturalCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
var isMobile = /^1[3|4|5|6|7|8|9]\d{9}$/;
var mobile = $("#mobileNatural").val();
if(!isMobile.test(mobile)){
if($("#mobileNaturalCheck").length > 0){
$("#mobileNaturalCheck").remove();
}
var html = "手机号码格式不正确!<\/span>";
$(HM).append(html);
document.getElementById("mobileNaturalCheck").style.opacity = "1";
$("#mobileNatural").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#verifyCodeNatural').val() == "") {
var html = "短信验证码不能为空!<\/span>";
$(YZMNatural).append(html);
document.getElementById("verifyCodeNaturalCheck").style.opacity = "1";
$("#verifyCodeNatural").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#verifyCodeNatural').val() != ""
&& $("#verifyCodeNaturalCheck").length > 0) {
document.getElementById("verifyCodeNaturalCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
if ($('#emailNatural').val() == "") {
if ($("#emailNaturalCheck").length > 0) {
$("#emailNaturalCheck").remove();
}
var html = "电子邮箱不能为空!<\/span>";
$(DZYJNatural).append(html);
document.getElementById("emailNaturalCheck").style.opacity = "1";
$("#emailNatural").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
if ($('#emailNatural').val() != "" && $("#emailNaturalCheck").length > 0) {
document.getElementById("emailNaturalCheck").style.opacity = "0";
ajaxLoadEnd();//--移除遮罩--
}
var isEmail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;// 验证邮箱的正则
var email = $('#emailNatural').val();
if (!isEmail.test(email)) {
if ($("#emailNaturalCheck").length > 0) {
$("#emailNaturalCheck").remove();
}
var html = "邮箱格式不正确!<\/span>";
$(DZYJNatural).append(html);
document.getElementById("emailNaturalCheck").style.opacity = "1";
$("#emailNatural").focus();
ajaxLoadEnd();//--移除遮罩--
return false;
}
var checked =document.getElementById("WYYDBTY").checked;
if(checked==false){
alert("请先阅读条款");
ajaxLoadEnd();//--移除遮罩--
return false;
}
$('#NaturalReg').submit();
/**
* 2018-5-25 添加密码输入框
* 密码要求:
* 最短6位,最长16位 {6,16}
* 必须包含1个数字
* 必须包含2个小写字母
* 必须包含2个大写字母
* 必须包含1个特殊字符 ,._!@#$%^&*?
*/
/*layer.prompt({
formType: 1,//0 文本,1密码
title: "请输入复杂密码",
}, function(value, index, elem){
// alert(value); //得到value
//加载层,覆盖easyui加载层,防止重复点击
var load = layer.load();
if(value!=undefined && value!=""){
if(pwdPat.test(value)){
//关闭第一个输入框
layer.close(index);
var pwd=value;
layer.close(load);
//再次输入密码
layer.prompt({
formType: 1,
title: '请再次输入密码',
}, function(value, index, elem){
// alert(value); //得到value
//防止重复点击
var load2 = layer.load();
if(pwd==value && pwdPat.test(value)){
$('#naturalPwd').val(value);
layer.msg('设置成功', {
icon: 1,
time: 1500 //1.5秒关闭(如果不配置,默认是3秒)
}, function(){
//do something
$('#NaturalReg').submit();
});
}else{
layer.close(load2);
layer.msg("两次输入密码不一致请重新输入");
}
});
//这里不关闭layer
// layer.close(index);
}else{
layer.close(load);
layer.alert('密码最少6位,包括至少1个大写字母,1个小写字母,1个数字,1个特殊字符(英文状态下)');
}
}else{
layer.close(load);
layer.msg("请填写密码");
}
});
return false*/
}
function SJ(){
intervalid = setInterval("fun()", 1000);
}
function fun() {
if (i == 0) {
window.location.href = "/UserReg/userReg/userRegister.jsp";
clearInterval(intervalid);
}
document.getElementById("mes").innerHTML = i;
i--;
}
function submitContactus(){
if(!checkFrom()){
$.messager.alert('提示信息',"当前页面输入存在非法字符<\/div>");
return false;
}
if(checkBeforeSubmit() == 0){
return false;
}
ajaxLoading();// --遮罩--
$.ajax({
type : "POST",
url : projectName + "/contactus.do",
data : $("#contactus").serialize(),
success : function(result) {
var data =JSON.parse(result);
if(data.code == "1"){
$.messager.defaults = { ok: "确定"};
$.messager.alert("提示", data.info, "", function() {
ajaxLoadEnd1();// --移除遮罩--
window.location=projectName+"/tocontactus.do";
})
}else{
$.messager.alert('错误提示',data.info,'error');
}
ajaxLoadEnd();
},
error:function(result){
$.messager.alert('错误提示','提交失败','error');
ajaxLoadEnd();
}
});
}