season-print_bak.jsp 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>南宁市城市计划供水节约用水办公室--季度用水计划调整受理通知书</title>
  6. <!--打印插件-->
  7. <script type="text/javascript" src="${ctx}/js/LodopFuncs.js"></script>
  8. <object id="LODOP_OB"
  9. classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0
  10. style="position: absolute; left: 0px; top: -10px;"></object>
  11. <object id="LODOP_EM" type="application/x-print-lodop" width=0 height=0
  12. style="position: absolute; left: 0px; top: -10px;"></object>
  13. <!--打印end-->
  14. <script type="text/javascript" src="${ctx}/qui/libs/js/jquery.js"></script>
  15. <script type="text/javascript">
  16. var LODOP; //声明为全局变量
  17. LODOP=getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM'));
  18. var myDate = new Date();
  19. var year=myDate.getFullYear();
  20. var month=myDate.getMonth();
  21. var day=myDate.getDate();
  22. month=parseInt(month);
  23. month=month+1;
  24. var length=${listLength!''}
  25. length=parseInt(length);
  26. function createPrintPage(orgName,contacts,contactNum,printDate,user,meterNumber) {
  27. LODOP.NewPage();
  28. LODOP.ADD_PRINT_SETUP_BKIMG("<img src='${ctx}/image/notices/season_water.jpg'>");
  29. LODOP.SET_SHOW_MODE("BKIMG_IN_PREVIEW",true);
  30. LODOP.ADD_PRINT_TEXTA("text01",285,103,593,25,orgName);
  31. LODOP.SET_PRINT_STYLEA(0,"FontName","仿宋");
  32. LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
  33. LODOP.ADD_PRINT_TEXTA("text02",502,249,375,25,contacts);
  34. LODOP.SET_PRINT_STYLEA(0,"FontName","仿宋");
  35. LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
  36. LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
  37. LODOP.ADD_PRINT_TEXTA("text03",532,249,375,25,contactNum);
  38. LODOP.SET_PRINT_STYLEA(0,"FontName","仿宋");
  39. LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
  40. LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
  41. LODOP.ADD_PRINT_BARCODE(13,34,360,147,"Code39",printDate);
  42. LODOP.SET_PRINT_STYLEA(0,"Color","#0000FF");
  43. LODOP.ADD_PRINT_TEXTA("text06",625,249,375,25,user);
  44. LODOP.SET_PRINT_STYLEA(0,"FontName","仿宋");
  45. LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
  46. LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
  47. LODOP.ADD_PRINT_TEXTA("text07",697,386,160,125,meterNumber);
  48. LODOP.SET_PRINT_STYLEA(0,"FontName","仿宋");
  49. LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
  50. LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
  51. }
  52. function printReplyNotice(){
  53. LODOP.PRINT_INITA(-17,-13,793,1061,"reply_notice");
  54. LODOP.SET_PRINT_PAGESIZE(1,"212mm","281mm","");//设置纸张高度
  55. //alert(length);
  56. for(var i=1;i<=length;i++){
  57. var orgName=$("#div_"+i).children("input[name='orgName']").val();
  58. var contacts=$("#div_"+i).children("input[name='contacts']").val();
  59. var contactNum=$("#div_"+i).children("input[name='contactNum']").val();
  60. var printDate=$("#div_"+i).children("input[name='id1']").val();
  61. var user=$("#div_"+i).children("input[name='user']").val();
  62. var meterNumber=$("#div_"+i).children("input[name='meterNumber']").val();
  63. //alert(meterNumber);
  64. createPrintPage(orgName,contacts,contactNum,printDate,user,meterNumber);
  65. }
  66. LODOP.PREVIEW();
  67. window.close();
  68. }
  69. window.onload=printReplyNotice;
  70. </script>
  71. </head>
  72. <body>
  73. <#assign size=1> <#list unit as u>
  74. <div id="div_${u_index+1 }">
  75. <input name="orgName" type="hidden" value="${u.orgName}" /> <input
  76. name="contacts" type="hidden" value="${u.contacts}" /> <input
  77. name="contactNum" type="hidden" value="${u.contactNum}" /> <input
  78. name="id1" type="hidden" value="${u.id}" /> <input name="user"
  79. type="hidden" value="${u.printUser}" /> <input name="meterNumber"
  80. type="hidden" value="${u.meterNum}" />
  81. </div>
  82. <#assign size=size+1> </#list>
  83. </body>
  84. </html>