if (!window.Base) { Base = {}; } Base.check_alive_type = "2";//0:读数刷脸 1:屏幕闪烁刷脸 2:先闪烁不行则读数 Base.faceType = "1";//0 不刷脸1:微信城市生活服务 2:支付宝 3:微信慧眼 pubKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCJcTBCPyX3OpLPNmDYLUitf8sZG4Wa1Q/9MNX/t12keSOjT/44OWnGHSo69eEpqxxx1KXkGJyLqvkUBhd8E5PUuADoy6AEyIRR093ceoYY2gNPVgsY61edp7MvB5iz9ej8Aw/ZwIacYZIib7VhFIBas+yG8yRvDU7kZYdmGrAH5QIDAQAB"; Base.setValue = function (key, value) { if (typeof key == 'string') { $("#" + key).val(value); } else if (typeof key == 'object') { for (var k in key) { var obj = $("#" + k); var tag = obj[0] != null ? obj[0].tagName.toLowerCase() : ""; if (tag == 'select' && key[k] instanceof Array) { $.setSelect(k, key[k]); } else { obj.val(key[k]); } } } }; Base.getValue = function (key) { return $("#" + key).val(); }; Base.setReadOnly = function (ids) { ids = "#" + ids.replace(/,/g, ",#"); $(ids).attr("readonly", "readonly"); }; Base.setRequired = function (ids, valid) { ids = "#" + ids.replace(/,/g, ",#"); if (!valid) { $(ids).attr("valid", "r"); } else { $(ids).removeAttr("valid"); } } Base.submit = function (id, p, fun, fail) { $.doSubmit(id, p, function (data) { //for(var key in data){ // $("#"+key).val(data[key]); //} Base.setValue(data); if (fun) { fun(); } }, function (data) { $.toast(data.resmsg); if (fail) { fail(data); } }); }; Base.showObj = function (ids) { ids = "#" + ids.replace(/,/g, ",#"); $(ids).parent().parent().show(); }; Base.hideObj = function (ids) { ids = "#" + ids.replace(/,/g, ",#"); $(ids).parent().parent().hide(); }; Base.setEnable = function (ids) { ids = "#" + ids.replace(/,/g, ",#"); $(ids).removeAttr("readonly"); }; Base.alert = function (msg) { $.toast(msg); }; Base.focus = function (ids) { ids = "#" + ids; $(ids).focus(); }; Base.filterSelectInput = function (id, value) { var options = document.getElementById(id).options; for (var i = 0; i < options.length; i++) { var o = options[i]; if (o.value != value) { o.disabled = true; } } }; (function ($) { function list2Row(data, mode) { var html = "
"; var content = []; var length = data.length; for (var i = 0; i < length; i++) { if (!data[i].value) { continue; } content[i] = "
" + (data[i].name != null ? data[i].name : "") + "
" + (data[i].value != null ? data[i].value : "") + "
"; } html += content.join("") + "
"; return html; } function closeToast() { $(".fund_mask").remove(); //uexWindow.closeToast(); layer.closeAll(); } function halfScreenDialog(params, callBack,cancel) { var counters = 15; if(params.counters==0){ counters = 0 } if(params.counters){ counters = params.counters } var button_text = "我已阅读并同意"; if(params.btn){ button_text = params.btn; } var win = '
'; win +=" " win +="
"; var mydialog = $(win); $(document.body).append(mydialog); $("#confirm_btn").addClass('weui-btn_disabled') if(counters==0){ $("#confirm_btn").removeClass('weui-btn_disabled') $("#confirm_btn").text(button_text) }else{ var j ; var counter = counters-1; clearInterval(j); j = setInterval(function () { $("#confirm_btn").text(counter+"s") counter--; if (counter == -1) { $("#confirm_btn").removeClass('weui-btn_disabled') $("#confirm_btn").text(button_text) clearInterval(j); } }, 1000); } var $dialog2 = $('#js_dialog_2'), $iosDialog2 = $('#iosDialog2'); mydialog.find("a").each(function (index) { $(this).bind('click', function () { if($("#confirm_btn").hasClass('weui-btn_disabled')){ return } if (callBack) { callBack(index); $(mydialog).remove(); $iosDialog2.fadeOut(200); $dialog2.removeClass('weui-half-screen-dialog_show'); } }); }); $('#dialogs').on('click', '.weui-mask', function(){ // $(mydialog).remove(); // $("#confirm_btn").addClass('weui-btn_disabled') // $("#confirm_btn").text(counters+"s") // clearInterval(j); // $(this).parents('.js_dialog').fadeOut(200); // $dialog2.removeClass('weui-half-screen-dialog_show'); }); $('#hideIOSDialog2').on('click', function(){ $(mydialog).remove(); $("#confirm_btn").addClass('weui-btn_disabled') $("#confirm_btn").text(counters+"s") clearInterval(j); $iosDialog2.fadeOut(200); $dialog2.removeClass('weui-half-screen-dialog_show'); if(cancel){ cancel(); } }); $iosDialog2.fadeIn(200); $dialog2.addClass('weui-half-screen-dialog_show'); } function dialog(params, callBack) { var win = "
"; win += "
"; win += "
"; if (params.title != null) { win += "
" + (params.title == null ? "" : params.title) + "
"; } win += "
" + (params.content == null ? "" : params.content) + "
"; if (params.mode != -1) { win += "
"; if (params.mode == 0 || params.mode == null) { win += " 取消"; } if (params.mode == 2) { win += " 取消"; win += " " + params.btn + ""; } else if (params.mode == 3) { win += " " + params.btn + ""; } else { win += " 确定"; } win += "
"; } win += "
"; var mydialog = $(win); mydialog.find("a").each(function (index) { $(this).bind('click', function () { if (params.mode == 2 && !$("#s11").is(":checked") && index == 1) { $.toast("您好!请下滑浏览内容后勾选“我同意该声明”"); return } if (callBack) { callBack(index); } $(mydialog).remove(); }); }); $(document.body).append(mydialog); if (params.duration) { setTimeout(function () { $(mydialog).remove(); }, params.duration); } } function val(key, value) { if (key && value) { if (typeof value == "object") { value = JSON.stringify(value); } localStorage.setItem(key, value); } if (!value) { return localStorage.getItem(key); } }; function val2(list, value) { if (!list) { return value; } var v = ""; for (var i = 0; i < list.length; i++) { var item = list[i]; if (item.id == value) { v = item.value; } } if (v) { return v; } else { return value; } }; function remove(key) { localStorage.removeItem(key); }; function openWin(url) { if (url.indexOf("perfetchlist") != -1) { window.location.href = url + "?type=1"; } else { window.location.href = url; } } function closeCurrWin() { window.history.go(-1); } function closeWin(winName, duration) { var winName = winName || ""; var fun = function () { window.history.go(-1); }; duration = duration || 2000; setTimeout(fun, duration); } function dataFormat(value) { if (value === "" || value == undefined || value == "null" || value == null) { return ""; } else if (isNaN(value)) { return value; } else { var moneyValue = String(Number(value).toFixed(2)); var t_moneyValue; if (moneyValue.indexOf(".") > 0) { t_moneyValue = moneyValue.substring(0, moneyValue.indexOf(".")); var t_p = moneyValue.substring(moneyValue.indexOf(".")); var re = /(-?\d+)(\d{3})/; while (re.test(t_moneyValue)) { t_moneyValue = t_moneyValue.replace(re, "$1,$2"); } moneyValue = t_moneyValue + t_p; } else { var re = /(-?\d+)(\d{3})/; while (re.test(moneyValue)) { moneyValue = moneyValue.replace(re, "$1,$2"); } } return moneyValue; } } function setLayOut(ids) { var h = $(window).height() - $("#header").height(); if (ids) { ids = ids.split(","); for (var i = 0; i < ids.length; i++) { h -= $("#" + ids[0]).height(); } } $("#content").height(h); $("#content").css("overflow-y", "auto"); return h; } function activateUrl() { $(".shortcut").each(function () { $(this).bind("click", function () { $.openWin($(this).attr("data-url")); }); }); } function setCookie(c_name, value, expiredays) { var exdate = new Date() exdate.setDate(exdate.getDate() + expiredays) document.cookie = c_name + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + exdate.toGMTString()); } function getCookie(name) { var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); if (arr = document.cookie.match(reg)) return unescape(arr[2]); else return null; } function delCookie(name) { var exp = new Date(); exp.setTime(exp.getTime() - 1); var cval = getCookie(name); if (cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString(); } function setSelect(obj, list, id, value) { var houseno = $("#" + obj); var defaultValue = houseno.attr("defaultValue"); if (list && list.length < 1) { return houseno; } if (!id) { id = "id"; } if (!value) { value = "value"; } houseno.empty(); for (var i = 0; i < list.length; i++) { var item = list[i]; var name = item.name; if (!name) { name = item[value]; } var slected = ""; if (defaultValue == item[id]) { slected = "selected"; } houseno.append(""); } return houseno; } function quit() { $.doSubmit("", {"method": "user.loginout", "v": "1.0"}, function (data) { $.remove("sessionId"); $.remove("loginFlag"); $.openWin("login.jsp", "", false, true); //location.reload(); }); } function validFace(param, call, fail) { var p = {"method": "local.user.validFace", "v": "1.0"} if (param.token) {//城市生活服务刷脸,需要token p.token = param.token; } if (param.qrtoken) {//网厅刷脸 p.qrtoken = param.qrtoken; } if (param.ywdjh) {//业务登记号 p.ywdjh = param.ywdjh; } $.doSubmit("", p, function (data) { if (call && data.sign == "1") { call(data); } else if (data.sign == "-1") {//刷脸失败 $.toast("没有做刷脸"); if (fail) { fail(data); } } else if (data.sign == "0") { if (fail) { fail(data); } //if(data.faceFaileCount>=1){//刷脸失败,超过三次切换短信验证 $.setSelect("vtype", [{"id": 1, "name": "短信验证"}, {"id": 3, "name": "刷脸验证"}]); $("#vtype").change(); $.toast("刷脸认证失败!"); // } } }, function (data) { if (fail) { fail(data); } }); } /** param:{appId:"",name:"",idcard:"",key:""},callback 回调函数 * callback(param) param->{code:0,key:"=",msg:''} * code=0 表示刷脸成功 * */ err__msg = { "10001": "参数错误", "10002": "人脸特征检测失败", "10003": "身份证号不匹配", "10004": "公安比对人脸信息不匹配", "10005": "正在检测中", "10006": "appid 没有权限", "10007": "后台获取图片失败", "10008": "公安系统失败", "10009": "公安未查到身份证照片比对源", "10010": "照片质量不满足公安比对要求", "10011": "身份证信息未开通公安比对权限", "10012": "征信验证失败", "10013": "征信系统错误", "10014": "公安系统失败,征信系统成功", "10015": "公安服务暂时不可用", "10016": "存储用户图片失败", "10017": "非法 identify_id", "10018": "用户信息不存在", "10020": "认证超时", "10021": "重复的请求,返回上一次的结果", "10022": "用户信息错误", "10026": "用户身份证数据不在公安比对数据库中", "10027": "语音识别失败", "10028": "唇动检测失败", "90100": "刷脸取消" }; function doWxVerifyFace(param, callback) { wx.invoke("checkIsSupportFaceDetect", {}, function (res) { if (res.err_code != 0) { $.toast("当前微信版本不支持刷脸:" + res.err_code); return; } if (param == null) { $.toast("缺少参数"); return; } var p = {appId: appid}; var pre_info = "{\"name\":\"" + param.pername + "\",\"id_card_number\":\"" + param.codeno + "\""; if (param.key) { pre_info += ",\"user_id_key\": \"" + param.key + "\""; } pre_info += "}"; p.request_verify_pre_info = pre_info; p.check_alive_type = Base.check_alive_type; wx.invoke("requestWxFacePictureVerify", p, function (res) { if (callback) { var p = {}; p.code = res.err_code; p.msg = err__msg[p.code]; if (p.msg == null) { p.msg = "刷脸错误,错误码:" + p.code; } p.key = res.verify_result; if (p.code == 0) { validFace({token: p.key, qrtoken: param.qrtoken, ywdjh: param.ywdjh}, function () { callback(p); }); } else { //callback(p); $.toast(p.msg); } } }); }); } function wxCloundFace(p, call) { var a = window.location.href; if (a.indexOf("BizToken") != -1) {//刷脸认证返回 //params.type=type; validFace({qrtoken: p.qrtoken}, call, function (data) { $.dialog({title: "", content: data.resmsg, mode: 1}, function (index) { //$.openWin("login.jsp?ref=no"); window.location.href = Base.gobackurl; //window.location.href = window.location.href.split("?")[0]; }); }); return; } if (p.url) {//跳转刷脸url window.location.href = p.url; return; } } function doFace(p, callback) { var params = {"method": "local.user.initface", "v": "1.0"}; if (p.pername) { params.pername = p.pername; } if (p.codeno) { params.codeno = p.codeno; } if (p.qrtoken) { params.qrtoken = p.qrtoken; } if (p.returnurl) { params.returnurl = p.returnurl; } else { params.returnurl = window.location.href.split("#")[0]; } if (p.faceType) { params.facetype = p.faceType;// } else { params.facetype = Base.faceType; } if (params.facetype == 3) { var a = window.location.href; if (a.indexOf("BizToken") != -1) {//刷脸认证返回 wxCloundFace(p, callback); return; } } $.doSubmit("", params, function (data) { if (params.facetype == 1) {//城市生活服务 doWxVerifyFace(p, callback); } if (params.facetype == 3) {//慧眼 p.url = data.url; wxCloundFace(p, callback); } }, function (data) { }); } function wxConfig(isDebug) {//获取微信内置api 调用权限 if (!isDebug) { isDebug = false; } var p = {toast: 0, 'method': 'user.wxconfig', 'v': '1.0'}; p.wxurl = location.href.split('#')[0]; $.doSubmit('', p, function (data) { appid = data.appid; if (data.facebug == 0) { facebug = true; } else { facebug = false; } wx.config({ beta: true, debug: isDebug, appId: data.appid, timestamp: data.timestamp, nonceStr: data.noncestr, signature: data.signature, jsApiList: ["chooseImage", "scanQRCode", "uploadImage", "startRecord", "previewImage", "requestWxFacePictureVerify", "checkIsSupportFaceDetect"] }); }, function (data) { $.toast(data.resmsg); }); } function wxscanQRCode(callback, code) { if (!code) { code = 1; } wx.scanQRCode({ needResult: code, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果, scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有 success: function (res) { var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果 if (callback) { callback(result); } } }); } function base64(value) { var str = CryptoJS.enc.Utf8.parse(value); return CryptoJS.enc.Base64.stringify(str); } function openPicker(callfun, showday) {//depth weui.datePicker({ start: 2000, end: 2070, defaultValue: [new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()], onChange: function (result) { if (showday) { $('.weui-picker .weui-picker__bd .weui-picker__group').eq(2).hide(); } }, onConfirm: function (result) { console.log(result); var data = {year: result[0]} data.month = result[1] < 10 ? ("0" + result[1]) : result[1]; data.day = result[2] < 10 ? ("0" + result[2]) : result[2]; if (callfun) { callfun(data); } } }); } function uploadImage(callFun) { wx.chooseImage({ count: 1, // 默认9 sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有 sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 success: function (res) { var localId = res.localIds[0]; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 wx.uploadImage({ localId: localId, // 需要上传的图片的本地ID,由chooseImage接口获得 isShowProgressTips: 1, // 默认为1,显示进度提示 success: function (res) { var serverId = res.serverId; // 返回图片的服务器端ID $.toast("图片已上传"); if (callFun) { callFun(serverId); } } }); }, fail: function (res) { $.toast("图片上传失败"); } }); } /* var global= {"newsevent":"http://www.scsjgjj.com/ShowChannel.aspx?id=27" ,"im":"http://www.scsjgjj.com/know.aspx" ,"city":"四川省省级" ,"imcustmsg":"http://www.scsjgjj.com/know.aspx" ,"workguid":"http://www.scsjgjj.com/ShowChannel.aspx?id=15" ,"newssurvey":"http://www.scsjgjj.com/ShowLeaveChannel.aspx?id=22" ,"phone2":"12329" ,"newslodge":"http://www.scsjgjj.com/ShowLeaveColumn.aspx?id=76&channelId=22" ,"newspolicy":"http://www.scsjgjj.com/wx/News/List16?listid=0&&page=10&&index=1&&navid=0", "newshot":"http://www.scsjgjj.com/wx/News/List27?listid=45&&page=10&&index=1&&navid=2" ,"web":"http://www.scsjgjj.com" ,"phone":"12329" ,"sinaWeibo":"https://weibo.com/u/6046993337" ,"myzixun":"" ,"myadvisory":""}*/ $.extend({ dialog: dialog, halfScreenDialog: halfScreenDialog, list2Row: list2Row, closeToast: closeToast, val: val, val2: val2, remove: remove, openWin: openWin, closeCurrWin: closeCurrWin, closeWin: closeWin, dataFormat: dataFormat, setLayOut: setLayOut, activateUrl: activateUrl, global: global, wxVerifyFace: doWxVerifyFace, /** 微信内置刷脸 */ wxConfig: wxConfig, /** 微信内置api权限获取 */ setCookie: setCookie, getCookie: getCookie, delCookie: delCookie, openPicker: openPicker, uploadImage: uploadImage, wxConfig: wxConfig, base64: base64, doFace: doFace, quit: quit, setSelect: setSelect, wxscanQRCode: wxscanQRCode, scanQRCode: wxscanQRCode }); })(jQuery); __seconds = 60; function getSMSCode(phone, busType, sign, em, form) { if (__seconds < 60) { return; } if (!form) { form = "myform"; } if (!$.doValid(form, 1)) { return; } if (!em) { em = "yzmbt"; } var codetype = $("#codetype").val(); var params = { "phone": phone, "codetype": codetype, "bustype": busType, "method": "local.user.getCheckCodeNews", "v": "1.0" }; if (sign) { params.unlogin = sign; } $.doSubmit("", params, function (data) { if (busType == "SMS_WXDL") { var showphone = data.currentPhone; $("#phonetype").show(); $("#currentPhone").val(showphone); $(".login_box").css("height", "18rem"); } $.toast("验证码已发送到手机,请注意查收!"); var embt = document.getElementById(em); $("#" + em).css("color", "#999999"); time = setInterval(function () { __seconds = __seconds - 1; var temp = __seconds <= 9 ? ("0" + __seconds) : __seconds; $("#" + em).text("(" + temp + "S)后重新获取"); if (__seconds < 0) { clearInterval(time); $("#" + em).text("获取验证码"); $("#" + em).css("color", "#49A5E1"); __seconds = 60; embt.disabled = false; } }, 1000); embt.disabled = true; }, function (data) { $.toast(data.resmsg); }); } function initResource(relist) { if (!relist) { relist = $.val("relist") } if (!relist) { return; } var relist = $.parseJSON(relist);//[{number:1,datatype:"1",name:"身份证"},{number:1,datatype:"1",name:"购房合同"}]; var fileList = relist; if (relist.length <= 0) { return; } $("#fileNum").val(relist.length); $("#uprestip").show(); if (relist.length == 0) { $("#uprestip").hide(); } var c = 0, html = ""; var asst = ""; for (var i = 0; i < fileList.length; i++) { var obj = fileList[i]; var dataname = obj.name; var isrquired = obj.isrquired; var sfymb = obj.sfymb; if (dataname.indexOf("身份证") != -1) { dataname = dataname; if(sfymb == "1"){ html += "
"; html += " "; html += "
"; } html += "
" + dataname + asst + "
"; html += "
"; html += "
"; html += "
"; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
"; html += "
"; html += "
"; html += "
"; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
"; html += "
"; html += "
"; } else { if (isrquired == 1) { if(sfymb == "1"){ html += "
"; html += " "; html += "
"; } html += "
" + dataname + asst + "
"; html += "
"; html += "
"; html += "
"; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
"; html += "
"; html += ""; html += "
"; }else{ if(sfymb == "1"){ html += "
"; html += " "; html += "
"; } html += "
" + dataname + asst + "
"; html += "
"; html += "
"; html += "
"; html += " "; html += " "; html += " "; html += " "; html += " "; html += " "; html += "
"; html += "
"; html += ""; html += "
"; } } } $("#file_grids").html(html); $(".fund_grid").unbind("click"); $(".fund_grid").bind("click", function () { $(this).find("input")[0].click(); }); } function getArchive(obj, id) { return obj; } function onChangeFile(that) { var className = that.className; $("#" + className).show(); var b = false; if (!that.value) { b = true; } var a = that.value.substr(that.value.lastIndexOf(".") + 1).toLowerCase(); if (a != "jpg" && a != "png" && a != "gif") { $.toast("请选择图片格式类型的资料文件"); b = true; } var box = $(that).parent(); if (b) { box.css({"background-image": ""}); that.value = ""; return; } var reader = new FileReader(); reader.onload = function (e) { var imgFile = e.target.result; var w = box.width(); var h = box.height(); var sign = $(that).attr("sign"); if (sign) { var archbox = $(that).parent().parent(); var html = archbox.prop("outerHTML"); html = $(html).bind("click", function () { $(this).find("input")[0].click(); }) archbox.after(html); $(archbox.find("input")[0]).attr("name", "archive"); $(archbox.find("input")[1]).attr("name", "dataId"); $(archbox.find("input")[2]).attr("name", "sfocrsb"); $(archbox.find("input")[3]).attr("name", "ocrsbzd"); $(archbox.find("input")[4]).attr("name", "ocrsbtype"); archbox.find("button").css({ width: "5.6em", "padding-left": ".5em", "color": "rgba(84, 172, 234,0.8)", "background": "rgba(84, 172, 234, 0.13)" }).text("选择图片");//$(that).attr("label") $(that).removeAttr("sign") } box.css({ "background-image": "url(" + imgFile + ")", "background-size": "" + w + "px " + h + "px ", "background-repeat": "no-repeat" }); }; reader.readAsDataURL(that.files[0]); } var Pie = { init: function (id, loanMny, payMny) { this.canvas = document.getElementById(id); this.ctx = this.canvas.getContext("2d"); this.width = this.canvas.width; this.height = this.canvas.height; this.pointX = this.width / 2; this.pointY = this.height / 2; this.i = 0; this.deg = 0; var w = parseInt($(document).width()); this.PI = Math.PI / 180; if (w > 414 && w <= 720) { this.lineWidth = 50; this.R = this.width / 2 - 25; this.textH = 20; this.diff = 55; this.textH2 = 35; } else if (w <= 414) {//针对苹果 this.lineWidth = 30; this.R = this.width / 2 - 25; this.textH = 16; this.diff = this.R / 2 - 10; this.textH2 = 18; } else { this.lineWidth = 70; this.diff = 70; this.R = this.width / 2 - 35; this.textH = 20; this.textH2 = 50; } this.per = payMny / loanMny; this.loanMny = $.dataFormat(loanMny); this.payMny = $.dataFormat(payMny); this.payMnyColor = "#53c495"; this.loanMnyColor = "#6eb9f3"; }, drawPie: function (id, loanMny, payMny) { this.init(id, loanMny, payMny); this.degCount(); }, doDrawPie: function () { this.ctx.clearRect(0, 0, this.width, this.height); this.ctx.lineWidth = this.lineWidth; this.ctx.beginPath(); this.ctx.strokeStyle = this.loanMnyColor; this.ctx.arc(this.pointX, this.pointY, this.R, 0, Math.PI * 2); this.ctx.stroke(); this.ctx.beginPath(); this.ctx.strokeStyle = this.payMnyColor; this.deg = this.i * this.PI; this.ctx.arc(this.pointX, this.pointY, this.R, -90 * this.PI, this.deg - 90 * this.PI); this.ctx.stroke(); this.ctx.fillStyle = this.loanMnyColor; var text = "贷款金额(元)"; this.ctx.font = "0.875em abc"; var text_w = this.ctx.measureText(text).width; var text_h = this.ctx.measureText(text).height; this.ctx.fillText(text, this.width / 2 - text_w / 2, this.pointY - this.diff); text = this.loanMny; text_w = this.ctx.measureText(text).width; this.ctx.fillText(text, this.width / 2 - text_w / 2, this.pointY - this.textH); this.ctx.fillStyle = this.payMnyColor; text = "偿还本金(元)"; text_w = this.ctx.measureText(text).width; this.ctx.fillText(text, this.width / 2 - text_w / 2, this.pointY + this.diff); var text = this.payMny; text_w = this.ctx.measureText(text).width; this.ctx.fillText(text, this.width / 2 - text_w / 2, this.pointY + this.diff + this.textH2); }, degCount: function () { Pie.doDrawPie(); if (((Pie.per * 360) * Pie.PI - Pie.deg) < 0.01) { return; } if (window.webkitRequestAnimationFrame) { window.webkitRequestAnimationFrame(Pie.degCount); } else if (window.requestAnimationFrame) { window.requestAnimationFrame(Pie.degCount); } else if (window.oRequestAnimationFrame) { window.oRequestAnimationFrame(Pie.degCount); } if (Pie.per < 0.3) { Pie.i += 1; } else { Pie.i += 4; } } } function autoFullUP() {//自动填充用户名和密码 var _loginacc = $.val("_loginacc"); if (_loginacc) { $("#loginacc").val(_loginacc); } } function autoLogin() {//自动登录 var _loginacc = $.val("_loginacc"); var _loginpwd = $.val("_loginpwd"); if (!_loginacc) { return; } if (!_loginpwd) { return; } $.doSubmit("", { "toast": 0, "loginacc": _loginacc, "loginpwd": _loginpwd, "method": "user.login", "v": "1.0" }, function (data) { $.val("_loginacc", $("#loginacc").val()); $.val("_loginpwd", $("#loginpwd").val()); $.val("signflag", data.signflag); }, function (data) { $.toast(data.resmsg); $.openWin("login.jsp"); }); } function removeUserInfo() { var _loginacc = $.val("_loginacc"); var _loginpwd = $.val("_loginpwd"); if (_loginacc == null || _loginpwd == null) { $.toast("您没有绑定用户信息"); return; } $.remove("_loginacc"); $.remove("_loginpwd"); $.toast("解绑成功"); } function reportGenerator(parameters) { var defaults = {"method": "user.generateReport", "v": "1.0"}; parameters = $.extend(defaults, parameters); $.doSubmit("", parameters, function (data) { $.openWin("download.jsp?token=" + data.token + "&type=" + parameters.type + "&r=" + Math.random()); }, function (data) { $.toast(data.resmsg); }, function () { $.toast(data.resmsg); }); } function fetchMenu(list, type) { if (list.length == 0) { $("#" + type).hide(); } else { $("#" + type).show(); var box = $("#" + type).find(".weui-flexs"); box.html(""); for (var i = 0; i < list.length; i++) { var html = ""; if(list[i].funurl.indexOf("http")!=-1){ html += '
' }else{ html += '
' } html += '
' html += '' html += '
' html += '

' + list[i].name + '

' html += '
' box.append(html) } } } function initData() {//提取 arealist = $.parseJSON($.val("arealist"));//缓存区域,提取页面初始化 dklxlist = $.parseJSON($.val("dklxlist"));//缓存身份类型提取页面初始化 idlist = $.parseJSON($.val("idlist"));//缓存贷款类型,提取页面初始化 $.setSelect("cdxzqydm", arealist);//项目区域 $.setSelect("spousezjlx", idlist);//配偶证件类型 $.setSelect("ownzjlx", idlist);//关联人证件类型 $.setSelect("dklx", dklxlist);//配偶证件类型 } function clearNoNum(obj) {//提取 obj.value = obj.value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符 obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的 obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');//只能输入两个小数 if (obj.value.indexOf(".") < 0 && obj.value != "") {//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 obj.value = parseFloat(obj.value); } var allstandmny = $("#allstandmny").val() - 0; var factfetchmny = $("#factfetchmny").val() - 0; if (factfetchmny > allstandmny) { $.dialog({title: "", content: "提取金额不能大于可提取金额", mode: 1}, function (index) { }); $("#factfetchmny").val(""); } else if (factfetchmny * 100 % 10000 != 0) { $.dialog({title: "", content: "申请提取金额必须以百元为单位", mode: 1}, function (index) { }); $("#factfetchmny").val(""); } else if (factfetchmny <= 0) { $.dialog({title: "", content: "请输入正确的提取金额", mode: 1}, function (index) { }); $("#factfetchmny").val(""); } } function clearNoNum1(obj) {//提取 obj.value = obj.value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符 obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的 obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');//只能输入两个小数 if (obj.value.indexOf(".") < 0 && obj.value != "") {//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 obj.value = parseFloat(obj.value); } } function openpick(obj, format, fun) { $.openPicker(function (data) { if (format == "yyyymm") { obj.value = data.year + "" + data.month; } else if (format == "mm") { obj.value = data.month; } else { obj.value = data.year + "-" + data.month + "-" + data.day; } if (fun) { fun(); } }); } $(document).ready(function () { if (window.onViewOpen) { onViewOpen(); } if (window.onViewCreate) { onViewCreate(); } if (!window.goback) { $("#nav-left").bind("click", function () { window.history.go(-1); }); var nav = $("
"); nav.bind("click", function () { $.closeCurrWin() }); $(document.body).append(nav); } }) function fnSelSheng(that) { // 710000 810000 820000 台湾 香港 澳门 的没有市县 $("#shi").find("option").remove(); $("#xian").find("option").remove(); $("#shi").html(''); $("#xian").html(''); var value = that.value; if (value == "710000" || value == "810000" || value == "820000") { $("#shi1").hide(); $("#xian1").hide(); $.val("shi", ""); $.val("xian", ""); } else { $("#shi1").show(); $("#xian1").show(); fnSelectedProvince(value, "2"); $.val("xian", ""); } } function fnSelShi(that) { $("#xian").find("option").remove(); $("#xian").html(''); var value = that.value; fnSelectedProvince(value, "3"); } function fnSelXian(that) { var shi = $("#shi").val(); if (!shi) { return; } if (shi != "360100") { set_select_checked("fwssqy", "1"); } else { set_select_checked("fwssqy", "0"); } } var desheng; var deshi; /** * 获取省/市/县 */ function fnSelectedProvince(pidcode, type, data) { var params = { "method": "user.getDefaultArea", "v": "1.0" }; $.doSubmit("", params, function (resData) { desheng = resData.desheng; deshi = resData.deshi; if (desheng && deshi) { var param = {"pidcode": pidcode, "type": type, "method": "user.getPcclink", "v": "1.0"}; if (type == 0) { // 初始化 var v1 = {"sheng": "000000", "shi": desheng, "xian": deshi}; param = $.extend(v1, param); } else if (type == 2) { // 获取市后处理是否本市 if ($("#sheng").val() != desheng) { set_select_checked("fwssqy", "1"); } } else if (type == 3) { // 获取县后处理是否本市 if ($("#shi").val() != deshi) { set_select_checked("fwssqy", "1"); } else { set_select_checked("fwssqy", "0"); } } else if (type == 4) { } else if (type == 5) { var v2 = {"sheng": data.sheng, "shi": data.shi, "xian": data.xian}; param = $.extend(v2, param); } $.doSubmit("", param, function (resData) { var shengList = resData.shengList; var shiList = resData.shiList; var xianList = resData.xianList; if (type == 0) { for (var i = 0; i < shengList.length; i++) { $("").val(shengList[i].id.toString()).text(shengList[i].name.toString()).appendTo("#sheng"); } for (var i = 0; i < shiList.length; i++) { $("").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi"); } for (var i = 0; i < xianList.length; i++) { $("").val(xianList[i].id.toString()).text(xianList[i].name.toString()).appendTo("#xian"); } set_select_checked("sheng", desheng); set_select_checked("shi", deshi); } else if (type == 2) { for (var i = 0; i < shiList.length; i++) { $("").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi"); } } else if (type == 3) { for (var i = 0; i < xianList.length; i++) { $("").val(xianList[i].id.toString()).text(xianList[i].name.toString()).appendTo("#xian"); } } else if (type == 5) { for (var i = 0; i < shengList.length; i++) { $("").val(shengList[i].id.toString()).text(shengList[i].name.toString()).appendTo("#sheng"); } for (var i = 0; i < shiList.length; i++) { $("").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi"); } for (var i = 0; i < xianList.length; i++) { $("").val(xianList[i].id.toString()).text(xianList[i].name.toString()).appendTo("#xian"); } set_select_checked("sheng", data.sheng); set_select_checked("shi", data.shi); set_select_checked("xian", data.xian); } }, function (data) { $.toast(data.resmsg, 2000); }); } }, function (data) { $.toast(data.resmsg, 2000); }); } function fnYDDKSelectedProvince(pidcode, type, data) { var params = { "method": "user.getDefaultArea", "v": "1.0" }; $.doSubmit("", params, function (resData) { desheng = resData.desheng; deshi = resData.deshi; if (desheng && deshi) { var param = {"pidcode": pidcode, "type": type, "method": "user.getPcclink", "v": "1.0"}; if (type == 0) { // 初始化 var v1 = {"sheng": "000000", "shi": desheng, "xian": deshi}; param = $.extend(v1, param); } else if (type == 2) { // 获取市后处理是否本市 if ($("#sheng").val() != desheng) { set_select_checked("fwssqy", "1"); } } else if (type == 3) { // 获取县后处理是否本市 if ($("#shi").val() != deshi) { set_select_checked("fwssqy", "1"); } else { set_select_checked("fwssqy", "0"); } } else if (type == 4) { } else if (type == 5) { var v2 = {"sheng": data.dssheng, "shi": data.gsshi, "xian": data.gsxian}; param = $.extend(v2, param); } $.doSubmit("", param, function (resData) { var shengList = resData.shengList; var shiList = resData.shiList; var xianList = resData.xianList; if (type == 0) { $("").val("").text("可选").appendTo("#sheng"); $("").val("").text("可选").appendTo("#shi"); $("").val("").text("可选").appendTo("#xian"); for (var i = 0; i < shengList.length; i++) { $("").val(shengList[i].id.toString()).text(shengList[i].name.toString()).appendTo("#sheng"); } for (var i = 0; i < shiList.length; i++) { $("").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi"); } for (var i = 0; i < xianList.length; i++) { $("").val(xianList[i].id.toString()).text(xianList[i].name.toString()).appendTo("#xian"); } // set_select_checked("sheng", desheng); // set_select_checked("shi", deshi); } else if (type == 2) { for (var i = 0; i < shiList.length; i++) { $("").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi"); } } else if (type == 3) { for (var i = 0; i < xianList.length; i++) { $("").val(xianList[i].id.toString()).text(xianList[i].name.toString()).appendTo("#xian"); } } else if (type == 5) { for (var i = 0; i < shengList.length; i++) { $("").val(shengList[i].id.toString()).text(shengList[i].name.toString()).appendTo("#sheng"); } for (var i = 0; i < shiList.length; i++) { $("").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi"); } for (var i = 0; i < xianList.length; i++) { $("").val(xianList[i].id.toString()).text(xianList[i].name.toString()).appendTo("#xian"); } set_select_checked("sheng", data.dssheng); set_select_checked("shi", data.gsshi); set_select_checked("xian", data.gsxian); myReadonly("sheng,shi,xian,outfundname"); } }, function (data) { $.toast(data.resmsg, 2000); }); } }, function (data) { $.toast(data.resmsg, 2000); }); } function set_select_checked(selectId, checkValue) { var select = document.getElementById(selectId); for (var i = 0; i < select.options.length; i++) { if (select.options[i].value == checkValue) { select.options[i].selected = true; break; } } } function fnTqfs() { $("#fetchhander").hide(); var tqfs = $("#tqfs").val(); if (tqfs == "02") { $('#bkcard').attr("readonly", false); $('#bkcardcode').attr("readonly", false); $('#skyhmc').attr("readonly", false); $("#bkcard").val(""); $("#bkcardcode").find("option").remove(); $("#skyhmc").val(""); $("#lhhbh").val(""); tqfs02(tqfs); } else if (tqfs == "03") { $("#bkcardcode").find("option").remove(); $('#bkcard').attr("readonly", true); $('#bkcardcode').attr("readonly", true); $('#skyhmc').attr("readonly", true); tqfs03(tqfs); } } function tqfs02(key) { $("#bkcardcode").html(''); var params = { "method": "user.getGjBank", "v": "1.0" }; $.doSubmit("", params, function (data) { var yhhblist = data.yhhblist; for (var i = 0; i < yhhblist.length; i++) { $("").val(yhhblist[i].id.toString()).text(yhhblist[i].name.toString()).appendTo("#bkcardcode"); } }); } function tqfs03(key) { var params = { "method": "user.getBdinfo", "tqfs": key, "v": "1.0" }; $.doSubmit("", params, function (data) { $("#fetchhander").show(); $('#bkcard').val(data.bkcard); $("").val(data.bkcardcode).text(data.bkcardcodedesc).appendTo("#bkcardcode"); $('#skyhmc').val(data.skyhmc); $('#lhhbh').val(data.lhhbh); }, function (data) { $.toast(data.resmsg, 2000); $("#tqfs").val("02"); fnTqfs(); }); } function fnInitHisSelect(data) { if(data) { $("#histqlist").show(); var html = "" for (var i=0;i< data.length;i++) { var yhk = data[i]; html += "" } $("#hisTqYhkList").html(html); }else{ $("#histqlist").hide(); } } function fnSelectHisTqYhk() { var hisTqYhkList = $("#hisTqYhkList").val(); if(hisTqYhkList){ myhide("bkcardcode1,bkcard_desc"); var hisTqYhk = hisTqYhkList.split('|'); $("#bkcard").val(hisTqYhk[2]); $("#skyhmc").val(hisTqYhk[3]) $("#bkcardcode").val(hisTqYhk[1]); $("#lhhbh").val(hisTqYhk[0]); //tqfs02(tqfs); $("#fetchhander").hide(); if(!$("#bkcardcode").val()){ $("#bkcardcode").focus(); return; } var params = { "method": "user.checkBkcardType", "v": "1.0", "tqfs": $("#tqfs").val(), "lhhbh": $("#lhhbh").val(), "bkcardcode": $("#bkcardcode").val(), "bkcard": $("#bkcard").val() }; $.doSubmit("", params, function(data){ $("#fetchhander").show(); }, function (data) { $("#bkcard").val(""); $.toast(data.resmsg, 2000); }); }else{ $("#bkcard").val(""); $("#skyhmc").val("") $("#bkcardcode").val(""); $("#lhhbh").val(""); myshow("bkcardcode1,bkcard_desc"); } } function selBank(that) { if(!$("#bkcardcode").val()){ $("#bkcardcode").focus(); $("#fetchhander").hide(); return; } var params = { "method": "user.getBankCodeByYhhb", "v": "1.0", "yhhb": that.value }; $.doSubmit("", params, function (data) { $('#skyhmc').val(data.skyhmc); myReadonly("skyhmc"); $('#lhhbh').val(data.lhhbh); if($("#bkcard").val()){ fnCheckBkcardType1(); } //不清除银行卡号 //$("#bkcard").val(""); }); } function fnCheckBkcardType1() { $("#fetchhander").hide(); if(!$("#bkcardcode").val()){ $("#bkcardcode").focus(); return; } var params = { "method": "user.checkBkcardType", "v": "1.0", "tqfs": $("#tqfs").val(), "lhhbh": $("#lhhbh").val(), "bkcardcode": $("#bkcardcode").val(), "bkcard": $("#bkcard").val() }; $.doSubmit("", params, function(data){ $("#fetchhander").show(); }, function (data) { $("#bkcard").val(""); $.toast(data.resmsg, 2000); }); } function fnCheckBkcardType(that) { $("#fetchhander").hide(); if(!$("#bkcardcode").val()){ $("#bkcardcode").focus(); return; } var params = { "method": "user.checkBkcardType", "v": "1.0", "tqfs": $("#tqfs").val(), "lhhbh": $("#lhhbh").val(), "bkcardcode": $("#bkcardcode").val(), "bkcard": that.value }; $.doSubmit("", params, function(data){ $("#fetchhander").show(); }, function (data) { $("#bkcard").val(""); $.toast(data.resmsg, 2000); }); } function checkSpouseInfo() { $("#btnValid").hide(); myReadonly("gfhth,bdcqzh"); $("#bdcqzh").attr("disabled",true); var hyzk = $("#hyzk").val(); var poxm = $("#spousename").val(); var pozjlx = $("#spousezjlx").val(); var pozjhm = $("#spousezjhm").val(); var bustype = $.val("bustype"); var buscode = $.val("buscode"); var tqyy = $.val("tqyy"); var tqlx = $("#tqlx").val(); var params = { "method": "user.checkSpouseInfo", "v": "1.0", "hyzk": hyzk, "poxm": poxm, "pozjlx": pozjlx, "pozjhm": pozjhm, "bustype": bustype, "buscode": buscode, "tqyy": tqyy, "tqlx": tqlx }; if(tqyy == "07"){ var ownerList = packageGlr(); var sctq = $("#sctq").val(); var v1; if(sctq == "0"){ v1 = {"ownerList": ownerList,"sctq": sctq}; params = $.extend(v1,params); }else if(sctq == "1"){ v1 = {"sctq": sctq}; params = $.extend(v1,params); } } if (hyzk == "10" || hyzk == "40") { //未婚和离婚不判断配偶信息 } else { if(!hyzk){ $("#hyzk").focus(); return; } if(!poxm){ $("#spousename").focus(); return; } if(!pozjlx){ $("#spousezjlx").focus(); return; } if(!pozjhm){ $("#spousezjhm").focus(); return; } } $.doSubmit("", params, function (data) { if(tqyy == "01" || tqyy == "02" || tqyy == "82"){ removeReadonly("gfhth,bdcqzh"); $("#bdcqzh").removeAttr("disabled"); } if (tqyy == "01") { if(data.flag == "1"){ $("#checkSpouse").val("1"); } // initPage2(); }else{ $("#btnValid").show(); } myReadonly("hyzk,spousename,spousezjlx,spousezjhm"); //已婚婚姻协查成功会马上协查配偶,不用重新调一次接口 /*var whjxbl = data.whjxbl; if (whjxbl && whjxbl == "1") { var param = { "method": "user.checkSpouseHouseInfo", "v": "1.0", "hyzk": hyzk, "poxm": poxm, "pozjlx": pozjlx, "pozjhm": pozjhm, "bustype": bustype, "buscode": buscode, "tqyy": tqyy, "tqlx": tqlx }; $.doSubmit("", param, function (data) { }, function (data) { $("#hyzk").removeAttr("disabled"); $("#hyzk").removeAttr("readOnly"); $("#spousename").removeAttr("disabled"); $("#spousename").removeAttr("readOnly"); $("#spousezjhm").removeAttr("disabled"); $("#spousezjhm").removeAttr("readOnly"); var resmsg; if (isJSON(data.resmsg)) { resmsg = $.parseJSON(data.resmsg).msg; } else { resmsg = data.resmsg; } $("#hyzk").val(""); $("#spousename").val(""); $("#spousezjhm").val(""); $.dialog({title: "", content: resmsg, mode: 1}, function (index) { }); }); }*/ /*if (hyzk == "10" || hyzk == "40") {//选择未婚和离婚接口调用完再显示后续页面 getHyzkInfo(hyzk); }*/ if (tqyy == "01") { if (hyzk == "40") { $("#lhsj").val(data.lhsj); $("#lhqd").val("民政"); myReadonly("lhsj"); } } if (tqyy == "07") { var sctq = $("#sctq").val(); if(sctq == "1"){ $("#baje").val(data.rentMaxMoney); $("#bcktqed").val(data.rentMaxMoney); } $("#isAddPo").val(data.isAddPo); $("#hzzxzfytje").val(data.hzzxzfytje); addZfGlr(); } if(tqyy == "01" || tqyy == "02" || tqyy == "82"){ if($("#gfhth").val() || $("#bdcqzh").val()){ checkFetchHouseInfo(); } } }, function (data) { if(tqyy == "01" || tqyy == "02" || tqyy == "82"){ myReadonly("gfhth,bdcqzh"); $("#bdcqzh").attr("disabled",true); } if (tqyy == "01") { $("#spousezjhm").val(""); if (hyzk != "20") { $("#hyzk").val(""); } } var resmsg; if (isJSON(data.resmsg)) { resmsg = $.parseJSON(data.resmsg).msg; } else { resmsg = data.resmsg; } $.dialog({title: "", content: resmsg, mode: 1}, function (index) { }); }); } function isJSON(str) { if (typeof str == 'string') { try { var obj = JSON.parse(str); if (typeof obj == 'object' && obj) { return true; } else { return false; } } catch (e) { console.log('error:' + str + '!!!' + e); return false; } } } function jump() { $.closeCurrWin(); } //设置显示输入框 function myshow(ids) { var all = ids.split(","); for (var i = 0; i < all.length; i++) { $("#" + all[i]).show(); } } //设置隐藏输入框 function myhide(ids) { var all = ids.split(","); for (var i = 0; i < all.length; i++) { $("#" + all[i]).hide(); } } //设置必填 function myaddValid(ids) { var all = ids.split(","); for (var i = 0; i < all.length; i++) { var item = $("#" + all[i]); $("#" + all[i]).attr("valid", "r"); } } //移除必填 function removeValid(ids) { var all = ids.split(","); for (var i = 0; i < all.length; i++) { var item = $("#" + all[i]); $("#" + all[i]).attr("valid", ""); } } //设置只读 function myReadonly(ids) { var all = ids.split(","); for (var i = 0; i < all.length; i++) { var item = $("#" + all[i]); if (item.is('select')) { $("#" + all[i]).attr("readOnly", true); $("#" + all[i]).attr("disabled", true); } else { $("#" + all[i]).attr("readOnly", true); } } } //取消只读 function removeReadonly(ids) { var all = ids.split(","); for (var i = 0; i < all.length; i++) { var item = $("#" + all[i]); if (item.is('select')) { $("#" + all[i]).attr("disabled", false); $("#" + all[i]).attr("readOnly", false); } else { $("#" + all[i]).attr("readOnly", false); } } } /** ** 减法函数,用来得到精确的减法结果 ** 说明:javascript的减法结果会有误差,在两个浮点数相减的时候会比较明显。这个函数返回较为精确的减法结果。 ** 调用:accSub(arg1,arg2) ** 返回值:arg1加上arg2的精确结果 **/ function accSub(arg1, arg2) { var r1, r2, m, n; try { r1 = arg1.toString().split(".")[1].length; } catch (e) { r1 = 0; } try { r2 = arg2.toString().split(".")[1].length; } catch (e) { r2 = 0; } m = Math.pow(10, Math.max(r1, r2)); //last modify by deeka //动态控制精度长度 n = (r1 >= r2) ? r1 : r2; return ((arg1 * m - arg2 * m) / m).toFixed(n); } function initPage2() { var tqlx = $("#tqlx").val(); var hyzk = $("#hyzk").val(); var tqrglgx = $("#tqrglgx").val(); if (tqlx && hyzk && tqrglgx) { if (hyzk == "20") { var spousename = $("#spousename").val(); var spousezjhm = $("#spousezjhm").val(); if (spousename && spousezjhm) { myshow("xian1,fkfs1,htqdrq2,fwzlFormater2,fwzj2,btnLast,btnValid,btnBox2"); myhide("tqlx2,hyzk2,zgspousename,zgspousezjhm,tqrglgx1,btnClose,btnNext,btnBox1"); } }else{ myshow("xian1,fkfs1,htqdrq2,fwzlFormater2,fwzj2,btnLast,btnValid,btnBox2"); myhide("tqlx2,hyzk2,zgspousename,zgspousezjhm,tqrglgx1,btnClose,btnNext,btnBox1"); } if (tqlx == "55") { myshow("gfhth2,zxzje2"); myhide("bdcqzh2,sfdy1"); }else{ myshow("bdcqzh2,sfdy1"); myhide("gfhth2,zxzje2"); } } } function fnTqrglgx(){ var tqrglgx = $("#tqrglgx").val(); var validflag = $("#validflag").val(); var tqyy = $.val("tqyy"); var tqlx = $("#tqlx").val(); var hyzk = $("#hyzk").val(); var poxm = $("#spousename").val(); var pozjlx = $("#spousezjlx").val(); var pozjhm = $("#spousezjhm").val(); if(!tqrglgx){ $.dialog({title: "", content: "请选择您与产权人的关系", mode: 1}, function (index) { }); return; } if(tqrglgx == "04"){ $.dialog({title: "", content: "您与产权人的关系为其他,不允许办理", mode: 1}, function (index) { }); $("#tqrglgx").val(""); $("#zjkrxm").val(""); $("#zjkrzjhm").val(""); return; } if(tqrglgx == "02"){ $.dialog({title: "", content: "您与产权人的关系为直系亲属,请前往柜台办理", mode: 1}, function (index) { }); $("#tqrglgx").val(""); $("#zjkrxm").val(""); $("#zjkrzjhm").val(""); return; } if(tqrglgx == "01"){ if(hyzk != "20"){ $.dialog({title: "", content: "您的婚姻状况不是已婚,您与产权人的关系不能为夫妻", mode: 1}, function (index) { }); $("#tqrglgx").val(""); $("#zjkrxm").val(""); $("#zjkrzjhm").val(""); return; } if(hyzk == "20"){ if(!poxm || !pozjlx || !pozjhm){ $.dialog({title: "", content: "配偶信息不能为空", mode: 1}, function (index) { }); $("#tqrglgx").val(""); return; } } } if (tqyy == "01") { if($("#checkSpouse").val() == "0"){//防止正在请求协查时 选择产权人关系,导致跳过协查结果 $("#tqrglgx").val(""); return; } // initPage2(); fetchNext(); } if(tqyy == "01" && tqlx == "55"){ if(tqrglgx == "05" && validflag == "0"){ $("#zjkrxm").val($.val("zjkrxm")); $("#zjkrzjlx").val("01"); $("#zjkrzjhm").val($.val("codeno")); } if(tqrglgx == "01" && validflag == "0"){ $("#zjkrxm").val(poxm); $("#zjkrzjlx").val(pozjlx); $("#zjkrzjhm").val(pozjhm); } }else if(tqyy == "01" && tqlx == "61"){ if(tqrglgx == "05" && validflag == "0"){ $("#zjkrxm").val($.val("zjkrxm")); $("#zjkrzjlx").val("01"); $("#zjkrzjhm").val($.val("codeno")); } if(tqrglgx == "01" && validflag == "0"){ $("#zjkrxm").val(poxm); $("#zjkrzjlx").val(pozjlx); $("#zjkrzjhm").val(pozjhm); } }else if(tqyy == "02" || tqyy == "82"){ if(tqrglgx == "05" && validflag == "0"){ $("#zjkrxm").val($.val("zjkrxm")); $("#zjkrzjlx").val("01"); $("#zjkrzjhm").val($.val("codeno")); } if(tqrglgx == "01" && validflag == "0"){ $("#zjkrxm").val(poxm); $("#zjkrzjlx").val(pozjlx); $("#zjkrzjhm").val(pozjhm); } } } function fnChgFwyt() { var fwyt = $("#fwyt").val(); if(fwyt != "01"){ $.dialog({title: "", content: "非住宅不允许提取", mode: 1}, function (index) { $.closeCurrWin(); }); $("#fwyt").val(""); } return; } function fnhyzk(that){ if ($.val("tqyy") == "01" && !$("#tqlx").val()) { $.dialog({title: "", content: "请先选择提取类型后,在选择婚姻状况!", mode: 1}, function (index) { }); $("#hyzk").val("") $("#spousename").val(""); $("#spousezjhm").val(""); return } if(that.value == "10" || that.value == "40"){ removeValid("spousename,spousezjhm"); $("#zgspousename").hide(); $("#zgspousezjhm").hide(); $("#zgspousezjlx").hide(); $("#spousename").val(""); $("#spousezjhm").val(""); checkSpouseInfo(); }else if(that.value == "20"){ myaddValid("spousename,spousezjhm"); $("#zgspousename").show(); $("#zgspousezjhm").show(); $("#spousename").val(""); $("#spousezjhm").val(""); } } //提交页面返回上一页面反显之前录入的配偶信息 function fnhyzk1(){ var hyzk = $("#hyzk").val(); var tqyy = $.val("tqyy"); if(hyzk == "10" || hyzk == "40"){ removeValid("spousename,spousezjhm"); $("#zgspousename").hide(); $("#zgspousezjhm").hide(); $("#zgspousezjlx").hide(); $("#spousename").val(""); $("#spousezjhm").val(""); }else if(hyzk == "20"){ myaddValid("spousename,spousezjhm"); $("#zgspousename").show(); $("#zgspousezjhm").show(); } if(tqyy == "01" || tqyy == "02" || tqyy == "82"){ //初始化页面时会重置产权人关系和区县下拉选,不能去校验配偶,会报错 }else{ checkSpouseInfo(); } } var mzsm = ""; mzsm+= "尊敬的用户:
"; mzsm+= "  为维护您的权益,请在签署本条款前,仔细阅读各条款内容。您通过南昌住房公积金互联网渠道办理业务即表示您已阅读并同意本声明条款,如您不接受本声明条款,请勿使用南昌住房公积金互联网渠道服务。
"; mzsm+= "一、用户在使用南昌住房公积金互联网渠道服务时,应按照南昌住房公积金互联网渠道的规定正确操作。因操作不当而造成的损失,南昌住房公积金管理中心不承担任何责任。
"; mzsm+= "二、用户必须妥善保管本人账号和密码,因网站执行指令均是通过计算机程序自动完成,无法核实账户操作者是否是用户本人,因此所有使用密码进行的操作均视为用户本人所为,对用户本人具有法律效力。依据密码办理的各类公积金业务所发生的电子信息记录均为办理该项业务的有效凭证。
"; mzsm+= "三、因黑客行为或用户的保管疏忽导致账号、密码遭他人非法使用,而造成用户损失,南昌住房公积金管理中心不承担任何责任。用户应当为自身注册账户下的一切行为负责,因用户行为而导致的用户自身或其他第三方的任何损失,南昌住房公积金管理中心不承担责任。
"; mzsm+= " 四、南昌住房公积金互联网渠道因以下情况没有执行用户指令的,南昌住房公积金管理中心不承担责任:
"; mzsm+= "(一)南昌住房公积金互联网渠道网络系统出现故障;
"; mzsm+= "(二)南昌住房公积金互联网渠道接收到的用户指令信息不明、存在乱码、不完整等;
"; mzsm+= "(三)用户自有资金账户或公积金账户余额不足;
"; mzsm+= "(四)用户自有资金账户或公积金账户内资金被司法冻结或划扣;
"; mzsm+= "(五)不可抗力或其他不可归因于公积金中心的情况。
";