org-plan-view.jsp 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>单位年度计划供水表列表</title>
  6. <!--框架必需start-->
  7. <script type="text/javascript" src="${ctx}/qui/libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="${ctx}/qui/libs/js/framework.js"></script>
  9. <link href="${ctx}/qui/libs/css/import_basic.css" rel="stylesheet"
  10. type="text/css" />
  11. <link rel="stylesheet" type="text/css" id="skin" prePath="${ctx}/qui/" />
  12. <link rel="stylesheet" type="text/css" id="customSkin" />
  13. <!--框架必需end-->
  14. <style media=print type="text/css">
  15. .noprint {
  16. visibility: hidden
  17. }
  18. </style>
  19. </head>
  20. <script type="text/javascript" language="JavaScript">
  21. function doPrint() {
  22. /// 隐藏不需要打印的内容
  23. try
  24. {
  25. PageSetup_Null();
  26. }
  27. catch(e)
  28. {
  29. var errorMsg = e.message+"\r"+"请设置:IE选项->安全->Internet->"+"ActiveX控件和插件"+"\r"+"对未标记为可安全执行脚本的ActiveX的控件初始化并执行脚本->允许/提示";
  30. alert(errorMsg);
  31. return;
  32. }
  33. window.print();
  34. }
  35. var HKEY_Root,HKEY_Path,HKEY_Key;
  36. HKEY_Root="HKEY_CURRENT_USER";
  37. HKEY_Path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
  38. //设置网页打印的页眉页脚为空
  39. function PageSetup_Null()
  40. {
  41. var Wsh=new ActiveXObject("WScript.Shell");
  42. HKEY_Key="header";
  43. Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
  44. HKEY_Key="footer";
  45. Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
  46. HKEY_Key="margin_left"
  47. Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0"); //键值设定--左边边界
  48. HKEY_Key="margin_top"
  49. Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0"); //键值设定--上边边界
  50. HKEY_Key="margin_right"
  51. Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0"); //键值设定--右边边界
  52. HKEY_Key="margin_bottom"
  53. Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0"); //键值设定--下边边界
  54. }
  55. </script>
  56. <body>
  57. <div class="noprint"
  58. style="padding-top: 10px; padding-right: 200px; text-align: right;">
  59. <input type="button" value="打印" onclick="doPrint();">
  60. </div>
  61. <table class="tableStyle" mode="list"
  62. style="width: 1200px; font-size: 16px;" align="center">
  63. <tr>
  64. <td>单位名称</td>
  65. <td>单位地址</td>
  66. <td>邮编</td>
  67. <td>水表户号</td>
  68. <td>年度</td>
  69. <td style="width: 20px;">上一年实际用水量(m³)</td>
  70. <td>一季度</td>
  71. <td>二季度</td>
  72. <td>三季度</td>
  73. <td>四季度</td>
  74. <td>全年</td>
  75. </tr>
  76. <#list plan as p>
  77. <tr>
  78. <td>${p.orgName!''}</td>
  79. <td>${p.orgAddress!'' }</td>
  80. <td>${p.orgEmail!'' }</td>
  81. <td>${p.orgMeterNumber!'' }</td>
  82. <td>${p.year!'' }</td>
  83. <td>${p.priYearUseWater!'0' }</td>
  84. <td>${p.firstQuarterReply!'0' }</td>
  85. <td>${p.secondQuarterReply!'0' }</td>
  86. <td>${p.thirdQuarterReply!'0' }</td>
  87. <td>${p.fourthQuarterReply!'0' }</td>
  88. <td>${p.replyOfWater!'0' }</td>
  89. </tr>
  90. </#list>
  91. </table>
  92. </body>
  93. </html>