handle_classified_existent.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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="50%">班级名称(excel文件中)</td>
  71. <td>学生</td>
  72. <tr>
  73. <?php
  74. if($className){
  75. foreach ($className as $key => $val){
  76. echo '<tr>';
  77. echo '<td><input type="text" class="class_name" data="'.$key.'" style="width:100%" maxlength="10" value="'.$key.'"></td>';
  78. echo '<td><a href="#" title="'.$key.'" class="viewClassStudent">'.count($val).'</a></td>';
  79. echo '</tr>';
  80. }
  81. }
  82. ?>
  83. </table>
  84. </div>
  85. </article>
  86. </section>
  87. </div>
  88. </div>
  89. <div class="history-pop">
  90. <div class="history-pop-con">
  91. <div class="need-pop-top clearfix">
  92. <div class="npt-title put-need fl">学生名单</div>
  93. <div class="npt-close fr">×</div>
  94. </div>
  95. <div class="tab-box">
  96. <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable studentList">
  97. </table>
  98. </div>
  99. </div>
  100. </div>
  101. <script>
  102. $(function() {
  103. //修改姓名
  104. $('.handle-detail-main-excel')
  105. .on('change','.class_name',function(){
  106. var new_name=$(this).val();
  107. var data=$(this).attr('data');
  108. var obj=$(this);
  109. changeValue(new_name,data,obj);
  110. })
  111. function changeValue(value,data,obj){
  112. if(value=='' || value==undefined){
  113. return false;
  114. }
  115. indexSend=layer.msg('正在修改,请稍候......',{time:0});
  116. $.ajax({
  117. url:'<?php echo $this->createUrl('importstudent/change_classified_value')?>',
  118. type:'POST',
  119. dataType:'json',
  120. data:{'data':data,'value':value},
  121. success:function(res){
  122. layer.close(indexSend);
  123. if(res.status==1){
  124. layer.msg('修改成功');
  125. obj.attr('data',value);
  126. //obj.closest('tr').remove();
  127. }else{
  128. obj.val(data);
  129. if(res.msg!=undefined){
  130. layer.msg(res.msg);
  131. }else{
  132. layer.msg('修改失败');
  133. }
  134. }
  135. }
  136. });
  137. }
  138. //弹窗
  139. $('.handle-detail-main-excel').on('click','.viewClassStudent',function () {
  140. var class_name=$(this).attr('title');
  141. $.ajax({
  142. url:'<?php echo $this->createUrl('importstudent/loadStudentByClassified')?>',
  143. type:'POST',
  144. dataType:'json',
  145. data:{'classname':class_name},
  146. success:function(res){
  147. if(res.status==1){
  148. $('.studentList').html(res.html);
  149. $('.history-pop').show();
  150. }else{
  151. }
  152. }
  153. });
  154. })
  155. $('.npt-close').click(function(){
  156. $('.history-pop,.countermark-pop,.relate-sure-pop').hide();
  157. })
  158. $('.save_student_id').click(function(){
  159. window.location.href="<?php echo $this->createUrl('importstudent/checkClassified')?>";
  160. });
  161. })
  162. </script>