Edit D:\rfid\libsystem\js\my_init_page_param.js
var _myPage=function(){};var _myPageParamAll=[{code:"libcode,curlibcode",key:"libcode"},{code:"rdrtype",key:"rdrtype"},{code:"doctype",key:"doctype"},{code:"loanrule",key:"loanrule"},{code:"sysid",key:"sysid"},{code:"location,curlocation",key:"location"},{code:"bookseller",key:"bookseller"},{code:"operid",key:"operid"},{code:"fintype",key:"fintype"}];var myPageParams;_myPage.prototype.initData=function(c){if(!myPageParams){myPageParams=c}var a=base_path+"par/common/getInitDatas.do";var b={};b.params=JSON.stringify(c);$.post(a,b,function(d){if(d.status=="0"){c.forEach(function(e,f,g){if(d.rows[0][e.key]){_myPage.prototype.setData(d.rows[0][e.key],e)}});_myPage.prototype.onLoadSuccess(d,c)}},"json")};_myPage.prototype.getLoadData=function(c){var a=base_path+"par/common/getInitDatas.do";var b={};b.params=JSON.stringify(c);$.post(a,b,function(d){if(d.status=="0"){_myPage.prototype.getLoadSuccess(d,c)}},"json")};_myPage.prototype.getLoadSuccess=function(a,b){};_myPage.prototype.onLoadData=function(a,b){b.forEach(function(c,d,e){if(a.rows[0][c.key]){_myPage.prototype.setData(a.rows[0][c.key],c)}})};_myPage.prototype.onLoadSuccess=function(a,b){_fmtGridDataRows=a};_myPage.prototype.setData=function(c,d){d.id=d.key;if(d.code){if(d.code.indexOf(",")>0){var b=d.code.split(",");for(var a=0;a<b.length;a++){d.id=b[a];_myPage.prototype.dataToElement(c,d)}}else{d.id=d.code;_myPage.prototype.dataToElement(c,d)}}else{_myPage.prototype.dataToElement(c,d)}};_myPage.prototype.dataToElement=function(c,d){var b=$("#"+d.id);if(b.length>0){if(!d.tagclass){if(b.attr("class").indexOf("easyui-combobox")<0&&b.attr("class").indexOf("easyui-datagrid")<0){return true}}var a=b[0];if(a.attributes["no-limit"]){d.nolimit=a.attributes["no-limit"].value;if(!d.nolimit){d.nolimit="???"}}else{d.nolimit=undefined}if(a.attributes["init-select"]){d.initselect=a.attributes["init-select"].value}else{d.initselect=undefined}if(!d.tagclass){if(b.attr("class").indexOf("easyui-combobox")>=0){_myPage.prototype.dataToCombobox(c,d)}else{if(b.attr("class").indexOf("easyui-datagrid")>=0){_myPage.prototype.dataToDatagrid(c,d)}}}else{if(d.tagclass=="easyui-combobox"){_myPage.prototype.dataToCombobox(c,d)}else{if(d.tagclass=="easyui-datagrid"){_myPage.prototype.dataToDatagrid(c,d)}}}}};_myPage.prototype.initDataOne=function(b){var a=base_path+"par/common/getInitData.do";$.post(a,b,function(c){_myPage.prototype.setData(c.rows,b)},"json")};_myPage.prototype.initDataOneSuccess=function(a,b){};_myPage.prototype.onLoadAllLibDataNoLimit=function(b){var a=base_path+"par/common/getInitData.do";$.post(a,b,function(c){_fmtLibCodeGridDataRows=c.rows;b.id=b.code;_myPage.prototype.dataToCombobox(c.rows,b)},"json")};_myPage.prototype.onLoadInitByFmtGridDataAllValues=function(){var b={};b.params=JSON.stringify(_myPageParamAll);var a=base_path+"par/common/getInitDatas.do";$.post(a,b,function(c){_fmtGridDataAllValues=c},"json")};_myPage.prototype.reSetToComboxItem=function(d){var e;var a;if(d){e=_fmtGridDataRows;a=myPageParams}else{e=_fmtGridDataAllValues;a=_myPageParamAll}for(var c=0;c<a.length;c++){var b=a[c];if(e.rows[0][b.key]){_myPage.prototype.setData(e.rows[0][b.key],b)}if(c==(a.length-1)){_myPage.prototype.reSetToComboxItemSuccess()}}};_myPage.prototype.reSetToComboxItemSuccess=function(){};_myPage.prototype.dataToCombobox=function(e,g){var d=[];for(var b=0;b<e.length;b++){d.push(e[b])}var a="auto";if(d.length>10){a="200px"}var c=$("#"+g.id);if(c.length>0){if(g.nolimit){var f={};f.code="";f.name=g.nolimit;d.splice(0,0,f)}c.combobox({data:d,valueField:"code",textField:"name",groupField:"group",panelHeight:a,onLoadSuccess:function(){var m=$(this).combobox("getData");if(m.length>0){if(!g.initselect){var l=!m[0].code?m[0].text:m[0].code;if(!l){l=""}$(this).combobox("select",l)}else{$(this).combobox("select",g.initselect)}if(g.deafultVal){$(this).combobox("select",g.deafultVal)}_myPage.prototype.initDataOneSuccess(e,g)}if(g.linkage){if(m.length>0){var l=!m[0].code?m[0].text:m[0].code;var j=g.linkage;for(var h=0;h<j.length;h++){var i=j[h];i.value=l;_myPage.prototype.initDataOne(i)}}}}})}};_myPage.prototype.dataToDatagrid=function(b,c){var a=$("#"+c.id);if(a.length>0){a.datagrid({data:b,fitColumns:true,fit:true,columns:[[{field:"ck",checkbox:true,width:20},{field:"code",align:"center",width:80,title:"???"},{field:"name",align:"center",width:100,title:"???"}]]})}};_myPage.prototype.getOperatorParam=function(){var a=base_path+"par/operator/page.do";var b={};b.account=mystorage.get("account");$.post(a,b,function(c){_myOperatorData=c.rows[0];_myPage.prototype.initComboxByOperatorParm(_myOperatorData)},"json")};_myPage.prototype.initComboxByOperatorParm=function(a){};_myPage.prototype.initUnionShowByLocation=function(c){var b=$("#"+c.code);var a=c.unionlist;if(b.length>0){b.combobox({onChange:function(h,e){if(_myLocationData&&h){for(var d=0;d<_myLocationData.length;d++){if(_myLocationData[d].code==h){for(var f=0;f<a.length;f++){var g=_myLocationData[d][a[f].code];if(g){if(a[f].orgcode=="libcode"&&g.indexOf("|")>0){g=g.split("|")[0]}setValue(a[f].orgcode,g)}}}}}}})}};_myPage.prototype.initUnionLocationByLibcode=function(){var a=$("#libcode");if(a.length>0){a.combobox({onChange:function(c,b){if(_myLocationData&&c){var f="";for(var d=0;d<_myLocationData.length;d++){if(_myLocationData[d].libcode.split("|")[0]==c){var h=_myLocationData[d].code;if(h){f+=h+","}}}var j=_initdata.rows[0].location;var g=[];for(var e=0;e<j.length;e++){var l=j[e].code+",";if(f.indexOf(l)>-1){g.push(j[e])}}$("#location").combobox("loadData",g)}}})}};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de