ruanyun_change.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <div class="main-content-inner">
  2. <ul class="clearfix main-content-inner-ul">
  3. <li class="pull-left">
  4. <button onclick='location.href="<?php echo $this->createUrl("print/index",array('type'=>'wp'));?>"' class="button button_normal button_group button_arrow " data-button="red">打印试卷</button>
  5. <img src="/images/line.jpg" style="height:45px;" />
  6. </li>
  7. <li class="pull-left">
  8. <button onclick='location.href="<?php echo $this->createUrl("export/index");?>"' class="button button_normal button_group button_arrow " data-button="red">导出报告</button>
  9. <img src="/images/line.jpg" style="height:45px;" />
  10. </li>
  11. <li class="pull-left">
  12. <button onclick='location.href="<?php echo $this->createUrl("print/do_ruanyun_pdf");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">下载PDF</button>
  13. <img src="/images/line.jpg" style="height:45px;" />
  14. </li>
  15. </ul>
  16. <div class="page-content">
  17. <div class="row" style="margin:0px">
  18. <div class="col-xs-12">
  19. <!-- PAGE CONTENT BEGINS -->
  20. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  21. <div class="row">
  22. <div class="col-xs-2">
  23. <div class="dataTables_filter" id="dynamic-table_filter" style="padding-top:15px">
  24. </div>
  25. </div>
  26. </div>
  27. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" style="font-size:12px">
  28. <thead>
  29. <th>学生名称</th>
  30. <th>是否已生成</th>
  31. <th>是否已下载</th>
  32. <th>下载功能</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. <?php if(!empty($result)):foreach($result as $rt):?>
  37. <tr>
  38. <td><?php if(isset($student_names[$rt->student_id])){echo $student_names[$rt->student_id];}?></td>
  39. <td>
  40. <?php if($rt->is_isp_pdf == 1): ?>
  41. <span class="" style="font-size:12px">已生成</span>
  42. <?php else: ?>
  43. <span class="" >未生成</span>
  44. <?php endif; ?>
  45. </td>
  46. <td>
  47. <?php if($rt->is_two_isp_download == 1): ?>
  48. <span class="" style="font-size:12px">已下载</span>
  49. <?php else: ?>
  50. <span class="" >未下载</span>
  51. <?php endif; ?>
  52. </td>
  53. <td>
  54. <span class="label label-sm label-success download_pdf" style="font-size:12px;cursor: pointer;" student_id="<?php echo $rt->student_id?>" exam_id="<?php echo $_GET['eid']?>" do_url="<?php echo $rt->isp_pdf_path?>" >下载提方案</span>
  55. </td>
  56. </tr>
  57. <?php endforeach;else:?>
  58. <tr><td colspan="6">暂无数据!</td></tr>
  59. <?php endif;?>
  60. </tbody>
  61. </table>
  62. </div>
  63. <!-- PAGE CONTENT ENDS -->
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <script type="text/javascript">
  69. html = ""+
  70. '<div style="padding:20px 30px 0px 30px">'+
  71. '<div style="padding:8px 0;">请复制下方链接下载地址。</div>'+
  72. '<div id="downloadUrl" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:455px;"></div>'+
  73. '<div class="row" style="margin:30px auto 0px auto;text-align:center"><button id="confirm" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;background:gray;border-color:gray;">关闭</button>'+
  74. '</div>'+
  75. '</div>'+
  76. "";
  77. function ccc(){
  78. layer.msg('敬请期待!', {
  79. time: 0,
  80. btn: ['确定', '取消'],
  81. yes: function(index){
  82. layer.close(index);
  83. return false;
  84. }
  85. });
  86. }
  87. $(function(){
  88. // 全选\反选
  89. $(".download_pdf").click(function(){
  90. // 判断是否有选中
  91. var student_id = $(this).attr('student_id');
  92. var exam_id = $(this).attr('exam_id');
  93. var do_url = $(this).attr('do_url');
  94. if (!do_url) {
  95. layer.msg('尚未下载地址');return false;
  96. }
  97. layer.msg('您确定下提分方案?', {
  98. time: 0,
  99. btn: ['确定', '取消'],
  100. yes: function(index){
  101. layer.close(index);
  102. // 更试卷打印时间
  103. $.post("<?php echo $this->createUrl('print/updatepaperdowntime');?>", {student_id: student_id, exam_id: exam_id} );
  104. layer.open({
  105. type: 1,
  106. area: ['550px', '220px'],
  107. title: "下载提分方案",
  108. content: html,
  109. success: function(index, layerObj){
  110. clearInterval(window.interval);
  111. jQuery("#downloadUrl").html('下载地址:<span style=""><input id="url" type="text" size="40" readonly value="'+do_url+'" /></span><button id="copy" class="label-primary-s bth-s" style="padding:4px 12px;margin:5px 0 10px 15px;">全选</button>')
  112. jQuery("#confirm, #cancel").on("click", function(){
  113. layer.close(layerObj);
  114. });
  115. jQuery("#copy").on("click", function(){
  116. jQuery("#url").select();
  117. });
  118. }
  119. });
  120. }
  121. });
  122. });
  123. })
  124. </script>