Edit D:\rfid\libsystem\page\global\js\ticketformatdesign.js
var eidtorGridObject=undefined;var eidtorGridIndex=undefined;var vDepositRowsData;var vDebtRowsData;$(function(){_myPage.prototype.initDataOne({code:"formatdesign_libcode",key:"libcode"})});function bindPageFormatDesignDataGridList(){var b=base_path+"lib/design/page.do";var c={};var a=jsonFormatDesign.code;c.code=a;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",onChange:function(d,c){if(d!=undefined&&d!=c&&d.length>0){bindAcceptFormatDesignDataByKeyCode(d)}}});if(a=="E_PRINTTICKET"){if(getValue("page_acceptDepositFormatDesignIndex")){setValue("formatdesign_index",getValue("page_acceptDepositFormatDesignIndex"))}else{setValue("formatdesign_index",b.rows[0].keycode)}}if(a=="E_PRINTTICKETDEBT"){if(getValue("page_acceptDebtFormatDesignIndex")){setValue("formatdesign_index",getValue("page_acceptDebtFormatDesignIndex"))}else{setValue("formatdesign_index",b.rows[0].keycode)}}}function bindPrintFDByCode(d,a,c){var b=base_path+"lib/design/page.do";var e={};e.code=a;e.rows=100;e.page=1;$.post(b,e,function(f){if(f.status=="0"){if("E_PRINTTICKET"==a){vDepositRowsData=f.rows}if("E_PRINTTICKETDEBT"==a){vDebtRowsData=f.rows}$("#"+d).combobox({data:f.rows,valueField:"keycode",textField:"name",onChange:function(h,g){}});if(c){c()}}else{openMessageDlg(f.message)}},"json")}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(g){var h=JSON.parse(g.paramjson);setJsonData("formatdesign_",g);eidtorGridObject.datagrid("loadData",h.grid);var a=h.propertygrid;var f=jsonPropertyGridData.rows;var d=[];for(var c=0;c<f.length;c++){for(var b=0;b<a.length;b++){if(f[c].name==a[b].name){f[c].value=a[b].value;d.push(f[c])}}}var e={total:3,rows:f};$("#labelPropertyGrid").propertygrid("loadData",e);perviewLabelDataBox()}function initFormatDesignGrid(){jsonGridColumns=[{field:"code",title:"??????",width:"20%",formatter:onShowTicketFieldComBoxData,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",required:true,groupField:"group",data:ticketFieldComBoxData,onChange:function(b,a){}}}},{field:"defvalue",title:"?????",width:"20%",editor:{type:"textbox"}},{field:"fszie",title:"??????(px)",width:"12%",editor:{type:"textbox",options:{}}},{field:"rowheight",title:"?????(px)",width:"12%",editor:{type:"textbox",options:{}}},{field:"aligntype",title:"??????",width:"16%",formatter:onShowAlignTypeComBoxData,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",data:alignTypeComBoxData,onChange:function(b,a){}}}},{field:"slname",title:"?????????",width:"20%",formatter:onShowColumnNameComBoxData,editor:{type:"combobox",options:{valueField:"code",textField:"name",panelHeight:"auto",data:showColumnNameComBoxData,onChange:function(b,a){}}}}];eidtorGridObject=$("#pageFormatDesignGrid");eidtorGridObject.datagrid({iconCls:"e-icon fa fa-cog",title:jsonFormatDesign.gridtitle,fit:true,fitColumns:true,singleSelect:true,border:true,nowrap:false,striped:true,toolbar:toolbar,onClickRow:onClickEditorRow,columns:[jsonGridColumns]})}function onOpenPageFormatDesignDlg(){$("#formatdesign_name").textbox("textbox").focus()}function ticketFormatDesign(a){ticketFieldComBoxData=[{code:"rdrno",name:"???????",group:"???????"},{code:"name",name:"???????",group:"???????"},{code:"idcard",name:"??????",group:"???????"},{code:"createdate",name:"??????",group:"???????"},{code:"enddate",name:"??????",group:"???????"},{code:"ticketname",name:"??????",group:"????????"},{code:"libname",name:"?????",group:"????????"},{code:"libtelno",name:"??????",group:"????????"},{code:"curdate",name:"???????",group:"????????"},{code:"splitline",name:"?????",group:"????????"},{code:"note1",name:"???1",group:"????????"},{code:"note2",name:"???2",group:"????????"},{code:"note3",name:"???3",group:"????????"}];if(a==0){jsonFormatDesign.code="E_PRINTTICKET";jsonFormatDesign.othertitle="???????????????";ticketFieldComBoxData.push({code:"showdeposit",name:"???",group:"??????"})}else{if(a==1){jsonFormatDesign.code="E_PRINTTICKETDEBT";jsonFormatDesign.othertitle="???????????????";ticketFieldComBoxData.push({code:"showdebt",name:"???",group:"??????"})}}$("#pageFormatDesignDlg").dialog({width:jsonFormatDesign.width,height:jsonFormatDesign.height,top:jsonFormatDesign.top,left:jsonFormatDesign.left});$("#otherFormatDesignPanel").panel("setTitle",jsonFormatDesign.othertitle);var d=$(".basicFormatDesignBox").height();var c=$(".otherFormatDesignBox").height();var b=100+d+c;var e=jsonFormatDesign.height-b;$(".editFormatDesignBox").css("height",e+"px");$("#pageFormatDesignGrid").datagrid("resize");$("#pageFormatDesignDlg").dialog("open");clearFormatDesignElement();initFormatDesignGrid();bindPageFormatDesignDataGridList()}function clearFormatDesignElement(){$("#perviewSetParamData").html("");cleanPropertyGrid();cleanJsonData("formatdesign_record");clearGridData("pageFormatDesignGrid")}function cleanPropertyGrid(){var d=jsonPropertyGridData.rows;var b=[];for(var a=0;a<d.length;a++){d[a].value="";b.push(d[a])}var c={total:3,rows:d};$("#labelPropertyGrid").propertygrid("loadData",c)}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("??"+jsonFormatDesign.gridtitle)}var e=$("#labelPropertyGrid").propertygrid("getRows");if(!e[0].value||!e[1].value||!e[2].value){return openMessageDlg("??????????????")}var d=[];for(var f=0;f<e.length;f++){var g={name:e[f].name,value:e[f].value,code:e[f].code};d.push(g)}var h={grid:a,table:jsonFormatDesign.table,propertygrid:d};b.paramjson=JSON.stringify(h);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(i){if(i.status=="0"){bindPageFormatDesignDataGridList();if(jsonFormatDesign.code=="E_PRINTTICKET"){bindPrintFDByCode("page_acceptDepositFormatDesignIndex","E_PRINTTICKET")}if(jsonFormatDesign.code=="E_PRINTTICKETDEBT"){bindPrintFDByCode("page_acceptDebtFormatDesignIndex","E_PRINTTICKETDEBT")}openMessageDlg(i.message,5000)}else{openMessageDlg(i.message)}},"json")}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 setFormatDesignLayout(){}function onSearchData(){var a=getJsonDataByTypeHandler();var b=getValue("acceptFormatDesignIndex");if(b.length==0){return openMessageDlg("?????????????")}a.keycode=b;a.count=99999;openPostWindow("exportlabelresult.jsp",a)};
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de