|
@@ -2,7 +2,7 @@ var Register = {
|
|
registData: {},
|
|
registData: {},
|
|
validateFields: {
|
|
validateFields: {
|
|
username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
|
|
username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
|
|
- name: {validators: {notEmpty: {message: '单位/企业名称不能为空'},regexp:{regexp:/^([\u4E00-\u9FA5]|\(|\)|\(|\)){1,100}$/,message:"单位/企业名称只允许中文"}}},
|
|
|
|
|
|
+ name: {validators: {notEmpty: {message: '单位/企业名称不能为空'}, regexp: {regexp: /^([\u4E00-\u9FA5]|\(|\)|\(|\)){1,100}$/, message: "单位/企业名称只允许中文"}}},
|
|
//idCard: {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}},
|
|
//idCard: {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}},
|
|
agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
|
|
agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
|
|
agentPhone: {
|
|
agentPhone: {
|
|
@@ -46,7 +46,7 @@ var Register = {
|
|
},
|
|
},
|
|
sy_validateFields: {
|
|
sy_validateFields: {
|
|
username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
|
|
username: {validators: {notEmpty: {message: '登录账号不能为空'}}},
|
|
- name: {validators: {notEmpty: {message: '单位名称不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{1,100}$/,message:"单位名称只允许中文"}}},
|
|
|
|
|
|
+ name: {validators: {notEmpty: {message: '单位名称不能为空'}, regexp: {regexp: /^[\u4e00-\u9fa5]{1,100}$/, message: "单位名称只允许中文"}}},
|
|
agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
|
|
agentName: {validators: {notEmpty: {message: '人才联络员不能为空'}}},
|
|
agentPhone: {
|
|
agentPhone: {
|
|
validators: {
|
|
validators: {
|
|
@@ -91,7 +91,7 @@ var persionCountDown = 0;
|
|
var psSmsBtn = $("#ps_sms_btn");
|
|
var psSmsBtn = $("#ps_sms_btn");
|
|
var lock = false;
|
|
var lock = false;
|
|
|
|
|
|
-Register.addSubmit = function() {
|
|
|
|
|
|
+Register.addSubmit = function () {
|
|
|
|
|
|
var regType = $(".active").attr("regType");
|
|
var regType = $(".active").attr("regType");
|
|
if (regType == "en") { //企业用户注册
|
|
if (regType == "en") { //企业用户注册
|
|
@@ -114,7 +114,7 @@ Register.validate = function () {
|
|
|
|
|
|
|
|
|
|
var isDis = false;
|
|
var isDis = false;
|
|
-Register.enterpriseUserRegister = function() {
|
|
|
|
|
|
+Register.enterpriseUserRegister = function () {
|
|
|
|
|
|
var special = $("#ep_form .active").attr("special");
|
|
var special = $("#ep_form .active").attr("special");
|
|
$("#special").val(special)
|
|
$("#special").val(special)
|
|
@@ -124,48 +124,48 @@ Register.enterpriseUserRegister = function() {
|
|
invalid: 'glyphicon glyphicon-remove',
|
|
invalid: 'glyphicon glyphicon-remove',
|
|
validating: 'glyphicon glyphicon-refresh'
|
|
validating: 'glyphicon glyphicon-refresh'
|
|
},
|
|
},
|
|
- group:'.rowGroup',
|
|
|
|
|
|
+ group: '.rowGroup',
|
|
fields: Register.validateFields,
|
|
fields: Register.validateFields,
|
|
live: 'enabled',
|
|
live: 'enabled',
|
|
message: '该字段不能为空'
|
|
message: '该字段不能为空'
|
|
});
|
|
});
|
|
- if(special == "qiye"){
|
|
|
|
|
|
+ if (special == "qiye") {
|
|
$("#tab-3 .form-control").removeAttr("disabled");
|
|
$("#tab-3 .form-control").removeAttr("disabled");
|
|
- $("#tab-4 .form-control").attr("disabled","disabled");
|
|
|
|
- $('#ep_form').bootstrapValidator("addField","idCard",{validators: {notEmpty: {message: '统一社会信用代码不能为空'}}});
|
|
|
|
- $('#ep_form').bootstrapValidator("addField","legal",{validators: {notEmpty: {message: '法人代表不能为空'},regexp:{regexp:/^[\u4e00-\u9fa5]{1,50}$/,message:"法人代表只允许中文"}}});
|
|
|
|
- $('#ep_form').bootstrapValidator("addField","bankCard",{validators: {notEmpty: {message: '开户银行账号不能为空'}}});
|
|
|
|
- $('#ep_form').bootstrapValidator("addField","bankNetwork",{validators: {notEmpty: {message: '开户银行网点不能为空'},
|
|
|
|
|
|
+ $("#tab-4 .form-control").attr("disabled", "disabled");
|
|
|
|
+ $('#ep_form').bootstrapValidator("addField", "idCard", {validators: {notEmpty: {message: '统一社会信用代码不能为空'}}});
|
|
|
|
+ $('#ep_form').bootstrapValidator("addField", "legal", {validators: {notEmpty: {message: '法人代表不能为空'}, regexp: {regexp: /^[\u4e00-\u9fa5]{1,50}$/, message: "法人代表只允许中文"}}});
|
|
|
|
+ $('#ep_form').bootstrapValidator("addField", "bankCard", {validators: {notEmpty: {message: '开户银行账号不能为空'}}});
|
|
|
|
+ $('#ep_form').bootstrapValidator("addField", "bankNetwork", {validators: {notEmpty: {message: '开户银行网点不能为空'},
|
|
regexp: {
|
|
regexp: {
|
|
regexp: /^[\u4e00-\u9fa5]*银行[\u4e00-\u9fa5]*$/,
|
|
regexp: /^[\u4e00-\u9fa5]*银行[\u4e00-\u9fa5]*$/,
|
|
message: "开户银行网点格式不正确"
|
|
message: "开户银行网点格式不正确"
|
|
}}});
|
|
}}});
|
|
- $('#ep_form').bootstrapValidator("addField","bank",{validators: {notEmpty: {message: '开户银行不能为空'},regexp: {
|
|
|
|
|
|
+ $('#ep_form').bootstrapValidator("addField", "bank", {validators: {notEmpty: {message: '开户银行不能为空'}, regexp: {
|
|
regexp: /^[\u4e00-\u9fa5]*$/,
|
|
regexp: /^[\u4e00-\u9fa5]*$/,
|
|
message: "开户银行必须为中文"
|
|
message: "开户银行必须为中文"
|
|
}}});
|
|
}}});
|
|
var prefix = '企业';
|
|
var prefix = '企业';
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
$("#tab-4 .form-control").removeAttr("disabled");
|
|
$("#tab-4 .form-control").removeAttr("disabled");
|
|
- $("#tab-3 .form-control").attr("disabled","disabled");
|
|
|
|
- $('#ep_form').bootstrapValidator("removeField","idCard");
|
|
|
|
- $('#ep_form').bootstrapValidator("removeField","legal");
|
|
|
|
- $('#ep_form').bootstrapValidator("removeField","bankCard");
|
|
|
|
- $('#ep_form').bootstrapValidator("removeField","bankNetwork");
|
|
|
|
- $('#ep_form').bootstrapValidator("removeField","bank");
|
|
|
|
|
|
+ $("#tab-3 .form-control").attr("disabled", "disabled");
|
|
|
|
+ $('#ep_form').bootstrapValidator("removeField", "idCard");
|
|
|
|
+ $('#ep_form').bootstrapValidator("removeField", "legal");
|
|
|
|
+ $('#ep_form').bootstrapValidator("removeField", "bankCard");
|
|
|
|
+ $('#ep_form').bootstrapValidator("removeField", "bankNetwork");
|
|
|
|
+ $('#ep_form').bootstrapValidator("removeField", "bank");
|
|
var prefix = '单位';
|
|
var prefix = '单位';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- if(!Register.validate()){
|
|
|
|
|
|
+ if (!Register.validate()) {
|
|
|
|
|
|
- return ;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
isDis = $("#type").prop("disabled");
|
|
isDis = $("#type").prop("disabled");
|
|
var source = $("#source").val();
|
|
var source = $("#source").val();
|
|
- if(special == "qiye"){
|
|
|
|
|
|
+ if (special == "qiye") {
|
|
var username = $("#username").val();
|
|
var username = $("#username").val();
|
|
var password = $("#password").val();
|
|
var password = $("#password").val();
|
|
var rePassword = $("#re_password").val();
|
|
var rePassword = $("#re_password").val();
|
|
@@ -175,7 +175,7 @@ Register.enterpriseUserRegister = function() {
|
|
var street = $("#street").val();
|
|
var street = $("#street").val();
|
|
var address = $("#address").val();
|
|
var address = $("#address").val();
|
|
var ephone = $("#ephone").val();
|
|
var ephone = $("#ephone").val();
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
var username = $("#sy_username").val();
|
|
var username = $("#sy_username").val();
|
|
var password = $("#sy_password").val();
|
|
var password = $("#sy_password").val();
|
|
var rePassword = $("#sy_re_password").val();
|
|
var rePassword = $("#sy_re_password").val();
|
|
@@ -189,7 +189,7 @@ Register.enterpriseUserRegister = function() {
|
|
var agentPhone = $("#agentPhone").val();
|
|
var agentPhone = $("#agentPhone").val();
|
|
var verificationCode = $("#verificationCode").val();
|
|
var verificationCode = $("#verificationCode").val();
|
|
|
|
|
|
- if(isDis){
|
|
|
|
|
|
+ if (isDis) {
|
|
$("#type").removeAttr("disabled");
|
|
$("#type").removeAttr("disabled");
|
|
}
|
|
}
|
|
var type = $("#type").val();
|
|
var type = $("#type").val();
|
|
@@ -200,7 +200,7 @@ Register.enterpriseUserRegister = function() {
|
|
var bankCard = $("#bankCard").val();
|
|
var bankCard = $("#bankCard").val();
|
|
var bank = $("#bank").val();
|
|
var bank = $("#bank").val();
|
|
var bankNetwork = $("#bankNetwork").val();
|
|
var bankNetwork = $("#bankNetwork").val();
|
|
- if (username==null || username=='') {
|
|
|
|
|
|
+ if (username == null || username == '') {
|
|
Feng.info("请填写账号!");
|
|
Feng.info("请填写账号!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -208,16 +208,16 @@ Register.enterpriseUserRegister = function() {
|
|
Feng.info("账号最多50个字符!");
|
|
Feng.info("账号最多50个字符!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(source != 2){
|
|
|
|
- if (password==null || password=='') {
|
|
|
|
|
|
+ if (source != 2) {
|
|
|
|
+ if (password == null || password == '') {
|
|
Feng.info("请填写密码!");
|
|
Feng.info("请填写密码!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (!/^(?=.*\d)(?=.*[a-zA-Z]).{8,20}$/.test(password)){
|
|
|
|
|
|
+ if (!/^(?=.*\d)(?=.*[a-zA-Z]).{8,20}$/.test(password)) {
|
|
Feng.info("密码格式错误,密码由字母与数字组成,且长度必须8个字符及以上!");
|
|
Feng.info("密码格式错误,密码由字母与数字组成,且长度必须8个字符及以上!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (rePassword==null || rePassword=='') {
|
|
|
|
|
|
+ if (rePassword == null || rePassword == '') {
|
|
Feng.info("请填写重复密码!");
|
|
Feng.info("请填写重复密码!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -226,35 +226,35 @@ Register.enterpriseUserRegister = function() {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (name==null || name=='') {
|
|
|
|
- Feng.info("请填写"+prefix+"名称!");
|
|
|
|
|
|
+ if (name == null || name == '') {
|
|
|
|
+ Feng.info("请填写" + prefix + "名称!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!/^([\u4E00-\u9FA5]|\(|\)|\(|\)){1,100}$/.test(name)){
|
|
|
|
- Feng.info(prefix+"名称只能输入中文 !");
|
|
|
|
|
|
+ if (!/^([\u4E00-\u9FA5]|\(|\)|\(|\)){1,100}$/.test(name)) {
|
|
|
|
+ Feng.info(prefix + "名称只能输入中文 !");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (name.length > 100) {
|
|
if (name.length > 100) {
|
|
- Feng.info(prefix+"名称最多100个字符!");
|
|
|
|
|
|
+ Feng.info(prefix + "名称最多100个字符!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(ephone == null || ephone==''){
|
|
|
|
- Feng.info("请填写"+prefix+"电话");
|
|
|
|
|
|
+ if (ephone == null || ephone == '') {
|
|
|
|
+ Feng.info("请填写" + prefix + "电话");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (street==null || street=='') {
|
|
|
|
|
|
+ if (street == null || street == '') {
|
|
Feng.info("请选择所属街道!");
|
|
Feng.info("请选择所属街道!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (address==null || address=='') {
|
|
|
|
|
|
+ if (address == null || address == '') {
|
|
Feng.info("请填写单位地址!");
|
|
Feng.info("请填写单位地址!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if(special == "qiye"){
|
|
|
|
- if ((idCard==null || idCard=='')) {
|
|
|
|
|
|
+ if (special == "qiye") {
|
|
|
|
+ if ((idCard == null || idCard == '')) {
|
|
Feng.info("请填写统一社会信用代码!");
|
|
Feng.info("请填写统一社会信用代码!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -263,89 +263,89 @@ Register.enterpriseUserRegister = function() {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (legal==null || legal=='') {
|
|
|
|
|
|
+ if (legal == null || legal == '') {
|
|
Feng.info("请填写法人代表!");
|
|
Feng.info("请填写法人代表!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if(!/^[\u4e00-\u9fa5]{1,50}$/.test(legal)){
|
|
|
|
|
|
+ if (!/^[\u4e00-\u9fa5]{1,50}$/.test(legal)) {
|
|
Feng.info("法人代表只能输入中文 !");
|
|
Feng.info("法人代表只能输入中文 !");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (type==null || type=='') {
|
|
|
|
|
|
+ if (type == null || type == '') {
|
|
Feng.info("请选择申报类型!");
|
|
Feng.info("请选择申报类型!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if(type==null || type==''){
|
|
|
|
|
|
+ if (type == null || type == '') {
|
|
Feng.info("请选择企业类别");
|
|
Feng.info("请选择企业类别");
|
|
- return ;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (bankCard==null || bankCard=='') {
|
|
|
|
|
|
+ if (bankCard == null || bankCard == '') {
|
|
Feng.info("请填写企业银行账号!");
|
|
Feng.info("请填写企业银行账号!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (bank==null || bank=='') {
|
|
|
|
|
|
+ if (bank == null || bank == '') {
|
|
Feng.info("请填写企业开户银行!");
|
|
Feng.info("请填写企业开户银行!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (bankNetwork==null || bankNetwork=='') {
|
|
|
|
|
|
+ if (bankNetwork == null || bankNetwork == '') {
|
|
Feng.info("请填写企业开户银行网点");
|
|
Feng.info("请填写企业开户银行网点");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if(type==1 ){
|
|
|
|
- if(enterpriseTag==null||enterpriseTag==''){
|
|
|
|
- Feng.info("请选择单位标签!");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(industryFieldNew == null || industryFieldNew ==''){
|
|
|
|
- Feng.info("请选择产业领域");
|
|
|
|
- return ;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var x=document.getElementById("imgurl").value;
|
|
|
|
- if(x==""){
|
|
|
|
|
|
+ var x = document.getElementById("imgurl").value;
|
|
|
|
+ if (x == "") {
|
|
Feng.info("请上传营业执照照片!");
|
|
Feng.info("请上传营业执照照片!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!Feng.chkFileInvalid(document.getElementById("imgurl").files[0],10,10,["image/jpeg","image/gif","image/png","image/jpg","application/pdf"],"营业执照只允许上传PDF或图片")){
|
|
|
|
|
|
+ if (!Feng.chkFileInvalid(document.getElementById("imgurl").files[0], 10, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "营业执照只允许上传PDF或图片")) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- var xx=document.getElementById("bankImg").value;
|
|
|
|
- if(xx==""){
|
|
|
|
|
|
+ var xx = document.getElementById("bankImg").value;
|
|
|
|
+ if (xx == "") {
|
|
Feng.info("请上传开户银行许可证!");
|
|
Feng.info("请上传开户银行许可证!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!Feng.chkFileInvalid(document.getElementById("bankImg").files[0],10,10,["image/jpeg","image/gif","image/png","image/jpg","application/pdf"],"开户银行许可证只允许上传PDF或图片")){
|
|
|
|
|
|
+ if (!Feng.chkFileInvalid(document.getElementById("bankImg").files[0], 10, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "开户银行许可证只允许上传PDF或图片")) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- var xxx=document.getElementById("domainImg").value;
|
|
|
|
- if(xxx=="" && type == 1){
|
|
|
|
- Feng.info("请上传行业领域佐证材料!");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!Feng.chkFileInvalid(document.getElementById("domainImg").files[0],10,10,["image/jpeg","image/gif","image/png","image/jpg","application/pdf"],"行业领域佐证材料只允许上传PDF或图片")){
|
|
|
|
- return;
|
|
|
|
|
|
+
|
|
|
|
+ if (type == 1) {
|
|
|
|
+ if (enterpriseTag == null || enterpriseTag == '') {
|
|
|
|
+ Feng.info("请选择单位标签!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (industryFieldNew == null || industryFieldNew == '') {
|
|
|
|
+ Feng.info("请选择产业领域");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ var xxx = document.getElementById("domainImg").value;
|
|
|
|
+ if (xxx == "") {
|
|
|
|
+ Feng.info("请上传行业领域佐证材料!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!Feng.chkFileInvalid(document.getElementById("domainImg").files[0], 10, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "行业领域佐证材料只允许上传PDF或图片")) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
- }else{
|
|
|
|
- var x=document.getElementById("sy_imgurl").value;
|
|
|
|
- if(x==""){
|
|
|
|
|
|
+ } else {
|
|
|
|
+ var x = document.getElementById("sy_imgurl").value;
|
|
|
|
+ if (x == "") {
|
|
Feng.info("请上传法人证或批文!");
|
|
Feng.info("请上传法人证或批文!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!Feng.chkFileInvalid(document.getElementById("sy_imgurl").files[0],10,10,["image/jpeg","image/gif","image/png","image/jpg","application/pdf"],"法人证或批文只允许上传PDF或图片")){
|
|
|
|
|
|
+ if (!Feng.chkFileInvalid(document.getElementById("sy_imgurl").files[0], 10, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "法人证或批文只允许上传PDF或图片")) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- if (agentName==null || agentName=='') {
|
|
|
|
|
|
+ if (agentName == null || agentName == '') {
|
|
Feng.info("请填写人才联络员!");
|
|
Feng.info("请填写人才联络员!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -353,52 +353,52 @@ Register.enterpriseUserRegister = function() {
|
|
Feng.info("人才联络员最多30个字符!");
|
|
Feng.info("人才联络员最多30个字符!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (agentPhone==null || agentPhone=='') {
|
|
|
|
|
|
+ if (agentPhone == null || agentPhone == '') {
|
|
Feng.info("请填写人才联络员电话!");
|
|
Feng.info("请填写人才联络员电话!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (verificationCode==null || verificationCode=='') {
|
|
|
|
|
|
+ if (verificationCode == null || verificationCode == '') {
|
|
Feng.info("请填写手机验证码!");
|
|
Feng.info("请填写手机验证码!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (agentEmail==null || agentEmail=='') {
|
|
|
|
|
|
+ if (agentEmail == null || agentEmail == '') {
|
|
Feng.info("请填写电子邮箱!");
|
|
Feng.info("请填写电子邮箱!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- var xxxx=document.getElementById("beian").value;
|
|
|
|
- if(xxxx==""){
|
|
|
|
|
|
+ var xxxx = document.getElementById("beian").value;
|
|
|
|
+ if (xxxx == "") {
|
|
Feng.info("请上传人才联络员信息备案表!");
|
|
Feng.info("请上传人才联络员信息备案表!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!Feng.chkFileInvalid(document.getElementById("beian").files[0],10,10,["image/jpeg","image/gif","image/png","image/jpg","application/pdf"],"人才联络员信息备案表只允许上传PDF或图片")){
|
|
|
|
|
|
+ if (!Feng.chkFileInvalid(document.getElementById("beian").files[0], 10, 10, ["image/jpeg", "image/gif", "image/png", "image/jpg", "application/pdf"], "人才联络员信息备案表只允许上传PDF或图片")) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!/((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/.test(ephone)){
|
|
|
|
- Feng.info(prefix+"电话格式不合法!");
|
|
|
|
|
|
+ if (!/((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/.test(ephone)) {
|
|
|
|
+ Feng.info(prefix + "电话格式不合法!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!/((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/.test(agentPhone)){
|
|
|
|
|
|
+ if (!/((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/.test(agentPhone)) {
|
|
Feng.info("人才联络员电话格式不合法!");
|
|
Feng.info("人才联络员电话格式不合法!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!/[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(agentEmail)){
|
|
|
|
|
|
+ if (!/[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(agentEmail)) {
|
|
Feng.info("电子邮箱格式不合法!");
|
|
Feng.info("电子邮箱格式不合法!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!lock){
|
|
|
|
|
|
+ if (!lock) {
|
|
lock = true;
|
|
lock = true;
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
Feng.info("不能重复点击");
|
|
Feng.info("不能重复点击");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
$("#ep_form")[0].submit();
|
|
$("#ep_form")[0].submit();
|
|
};
|
|
};
|
|
|
|
|
|
-Register.personUserRegister = function() {
|
|
|
|
|
|
+Register.personUserRegister = function () {
|
|
var source = $("#ps_source").val();
|
|
var source = $("#ps_source").val();
|
|
var username = $("#ps_username").val();
|
|
var username = $("#ps_username").val();
|
|
var password = $("#ps_password").val();
|
|
var password = $("#ps_password").val();
|
|
@@ -408,7 +408,7 @@ Register.personUserRegister = function() {
|
|
var idCard = $("#ps_idCard").val();
|
|
var idCard = $("#ps_idCard").val();
|
|
var phone = $("#ps_phone").val();
|
|
var phone = $("#ps_phone").val();
|
|
var verificationCode = $("#ps_verificationCode").val();
|
|
var verificationCode = $("#ps_verificationCode").val();
|
|
- if (username==null || username=='') {
|
|
|
|
|
|
+ if (username == null || username == '') {
|
|
Feng.info("请填写账号!");
|
|
Feng.info("请填写账号!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -416,12 +416,12 @@ Register.personUserRegister = function() {
|
|
Feng.info("账号最多20个字符!");
|
|
Feng.info("账号最多20个字符!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(source !=2 ){
|
|
|
|
- if (password==null || password=='') {
|
|
|
|
|
|
+ if (source != 2) {
|
|
|
|
+ if (password == null || password == '') {
|
|
Feng.info("请填写密码!");
|
|
Feng.info("请填写密码!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (rePassword==null || rePassword=='') {
|
|
|
|
|
|
+ if (rePassword == null || rePassword == '') {
|
|
Feng.info("请填写重复密码!");
|
|
Feng.info("请填写重复密码!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -430,7 +430,7 @@ Register.personUserRegister = function() {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (name==null || name=='') {
|
|
|
|
|
|
+ if (name == null || name == '') {
|
|
Feng.info("请填写姓名!");
|
|
Feng.info("请填写姓名!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -438,42 +438,42 @@ Register.personUserRegister = function() {
|
|
Feng.info("姓名最多20个字符!");
|
|
Feng.info("姓名最多20个字符!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (sex==null || sex=='') {
|
|
|
|
|
|
+ if (sex == null || sex == '') {
|
|
Feng.info("请选择性别!");
|
|
Feng.info("请选择性别!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (idCard==null || idCard=='') {
|
|
|
|
|
|
+ if (idCard == null || idCard == '') {
|
|
Feng.info("请填写身份证号!");
|
|
Feng.info("请填写身份证号!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (phone==null || phone=='') {
|
|
|
|
|
|
+ if (phone == null || phone == '') {
|
|
Feng.info("请填写手机号!");
|
|
Feng.info("请填写手机号!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (verificationCode==null || verificationCode=='') {
|
|
|
|
|
|
+ if (verificationCode == null || verificationCode == '') {
|
|
Feng.info("请填写手机验证码!")
|
|
Feng.info("请填写手机验证码!")
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!/0?(13|14|15|17|18|19)[0-9]{9}/.test(phone)){
|
|
|
|
|
|
+ if (!/0?(13|14|15|17|18|19)[0-9]{9}/.test(phone)) {
|
|
Feng.info("手机号格式不合法!");
|
|
Feng.info("手机号格式不合法!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- var da = {"source":source,"username":username, "password":password, "name":name, "sex":sex, "idCard":idCard, "phone":phone, "verificationCode":verificationCode};
|
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/api/personalUser/register", function(data){
|
|
|
|
|
|
+ var da = {"source": source, "username": username, "password": password, "name": name, "sex": sex, "idCard": idCard, "phone": phone, "verificationCode": verificationCode};
|
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/api/personalUser/register", function (data) {
|
|
Feng.info(data.msg);
|
|
Feng.info(data.msg);
|
|
if (data.code == 200) {
|
|
if (data.code == 200) {
|
|
parent.layer.close(window.parent.Login.layerIndex);
|
|
parent.layer.close(window.parent.Login.layerIndex);
|
|
}
|
|
}
|
|
- },function(data){
|
|
|
|
|
|
+ }, function (data) {
|
|
Feng.error("操作失败!" + data.responseJSON.message + "!");
|
|
Feng.error("操作失败!" + data.responseJSON.message + "!");
|
|
});
|
|
});
|
|
ajax.set(da);
|
|
ajax.set(da);
|
|
ajax.start();
|
|
ajax.start();
|
|
};
|
|
};
|
|
|
|
|
|
-Register.getEnterpriseSms = function() {
|
|
|
|
|
|
+Register.getEnterpriseSms = function () {
|
|
var agentPhone = $("#agentPhone").val();
|
|
var agentPhone = $("#agentPhone").val();
|
|
- if (agentPhone==null || agentPhone=="") {
|
|
|
|
|
|
+ if (agentPhone == null || agentPhone == "") {
|
|
Feng.info("请填写人才联络员手机号!");
|
|
Feng.info("请填写人才联络员手机号!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -485,16 +485,16 @@ Register.getEnterpriseSms = function() {
|
|
|
|
|
|
Register.enterpriseBtnCountDown();
|
|
Register.enterpriseBtnCountDown();
|
|
|
|
|
|
- var ajax = new $ax(Feng.ctxPath + "/common/auth/verificationCode?phone="+agentPhone+"&type=1", function(data){
|
|
|
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/common/auth/verificationCode?phone=" + agentPhone + "&type=1", function (data) {
|
|
Feng.info(data.msg);
|
|
Feng.info(data.msg);
|
|
- },function(data){
|
|
|
|
|
|
+ }, function (data) {
|
|
Feng.error("操作失败!" + data.responseJSON.message + "!");
|
|
Feng.error("操作失败!" + data.responseJSON.message + "!");
|
|
});
|
|
});
|
|
ajax.set(null);
|
|
ajax.set(null);
|
|
ajax.start();
|
|
ajax.start();
|
|
};
|
|
};
|
|
|
|
|
|
-Register.enterpriseBtnCountDown = function() {
|
|
|
|
|
|
+Register.enterpriseBtnCountDown = function () {
|
|
if (enterpriseCountDown == 0) {
|
|
if (enterpriseCountDown == 0) {
|
|
enterpriseCountDown = 60;
|
|
enterpriseCountDown = 60;
|
|
} else if (enterpriseCountDown == 1) {
|
|
} else if (enterpriseCountDown == 1) {
|
|
@@ -509,9 +509,9 @@ Register.enterpriseBtnCountDown = function() {
|
|
setTimeout("Register.enterpriseBtnCountDown()", 1000);
|
|
setTimeout("Register.enterpriseBtnCountDown()", 1000);
|
|
};
|
|
};
|
|
|
|
|
|
-Register.getPersionSms = function() {
|
|
|
|
|
|
+Register.getPersionSms = function () {
|
|
var phone = $("#ps_phone").val();
|
|
var phone = $("#ps_phone").val();
|
|
- if (phone==null || phone=="") {
|
|
|
|
|
|
+ if (phone == null || phone == "") {
|
|
Feng.info("请填写手机号!");
|
|
Feng.info("请填写手机号!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -521,16 +521,16 @@ Register.getPersionSms = function() {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
Register.getPersionBtnCountDown();
|
|
Register.getPersionBtnCountDown();
|
|
- var ajax = new $ax(Feng.ctxPath + "/common/auth/verificationCode?phone="+phone+"&type=1", function(data){
|
|
|
|
|
|
+ var ajax = new $ax(Feng.ctxPath + "/common/auth/verificationCode?phone=" + phone + "&type=1", function (data) {
|
|
Feng.info(data.msg);
|
|
Feng.info(data.msg);
|
|
- },function(data){
|
|
|
|
|
|
+ }, function (data) {
|
|
Feng.error("操作失败!" + data.responseJSON.message + "!");
|
|
Feng.error("操作失败!" + data.responseJSON.message + "!");
|
|
});
|
|
});
|
|
ajax.set(null);
|
|
ajax.set(null);
|
|
ajax.start();
|
|
ajax.start();
|
|
};
|
|
};
|
|
|
|
|
|
-Register.getPersionBtnCountDown = function() {
|
|
|
|
|
|
+Register.getPersionBtnCountDown = function () {
|
|
if (persionCountDown == 0) {
|
|
if (persionCountDown == 0) {
|
|
persionCountDown = 60;
|
|
persionCountDown = 60;
|
|
} else if (persionCountDown == 1) {
|
|
} else if (persionCountDown == 1) {
|
|
@@ -548,42 +548,42 @@ Register.getPersionBtnCountDown = function() {
|
|
/**
|
|
/**
|
|
* 企业用户注册回调
|
|
* 企业用户注册回调
|
|
*/
|
|
*/
|
|
-Register.epCallBack = function(data) {
|
|
|
|
|
|
+Register.epCallBack = function (data) {
|
|
lock = false;
|
|
lock = false;
|
|
var nowDis = $("#type").prop("disabled");
|
|
var nowDis = $("#type").prop("disabled");
|
|
- if(isDis!=nowDis){
|
|
|
|
- $("#type").attr("disabled","disabled");
|
|
|
|
|
|
+ if (isDis != nowDis) {
|
|
|
|
+ $("#type").attr("disabled", "disabled");
|
|
}
|
|
}
|
|
Feng.info(data.msg);
|
|
Feng.info(data.msg);
|
|
if (data.code == 200) {
|
|
if (data.code == 200) {
|
|
parent.layer.close(window.parent.Login.layerIndex);
|
|
parent.layer.close(window.parent.Login.layerIndex);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
-Register.typeChange = function(){
|
|
|
|
|
|
+Register.typeChange = function () {
|
|
$("#type").removeAttr("disabled");
|
|
$("#type").removeAttr("disabled");
|
|
var type = $("#type").val();
|
|
var type = $("#type").val();
|
|
- if(type==1){
|
|
|
|
- $("#typeGroup").attr("style","display:block");
|
|
|
|
- }else{
|
|
|
|
- $("#typeGroup").attr("style","display:none");
|
|
|
|
|
|
+ if (type == 1) {
|
|
|
|
+ $("#typeGroup").attr("style", "display:block");
|
|
|
|
+ } else {
|
|
|
|
+ $("#typeGroup").attr("style", "display:none");
|
|
$("#enterpriseTag,#industryFieldNew,#industryFieldOld").val("");
|
|
$("#enterpriseTag,#industryFieldNew,#industryFieldOld").val("");
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-Register.industryChange = function(){
|
|
|
|
|
|
+Register.industryChange = function () {
|
|
var industryNew = $("#industryFieldNew").val();
|
|
var industryNew = $("#industryFieldNew").val();
|
|
- var arr = [{"name":"industryFieldOld","code":industryNew+"_field"}];
|
|
|
|
|
|
+ var arr = [{"name": "industryFieldOld", "code": industryNew + "_field"}];
|
|
Feng.findChildDictBatch(JSON.stringify(arr));
|
|
Feng.findChildDictBatch(JSON.stringify(arr));
|
|
}
|
|
}
|
|
|
|
|
|
-$(function(){
|
|
|
|
|
|
+$(function () {
|
|
$('#ep_form').bootstrapValidator({
|
|
$('#ep_form').bootstrapValidator({
|
|
feedbackIcons: {
|
|
feedbackIcons: {
|
|
valid: 'glyphicon glyphicon-ok',
|
|
valid: 'glyphicon glyphicon-ok',
|
|
invalid: 'glyphicon glyphicon-remove',
|
|
invalid: 'glyphicon glyphicon-remove',
|
|
validating: 'glyphicon glyphicon-refresh'
|
|
validating: 'glyphicon glyphicon-refresh'
|
|
},
|
|
},
|
|
- group:'.rowGroup',
|
|
|
|
|
|
+ group: '.rowGroup',
|
|
fields: Register.validateFields,
|
|
fields: Register.validateFields,
|
|
live: 'enabled',
|
|
live: 'enabled',
|
|
message: '该字段不能为空'
|
|
message: '该字段不能为空'
|
|
@@ -594,34 +594,34 @@ $(function(){
|
|
var name = Feng.getUrlValue("name");
|
|
var name = Feng.getUrlValue("name");
|
|
var idCard = Feng.getUrlValue("idCard");
|
|
var idCard = Feng.getUrlValue("idCard");
|
|
var type = Feng.getUrlValue("type");
|
|
var type = Feng.getUrlValue("type");
|
|
- if(userType == 1){ //企业用户trigger
|
|
|
|
|
|
+ if (userType == 1) { //企业用户trigger
|
|
$("#source").val(2);
|
|
$("#source").val(2);
|
|
- $("#username").val(username).attr("readonly","readonly");
|
|
|
|
- $("#name").val(name).attr("readonly","readonly");
|
|
|
|
- $("#idCard").val(idCard).attr("readonly","readonly");
|
|
|
|
|
|
+ $("#username").val(username).attr("readonly", "readonly");
|
|
|
|
+ $("#name").val(name).attr("readonly", "readonly");
|
|
|
|
+ $("#idCard").val(idCard).attr("readonly", "readonly");
|
|
$("#type").val(type).trigger("change");
|
|
$("#type").val(type).trigger("change");
|
|
- $("#type").attr("disabled","disabled");
|
|
|
|
- $("#password").val("").attr("placeholder","密码为聚才网账号密码").attr("readonly","readonly");
|
|
|
|
- $("#re_password").val("").attr("placeholder","密码为聚才网账号密码").attr("readonly","readonly");
|
|
|
|
- $("#personTab").css("pointer-events","none");
|
|
|
|
- } else if(userType == 2){ //个人用户
|
|
|
|
- $("#personTab").css("pointer-events","block");
|
|
|
|
|
|
+ $("#type").attr("disabled", "disabled");
|
|
|
|
+ $("#password").val("").attr("placeholder", "密码为聚才网账号密码").attr("readonly", "readonly");
|
|
|
|
+ $("#re_password").val("").attr("placeholder", "密码为聚才网账号密码").attr("readonly", "readonly");
|
|
|
|
+ $("#personTab").css("pointer-events", "none");
|
|
|
|
+ } else if (userType == 2) { //个人用户
|
|
|
|
+ $("#personTab").css("pointer-events", "block");
|
|
$("#personTab").children().click();
|
|
$("#personTab").children().click();
|
|
$("#ps_source").val(2);
|
|
$("#ps_source").val(2);
|
|
- $("#ps_username").val(name).attr("readonly","readonly");
|
|
|
|
- $("#ps_idCard").val(idCard).attr("readonly","readonly");
|
|
|
|
- $("#ps_password").val("").attr("placeholder","密码为聚才网账号密码").attr("readonly","readonly");
|
|
|
|
- $("#ps_re_password").val("").attr("placeholder","密码为聚才网账号密码").attr("readonly","readonly");
|
|
|
|
- $("#enTab").css("pointer-events","none");
|
|
|
|
- } else{ //无
|
|
|
|
|
|
+ $("#ps_username").val(name).attr("readonly", "readonly");
|
|
|
|
+ $("#ps_idCard").val(idCard).attr("readonly", "readonly");
|
|
|
|
+ $("#ps_password").val("").attr("placeholder", "密码为聚才网账号密码").attr("readonly", "readonly");
|
|
|
|
+ $("#ps_re_password").val("").attr("placeholder", "密码为聚才网账号密码").attr("readonly", "readonly");
|
|
|
|
+ $("#enTab").css("pointer-events", "none");
|
|
|
|
+ } else { //无
|
|
|
|
|
|
}
|
|
}
|
|
var arr = [
|
|
var arr = [
|
|
- {"name":"street","code":"street"},
|
|
|
|
- {"name":"enterpriseTag","code":"enterprise_tag"},
|
|
|
|
- {"name":"industryFieldNew","code":"industry_field"},
|
|
|
|
- {"name":"enterpriseType","code":"enterprise_type"},
|
|
|
|
- {"name":"sy_street","code":"street"}];
|
|
|
|
|
|
+ {"name": "street", "code": "street"},
|
|
|
|
+ {"name": "enterpriseTag", "code": "enterprise_tag"},
|
|
|
|
+ {"name": "industryFieldNew", "code": "industry_field"},
|
|
|
|
+ {"name": "enterpriseType", "code": "enterprise_type"},
|
|
|
|
+ {"name": "sy_street", "code": "street"}];
|
|
Feng.findChildDictBatch(JSON.stringify(arr));
|
|
Feng.findChildDictBatch(JSON.stringify(arr));
|
|
$("#imgurl").change(function (e) {
|
|
$("#imgurl").change(function (e) {
|
|
var tag = e.target;
|
|
var tag = e.target;
|
|
@@ -629,13 +629,13 @@ $(function(){
|
|
var imgSrc;
|
|
var imgSrc;
|
|
var reader = new FileReader();
|
|
var reader = new FileReader();
|
|
reader.readAsDataURL(file);
|
|
reader.readAsDataURL(file);
|
|
- reader.onload = function() {
|
|
|
|
|
|
+ reader.onload = function () {
|
|
var src = $("#imgurl").val();
|
|
var src = $("#imgurl").val();
|
|
var sn = src.lastIndexOf(".");
|
|
var sn = src.lastIndexOf(".");
|
|
- var suffix = src.substring(sn+1,src.length);
|
|
|
|
- if(suffix == 'pdf' || suffix == 'PDF'){
|
|
|
|
|
|
+ var suffix = src.substring(sn + 1, src.length);
|
|
|
|
+ if (suffix == 'pdf' || suffix == 'PDF') {
|
|
$("#photoImg").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
$("#photoImg").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
imgSrc = this.result;
|
|
imgSrc = this.result;
|
|
$("#photoImg").attr("src", imgSrc);
|
|
$("#photoImg").attr("src", imgSrc);
|
|
}
|
|
}
|
|
@@ -647,13 +647,13 @@ $(function(){
|
|
var imgSrc;
|
|
var imgSrc;
|
|
var reader = new FileReader();
|
|
var reader = new FileReader();
|
|
reader.readAsDataURL(file);
|
|
reader.readAsDataURL(file);
|
|
- reader.onload = function() {
|
|
|
|
|
|
+ reader.onload = function () {
|
|
var src = $("#sy_imgurl").val();
|
|
var src = $("#sy_imgurl").val();
|
|
var sn = src.lastIndexOf(".");
|
|
var sn = src.lastIndexOf(".");
|
|
- var suffix = src.substring(sn+1,src.length);
|
|
|
|
- if(suffix == 'pdf' || suffix == 'PDF'){
|
|
|
|
|
|
+ var suffix = src.substring(sn + 1, src.length);
|
|
|
|
+ if (suffix == 'pdf' || suffix == 'PDF') {
|
|
$("#sy_photoImg").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
$("#sy_photoImg").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
imgSrc = this.result;
|
|
imgSrc = this.result;
|
|
$("#sy_photoImg").attr("src", imgSrc);
|
|
$("#sy_photoImg").attr("src", imgSrc);
|
|
}
|
|
}
|
|
@@ -665,13 +665,13 @@ $(function(){
|
|
var imgSrc;
|
|
var imgSrc;
|
|
var reader = new FileReader();
|
|
var reader = new FileReader();
|
|
reader.readAsDataURL(file);
|
|
reader.readAsDataURL(file);
|
|
- reader.onload = function() {
|
|
|
|
|
|
+ reader.onload = function () {
|
|
var src = $("#bankImg").val();
|
|
var src = $("#bankImg").val();
|
|
var sn = src.lastIndexOf(".");
|
|
var sn = src.lastIndexOf(".");
|
|
- var suffix = src.substring(sn+1,src.length);
|
|
|
|
- if(suffix == 'pdf' || suffix == 'PDF'){
|
|
|
|
|
|
+ var suffix = src.substring(sn + 1, src.length);
|
|
|
|
+ if (suffix == 'pdf' || suffix == 'PDF') {
|
|
$("#photoImg1").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
$("#photoImg1").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
imgSrc = this.result;
|
|
imgSrc = this.result;
|
|
$("#photoImg1").attr("src", imgSrc);
|
|
$("#photoImg1").attr("src", imgSrc);
|
|
}
|
|
}
|
|
@@ -683,13 +683,13 @@ $(function(){
|
|
var imgSrc;
|
|
var imgSrc;
|
|
var reader = new FileReader();
|
|
var reader = new FileReader();
|
|
reader.readAsDataURL(file);
|
|
reader.readAsDataURL(file);
|
|
- reader.onload = function() {
|
|
|
|
|
|
+ reader.onload = function () {
|
|
var src = $("#domainImg").val();
|
|
var src = $("#domainImg").val();
|
|
var sn = src.lastIndexOf(".");
|
|
var sn = src.lastIndexOf(".");
|
|
- var suffix = src.substring(sn+1,src.length);
|
|
|
|
- if(suffix == 'pdf' || suffix == 'PDF'){
|
|
|
|
|
|
+ var suffix = src.substring(sn + 1, src.length);
|
|
|
|
+ if (suffix == 'pdf' || suffix == 'PDF') {
|
|
$("#photoImg2").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
$("#photoImg2").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
imgSrc = this.result;
|
|
imgSrc = this.result;
|
|
$("#photoImg2").attr("src", imgSrc);
|
|
$("#photoImg2").attr("src", imgSrc);
|
|
}
|
|
}
|
|
@@ -702,15 +702,15 @@ $(function(){
|
|
var imgSrc;
|
|
var imgSrc;
|
|
var reader = new FileReader();
|
|
var reader = new FileReader();
|
|
reader.readAsDataURL(file);
|
|
reader.readAsDataURL(file);
|
|
- reader.onload = function() {
|
|
|
|
|
|
+ reader.onload = function () {
|
|
var src = $("#beian").val();
|
|
var src = $("#beian").val();
|
|
var sn = src.lastIndexOf(".");
|
|
var sn = src.lastIndexOf(".");
|
|
- var suffix = src.substring(sn+1,src.length);
|
|
|
|
- if(suffix == 'pdf' || suffix == 'PDF'){
|
|
|
|
|
|
+ var suffix = src.substring(sn + 1, src.length);
|
|
|
|
+ if (suffix == 'pdf' || suffix == 'PDF') {
|
|
$("#photoImg3").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
$("#photoImg3").attr("src", Feng.ctxPath + "/static/img/Pdf.png");
|
|
- }else if(suffix == 'doc' || suffix == 'docx'){
|
|
|
|
|
|
+ } else if (suffix == 'doc' || suffix == 'docx') {
|
|
$("#photoImg3").attr("src", Feng.ctxPath + "/static/img/word.jpg");
|
|
$("#photoImg3").attr("src", Feng.ctxPath + "/static/img/word.jpg");
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
imgSrc = this.result;
|
|
imgSrc = this.result;
|
|
$("#photoImg3").attr("src", imgSrc);
|
|
$("#photoImg3").attr("src", imgSrc);
|
|
}
|
|
}
|