打印
1.
<a href="javascript:void(0);" type="button" class="btn" title="批量打印" οnclick="dy(1);" οnfοcus="this.blur();"><div id="print"></div></a>
<li><a href="javascript:void(0);" οnclick="dy();">打印</a></li>
2.
function dy(a){ var bxdids; if(a == 1){ bxdids = getBxdids(); if(!bxdids){ return; } }else { bxdids = $("#crrunt_bxd").val(); } var schoolid = $("#schoolid").val(); $("#myModalDy").modal("show"); var dyfs = $("#dyfs").val(); $("#iframepage").attr("src","/report/ReportServer?reportlet=bxgl/dwxdy1.cpt&bxdId="+bxdids+"&ssxx=" + schoolid); }
function getBxdids(){ var obj = $("#table input[name='checkbox']:checkbox:checked"); if (obj.length == 0) { alert('请选择要操作的数据!'); return false; } // 将记录ID保存到数值 var ids = new Array(); for (i = 0; i < obj.length; i++) { ids[i] = obj[i].value; } return ids; }
3.
<div class="modal inmodal" id="myModalDy" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static"> <div class="modal-dialog modal-lg"> <div class="modal-content animated bounceInRight"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3>打印维修单</h3> </div> <div class="modal-body" style="height: 510px;"> <iframe id="iframepage" marginheight="0" marginwidth="0" frameborder="0" scrolling="auto" width="100%" height="100%"></iframe> </div> <div style="text-align: center;padding-bottom: 20px;"> <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button> </div> </div> </div> </div>
4.FineReport中写一个报表,报表的名字对应
导出(sjlb.jsp)
1.<form method="post" class="form-horizontal" action="${ctx }/restaurantmanage/sjlb/list" id="formSearch"> <input type="hidden" name="exportServiceName" value="sjlbService"> <input type="hidden" name="dtoClassName" value="com.dtyun.xydc.dto.restaurantmanage.SjlbDto">
2.<a href="javascript:void(0);" type="button" class="btn" οnclick="doResultExport('${ctx}','sjlbExportInfo','formSearch');" title="导出" οnfοcus="this.blur();"><div id="output"></div></a> 3.<div id="excelExportTest"> </div> <iframe style="display: none" id="exportIframe" src="" frameborder=0></iframe>
4.SjlbService重写一个方法
public List<? extends IdEntity> exportData(BaseDto dto) { Sort sort = new Sort(Direction.ASC, "px"); List<SjlbEntity> ets = sjlbDao.findAll(spc((SjlbDto) dto), sort); return ets; }
导入
1.<div class="modal inmodal" id="input_Modal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-md" style="margin-top:120px;"> <div class="modal-content animated bounceInRight"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">导入</h4> </div> <div class="modal-body"> <div class="col-lg-12"> <form method="post" class="form-horizontal"> <div class="form-group"> <input type="button" class="col-sm-offset-1 btn btn_save" id="btn1" οnclick="fileToUpload.click();" value="选择文件"> <input type="text" id="input1" class="no-borders"> <input type="file" name="file" id="fileToUpload" οnchange="input1.value=this.value" style="display:none"> <button type="button" οnclick="downloadTpl('${ctx}','dwImportInfo');" class="btn btn_save">模板下载</button> </div> <div class="form-group"> <button type="button" οnclick="doImport('${ctx}','dwImportInfo');" class="col-sm-offset-1 btn btn_save margin_top after_file">导入</button> </div> </form> </div> </div> </div> </div> </div>
2. function refresh(){ initList(component); } 3. <!-- 单位信息,导入 --> <bean id="dwImportInfo" class="com.dtyun.base.web.io.excelimport.ExcelImportInfo"> <property name="templateFileName" value="单位导入模板.xls"></property> <property name="className" value="com.dtyun.base.entity.baseinfo.DwEntity"></property> <property name="sheetName" value="单位信息"></property> <property name="columns"> <list> <bean class="com.dtyun.base.web.io.excelimport.SimpleColumnMapping"> <property name="name" value="dwdm" /> <property name="header" value="单位代码" /> <property name="width" value="15" /> </bean>
。。。。。。