123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064 |
- 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 = "<div class='weui-cells' style='margin-top:0px' >";
- var content = [];
- var length = data.length;
- for (var i = 0; i < length; i++) {
- if (!data[i].value) {
- continue;
- }
- content[i] = "<div class='weui-cell ' style='font-size:0.9375em'><div class='weui-cell__bd'>" + (data[i].name != null ? data[i].name : "") + "</div><div class='weui-cell__ft'>" + (data[i].value != null ? data[i].value : "") + "</div></div>";
- }
- html += content.join("") + "</div>";
- 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 = '<div id="dialogs">';
- win +=" <div class='js_dialog' id='iosDialog2' style='display: none;'>"
- win +=" <div class='weui-mask'></div>"
- win +=" <div id='js_dialog_2' class='weui-half-screen-dialog'>"
- win +=" <div class='weui-half-screen-dialog__hd'>"
- win +=" <div class='weui-half-screen-dialog__hd__side'>"
- win +=" <button class='weui-icon-btn' id='hideIOSDialog2'>关闭<i class='weui-icon-close-thin'></i></button>"
- win +=" </div>"
- win +=" <div class='weui-half-screen-dialog__hd__main'>"
- if (params.title != null) {
- win +=" <strong class='weui-half-screen-dialog__title'>"+ (params.title == null ? "" : params.title) +"</strong>"
- }
- win +=" </div>"
- win +=" </div>"
- win +=" <div class='weui-half-screen-dialog__bd' style='max-height: 300px;'>"
- win +=" <p class='weui-half-screen-dialog__tips'>"+ (params.content == null ? "" : params.content) + "</p>"
- win +=" </div>"
- win +=" <div class='weui-half-screen-dialog__ft'>"
- win +=" <a href='javascript:' class='weui-btn weui-btn_primary weui-btn_disabled' id='confirm_btn'>"+counters+"s</a>"
- win +=" </div>"
- win +=" </div>"
- win +=" </div>"
- win +="</div>";
- 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 = "<div class='fund_dialog_confirm' id='dialog99' style='display: ;max-height:100px'>";
- win += " <div class='dialogMask' style='position: fixed;z-index: 1000;width: 100%;height: 100%;top:0;left: 0; background: rgba(0, 0, 0, 0.6);'></div>";
- win += " <div class='fund_dialog' " + (params.mode <= -1 ? "style='padding-bottom:.4em'" : "") + " >";
- if (params.title != null) {
- win += " <div class='fund_dialog_hd'><strong class='fund_dialog_title'>" + (params.title == null ? "" : params.title) + "</strong></div>";
- }
- win += " <div class='fund_dialog_bd'>" + (params.content == null ? "" : params.content) + "</div>";
- if (params.mode != -1) {
- win += " <div class='fund_dialog_ft'>";
- if (params.mode == 0 || params.mode == null) {
- win += " <a id='dialog_cancel' class='fund_btn_dialog default'>取消</a>";
- }
- if (params.mode == 2) {
- win += " <a id='dialog_cancel' class='fund_btn_dialog default'>取消</a>";
- win += " <a id='dialog_ok' class='fund_btn_dialog primary'>" + params.btn + "</a>";
- } else if (params.mode == 3) {
- win += " <a id='dialog_ok' class='fund_btn_dialog primary'>" + params.btn + "</a>";
- } else {
- win += " <a id='dialog_ok' class='fund_btn_dialog primary'>确定</a>";
- }
- win += " </div>";
- }
- win += "</div></div>";
- 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("<option " + slected + " value='" + item[id] + "'>" + name + "</option>");
- }
- 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 += "<div style='padding:0px;' class='fund_grids ' style='width:100%' onclick='showModel(" + obj.id + ")'>";
- html += " <button type='button' style='color: red;background: #ffffff;font-size:1em'>【"+dataname+"】模板</button>";
- html += "</div>";
- }
- html += "<div style='padding:15px' class='fund_grids ' style='width:100%'>" + dataname + asst + "</div>";
- html += "<div class='fund_grids ' style='width:100%'>";
- html += "<div style='height:7em;padding:0px' class='fund_grid grid-2c'>";
- html += " <div class='box box-c' style='height:100%;background-size:cover;background-repeat:no-repeat'>";
- html += " <input type='file' accept='image/*' name='archive' onchange='onChangeFile(this)' style='display: none' id='f" + i + "' valid='r' label='上传" + dataname + "正面' mainName='" + dataname + "正面'/>";
- html += " <input type='hidden' name='dataId' value='" + obj.id + "'/>";
- html += " <input type='hidden' name='sfocrsb' value='" + obj.sfocrsb + "'/>";
- html += " <input type='hidden' name='ocrsbzd' value='" + obj.ocrsbzd + "'/>";
- html += " <input type='hidden' name='ocrsbtype' value='face'/>";
- html += " <button type='button' style='width:9em;padding-left:.5em;color:rgba(84, 172, 234,0.8);background:rgba(84, 172, 234, .18)'>选择"+dataname+"正面</button>";
- html += " </div>";
- html += "</div>";
- html += "<div style='height:7em;padding:0px' class='fund_grid grid-2c'>";
- html += " <div class='box box-c' style='height:100%;background-size:cover;background-repeat:no-repeat'>";
- html += " <input type='file' accept='image/*' name='archive' onchange='onChangeFile(this)' style='display: none' id='f" + i + "' valid='r' label='上传" + dataname + "反面' mainName='" + dataname + "反面'/>";
- html += " <input type='hidden' name='dataId' value='" + obj.id + "'/>";
- html += " <input type='hidden' name='sfocrsb' value='" + obj.sfocrsb + "'/>";
- html += " <input type='hidden' name='ocrsbzd' value='" + obj.ocrsbzd + "'/>";
- html += " <input type='hidden' name='ocrsbtype' value='back'/>";
- html += " <button type='button' style='width:9em;padding-left:.5em;color:rgba(84, 172, 234,0.8);background:rgba(84, 172, 234, .18)'>选择"+dataname+"反面</button>";
- html += " </div>";
- html += "</div>";
- html += "</div>";
- } else {
- if (isrquired == 1) {
- if(sfymb == "1"){
- html += "<div style='padding:0px;' class='fund_grids ' style='width:100%' onclick='showModel(" + obj.id + ")'>";
- html += " <button type='button' style='color: red;background: #ffffff;font-size:1em'>【"+dataname+"】模板</button>";
- html += "</div>";
- }
- html += "<div style='padding:15px' class='fund_grids ' style='width:100%'>" + dataname + asst + "</div>";
- html += "<div class='fund_grids ' style='width:100%'>";
- html += "<div style='height:7em;padding:0px' class='fund_grid grid-2c'>";
- html += " <div class='box box-c' style='height:100%;background-size:cover;background-repeat:no-repeat'>";
- html += " <input type='file' accept='image/*' class='" + obj.id + "' name='archive' onchange='onChangeFile(this)' style='display: none' id='f" + i + "' valid='r' label='上传" + dataname + "' mainName='" + dataname + "'/>";
- html += " <input type='hidden' name='dataId' value='" + obj.id + "'/>";
- html += " <input type='hidden' name='sfocrsb' value='" + obj.sfocrsb + "'/>";
- html += " <input type='hidden' name='ocrsbzd' value='" + obj.ocrsbzd + "'/>";
- html += " <input type='hidden' name='ocrsbtype' value=''/>";
- html += " <button type='button' style='width:5.6em;padding-left:.5em;color:rgba(84, 172, 234,0.8);background:rgba(84, 172, 234, .18)'>选择图片</button>";
- html += " </div>";
- html += "</div>";
- html += "<div style='height:7em;padding:0px;display:none;' class='fund_grid grid-2c' id='" + obj.id + "'>";
- html += " <div class='box box-c' style='height:100%;background-size:cover;background-repeat:no-repeat'>";
- html += " <input type='file' accept='image/*' onchange='onChangeFile(this)' sign='1' style='display: none' id='f" + i + "' label='上传" + dataname + "' mainName='" + dataname + "'/>";
- html += " <input type='hidden' value='" + obj.id + "'/>";
- html += " <input type='hidden' value='" + obj.sfocrsb + "'/>";
- html += " <input type='hidden' value='" + obj.ocrsbzd + "'/>";
- html += " <input type='hidden' value=''/>";
- html += " <button type='button' style='width:25px;height:25px;background:url(css/images/icon-add-act.png);'></button>";
- html += " </div>";
- html += "</div>";
- html += "</div>";
- }else{
- if(sfymb == "1"){
- html += "<div style='padding:0px;' class='fund_grids ' style='width:100%' onclick='showModel(" + obj.id + ")'>";
- html += " <button type='button' style='color: red;background: #ffffff;font-size:1em'>【"+dataname+"】模板</button>";
- html += "</div>";
- }
- html += "<div style='padding:15px' class='fund_grids ' style='width:100%'>" + dataname + asst + "</div>";
- html += "<div class='fund_grids ' style='width:100%'>";
- html += "<div style='height:7em;padding:0px' class='fund_grid grid-2c'>";
- html += " <div class='box box-c' style='height:100%;background-size:cover;background-repeat:no-repeat'>";
- html += " <input type='file' accept='image/*' class='" + obj.id + "' name='archive' onchange='onChangeFile(this)' style='display: none' id='f" + i + "' label='上传" + dataname + "' mainName='" + dataname + "'/>";
- html += " <input type='hidden' name='dataId' value='" + obj.id + "'/>";
- html += " <input type='hidden' name='sfocrsb' value='" + obj.sfocrsb + "'/>";
- html += " <input type='hidden' name='ocrsbzd' value='" + obj.ocrsbzd + "'/>";
- html += " <input type='hidden' name='ocrsbtype' value=''/>";
- html += " <button type='button' style='width:5.6em;padding-left:.5em;color:rgba(84, 172, 234,0.8);background:rgba(84, 172, 234, .18)'>选择图片</button>";
- html += " </div>";
- html += "</div>";
- html += "<div style='height:7em;padding:0px;display:none;' class='fund_grid grid-2c' id='" + obj.id + "'>";
- html += " <div class='box box-c' style='height:100%;background-size:cover;background-repeat:no-repeat'>";
- html += " <input type='file' accept='image/*' onchange='onChangeFile(this)' sign='1' style='display: none' id='f" + i + "' label='上传" + dataname + "' mainName='" + dataname + "'/>";
- html += " <input type='hidden' value='" + obj.id + "'/>";
- html += " <input type='hidden' value='" + obj.sfocrsb + "'/>";
- html += " <input type='hidden' value='" + obj.ocrsbzd + "'/>";
- html += " <input type='hidden' value=''/>";
- html += " <button type='button' style='width:25px;height:25px;background:url(css/images/icon-add-act.png);'></button>";
- html += " </div>";
- html += "</div>";
- html += "</div>";
- }
- }
- }
- $("#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 += '<div class="weui-flex__item shortcut icons" data-url="' + list[i].funurl + '">'
- }else{
- html += '<div class="weui-flex__item shortcut icons" data-url="' + list[i].funurl + '.jsp">'
- }
- html += '<div class="icon_img">'
- html += '<img class="' + list[i].iconskin + '"/>'
- html += '</div>'
- html += '<p class="icon_text">' + list[i].name + '</p>'
- html += '</div>'
- 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 = $("<div class='circle box box-c tx-c'><div class='fa fa-angle-left fa-2x' style='color:#00A1EA;display:relative;'></div></div>");
- 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('<option value="">请选择市</option>');
- $("#xian").html('<option value="">请选择区/县</option>');
- 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('<option value="">请选择区/县</option>');
- 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++) {
- $("<option></option>").val(shengList[i].id.toString()).text(shengList[i].name.toString()).appendTo("#sheng");
- }
- for (var i = 0; i < shiList.length; i++) {
- $("<option></option>").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi");
- }
- for (var i = 0; i < xianList.length; i++) {
- $("<option></option>").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++) {
- $("<option></option>").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi");
- }
- } else if (type == 3) {
- for (var i = 0; i < xianList.length; i++) {
- $("<option></option>").val(xianList[i].id.toString()).text(xianList[i].name.toString()).appendTo("#xian");
- }
- } else if (type == 5) {
- for (var i = 0; i < shengList.length; i++) {
- $("<option></option>").val(shengList[i].id.toString()).text(shengList[i].name.toString()).appendTo("#sheng");
- }
- for (var i = 0; i < shiList.length; i++) {
- $("<option></option>").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi");
- }
- for (var i = 0; i < xianList.length; i++) {
- $("<option></option>").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) {
- $("<option></option>").val("").text("可选").appendTo("#sheng");
- $("<option></option>").val("").text("可选").appendTo("#shi");
- $("<option></option>").val("").text("可选").appendTo("#xian");
- for (var i = 0; i < shengList.length; i++) {
- $("<option></option>").val(shengList[i].id.toString()).text(shengList[i].name.toString()).appendTo("#sheng");
- }
- for (var i = 0; i < shiList.length; i++) {
- $("<option></option>").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi");
- }
- for (var i = 0; i < xianList.length; i++) {
- $("<option></option>").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++) {
- $("<option></option>").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi");
- }
- } else if (type == 3) {
- for (var i = 0; i < xianList.length; i++) {
- $("<option></option>").val(xianList[i].id.toString()).text(xianList[i].name.toString()).appendTo("#xian");
- }
- } else if (type == 5) {
- for (var i = 0; i < shengList.length; i++) {
- $("<option></option>").val(shengList[i].id.toString()).text(shengList[i].name.toString()).appendTo("#sheng");
- }
- for (var i = 0; i < shiList.length; i++) {
- $("<option></option>").val(shiList[i].id.toString()).text(shiList[i].name.toString()).appendTo("#shi");
- }
- for (var i = 0; i < xianList.length; i++) {
- $("<option></option>").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('<option value="">请选择银行名称</option>');
- var params = {
- "method": "user.getGjBank",
- "v": "1.0"
- };
- $.doSubmit("", params, function (data) {
- var yhhblist = data.yhhblist;
- for (var i = 0; i < yhhblist.length; i++) {
- $("<option></option>").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);
- $("<option></option>").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 = "<option value=''>录入新卡</option>"
- for (var i=0;i< data.length;i++) {
- var yhk = data[i];
- html += "<option value='" + yhk.lhhbh + "|" + yhk.yhhb + "|" + yhk.skzh + "|" + yhk.skyhmc + "'>" + yhk.skzh + "|" + yhk.skyhmc + "</option>"
- }
- $("#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+= "尊敬的用户:</br>";
- mzsm+= "  为维护您的权益,请在签署本条款前,仔细阅读各条款内容。您通过南昌住房公积金互联网渠道办理业务即表示您已阅读并同意本声明条款,如您不接受本声明条款,请勿使用南昌住房公积金互联网渠道服务。</br>";
- mzsm+= "一、用户在使用南昌住房公积金互联网渠道服务时,应按照南昌住房公积金互联网渠道的规定正确操作。因操作不当而造成的损失,南昌住房公积金管理中心不承担任何责任。</br>";
- mzsm+= "二、用户必须妥善保管本人账号和密码,因网站执行指令均是通过计算机程序自动完成,无法核实账户操作者是否是用户本人,因此所有使用密码进行的操作均视为用户本人所为,对用户本人具有法律效力。依据密码办理的各类公积金业务所发生的电子信息记录均为办理该项业务的有效凭证。</br>";
- mzsm+= "三、因黑客行为或用户的保管疏忽导致账号、密码遭他人非法使用,而造成用户损失,南昌住房公积金管理中心不承担任何责任。用户应当为自身注册账户下的一切行为负责,因用户行为而导致的用户自身或其他第三方的任何损失,南昌住房公积金管理中心不承担责任。</br>";
- mzsm+= " 四、南昌住房公积金互联网渠道因以下情况没有执行用户指令的,南昌住房公积金管理中心不承担责任:</br>";
- mzsm+= "(一)南昌住房公积金互联网渠道网络系统出现故障;</br>";
- mzsm+= "(二)南昌住房公积金互联网渠道接收到的用户指令信息不明、存在乱码、不完整等;</br>";
- mzsm+= "(三)用户自有资金账户或公积金账户余额不足;</br>";
- mzsm+= "(四)用户自有资金账户或公积金账户内资金被司法冻结或划扣;</br>";
- mzsm+= "(五)不可抗力或其他不可归因于公积金中心的情况。</br>";
|