normal_classified.php 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <link type="text/css" rel="stylesheet" href="/css/needDetail.css" />
  2. <style>
  3. html {overflow-y: scroll;}
  4. </style>
  5. <script>
  6. function getClassByGrade(gradeId,$classId){
  7. $.ajax({
  8. type:'post',
  9. url:'<?php echo $this->createUrl("importstudent/getClassifiedByGrade");?>',
  10. async: true,
  11. dataType: 'json',
  12. data:{'grade':gradeId},
  13. success: function (result) {
  14. if(result.status==1){
  15. $('#class').html('<option value="0">全部班级</option>');
  16. for(var i=0;i<result.data.length;i++){
  17. if($.trim($classId)==$.trim(result.data[i]['class_id'])){
  18. html='<option value="'+result.data[i]['class_id']+'" selected>'+result.data[i]['class_name']+'</option>';
  19. }else{
  20. html='<option value="'+result.data[i]['class_id']+'" >'+result.data[i]['class_name']+'</option>';
  21. }
  22. $('#class').append(html);
  23. }
  24. }
  25. },
  26. error: function () {
  27. return;
  28. }
  29. });
  30. }
  31. </script>
  32. <?php
  33. $gradeSelect=array(
  34. 0=>'',
  35. 1=>'',
  36. 2=>'',
  37. 3=>''
  38. );
  39. if(isset($grade) && $grade){
  40. $gradeSelect[$grade]='selected';
  41. if(isset($class_id) && $class_id){
  42. $class=(string)$class_id;
  43. echo "<script>getClassByGrade(".$grade.",'".$class."');</script>";
  44. }else{
  45. echo "<script>getClassByGrade(".$grade.",0);</script>";
  46. }
  47. }
  48. ?>
  49. <div class="main-content-inner">
  50. <!-- 导航栏开始-->
  51. <ul class="clearfix main-content-inner-ul">
  52. <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
  53. <li class="pull-left">
  54. <button onclick='location.href="<?php echo $this->createUrl("semester/index");?>"' class="button button_normal button_group button_arrow" data-button="red">学期管理</button>
  55. <img src="/images/line.jpg" style="height:45px;" />
  56. </li>
  57. <?php }?>
  58. <li class="pull-left">
  59. <button onclick='location.href="<?php echo $this->createUrl("teacher/index");?>"' class="button button_normal button_group button_arrow" data-button="red">教师管理</button>
  60. <img src="/images/line.jpg" style="height:45px;" />
  61. </li>
  62. <li class="pull-left">
  63. <button onclick='location.href="<?php echo $this->createUrl("classes/index");?>"' class="button button_normal button_group button_arrow" data-button="red">班级管理</button>
  64. <img src="/images/line.jpg" style="height:45px;" />
  65. </li>
  66. <li class="pull-left">
  67. <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">学生管理</button>
  68. <img src="/images/line.jpg" style="height:45px;" />
  69. </li>
  70. <li class="pull-left">
  71. <button onclick='location.href="<?php echo $this->createUrl("classes/export");?>"' class="button button_normal button_group button_arrow " data-button="red">导出学生</button>
  72. <img src="/images/line.jpg" style="height:45px;" />
  73. </li>
  74. </ul>
  75. <!-- 导航栏结束-->
  76. <div class="layout-gap">
  77. <section class="hrn-top flex">
  78. <div class="flex-one hrn-top-title fw">学生信息正常</div>
  79. <div class="green-font pointer" onclick="window.location.href='<?php echo $this->createUrl('importstudent/checkClassified')?>';">返回</div>
  80. </section>
  81. <section class="flex hrn-main-con">
  82. <article class="flex-one handle-detail-con">
  83. <div class="handle-detail-top flex">
  84. <form action="" method="get" name="form1" id="form1">
  85. <select name="grade" id="grade">
  86. <option value="0">年级</option>
  87. <option value="1" <?php echo $gradeSelect[1] ?>>高一</option>
  88. <option value="2" <?php echo $gradeSelect[2]?>>高二</option>
  89. <option value="3" <?php echo $gradeSelect[3]?>>高三</option>
  90. </select>
  91. <select name="classId" id="class">
  92. <option value="0">全部班级</option>
  93. </select>
  94. <input name="realname" value="" type="text">
  95. <div class="check-btn pointer search" style="display:inline-block" data="">搜索</div>
  96. <div class="check-btn pointer save_result" style="display:inline-block" data="">导入系统</div>
  97. <span class="red-font">建议先处理完异常后一起导入</span>
  98. </form>
  99. </div>
  100. <div class="handle-detail-main-excel">
  101. <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
  102. <tr>
  103. <td>班级</td>
  104. <td>姓名</td>
  105. <td>系统准考证号</td>
  106. <tr>
  107. <?php
  108. if($list){
  109. $sex[1]='男';
  110. $sex[2]='女';
  111. foreach ($list as $key => $val){
  112. echo '<tr>';
  113. echo '<td>'.$val['class_name'].'</td>';
  114. echo '<td>'.$val['modify_name'].'</td>';
  115. if($val['student_card']){
  116. echo '<td>'.$val['student_card'].'</td>';
  117. }else{
  118. echo '<td></td>';
  119. }
  120. echo '</tr>';
  121. }
  122. }
  123. ?>
  124. </table>
  125. <?php if(!empty($page_total)):?>
  126. <div class="row">
  127. <div class="col-xs-6">
  128. &nbsp;
  129. </div>
  130. <div class="col-xs-6">
  131. <div class="dataTables_paginate paging_simple_numbers">
  132. <?php
  133. $this->widget('CLinkPager', array(
  134. 'header' => '',
  135. 'firstPageLabel'=> '首页',
  136. 'lastPageLabel' => '末页',
  137. 'prevPageLabel' => '上一页',
  138. 'nextPageLabel' => '下一页',
  139. 'pages' => $pages,
  140. 'maxButtonCount'=> 5,
  141. ));
  142. echo '共:'.$page_total.'条';
  143. ?>
  144. </div>
  145. </div>
  146. </div>
  147. <?php endif;?>
  148. </div>
  149. </article>
  150. </section>
  151. </div>
  152. </div>
  153. <script>
  154. $(function(){
  155. var isImport=false;
  156. $('select[name="grade"]').change(function(){
  157. var grade=$(this).val();
  158. getClassByGrade(grade,0);
  159. });
  160. $('.search').click(function(){
  161. $('#form1').submit();
  162. });
  163. $('.save_result').click(function(){
  164. if(!isImport){
  165. var layer_index=layer.msg('正在导入中,请稍候。。。',{time:0});
  166. isImport=true;
  167. $.ajax({
  168. url:'<?php echo $this->createUrl('importstudent/confirm_classified_import')?>',
  169. type:'POST',
  170. dataType:'json',
  171. success:function(res){
  172. layer.close(layer_index);
  173. if(res.status==1){
  174. layer.msg('导入成功',function(){
  175. window.location.href="<?php echo $this->createUrl('classes/index?class_type=2')?>";
  176. })
  177. }else{
  178. if(res.msg!=undefined){
  179. layer.msg(res.msg);
  180. }else{
  181. layer.msg('导入失败');
  182. }
  183. }
  184. isImport=false;
  185. }
  186. });
  187. }
  188. });
  189. })
  190. </script>