Edit D:\rfid\libsystem\page\export\js\exportfd.js
var totalFld=",copies,price,totalprice,orderprice,ordertotalprice,volumes,yearprice,issuenum,notifycount,renewnum,";var sortTypeComBoxData=[{code:"asc",name:"???"},{code:"desc",name:"???"}];var isShowComBoxData=[{code:"1",name:"??"},{code:"0",name:"??"}];var alignTypeComBoxData=[{code:"left",name:"??????"},{code:"center",name:"???"},{code:"right",name:"??????"}];var fontSizeComBoxData=[{code:"12",name:"?????"},{code:"14",name:"??????"},{code:"16",name:"?????"}];$.extend($.fn.propertygrid.defaults.columns[0][1],{formatter:function(c,b,d){if(b.name=="??????"){for(var a=0;a<fontSizeComBoxData.length;a++){if(fontSizeComBoxData[a].code==c){return fontSizeComBoxData[a].name}}}else{if(b.name=="??????"){for(var a=0;a<alignTypeComBoxData.length;a++){if(alignTypeComBoxData[a].code==c){return alignTypeComBoxData[a].name}}}else{if(b.name=="??????"){for(var a=0;a<fieldComBoxData.length;a++){if(fieldComBoxData[a].field==c){return fieldComBoxData[a].name}}}else{if(b.name=="??????"){for(var a=0;a<sortTypeComBoxData.length;a++){if(sortTypeComBoxData[a].code==c){return sortTypeComBoxData[a].name}}}else{if(b.name=="?????????"||b.name=="???????????"||b.name=="?????????"){for(var a=0;a<isShowComBoxData.length;a++){if(isShowComBoxData[a].code==c){return isShowComBoxData[a].name}}}else{return c}}}}}}});var jsonPropertyGridData;var jsonGridColumns;$(function(){var a=[{code:"formatdesign_libcode",key:"libcode"},{code:"formatdesign_operid",key:"operid"}];_myPage.prototype.initData(a);if(fieldComBoxData){initExportFmtParam()}});function initExportFmtParam(){var b=false;var c="45%";var a="10%";if(jsonFormatDesign.total){b=true;c="55%";a="0"}jsonPropertyGridData={total:8,rows:[{name:"??????",code:"pageFontSize",value:"12",group:"??????",editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",editable:false,data:fontSizeComBoxData}}},{name:"??????",code:"pageAlignType",value:"left",group:"??????",editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",editable:false,data:alignTypeComBoxData}}},{name:"??????",code:"sortField",value:"",group:"??????",editor:{type:"combobox",options:{valueField:"field",textField:"name",panelHeight:"200",editable:false,data:fieldComBoxData}}},{name:"??????",code:"sortType",value:"",group:"??????",editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",editable:false,data:sortTypeComBoxData}}},{name:"?????????",code:"showname",value:"0",group:"??????",editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",editable:false,data:isShowComBoxData}}},{name:"???????????",code:"showoperator",value:"0",group:"??????",editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",editable:false,data:isShowComBoxData}}},{name:"?????????",code:"showtime",value:"0",group:"??????",editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",editable:false,data:isShowComBoxData}}}]};jsonGridColumns=[{field:"field",title:"??????",width:c,formatter:onShowExportJosnComBoxData,editor:{type:"combobox",options:{valueField:"field",textField:"name",panelHeight:"200",required:true,editable:false,groupField:"group",groupFormatter:function(d){return'<span style="color:black">'+d+"</span>"},data:fieldComBoxData,onChange:function(g,d){if(g!=undefined&&g!=d&&eidtorGridIndex!=undefined){var h=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"code"});if(h.target){for(var e=0;e<fieldComBoxData.length;e++){if(g==fieldComBoxData[e].field){$(h.target).textbox("setValue",fieldComBoxData[e].code)}}}var f=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"name"});if(f.target){for(var e=0;e<fieldComBoxData.length;e++){if(g==fieldComBoxData[e].field){$(f.target).textbox("setValue",fieldComBoxData[e].name)}}}acceptEidtorGrid(g)}}}}},{field:"code",title:"??????",hidden:true,editor:{type:"textbox"}},{field:"name",title:"???",width:"30%",editor:{type:"textbox"}},{field:"width",title:"???(px)",width:"15%",editor:{type:"textbox"}},{field:"total",title:"???",width:a,hidden:b,formatter:onShowCheckBoxName,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",editable:false,data:isShowComBoxData,onChange:function(g,d){if(g!=undefined&&g!=d&&eidtorGridIndex!=undefined){var h=eidtorGridObject.datagrid("getSelected");var f=eidtorGridObject.datagrid("getEditor",{index:eidtorGridIndex,field:"total"});if(f.target){for(var e=0;e<fieldComBoxData.length;e++){if(h.field==fieldComBoxData[e].field){if(!fieldComBoxData[e].total&&g=="1"){$(f.target).combobox("setValue","0");break}}}}}}}}}];initFormatDesignGrid();bindPageFormatDesignDataGridList();setCurImportDataGridHeight(50)}function setCurImportDataGridHeight(b){var a=$(window).height();var c=a-b;$(".body-div-search").css("height",c+"px");$(".easyui-panel").panel("resize");$("#labelPropertyGrid").propertygrid("loadData",jsonPropertyGridData)}function bindPageFormatDesignDataGridList(a){var b=base_path+"lib/design/list.do";var c={};c["limit[0].condition"]="code";c["limit[0].value"]=jsonFormatDesign.code;c.rows=100;c.page=1;$.post(b,c,function(d){if(d.status=="0"){initFormatDesignComboboxByCode(d,a)}else{openMessageDlg(d.message)}},"json")}function initFormatDesignComboboxByCode(b,a){$("#formatdesign_index").combobox({data:b.rows,valueField:"keycode",textField:"name",panelHeight:"auto",onChange:function(d,c){if(d!=undefined&&d!=c&&d.length>0){setValue("acceptFormatDesignIndex",d)}}});$("#acceptFormatDesignIndex").combobox({data:b.rows,valueField:"keycode",textField:"name",panelHeight:"auto",onChange:function(d,c){if(d!=undefined&&d!=c&&d.length>0){bindAcceptFormatDesignDataByKeyCode(d);setValue("formatdesign_index",d)}}});if(a){setValue("formatdesign_index",a)}}function bindAcceptFormatDesignDataByKeyCode(a){var b=base_path+"lib/design/get.do";var c={};c.pk=a;$.post(b,c,function(d){if(d.status=="0"){var e=d.rows[0];setDataToPageElement(e)}else{openMessageDlg(d.message)}},"json")}function setDataToPageElement(e){var f=JSON.parse(e.paramjson);setJsonData("formatdesign_",e);eidtorGridObject.datagrid("loadData",f.grid);var d=jsonPropertyGridData.rows;for(var c=0;c<d.length;c++){if(f[d[c].code]){d[c].value=f[d[c].code]}else{if(f.propertygrid){var a=f.propertygrid;for(var b=0;b<a.length;b++){if(d[c].code==a[b].code){d[c].value=a[b].value}}}}}jsonPropertyGridData.rows=d;$("#labelPropertyGrid").propertygrid("loadData",jsonPropertyGridData)}function initFormatDesignGrid(){eidtorGridObject=$("#pageFormatDesignGrid");eidtorGridObject.datagrid({iconCls:"e-icon fa fa-cog",fit:true,fitColumns:true,singleSelect:true,border:false,nowrap:false,striped:true,toolbar:toolbar,onClickRow:onClickEditorRow,columns:[jsonGridColumns]})}function onOpenPageFormatDesignDlg(){$("#formatdesign_name").textbox("textbox").focus()}function onFormatDesign(){$("#pageFormatDesignDlg").dialog({title:jsonFormatDesign.title,width:jsonFormatDesign.width,height:jsonFormatDesign.height,top:jsonFormatDesign.top,left:jsonFormatDesign.left});$("#otherFormatDesignPanel").panel("setTitle",jsonFormatDesign.othertitle);var b=$(".basicFormatDesignBox").height();var a=100+b;var c=jsonFormatDesign.height-a;$(".otherFormatDesignBox").css("height",c+"px");$("#otherFormatDesignPanel").panel("resize");$("#pageFormatDesignDlg").dialog("open")}function clearFormatDesignElement(){cleanPropertyGrid();cleanJsonData("formatdesign_record");clearGridData("pageFormatDesignGrid")}function cleanPropertyGrid(){var b=jsonPropertyGridData.rows;for(var a=0;a<b.length;a++){b[a].value=""}jsonPropertyGridData.rows=b;$("#labelPropertyGrid").propertygrid("loadData",jsonPropertyGridData)}function addFormatDesignRecord(){setValue("formatdesign_keycode","");clearFormatDesignElement();onOpenPageFormatDesignDlg()}function copyFormatDesignRecord(){setValue("formatdesign_keycode","");cleanJsonData("formatdesign_record");onOpenPageFormatDesignDlg()}function saveFormatDesignRecord(){acceptEidtorGrid();var b=getJsonData("formatdesign_","record");if(!b){openMessageDlg("??????");return}if(!b.name){return openMessageDlg("????????????")}b.code=jsonFormatDesign.code;var a=eidtorGridObject.datagrid("getRows");if(a.length==0){return openMessageDlg("??????????????")}specialHandling(a);var f={grid:a,table:jsonFormatDesign.table};var d=$("#labelPropertyGrid").propertygrid("getRows");for(var e=0;e<d.length;e++){f[d[e].code]=d[e].value}f.title=b.name;if(jsonFormatDesign.groupby){f.groupby=jsonFormatDesign.groupby}b.paramjson=JSON.stringify(f);var c=base_path+"lib/design/insert.do";if(getValue("formatdesign_keycode").length>0){c=base_path+"lib/design/update.do"}$.post(c,b,function(g){if(g.status=="0"){bindPageFormatDesignDataGridList(g.rows[0].keycode);openMessageDlg(g.message,5000)}else{openMessageDlg(g.message)}},"json")}function specialHandling(a){if("E_READERFINELIST"==jsonFormatDesign.code){var c=false;var b=false;for(var d=0;d<a.length;d++){if("deposit"==a[d].code){b=true}if("debt"==a[d].code){c=true}}if(c){jsonFormatDesign.table=" ( select * from lib_cir_reader right join (select rdrid,sum(money) as debt from lib_cir_curfine where type in ('1','2','3','4','9','a','b','c') group by rdrid) fine on fine.rdrid=lib_cir_reader.id) lib_cir_reader"}if(b){jsonFormatDesign.table=" ( select * from lib_cir_reader right join (select rdrid,sum(money) as deposit from lib_cir_curfine where type in ('0','8') group by rdrid) fine1 on fine1.rdrid=lib_cir_reader.id) lib_cir_reader"}if(b&&c){jsonFormatDesign.table=" (select * from lib_cir_reader left join (select rdrid,sum(money) as debt from lib_cir_curfine where type in ('1','2','3','4','9','a','b','c') group by rdrid) fine on fine.rdrid=lib_cir_reader.id left join (select rdrid,sum(money) as deposit from lib_cir_curfine where type in ('0','8') group by rdrid) fine1 on fine1.rdrid=lib_cir_reader.id where debt>0 or deposit>0) lib_cir_reader "}}}function deleteFormatDesignRecord(){var a=getValue("formatdesign_keycode");if(a.length==0){return openMessageDlg("??????????????")}openConfirmDlg("???????????????????????",null,deleteFormatDesignRecordResult,null)}function deleteFormatDesignRecordResult(){var a=getValue("formatdesign_keycode");var c={};c.pk=a;var b=base_path+"lib/design/delete.do";$.post(b,c,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);bindPageFormatDesignDataGridList()}else{openMessageDlg(d.message)}},"json")}function onSearchExportData(){var a=getJsonDataByTypeHandler();var b=getValue("acceptFormatDesignIndex");if(b.length==0){return openMessageDlg("?????????????")}a.keycode=b;a.account=mystorage.get("account");if(!a["limit[0].condition"]){$.messager.confirm("??????","???????????????,?????????????",function(c){if(c){openPostWindow("exportlist.jsp",a)}})}else{openPostWindow("exportlist.jsp",a)}}function acceptEidtorGrid(c){isSaveFmtDesign=false;if(endEidtorGridEditing()){eidtorGridObject.datagrid("acceptChanges")}var d=0;if(c){var a=eidtorGridObject.datagrid("getRows");for(var b=0;b<a.length;b++){if(a[b].field==c){d++}}if(d>1){return openMessageDlg("?????????,?????????????????!")}}}function onCheckEditorRow(a,b){if(b.total){$("#pageFormatDesignGrid").datagrid("checkRow",a);return false}else{$("#pageFormatDesignGrid").datagrid("uncheckRow",a);return false}};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de