ispslist.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <div class="main-content-inner">
  2. <div class="breadcrumbs" id="breadcrumbs">
  3. <ul class="breadcrumb">
  4. <li>
  5. <i class="ace-icon fa fa-home home-icon"></i>
  6. <a>首页</a>
  7. </li>
  8. <li class="active">导出报告</li>
  9. </ul>
  10. </div>
  11. <div class="page-content">
  12. <div class="row">
  13. <div class="col-xs-12">
  14. <!-- PAGE CONTENT BEGINS -->
  15. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  16. <!-- <div class="row">
  17. <form method="get" action="<?php echo $this->createUrl('print/index');?>">
  18. <div class="col-xs-10">
  19. <div class="dataTables_length">
  20. <select class="form-control" name="status">
  21. <option value="">选择状态</option>
  22. <option value="1" <?php if($status==1){echo 'selected';}?>>已完成</option>
  23. <option value="0" <?php if($status==='0'){echo 'selected';}?>>未打印</option>
  24. <option value="2" <?php if($status==2){echo 'selected';}?>>正在编辑</option>
  25. <option value="3" <?php if($status==3){echo 'selected';}?>>正在打印</option>
  26. </select>
  27. <label><input type="text" class="form-control input-sm" placeholder="请输入打印项目名称!" name="printName" value="<?php if(!empty($getName)){echo $getName;}?>"></label>
  28. <button class="btn btn-minier btn-primary">搜索</button>
  29. </div>
  30. </div>
  31. </form>
  32. </div> -->
  33. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
  34. <thead>
  35. <tr>
  36. <th>名称</th>
  37. <th>班级</th>
  38. <th>申请日期</th>
  39. <th>下载日期</th>
  40. <th>操作</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. <?php if(!empty($printList)):foreach($printList as $cl):?>
  45. <tr>
  46. <td><?php echo $cl['print_name'];?></td>
  47. <td><?php echo $cl['class_name'];?></td>
  48. <td><?php if(!empty($cl['add_time'])){ echo date('Y-m-d H:i:s',$cl['add_time']);}?></td>
  49. <td><?php if(!empty($cl['print_time'])){ echo date('Y-m-d H:i:s',$cl['print_time']);}?></td>
  50. <td>
  51. <a href="<?php echo $this->createUrl('print/studentsispslist?classId='. $cl['class_id'] .'&examId='. $cl['exam_id']); ?>"><?php if ($cl['is_checked'] == 0): ?><span style="cursor: pointer;" class="label label-sm label-pink arrowed-right">检查</span><?php else: ?><span style="cursor: pointer;" class="label label-sm label-success">已检查</span><?php endif; ?></a>
  52. <?php if($cl["is_print"] == 1){?><span class="label label-sm label-success">已打印</span><?php }else{?><span style="cursor:pointer" title="点击打印" class="label label-sm label-pink arrowed-right" onclick="print('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>','<?php echo $cl['type'];?>');">打印</span><?php }?>
  53. </td>
  54. </tr>
  55. <?php endforeach;else:?>
  56. <tr><td colspan="5">暂无数据!</td></tr>
  57. <?php endif;?>
  58. </tbody>
  59. </table>
  60. <?php if(!empty($page_total)):?>
  61. <div class="row">
  62. <div class="col-xs-6">
  63. &nbsp;
  64. </div>
  65. <div class="col-xs-6">
  66. <div class="dataTables_paginate paging_simple_numbers">
  67. <?php
  68. $this->widget('CLinkPager', array(
  69. 'header' => '',
  70. 'firstPageLabel'=> '首页',
  71. 'lastPageLabel' => '末页',
  72. 'prevPageLabel' => '上一页',
  73. 'nextPageLabel' => '下一页',
  74. 'pages' => $pages,
  75. 'maxButtonCount'=> 5,
  76. ));
  77. echo '共:'.$page_total.'条';
  78. ?>
  79. </div>
  80. </div>
  81. </div>
  82. <?php endif;?>
  83. </div>
  84. <!-- PAGE CONTENT ENDS -->
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <script type="text/javascript">
  90. function print(cid,eid,tid){
  91. //alert(cid+'-'+eid+'-'+tid);return;
  92. if (!cid || !eid) return false;
  93. if(confirm('您确定要打印嘛!')) {
  94. /*$.post("<?php echo $this->createUrl('print/ajaxupdate');?>",{cid:cid,eid:eid,tid:tid},function(obj){
  95. if(obj.flag){
  96. alert('提交打印成功!');
  97. location.reload();
  98. } else {
  99. //alert('打印失败!');
  100. alert(obj.msg);
  101. }
  102. },'json');*/
  103. $.ajax({
  104. url:"<?php echo $this->createUrl('print/ajaxupdate');?>",
  105. type:"post",
  106. data:{cid:cid,eid:eid,tid:tid},
  107. dataType: "json",
  108. beforeSend:function(){
  109. // 发送请求显示打印中
  110. layer.msg('打印中', {icon: 16,time: 20000});
  111. },
  112. success:function(obj){
  113. var index = layer.msg();
  114. layer.close(index);
  115. if (obj.success == 1) {
  116. alert('提交打印成功!');
  117. location.reload();
  118. } else {
  119. alert(obj.message);
  120. }
  121. /*if(obj.flag){
  122. alert('提交打印成功!');
  123. location.reload();
  124. } else {
  125. alert(obj.msg);
  126. }*/
  127. },
  128. complete:function(){
  129. var index = layer.msg();
  130. layer.close(index);
  131. },
  132. error:function(){
  133. var index = layer.msg();
  134. layer.close(index);
  135. }
  136. });
  137. }
  138. }
  139. </script>