handle_classified_card.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <link type="text/css" rel="stylesheet" href="/css/needDetail.css" />
  2. <style>
  3. html {overflow-y: scroll;}
  4. </style>
  5. <div class="main-content-inner">
  6. <!-- 导航栏开始-->
  7. <ul class="clearfix main-content-inner-ul">
  8. <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
  9. <li class="pull-left">
  10. <button onclick='location.href="<?php echo $this->createUrl("semester/index");?>"' class="button button_normal button_group button_arrow" data-button="red">学期管理</button>
  11. <img src="/images/line.jpg" style="height:45px;" />
  12. </li>
  13. <?php }?>
  14. <li class="pull-left">
  15. <button onclick='location.href="<?php echo $this->createUrl("teacher/index");?>"' class="button button_normal button_group button_arrow" data-button="red">教师管理</button>
  16. <img src="/images/line.jpg" style="height:45px;" />
  17. </li>
  18. <li class="pull-left">
  19. <button onclick='location.href="<?php echo $this->createUrl("classes/index");?>"' class="button button_normal button_group button_arrow" data-button="red">班级管理</button>
  20. <img src="/images/line.jpg" style="height:45px;" />
  21. </li>
  22. <li class="pull-left">
  23. <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">学生管理</button>
  24. <img src="/images/line.jpg" style="height:45px;" />
  25. </li>
  26. <li class="pull-left">
  27. <button onclick='location.href="<?php echo $this->createUrl("classes/export");?>"' class="button button_normal button_group button_arrow " data-button="red">导出学生</button>
  28. <img src="/images/line.jpg" style="height:45px;" />
  29. </li>
  30. </ul>
  31. <!-- 导航栏结束-->
  32. <div class="layout-gap">
  33. <section class="hrn-top flex">
  34. <div class="flex-one hrn-top-title fw">匹配失败名单</div>
  35. <div class="green-font pointer" onclick="window.location.href='<?php echo $this->createUrl('importstudent/checkClassified')?>';">返回</div>
  36. </section>
  37. <section class="flex hrn-main-con">
  38. <article class="flex-one handle-detail-con">
  39. <div class="handle-detail-top flex">
  40. <span class="red-font">处理办法:输入学生的系统准考证号后重新匹配</span>
  41. </div>
  42. <div class="handle-detail-main-excel">
  43. <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
  44. <tr>
  45. <td>班级</td>
  46. <td>姓名</td>
  47. <td>系统准考证号</td>
  48. <tr>
  49. <?php
  50. if($student){
  51. foreach ($student as $key => $val){
  52. echo '<tr>';
  53. echo '<td>'.$val['class_name'].'</td>';
  54. echo '<td>'.$val['modify_name'].'</td>';
  55. echo '<td><input type="text" id="'.$val['id'].'" class="student_card" data="'.$val['student_card'].'" style="width:100%" maxlength="10" value="'.$val['student_card'].'"></td>';
  56. echo '</tr>';
  57. }
  58. }
  59. ?>
  60. </table>
  61. <?php if(!empty($page_total)):?>
  62. <div class="row">
  63. <div class="col-xs-6">
  64. &nbsp;
  65. </div>
  66. <div class="col-xs-6">
  67. <div class="dataTables_paginate paging_simple_numbers">
  68. <?php
  69. $this->widget('CLinkPager', array(
  70. 'header' => '',
  71. 'firstPageLabel'=> '首页',
  72. 'lastPageLabel' => '末页',
  73. 'prevPageLabel' => '上一页',
  74. 'nextPageLabel' => '下一页',
  75. 'pages' => $pages,
  76. 'maxButtonCount'=> 5,
  77. ));
  78. echo '共:'.$page_total.'条';
  79. ?>
  80. </div>
  81. </div>
  82. </div>
  83. <?php endif;?>
  84. </div>
  85. </article>
  86. </section>
  87. </div>
  88. </div>
  89. <script>
  90. $(function() {
  91. //修改姓名
  92. $('.handle-detail-main-excel')
  93. .on('change','.student_card',function(){
  94. var new_name=$(this).val();
  95. var data=$(this).attr('data');
  96. var obj=$(this);
  97. var id=$(this).attr('id');
  98. changeValue(new_name,data,obj,id);
  99. })
  100. function changeValue(value,data,obj,id){
  101. if(value=='' || value==undefined){
  102. return false;
  103. }
  104. indexSend=layer.msg('正在修改,请稍候......',{time:0});
  105. $.ajax({
  106. url:'<?php echo $this->createUrl('importstudent/changeClassifiedStudentCard')?>',
  107. type:'POST',
  108. dataType:'json',
  109. data:{'id':id,'value':value},
  110. success:function(res){
  111. layer.close(indexSend);
  112. if(res.status==1){
  113. layer.msg('修改成功');
  114. obj.attr('data',value);
  115. //obj.closest('tr').remove();
  116. }else{
  117. obj.val(data);
  118. if(res.msg!=undefined){
  119. layer.msg(res.msg);
  120. }else{
  121. layer.msg('修改失败');
  122. }
  123. }
  124. }
  125. });
  126. }
  127. //弹窗
  128. $('.handle-detail-main-excel').on('click','.viewClassStudent',function () {
  129. var class_name=$(this).attr('title');
  130. $.ajax({
  131. url:'<?php echo $this->createUrl('importstudent/loadstudentbyclassname')?>',
  132. type:'POST',
  133. dataType:'json',
  134. data:{'classname':class_name},
  135. success:function(res){
  136. if(res.status==1){
  137. $('.studentList').html(res.html);
  138. $('.history-pop').show();
  139. }else{
  140. }
  141. }
  142. });
  143. })
  144. $('.npt-close').click(function(){
  145. $('.history-pop,.countermark-pop,.relate-sure-pop').hide();
  146. })
  147. $('.save_student_id').click(function(){
  148. window.location.href="<?php echo $this->createUrl('importstudent/checkClassified')?>";
  149. });
  150. })
  151. </script>