handle_existent_card.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <link type="text/css" rel="stylesheet" href="/css/needDetail.css" />
  2. <style>
  3. html {overflow-y: scroll;}
  4. .tab-box{
  5. max-height: 300px;
  6. overflow: scroll;
  7. background: #fff;
  8. }
  9. .tab-box td{padding: 10px 0;width: 100px;padding: 12px 0;word-break: break-all;
  10. min-width: 0;}
  11. .tab-box table{table-layout: fixed;
  12. border-collapse: separate;width: 100.1%;}
  13. .tab-box::-webkit-scrollbar{
  14. width: 4px;
  15. height: 14px;
  16. background-color: #F5F5F5;
  17. }
  18. .tab-box::-webkit-scrollbar-thumb{
  19. border-radius: 10px;
  20. background-color: #FFF;
  21. background-image: -webkit-gradient(linear,
  22. 40% 0%,
  23. 75% 84%,
  24. from(#C1D9F3),
  25. to(#D0E7F3),
  26. color-stop(.6,#D0E7F3))
  27. }
  28. </style>
  29. <div class="main-content-inner">
  30. <!-- 导航栏开始-->
  31. <ul class="clearfix main-content-inner-ul">
  32. <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
  33. <li class="pull-left">
  34. <button onclick='location.href="<?php echo $this->createUrl("semester/index");?>"' class="button button_normal button_group button_arrow" data-button="red">学期管理</button>
  35. <img src="/images/line.jpg" style="height:45px;" />
  36. </li>
  37. <?php }?>
  38. <li class="pull-left">
  39. <button onclick='location.href="<?php echo $this->createUrl("teacher/index");?>"' class="button button_normal button_group button_arrow" data-button="red">教师管理</button>
  40. <img src="/images/line.jpg" style="height:45px;" />
  41. </li>
  42. <li class="pull-left">
  43. <button onclick='location.href="<?php echo $this->createUrl("classes/index");?>"' class="button button_normal button_group button_arrow" data-button="red">班级管理</button>
  44. <img src="/images/line.jpg" style="height:45px;" />
  45. </li>
  46. <li class="pull-left">
  47. <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">学生管理</button>
  48. <img src="/images/line.jpg" style="height:45px;" />
  49. </li>
  50. <li class="pull-left">
  51. <button onclick='location.href="<?php echo $this->createUrl("classes/export");?>"' class="button button_normal button_group button_arrow " data-button="red">导出学生</button>
  52. <img src="/images/line.jpg" style="height:45px;" />
  53. </li>
  54. </ul>
  55. <!-- 导航栏结束-->
  56. <div class="layout-gap">
  57. <section class="hrn-top flex">
  58. <div class="flex-one hrn-top-title fw">系统准考证号不存在</div>
  59. <div class="green-font pointer" onclick="javascript:history.go(-1);">返回</div>
  60. </section>
  61. <section class="flex hrn-main-con">
  62. <article class="flex-one handle-detail-con">
  63. <div class="handle-detail-top flex">
  64. <span>处理办法:请修改系统准考证号至与系统中一致。修改完成点击检查</span>
  65. <div class="check-btn pointer save_student_id" data="">检查</div>
  66. </div>
  67. <div class="handle-detail-main-excel">
  68. <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
  69. <tr>
  70. <td width="20%">姓名</td>
  71. <td width="20%">班级名称</td>
  72. <td>准考证号</td>
  73. <tr>
  74. <?php
  75. if($student){
  76. foreach ($student as $key => $val){
  77. echo '<tr>';
  78. echo '<td>'.$val['modify_name'].'(原 '.$val['student_name'].')</td>';
  79. echo '<td>'.$val['class_name'].'</td>';
  80. echo '<td><input type="text" class="student_card" data="'.$val['student_card'].'" id="'.$val['id'].'" style="width:100%" maxlength="10" value="'.$val['student_card'].'"></td>';
  81. echo '</tr>';
  82. }
  83. }
  84. ?>
  85. </table>
  86. </div>
  87. </article>
  88. </section>
  89. </div>
  90. </div>
  91. <div class="history-pop">
  92. <div class="history-pop-con">
  93. <div class="need-pop-top clearfix">
  94. <div class="npt-title put-need fl">学生名单</div>
  95. <div class="npt-close fr">×</div>
  96. </div>
  97. <div class="tab-box">
  98. <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable studentList">
  99. </table>
  100. </div>
  101. </div>
  102. </div>
  103. <script>
  104. $(function() {
  105. //修改姓名
  106. $('.handle-detail-main-excel')
  107. .on('change','.student_card',function(){
  108. var new_name=$(this).val();
  109. var id=$(this).attr('id');
  110. var obj=$(this);
  111. var data=$(this).attr('data');
  112. changeValue(new_name,id,obj,data);
  113. })
  114. function changeValue(value,id,obj,data){
  115. if(value=='' || value==undefined){
  116. return false;
  117. }
  118. indexSend=layer.msg('正在修改,请稍候......',{time:0});
  119. $.ajax({
  120. url:'<?php echo $this->createUrl('importstudent/change_studentcard')?>',
  121. type:'POST',
  122. dataType:'json',
  123. data:{'id':id,'value':value},
  124. success:function(res){
  125. layer.close(indexSend);
  126. if(res.status==1){
  127. layer.msg('修改成功');
  128. obj.attr('data',value);
  129. //obj.closest('tr').remove();
  130. }else{
  131. obj.val(data);
  132. if(res.msg!=undefined){
  133. layer.msg(res.msg);
  134. }else{
  135. layer.msg('修改失败');
  136. }
  137. }
  138. }
  139. });
  140. }
  141. //弹窗
  142. $('.handle-detail-main-excel').on('click','.viewClassStudent',function () {
  143. var class_name=$(this).attr('title');
  144. $.ajax({
  145. url:'<?php echo $this->createUrl('importstudent/loadstudentbyclassname')?>',
  146. type:'POST',
  147. dataType:'json',
  148. data:{'classname':class_name},
  149. success:function(res){
  150. if(res.status==1){
  151. $('.studentList').html(res.html);
  152. $('.history-pop').show();
  153. }else{
  154. }
  155. }
  156. });
  157. })
  158. $('.npt-close').click(function(){
  159. $('.history-pop,.countermark-pop,.relate-sure-pop').hide();
  160. })
  161. $('.save_student_id').click(function(){
  162. window.location.href="<?php echo $this->createUrl('importstudent/handle_existent_card')?>";
  163. });
  164. })
  165. </script>