tongji.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>统计</title>
  5. {include file="common/meta" /}
  6. </head>
  7. <style>
  8. /* 默认情况下,屏幕上显示 */
  9. .hide-on-print {
  10. display: block;
  11. text-align: right;
  12. margin-bottom: 20px;
  13. padding-top: 20px;
  14. }
  15. .table-bordered {
  16. border: 1px solid #ddd;
  17. }
  18. .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
  19. border: 1px solid #ddd;
  20. text-align: center;
  21. }
  22. /* 打印时隐藏 */
  23. @media print {
  24. .hide-on-print {
  25. display: none;
  26. }
  27. .form-horizontal {
  28. display: none;
  29. }
  30. }
  31. </style>
  32. <body style="width: 760px;margin: 0 auto">
  33. <div class="hide-on-print">
  34. <button type="button" onclick="printPage()" class="btn btn-primary dropdown-toggle">打印</button>
  35. <button type="button" onclick="printPage()" class="btn btn-primary dropdown-toggle">导出PDF</button>
  36. </div>
  37. <form method="POST" class="form-horizontal" action="">
  38. <div class="form-group" style="margin: 0px;padding: 0px;margin-bottom: 15px;">
  39. <div class="col-xs-10 col-sm-4" style="margin: 0px;padding: 0px;" >
  40. <input type="text" class="form-control" name="choicedatetime" value="{$defaultdatetime}" placeholder="选择时间" id="choicedatetime" data-index="4" autocomplete="off">
  41. </div>
  42. <div class="col-xs-10 col-sm-2" >
  43. <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
  44. </div>
  45. </div>
  46. </form>
  47. <table id="left_table" class="table table-striped table-bordered table-hover table-nowrap">
  48. <tr>
  49. <td colspan="10">日期:{$defaultdatetime}</td>
  50. </tr>
  51. <tr>
  52. <td rowspan="2" style="vertical-align: middle;">序号</td>
  53. <td rowspan="2" style="vertical-align: middle;">姓名</td>
  54. <td rowspan="2" style="vertical-align: middle;">昵称</td>
  55. <td colspan="4" >考试统计</td>
  56. <td colspan="3" >培训统计</td>
  57. </tr>
  58. <tr>
  59. <td>应参加考试</td>
  60. <td>不及格次数</td>
  61. <td>考试次数</td>
  62. <td>缺考次数</td>
  63. <td>应参加培训次数</td>
  64. <!--<td>签到次数</td>-->
  65. <td>未到次数</td>
  66. <td>迟到次数</td>
  67. </tr>
  68. {volist name='datalist' id='vo'}
  69. <tr>
  70. <td>{$vo.id}</td>
  71. <td>{$vo.realname}</td>
  72. <td>{$vo.nickname}</td>
  73. <td>{$vo.paper_count}</td>
  74. <td>{$vo.no_pass}</td>
  75. <td>{$vo.grade_count}</td>
  76. <td>{$vo.no_grade}</td>
  77. <td>{$vo.train_count}</td>
  78. <!--<td>{$vo.sign_count}</td>-->
  79. <td>{$vo.no_sign}</td>
  80. <td>{$vo.late}</td>
  81. </tr>
  82. {/volist}
  83. </table>
  84. <script src="/assets/laydate/laydate.js"></script>
  85. <script>
  86. laydate.render({
  87. elem: '#choicedatetime'
  88. //设置开始日期、日期日期的 input 选择器
  89. //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
  90. ,range: ['#test-startDate-1', '#test-endDate-1']
  91. });
  92. //打印ctrl+P
  93. function printPage() {
  94. window.print();
  95. }
  96. </script>
  97. </body>
  98. </html>