You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4729 lines
186 KiB
4729 lines
186 KiB
/*
|
|
我的认证
|
|
*/
|
|
|
|
// 全局变量
|
|
let tagsName = "公共文化机构"; //保存标签名称
|
|
let tagsName01 = "法人";
|
|
let organStatus = null; //机构认证状态
|
|
let peralStatusMess = null;
|
|
let proviceName = "法人";
|
|
// let tagsProvice = ["评估机构"]; //服务商模态名称
|
|
let tagsProvice = ["法务"]; //服务商模态名称
|
|
let accountId = cookieHandler.get("accountId");
|
|
let industryArray = [];
|
|
let userTypes = "机构";
|
|
//推荐中介服务机构
|
|
let paystatu = ""; //判断是否缴费
|
|
let IntermediaryIs = "";
|
|
let Postlist = "0"; //判断是不是白名单 根据新需求默认为0
|
|
let Intermediary = []; //存推荐中介服务机构数据
|
|
let isposttion = null; //判断是否在白名单里
|
|
let userNewtype = ""; //判断点击认证类型是机构,还是个人
|
|
let Identity = "";
|
|
let userNewList = []; //获取身份,认证费用接口
|
|
let OrganIndividuals = []; //判断是机构还是个人,存入相对应的身份
|
|
let OrganizationsMony = []; //存入认证费用,买家,卖家,中精服务机构
|
|
let failureIdentity = []; //认证失败存入身份
|
|
//保存协议
|
|
let agreement = {
|
|
agreementIds: "4,5,6",
|
|
userId: accountId
|
|
}
|
|
|
|
|
|
// 初始化表单验证
|
|
$(function () {
|
|
Array.prototype.myForEach = function myForEach(callback, context) {
|
|
context = context || window;
|
|
if (Array.prototype.forEach) {
|
|
// 调用forEach方法,不做任何处理
|
|
this.forEach(callback, context);
|
|
return;
|
|
}
|
|
};
|
|
if (cookieHandler.get("userType") === "0" || cookieHandler.get("isliCode") == "undefined" || cookieHandler
|
|
.get("isliCode") == undefined || cookieHandler.get("isliCode") == "") {
|
|
$(".tabs_item").hide();
|
|
}
|
|
// 页面权限控制
|
|
if (!cookieHandler.get("normal_login_token")) {
|
|
Dreamer.error("请先登录");
|
|
setTimeout(function () {
|
|
window.location.href = "login.html?time=" + new Date().getTime();
|
|
}, 1000);
|
|
}
|
|
industryType();
|
|
formValidate(); //机构认证校验
|
|
formPeralValidate(); //个人中心认证校验
|
|
// formProviceValidate(); //服务商认证校验
|
|
btnStatus();
|
|
//peralBtnMess(); //个人中心按钮状态
|
|
//selectOragn();
|
|
// 动态赋值option
|
|
setOptions();
|
|
//机构认证中
|
|
institutions();
|
|
personal();
|
|
new_date();
|
|
listProviders();
|
|
listSelectCert();
|
|
});
|
|
|
|
//推荐中介服务机构列表
|
|
function listProviders() {
|
|
var ajaxlistProviders = new AJAX_OBJ(Paymentlist + "certiaudit/certificationIntermediaryLists", onlistProviders,
|
|
onUrlError);
|
|
ajaxlistProviders.getRequestData();
|
|
}
|
|
|
|
function onlistProviders(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode == "00000000") {
|
|
Intermediary = [];
|
|
Intermediary = res.data;
|
|
let html = "";
|
|
res.data.unshift({
|
|
islicode: "",
|
|
name: "选择推荐中介服务机构",
|
|
});
|
|
res.data.myForEach(function (v, index, arr) {
|
|
html += '<option value="' + v.islicode + '">' + v.name + "</option>";
|
|
});
|
|
$("#serviceChanism").html(html); //机构
|
|
$("#servicePersonal").html(html); //个人
|
|
$("#serviceProvider").html(html); //服务商
|
|
}
|
|
}
|
|
|
|
|
|
//获取身份,认证费用
|
|
function listSelectCert() {
|
|
var ajaxSelectCertification = new AJAX_OBJ(Paymentlist + "CertificationFeeSetting/selectCertificationFees",
|
|
onSelectCertification, onUrlError);
|
|
ajaxSelectCertification.getRequestData();
|
|
}
|
|
|
|
function onSelectCertification(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode == "00000000") {
|
|
userNewList = res.data;
|
|
}
|
|
}
|
|
|
|
|
|
//限制机构成立日期,营业执照有效期时间
|
|
function new_date() {
|
|
var date_now = new Date();
|
|
//得到当前年份
|
|
var year = date_now.getFullYear();
|
|
//得到当前月份
|
|
//注:
|
|
// 1:js中获取Date中的month时,会比当前月份少一个月,所以这里需要先加一
|
|
// 2: 判断当前月份是否小于10,如果小于,那么就在月份的前面加一个 '0' , 如果大于,就显示当前月份
|
|
var month = date_now.getMonth() + 1 < 10 ? "0" + (date_now.getMonth() + 1) : date_now.getMonth() + 1;
|
|
//得到当前日子(多少号)
|
|
var date = date_now.getDate() < 10 ? "0" + date_now.getDate() : date_now.getDate();
|
|
//设置input标签的max属性
|
|
//机构
|
|
$("#establishDate").attr("max", year + "-" + month + "-" + date);
|
|
$("#licenseDate").attr("min", year + "-" + month + "-" + date);
|
|
$("#licenseDate").attr("max", 2999 + "-" + 12 + "-" + 31);
|
|
//服务商
|
|
$("#proviceTime").attr("max", year + "-" + month + "-" + date);
|
|
$("#proviceTackTime").attr("min", year + "-" + month + "-" + date);
|
|
$("#proviceTackTime").attr("max", 2999 + "-" + 12 + "-" + 31);
|
|
}
|
|
|
|
//获取行业类别数据
|
|
function industryType() {
|
|
var ajaxDemo = new AJAX_OBJ(api + "userself/v1/industry/0", onIndustryTypeSuccess, onUrlError);
|
|
ajaxDemo.getRequestData();
|
|
}
|
|
|
|
function onIndustryTypeSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.data != undefined) {
|
|
industryArray = res.data;
|
|
var html = "";
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
if (i == 0) {
|
|
html = "<option>选择行业类别</option>";
|
|
} else {
|
|
html += '<option value="' + res.data[i].industryId + '">' + res.data[i].name + "</option>";
|
|
}
|
|
}
|
|
$("#control01").html(html);
|
|
$("#industryType").html(html);
|
|
}
|
|
}
|
|
|
|
// 机构立即认证模态框
|
|
function handelOrganization() {
|
|
delLocalStorage();
|
|
$(".hand_title").text("机构认证");
|
|
if (organStatus == "-1") {
|
|
handelClickTags();
|
|
$("#myModal").modal("show");
|
|
} else if (isposttion == 1) {
|
|
MechanismButStatus();
|
|
} else {
|
|
if (paystatu == 2) {
|
|
//待缴费
|
|
window.location.href = "PaymentOrder.html?time=" + new Date().getTime(); //进入认证缴费支付页面
|
|
} else if (paystatu == 1) {
|
|
//已缴费
|
|
MechanismButStatus();
|
|
// if (organStatus == "2" || organStatus == "4" || organStatus == "5") {
|
|
// if (userTypes == "企业") {
|
|
// /*认证失败*/
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#organHand').css('display', 'block');
|
|
// $('#hand_box').css('display', 'block');
|
|
// failureEdit();
|
|
// } else {
|
|
// handelClickTags();
|
|
// $('#myModal').modal('show');
|
|
// }
|
|
// } else if (organStatus == "1" || organStatus == "3" || organStatus == "7" || organStatus == "0") {
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#organing').css('display', 'block');
|
|
// $('#organSucces').css('display', 'none');
|
|
// $('#hand_box').css('display', 'block');
|
|
// institutions();
|
|
// } else {
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#organing').css('display', 'none');
|
|
// $('#organSucces').css('display', 'block');
|
|
// $('#hand_box').css('display', 'block');
|
|
// institutions();
|
|
// }
|
|
}
|
|
}
|
|
}
|
|
|
|
function MechanismButStatus() {
|
|
//机构按钮状态
|
|
if (organStatus == "2" || organStatus == "4" || organStatus == "5") {
|
|
if (userTypes == "企业" || userTypes == "服务商") {
|
|
/*认证失败*/
|
|
$("#cetifiTotal").css("display", "none");
|
|
$("#organHand").css("display", "block");
|
|
$("#hand_box").css("display", "block");
|
|
failureEdit();
|
|
} else {
|
|
handelClickTags();
|
|
$("#myModal").modal("show");
|
|
}
|
|
|
|
} else if (organStatus == "1" || organStatus == "3" || organStatus == "7" || organStatus == "0") {
|
|
$("#cetifiTotal").css("display", "none");
|
|
$("#organing").css("display", "block");
|
|
$("#organSucces").css("display", "none");
|
|
$("#hand_box").css("display", "block");
|
|
institutions();
|
|
} else {
|
|
$("#cetifiTotal").css("display", "none");
|
|
$("#organing").css("display", "none");
|
|
$("#organSucces").css("display", "block");
|
|
$("#hand_box").css("display", "block");
|
|
institutions();
|
|
}
|
|
}
|
|
|
|
|
|
// 机构认证失败详情接口
|
|
function failureEdit() {
|
|
var ajaxEditDemo = new AJAX_OBJ(Paymentlist + "entuiprise/listLibrary?AuId=" + accountId, onEditSuccess,
|
|
onUrlError);
|
|
ajaxEditDemo.postRequestData();
|
|
}
|
|
|
|
function onEditSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.data != undefined) {
|
|
if (res.data.identity == "经办人") {
|
|
$("#operator01").css("display", "block");
|
|
$("#operator02").css("display", "block");
|
|
$("#operator03").css("display", "block");
|
|
$("#operator04").css("display", "block");
|
|
$("#tags02").html(
|
|
"<div>选择身份</div>" +
|
|
"<div class='current02false'>法人</div>" +
|
|
"<div class='current02'>经办人</div>"
|
|
);
|
|
$("#managerName").val(res.data.managername);
|
|
$("#managerIdnum").val(res.data.manageridnum);
|
|
} else {
|
|
$("#operator01").css("display", "none");
|
|
$("#operator02").css("display", "none");
|
|
$("#operator03").css("display", "none");
|
|
$("#operator04").css("display", "none");
|
|
$("#tags02").html(
|
|
"<div>选择身份</div>" +
|
|
"<div class='current02'>法人</div>" +
|
|
"<div class='current02false'>经办人</div>"
|
|
);
|
|
}
|
|
tagsName = res.data.type;
|
|
$(".areas").append("<p id='area' style='display: none;'></p>");
|
|
$("#name").val(res.data.name);
|
|
$("#industryType").val(res.data.industrytype);
|
|
$("#institutions01").val(res.data.regionprovince);
|
|
showGetCity(res.data.regionprovince, "institutions02", res.data.regioncity);
|
|
showGetCountry(res.data.regioncity, "institutions01", "institutions03", res.data.regiondistrict);
|
|
$("#address").val(res.data.address);
|
|
$("#establishDate").val(res.data.establishdate);
|
|
$("#area").html(res.data.desc);
|
|
$("#desc").val($("#area").text());
|
|
$("#numtj_em").text($("#area").text().length); //获取机构简介字符
|
|
$("#legalsName").val(res.data.legalsname);
|
|
$("#legalsType").val(res.data.legalstype);
|
|
$("#legalsIdnum").val(res.data.legalsidnum);
|
|
$("#uscc").val(res.data.uscc);
|
|
$("#licenseDate").val(res.data.licensedate);
|
|
$("#legalsCellPhone").val(res.data.legalscellphone);
|
|
$("#publicAccount").val(res.data.publicaccount);
|
|
$("#bankAccountName").val(res.data.bankaccountname);
|
|
if (res.data.bankcardtype == "借记卡") {
|
|
document.getElementById("jjk").checked = true;
|
|
} else {
|
|
document.getElementById("dwjs").checked = true;
|
|
}
|
|
$("#bankName").val(res.data.bankname);
|
|
$("#bankType").val(res.data.banktype);
|
|
$("#bankProvince").val(res.data.bankprovince);
|
|
showGetCity(res.data.bankprovince, "bankCity", res.data.bankcity);
|
|
showGetCountry(res.data.bankcity, "bankProvince", "bankDistrict", res.data.bankdistrict);
|
|
$("#certIdnum").val(res.data.certidnum);
|
|
$("#bankCellPhone").val(res.data.bankcellphone);
|
|
for (var i = 0; i < Intermediary.length; i++) {
|
|
if (res.data.parentislicode == Intermediary[i].name) {
|
|
$("#serviceChanism").val(Intermediary[i].islicode);
|
|
break;
|
|
}
|
|
} //推荐中介服务机构
|
|
// ParentisliCode(res.data.parentislicode, "serviceChanism"); //推荐中介服务机构
|
|
handelClickTags02();
|
|
handelHandTags();
|
|
failureIdentity = res.data.saleType.split(",");
|
|
for (var i = 0; i < OrganIndividuals.length; i++) {
|
|
for (var j = 0; j < failureIdentity.length; j++) {
|
|
if (OrganIndividuals[i].saleType == failureIdentity[j]) {
|
|
OrganizationsMony.push({
|
|
saleType: failureIdentity[j],
|
|
fee: OrganIndividuals[i].fee
|
|
});
|
|
}
|
|
}
|
|
}
|
|
// serviceAgency(res.data.name);//获取认证失败的机构是否在白名单
|
|
seeCheckBox(res.data.saleType, "person", res.data.type);
|
|
$("#certification").text("¥" + res.data.fees);
|
|
Dreamer.error("认证失败,请重新填写认证信息!");
|
|
}
|
|
}
|
|
|
|
//复选框数据回显
|
|
function seeCheckBox(obj, person, type) {
|
|
let boxObj = $("input:checkbox[name='" + person + "']"); //获取所有的复选框值
|
|
let express = obj.split(',');
|
|
for (var i = 0; i < express.length; i++) {
|
|
if (express[i] == "中介服务机构") {
|
|
$("#box05").css('display', 'block');
|
|
tagsProvice = type.split(','); //将认证失败详情数据中的类型转化成数组
|
|
}
|
|
}
|
|
if (tagsProvice.length != 0) {
|
|
let box = document.getElementById("box05"); //获取中介服务机构联想
|
|
let tags = box.children[0].children;
|
|
for (var i = 0; i < tagsProvice.length; i++) {
|
|
for (var j = 0; j < tags.length; j++) {
|
|
if (tagsProvice[i] == tags[j].innerHTML) {
|
|
tags[j].className = "current01";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$.each(express, function (index, expressId) {
|
|
boxObj.each(function () {
|
|
if ($(this).val() == expressId) {
|
|
$(this).attr("checked", true);
|
|
$(this).attr("disabled", true);
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
//推荐中介服务机构认证失败数据回显
|
|
function ParentisliCode(results, agencies) {
|
|
for (var i = 0; i < Intermediary.length; i++) {
|
|
if (results == Intermediary[i].name) {
|
|
let html = ""
|
|
html = '<option value="' + Intermediary[i].islicode + '">' + Intermediary[i].name + "</option>";
|
|
$("#" + agencies).html(html);
|
|
// $("#" + agencies).attr("disabled", true);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
function showGetCity(results, city, regionCity) {
|
|
$.ajax({
|
|
url: "../json/city.json",
|
|
type: "get", //请求方式
|
|
dataType: "json",
|
|
success: function (res) {
|
|
for (var i = 0; i < res.provice.length; i++) {
|
|
if (results == res.provice[i].name) {
|
|
for (var j = 0; j < res.provice[i].city.length; j++) {
|
|
$("#" + city).append(
|
|
"<option value='" +
|
|
res.provice[i].city[j].name +
|
|
"'> " +
|
|
res.provice[i].city[j].name +
|
|
"</option>"
|
|
);
|
|
}
|
|
$("#" + city).val(regionCity);
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
});
|
|
}
|
|
|
|
function showGetCountry(results, ProvinceId, District, regionDistrict) {
|
|
var Province = document.getElementById(ProvinceId).value;
|
|
$.ajax({
|
|
url: "../json/city.json",
|
|
type: "get", //请求方式
|
|
dataType: "json",
|
|
success: function (res) {
|
|
for (var i = 0; i < res.provice.length; i++) {
|
|
if (Province == res.provice[i].name) {
|
|
for (var j = 0; j < res.provice[i].city.length; j++) {
|
|
if (results == res.provice[i].city[j].name) {
|
|
for (var z = 0; z < res.provice[i].city[j].districtAndCounty.length; z++) {
|
|
$("#" + District).append(
|
|
"<option value='" + res.provice[i].city[j].districtAndCounty[z] +
|
|
"'> " + res.provice[i].city[j].districtAndCounty[z] + "</option>"
|
|
);
|
|
}
|
|
}
|
|
}
|
|
$("#" + District).val(regionDistrict);
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
});
|
|
}
|
|
|
|
// 机构立即认证
|
|
function handelOrganSure() {
|
|
$("#cetifiTotal").css("display", "none");
|
|
$("#myModal").modal("hide");
|
|
$("#hand_box").css("display", "block");
|
|
var ajaxSureDemo = new AJAX_OBJ(Paymentlist + "entuiprise/listLibrary?AuId=" + accountId, onSureSuccess,
|
|
onUrlError);
|
|
ajaxSureDemo.postRequestData();
|
|
}
|
|
|
|
function onSureSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode == "99999999" || res.resultCode == "00000000") {
|
|
$("#Organization_code").css("display", "block");
|
|
}
|
|
}
|
|
|
|
// 图片上传
|
|
function uploadImage(file, img) {
|
|
let demoFile = document.getElementById(file.id).files[0];
|
|
//限制上传图片大小600K
|
|
// let MINSIZE = 100 * 1024;
|
|
// let MAXSIZE = 600 * 1024;
|
|
// if(demoFile.size > MAXSIZE || demoFile.size < MINSIZE){
|
|
// $("#" + file.id).val("");
|
|
// Dreamer.warning("文件大小范围是100k-600K",2000);
|
|
// }else{
|
|
let demoData = new FormData();
|
|
demoData.append("file", demoFile);
|
|
$.ajax({
|
|
type: "POST", //请求方式
|
|
// url: api + "userself/v1/user/cer-scan", //地址,就是json文件的请求路径
|
|
url: Paymentlist + "entuiprise/v1/user/cer-scan", //地址,就是json文件的请求路径
|
|
data: demoData,
|
|
processData: false,
|
|
contentType: false,
|
|
async: false,
|
|
success: function (res) {
|
|
//返回的参数就是 action里面所有的有get和set方法的参数
|
|
demoFile.httpurl = res.data;
|
|
Dreamer.success("上传成功", 2000);
|
|
},
|
|
});
|
|
// }
|
|
}
|
|
|
|
//机构,服务商上传门头照
|
|
function uploadImages(file, img) {
|
|
let demoFile = document.getElementById(file.id).files[0];
|
|
if (!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(demoFile.name)) {
|
|
Dreamer.warning("须上传图片类型!", 2000);
|
|
document.getElementById("doorHeadPhoto").value = "";
|
|
document.getElementById("doorHeadPhoto1").value = "";
|
|
} else {
|
|
let demoData = new FormData();
|
|
demoData.append("file", demoFile);
|
|
$.ajax({
|
|
type: "POST", //请求方式
|
|
// url: api + "userself/v1/user/cer-scan", //地址,就是json文件的请求路径
|
|
url: Paymentlist + "entuiprise/v1/user/cer-scan", //地址,就是json文件的请求路径
|
|
data: demoData,
|
|
processData: false,
|
|
contentType: false,
|
|
async: false,
|
|
success: function (res) {
|
|
//返回的参数就是 action里面所有的有get和set方法的参数
|
|
demoFile.httpurl = res.data;
|
|
Dreamer.success("上传成功", 2000);
|
|
},
|
|
});
|
|
}
|
|
}
|
|
|
|
//营业执照/事业单位法人证书扫描件 格式为JPG、JPEG、PNG、PDF,大小不超过10MB
|
|
function uploadlicense(file, img) {
|
|
let demoFile = document.getElementById(file.id).files[0];
|
|
//限制上传图片大小10MB
|
|
let MAXSIZE = 10 * 1024 * 1024;
|
|
if (demoFile.size > MAXSIZE) {
|
|
$("#" + file.id).val("");
|
|
Dreamer.warning("文件大小不超过10MB", 2000);
|
|
} else {
|
|
let demoData = new FormData();
|
|
demoData.append("file", demoFile);
|
|
$.ajax({
|
|
type: "POST", //请求方式
|
|
url: Paymentlist + "entuiprise/v1/user/cer-scan", //地址,就是json文件的请求路径
|
|
data: demoData,
|
|
processData: false,
|
|
contentType: false,
|
|
async: false,
|
|
success: function (res) {
|
|
//返回的参数就是 action里面所有的有get和set方法的参数
|
|
demoFile.httpurl = res.data;
|
|
Dreamer.success("上传成功", 2000);
|
|
},
|
|
});
|
|
}
|
|
}
|
|
|
|
//检验统一社会信用代码
|
|
function CheckSocialCreditCode(Code) {
|
|
var patrn = /^[0-9A-Z]+$/;
|
|
//18位校验及大写校验
|
|
if (Code.length != 18 || patrn.test(Code) == false) {
|
|
return false;
|
|
} else {
|
|
var Ancode; //统一社会信用代码的每一个值
|
|
var Ancodevalue; //统一社会信用代码每一个值的权重
|
|
var total = 0;
|
|
var weightedfactors = [
|
|
1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28,
|
|
]; //加权因子
|
|
var str = "0123456789ABCDEFGHJKLMNPQRTUWXY";
|
|
//不用I、O、S、V、Z
|
|
for (var i = 0; i < Code.length - 1; i++) {
|
|
Ancode = Code.substring(i, i + 1);
|
|
Ancodevalue = str.indexOf(Ancode);
|
|
total = total + Ancodevalue * weightedfactors[i];
|
|
//权重与加权因子相乘之和
|
|
}
|
|
var logiccheckcode = 31 - (total % 31);
|
|
if (logiccheckcode == 31) {
|
|
logiccheckcode = 0;
|
|
}
|
|
var Str = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,T,U,W,X,Y";
|
|
var Array_Str = Str.split(",");
|
|
logiccheckcode = Array_Str[logiccheckcode];
|
|
|
|
var checkcode = Code.substring(17, 18);
|
|
if (logiccheckcode != checkcode) {
|
|
return false;
|
|
} else {
|
|
console.info("yes");
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
|
|
// 下一步
|
|
$("#abc").click(function () {
|
|
let ioncodeVal = $("#Organizationcode").val();
|
|
if (ioncodeVal) {
|
|
$("#validateOrgan").css("display", "none");
|
|
if (CheckSocialCreditCode(ioncodeVal)) {
|
|
$("#validateOrgan1").css("display", "none");
|
|
//统一社会信用代码是否有为关联的认证数据
|
|
var ajaxxiaoDemo = new AJAX_OBJ(Paymentlist + "entuiprise/v1/enterprise-user/uscc?uscc=" + $(
|
|
"#Organizationcode").val(), onXiaoSuccess, onUrlError);
|
|
ajaxxiaoDemo.getRequestData();
|
|
} else {
|
|
$("#validateOrgan1").css("display", "block");
|
|
}
|
|
} else {
|
|
$("#validateOrgan").css("display", "block");
|
|
}
|
|
});
|
|
|
|
function onXiaoSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
// 0-没数据 1-有数据
|
|
if (res.data == 0) {
|
|
$("#Organization_code").css("display", "none");
|
|
$("#organHand").css("display", "block");
|
|
handelHandTags();
|
|
$("#Organizationcode").val("");
|
|
} else {
|
|
$("#myModal03").modal("show");
|
|
}
|
|
}
|
|
|
|
// 确定使用
|
|
function handelUseList() {
|
|
var ajaxUseListDemo = new AJAX_OBJ(Paymentlist + "entuiprise/v1/Related-Information?accountId=" + accountId +
|
|
"&uscc=" + $("#Organizationcode").val(), onUseListSuccess, onUrlError);
|
|
ajaxUseListDemo.postRequestData();
|
|
}
|
|
|
|
function onUseListSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode === "00000000") {
|
|
$("#myModal03").modal("hide");
|
|
$("#Organization_code").css("display", "none");
|
|
$("#organSucces").css("display", "block");
|
|
$(".table_right", {
|
|
transition: true,
|
|
time: 200,
|
|
});
|
|
// 赋值
|
|
$(".institutionstime1").text(dateTime(res.data.createat));
|
|
$(".details_license_date").text(res.data.licensedate);
|
|
$(".details_address").text(res.data.address);
|
|
$(".details_name").text(res.data.name);
|
|
$(".details_uscc").text(res.data.uscc);
|
|
$(".details_region").text(res.data.regionprovince + "-" + res.data.regioncity + "-" + res.data.regiondistrict);
|
|
$(".details_establish_date").text(res.data.establishdate);
|
|
$(".details_desc").text(res.data.desc);
|
|
$(".details_legals_name").text(res.data.legalsname);
|
|
$(".details_legals_type").text("身份证");
|
|
$(".details_legals_idnum").text(res.data.legalsidnum);
|
|
$(".details_legals_idnum").text(res.data.legalsidnum);
|
|
$(".details_legals_cell_phone").text(res.data.legalscellphone);
|
|
$(".details_public_account").text(res.data.publicaccount);
|
|
$(".details_bank_account_name").text(res.data.bankaccountname);
|
|
$(".details_bank_card_type").text(res.data.bankcardtype);
|
|
$(".details_bank_name").text(res.data.bankname);
|
|
$(".details_bank_type").text(res.data.banktype);
|
|
$(".details_bank_address").text(
|
|
res.data.bankprovince + "-" + res.data.bankcity + "-" + res.data.bankdistrict
|
|
);
|
|
$(".details_bank_cell_phone").text(res.data.bankcellphone);
|
|
$(".details_cert_idnum").text(res.data.certidnum);
|
|
industryArray.myForEach(function (v, index, arr) {
|
|
if (v.industryId == res.data.industrytype) {
|
|
$(".details_industry_type").text(v.name);
|
|
}
|
|
});
|
|
$(".details_parent_islicode").text(res.data.parentislicode);
|
|
$(".details_parent_identity").text(res.data.saleType);
|
|
// PaymentStatus();
|
|
} else {
|
|
Dreamer.error(res.resultMsg);
|
|
}
|
|
}
|
|
|
|
// 不使用
|
|
function handelNoUseList() {
|
|
$("#Organization_code").css("display", "none");
|
|
$("#organHand").css("display", "block");
|
|
handelHandTags();
|
|
$("#myModal03").modal("hide");
|
|
$("#Organizationcode").val("");
|
|
}
|
|
|
|
// 机构认证中 (完成)
|
|
function institutions() {
|
|
var ajaxinstitutDemo = new AJAX_OBJ(Paymentlist + "entuiprise/listLibrary?AuId=" + accountId, oninstitutSuccess,
|
|
onUrlError);
|
|
ajaxinstitutDemo.postRequestData();
|
|
}
|
|
|
|
function oninstitutSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.data != undefined) {
|
|
$(".institutionstime1").text(dateTime(res.data.createat));
|
|
$(".institutionstime1").attr("title", dateTime(res.data.createat));
|
|
$(".details_license_date").text(res.data.licensedate);
|
|
$(".details_license_date").attr("title", res.data.licensedate);
|
|
$(".details_address").text(res.data.address);
|
|
$(".details_address").attr("title", res.data.address);
|
|
$(".details_name").text(res.data.name);
|
|
$(".details_name").attr("title", res.data.name);
|
|
$(".details_uscc").text(res.data.uscc);
|
|
$(".details_uscc").attr("title", res.data.uscc);
|
|
$(".details_islicode").text(res.data.islicode);
|
|
$(".details_islicode").attr("title", res.data.islicode);
|
|
$(".details_type").text(res.data.type);
|
|
$(".details_type").attr("title", res.data.type);
|
|
$(".details_region").text(res.data.regionprovince + "-" + res.data.regioncity + "-" + res.data.regiondistrict);
|
|
$(".details_region").attr("title", res.data.regionprovince + "-" + res.data.regioncity + "-" + res.data
|
|
.regiondistrict);
|
|
$(".details_establish_date").text(res.data.establishdate);
|
|
$(".details_establish_date").attr("title", res.data.establishdate);
|
|
$(".details_desc").text(res.data.desc);
|
|
$(".details_desc").attr("title", res.data.desc);
|
|
$(".details_legals_name").text(res.data.legalsname);
|
|
$(".details_legals_name").attr("title", res.data.legalsname);
|
|
$(".details_legals_type").text("身份证");
|
|
$(".details_legals_type").attr("title", "身份证");
|
|
$(".details_legals_idnum").text(res.data.legalsidnum);
|
|
$(".details_legals_idnum").attr("title", res.data.legalsidnum);
|
|
$(".details_legals_cell_phone").text(res.data.legalscellphone);
|
|
$(".details_legals_cell_phone").attr("title", res.data.legalscellphone);
|
|
$(".details_public_account").text(res.data.publicaccount);
|
|
$(".details_public_account").attr("title", res.data.publicaccount);
|
|
$(".details_bank_account_name").text(res.data.bankaccountname);
|
|
$(".details_bank_account_name").attr("title", res.data.bankaccountname);
|
|
$(".details_bank_card_type").text(res.data.bankcardtype);
|
|
$(".details_bank_card_type").attr("title", res.data.bankcardtype);
|
|
$(".details_bank_name").text(res.data.bankname);
|
|
$(".details_bank_name").attr("title", res.data.bankname);
|
|
$(".details_bank_type").text(res.data.banktype);
|
|
$(".details_bank_type").attr("title", res.data.banktype);
|
|
$(".details_bank_address").text(res.data.bankprovince + "-" + res.data.bankcity + "-" + res.data.bankdistrict);
|
|
$(".details_bank_address").attr("title", res.data.bankprovince + "-" + res.data.bankcity + "-" + res.data
|
|
.bankdistrict);
|
|
$(".details_bank_cell_phone").text(res.data.bankcellphone);
|
|
$(".details_bank_cell_phone").attr("title", res.data.bankcellphone);
|
|
$(".details_cert_idnum").text(res.data.certidnum);
|
|
$(".details_cert_idnum").attr("title", res.data.certidnum);
|
|
if (industryArray != undefined && industryArray != null) {
|
|
industryArray.myForEach(function (v, index, arr) {
|
|
if (v.industryId == res.data.industrytype) {
|
|
$(".details_industry_type").text(v.name);
|
|
$(".details_industry_type").attr("title", v.name);
|
|
}
|
|
});
|
|
} else {
|
|
$(".details_industry_type").text(res.data.name);
|
|
$(".details_industry_type").attr("title", res.data.name);
|
|
}
|
|
$(".details_parent_islicode").text(res.data.parentislicode);
|
|
$(".details_parent_islicode").attr("title", res.data.parentislicode);
|
|
$(".details_parent_identity").text(res.data.saleType);
|
|
$(".details_parent_identity").attr("title", res.data.saleType);
|
|
}
|
|
}
|
|
|
|
// 获取下拉框值
|
|
function setOptions() {
|
|
$.ajax({
|
|
url: "../json/city.json",
|
|
type: "get", //请求方式
|
|
dataType: "json",
|
|
success: function (res) {
|
|
for (var i = 0; i < res.provice.length; i++) {
|
|
$("#institutions01").append("<option value='" + res.provice[i].name + "'> " + res.provice[i]
|
|
.name + "</option>");
|
|
$("#bankProvince").append("<option value='" + res.provice[i].name + "'> " + res.provice[i]
|
|
.name + "</option>");
|
|
$("#peopleProvince").append("<option value='" + res.provice[i].name + "'> " + res.provice[i]
|
|
.name + "</option>");
|
|
$("#provincePeral").append("<option value='" + res.provice[i].name + "'> " + res.provice[i]
|
|
.name + "</option>");
|
|
$("#providerProvince").append("<option value='" + res.provice[i].name + "'> " + res.provice[
|
|
i].name + "</option>");
|
|
$("#providerBankProvince").append("<option value='" + res.provice[i].name + "'> " + res
|
|
.provice[i].name + "</option>");
|
|
}
|
|
},
|
|
});
|
|
}
|
|
|
|
function showCity(results, city) {
|
|
$.ajax({
|
|
url: "../json/city.json",
|
|
type: "get", //请求方式
|
|
dataType: "json",
|
|
success: function (res) {
|
|
for (var i = 0; i < res.provice.length; i++) {
|
|
if (i == 0) {
|
|
document.getElementById(city).innerHTML = "";
|
|
$("#" + city).append("<option value=''>选择市</option>");
|
|
}
|
|
if (results.value == res.provice[i].name) {
|
|
for (var j = 0; j < res.provice[i].city.length; j++) {
|
|
$("#" + city).append("<option value='" + res.provice[i].city[j].name + "'> " + res
|
|
.provice[i].city[j].name + "</option>");
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
});
|
|
}
|
|
|
|
function showCountry(results, ProvinceId, District) {
|
|
var Province = document.getElementById(ProvinceId).value;
|
|
$.ajax({
|
|
url: "../json/city.json",
|
|
type: "get", //请求方式
|
|
dataType: "json",
|
|
success: function (res) {
|
|
for (var i = 0; i < res.provice.length; i++) {
|
|
if (i == 0) {
|
|
document.getElementById(District).innerHTML = "";
|
|
$("#" + District).append("<option value=''>选择区/县</option>");
|
|
}
|
|
|
|
if (Province == res.provice[i].name) {
|
|
for (var j = 0; j < res.provice[i].city.length; j++) {
|
|
if (results.value == res.provice[i].city[j].name) {
|
|
for (var z = 0; z < res.provice[i].city[j].districtAndCounty.length; z++) {
|
|
$("#" + District).append(
|
|
"<option value='" +
|
|
res.provice[i].city[j].districtAndCounty[z] +
|
|
"'> " +
|
|
res.provice[i].city[j].districtAndCounty[z] +
|
|
"</option>"
|
|
);
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
});
|
|
}
|
|
// 机构认证图片上传并显示
|
|
function previewFile() {
|
|
const preview = $("#iconImg");
|
|
const file = $("input[name='fileImg']").files[0];
|
|
const reader = new FileReader();
|
|
reader.addEventListener(
|
|
"load",
|
|
function () {
|
|
// convert image file to base64 string
|
|
preview.src = reader.result;
|
|
},
|
|
false
|
|
);
|
|
|
|
if (file) {
|
|
reader.readAsDataURL(file);
|
|
}
|
|
}
|
|
|
|
//机构,服务商输入统一信用代码验证是否已注册 "1"-表示已被注册 "0"-表示未被注册
|
|
function UnifiedSocialCreditCode(code) {
|
|
let CreditCode = false; //判断统一信用代码是不是已经注册
|
|
$.ajax({
|
|
type: "GET", //请求方式
|
|
url: Paymentlist + "entuiprise/v1/enterprise-user/uscc/unique-validate?uscc=" + code + "&userId=" +
|
|
accountId, //地址,就是json文件的请求路径
|
|
dataType: "json", //数据类型可以为 text xml json script jsonp
|
|
contentType: "application/json",
|
|
async: false,
|
|
headers: {
|
|
normal_login_token: cookieHandler.get("normal_login_token"), //这里是Token
|
|
},
|
|
success: function (res) {
|
|
//返回的参数就是 action里面所有的有get和set方法的参数
|
|
if (res.resultCode == "00000000") {
|
|
CreditCode = res.data == 1 ? false : true;
|
|
}
|
|
},
|
|
});
|
|
return CreditCode;
|
|
}
|
|
|
|
|
|
//机构,输入机构名称验证是否已注册 "1"-表示已被注册 "0"-表示未被注册
|
|
function NameOrgan(name) {
|
|
let CreditCode = false; //判断机构名称是不是已经注册
|
|
$.ajax({
|
|
type: "GET", //请求方式
|
|
url: Paymentlist + "entuiprise/v1/enterprise-user/name/unique-validate?name=" + name + "&userId=" +
|
|
accountId, //地址,就是json文件的请求路径
|
|
dataType: "json", //数据类型可以为 text xml json script jsonp
|
|
contentType: "application/json",
|
|
async: false,
|
|
headers: {
|
|
normal_login_token: cookieHandler.get("normal_login_token"), //这里是Token
|
|
},
|
|
success: function (res) {
|
|
//返回的参数就是 action里面所有的有get和set方法的参数
|
|
if (res.resultCode == "00000000") {
|
|
CreditCode = res.data == 1 ? false : true;
|
|
}
|
|
},
|
|
});
|
|
return CreditCode;
|
|
}
|
|
|
|
//机构缴费
|
|
function organizationfees() {
|
|
$("#InstitutionIdentity").html("");
|
|
if (organStatus != "2" && organStatus != "4" && organStatus != "5") {
|
|
$("#certification").html('¥' + 0.00.toFixed(2));
|
|
}
|
|
OrganIndividuals = [];
|
|
OrganizationsMony = [];
|
|
$("#box05").css('display', 'none');
|
|
userNewtype = "机构";
|
|
let IdentityList = "";
|
|
for (var i = 0; i < userNewList.length; i++) {
|
|
if (userNewList[i].userType == '机构') {
|
|
OrganIndividuals.push(userNewList[i]);
|
|
IdentityList += '<label class="checkbox-inline">' +
|
|
'<input id="checkbox' + i + '" type="checkbox" name="person" value="' + userNewList[i].saleType +
|
|
'">' +
|
|
'<label for="checkbox' + i + '">' + userNewList[i].saleType + '</label>' +
|
|
'</label>';
|
|
}
|
|
}
|
|
$("#InstitutionIdentity").html(IdentityList);
|
|
Identity = $("input[name='person']");
|
|
Identity.each(function (i) {
|
|
$(this).click(function () {
|
|
if (this.checked == true) {
|
|
let checkPrice = 0;
|
|
let newValue = "";
|
|
newValue = this.value;
|
|
if (this.value == "中介服务机构") {
|
|
$("#box05").css('display', 'block');
|
|
handelClickTags02();
|
|
}
|
|
for (var i = 0; i < OrganIndividuals.length; i++) {
|
|
if (OrganIndividuals[i].saleType == this.value) {
|
|
OrganizationsMony.push({
|
|
saleType: this.value,
|
|
fee: OrganIndividuals[i].fee
|
|
});
|
|
}
|
|
}
|
|
//计算金额相加
|
|
OrganizationsMony.myForEach(function (v, index, arr) {
|
|
let total = Math.round(parseFloat(v.fee * 100)) / 100;
|
|
checkPrice += Number(total);
|
|
$("#certification").html('¥' + checkPrice.toFixed(2));
|
|
});
|
|
} else {
|
|
let newValue = "";
|
|
newValue = this.value;
|
|
if (newValue == "中介服务机构") {
|
|
$("#box05").css('display', 'none');
|
|
}
|
|
OrganizationsMony.myForEach(function (v, index, arr) {
|
|
if (v.saleType == newValue) {
|
|
OrganizationsMony.splice(index, 1);
|
|
let nodeber = OrganizationsMony.reduce(function (a, b) { //选中之后,金额相加
|
|
return a + Math.round(parseFloat(b.fee * 100)) / 100;
|
|
}, 0)
|
|
$("#certification").html('¥' + nodeber.toFixed(2));
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
|
|
// 机构认证表单校验
|
|
function formValidate() {
|
|
$("#form-registered").bootstrapValidator({
|
|
message: "This value is not valid",
|
|
excluded: [":disabled"],
|
|
feedbackIcons: {
|
|
valid: "glyphicon glyphicon-ok",
|
|
invalid: "glyphicon glyphicon-remove",
|
|
validating: "glyphicon glyphicon-refresh",
|
|
},
|
|
fields: {
|
|
managerPath: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "经办人授权委托书不能为空",
|
|
},
|
|
},
|
|
},
|
|
managerScanPath1: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: " 经办人身份证扫描件不能为空",
|
|
},
|
|
},
|
|
},
|
|
managerScanPath2: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: " 经办人身份证扫描件不能为空",
|
|
},
|
|
},
|
|
},
|
|
managerName: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "经办人姓名不能为空",
|
|
},
|
|
callback: {
|
|
message: "经办人格式不对",
|
|
callback: function (value, validator) {
|
|
var regExp = /^[\u4e00-\u9fa5]{2,}$/;
|
|
if (regExp.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
managerIdnum: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "经办人身份证号不能为空",
|
|
},
|
|
regexp: {
|
|
regexp: /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/,
|
|
message: "身份证号码格式不正确,为18位身份证号码!",
|
|
},
|
|
callback: {
|
|
/*自定义,可以在这里与其他输入项联动校验*/
|
|
message: "身份证号码无效!",
|
|
callback: function (value, validator, $field) {
|
|
//18位身份证号码的正则表达式
|
|
var regIdCard =
|
|
/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
|
|
//如果通过该验证,说明身份证格式正确,但准确性还需计算
|
|
var idCard = value;
|
|
if (regIdCard.test(idCard)) {
|
|
if (idCard.length == 18) {
|
|
var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8,
|
|
4, 2); //将前17位加权因子保存在数组里
|
|
var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3,
|
|
2); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
|
|
var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
|
|
for (var i = 0; i < 17; i++) {
|
|
idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
|
|
}
|
|
var idCardMod = idCardWiSum % 11; //计算出校验码所在数组的位置
|
|
var idCardLast = idCard.substring(17); //得到最后一位身份证号码
|
|
//如果等于2,则说明校验码是10,身份证号码最后一位应该是X
|
|
if (idCardMod == 2) {
|
|
if (idCardLast == "X" || idCardLast == "x") {
|
|
return true;
|
|
//alert("恭喜通过验证啦!");
|
|
} else {
|
|
return false;
|
|
//alert("身份证号码错误!");
|
|
}
|
|
} else {
|
|
//用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
|
|
if (idCardLast == idCardY[idCardMod]) {
|
|
//alert("恭喜通过验证啦!");
|
|
return true;
|
|
} else {
|
|
return false;
|
|
//alert("身份证号码错误!");
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
//alert("身份证格式不正确!");
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
industryType: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "行业类别不能为空",
|
|
},
|
|
callback: {
|
|
message: "行业类别不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择行业类别") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
address: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "详细地址不能为空",
|
|
},
|
|
// callback: {
|
|
// message: "详细地址只能输入32个字符",
|
|
// callback: function (value, validator) {
|
|
// if (value.length > 32) {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// },
|
|
// },
|
|
},
|
|
},
|
|
legalsType: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "法人证件类型不能为空",
|
|
},
|
|
callback: {
|
|
message: "法人证件类型不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "请选择法人证件类型") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
licenseDate: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "营业执照有效期不能为空",
|
|
},
|
|
callback: {
|
|
message: "营业执照有效期年限不能小于当前年限",
|
|
callback: function (value, validator) {
|
|
let date_now = new Date();
|
|
let year = date_now.getFullYear();
|
|
// let month = date_now.getMonth() + 1;
|
|
// let strDate = date_now.getDate();
|
|
// if (month >= 1 && month <= 9) {
|
|
// month = "0" + month;
|
|
// }
|
|
// if (strDate >= 0 && strDate <= 9) {
|
|
// strDate = "0" + strDate;
|
|
// }
|
|
let new_time = value.split("-");
|
|
if (new_time[0] < year) {
|
|
// if (new_time[0] < year || new_time[1] < month || new_time[2] < strDate) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
cerScanPath: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "营业执照/事业单位法人证书扫描件",
|
|
},
|
|
},
|
|
},
|
|
name: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "机构名称不能为空",
|
|
},
|
|
callback: {
|
|
message: "机构名称格式不对",
|
|
callback: function (value, validator) {
|
|
var regExp = /^[\(\)(\)\u4e00-\u9fa5]{5,}$/;
|
|
if (regExp.test(value)) {
|
|
if (NameOrgan(value)) {
|
|
return true;
|
|
} else {
|
|
validator.updateMessage("name", "callback", "机构名称已注册,请重新输入");
|
|
return false;
|
|
}
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
radio1: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "银行卡类型不能为空",
|
|
},
|
|
},
|
|
},
|
|
bankType: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "银行行号不能为空",
|
|
},
|
|
callback: {
|
|
message: "银行行号格式不对",
|
|
callback: function (value, validator) {
|
|
var regExp = /^[0-9]\d*$/;
|
|
if (regExp.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
uscc: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "统一社会信用代码不能为空",
|
|
},
|
|
callback: {
|
|
message: "统一社会信用代码格式不对",
|
|
callback: function (value, validator) {
|
|
if (CheckSocialCreditCode(value)) {
|
|
if (UnifiedSocialCreditCode(value)) {
|
|
return true;
|
|
} else {
|
|
validator.updateMessage("uscc", "callback", "该统一信用代码已注册,请重新输入");
|
|
return false;
|
|
}
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
certIdnum: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "开户人身份证号码不能为空",
|
|
},
|
|
regexp: {
|
|
regexp: /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/,
|
|
message: "身份证号码格式不正确,为18位身份证号码!",
|
|
},
|
|
callback: {
|
|
/*自定义,可以在这里与其他输入项联动校验*/
|
|
message: "身份证号码无效!",
|
|
callback: function (value, validator, $field) {
|
|
//18位身份证号码的正则表达式
|
|
var regIdCard =
|
|
/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
|
|
//如果通过该验证,说明身份证格式正确,但准确性还需计算
|
|
var idCard = value;
|
|
if (regIdCard.test(idCard)) {
|
|
if (idCard.length == 18) {
|
|
var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8,
|
|
4, 2); //将前17位加权因子保存在数组里
|
|
var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3,
|
|
2); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
|
|
var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
|
|
for (var i = 0; i < 17; i++) {
|
|
idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
|
|
}
|
|
var idCardMod = idCardWiSum % 11; //计算出校验码所在数组的位置
|
|
var idCardLast = idCard.substring(17); //得到最后一位身份证号码
|
|
//如果等于2,则说明校验码是10,身份证号码最后一位应该是X
|
|
if (idCardMod == 2) {
|
|
if (idCardLast == "X" || idCardLast == "x") {
|
|
return true;
|
|
//alert("恭喜通过验证啦!");
|
|
} else {
|
|
return false;
|
|
//alert("身份证号码错误!");
|
|
}
|
|
} else {
|
|
//用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
|
|
if (idCardLast == idCardY[idCardMod]) {
|
|
//alert("恭喜通过验证啦!");
|
|
return true;
|
|
} else {
|
|
return false;
|
|
//alert("身份证号码错误!");
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
//alert("身份证格式不正确!");
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
regionProvince: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "省份不能为空",
|
|
},
|
|
callback: {
|
|
message: "省份不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择省") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
regionCity: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "市不能为空",
|
|
},
|
|
callback: {
|
|
message: "市不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择市") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
regionDistrict: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "区/县不能为空",
|
|
},
|
|
callback: {
|
|
message: "区/县不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择区/县") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
establishDate: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "机构成立日期不能为空",
|
|
},
|
|
},
|
|
},
|
|
desc: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "机构简介不能为空",
|
|
},
|
|
callback: {
|
|
message: "机构简介字符不能为超过1600",
|
|
callback: function (value, validator) {
|
|
$("#numtj_em").text(value.length);
|
|
if (value.length <= 1600) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
legalsScanPath1: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "指纹不能为空",
|
|
},
|
|
},
|
|
},
|
|
legalsScanPath2: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "盖章不能为空",
|
|
},
|
|
},
|
|
},
|
|
legalsName: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "法人姓名不能为空",
|
|
},
|
|
callback: {
|
|
message: "法人格式不对",
|
|
callback: function (value, validator) {
|
|
var regExp = /^[\u4e00-\u9fa5]{2,}$/;
|
|
if (regExp.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
legalsIdnum: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "法人身份证号不能为空",
|
|
},
|
|
regexp: {
|
|
regexp: /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/,
|
|
message: "身份证号码格式不正确,为18位身份证号码!",
|
|
},
|
|
callback: {
|
|
/*自定义,可以在这里与其他输入项联动校验*/
|
|
message: "身份证号码无效!",
|
|
callback: function (value, validator, $field) {
|
|
//18位身份证号码的正则表达式
|
|
var regIdCard =
|
|
/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
|
|
//如果通过该验证,说明身份证格式正确,但准确性还需计算
|
|
var idCard = value;
|
|
if (regIdCard.test(idCard)) {
|
|
if (idCard.length == 18) {
|
|
var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8,
|
|
4, 2); //将前17位加权因子保存在数组里
|
|
var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3,
|
|
2); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
|
|
var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
|
|
for (var i = 0; i < 17; i++) {
|
|
idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
|
|
}
|
|
var idCardMod = idCardWiSum % 11; //计算出校验码所在数组的位置
|
|
var idCardLast = idCard.substring(17); //得到最后一位身份证号码
|
|
//如果等于2,则说明校验码是10,身份证号码最后一位应该是X
|
|
if (idCardMod == 2) {
|
|
if (idCardLast == "X" || idCardLast == "x") {
|
|
return true;
|
|
//alert("恭喜通过验证啦!");
|
|
} else {
|
|
return false;
|
|
//alert("身份证号码错误!");
|
|
}
|
|
} else {
|
|
//用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
|
|
if (idCardLast == idCardY[idCardMod]) {
|
|
//alert("恭喜通过验证啦!");
|
|
return true;
|
|
} else {
|
|
return false;
|
|
//alert("身份证号码错误!");
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
//alert("身份证格式不正确!");
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
legalsCellPhone: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "法人手机号不能为空",
|
|
},
|
|
callback: {
|
|
message: "法人手机号格式不正确",
|
|
callback: function (value, validator) {
|
|
var regExp = new RegExp("^1[3-9]\\d{9}$");
|
|
if (regExp.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
publicAccount: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "银行账号不能为空",
|
|
},
|
|
callback: {
|
|
message: "银行账号格式不对",
|
|
callback: function (value, validator) {
|
|
// var pattern = /^([1-9]{1})(\d{15}|\d{16}|\d{18}|\d{20})$/;
|
|
var pattern = /^[0-9]\d*$/;
|
|
if (pattern.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
bankName: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "开户银行不能为空",
|
|
},
|
|
callback: {
|
|
message: "开户银行不能为特殊字符",
|
|
callback: function (value, validator) {
|
|
var regExp = new RegExp(
|
|
"[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"
|
|
);
|
|
if (regExp.test(value)) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
bankProvince: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "省份不能为空",
|
|
},
|
|
callback: {
|
|
message: "省份不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择省") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
bankCity: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "市不能为空",
|
|
},
|
|
callback: {
|
|
message: "市不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择市") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
bankDistrict: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "区/县不能为空",
|
|
},
|
|
callback: {
|
|
message: "区/县不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择区/县") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
bankCellPhone: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "开户银行预留手机号不能为空",
|
|
},
|
|
callback: {
|
|
message: "开户银行预留手机号格式不正确",
|
|
callback: function (value, validator) {
|
|
var regExp = new RegExp("^1[3-9]\\d{9}$");
|
|
if (regExp.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
// legalsHoldPath: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '法人手持身份证正面照不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
doorHeadPhoto: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "门头照不能为空",
|
|
},
|
|
},
|
|
},
|
|
// customerAgreementPath: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '客户协议书不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// accountOpeningPermit: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '开户许可证或印鉴卡不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// businessPlacePath1: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '经营场所图1不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// businessPlacePath2: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '经营场所图2不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
bankAccountName: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "开户人不能为空",
|
|
},
|
|
callback: {
|
|
message: "开户人格式不对",
|
|
callback: function (value, validator) {
|
|
var regExp = /^[\u4e00-\u9fa5()()]{2,}$/;
|
|
if (regExp.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
serviceChanism: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "推荐中介服务机构不能为空",
|
|
},
|
|
callback: {
|
|
message: "推荐中介服务机构不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择推荐中介服务机构") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
}
|
|
|
|
// //获取机构名称
|
|
// $("#name").bind("change", function () {
|
|
// serviceAgency($("#name").val());
|
|
// });
|
|
|
|
// //判断机构是否在白名单 1-在 0-不在
|
|
// function serviceAgency(data) {
|
|
// if (data != "") {
|
|
// var ajaxAgency = new AJAX_OBJ(Paymentlist + `certiaudit/booleanInWhitelist/${data}`, onAgencySuccess,
|
|
// onUrlError);
|
|
// ajaxAgency.postRequestData();
|
|
// }
|
|
// }
|
|
|
|
// function onAgencySuccess(xmlHttp) {
|
|
// var res = eval("(" + xmlHttp.responseText + ")");
|
|
// if (res.resultCode == "00000000") {
|
|
// Postlist = "";
|
|
// Postlist = res.data;
|
|
// }
|
|
// }
|
|
|
|
//验证身份有没有选择
|
|
function Submit(personName, IDName) {
|
|
var checkOne = false; //判断是否被选择条件
|
|
var chboxVal = []; //存入被选中项的值
|
|
var checkBox = $('input[name = "' + personName + '"]'); //获得得到所的复选框
|
|
for (var i = 0; i < checkBox.length; i++) {
|
|
//如果有1个被选中时(jquery1.6以上还可以用if(checkBox[i].prop('checked')) 去判断checkbox是否被选中)
|
|
if (checkBox[i].checked) {
|
|
checkOne = true;
|
|
// chboxVal.push(checkBox[i].value)//将被选择的值追加到
|
|
};
|
|
};
|
|
if (checkOne) {
|
|
$("#" + IDName).css("display", "none");
|
|
return true
|
|
} else {
|
|
$("#" + IDName).css("display", "block");
|
|
return false
|
|
};
|
|
};
|
|
|
|
var tages = ""; //传入中介服务机构的类型
|
|
// 机构认证表单验证提交
|
|
function handelSubmit() {
|
|
if (Submit("person", "PersonIdentity")) {
|
|
if (tagsProvice.length != 0) {
|
|
if ($('#checkbox_organization').is(':checked')) {
|
|
var titleName = document.getElementsByClassName("current02")[0].innerText;
|
|
if (titleName == "法人") {
|
|
//法人不触发校验
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerPath", false,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerScanPath1", false,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerScanPath2", false,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerName", false,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerName", false,
|
|
"regexp");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerName", false,
|
|
"callback");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerIdnum", false,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerIdnum", false,
|
|
"regexp");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerIdnum", false,
|
|
"callback");
|
|
} else {
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerPath", true,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerScanPath1", true,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerScanPath2", true,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerName", true,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerIdnum", true,
|
|
"notEmpty");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerIdnum", true,
|
|
"regexp");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerIdnum", true,
|
|
"callback");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerIdnum", true,
|
|
"regexp");
|
|
$("#form-registered").data("bootstrapValidator").enableFieldValidators("managerIdnum", true,
|
|
"callback");
|
|
}
|
|
$("#form-registered").data("bootstrapValidator").validate();
|
|
var flag = $("#form-registered").data("bootstrapValidator").isValid();
|
|
if (flag) {
|
|
let estimate = 1; //判断是机构还是服务商 机构1 服务商2
|
|
let deal = ""; //存入买方,卖方,中介服务机构名称
|
|
if (OrganizationsMony.length != 0) {
|
|
//存入买方,卖方,中介服务机构名称
|
|
for (var i = 0; i < OrganizationsMony.length; i++) {
|
|
if (i == OrganizationsMony.length - 1) {
|
|
deal += OrganizationsMony[i].saleType;
|
|
} else {
|
|
deal += OrganizationsMony[i].saleType + ",";
|
|
}
|
|
}
|
|
OrganizationsMony.myForEach(function (v, index, arr) {
|
|
if (v.saleType == "中介服务机构") {
|
|
//判断是不是选择了身份中介服务机构
|
|
for (var i = 0; i < tagsProvice.length; i++) {
|
|
if (i == tagsProvice.length - 1) {
|
|
tages += tagsProvice[i];
|
|
} else {
|
|
tages += tagsProvice[i] + ",";
|
|
}
|
|
}
|
|
estimate = 2;
|
|
}
|
|
});
|
|
}
|
|
|
|
var bankCardType = $("input[name='radio1']:checked").val();
|
|
if ($("#serviceChanism").val() == 0) {
|
|
IntermediaryIs = 0;
|
|
} else {
|
|
IntermediaryIs = $("#serviceChanism").val();
|
|
}
|
|
|
|
var institutionsdata = "";
|
|
if (titleName == "法人") {
|
|
//法人不触发校验
|
|
// institutionsdata = '{' +
|
|
// // '"accountOpeningPermit":"' + document.getElementById("accountOpeningPermit").files[0].httpurl + '",' +
|
|
// '"address": "' + $("#address").val() + '",' +
|
|
// '"auditOpinion": "",' +
|
|
// '"avatar": "",' +
|
|
// '"bankAccountName": "' + $("#bankAccountName").val() + '",' +
|
|
// '"bankCardType": "' + bankCardType + '",' +
|
|
// '"bankCellPhone": "' + $("#bankCellPhone").val() + '",' +
|
|
// '"bankCity": "' + $("#bankCity").val() + '",' +
|
|
// '"bankDistrict": "' + $("#bankDistrict").val() + '",' +
|
|
// '"bankName": "' + $("#bankName").val() + '",' +
|
|
// '"bankProvince": "' + $("#bankProvince").val() + '",' +
|
|
// '"bankType": "' + $("#bankType").val() + '",' +
|
|
// // '"businessPlacePath1": "' + document.getElementById("businessPlacePath1").files[0].httpurl + '",' +
|
|
// // '"businessPlacePath2": "' + document.getElementById("businessPlacePath2").files[0].httpurl + '",' +
|
|
// '"cerScanPath": "' + document.getElementById("cerScanPath").files[0].httpurl + '",' +
|
|
// '"certIdnum": "' + $("#certIdnum").val() + '",' +
|
|
// // '"customerAgreementPath": "' + document.getElementById("customerAgreementPath").files[0].httpurl +
|
|
// // '",' +
|
|
// '"desc": "' + $("#desc").val() + '",' +
|
|
// '"doorHeadPhoto": "' + document.getElementById("doorHeadPhoto").files[0].httpurl + '",' +
|
|
// '"establishDate": "' + $("#establishDate").val() + '",' +
|
|
// '"identity":"' + $(".current02").text() + '",' +
|
|
// '"industryType": "' + $("#industryType").val() + '",' +
|
|
// '"licenseDate": "' + $("#licenseDate").val() + '",' +
|
|
// '"islicode": "' + "" + '",' +
|
|
// '"legalsType": "' + $("#legalsType").val() + '",' +
|
|
// '"legalsCellPhone": "' + $("#legalsCellPhone").val() + '",' +
|
|
// '"legalsIdnum": "' + $("#legalsIdnum").val() + '",' +
|
|
// '"legalsName": "' + $("#legalsName").val() + '",' +
|
|
// '"legalsScanPath1": "' + document.getElementById("legalsScanPath1").files[0].httpurl + '",' +
|
|
// '"legalsScanPath2": "' + document.getElementById("legalsScanPath2").files[0].httpurl + '",' +
|
|
// '"managerIdnum": "' + $("#managerIdnum").val() + '",' +
|
|
// '"managerName": "' + $("#managerName").val() + '",' +
|
|
// '"managerPath": "' + "" + '",' +
|
|
// '"managerScanPath1":"' + "" + '",' +
|
|
// '"managerScanPath2":"' + "" + '",' +
|
|
// // '"legalsHoldPath":"' + document.getElementById("legalsHoldPath").files[0].httpurl + '",' +
|
|
// '"name": "' + $("#name").val() + '",' +
|
|
// '"publicAccount": "' + $("#publicAccount").val() + '",' +
|
|
// '"regionCity": "' + $("#institutions02").val() + '",' +
|
|
// '"regionDistrict": "' + $("#institutions03").val() + '",' +
|
|
// '"regionProvince": "' + $("#institutions01").val() + '",' +
|
|
// '"state": 0,' +
|
|
// '"type": "' + tagsName + '",' +
|
|
// '"uscc":"' + $("#uscc").val() + '",' +
|
|
// '"userId": "' + accountId + '",' +
|
|
// '"userType":"企业"' +
|
|
// '}';
|
|
institutionsdata =
|
|
"{" +
|
|
'"name": "' + $("#name").val() + '",' + //机构名称
|
|
'"avatar": "",' + //头像地址
|
|
'"industrytype": "' + $("#industryType").val() + '",' + //行业类别
|
|
'"regionprovince": "' + $("#institutions01").val() + '",' + //注册地区-省
|
|
'"regioncity": "' + $("#institutions02").val() + '",' + //注册地区-市
|
|
'"regiondistrict": "' + $("#institutions03").val() + '",' + //注册地区-区/县
|
|
// '"account_opening_permit": "' + document.getElementById("accountOpeningPermit").files[0].httpurl + '",' + //开户许可证或印鉴卡
|
|
'"address": "' + $("#address").val() + '",' + //详细地址
|
|
'"establishdate": "' + $("#establishDate").val() + '",' + //机构成立日期
|
|
'"desc": "' + $("#desc").val().replace(new RegExp('\n', "gm"), '<br/>').replace(/"/g, "\"") + '",' + //机构简介
|
|
'"legalsname": "' + $("#legalsName").val() + '",' + //法人姓名
|
|
'"legalstype": "' + $("#legalsType").val() + '",' + //法人证件类型
|
|
'"legalsidnum": "' + $("#legalsIdnum").val() + '",' + //法人身份证号
|
|
'"uscc":"' + $("#uscc").val() + '",' + //统一社会信用代码
|
|
'"licensedate": "' + $("#licenseDate").val() + '",' + //营业执照有效期
|
|
'"legalscellphone": "' + $("#legalsCellPhone").val() + '",' + //法人手机号
|
|
'"publicaccount": "' + $("#publicAccount").val() + '",' + //银行账号
|
|
'"bankaccountname": "' + $("#bankAccountName").val() + '",' + //开户人
|
|
'"bankcardtype": "' + bankCardType + '",' + //银行卡类型
|
|
'"bankprovince": "' + $("#bankProvince").val() + '",' + //开户银行所在地-省
|
|
'"bankcity": "' + $("#bankCity").val() + '",' + //开户银行所在地-市
|
|
'"bankdistrict": "' + $("#bankDistrict").val() + '",' + //开户银行所在地-区/县
|
|
'"bankname": "' + $("#bankName").val() + '",' + //开户银行名称
|
|
'"banktype": "' + $("#bankType").val() + '",' + //银行行号
|
|
'"certidnum": "' + $("#certIdnum").val() + '",' + //开户人身份证号码
|
|
'"bankcellphone": "' + $("#bankCellPhone").val() + '",' + //开户银行预留手机号
|
|
'"cerscanpath": "' + document.getElementById("cerScanPath").files[0].httpurl + '",' +
|
|
//营业执照/事业单位法人证书扫描件
|
|
'"legalsscanpath1": "' + document.getElementById("legalsScanPath1").files[0].httpurl +
|
|
'",' +
|
|
//法人身份证正反面扫描件(指纹或盖章)
|
|
'"legalsscanpath2": "' + document.getElementById("legalsScanPath2").files[0].httpurl +
|
|
'",' +
|
|
//法人身份证正反面扫描件(指纹或盖章)
|
|
'"doorheadphoto": "' + document.getElementById("doorHeadPhoto").files[0].httpurl + '",' +
|
|
//门头照
|
|
'"parentislicode": "' + IntermediaryIs + '",' + //推荐中介服务机构 中介机构is
|
|
'"isposttion": "' + Postlist + '",' + //是否后置名单(0、否 1、是 )
|
|
'"saleType": "' + deal + '",' + //买卖方类型
|
|
'"intermediaryType": "' + tages + '",' + //中介服务机构类型
|
|
'"fees": "' + $("#certification").text().split("¥")[1] + '",' + //总费用
|
|
'"type": "' + (estimate == 1 ? tagsName : tages) + '",' +
|
|
'"userid": "' + accountId + '",' +
|
|
// '"state": "' + (organStatus == "2" || organStatus == "4" || organStatus == "5" ? 8 : "") + '",' +
|
|
'"identity":"' + $(".current02").text() + '",' + //身份:'法人','经办人',‘个人’
|
|
'"usertype": "' + (estimate == 1 ? "企业" : "服务商") + '" ' + //用户类型 企业/服务商 "企业"'
|
|
"}";
|
|
} else {
|
|
// institutionsdata = '{' +
|
|
// // '"accountOpeningPermit":"' + document.getElementById("accountOpeningPermit").files[0].httpurl + '",' +
|
|
// '"address": "' + $("#address").val() + '",' +
|
|
// '"auditOpinion": "",' +
|
|
// '"avatar": "",' +
|
|
// '"bankAccountName": "' + $("#bankAccountName").val() + '",' +
|
|
// '"bankCardType": "' + bankCardType + '",' +
|
|
// '"bankCellPhone": "' + $("#bankCellPhone").val() + '",' +
|
|
// '"bankCity": "' + $("#bankCity").val() + '",' +
|
|
// '"bankDistrict": "' + $("#bankDistrict").val() + '",' +
|
|
// '"bankName": "' + $("#bankName").val() + '",' +
|
|
// '"bankProvince": "' + $("#bankProvince").val() + '",' +
|
|
// '"bankType": "' + $("#bankType").val() + '",' +
|
|
// // '"businessPlacePath1": "' + document.getElementById("businessPlacePath1").files[0].httpurl + '",' +
|
|
// // '"businessPlacePath2": "' + document.getElementById("businessPlacePath2").files[0].httpurl + '",' +
|
|
// '"cerScanPath": "' + document.getElementById("cerScanPath").files[0].httpurl + '",' +
|
|
// '"certIdnum": "' + $("#certIdnum").val() + '",' +
|
|
// // '"customerAgreementPath": "' + document.getElementById("customerAgreementPath").files[0].httpurl +
|
|
// // '",' +
|
|
// '"desc": "' + $("#desc").val() + '",' +
|
|
// '"doorHeadPhoto": "' + document.getElementById("doorHeadPhoto").files[0].httpurl + '",' +
|
|
// '"establishDate": "' + $("#establishDate").val() + '",' +
|
|
// '"identity":"' + $(".current02").text() + '",' +
|
|
// '"industryType": "' + $("#industryType").val() + '",' +
|
|
// '"licenseDate": "' + $("#licenseDate").val() + '",' +
|
|
// '"islicode": "' + "" + '",' +
|
|
// '"legalsType": "' + $("#legalsType").val() + '",' +
|
|
// '"legalsCellPhone": "' + $("#legalsCellPhone").val() + '",' +
|
|
// '"legalsIdnum": "' + $("#legalsIdnum").val() + '",' +
|
|
// '"legalsName": "' + $("#legalsName").val() + '",' +
|
|
// '"legalsScanPath1": "' + document.getElementById("legalsScanPath1").files[0].httpurl + '",' +
|
|
// '"legalsScanPath2": "' + document.getElementById("legalsScanPath2").files[0].httpurl + '",' +
|
|
// '"managerIdnum": "' + $("#managerIdnum").val() + '",' +
|
|
// '"managerName": "' + $("#managerName").val() + '",' +
|
|
// '"managerPath": "' + document.getElementById("managerPath").files[0].httpurl + '",' +
|
|
// '"managerScanPath1":"' + document.getElementById("managerScanPath1").files[0].httpurl + '",' +
|
|
// '"managerScanPath2":"' + document.getElementById("managerScanPath2").files[0].httpurl + '",' +
|
|
// // '"legalsHoldPath":"' + document.getElementById("legalsHoldPath").files[0].httpurl + '",' +
|
|
// '"name": "' + $("#name").val() + '",' +
|
|
// '"publicAccount": "' + $("#publicAccount").val() + '",' +
|
|
// '"regionCity": "' + $("#institutions02").val() + '",' +
|
|
// '"regionDistrict": "' + $("#institutions03").val() + '",' +
|
|
// '"regionProvince": "' + $("#institutions01").val() + '",' +
|
|
// '"state": 0,' +
|
|
// '"type": "' + tagsName + '",' +
|
|
// '"uscc":"' + $("#uscc").val() + '",' +
|
|
// '"userId": "' + accountId + '",' +
|
|
// '"userType":"企业"' +
|
|
// '}';
|
|
institutionsdata =
|
|
"{" +
|
|
'"managerpath": "' + document.getElementById("managerPath").files[0].httpurl + '",' +
|
|
//经办人授权委托书
|
|
'"managerscanpath1":"' + document.getElementById("managerScanPath1").files[0].httpurl +
|
|
'",' +
|
|
//经办人身份证正面扫描件
|
|
'"managerscanpath2":"' + document.getElementById("managerScanPath2").files[0].httpurl +
|
|
'",' +
|
|
//经办人身份证反面扫描件
|
|
'"managername": "' + $("#managerName").val() + '",' + //经办人姓名
|
|
'"manageridnum": "' + $("#managerIdnum").val() + '",' + //经办人身份证号
|
|
'"name": "' + $("#name").val() + '",' + //机构名称
|
|
'"avatar": "",' + //头像地址
|
|
'"industrytype": "' + $("#industryType").val() + '",' + //行业类别
|
|
'"regionprovince": "' + $("#institutions01").val() + '",' + //注册地区-省
|
|
'"regioncity": "' + $("#institutions02").val() + '",' + //注册地区-市
|
|
'"regiondistrict": "' + $("#institutions03").val() + '",' + //注册地区-区/县
|
|
'"address": "' + $("#address").val() + '",' + //详细地址
|
|
'"establishdate": "' + $("#establishDate").val() + '",' + //机构成立日期
|
|
'"desc": "' + $("#desc").val().replace(new RegExp('\n', "gm"), '<br/>').replace(/"/g, "\"") + '",' + //机构简介
|
|
'"legalsname": "' + $("#legalsName").val() + '",' + //法人姓名
|
|
'"legalstype": "' + $("#legalsType").val() + '",' + //法人证件类型
|
|
'"legalsidnum": "' + $("#legalsIdnum").val() + '",' + //法人身份证号
|
|
'"uscc":"' + $("#uscc").val() + '",' + //统一社会信用代码
|
|
'"licensedate": "' + $("#licenseDate").val() + '",' + //营业执照有效期
|
|
'"legalscellphone": "' + $("#legalsCellPhone").val() + '",' + //法人手机号
|
|
'"publicaccount": "' + $("#publicAccount").val() + '",' + //银行账号
|
|
'"bankaccountname": "' + $("#bankAccountName").val() + '",' + //开户人
|
|
'"bankcardtype": "' + bankCardType + '",' + //银行卡类型
|
|
'"bankprovince": "' + $("#bankProvince").val() + '",' + //开户银行所在地-省
|
|
'"bankcity": "' + $("#bankCity").val() + '",' + //开户银行所在地-市
|
|
'"bankdistrict": "' + $("#bankDistrict").val() + '",' + //开户银行所在地-区/县
|
|
'"bankname": "' + $("#bankName").val() + '",' + //开户银行名称
|
|
'"banktype": "' + $("#bankType").val() + '",' + //银行行号
|
|
'"certidnum": "' + $("#certIdnum").val() + '",' + //开户人身份证号码
|
|
'"bankcellphone": "' + $("#bankCellPhone").val() + '",' + //开户银行预留手机号
|
|
'"cerscanpath": "' + document.getElementById("cerScanPath").files[0].httpurl + '",' +
|
|
//营业执照/事业单位法人证书扫描件
|
|
'"legalsscanpath1": "' + document.getElementById("legalsScanPath1").files[0].httpurl +
|
|
'",' +
|
|
//法人身份证正反面扫描件(指纹或盖章)
|
|
'"legalsscanpath2": "' + document.getElementById("legalsScanPath2").files[0].httpurl +
|
|
'",' +
|
|
//法人身份证正反面扫描件(指纹或盖章)
|
|
'"doorheadphoto": "' + document.getElementById("doorHeadPhoto").files[0].httpurl + '",' +
|
|
//门头照
|
|
'"parentislicode": "' + IntermediaryIs + '",' + //推荐中介服务机构 中介机构is
|
|
'"isposttion": "' + Postlist + '",' + //是否后置名单(0、否 1、是 )
|
|
'"saleType": "' + deal + '",' + //买卖方类型
|
|
'"intermediaryType": "' + tages + '",' + //中介服务机构类型
|
|
'"fees": "' + $("#certification").text().split("¥")[1] + '",' + //总费用
|
|
'"type": "' + (estimate == 1 ? tagsName : tages) + '",' +
|
|
'"userid": "' + accountId + '",' +
|
|
// '"state": "' + (organStatus == "2" || organStatus == "4" || organStatus == "5" ? 8 : "") + '",' +
|
|
'"identity":"' + $(".current02").text() + '",' + //身份:'法人','经办人',‘个人’
|
|
'"usertype": "' + (estimate == 1 ? "企业" : "服务商") + '" ' + //用户类型 企业/服务商
|
|
"}";
|
|
}
|
|
// Preservation(agreement);
|
|
|
|
//认证(缴费)接口
|
|
var ajaxentUserDemo = new AJAX_OBJ(Paymentlist + "/entuiprise/mannAgeDate", onentiseSuccess, onUrlError);
|
|
ajaxentUserDemo.postRequestData(institutionsdata);
|
|
}
|
|
} else {
|
|
Dreamer.warning("请勾选《临时场内交易主体进场协议》和《临时买卖委托协议》和《临时业务机构委托协议》");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//机构 法人,经办人提交机构认证
|
|
function onentiseSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode == "00000000") {
|
|
$("#organBtn").attr("disabled", true); //按钮禁用
|
|
Dreamer.success("认证信息提交成功");
|
|
delLocalStorage();
|
|
// tagsProvice = ["评估机构"];
|
|
tagsProvice = ["法务"];
|
|
btnStatus();
|
|
// if (Postlist == 1) { //判断是白名单
|
|
// let shopname = "";
|
|
// OrganizationsMony.myForEach(function(v, index, arr) {
|
|
// if (index < OrganizationsMony.length - 1) {
|
|
// shopname += v.saleType + ",";
|
|
// } else {
|
|
// shopname += v.saleType + "";
|
|
// }
|
|
// })
|
|
// if (organStatus == "2" || organStatus == "4" || organStatus == "5") { //查看是否是认证失败
|
|
// if (failureIdentity.length == OrganizationsMony.length) { // 判断详情数据中的身份与重新提交认证的身份长度是否一样
|
|
// btnStatus();
|
|
// handelBack();
|
|
// } else {
|
|
// let Whitelist = {
|
|
// saleType: shopname,
|
|
// type: userTypes,
|
|
// userid: accountId
|
|
// }
|
|
// Whitelistssellers(Whitelist);
|
|
// }
|
|
// // for (var i = 0; i < failureIdentity.length; i++) {
|
|
// // let newIdentity = OrganizationsMony.filter(function(item){
|
|
// // return failureIdentity[i] != item.saleType
|
|
// // })
|
|
// // if(newIdentity.length == 0){
|
|
// // btnStatus();
|
|
// // handelBack();
|
|
// // }else{
|
|
// // let Whitelist = {
|
|
// // saleType:shopname,
|
|
// // type: userTypes,
|
|
// // userid: accountId
|
|
// // }
|
|
// // Whitelistssellers(Whitelist);
|
|
// // }
|
|
// // }
|
|
// } else {
|
|
// let Whitelist = {
|
|
// saleType: shopname,
|
|
// type: userTypes,
|
|
// userid: accountId
|
|
// }
|
|
// Whitelistssellers(Whitelist);
|
|
// }
|
|
// } else { //判断不是白名单
|
|
if (organStatus == "2" || organStatus == "4" || organStatus == "5") { //查看是否是认证失败
|
|
// for (var i = 0; i < failureIdentity.length; i++) {
|
|
// let newIdentity = OrganizationsMony.filter(function(item){
|
|
// return failureIdentity[i] != item.saleType
|
|
// })
|
|
// if(newIdentity.length == 0){
|
|
// btnStatus();
|
|
// handelBack();
|
|
// }else{
|
|
// let newOrder = {
|
|
// isok: "2",
|
|
// userid: accountId,
|
|
// };
|
|
// SerOrderDetils(newOrder);
|
|
// }
|
|
// }
|
|
// }
|
|
if (failureIdentity.length == OrganizationsMony.length) { // 判断详情数据中的身份与重新提交认证的身份长度是否一样
|
|
btnStatus();
|
|
handelBack();
|
|
} else {
|
|
let newOrder = {
|
|
isok: "2",
|
|
userid: accountId,
|
|
};
|
|
SerOrderDetils(newOrder);
|
|
}
|
|
} else {
|
|
let newOrder = {
|
|
isok: "2",
|
|
userid: accountId,
|
|
};
|
|
SerOrderDetils(newOrder);
|
|
}
|
|
// }
|
|
} else {
|
|
Dreamer.error(res.resultMsg);
|
|
}
|
|
}
|
|
|
|
//判断认证缴费订单里是否有未缴费的订单
|
|
function SerOrderDetils(data) {
|
|
var ajaxOrderDetils = new AJAX_OBJ(Paymentlist + "certiaudit/listIndet?isok=" + data.isok + "&userid=" + data
|
|
.userid, onOrderDetilsSuccess, onUrlError);
|
|
ajaxOrderDetils.getRequestData();
|
|
}
|
|
|
|
function onOrderDetilsSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.data.length == 0) {
|
|
btnStatus();
|
|
let shopname = "";
|
|
//详情数据中的身份不为空
|
|
if (failureIdentity.length != 0) {
|
|
//查询详情数据与提交认证的身份是否一样,一样就将一样的身份删除,将不一样的身份生成新的缴费订单
|
|
for (var i = 0; i < failureIdentity.length; i++) {
|
|
for (var j = 0; j < OrganizationsMony.length; j++) {
|
|
if (failureIdentity[i] == OrganizationsMony[j].saleType) {
|
|
OrganizationsMony.splice(OrganizationsMony[j], 1);
|
|
}
|
|
}
|
|
}
|
|
OrganizationsMony.myForEach(function (v, index, arr) {
|
|
if (index < OrganizationsMony.length - 1) {
|
|
shopname += v.saleType + ",";
|
|
} else {
|
|
shopname += v.saleType + "";
|
|
}
|
|
})
|
|
} else {
|
|
//详情数据中的身份为空,就是第一次提交认证
|
|
OrganizationsMony.myForEach(function (v, index, arr) {
|
|
if (index < OrganizationsMony.length - 1) {
|
|
shopname += v.saleType + ",";
|
|
} else {
|
|
shopname += v.saleType + "";
|
|
}
|
|
})
|
|
}
|
|
setTimeout(function () {
|
|
let inse = {
|
|
saleType: shopname,
|
|
type: userTypes,
|
|
userid: accountId,
|
|
};
|
|
if (userTypes == "服务商") {
|
|
inse.type = "机构";
|
|
} else if (userTypes == "企业") {
|
|
inse.type = "机构";
|
|
} else if (userTypes == "个人") {
|
|
inse.type = "个人";
|
|
}
|
|
SerAddOrder(inse);
|
|
}, 2000);
|
|
} else {
|
|
btnStatus();
|
|
handelBack();
|
|
$("#organBtn").attr("disabled", false); //按钮启用
|
|
$("#PersonBtn").attr("disabled", false); //按钮启用
|
|
}
|
|
}
|
|
|
|
//生成认证缴费订单
|
|
function SerAddOrder(data) {
|
|
var ajaxAddOrder = new AJAX_OBJ(Paymentlist + "certiaudit/getPayIndexByType?usertype=" + data.type + "&userid=" +
|
|
data.userid + "&saleType=" + data.saleType, onAddOrderSuccess, onUrlError);
|
|
ajaxAddOrder.getRequestData();
|
|
}
|
|
|
|
function onAddOrderSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode == "00000000") {
|
|
// if (res.data.paysum == 0) {
|
|
// PaymentStatus();
|
|
// } else {
|
|
// if(Postlist == 1){//判断是否在白名单
|
|
// btnStatus();
|
|
// handelBack();
|
|
// }else{
|
|
$("#myModalPayment").modal({
|
|
backdrop: 'static',
|
|
keyboard: false
|
|
});
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
|
|
//修改认证缴费状态
|
|
function PaymentStatus() {
|
|
var ajaxPaymentStatus = new AJAX_OBJ(Paymentlist + "certiaudit/getstateByUserid?userid=" + accountId,
|
|
onPaymentStatus, onUrlError);
|
|
ajaxPaymentStatus.getRequestData();
|
|
}
|
|
|
|
function onPaymentStatus(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode == "00000000") {
|
|
btnStatus();
|
|
handelBack();
|
|
$("#organBtn").attr("disabled", false); //按钮启用
|
|
$("#PersonBtn").attr("disabled", false); //按钮启用
|
|
}
|
|
}
|
|
|
|
//立即缴费
|
|
function DiatePayment() {
|
|
window.location.href = "PaymentOrder.html?time=" + new Date().getTime(); //进入认证缴费支付页面
|
|
$("#organBtn").attr("disabled", false); //按钮启用
|
|
$("#PersonBtn").attr("disabled", false); //按钮启用
|
|
}
|
|
|
|
//稍后缴费
|
|
function Paylater() {
|
|
btnStatus();
|
|
handelBack();
|
|
$("#organBtn").attr("disabled", false); //按钮启用
|
|
$("#PersonBtn").attr("disabled", false); //按钮启用
|
|
}
|
|
|
|
//判断认证的是否是白名单,是就生成角色关联表
|
|
function Whitelistssellers(data) {
|
|
var ajaxWhitelistssellers = new AJAX_OBJ(Paymentlist + "certiaudit/whitelistSaveIdentitys?usertype=" + data.type +
|
|
"&userid=" +
|
|
data.userid + "&saleType=" + data.saleType, onWhitelistssellers, onUrlError);
|
|
ajaxWhitelistssellers.getRequestData();
|
|
}
|
|
|
|
function onWhitelistssellers(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode == "00000000") {
|
|
PaymentStatus();
|
|
}
|
|
}
|
|
|
|
// 机构认证返回
|
|
function handelBack() {
|
|
$("#organHand").css("display", "none");
|
|
$("#organing").css("display", "none");
|
|
$("#organSucces").css("display", "none");
|
|
$("#hand_box").css("display", "none");
|
|
$("#cetifiTotal").css("display", "block");
|
|
$("#personalHand").css("display", "none");
|
|
$("#personaling").css("display", "none");
|
|
$("#personalSuccess").css("display", "none");
|
|
$("#service").css("display", "none");
|
|
$("#Organization_code").css("display", "none");
|
|
$("#serviceNow").css("display", "none");
|
|
$("#serviceSuccess").css("display", "none");
|
|
window.location.reload(true);
|
|
}
|
|
|
|
// 机构认证按钮状态查询
|
|
function btnStatus() {
|
|
var ajaxbtnStatusDemo = new AJAX_OBJ(Paymentlist + "entuiprise/listLibrary?AuId=" + accountId, onbtnStatusSuccess,
|
|
onUrlError);
|
|
ajaxbtnStatusDemo.postRequestData();
|
|
}
|
|
|
|
function onbtnStatusSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode == "99999999") {
|
|
organStatus = "-1";
|
|
if (organStatus == "-1") {
|
|
//"-1"
|
|
$("#organAuth01").val("立即认证");
|
|
}
|
|
} else if (res.resultCode == "00000000") {
|
|
isposttion = res.data.isposttion; //1是,0不是
|
|
organStatus = "";
|
|
let state = res.data.state;
|
|
paystatu = res.data.paystatu; //缴费状态(1、已缴费 2、待缴费)
|
|
organStatus = res.data.state;
|
|
userTypes = res.data.usertype;
|
|
if (isposttion == 1) {
|
|
//判断是在白名单里
|
|
if (res.data.usertype != undefined) {
|
|
// if (res.data.usertype == "个人") { //个人是没有白名单的
|
|
// $("#institutions").css("display", "none");
|
|
// // $("#facilitator").css("display", "none");
|
|
// if (paystatu == "1") {
|
|
// if (state == "1" || state == "3" || state == "7" || state == "0") {
|
|
// $("#organAuth02").val("认证中");
|
|
// $("#btnAgain").css("display", "none");
|
|
// } else if (state == "2" || state == "4" || state == "5") {
|
|
// $("#organAuth02").val("认证失败");
|
|
// $("#btnAgain").css("display", "block");
|
|
// } else if (state == "6") {
|
|
// $("#organAuth02").val("认证通过");
|
|
// $("#btnAgain").css("display", "none");
|
|
// blockisliCode(userTypes, res.data.islicode);
|
|
// }
|
|
// } else if (paystatu == "2") {
|
|
// $("#organAuth02").val("待缴费");
|
|
// $("#btnAgain").css("display", "none");
|
|
// }
|
|
// } else
|
|
if (res.data.usertype == "企业") {
|
|
$("#people").css("display", "none");
|
|
// $("#facilitator").css("display", "none");
|
|
if (state == "1" || state == "3" || state == "7" || state == "0") {
|
|
$("#organAuth01").val("认证中");
|
|
$("#btnAgain").css("display", "none");
|
|
} else if (state == "2" || state == "4" || state == "5") {
|
|
$("#organAuth01").val("认证失败");
|
|
$("#btnAgain").css("display", "block");
|
|
} else if (state == "6") {
|
|
$("#organAuth01").val("认证通过");
|
|
$("#btnAgain").css("display", "none");
|
|
blockisliCode(userTypes, res.data.islicode);
|
|
}
|
|
} else if (res.data.usertype == "服务商") {
|
|
// $("#institutions").css("display", "none");
|
|
// $("#people").css("display", "none");
|
|
$("#people").css("display", "none");
|
|
// $("#facilitator").css("display", "none");
|
|
if (state == "1" || state == "3" || state == "7" || state == "0") {
|
|
// $("#organAuth").val("认证中");
|
|
// $("#btnAgain").css("display", "none");
|
|
$("#organAuth01").val("认证中");
|
|
$("#btnAgain").css("display", "none");
|
|
} else if (state == "2" || state == "4" || state == "5") {
|
|
// $("#organAuth").val("认证失败");
|
|
// $("#btnAgain").css("display", "block");
|
|
$("#organAuth01").val("认证失败");
|
|
$("#btnAgain").css("display", "block");
|
|
} else if (state == "6") {
|
|
// $("#organAuth").val("认证通过");
|
|
// $("#btnAgain").css("display", "none");
|
|
// blockisliCode(userTypes, res.data.islicode);
|
|
$("#organAuth01").val("认证通过");
|
|
$("#btnAgain").css("display", "none");
|
|
blockisliCode(userTypes, res.data.islicode);
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
//判断不是在白名单里
|
|
if (res.data.usertype != undefined) {
|
|
if (res.data.usertype == "个人") {
|
|
$("#institutions").css("display", "none");
|
|
// $("#facilitator").css("display", "none");
|
|
if (paystatu == "1") {
|
|
if (state == "1" || state == "3" || state == "7" || state == "0") {
|
|
$("#organAuth02").val("认证中");
|
|
$("#btnAgain").css("display", "none");
|
|
} else if (state == "2" || state == "4" || state == "5") {
|
|
$("#organAuth02").val("认证失败");
|
|
$("#btnAgain").css("display", "block");
|
|
} else if (state == "6") {
|
|
$("#organAuth02").val("认证通过");
|
|
$("#btnAgain").css("display", "none");
|
|
blockisliCode(userTypes, res.data.islicode);
|
|
}
|
|
} else if (paystatu == "2") {
|
|
$("#organAuth02").val("待缴费");
|
|
$("#btnAgain").css("display", "none");
|
|
}
|
|
} else if (res.data.usertype == "企业") {
|
|
$("#people").css("display", "none");
|
|
// $("#facilitator").css("display", "none");
|
|
if (paystatu == "1") {
|
|
if (state == "1" || state == "3" || state == "7" || state == "0") {
|
|
$("#organAuth01").val("认证中");
|
|
$("#btnAgain").css("display", "none");
|
|
} else if (state == "2" || state == "4" || state == "5") {
|
|
$("#organAuth01").val("认证失败");
|
|
$("#btnAgain").css("display", "block");
|
|
} else if (state == "6") {
|
|
$("#organAuth01").val("认证通过");
|
|
$("#btnAgain").css("display", "none");
|
|
blockisliCode(userTypes, res.data.islicode);
|
|
}
|
|
} else if (paystatu == "2") {
|
|
$("#organAuth01").val("待缴费");
|
|
$("#btnAgain").css("display", "none");
|
|
}
|
|
} else if (res.data.usertype == "服务商") {
|
|
// $("#institutions").css("display", "none");
|
|
// $("#people").css("display", "none");
|
|
$("#people").css("display", "none");
|
|
// $("#facilitator").css("display", "none");
|
|
if (paystatu == "1") {
|
|
if (state == "1" || state == "3" || state == "7" || state == "0") {
|
|
// $("#organAuth").val("认证中");
|
|
// $("#btnAgain").css("display", "none");
|
|
$("#organAuth01").val("认证中");
|
|
$("#btnAgain").css("display", "none");
|
|
} else if (state == "2" || state == "4" || state == "5") {
|
|
// $("#organAuth").val("认证失败");
|
|
// $("#btnAgain").css("display", "block");
|
|
$("#organAuth01").val("认证失败");
|
|
$("#btnAgain").css("display", "block");
|
|
} else if (state == "6") {
|
|
// $("#organAuth").val("认证通过");
|
|
// $("#btnAgain").css("display", "none");
|
|
// blockisliCode(userTypes, res.data.islicode);
|
|
$("#organAuth01").val("认证通过");
|
|
$("#btnAgain").css("display", "none");
|
|
blockisliCode(userTypes, res.data.islicode);
|
|
}
|
|
} else if (paystatu == "2") {
|
|
// $("#organAuth").val("待缴费");
|
|
// $("#btnAgain").css("display", "none");
|
|
$("#organAuth01").val("待缴费");
|
|
$("#btnAgain").css("display", "none");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// if (res.status == 401) {
|
|
// cookieHandler.del("isliCode")
|
|
// cookieHandler.del("normal_login_token")
|
|
// cookieHandler.del("accountId")
|
|
// cookieHandler.del("cellPhone")
|
|
// cookieHandler.del("userType")
|
|
// Dreamer.error("请先登录");
|
|
// setTimeout(() => {
|
|
// window.location.href = 'login.html?time=' + new Date().getTime();
|
|
// }, 1500)
|
|
// }
|
|
}
|
|
|
|
//机构简介转化
|
|
// function Converord(okso){
|
|
// var k =new Array();
|
|
// for (var i = 0; i < okso.length; i++) {
|
|
// k[i] =okso[i].replace(/\\u/gi,'%u')
|
|
// }
|
|
// return k
|
|
// }
|
|
|
|
// 认证类型过滤
|
|
function userType_filter(data) {
|
|
if (data == "个人") {
|
|
return "0"
|
|
} else if (data == "企业") {
|
|
return "1"
|
|
} else if (data == "服务商") {
|
|
return "2"
|
|
} else {
|
|
return data
|
|
}
|
|
}
|
|
//判断认证通过有没有isliCode,没有就去重新登录
|
|
function blockisliCode(userTypes, islicode) {
|
|
cookieHandler.set("userType", userType_filter(userTypes));
|
|
cookieHandler.set("isliCode", islicode);
|
|
if (userTypes == "企业" || userTypes == "服务商") {
|
|
if (cookieHandler.get("isliCode") && cookieHandler.get("userType")) {
|
|
$(".tabs_item").show();
|
|
}
|
|
} else {
|
|
$(".tabs_item").hide();
|
|
}
|
|
}
|
|
|
|
//个人点击在按钮查看状态
|
|
function handelPersonal() {
|
|
delLocalStorage();
|
|
$(".hand_title").text("个人认证");
|
|
userNewtype = "个人";
|
|
let IdentityList = "";
|
|
for (var i = 0; i < userNewList.length; i++) {
|
|
if (userNewList[i].userType == '个人') {
|
|
OrganIndividuals.push(userNewList[i]);
|
|
IdentityList += '<input type="checkbox" name="Personage" value="' + userNewList[i].saleType + '">' +
|
|
'<label>' + userNewList[i].saleType + '</label>';
|
|
}
|
|
}
|
|
$(".PersonageIdentity").html(IdentityList); //渲染身份
|
|
Identity = $("input[name='Personage']");
|
|
//选中身份,获取value
|
|
// OrganizationsMony = [];
|
|
Identity.each(function (i) {
|
|
$(this).click(function () {
|
|
if (this.checked == true) {
|
|
let checkPrice = 0;
|
|
let newValue = "";
|
|
newValue = this.value;
|
|
for (var i = 0; i < OrganIndividuals.length; i++) {
|
|
if (OrganIndividuals[i].saleType == this.value) {
|
|
OrganizationsMony.push({
|
|
saleType: this.value,
|
|
fee: OrganIndividuals[i].fee
|
|
});
|
|
}
|
|
}
|
|
//计算金额相加
|
|
OrganizationsMony.myForEach(function (v, index, arr) {
|
|
let total = Math.round(parseFloat(v.fee * 100)) / 100;
|
|
checkPrice += Number(total);
|
|
$("#Personageification").html('¥' + checkPrice.toFixed(2));
|
|
});
|
|
} else {
|
|
let newValue = "";
|
|
newValue = this.value;
|
|
OrganizationsMony.myForEach(function (v, index, arr) {
|
|
if (v.saleType == newValue) {
|
|
OrganizationsMony.splice(index, 1);
|
|
let nodeber = OrganizationsMony.reduce(function (a, b) {
|
|
return a + Math.round(parseFloat(b.fee * 100)) / 100;
|
|
}, 0); //选中之后,金额相加
|
|
$("#Personageification").html('¥' + nodeber.toFixed(2));
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
if (organStatus == "-1") {
|
|
$("#personalHand").css("display", "block");
|
|
$("#cetifiTotal").css("display", "none");
|
|
$("#hand_box").css("display", "block");
|
|
} else if (isposttion == 1) {
|
|
PersonalButStatus();
|
|
} else {
|
|
if (paystatu == 2) {
|
|
//待缴费
|
|
window.location.href = "PaymentOrder.html?time=" + new Date().getTime(); //进入认证缴费支付页面
|
|
} else if (paystatu == 1) {
|
|
//已缴费
|
|
PersonalButStatus();
|
|
// if (organStatus == "2" || organStatus == "4" || organStatus == "5") {
|
|
// $("#personalHand").css('display', 'block');
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#hand_box').css('display', 'block');
|
|
// personalEdit();
|
|
// } else if (organStatus == "1" || organStatus == "3" || organStatus == "7" || organStatus == "0") {
|
|
// $("#personalHand").css('display', 'none');
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#hand_box').css('display', 'block');
|
|
// $("#personaling").css('display', 'block');
|
|
// personal();
|
|
// } else {
|
|
// $("#personalHand").css('display', 'none');
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#hand_box').css('display', 'block');
|
|
// $("#personalSuccess").css('display', 'block');
|
|
// personal();
|
|
// }
|
|
}
|
|
}
|
|
}
|
|
|
|
function PersonalButStatus() {
|
|
//个人按钮状态
|
|
if (organStatus == "2" || organStatus == "4" || organStatus == "5") {
|
|
$("#personalHand").css("display", "block");
|
|
$("#cetifiTotal").css("display", "none");
|
|
$("#hand_box").css("display", "block");
|
|
personalEdit();
|
|
} else if (organStatus == "1" || organStatus == "3" || organStatus == "7" || organStatus == "0") {
|
|
$("#personalHand").css("display", "none");
|
|
$("#cetifiTotal").css("display", "none");
|
|
$("#hand_box").css("display", "block");
|
|
$("#personaling").css("display", "block");
|
|
personal();
|
|
} else {
|
|
$("#personalHand").css("display", "none");
|
|
$("#cetifiTotal").css("display", "none");
|
|
$("#hand_box").css("display", "block");
|
|
$("#personalSuccess").css("display", "block");
|
|
personal();
|
|
}
|
|
}
|
|
|
|
//重新修改认证类型
|
|
// function organAuthAgain() {
|
|
// if (userTypes == "企业") {
|
|
// if ($("#organAuthAgain").val() == "重新修改认证类型") {
|
|
// // $("#facilitator").css("display", "block");
|
|
// $("#institutions").css("display", "none");
|
|
// $("#people").css("display", "block");
|
|
// $("#organAuthAgain").val("返回");
|
|
// } else {
|
|
// // $("#facilitator").css("display", "none");
|
|
// $("#institutions").css("display", "block");
|
|
// $("#people").css("display", "none");
|
|
// $("#organAuthAgain").val("重新修改认证类型");
|
|
// }
|
|
// } else if (userTypes == "个人") {
|
|
// if ($("#organAuthAgain").val() == "重新修改认证类型") {
|
|
// // $("#facilitator").css("display", "block");
|
|
// $("#institutions").css("display", "block");
|
|
// $("#people").css("display", "none");
|
|
// $("#organAuthAgain").val("返回");
|
|
// } else {
|
|
// // $("#facilitator").css("display", "none");
|
|
// $("#institutions").css("display", "none");
|
|
// $("#people").css("display", "block");
|
|
// $("#organAuthAgain").val("重新修改认证类型");
|
|
// }
|
|
// } else if (userTypes == "服务商") {
|
|
// if ($("#organAuthAgain").val() == "重新修改认证类型") {
|
|
// // $("#facilitator").css("display", "none");
|
|
// $("#institutions").css("display", "block");
|
|
// $("#people").css("display", "block");
|
|
// $("#organAuthAgain").val("返回");
|
|
// } else {
|
|
// // $("#facilitator").css("display", "block");
|
|
// $("#institutions").css("display", "none");
|
|
// $("#people").css("display", "none");
|
|
// $("#organAuthAgain").val("重新修改认证类型");
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
//个人认证失败详情接口
|
|
function personalEdit() {
|
|
var ajaxperEditDemo = new AJAX_OBJ(Paymentlist + "entuiprise/listLibrary?AuId=" + accountId, onperEditSuccess,
|
|
onUrlError);
|
|
ajaxperEditDemo.postRequestData();
|
|
}
|
|
|
|
function onperEditSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.data != undefined) {
|
|
$("#pernalName").val(res.data.name);
|
|
$("#pernalCard").val(res.data.uscc);
|
|
$("#peopleProvince").val(res.data.regionprovince);
|
|
showGetCity(res.data.regionprovince, "peopleCity", res.data.regioncity);
|
|
showGetCountry(res.data.regioncity, "peopleProvince", "peopleDistrict", res.data.regiondistrict);
|
|
$("#pernalAddress").val(res.data.address);
|
|
$("#pernalPhone").val(res.data.contactscellphone);
|
|
$("#pernalEmial").val(res.data.contactsemail);
|
|
$("#pernalBank").val(res.data.publicaccount);
|
|
$("#pernalOpenBank").val(res.data.bankname);
|
|
$("#provincePeral").val(res.data.bankprovince);
|
|
showGetCity(res.data.bankprovince, "cityPeral", res.data.bankcity);
|
|
showGetCountry(res.data.bankcity, "provincePeral", "countyPeral", res.data.bankdistrict);
|
|
$("#peralBankPhone").val(res.data.bankcellphone);
|
|
for (var i = 0; i < Intermediary.length; i++) {
|
|
if (res.data.parentislicode == Intermediary[i].name) {
|
|
$("#servicePersonal").val(Intermediary[i].islicode);
|
|
break;
|
|
}
|
|
} //推荐中介服务机构
|
|
// ParentisliCode(res.data.parentislicode, "servicePersonal"); //推荐中介服务机构
|
|
seeCheckBox(res.data.saleType, "Personage"); //身份
|
|
failureIdentity = res.data.saleType.split(",");
|
|
for (var i = 0; i < OrganIndividuals.length; i++) {
|
|
for (var j = 0; j < failureIdentity.length; j++) {
|
|
if (OrganIndividuals[i].saleType == failureIdentity[j]) {
|
|
OrganizationsMony.push({
|
|
saleType: failureIdentity[j],
|
|
fee: OrganIndividuals[i].fee
|
|
});
|
|
}
|
|
}
|
|
}
|
|
// serviceAgency(res.data.name);//获取认证失败的机构是否在白名单
|
|
$("#Personageification").text("¥" + res.data.fees); //认证费用
|
|
}
|
|
}
|
|
|
|
// 个人认证-认证中
|
|
function personal() {
|
|
var ajaxpersonalDemo = new AJAX_OBJ(Paymentlist + "entuiprise/listLibrary?AuId=" + accountId, onpersonalSuccess,
|
|
onUrlError);
|
|
ajaxpersonalDemo.postRequestData();
|
|
}
|
|
|
|
function onpersonalSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.data != undefined) {
|
|
$(".personal_submit_time").text(dateTime(res.data.createat));
|
|
$(".details_personal_name").text(res.data.name);
|
|
$(".details_personal_number").text(res.data.uscc);
|
|
$(".details_personal_islicode").text(res.data.islicode);
|
|
$(".details_personal_region").text(res.data.regionprovince + "-" + res.data.regioncity + "-" + res.data
|
|
.regiondistrict);
|
|
$(".details_personal_address").text(res.data.address);
|
|
$(".details_personal_phone").text(res.data.contactscellphone);
|
|
$(".details_personal_email").text(res.data.contactsemail);
|
|
$(".details_personal_bank_account").text(res.data.publicaccount);
|
|
$(".details_personal_bank_name").text(res.data.bankname);
|
|
$(".details_personal_bank_phone").text(res.data.bankcellphone);
|
|
$(".details_personal_token_time").text(dateTime(res.data.audittime));
|
|
$(".details_personal_bank_address").text(res.data.bankprovince + "-" + res.data.bankcity + "-" + res.data
|
|
.bankdistrict);
|
|
|
|
$(".details_personal_parent_islicode").text(res.data.parentislicode);
|
|
$(".details_personal_parent_islicode").attr("title", res.data.parentislicode);
|
|
$(".details_personal_parent_identity").text(res.data.saleType);
|
|
$(".details_personal_parent_identity").attr("title", res.data.saleType);
|
|
$(".personal_submit_time").attr("title", dateTime(res.data.createat));
|
|
$(".details_personal_name").attr("title", res.data.name);
|
|
$(".details_personal_number").attr("title", res.data.uscc);
|
|
$(".details_personal_islicode").attr("title", res.data.islicode);
|
|
$(".details_personal_number").attr("title", res.data.uscc);
|
|
$(".details_personal_region").attr("title", res.data.regionprovince + "-" + res.data.regioncity + "-" + res.data
|
|
.regiondistrict);
|
|
$(".details_personal_address").attr("title", res.data.address);
|
|
$(".details_personal_phone").attr("title", res.data.contactscellphone);
|
|
$(".details_personal_email").attr("title", res.data.contactsemail);
|
|
$(".details_personal_bank_account").attr("title", res.data.publicaccount);
|
|
$(".details_personal_bank_name").attr("title", res.data.bankname);
|
|
$(".details_personal_bank_phone").attr("title", res.data.bankcellphone);
|
|
$(".details_personal_token_time").attr("title", dateTime(res.data.audittime));
|
|
$(".details_personal_bank_address").attr("title", res.data.bankprovince + "-" + res.data.bankcity + "-" + res
|
|
.data.bankdistrict);
|
|
}
|
|
}
|
|
|
|
//个人,输入身份证号验证是否已注册 "1"-表示已被注册 "0"-表示未被注册
|
|
function PersonalID(idNumber) {
|
|
let CreditCode = false; //判断机构名称是不是已经注册
|
|
$.ajax({
|
|
type: "GET", //请求方式
|
|
url: Paymentlist + "entuiprise/v1/personal-user/id-number/unique-validate?idNumber=" + idNumber +
|
|
"&userId=" + accountId, //地址,就是json文件的请求路径
|
|
dataType: "json", //数据类型可以为 text xml json script jsonp
|
|
contentType: "application/json",
|
|
async: false,
|
|
headers: {
|
|
normal_login_token: cookieHandler.get("normal_login_token"), //这里是Token
|
|
},
|
|
success: function (res) {
|
|
//返回的参数就是 action里面所有的有get和set方法的参数
|
|
if (res.resultCode == "00000000") {
|
|
CreditCode = res.data == 1 ? false : true;
|
|
}
|
|
},
|
|
});
|
|
return CreditCode;
|
|
}
|
|
|
|
// 个人认证-表单校验
|
|
function formPeralValidate() {
|
|
$("#form-personal").bootstrapValidator({
|
|
message: "This value is not valid",
|
|
excluded: [":disabled"],
|
|
feedbackIcons: {
|
|
valid: "glyphicon glyphicon-ok",
|
|
invalid: "glyphicon glyphicon-remove",
|
|
validating: "glyphicon glyphicon-refresh",
|
|
},
|
|
fields: {
|
|
pernalName: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "姓名不能为空",
|
|
},
|
|
callback: {
|
|
message: "姓名格式不对",
|
|
callback: function (value, validator) {
|
|
var regExp = /^[\u4e00-\u9fa5]{2,}$/;
|
|
if (regExp.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
pernalCard: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "身份证不能为空",
|
|
},
|
|
callback: {
|
|
/*自定义,可以在这里与其他输入项联动校验*/
|
|
message: "身份证号码无效!",
|
|
callback: function (value, validator, $field) {
|
|
//18位身份证号码的正则表达式
|
|
var regIdCard =
|
|
/^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
|
|
//如果通过该验证,说明身份证格式正确,但准确性还需计算
|
|
var idCard = value;
|
|
if (regIdCard.test(idCard)) {
|
|
if (idCard.length == 18) {
|
|
var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8,
|
|
4, 2); //将前17位加权因子保存在数组里
|
|
var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3,
|
|
2); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
|
|
var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
|
|
for (var i = 0; i < 17; i++) {
|
|
idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
|
|
}
|
|
var idCardMod = idCardWiSum % 11; //计算出校验码所在数组的位置
|
|
var idCardLast = idCard.substring(17); //得到最后一位身份证号码
|
|
//如果等于2,则说明校验码是10,身份证号码最后一位应该是X
|
|
if (idCardMod == 2) {
|
|
if (idCardLast == "X" || idCardLast == "x") {
|
|
// return true;
|
|
//alert("恭喜通过验证啦!");
|
|
if (PersonalID(value)) {
|
|
return true;
|
|
} else {
|
|
validator.updateMessage("pernalCard", "callback",
|
|
"该身份证号码已注册,请重新输入");
|
|
return false;
|
|
}
|
|
} else {
|
|
return false;
|
|
//alert("身份证号码错误!");
|
|
}
|
|
} else {
|
|
//用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
|
|
if (idCardLast == idCardY[idCardMod]) {
|
|
//alert("恭喜通过验证啦!");
|
|
// return true;
|
|
if (PersonalID(value)) {
|
|
return true;
|
|
} else {
|
|
validator.updateMessage("pernalCard", "callback",
|
|
"该身份证号码已注册,请重新输入");
|
|
return false;
|
|
}
|
|
} else {
|
|
return false;
|
|
//alert("身份证号码错误!");
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
//alert("身份证格式不正确!");
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
peopleProvince: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "省份不能为空",
|
|
},
|
|
callback: {
|
|
message: "省不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择省") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
peopleCity: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "市不能为空",
|
|
},
|
|
callback: {
|
|
message: "市不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择市") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
peopleDistrict: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "区/县不能为空",
|
|
},
|
|
callback: {
|
|
message: "区/县不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择区/县") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
pernalAddress: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "联系地址不能为空",
|
|
},
|
|
callback: {
|
|
message: "联系地址不能输入特殊字符",
|
|
callback: function (value, validator) {
|
|
var regExp = new RegExp(
|
|
"[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"
|
|
);
|
|
if (regExp.test(value)) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
pernalJust: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "身份证扫描件正面不能为空",
|
|
},
|
|
},
|
|
},
|
|
pernalResver: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "身份证扫描件反面不能为空",
|
|
},
|
|
},
|
|
},
|
|
operatorJust: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "身份证正面不能为空",
|
|
},
|
|
},
|
|
},
|
|
pernalPhone: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "联系电话不能为空",
|
|
},
|
|
callback: {
|
|
message: "联系电话格式不正确",
|
|
callback: function (value, validator) {
|
|
var regExp = new RegExp("^1[3-9]\\d{9}$");
|
|
if (regExp.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
pernalEmial: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "邮箱地址不能为空",
|
|
},
|
|
callback: {
|
|
message: "邮箱格式不正确",
|
|
callback: function (value, validator) {
|
|
var reg_email = new RegExp(
|
|
"^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$"
|
|
);
|
|
if (reg_email.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
pernalBank: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "银行账户账号不能为空",
|
|
},
|
|
callback: {
|
|
message: "银行账号格式不对",
|
|
callback: function (value, validator) {
|
|
// var pattern = /^([1-9]{1})(\d{15}|\d{16}|\d{18}|\d{20})$/;
|
|
var pattern = /^[0-9]\d*$/;
|
|
if (pattern.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
pernalOpenBank: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "开户银行不能为空",
|
|
},
|
|
callback: {
|
|
message: "开户银行不能有特殊字符",
|
|
callback: function (value, validator) {
|
|
var regExp = new RegExp(
|
|
"[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"
|
|
);
|
|
if (regExp.test(value)) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
provincePeral: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "省份不能为空",
|
|
},
|
|
callback: {
|
|
message: "省不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择省") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
cityPeral: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "市不能为空",
|
|
},
|
|
callback: {
|
|
message: "市不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择市") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
countyPeral: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "区/县不能为空",
|
|
},
|
|
callback: {
|
|
message: "区/县不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择区/县") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
peralBankPhone: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "开户银行预留手机号不能为空",
|
|
},
|
|
callback: {
|
|
message: "开户银行预留手机格式不正确",
|
|
callback: function (value, validator) {
|
|
var regExp = new RegExp("^1[3-9]\\d{9}$");
|
|
if (regExp.test(value)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
servicePersonal: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: "推荐中介服务机构不能为空",
|
|
},
|
|
callback: {
|
|
message: "推荐中介服务机构不能为空",
|
|
callback: function (value, validator) {
|
|
if (value == "选择推荐中介服务机构") {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
}
|
|
|
|
//清除本地储存认证阅读的倒计时
|
|
function delLocalStorage() {
|
|
localStorage.removeItem("Privacy");
|
|
localStorage.removeItem("User");
|
|
localStorage.removeItem("exceptions");
|
|
}
|
|
|
|
//第一次机构,服务商认证查看协议倒计时 《临时场内交易主体进场协议》《临时买卖委托协议》《临时业务机构委托协议》
|
|
$("#checkbox_organization").bind('change', function () {
|
|
if (organStatus == "-1") {
|
|
localStorage.removeItem("ExceptionsTime");
|
|
if (localStorage.getItem("Privacy") == null && localStorage.getItem("User") == null && localStorage
|
|
.getItem("exceptions") == null) {
|
|
document.getElementById("checkbox_organization").checked = false;
|
|
Dreamer.warning("请先预览《临时场内交易主体进场协议》和《临时买卖委托协议》和《临时业务机构委托协议》", 2000);
|
|
} else if (localStorage.getItem("Privacy") == null && localStorage.getItem("User") == null) {
|
|
Dreamer.warning("请先预览《临时场内交易主体进场协议》和《临时买卖委托协议》", 2000);
|
|
document.getElementById("checkbox_organization").checked = false;
|
|
} else if (localStorage.getItem("User") == null && localStorage.getItem("exceptions") == null) {
|
|
Dreamer.warning("请先预览《临时买卖委托协议》和《临时业务机构委托协议》", 2000);
|
|
document.getElementById("checkbox_organization").checked = false;
|
|
} else if (localStorage.getItem("Privacy") == null && localStorage.getItem("exceptions") == null) {
|
|
Dreamer.warning("请先预览 《临时场内交易主体进场协议》和《临时业务机构委托协议》", 2000);
|
|
document.getElementById("checkbox_organization").checked = false;
|
|
} else if (localStorage.getItem("exceptions") == null) {
|
|
Dreamer.warning("请先预览《临时业务机构委托协议》", 2000);
|
|
document.getElementById("checkbox_organization").checked = false;
|
|
} else if (localStorage.getItem("Privacy") == null) {
|
|
Dreamer.warning("请先预览《临时场内交易主体进场协议》", 2000);
|
|
document.getElementById("checkbox_organization").checked = false;
|
|
} else if (localStorage.getItem("User") == null) {
|
|
Dreamer.warning("请先预览《临时买卖委托协议》", 2000);
|
|
document.getElementById("checkbox_organization").checked = false;
|
|
}
|
|
}
|
|
});
|
|
|
|
//第一次个人认证查看协议倒计时 《临时场内交易主体进场协议》《临时买卖委托协议》《临时业务机构委托协议》
|
|
$("#checkbox3").bind('change', function () {
|
|
if (organStatus == "-1") {
|
|
localStorage.removeItem("ExceptionsTime");
|
|
if (localStorage.getItem("Privacy") == null && localStorage.getItem("User") == null && localStorage
|
|
.getItem("exceptions") == null) {
|
|
document.getElementById("checkbox3").checked = false;
|
|
Dreamer.warning("请先预览《临时场内交易主体进场协议》和《临时买卖委托协议》和《临时业务机构委托协议》", 2000);
|
|
} else if (localStorage.getItem("Privacy") == null && localStorage.getItem("User") == null) {
|
|
Dreamer.warning("请先预览《临时场内交易主体进场协议》和《临时买卖委托协议》", 2000);
|
|
document.getElementById("checkbox3").checked = false;
|
|
} else if (localStorage.getItem("User") == null && localStorage.getItem("exceptions") == null) {
|
|
Dreamer.warning("请先预览《临时买卖委托协议》和《临时业务机构委托协议》", 2000);
|
|
document.getElementById("checkbox3").checked = false;
|
|
} else if (localStorage.getItem("Privacy") == null && localStorage.getItem("exceptions") == null) {
|
|
Dreamer.warning("请先预览 《临时场内交易主体进场协议》和《临时业务机构委托协议》", 2000);
|
|
document.getElementById("checkbox3").checked = false;
|
|
} else if (localStorage.getItem("exceptions") == null) {
|
|
Dreamer.warning("请先预览《临时业务机构委托协议》", 2000);
|
|
document.getElementById("checkbox3").checked = false;
|
|
} else if (localStorage.getItem("Privacy") == null) {
|
|
Dreamer.warning("请先预览《临时场内交易主体进场协议》", 2000);
|
|
document.getElementById("checkbox3").checked = false;
|
|
} else if (localStorage.getItem("User") == null) {
|
|
Dreamer.warning("请先预览《临时买卖委托协议》", 2000);
|
|
document.getElementById("checkbox3").checked = false;
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
// 个人认证-提交认证
|
|
function handelSubmitPeral() {
|
|
if (Submit("Personage", "NomIdentity")) {
|
|
if ($('#checkbox3').is(':checked')) {
|
|
$("#form-personal").data("bootstrapValidator").validate();
|
|
var flag = $("#form-personal").data("bootstrapValidator").isValid();
|
|
if ($("#servicePersonal").val() == 0) {
|
|
IntermediaryIs = 0;
|
|
} else {
|
|
IntermediaryIs = $("#servicePersonal").val();
|
|
}
|
|
let deal = ""; //存入买方,卖方
|
|
if (OrganizationsMony.length != 0) {
|
|
//存入买方,卖方
|
|
for (var i = 0; i < OrganizationsMony.length; i++) {
|
|
if (i == OrganizationsMony.length - 1) {
|
|
deal += OrganizationsMony[i].saleType;
|
|
} else {
|
|
deal += OrganizationsMony[i].saleType + ",";
|
|
}
|
|
}
|
|
}
|
|
|
|
if (flag) {
|
|
// var peopledata = '{' +
|
|
// //'"accountOpeningPermit":"' + document.getElementById("accountOpeningPermit").files[0] + '",' +
|
|
// '"address": "' + $("#pernalAddress").val() + '",' +
|
|
// '"auditOpinion": "",' +
|
|
// '"avatar": "",' +
|
|
// '"bankAccount": "' + $("#pernalBank").val() + '",' +
|
|
// '"bankCellPhone": "' + $("#peralBankPhone").val() + '",' +
|
|
// '"bankCity": "' + $("#cityPeral").val() + '",' +
|
|
// '"bankDistrict": "' + $("#countyPeral").val() + '",' +
|
|
// '"bankName": "' + $("#pernalOpenBank").val() + '",' +
|
|
// '"bankProvince": "' + $("#provincePeral").val() + '",' +
|
|
// '"cerScanPath1": "' + document.getElementById("pernalJust").files[0].httpurl + '",' +
|
|
// '"cerScanPath2": "' + document.getElementById("pernalResver").files[0].httpurl + '",' +
|
|
// '"contactsCellPhone": "' + $("#pernalPhone").val() + '",' +
|
|
// '"contactsEmail": "' + $("#pernalEmial").val() + '",' +
|
|
// '"createAt": "",' +
|
|
// '"idNumber": "' + $("#pernalCard").val() + '",' +
|
|
// '"islicode": "",' +
|
|
// '"name": "' + $("#pernalName").val() + '",' +
|
|
// '"regionCity": "' + $("#peopleCity").val() + '",' +
|
|
// '"regionDistrict": "' + $("#peopleDistrict").val() + '",' +
|
|
// '"regionProvince": "' + $("#peopleProvince").val() + '",' +
|
|
// '"state": 9,' + //状态后台控制
|
|
// '"updateAt": "",' +
|
|
// '"userId": "' + accountId + '",' +
|
|
// '"userType": "个人"' +
|
|
// '}';
|
|
var peopledata =
|
|
"{" +
|
|
'"name": "' + $("#pernalName").val() + '",' + //姓名
|
|
'"uscc": "' + $("#pernalCard").val() + '",' + //身份证号
|
|
'"avatar": "",' + //头像地址
|
|
'"regionprovince": "' + $("#peopleProvince").val() + '",' + //注册地区-省
|
|
'"regioncity": "' + $("#peopleCity").val() + '",' + //注册地区-市
|
|
'"regiondistrict": "' + $("#peopleDistrict").val() + '",' + //注册地区-区/县
|
|
'"address": "' + $("#pernalAddress").val() + '",' + //详细地址
|
|
'"cerscanpath1": "' + document.getElementById("pernalJust").files[0].httpurl + '",' +
|
|
//个人身份证扫正面描件url
|
|
'"cerscanpath2": "' + document.getElementById("pernalResver").files[0].httpurl + '",' +
|
|
//个人身份证扫反面描件url
|
|
'"contactscellphone": "' + $("#pernalPhone").val() + '",' + //联系电话
|
|
'"contactsemail": "' + $("#pernalEmial").val() + '",' + //邮箱地址
|
|
'"publicaccount": "' + $("#pernalBank").val() + '",' + //对公账户号
|
|
'"bankname": "' + $("#pernalOpenBank").val() + '",' + //开户银行名称
|
|
'"bankprovince": "' + $("#provincePeral").val() + '",' + //开户银行所在地-省
|
|
'"bankcity": "' + $("#cityPeral").val() + '",' + //开户银行所在地-市
|
|
'"bankdistrict": "' + $("#countyPeral").val() + '",' + //开户银行所在地-区/县
|
|
'"bankcellphone": "' + $("#peralBankPhone").val() + '",' + //开户银行预留手机号
|
|
'"parentislicode": "' + IntermediaryIs + '",' + //推荐中介服务机构 中介机构is
|
|
'"isposttion": "' + 0 + '",' + //是否后置名单(0、否 1、是 )
|
|
'"saleType": "' + deal + '",' + //买卖方类型
|
|
'"fees": "' + $("#Personageification").text().split("¥")[1] + '",' + //总费用
|
|
// '"state": "' + (organStatus == "2" || organStatus == "4" || organStatus == "5" ? 8 : "") + '",' + //状态后台控制
|
|
'"updateat": "",' +
|
|
'"userid": "' + accountId + '",' +
|
|
'"usertype": "个人"' +
|
|
"}";
|
|
|
|
// Preservation(agreement);
|
|
|
|
// 认证(缴费)接口
|
|
var ajaxselfUserDemo = new AJAX_OBJ(Paymentlist + "entuiprise/mannAgeDate", onselfUserSuccess,
|
|
onUrlError);
|
|
ajaxselfUserDemo.postRequestData(peopledata);
|
|
}
|
|
} else {
|
|
Dreamer.warning("请勾选《临时场内交易主体进场协议》和《临时买卖委托协议》和《临时业务机构委托协议》");
|
|
}
|
|
}
|
|
}
|
|
|
|
//个人认证
|
|
function onselfUserSuccess(xmlHttp) {
|
|
var res = eval("(" + xmlHttp.responseText + ")");
|
|
if (res.resultCode == "00000000") {
|
|
$("#PersonBtn").attr("disabled", true); //按钮禁用
|
|
delLocalStorage();
|
|
Dreamer.success("认证信息提交成功");
|
|
btnStatus();
|
|
// if (Postlist == 1) {
|
|
// let shopname = "";
|
|
// OrganizationsMony.myForEach(function(v, index, arr) {
|
|
// if (index < OrganizationsMony.length - 1) {
|
|
// shopname += v.saleType + ",";
|
|
// } else {
|
|
// shopname += v.saleType + "";
|
|
// }
|
|
// })
|
|
// if (organStatus == "2" || organStatus == "4" || organStatus == "5") { //查看是否是认证失败
|
|
// if (failureIdentity.length == OrganizationsMony.length) { // 判断详情数据中的身份与重新提交认证的身份长度是否一样
|
|
// btnStatus();
|
|
// handelBack();
|
|
// } else {
|
|
// let Whitelist = {
|
|
// saleType:shopname,
|
|
// type: userTypes,
|
|
// userid: accountId
|
|
// }
|
|
// Whitelistssellers(Whitelist);
|
|
// }
|
|
// } else {
|
|
// let Whitelist = {
|
|
// saleType:shopname,
|
|
// type: userTypes,
|
|
// userid: accountId
|
|
// }
|
|
// Whitelistssellers(Whitelist);
|
|
// }
|
|
// } else {
|
|
if (organStatus == "2" || organStatus == "4" || organStatus == "5") { //查看是否是认证失败
|
|
if (failureIdentity.length == OrganizationsMony.length) { // 判断详情数据中的身份与重新提交认证的身份长度是否一样
|
|
btnStatus();
|
|
handelBack();
|
|
} else {
|
|
let newOrder = {
|
|
isok: "2",
|
|
userid: accountId,
|
|
};
|
|
SerOrderDetils(newOrder);
|
|
}
|
|
// for (var i = 0; i < failureIdentity.length; i++) {
|
|
// let newIdentity = OrganizationsMony.filter(function(item){
|
|
// return failureIdentity[i] != item.saleType
|
|
// })
|
|
// if(newIdentity.length == 0){
|
|
// btnStatus();
|
|
// handelBack();
|
|
// }else{
|
|
// let newOrder = {
|
|
// isok: "2",
|
|
// userid: accountId,
|
|
// };
|
|
// SerOrderDetils(newOrder);
|
|
// }
|
|
// }
|
|
} else {
|
|
let newOrder = {
|
|
isok: "2",
|
|
userid: accountId,
|
|
};
|
|
SerOrderDetils(newOrder);
|
|
}
|
|
// }
|
|
} else {
|
|
Dreamer.error(res.resultMsg);
|
|
}
|
|
}
|
|
|
|
/*
|
|
服务商认证
|
|
*/
|
|
|
|
// 服务商认证表单校验
|
|
// function formProviceValidate () {
|
|
// $('#form-provice').bootstrapValidator({
|
|
// message: 'This value is not valid',
|
|
// excluded: [':disabled'],
|
|
// feedbackIcons: {
|
|
// valid: 'glyphicon glyphicon-ok',
|
|
// invalid: 'glyphicon glyphicon-remove',
|
|
// validating: 'glyphicon glyphicon-refresh'
|
|
// },
|
|
// fields: {
|
|
// proviceBook: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '经办人授权委托书不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// proviceJust: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '经办人身份证正面不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// proviceResver: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '经办人身份证反面不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// proviceName: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '经办人姓名不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '经办人姓名格式不对',
|
|
// callback: function (value, validator) {
|
|
// var regExp = /^[\u4e00-\u9fa5]{2,}$/;
|
|
// if (regExp.test(value)) {
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceCard: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '经办人身份证号不能为空'
|
|
// },
|
|
// callback: {
|
|
// /*自定义,可以在这里与其他输入项联动校验*/
|
|
// message: '身份证号码无效!',
|
|
// callback: function (value, validator, $field) {
|
|
// //18位身份证号码的正则表达式
|
|
// var regIdCard =
|
|
// /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
|
|
// //如果通过该验证,说明身份证格式正确,但准确性还需计算
|
|
// var idCard = value;
|
|
// if (regIdCard.test(idCard)) {
|
|
// if (idCard.length == 18) {
|
|
// var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8,
|
|
// 4, 2); //将前17位加权因子保存在数组里
|
|
// var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3,
|
|
// 2); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
|
|
// var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
|
|
// for (var i = 0; i < 17; i++) {
|
|
// idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
|
|
// }
|
|
// var idCardMod = idCardWiSum % 11; //计算出校验码所在数组的位置
|
|
// var idCardLast = idCard.substring(17); //得到最后一位身份证号码
|
|
// //如果等于2,则说明校验码是10,身份证号码最后一位应该是X
|
|
// if (idCardMod == 2) {
|
|
// if (idCardLast == "X" || idCardLast == "x") {
|
|
// return true;
|
|
// //alert("恭喜通过验证啦!");
|
|
// } else {
|
|
// return false;
|
|
// //alert("身份证号码错误!");
|
|
// }
|
|
// } else {
|
|
// //用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
|
|
// if (idCardLast == idCardY[idCardMod]) {
|
|
// //alert("恭喜通过验证啦!");
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// //alert("身份证号码错误!");
|
|
// }
|
|
// }
|
|
// }
|
|
// } else {
|
|
// //alert("身份证格式不正确!");
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceBusiness: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '营业执照/事业单位法人证书扫描件不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// proviceOrganName: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '机构名称不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '机构名称格式不对',
|
|
// callback: function (value, validator) {
|
|
// var regExp = /^[\(\)(\)\u4e00-\u9fa5]{6,}$/;
|
|
// if (regExp.test(value)) {
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceOrganCode: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '统一社会信用代码不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '统一社会信用代码格式不对',
|
|
// callback: function (value, validator) {
|
|
// if (CheckSocialCreditCode(value)) {
|
|
// if (UnifiedSocialCreditCode(value)) {
|
|
// return true
|
|
// } else {
|
|
// validator.updateMessage('uscc', 'callback', '该统一信用代码已注册,请重新输入');
|
|
// return false;
|
|
// }
|
|
// } else {
|
|
// return false
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// industryType: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '行业类别不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '行业类别不能为空',
|
|
// callback: function (value, validator) {
|
|
// if (value == "选择行业类别") {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceAddress: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '详细地址不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '详细地址只能输入32个字符',
|
|
// callback: function (value, validator) {
|
|
// if (value.length > 32) {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceBuiness: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '法人证件号不能为空'
|
|
// },
|
|
// callback: {
|
|
// /*自定义,可以在这里与其他输入项联动校验*/
|
|
// message: '身份证号码无效!',
|
|
// callback: function (value, validator, $field) {
|
|
// //18位身份证号码的正则表达式
|
|
// var regIdCard =
|
|
// /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
|
|
// //如果通过该验证,说明身份证格式正确,但准确性还需计算
|
|
// var idCard = value;
|
|
// if (regIdCard.test(idCard)) {
|
|
// if (idCard.length == 18) {
|
|
// var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8,
|
|
// 4, 2); //将前17位加权因子保存在数组里
|
|
// var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3,
|
|
// 2); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
|
|
// var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
|
|
// for (var i = 0; i < 17; i++) {
|
|
// idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
|
|
// }
|
|
// var idCardMod = idCardWiSum % 11; //计算出校验码所在数组的位置
|
|
// var idCardLast = idCard.substring(17); //得到最后一位身份证号码
|
|
// //如果等于2,则说明校验码是10,身份证号码最后一位应该是X
|
|
// if (idCardMod == 2) {
|
|
// if (idCardLast == "X" || idCardLast == "x") {
|
|
// return true;
|
|
// //alert("恭喜通过验证啦!");
|
|
// } else {
|
|
// return false;
|
|
// //alert("身份证号码错误!");
|
|
// }
|
|
// } else {
|
|
// //用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
|
|
// if (idCardLast == idCardY[idCardMod]) {
|
|
// //alert("恭喜通过验证啦!");
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// //alert("身份证号码错误!");
|
|
// }
|
|
// }
|
|
// }
|
|
// } else {
|
|
// //alert("身份证格式不正确!");
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceTackTime: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '营业执照有效期不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '营业执照有效期年限不能小于当前年限',
|
|
// callback: function (value, validator) {
|
|
// let date_now = new Date();
|
|
// let year = date_now.getFullYear();
|
|
// // let month = date_now.getMonth() + 1;
|
|
// // let strDate = date_now.getDate();
|
|
// // if (month >= 1 && month <= 9) {
|
|
// // month = "0" + month;
|
|
// // }
|
|
// // if (strDate >= 0 && strDate <= 9) {
|
|
// // strDate = "0" + strDate;
|
|
// // }
|
|
// let new_time = value.split('-');
|
|
// if (new_time[0] < year) {
|
|
// // if (new_time[0] < year || new_time[1] < month || new_time[2] < strDate) {
|
|
// return false
|
|
// } else {
|
|
// return true
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceProvince: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '省份不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '省不能为空',
|
|
// callback: function (value, validator) {
|
|
// if (value == "选择省") {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceCity: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '市不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '市不能为空',
|
|
// callback: function (value, validator) {
|
|
// if (value == "选择市") {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceCounty: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '区/县不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '区/县不能为空',
|
|
// callback: function (value, validator) {
|
|
// if (value == "选择区/县") {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceTime: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '机构成立日期不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// proviceBrief: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '机构简介不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// proviceBrief: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '机构简介不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// proviceFingerprint: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '法人身份证正面不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// proviceStamp: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '法人身份证反面不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// provicePerName: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '法人姓名不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '法人姓名格式不对',
|
|
// callback: function (value, validator) {
|
|
// var regExp = /^[\u4e00-\u9fa5]{2,}$/;
|
|
// if (regExp.test(value)) {
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// provicePerCard: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '法人身份证号不能为空'
|
|
// },
|
|
// regexp: {
|
|
// regexp: /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/,
|
|
// message: '身份证号码格式不正确,为18位身份证号码!'
|
|
// },
|
|
// callback: {
|
|
// /*自定义,可以在这里与其他输入项联动校验*/
|
|
// message: '身份证号码无效!',
|
|
// callback: function (value, validator, $field) {
|
|
// //18位身份证号码的正则表达式
|
|
// var regIdCard =
|
|
// /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
|
|
// //如果通过该验证,说明身份证格式正确,但准确性还需计算
|
|
// var idCard = value;
|
|
// if (regIdCard.test(idCard)) {
|
|
// if (idCard.length == 18) {
|
|
// var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8,
|
|
// 4, 2); //将前17位加权因子保存在数组里
|
|
// var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3,
|
|
// 2); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
|
|
// var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
|
|
// for (var i = 0; i < 17; i++) {
|
|
// idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
|
|
// }
|
|
// var idCardMod = idCardWiSum % 11; //计算出校验码所在数组的位置
|
|
// var idCardLast = idCard.substring(17); //得到最后一位身份证号码
|
|
// //如果等于2,则说明校验码是10,身份证号码最后一位应该是X
|
|
// if (idCardMod == 2) {
|
|
// if (idCardLast == "X" || idCardLast == "x") {
|
|
// return true;
|
|
// //alert("恭喜通过验证啦!");
|
|
// } else {
|
|
// return false;
|
|
// //alert("身份证号码错误!");
|
|
// }
|
|
// } else {
|
|
// //用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
|
|
// if (idCardLast == idCardY[idCardMod]) {
|
|
// //alert("恭喜通过验证啦!");
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// //alert("身份证号码错误!");
|
|
// }
|
|
// }
|
|
// }
|
|
// } else {
|
|
// //alert("身份证格式不正确!");
|
|
// return false;
|
|
// }
|
|
// },
|
|
// }
|
|
// },
|
|
// },
|
|
// provicePerPhone: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '法人手机号不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '法人手机号格式不正确',
|
|
// callback: function (value, validator) {
|
|
// var regExp = new RegExp("^1[3-9]\\d{9}$");
|
|
// if (regExp.test(value)) {
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceAccount: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '银行账号不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '银行账号格式不对',
|
|
// callback: function (value, validator) {
|
|
// // var pattern = /^([1-9]{1})(\d{15}|\d{16}|\d{18}|\d{20})$/;
|
|
// var pattern = /^[0-9]\d*$/;
|
|
// if (pattern.test(value)) {
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceOpenBank: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '开户银行不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '开户银行不能有特殊字符',
|
|
// callback: function (value, validator) {
|
|
// var regExp = new RegExp(
|
|
// "[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]");
|
|
// if (regExp.test(value)) {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// bankProvince: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '省份不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '省不能为空',
|
|
// callback: function (value, validator) {
|
|
// if (value == "选择省") {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// bankCity: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '市不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '市不能为空',
|
|
// callback: function (value, validator) {
|
|
// if (value == "选择市") {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// bankDistrict: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '区/县不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '区/县不能为空',
|
|
// callback: function (value, validator) {
|
|
// if (value == "选择区/县") {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// provicePersonal: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '开户人不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '开户人格式不对',
|
|
// callback: function (value, validator) {
|
|
// var regExp = /^[\u4e00-\u9fa5]{2,}$/;
|
|
// if (regExp.test(value)) {
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// radio01: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '银行卡类型不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// proviceBankName: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '开户行名称不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '开户银行不能有特殊字符',
|
|
// callback: function (value, validator) {
|
|
// var regExp = new RegExp(
|
|
// "[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]");
|
|
// if (regExp.test(value)) {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
|
|
// },
|
|
// proviceBankList: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '银行行号不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '银行行号格式不对',
|
|
// callback: function (value, validator) {
|
|
// var regEn = new RegExp("[\\u4E00-\\u9FFF]+$", "g");
|
|
// if (regEn.test(value)) {
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceBankCard: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '开户人身份证号码不能为空'
|
|
// },
|
|
// regexp: {
|
|
// regexp: /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/,
|
|
// message: '身份证号码格式不正确,为18位身份证号码!'
|
|
// },
|
|
// callback: {
|
|
// /*自定义,可以在这里与其他输入项联动校验*/
|
|
// message: '身份证号码无效!',
|
|
// callback: function (value, validator, $field) {
|
|
// //18位身份证号码的正则表达式
|
|
// var regIdCard =
|
|
// /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
|
|
// //如果通过该验证,说明身份证格式正确,但准确性还需计算
|
|
// var idCard = value;
|
|
// if (regIdCard.test(idCard)) {
|
|
// if (idCard.length == 18) {
|
|
// var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8,
|
|
// 4, 2); //将前17位加权因子保存在数组里
|
|
// var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3,
|
|
// 2); //这是除以11后,可能产生的11位余数、验证码,也保存成数组
|
|
// var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
|
|
// for (var i = 0; i < 17; i++) {
|
|
// idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
|
|
// }
|
|
// var idCardMod = idCardWiSum % 11; //计算出校验码所在数组的位置
|
|
// var idCardLast = idCard.substring(17); //得到最后一位身份证号码
|
|
// //如果等于2,则说明校验码是10,身份证号码最后一位应该是X
|
|
// if (idCardMod == 2) {
|
|
// if (idCardLast == "X" || idCardLast == "x") {
|
|
// return true;
|
|
// //alert("恭喜通过验证啦!");
|
|
// } else {
|
|
// return false;
|
|
// //alert("身份证号码错误!");
|
|
// }
|
|
// } else {
|
|
// //用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
|
|
// if (idCardLast == idCardY[idCardMod]) {
|
|
// //alert("恭喜通过验证啦!");
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// //alert("身份证号码错误!");
|
|
// }
|
|
// }
|
|
// }
|
|
// } else {
|
|
// //alert("身份证格式不正确!");
|
|
// return false;
|
|
// }
|
|
// },
|
|
// }
|
|
// },
|
|
// },
|
|
// proviceBankPhone: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '开户银行预留手机号不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '开户银行预留手机号格式不正确',
|
|
// callback: function (value, validator) {
|
|
// var regExp = new RegExp("^1[3-9]\\d{9}$");
|
|
// if (regExp.test(value)) {
|
|
// return true;
|
|
// } else {
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// // proviceHandPrint: {
|
|
// // validators: {
|
|
// // notEmpty: {
|
|
// // message: '法人手持身份证正面照不能为空'
|
|
// // },
|
|
// // },
|
|
// // },
|
|
// doorHeadPhoto: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '门头照不能为空'
|
|
// },
|
|
// },
|
|
// },
|
|
// // customerAgreementPath: {
|
|
// // validators: {
|
|
// // notEmpty: {
|
|
// // message: '客户协议书不能为空'
|
|
// // },
|
|
// // },
|
|
// // },
|
|
// // accountOpeningPermit: {
|
|
// // validators: {
|
|
// // notEmpty: {
|
|
// // message: '开户许可证或印鉴卡不能为空'
|
|
// // },
|
|
// // },
|
|
// // },
|
|
// // businessPlacePath1: {
|
|
// // validators: {
|
|
// // notEmpty: {
|
|
// // message: '经营场所图1不能为空'
|
|
// // },
|
|
// // },
|
|
// // },
|
|
// // businessPlacePath2: {
|
|
// // validators: {
|
|
// // notEmpty: {
|
|
// // message: '经营场所图2不能为空'
|
|
// // },
|
|
// // },
|
|
// // },
|
|
// proviceType: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '法人证件类型不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '法人证件类型不能为空',
|
|
// callback: function (value, validator) {
|
|
// if (value == "请选择证件类型") {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// },
|
|
// },
|
|
// },
|
|
// },
|
|
// serviceProvider: {
|
|
// validators: {
|
|
// notEmpty: {
|
|
// message: '推荐中介服务机构不能为空'
|
|
// },
|
|
// callback: {
|
|
// message: '推荐中介服务机构不能为空',
|
|
// callback: function (value, validator) {
|
|
// if (value == "选择推荐中介服务机构") {
|
|
// return false;
|
|
// } else {
|
|
// return true;
|
|
// }
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
// }
|
|
// })
|
|
// }
|
|
|
|
// 服务商认证-提交认证
|
|
// function handelSubmitProvice () {
|
|
// var titleName = document.getElementsByClassName("current03")[0].innerText;
|
|
// if (titleName == '法人') { //法人不触发校验
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceBook', false, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceJust', false, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceResver', false, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceName', false, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceName', false, 'regexp');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceName', false, 'callback');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceCard', false, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceCard', false, 'regexp');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceCard', false, 'callback');
|
|
// } else {
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceBook', true, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceJust', true, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceResver', true, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceName', true, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceCard', true, 'notEmpty');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceCard', true, 'regexp');
|
|
// $('#form-provice').data('bootstrapValidator').enableFieldValidators('proviceCard', true, 'callback');
|
|
// }
|
|
// $("#form-provice").data('bootstrapValidator').validate();
|
|
// var flag = $("#form-provice").data('bootstrapValidator').isValid();
|
|
// if (flag) {
|
|
// var tages = "";
|
|
// for (var i = 0; i < tagsProvice.length; i++) {
|
|
// if (i == tagsProvice.length - 1) {
|
|
// tages += tagsProvice[i];
|
|
// } else {
|
|
// tages += tagsProvice[i] + ",";
|
|
// }
|
|
// }
|
|
// var bankCardType = $("input[name='radio01']:checked").val();
|
|
// var institutionsdata = "";
|
|
// if ($("#serviceProvider").val() == 0) {
|
|
// IntermediaryIs = "";
|
|
// } else {
|
|
// IntermediaryIs = $("#serviceProvider").val();
|
|
// }
|
|
// if (titleName == '法人') { //法人不触发校验
|
|
// // institutionsdata = '{' +
|
|
// // // '"accountOpeningPermit":"' + document.getElementById("accountOpeningPermit1").files[0].httpurl + '",' +
|
|
// // '"address": "' + $("#proviceAddress").val() + '",' +
|
|
// // '"auditOpinion": "",' +
|
|
// // '"avatar": "",' +
|
|
// // '"bankAccountName": "' + $("#provicePersonal").val() + '",' +
|
|
// // '"bankCardType": "' + bankCardType + '",' +
|
|
// // '"bankCellPhone": "' + $("#proviceBankPhone").val() + '",' +
|
|
// // '"bankCity": "' + $("#providerBankCity").val() + '",' +
|
|
// // '"bankDistrict": "' + $("#providerBankDistrict").val() + '",' +
|
|
// // '"bankName": "' + $("#proviceBankName").val() + '",' +
|
|
// // '"bankProvince": "' + $("#providerBankProvince").val() + '",' +
|
|
// // '"bankType": "' + $("#proviceBankList").val() + '",' +
|
|
// // // '"businessPlacePath1": "' + document.getElementById("businessPlaceProviderPath1").files[0].httpurl +
|
|
// // // '",' +
|
|
// // // '"businessPlacePath2": "' + document.getElementById("businessPlaceProviderPath2").files[0].httpurl +
|
|
// // // '",' +
|
|
// // '"cerScanPath": "' + document.getElementById("proviceBusiness1").files[0].httpurl + '",' +
|
|
// // '"certIdnum": "' + $("#proviceBankCard").val() + '",' +
|
|
// // // '"customerAgreementPath": "' + document.getElementById("customerAgreementPath1").files[0].httpurl +
|
|
// // // '",' +
|
|
// // '"desc": "' + $("#proviceBrief").val() + '",' +
|
|
// // '"doorHeadPhoto": "' + document.getElementById("doorHeadPhoto1").files[0].httpurl + '",' +
|
|
// // '"establishDate": "' + $("#proviceTime").val() + '",' +
|
|
// // '"identity":"' + $(".current03").text() + '",' +
|
|
// // '"industryType": "' + $("#control01").val() + '",' +
|
|
// // '"islicode": "",' +
|
|
// // '"legalsCellPhone": "' + $("#provicePerPhone").val() + '",' +
|
|
// // '"legalsIdnum": "' + $("#proviceBuiness").val() + '",' +
|
|
// // '"legalsType": "' + $("#proviceType").val() + '",' +
|
|
// // '"licenseDate": "' + $("#proviceTackTime").val() + '",' +
|
|
// // '"legalsName": "' + $("#provicePerName").val() + '",' +
|
|
// // '"legalsScanPath1": "' + document.getElementById("legalsScanPath11").files[0].httpurl + '",' +
|
|
// // '"legalsScanPath2": "' + document.getElementById("proviceStamp1").files[0].httpurl + '",' +
|
|
// // '"managerIdnum": "' + "" + '",' +
|
|
// // '"managerName": "' + "" + '",' +
|
|
// // '"managerPath": "' + "" + '",' +
|
|
// // '"managerScanPath1":"' + "" + '",' +
|
|
// // '"managerScanPath2":"' + "" + '",' +
|
|
// // // '"legalsHoldPath":"' + document.getElementById("proviceHandPrint1").files[0].httpurl + '",' +
|
|
// // '"name": "' + $("#proviceOrganName").val() + '",' +
|
|
// // '"publicAccount": "' + $("#proviceAccount").val() + '",' +
|
|
// // '"regionCity": "' + $("#providerCity").val() + '",' +
|
|
// // '"regionDistrict": "' + $("#providerDistrict").val() + '",' +
|
|
// // '"regionProvince": "' + $("#providerProvince").val() + '",' +
|
|
// // '"state": 0,' +
|
|
// // '"type": "' + tages + '",' +
|
|
// // '"uscc":"' + $("#proviceOrganCode").val() + '",' +
|
|
// // '"userId": "' + accountId + '",' +
|
|
// // '"userType":"服务商"' +
|
|
// // '}';
|
|
// institutionsdata = '{' +
|
|
// '"name": "' + $("#proviceOrganName").val() + '",' + //中介服务机构名称
|
|
// '"avatar": "",' + //头像地址
|
|
// '"industrytype": "' + $("#control01").val() + '",' + //行业类别
|
|
// '"regionprovince": "' + $("#providerProvince").val() + '",' + //注册地区-省
|
|
// '"regioncity": "' + $("#providerCity").val() + '",' + //注册地区-市
|
|
// '"regiondistrict": "' + $("#providerDistrict").val() + '",' + //注册地区-区/县
|
|
// '"address": "' + $("#proviceAddress").val() + '",' + //详细地址
|
|
// '"establishdate": "' + $("#proviceTime").val() + '",' + //机构成立日期
|
|
// '"desc": "' + $("#proviceBrief").val() + '",' + //机构简介
|
|
// '"legalsname": "' + $("#provicePerName").val() + '",' + //法人姓名
|
|
// '"legalstype": "' + $("#proviceType").val() + '",' + //法人证件类型
|
|
// '"legalsidnum": "' + $("#proviceBuiness").val() + '",' + //法人证件号
|
|
// '"uscc":"' + $("#proviceOrganCode").val() + '",' + //统一社会信用代码
|
|
// '"licensedate": "' + $("#proviceTackTime").val() + '",' + //营业执照有效期
|
|
// '"legalscellphone": "' + $("#provicePerPhone").val() + '",' + //法人手机号
|
|
// '"publicaccount": "' + $("#proviceAccount").val() + '",' + //银行账号
|
|
// '"bankaccountname": "' + $("#provicePersonal").val() + '",' + //开户人
|
|
// '"bankcardtype": "' + bankCardType + '",' + //银行卡类型
|
|
// '"bankname": "' + $("#proviceBankName").val() + '",' + //开户行名称
|
|
// '"banktype": "' + $("#proviceBankList").val() + '",' + //银行行号
|
|
// '"bankprovince": "' + $("#providerBankProvince").val() + '",' + //开户银行所在地-省
|
|
// '"bankcity": "' + $("#providerBankCity").val() + '",' + //开户银行所在地-市
|
|
// '"bankdistrict": "' + $("#providerBankDistrict").val() + '",' + //开户银行所在地-区/县
|
|
// '"certidnum": "' + $("#proviceBankCard").val() + '",' + //开户人身份证号码
|
|
// '"bankcellphone": "' + $("#proviceBankPhone").val() + '",' + //开户银行预留手机号
|
|
// '"cerscanpath": "' + document.getElementById("proviceBusiness1").files[0].httpurl + '",' +
|
|
// //营业执照/事业单位法人证书扫描件
|
|
// '"legalsscanpath1": "' + document.getElementById("legalsScanPath11").files[0].httpurl + '",' +
|
|
// //法人身份证正反面扫描件(指纹或盖章)
|
|
// '"legalsscanpath2": "' + document.getElementById("proviceStamp1").files[0].httpurl + '",' +
|
|
// '"doorheadphoto": "' + document.getElementById("doorHeadPhoto1").files[0].httpurl + '",' + //门头照
|
|
// '"parentislicode": "' + IntermediaryIs + '",' + //推荐中介服务机构 中介机构is
|
|
// '"isposttion": "' + Postlist + '",' + //是否后置名单(0、否 1、是 )
|
|
// '"state": 0,' +
|
|
// '"type": "' + tages + '",' +
|
|
// '"userid": "' + accountId + '",' +
|
|
// '"usertype":"服务商"' +
|
|
// '}';
|
|
// } else {
|
|
// // institutionsdata = '{' +
|
|
// // // '"accountOpeningPermit":"' + document.getElementById("accountOpeningPermit1").files[0].httpurl + '",' +
|
|
// // '"address": "' + $("#proviceAddress").val() + '",' +
|
|
// // '"auditOpinion": "",' +
|
|
// // '"avatar": "",' +
|
|
// // '"bankAccountName": "' + $("#provicePersonal").val() + '",' +
|
|
// // '"bankCardType": "' + bankCardType + '",' +
|
|
// // '"bankCellPhone": "' + $("#proviceBankPhone").val() + '",' +
|
|
// // '"bankCity": "' + $("#providerBankCity").val() + '",' +
|
|
// // '"bankDistrict": "' + $("#providerBankDistrict").val() + '",' +
|
|
// // '"bankName": "' + $("#proviceBankName").val() + '",' +
|
|
// // '"bankProvince": "' + $("#providerBankProvince").val() + '",' +
|
|
// // '"bankType": "' + $("#proviceBankList").val() + '",' +
|
|
// // // '"businessPlacePath1": "' + document.getElementById("businessPlaceProviderPath1").files[0].httpurl +
|
|
// // // '",' +
|
|
// // // '"businessPlacePath2": "' + document.getElementById("businessPlaceProviderPath2").files[0].httpurl +
|
|
// // // '",' +
|
|
// // '"cerScanPath": "' + document.getElementById("proviceBusiness1").files[0].httpurl + '",' +
|
|
// // '"certIdnum": "' + $("#proviceBankCard").val() + '",' +
|
|
// // // '"customerAgreementPath": "' + document.getElementById("customerAgreementPath1").files[0].httpurl +
|
|
// // // '",' +
|
|
// // '"desc": "' + $("#proviceBrief").val() + '",' +
|
|
// // '"doorHeadPhoto": "' + document.getElementById("doorHeadPhoto1").files[0].httpurl + '",' +
|
|
// // '"establishDate": "' + $("#proviceTime").val() + '",' +
|
|
// // '"identity":"' + $(".current03").text() + '",' +
|
|
// // '"industryType": "' + $("#control01").val() + '",' +
|
|
// // '"islicode": "",' +
|
|
// // '"legalsCellPhone": "' + $("#provicePerPhone").val() + '",' +
|
|
// // '"legalsIdnum": "' + $("#proviceBuiness").val() + '",' +
|
|
// // '"legalsType": "' + $("#proviceType").val() + '",' +
|
|
// // '"licenseDate": "' + $("#proviceTackTime").val() + '",' +
|
|
// // '"legalsName": "' + $("#provicePerName").val() + '",' +
|
|
// // '"legalsScanPath1": "' + document.getElementById("legalsScanPath11").files[0].httpurl + '",' +
|
|
// // '"legalsScanPath2": "' + document.getElementById("proviceStamp1").files[0].httpurl + '",' +
|
|
// // '"managerIdnum": "' + $("#proviceCard").val() + '",' +
|
|
// // '"managerName": "' + $("#proviceName").val() + '",' +
|
|
// // '"managerPath": "' + document.getElementById("proviceBook").files[0].httpurl + '",' +
|
|
// // '"managerScanPath1":"' + document.getElementById("proviceJust").files[0].httpurl + '",' +
|
|
// // '"managerScanPath2":"' + document.getElementById("proviceResver").files[0].httpurl + '",' +
|
|
// // // '"legalsHoldPath":"' + document.getElementById("proviceHandPrint1").files[0].httpurl + '",' +
|
|
// // '"name": "' + $("#proviceOrganName").val() + '",' +
|
|
// // '"publicAccount": "' + $("#proviceAccount").val() + '",' +
|
|
// // '"regionCity": "' + $("#providerCity").val() + '",' +
|
|
// // '"regionDistrict": "' + $("#providerDistrict").val() + '",' +
|
|
// // '"regionProvince": "' + $("#providerProvince").val() + '",' +
|
|
// // '"state": 0,' +
|
|
// // '"type": "' + tages + '",' +
|
|
// // '"uscc":"' + $("#proviceOrganCode").val() + '",' +
|
|
// // '"userId": "' + accountId + '",' +
|
|
// // '"userType":"服务商"' +
|
|
// // '}';
|
|
// institutionsdata = '{' +
|
|
// '"managerpath": "' + document.getElementById("proviceBook").files[0].httpurl + '",' + //经办人授权委托书
|
|
// '"managerscanpath1":"' + document.getElementById("proviceJust").files[0].httpurl + '",' +
|
|
// //经办人身份证扫描件(需盖章)
|
|
// '"managerscanpath2":"' + document.getElementById("proviceResver").files[0].httpurl + '",' +
|
|
// //经办人身份证扫描件(需盖章)
|
|
// '"managername": "' + $("#proviceName").val() + '",' + //经办人姓名
|
|
// '"manageridnum": "' + $("#proviceCard").val() + '",' + //经办人身份证号
|
|
// '"name": "' + $("#proviceOrganName").val() + '",' + //中介服务机构名称
|
|
// '"avatar": "",' + //头像地址
|
|
// '"industrytype": "' + $("#control01").val() + '",' + //行业类别
|
|
// '"regionprovince": "' + $("#providerProvince").val() + '",' + //注册地区-省
|
|
// '"regioncity": "' + $("#providerCity").val() + '",' + //注册地区-市
|
|
// '"regiondistrict": "' + $("#providerDistrict").val() + '",' + //注册地区-区/县
|
|
// '"address": "' + $("#proviceAddress").val() + '",' + //详细地址
|
|
// '"establishdate": "' + $("#proviceTime").val() + '",' + //机构成立日期
|
|
// '"desc": "' + $("#proviceBrief").val() + '",' + //机构简介
|
|
// '"legalsname": "' + $("#provicePerName").val() + '",' + //法人姓名
|
|
// '"legalstype": "' + $("#proviceType").val() + '",' + //法人证件类型
|
|
// '"legalsidnum": "' + $("#proviceBuiness").val() + '",' + //法人证件号
|
|
// '"uscc":"' + $("#proviceOrganCode").val() + '",' + //统一社会信用代码
|
|
// '"licensedate": "' + $("#proviceTackTime").val() + '",' + //营业执照有效期
|
|
// '"legalscellphone": "' + $("#provicePerPhone").val() + '",' + //法人手机号
|
|
// '"publicaccount": "' + $("#proviceAccount").val() + '",' + //银行账号
|
|
// '"bankaccountname": "' + $("#provicePersonal").val() + '",' + //开户人
|
|
// '"bankcardtype": "' + bankCardType + '",' + //银行卡类型
|
|
// '"bankname": "' + $("#proviceBankName").val() + '",' + //开户行名称
|
|
// '"banktype": "' + $("#proviceBankList").val() + '",' + //银行行号
|
|
// '"bankprovince": "' + $("#providerBankProvince").val() + '",' + //开户银行所在地-省
|
|
// '"bankcity": "' + $("#providerBankCity").val() + '",' + //开户银行所在地-市
|
|
// '"bankdistrict": "' + $("#providerBankDistrict").val() + '",' + //开户银行所在地-区/县
|
|
// '"certidnum": "' + $("#proviceBankCard").val() + '",' + //开户人身份证号码
|
|
// '"bankcellphone": "' + $("#proviceBankPhone").val() + '",' + //开户银行预留手机号
|
|
// '"cerscanpath": "' + document.getElementById("proviceBusiness1").files[0].httpurl + '",' +
|
|
// //营业执照/事业单位法人证书扫描件
|
|
// '"legalsscanpath1": "' + document.getElementById("legalsScanPath11").files[0].httpurl + '",' +
|
|
// //法人身份证正反面扫描件(指纹或盖章)
|
|
// '"legalsscanpath2": "' + document.getElementById("proviceStamp1").files[0].httpurl + '",' +
|
|
// '"doorheadphoto": "' + document.getElementById("doorHeadPhoto1").files[0].httpurl + '",' + //门头照
|
|
// '"parentislicode": "' + IntermediaryIs + '",' + //推荐中介服务机构 中介机构is
|
|
// '"isposttion": "' + Postlist + '",' + //是否后置名单(0、否 1、是 )
|
|
// '"state": 0,' +
|
|
// '"type": "' + tages + '",' +
|
|
// '"userid": "' + accountId + '",' +
|
|
// '"usertype":"服务商"' +
|
|
// '}';
|
|
// }
|
|
// // if (organStatus == "2" || organStatus == "4" || organStatus == "5") {
|
|
// // var ajaxFWSgDemo = new AJAX_OBJ(register + "userself/v1/update/enterprise-user", onFWSSuccess, onUrlError);
|
|
// // var ajaxFWSgDemo = new AJAX_OBJ(api + "userself/v1/update/enterprise-user", onFWSSuccess, onUrlError);
|
|
// // ajaxFWSgDemo.postRequestData(institutionsdata);
|
|
// // var ajaxFWSgDemo = new AJAX_OBJ(Paymentlist + "/entuiprise/mannAgeDate", onFWSSuccess, onUrlError);
|
|
// // ajaxFWSgDemo.postRequestData(institutionsdata);
|
|
// // $.ajax({
|
|
// // type: "POST", //请求方式
|
|
// // url: register + "userself/v1/update/enterprise-user", //地址,就是json文件的请求路径
|
|
// // dataType: "json", //数据类型可以为 text xml json script jsonp
|
|
// // contentType: "application/json",
|
|
// // data: institutionsdata,
|
|
// // headers: {
|
|
// // normal_login_token: cookieHandler.get("normal_login_token") //这里是Token
|
|
// // },
|
|
// // success: function(res) { //返回的参数就是 action里面所有的有get和set方法的参数
|
|
// // if (res.resultCode == '00000000') {
|
|
// // Dreamer.success("认证信息提交成功");
|
|
// // btnStatus();
|
|
// // handelBack();
|
|
// // } else {
|
|
// // Dreamer.error(res.resultMsg);
|
|
// // }
|
|
// // }
|
|
// // });
|
|
// // } else {
|
|
// // var ajaxfwsusergDemo = new AJAX_OBJ(api + "userself/v1/enterprise-user", onfwsuserSuccess, onUrlError);
|
|
// // ajaxfwsusergDemo.postRequestData(institutionsdata);
|
|
// //新认证(缴费)
|
|
// var ajaxfwsusergDemo = new AJAX_OBJ(Paymentlist + "/entuiprise/mannAgeDate", onfwsuserSuccess, onUrlError);
|
|
// ajaxfwsusergDemo.postRequestData(institutionsdata);
|
|
// // $.ajax({
|
|
// // type: "PUT", //请求方式
|
|
// // url: register + "userself/v1/enterprise-user", //地址,就是json文件的请求路径
|
|
// // dataType: "json", //数据类型可以为 text xml json script jsonp
|
|
// // contentType: "application/json",
|
|
// // data: institutionsdata,
|
|
// // headers: {
|
|
// // normal_login_token: cookieHandler.get("normal_login_token") //这里是Token
|
|
// // },
|
|
// // success: function(res) { //返回的参数就是 action里面所有的有get和set方法的参数
|
|
// // if (res.resultCode == '00000000') {
|
|
// // Dreamer.success("认证信息提交成功");
|
|
// // btnStatus();
|
|
// // handelBack();
|
|
// // } else {
|
|
// // Dreamer.error(res.resultMsg);
|
|
// // }
|
|
// // }
|
|
// // });
|
|
// // }
|
|
|
|
// }
|
|
// }
|
|
|
|
// function onFWSSuccess(xmlHttp) {
|
|
// var res = eval('(' + xmlHttp.responseText + ')');
|
|
// if (res.resultCode == '00000000') {
|
|
// Dreamer.success("认证信息提交成功");
|
|
// btnStatus();
|
|
// handelBack();
|
|
// } else {
|
|
// Dreamer.error(res.resultMsg);
|
|
// }
|
|
// }
|
|
|
|
// function onfwsuserSuccess (xmlHttp) {
|
|
// var res = eval('(' + xmlHttp.responseText + ')');
|
|
// if (res.resultCode == '00000000') {
|
|
// Dreamer.success("认证信息提交成功");
|
|
// if(Postlist == 1){
|
|
// btnStatus();
|
|
// handelBack();
|
|
// }else{
|
|
// let newOrder = {
|
|
// isok: '2',
|
|
// userid: accountId
|
|
// }
|
|
// SerOrderDetils(newOrder);
|
|
// }
|
|
// } else {
|
|
// Dreamer.error(res.resultMsg);
|
|
// }
|
|
// }
|
|
|
|
// 服务商认证
|
|
// function handelProvider () {
|
|
// $(".hand_title").text("中介服务机构认证")
|
|
// if (organStatus == "-1") {
|
|
// handelClickTags01();
|
|
// $('#myModal02').modal('show');
|
|
// } else if(isposttion == 1){ //判断是在白名单
|
|
// ServiceButStatus();
|
|
// }else{
|
|
// if (paystatu == 2) { //待缴费
|
|
// window.location.href = 'PaymentOrder.html?time=' + new Date().getTime(); //进入认证缴费支付页面
|
|
// } else if (paystatu == 1) { //已缴费
|
|
// ServiceButStatus();
|
|
// // if (organStatus == "2" || organStatus == "4" || organStatus == "5") {
|
|
// // if (userTypes == "服务商") {
|
|
// // /*认证失败*/
|
|
// // $('#cetifiTotal').css('display', 'none');
|
|
// // $('#service').css('display', 'block');
|
|
// // $('#hand_box').css('display', 'block');
|
|
// // failureServiceEdit();
|
|
// // } else {
|
|
// // handelClickTags01();
|
|
// // $('#myModal02').modal('show');
|
|
// // }
|
|
// // } else if (organStatus == "1" || organStatus == "3" || organStatus == "7" || organStatus == "0") {
|
|
// // $('#cetifiTotal').css('display', 'none');
|
|
// // $('#serviceNow').css('display', 'block');
|
|
// // $('#organSucces').css('display', 'none');
|
|
// // $('#hand_box').css('display', 'block');
|
|
// // //institutions();
|
|
// // } else {
|
|
// // $('#cetifiTotal').css('display', 'none');
|
|
// // $('#serviceNow').css('display', 'none');
|
|
// // $('#serviceSuccess').css('display', 'block');
|
|
// // $('#hand_box').css('display', 'block');
|
|
// // //institutions();
|
|
// // }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
// function ServiceButStatus(){//服务商按钮状态
|
|
// if (organStatus == "2" || organStatus == "4" || organStatus == "5") {
|
|
// if (userTypes == "服务商") {
|
|
// /*认证失败*/
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#service').css('display', 'block');
|
|
// $('#hand_box').css('display', 'block');
|
|
// failureServiceEdit();
|
|
// } else {
|
|
// handelClickTags01();
|
|
// $('#myModal02').modal('show');
|
|
// }
|
|
// } else if (organStatus == "1" || organStatus == "3" || organStatus == "7" || organStatus == "0") {
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#serviceNow').css('display', 'block');
|
|
// $('#organSucces').css('display', 'none');
|
|
// $('#hand_box').css('display', 'block');
|
|
// //institutions();
|
|
// } else {
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#serviceNow').css('display', 'none');
|
|
// $('#serviceSuccess').css('display', 'block');
|
|
// $('#hand_box').css('display', 'block');
|
|
// //institutions();
|
|
// }
|
|
// }
|
|
|
|
// // 服务商认证失败
|
|
// function failureServiceEdit () {
|
|
// var ajaxfailEditDemo = new AJAX_OBJ(Paymentlist + 'entuiprise/listLibrary?AuId=' + accountId, onfailEditSuccess, onUrlError);
|
|
// ajaxfailEditDemo.postRequestData();
|
|
// }
|
|
|
|
// function onfailEditSuccess (xmlHttp) {
|
|
// var res = eval('(' + xmlHttp.responseText + ')');
|
|
// if (res.data != undefined) {
|
|
// if (res.data.identity == "经办人") {
|
|
// $('#operator001').css('display', 'block');
|
|
// $('#operator002').css('display', 'block');
|
|
// $('#operator003').css('display', 'block');
|
|
// $('#operator004').css('display', 'block');
|
|
// $("#tags03").html("<div>选择身份</div>" +
|
|
// "<div class='current03false'>法人</div>" +
|
|
// "<div class='current03'>经办人</div>");
|
|
// $("#proviceName").val(res.data.managername);
|
|
// $("#proviceCard").val(res.data.manageridnum);
|
|
// } else {
|
|
// $('#operator001').css('display', 'none');
|
|
// $('#operator002').css('display', 'none');
|
|
// $('#operator003').css('display', 'none');
|
|
// $('#operator004').css('display', 'none');
|
|
// $("#tags03").html("<div>选择身份</div>" +
|
|
// "<div class='current03'>法人</div>" +
|
|
// "<div class='current03false'>经办人</div>");
|
|
// }
|
|
// tagsProvice = res.data.type.split(",");
|
|
// $("#proviceOrganName").val(res.data.name);
|
|
// $("#control01").val(res.data.industrytype);
|
|
// $("#providerProvince").val(res.data.regionprovince);
|
|
// showGetCity(res.data.regionprovince, "providerCity", res.data.regioncity);
|
|
// showGetCountry(res.data.regioncity, 'providerProvince', 'providerDistrict', res.data.regiondistrict);
|
|
// $("#proviceAddress").val(res.data.address);
|
|
// $("#proviceTime").val(res.data.establishdate);
|
|
// $("#proviceBrief").val(res.data.desc);
|
|
// $("#provicePerName").val(res.data.legalsname);
|
|
// $("#proviceType").val(res.data.legalstype);
|
|
// $("#proviceBuiness").val(res.data.legalsidnum);
|
|
// $("#proviceOrganCode").val(res.data.uscc);
|
|
// $("#proviceTackTime").val(res.data.licensedate);
|
|
// $("#provicePerPhone").val(res.data.legalscellphone);
|
|
// $("#proviceAccount").val(res.data.publicaccount);
|
|
// $("#provicePersonal").val(res.data.bankaccountname);
|
|
// if (res.data.bankcardtype == "借记卡") {
|
|
// document.getElementById("jjk1").checked = true;
|
|
// } else {
|
|
// document.getElementById("dwjs1").checked = true;
|
|
// }
|
|
// $("#proviceBankName").val(res.data.bankname);
|
|
// $("#proviceBankList").val(res.data.banktype);
|
|
// $("#providerBankProvince").val(res.data.bankprovince);
|
|
// showGetCity(res.data.bankprovince, "providerBankCity", res.data.bankcity);
|
|
// showGetCountry(res.data.bankcity, 'providerBankProvince', 'providerBankDistrict', res.data.bankdistrict);
|
|
// $("#proviceBankCard").val(res.data.certidnum);
|
|
// $("#proviceBankPhone").val(res.data.bankcellphone);
|
|
// ParentisliCode(res.data.parentislicode, "serviceProvider");
|
|
// handelHandTags01();
|
|
// Dreamer.error("认证失败,请重新填写认证信息!");
|
|
// }
|
|
// }
|
|
|
|
// // 服务商模态框立即认证
|
|
// function handelProviceSubmit () {
|
|
// $('#cetifiTotal').css('display', 'none');
|
|
// $('#hand_box').css('display', 'block');
|
|
// $('#service').css('display', 'block');
|
|
// $('#myModal02').modal('hide')
|
|
// handelHandTags01();
|
|
// }
|
|
|
|
// 标签切换
|
|
function handelClickTags() {
|
|
//获取元素
|
|
var box = document.getElementById("box01");
|
|
// 获取tags元素儿子们集合
|
|
var tags = box.children[0].children;
|
|
// 获取内容content儿子们集合
|
|
var content = box.children[1].children;
|
|
for (var i = 0; i < tags.length; i++) {
|
|
tags[i].index = i;
|
|
tags[i].onclick = function () {
|
|
// 保存标签名称
|
|
tagsName = tags[this.index].innerHTML;
|
|
// 干掉别人
|
|
for (var j = 0; j < tags.length; j++) {
|
|
tags[j].className = "";
|
|
content[j].className = "";
|
|
}
|
|
//留下自己
|
|
this.className = "current01";
|
|
content[this.index].className = "current01";
|
|
};
|
|
}
|
|
}
|
|
|
|
function clearFromData() {
|
|
$("#form-registered input").val("");
|
|
$("#form-registered textarea").val("");
|
|
$("#form-registered #industryType").val("选择行业类别");
|
|
$("#form-registered #institutions01").val("选择省");
|
|
$("#institutions02").empty();
|
|
$("#institutions02").html("<option>选择市</option>");
|
|
$("#institutions03").empty();
|
|
$("#institutions03").html("<option>选择区/县</option>");
|
|
$("#form-registered #legalsType").val("0");
|
|
$("#form-registered #bankProvince").val("选择省");
|
|
$("#bankCity").empty();
|
|
$("#bankCity").html("<option>选择市</option>");
|
|
$("#bankDistrict").empty();
|
|
$("#bankDistrict").html("<option>选择区/县</option>");
|
|
$("#jjk").val("借记卡");
|
|
$("#dwjs").val("单位结算卡");
|
|
$("#form-registered input[type=radio]").prop("checked", false);
|
|
organizationfees();
|
|
}
|
|
|
|
function clearFromData1() {
|
|
$("#form-provice input").val("");
|
|
$("#form-provice textarea").val("");
|
|
$("#form-provice #control01").val("选择行业类别");
|
|
$("#form-provice #providerProvince").val("选择省");
|
|
$("#providerCity").empty();
|
|
$("#providerCity").html("<option>选择市</option>");
|
|
$("#providerDistrict").empty();
|
|
$("#providerDistrict").html("<option>选择区/县</option>");
|
|
$("#form-provice #proviceType").val("0");
|
|
$("#form-provice #providerBankProvince").val("选择省");
|
|
$("#providerBankCity").empty();
|
|
$("#providerBankCity").html("<option>选择市</option>");
|
|
$("#providerBankDistrict").empty();
|
|
$("#providerBankDistrict").html("<option>选择区/县</option>");
|
|
$("#jjk1").val("借记卡");
|
|
$("#dwjs1").val("单位结算卡");
|
|
$("#form-provice input[type=radio01]").prop("checked", false);
|
|
}
|
|
// 法人,经办人标签切换
|
|
function handelHandTags() {
|
|
organizationfees();
|
|
//获取元素
|
|
var box = document.getElementById("box02");
|
|
// 获取tags元素儿子们集合
|
|
var tags = box.children[0].children;
|
|
for (var i = 1; i < tags.length; i++) {
|
|
tags[i].index = i;
|
|
tags[i].onclick = function () {
|
|
// 保存标签名称
|
|
tagsName001 = tags[this.index].innerHTML;
|
|
if (tagsName001 == "经办人") {
|
|
$("#operator01").css("display", "block");
|
|
$("#operator02").css("display", "block");
|
|
$("#operator03").css("display", "block");
|
|
$("#operator04").css("display", "block");
|
|
} else {
|
|
$("#operator01").css("display", "none");
|
|
$("#operator02").css("display", "none");
|
|
$("#operator03").css("display", "none");
|
|
$("#operator04").css("display", "none");
|
|
}
|
|
$("#form-registered").data("bootstrapValidator").destroy();
|
|
$("#form-registered").data("bootstrapValidator", null);
|
|
formValidate();
|
|
// 干掉别人
|
|
for (var j = 1; j < tags.length; j++) {
|
|
tags[j].className = "current02false";
|
|
}
|
|
//留下自己
|
|
this.className = "current02";
|
|
clearFromData();
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
// 服务商认证法人,经办人标签切换
|
|
function handelHandTags01() {
|
|
//获取元素
|
|
var box = document.getElementById("box03");
|
|
// 获取tags元素儿子们集合
|
|
var tags = box.children[0].children;
|
|
for (var i = 1; i < tags.length; i++) {
|
|
tags[i].index = i;
|
|
tags[i].onclick = function () {
|
|
// 保存标签名称
|
|
proviceName = tags[this.index].innerHTML;
|
|
if (proviceName == "经办人") {
|
|
$("#operator001").css("display", "block");
|
|
$("#operator002").css("display", "block");
|
|
$("#operator003").css("display", "block");
|
|
$("#operator004").css("display", "block");
|
|
} else {
|
|
$("#operator001").css("display", "none");
|
|
$("#operator002").css("display", "none");
|
|
$("#operator003").css("display", "none");
|
|
$("#operator004").css("display", "none");
|
|
}
|
|
$("#form-provice").data("bootstrapValidator").destroy();
|
|
$("#form-provice").data("bootstrapValidator", null);
|
|
formProviceValidate();
|
|
// 干掉别人
|
|
for (var j = 1; j < tags.length; j++) {
|
|
tags[j].className = "current03false";
|
|
}
|
|
//留下自己
|
|
this.className = "current03";
|
|
clearFromData1();
|
|
};
|
|
}
|
|
}
|
|
|
|
// 服务商认证-标签切换
|
|
function handelClickTags01() {
|
|
//获取元素
|
|
var box = document.getElementById("box04");
|
|
// 获取tags元素儿子们集合
|
|
var tags = box.children[0].children;
|
|
// 获取内容content儿子们集合
|
|
var content = box.children[1].children;
|
|
for (var i = 0; i < tags.length; i++) {
|
|
tags[i].index = i;
|
|
tags[i].onclick = function () {
|
|
// 保存标签名称
|
|
if (tags[this.index].className == "") {
|
|
tags[this.index].className = "current01";
|
|
tagsProvice.push(tags[this.index].innerHTML);
|
|
} else {
|
|
tags[this.index].className = "";
|
|
tagsProvice.splice(tagsProvice.indexOf(tags[this.index].innerHTML), 1);
|
|
}
|
|
// 干掉别人
|
|
for (var j = 0; j < tags.length; j++) {
|
|
content[j].className = "";
|
|
}
|
|
//留下自己
|
|
personalName = content[this.index];
|
|
content[this.index].className = "current01";
|
|
};
|
|
}
|
|
}
|
|
|
|
// 机构,个人认证缴费,选择身份中介服务机构
|
|
function handelClickTags02() {
|
|
//获取元素
|
|
var box = document.getElementById("box05");
|
|
// 获取tags元素儿子们集合
|
|
var tags = box.children[0].children;
|
|
// 获取内容content儿子们集合
|
|
// var content = box.children[1].children;
|
|
for (var i = 0; i < tags.length; i++) {
|
|
tags[i].index = i;
|
|
tags[i].onclick = function () {
|
|
// 保存标签名称
|
|
if (tags[this.index].className == "") {
|
|
tags[this.index].className = "current01";
|
|
tagsProvice.push(tags[this.index].innerHTML);
|
|
} else {
|
|
tags[this.index].className = "";
|
|
tagsProvice.splice(tagsProvice.indexOf(tags[this.index].innerHTML), 1);
|
|
|
|
}
|
|
if (tagsProvice.length == 0) {
|
|
$("#PersonType").css("display", "block");
|
|
} else {
|
|
$("#PersonType").css("display", "none");
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|
|
// 页面跳转添加时间戳
|
|
function handelBuyOrder(url) {
|
|
window.location.href = url + "?time=" + new Date().getTime();
|
|
}
|
|
|