jQuery.shfftAjax={loadingId:"loading",loadingTextId:"loadingText",timeoutMessage:"操作超时",url:"/fftwebapp",ajaxRequest:function(C,B,A){$.ajax({url:C,type:"POST",cache:false,dataType:"json",data:B,success:function(D){jQuery.shfftAjax.hideShield();if(D.success==false){alert(D.syserr)}else{A(jQuery.shfftAjax.jsonWeightLoss(D))}},error:function(D){jQuery.shfftAjax.hideShield();alert(jQuery.shfftAjax.timeoutMessage)}})},ajaxSynRequest:function(C,B,A){$.ajax({url:C,type:"POST",cache:false,async:false,dataType:"json",data:B,success:function(D){jQuery.shfftAjax.hideShield();if(D.success==false){alert(D.syserr)}else{val=A(jQuery.shfftAjax.jsonWeightLoss(D));return val}},error:function(D){jQuery.shfftAjax.hideShield();$("#showInfo").text("请正确填写输入项")}})},ajaxGetRequest:function(C,B,A){$.ajax({url:C,type:"get",dataType:"json",data:B,success:function(D){jQuery.shfftAjax.hideShield();if(D.success==false){alert(D.syserr)}else{A(jQuery.shfftAjax.jsonWeightLoss(D))}},error:function(D){jQuery.shfftAjax.hideShield();alert(jQuery.shfftAjax.timeoutMessage)}})},jsonWeightLoss:function(A){if($(A.root).size()==1){A.root[0].syserr=A.syserr;return A.root[0]}else{A.root.syserr=A.syserr;return A.root}},showShield:function(){if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("
")}}else{if(document.getElementById("TB_overlay")===null){$("body").append("
")}}$("#TB_overlay").addClass("TB_overlayBG");$("body").append("
处理中,请稍候...
");$("#TB_overlay").show();$("#TB_load").show()},hideShield:function(){$("#TB_window").fadeOut("fast",function(){$("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}$("#TB_overlay").hide();$("#TB_load").hide()},formjsonObject:function(C,I,B){var E={};$("input").each(function(L){var K=$("input:eq("+L+")").attr("name");if((K!="undefined"&&K!=null)&&K!=""){E[K]=$("input:eq("+L+")").val()}});$("select").each(function(L){var K=$("select:eq("+L+")").attr("name");if((K!=undefined&&K!=null)&&K!=""){if($("select:eq("+L+")").val()!=null){E[K]=$("select:eq("+L+")").val()}}});if(C!=null&&B!=null&&I>0){var D=new Array;for(j=1;j<=I;j++){var A={};var J=$(C).size();for(i=1;i<=J;i++){var H=j-1;A[C[i-1].name]=$("."+C[i-1].formidclass+":eq("+H+")").val()}D.push(A)}var G=$.toJSON(D);E[B]=G}var F=$.toJSON(E);return F}};