var alignTypeComBoxData=[{code:"left",name:"向左对齐"},{code:"center",name:"居中"},{code:"right",name:"向右对齐"}];var showColumnNameComBoxData=[{code:"0",name:"显示"},{code:"1",name:"不显示"}];var jsonFormatDesign={code:"E_PRINTTICKET",title:"打印押金小票格式设计",table:"",gridtitle:"设置要打印的内容",othertitle:"基本参数设置",perviewtitle:"小票数据预览列表",width:"800",height:"750",top:80,left:180};var pirntTicketFieldArr=[{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:"自定义内容"},{code:"showdeposit",name:"押金",group:"财经字段"},{code:"showdebt",name:"罚款",group:"财经字段"}];var ticketFieldComBoxData=[];var printWidth=0;var printHeight=0;var jsonGridColumns=[];var LODOP;$.extend($.fn.propertygrid.defaults.columns[0][1],{formatter:function(c,b,d){if(b.name=="对齐方式"){for(var a=0;a';var d=0;for(var b=0;b";c+=getRetrunTd(l[b],a,m)}else{c+=getRetrunTd(l[b],a,m);if(d%k==1){c+="";if(k>1){printHeight+=parseInt(l[b].rowheight)}}}}c+="";$("#perviewSetParamData").html(c);if(!a){setTicketToValue()}else{printDataBox()}}function setTicketToValue(){var a=$(".ticket-group");a.each(function(b,c){if(c.id){var d=c.id.replace("ticket-","");if("curdate"==d){$("#"+c.id).html(fmtStringToDate(getCurDateYMD()))}else{if(d=="createdate"||d=="enddate"){$("#"+c.id).html(fmtStringToDate(getValue(d)))}else{$("#"+c.id).html(getValue(d))}}}})}function getRetrunTd(f,g,l){var a="";var c="";var b=2;for(var h=0;h"+onShowFinTypeName(l[d].type)+""}j+="
合计
";c+=''+j+""}else{c+=''+pirntTicketFieldArr[h].name+""}}else{c+=''+pirntTicketFieldArr[h].name+""}}var j=f.defvalue;if(g){if(g[f.code]){j=g[f.code]}if(j){if(f.code=="createdate"||f.code=="enddate"){j=fmtStringToDate(g[f.code])}}if(f.code=="curdate"){j=fmtStringToDate(getCurDateYMD())}if(f.code=="showdeposit"){j=g.deposit}if(f.code=="showdebt"){if(l){j="";var e=0;for(var d=0;d"+parseFloat(l[d].money).toFixed(2)+""}j+="
"+e.toFixed(2)+"
"}}}c+=' ";break}}return c}function printTicketHandler(d,f,e){if(d=="deposit"){var g=getValue("page_depositticket");if(g=="1"){var c=getValue("page_acceptDepositFormatDesignIndex");if(c.length==0){return openMessageDlg("您还没与选择打印押金小票格式!")}setPrintTicketDataBox(c,f,d)}}else{if(d=="debt"){var a=getValue("page_fineticket");if(a=="1"){var b=getValue("page_acceptDebtFormatDesignIndex");if(b.length==0){return openMessageDlg("您还没与选择打印罚款小票格式!")}setPrintTicketDataBox(b,f,d,e)}}}}function setPrintTicketDataBox(a,b,e,h){var g;var j;if(e=="deposit"){for(var c=0;c