All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.web.lib.js.bee.jquery.bee.cloud.js Maven / Gradle / Ivy

There is a newer version: 6.2.04
Show newest version
/*!
 * 技术支持:度仙(13126408001)
 */
;var $p;try{top.data=parent&&parent.top.data?parent.top.data:new Object();top.ext=parent&&parent.top.ext?parent.top.ext:new Object();$p=parent.$}catch(e){}(function($){$.statusCode={ok:200,error:300,timeout:top.timeout||301,warning:302,nologin:top.nologin||311};$.error=function(msg){$.msg(msg)};$.warning=function(msg){$.msg(msg)};$.msg=function(msg){alert(typeof(msg)=="string"?msg:msg.message+(msg.code?"("+msg.code+")":""))};$.timeout=function(msg){$.msg(msg);top.location.href=top.loginUrl||"/"};$.freshLogin=function(){var $logininfo=$(".logininfo");if($logininfo.length==0){$logininfo=($p||$)(".logininfo")}$logininfo.find("span[name='employee_name']").text($.cookie("employee_name")||$.cookie("account"));$logininfo.find("span[name='org_name']").text($.cookie("org_name"));$logininfo.find("a[name='qout']").text("退出").one("click",function(){$.post({url:$(this).attr("url")||"/auth/login/logout",success:function(data){var strCookie=document.cookie;var arrCookie=strCookie.split("; ");for(var i=0;i0){$.cookie(arr[0],null)}}top.location.href="/"}})})};$.login=function(callback){var option={url:top.dialogLoginUrl,title:"登陆超时,请重新登陆!",win:window,width:"448px",height:"380px",onshow:function(){console.log("onshow")},oniframeload:function(){var me=this;me.iframeNode.scrolling="auto";console.log("oniframeload")},onclose:function(){if(this.returnValue){if(typeof(dt.callback)=="function"){dt.callback(this.returnValue)}}console.log("onclose")},onremove:function(){console.log("onremove")},callback:function(){callback();$.freshLogin();this.remove()},cancel:false};top.dialog(option).showModal()};$.reload=function(){if(!top.ajaxList){return}top.sending=top.ajaxList.length;var s;while(s=top.ajaxList.pop()){$.ajax(s)}};$.phost={wechat:"http://wechat.gcc.linham.cn"};$.churl=function(url){var arr=url.split("/");if(arr.length<3){return url}var nurl=$.phost[arr[1]];if(nurl){url=nurl+url}return url};$.isCross=function(url){return url.indexOf("://")>0&&url.indexOf("://"+document.domain)==-1};$.oAjax=$.ajax;$.ajaxCount=0;$.ajax=function(s){if(!s){return}if(s.dataType=="html"){return $.oAjax(s)}s.url=s.url.rurl(s.data);s.dataType=s.dataType||"json";if(s.data instanceof FormData){s.processData=false;s.contentType=false}else{s.contentType="application/json;charset=utf-8"}if(s.dataType=="json"&&$.isCross(s.url)){s.crossDomain=true;s.xhrFields={withCredentials:true}}if(s.type!="GET"&&s.dataType=="json"&&typeof(s.data)=="object"&&!(s.data instanceof FormData)){s.data=JSON.stringify(s.data)}if(s.success){var _s=s;var _success=s.success;var _error=s.error||$.error;s.success=function(msg,textStatus,xhr){var headers=xhr.getAllResponseHeaders();if(typeof(msg)=="string"){_success(msg);return}if(msg.status==(top.timeout||$.statusCode.timeout)){if(top.openLogin){return}if($.cookie("token")&&!top.openLogin&&top.dialogLoginUrl){if(!top.ajaxList){top.ajaxList=[]}top.ajaxList.push(_s);top.openLogin=true;$.login(function(){top.openLogin=false;$.reload()})}else{top.location.href=top.loginUrl||"/"}}else{if(msg.status==(top.nologin||$.statusCode.nologin)){if($.cookie("token")&&!top.openLogin&&top.dialogLoginUrl){if(!top.ajaxList){top.ajaxList=[]}top.ajaxList.push(_s);top.openLogin=true;$.login(function(){top.openLogin=false;$.reload()})}else{top.location.href=top.loginUrl||"/"}}else{if(msg.status==$.statusCode.ok){if(!msg.data){msg.data=[]}_success(msg)}else{if(msg.status==$.statusCode.warning){$.warning(msg.massage)}else{if(msg.status==$.statusCode.error){_error(msg)}else{if(msg.message){_error(msg)}else{_success(msg)}}}}}}if(msg.status!=$.statusCode.ok&&msg.massage&&$.error){$.error(msg.massage)}}}var _complete=s.complete;s.complete=function(XHR,TS){$.ajaxCount--;if(_complete){_complete(XHR,TS)}$.loaded(XHR,TS)};$.loading();$.ajaxCount++;$.oAjax(s)};$.loading=function(){var dialog=top.dialog?top.dialog.get(window):null;if(dialog&&dialog.loading){dialog.loading()}else{var tabbar=top.tabbar?typeof(top.tabbar.get)=="function"?top.tabbar.get(window):top.tabbar:{};if(tabbar&&tabbar.loading){tabbar.loading()}}};$.loaded=function(){var dialog=top.dialog?top.dialog.get(window):null;try{if($.ajaxCount<=0&&dialog&&dialog.loaded){dialog.loaded()}else{if($.ajaxCount<=0){var tabbar=top.tabbar?typeof(top.tabbar.get)=="function"?top.tabbar.get(window):top.tabbar:{};if(tabbar&&tabbar.loaded){tabbar.loaded()}}}}catch(e){alert(e)}};$.arg=function(){if(typeof(arguments[0])=="object"){var args=arguments[0];if(args.dataType==undefined){args.dataType="json"}if(args.cache==undefined){args.cache=false}return args}var url=arguments[0],data=arguments[1],callback=arguments[2],type=arguments[3],async=arguments[4];if($.isFunction(data)){type=type||callback;callback=data;data={}}if(typeof(type)=="boolean"){async=type;type="json"}return{url:url,data:data,success:callback,dataType:type||"json",cache:false,async:async===false?false:true}};$.get=function(){var opt=$.arg.apply(this,arguments);opt.type="GET";return $.ajax(opt)};$.post=function(){var opt=$.arg.apply(this,arguments);opt.type="POST";return $.ajax(opt)};$.put=function(){var opt=$.arg.apply(this,arguments);opt.type="PUT";return $.ajax(opt)};$.del=function(){var opt=$.arg.apply(this,arguments);opt.type="DELETE";return $.ajax(opt)};$.download=function(){var opt=$.arg.apply(this,arguments);var url=opt.url;var data=opt.data||{};var arr=[];$.each(data,function(k,v){arr.push(k+"="+v)});url+=(url.indexOf("?")>0?"&":"?")+arr.join("&");var xhr=new XMLHttpRequest();xhr.open("GET",url,true);xhr.responseType="blob";xhr.onload=function(){var responseHeaders="getAllResponseHeaders" in xhr?$.download.parseHeaders(xhr.getAllResponseHeaders()):null;var disposition=responseHeaders["content-disposition"];if(this.status===200){if(!disposition){var reader=new FileReader();reader.readAsText(xhr.response,"utf-8");reader.onload=function(){var data=JSON.parse(reader.result);alert(data.message||"文件不存在!")};return}var fileName=disposition.split(";")[1].split("filename=")[1];var blob=this.response;var a=document.createElement("a");a.download=fileName;a.href=window.URL.createObjectURL(blob);a.click();if(opt.success){opt.success(this.status)}}};xhr.send()};$.download.parseHeaders=function(headers){var parsed={};var key;var val;var i;if(!headers){return parsed}$.download.myForEach(headers.split("\n"),function parser(line){i=line.indexOf(":");key=$.trim(line.substr(0,i)).toLowerCase();val=$.trim(line.substr(i+1));if(key){if(parsed[key]&&ignoreDuplicateOf.indexOf(key)>=0){return}if(key==="set-cookie"){parsed[key]=(parsed[key]?parsed[key]:[]).concat([val])}else{parsed[key]=parsed[key]?parsed[key]+", "+val:val}}});return parsed};$.download.myForEach=function(obj,fn){if(obj===null||typeof obj==="undefined"){return}if(typeof obj!=="object"){obj=[obj]}if(Array.isArray(obj)){for(var i=0,l=obj.length;i0?"&":"?")+params);$("table[res][auto=true]",this).each(function(){var tb=new Table(this);tb.param.params=ps;if($(this).attr("auto")=="true"){tb.go()}});$("ul[res][auto=true]",this).each(function(){var tb=new Table(this);tb.param.params=ps;if($(this).attr("auto")=="true"){tb.go()}});if($.isFunction(callback)){callback()}};return $._load.apply(this,params?[url,params,call]:[url,call])}});$.extend(String.prototype,{rurl:function(data){data=data||{};return this.replace(/\${(.)*?}/g,function($1){return self[$1.replace(/[\${}]+/g,"")]||""}).replace(/{(.)*?}/g,function($1){var key=$1.replace(/[{}]+/g,"");return $.getParam(key)||data[key]||$1}).replace(/\[.*?{.*?}\]/g,"").replace(/[\[\]]/g,"")},isPositiveInteger:function(){return(new RegExp(/^[1-9]\d*$/).test(this))},isInteger:function(){return(new RegExp(/^\d+$/).test(this))},isNumber:function(value,element){return(new RegExp(/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/).test(this))},trim:function(){return this.replace(/(^\s*)|(\s*$)|\r|\n| /g,"")},trans:function(){return this.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')},replaceAll:function(os,ns){return this.replace(new RegExp(os,"gm"),ns)},replaceTm:function($data){if(!$data){return this}return this.replace(RegExp("({[A-Za-z_]+[A-Za-z0-9_]*})","g"),function($1){return $data[$1.replace(/[{}]+/g,"")]})},replaceTmById:function(_box){var $parent=_box||$(document);return this.replace(RegExp("({[A-Za-z_]+[A-Za-z0-9_]*})","g"),function($1){var $input=$parent.find("#"+$1.replace(/[{}]+/g,""));return $input.size()>0?$input.val():$1})},replaceTmByName:function(_box){var $parent=_box||$(document);return this.replace(RegExp("({[A-Za-z_]+[A-Za-z0-9_]*})","g"),function($1){var $input=$parent.find("input[name="+$1.replace(/[{}]+/g,"")+"]");var val=[];$.each($input,function(){if(this.type=="checkbox"){if(this.checked){val.push(this.value)}}else{val.push(this.value)}});return val.length>0?val.join("_"):$1})},encodeHTML:function(){return this.replace(/[<>\"]/g,function(c){return{"<":"<",">":">",'"':"""}[c]})},decodeHTML:function(){return this.replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"')},clear:function(def){return this.replace(/\${(.)*?}/g,def||"")},hashCode:function(){var hash=0,str=this.trim();if(""!=str){for(var i=0;iMAX_VALUE||num0&&data[0]){var tmpData=data[0];val=tmpData[$1.replace(/[\${}]+/g,"")];if(typeof(val)=="object"){val=val.value}}else{var tmp=$1.replace(/[\${}]+/g,"").split("|");var key=tmp[0],obj={};key=key.replace(/#\((.)*?\)/,function($1){var f=$1.replace(/[\#\(\)]+/g,"");var v=data[f];return v?v:f});try{if(key.indexOf(".")>0){var arr=key.split(".");var ks="data";for(var i=0;i1?"|"+tmp[1]:"")+"}"}if(tmp.length>1){if(tmp[1].startsWith("@")){if(val===undefined||val===null){return""}try{if(typeof(val)=="string"&&val.startsWith(",")){val=val.substr(1)}var dkey=tmp[1].substr(1)||key;var _items=_dict[dkey]&&_dict[dkey].items?_dict[dkey].items:null;var dict=_items||$.dictionary[dkey];if(dict instanceof Array){return val}var arr=typeof(val)=="string"?val.split(","):[val];var tvalue="";arr.forEach(function(item,index){var ditem=typeof(dict)=="object"?(dict[item]||item):(dict||item);tvalue+=","+((typeof(ditem)=="object"&&ditem.name!==undefined)?ditem.name:ditem)});return tvalue.substr(1)}catch(e){return val}}else{if(tmp[1].startsWith("#")){try{var obj=eval("("+tmp[1].substr(1)+")");return obj[val]}catch(e){return val}}else{if(tmp[1].startsWith("D")){val=Util.formatDate(val,tmp[tmp.length-1].substr(1))}else{if(tmp[1].startsWith("N")){val=Util.formatNumber(val,tmp[tmp.length-1].substr(1))}else{var tobj={},arr=tmp[1].replaceAll('"',"").replaceAll(",",",").split(",");for(var i=0;i").replace(/</g,"<");var val=eval("("+fn+")");return val==null?"":val}catch(e){return $1}})},isFinishedTm:function(){return !(new RegExp("{[A-Za-z_]+[A-Za-z0-9_]*}").test(this))},skipChar:function(ch){if(!this||this.length===0){return""}if(this.charAt(0)===ch){return this.substring(1).skipChar(ch)}return this},isValidPwd:function(){return(new RegExp(/^([_]|[a-zA-Z0-9]){6,32}$/).test(this))},isValidMail:function(){return(new RegExp(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(this.trim()))},isSpaces:function(){for(var i=0;i"+v+"")})}else{if(res.startsWith("#")){var obj=eval("("+res.substr(1)+")");$.each(obj||{},function(k,v){$dm.append("")})}else{res=res.replace("{parent_value}",pval).replace("{"+$dm.data("pre")+"}",pval);$.get($.turnUrl(res),function(data){var dictItems=data.items?data.items:data.data&&data.data.items?data.data.items:data.data;$.each(dictItems,function(i,item){var children=item.children;var $op=$("");$dm.append($op);$op.data("data",item);$.each(children||[],function(k,ktem){var $op=$("");$dm.append($op);$op.data("data",ktem)})});$dm.val(def)},false)}}};$.radioCheckboxTmp="";$._val=$.fn.val;$.fn.val=function(value){if(value instanceof Array&&value.length>0&&typeof(value[0])=="string"&&this.attr("custom")){for(var i in value){var a=value[i].split(",");value[i]=a[0];if(a.length>1){this.filter("[value="+a[0]+"]").next().val(a[1]).removeAttr("disabled")}else{if(this.filter("[value="+a[0]+"]").length==0){var custom=this.attr("custom");this.filter("[value="+custom+"]").attr("value",a[0]).next().val(a[0]).removeAttr("disabled")}}}this.not("[type=text]").val([value]);return this}var _val=$._val.apply(this,value===undefined?value:[value]);return _val};$.initRadioCheckbox=function($dm){$(":radio[res],:checkbox[res]",$dm).each(function(){var type=this.type;var $this=$(this),res=$this.attr("res"),vfield=$this.attr("vfield"),vtitle=$this.attr("vtitle")||"title",custom=$this.attr("custom"),data_rules=$this.attr("data-rules"),def=$.getParam(this.name)||$this.attr("defval");def=def?def.split(","):[];var $wrap=$this.parent(),$tmp=$this.clone().removeAttr("res");if($wrap.is("label")){$wrap=$wrap.parent();$this.parent().remove()}$this.remove();if(res.startsWith("@")){var item=$.dictionary[res.substr(1)]||{};var $first=$wrap.children().first();$.each(item,function(k,v){var obj={type:type,name:$tmp.attr("name"),value:item instanceof Array?v:k,custom:custom?custom:"",data_rules:data_rules?data_rules:"",title:v};if(custom==obj.value){obj.title="";var $item=$($.radioCheckboxTmp.bind(obj));var name=item instanceof Array?"":(" name="+$this.attr("name"));var $other=$("");$item.append($other);if(item instanceof Array){$other.change(function(){$(this).prev().attr("value",this.value)})}$wrap.append($item)}else{$wrap.append($.radioCheckboxTmp.bind(obj))}});$wrap.find("input").not("[type=text]").val(def);$wrap.find("input").not("[_t=other]").change(function(){$wrap.find("input[_t=other]").attr("disabled","disabled");var $text=$(this).next();if($text.attr("type")=="text"){$text.removeAttr("disabled").focus()}})}else{if(res.startsWith("#")){var obj=eval("("+res.substr(1)+")");$.each(obj||{},function(k,v){var obj={type:type,name:$tmp.attr("name"),value:k,title:v};$wrap.append($.radioCheckboxTmp.bind(obj))});$wrap.find("input").val(def)}else{$.get($.turnUrl(res),function(data){$.each(data.data||data.items||data,function(i,v){var obj={type:type,name:$tmp.attr("name"),value:v[vfield]||v.value,title:v[vtitle]||v.name};$wrap.append($.radioCheckboxTmp.bind(obj))});$wrap.find("input").val(def)},false)}}})};$.loadRadioCheckbox=function($dm){};$.initButton=function($dm){$("button[target=delete]",$dm).each(function(){$(this).click(function(){var $this=$(this),res=$this.attr("href")||$this.attr("res"),title=$this.attr("title"),callback=$this.attr("callback");if(!res){return}var info=title?(title.indexOf("删除")==0?title:"删除"+title):"删除当前数据";if(!confirm("确定"+info+"吗?")){return}$.del(res,function(data){if(callback){if(callback.endsWith("()")){eval(callback)}else{var call=eval(callback);call(data)}}})})})};$.store=function(key,value){if(!key){return}if(value===undefined){var tmpData=localStorage.getItem(key);try{tmpData=JSON.parse(tmpData)}catch(e){}return tmpData}else{var data=value;if(typeof(value)=="object"){data=JSON.stringify(value)}localStorage.setItem(key,data)}},$.initLayDate=function($dm){$("input.datetime,.laydate",$dm).each(function(){var me=$(this);var id=this.id||("id"+Math.random()).replace(".","");if(!this.id){me.attr("id",id)}var option=me.attr("option");option=option?JSON.parse(option):{};option.type=option.type||me.attr("datetype")||"datetime";var curDate=new Date();var defval=$.getParam(this.name)||option.defval;if(defval){defval=defval.trim();var defdate;if("now"==defval){defdate=curDate}else{var num=parseInt(defval.substr(0,defval.length-1))||0,tp=defval.substr(defval.length-1),defdate=new Date();if(tp=="y"){defdate.setFullYear(defdate.getFullYear()+num)}else{if(tp=="M"){defdate.setMonth(defdate.getMonth()+num)}else{if(tp=="d"){defdate.setDate(defdate.getDate()+num)}else{if(tp=="h"){defdate.setHours(defdate.getHours()+num)}else{if(tp=="m"){defdate.setMinutes(defdate.getMinutes()+num)}else{if(tp=="s"){defdate.setSeconds(defdate.getSeconds()+num)}else{if(/^\d+$/.test(defval)){if(defval.length>=9&&defval.length<=10){defval+="000"}defdate=new Date(parseInt(defval))}else{defdate=new Date(defval)}}}}}}}}if(option.type=="year"){defval=Util.formatDate(defdate,"yyyy")}else{if(option.type=="month"){defval=Util.formatDate(defdate,"yyyy-MM")}else{if(option.type=="time"){defval=Util.formatDate(defdate,"hh:mm:ss")}else{if(option.type=="datetime"){defval=Util.formatDate(defdate,"yyyy-MM-dd hh:mm:ss")}else{defval=Util.formatDate(defdate,"yyyy-MM-dd")}}}}me.val(defval)}if(option.min==0||option.min=="nowTime"){var dt=new Date();dt.setHours(dt.getHours()+1);dt.setMinutes(0);dt.setSeconds(0);option.min=Util.formatDate(dt)}else{if(option.min&&option.min.endsWith("h")){var h=parseInt(option.min.replace("h",""))||0;var dt=new Date();dt.setHours(curDate.getHours()+h+1);dt.setMinutes(0);dt.setSeconds(0);option.min=Util.formatDate(dt)}else{if(option.min&&option.min.endsWith("m")){var m=parseInt(option.min.replace("m",""))||0;var dt=new Date();dt.setMinutes(curDate.getMinutes()+m);dt.setSeconds(0);option.min=Util.formatDate(dt)}else{if(option.min&&option.min.endsWith("d")){var d=parseInt(option.min.replace("d",""))||0;var dt=new Date();dt.setDate(curDate.getDate()+d);option.min=Util.formatDate(dt)}else{if(option.min&&option.min.endsWith("M")){var m=parseInt(option.min.replace("M",""))||0;var dt=new Date();dt.setMonth(curDate.getMonth()+m);option.min=Util.formatDate(dt)}else{if(option.min&&option.min.endsWith("y")){var y=parseInt(option.min.replace("y",""))||0;var dt=new Date();dt.setYear(curDate.getYear()+y);option.min=Util.formatDate(dt)}}}}}}option.elem="#"+id;var done=me.attr("done")||me.attr("onchange")||me.attr("callback");option.done=function(value,date){if(done){me.val(value);eval(done)}};option.change=function(value,date){};try{laydate.render(option)}catch(e){console.error(e)}})};$.countdown=function(){setInterval(function(){},1000)};$.initCountdown=function($dm){var $items=$(".countdown",$dm);if($items.length==0){return}window.setInterval(function(){$items.each(function(){var me=$(this),end=me.attr("end"),tmpEnd=parseInt(end),start=me.attr("start"),tmpStart=parseInt(start),curTime=new Date().getTime();if(!end&&!start){return}if(end&&end.length>=10){if(tmpEnd&&tmpEnd>1000000){end=tmpEnd}var endTime=new Date(end).getTime();if(curTime>endTime){me.text("已超时");return}var hh=parseInt((endTime-curTime)/(1000*60*60))||"0";var mm="00"+(parseInt(((endTime-curTime)%(1000*60*60))/(1000*60))||"0");var ss="00"+(parseInt((((endTime-curTime)%(1000*60*60))%(1000*60))/1000)||"0");var info=hh+":"+mm.substr(mm.length-2)+":"+ss.substr(ss.length-2);me.text(info)}else{if(start&&start.length>=10){if(tmpStart&&tmpStart>1000000){start=tmpStart}var startTime=new Date(start).getTime();if(startTime>curTime){me.text("未开始");return}var hh=parseInt((curTime-startTime)/(1000*60*60))||"0";var mm="00"+(parseInt(((curTime-startTime)%(1000*60*60))/(1000*60))||"0");var ss="00"+(parseInt((((curTime-startTime)%(1000*60*60))%(1000*60))/1000)||"0");var info=hh+":"+mm.substr(mm.length-2)+":"+ss.substr(ss.length-2);me.text(info)}else{me.text(end||start)}}})},1000)};$.inputSelect=function($dm){var init=function($sel,data){var call=$sel.attr("onselect");if(call){call=call&&call.endsWith(")")?call:eval(call)}var vfield=me.attr("vfield"),vtitle=me.attr("vtitle")};$("input[select]",$dm).each(function(){var me=$(this),res=me.attr("select"),vfield=me.attr("vfield");if(res.startsWith("@")){let key=res.substr(1),dict=$.dictionary[key];if(dict){let option={lookup:dict instanceof Array?dict:Object.values(dict),minChars:0,onSelect:function(suggestion){me.focus()}};me.autocomplete(option)}}else{me.one("click",function(){alert("asdf")});$.get($.turnUrl(res),function(data){var arr=[];vfield=vfield||"name";$.each(data.data||[],function(i,v){let value=v[vfield]||v.title||null;if(value){arr.push(value)}});let option={lookup:arr,minChars:0,onSelect:function(suggestion){me.focus()}};me.autocomplete(option)},false)}})};$.initTabbar=function($dm){$("a[target=tabbar],button[target=tabbar]",$dm).each(function(e){var $this=$(this);$this.off().click(function(e){stopDefault(e);var me=$(this);var key=me.attr("trgkey")||me.attr("id")||me.attr("key")||("key"+new Date().getTime());if(me.attr("more")!="true"){me.attr("trgkey",key)}var url=me.attr("url")||me.attr("href"),title=me.attr("tab_title")||me.attr("title")||me.text();url=url.bind($.getParams());var id=key;(tabbar||window.top.tabbar).add({url:url,title:title,key:key,info:me.attr("title"),icon:""})})})};$.initUpload=function($dom){$("div[upload=true]",$dom).each(function(e){var $this=$(this)})};$.init=function(dom){dom=dom||document;if(typeof(initDialog)=="function"){initDialog(dom)}$.initSelect(dom);$.inputSelect(dom);$.initRadioCheckbox(dom);$.initButton(dom);$.initLayDate(dom);$.initCountdown(dom);$.initTabbar(dom);$.initUpload(dom)}})(jQuery);$(document).ready(function(){$("body").addClass("animated fadeInDown");$.init();$.freshLogin()});var Util={number_cn:"〇一二三四五六七八九十".split(""),day_cn:"日一二三四五六".split(""),digit_cn:"亿万千百十".split(""),formatNumber:function(z,G){if(!G||!typeof(G)=="string"){return z}if(isNaN(parseFloat(z))){return z}z=parseFloat(z);if(G.trim().startsWith("{")){var w=JSON.parse(G);return w[z]}G=G.replace(/[a-z0-9]/ig,"#");var r=G.substr(0,G.indexOf("#")),F=G.substr(G.lastIndexOf("#")+1);G=G.replace(r,"").replace(F,"");if(!G){return r+z+F}var B=0,E=0,C="",w=0,v=G.split("");for(var x=v.length-1;x>=0;x--){if(v[x]=="."){E=w;w=0;continue}if(v[x]!="#"){C=v[x];B=w;w=0;break}w++}var y="",D=0,A=E>0?"."+"000000000000000000000000".substr(0,E):"",l=0,i=(""+z).split(".");if(i.length>1){l=E==0?parseFloat("."+i[1]):parseFloat("."+i[i.length-1]).toFixed(E);A=(""+l).substr(1)}D=parseInt(i[0])+parseInt(l);i[0]=""+D;if(B==0){y=i[0]}else{var u=i[0].split("");for(var x=0;x




© 2015 - 2024 Weber Informatics LLC | Privacy Policy