normal.php 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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("cylet/getclassbygrade");?>',
  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/check')?>';">返回</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. <td>身份证号</td>
  107. <td>系统准考证号</td>
  108. <?php echo $extTh;?>
  109. <tr>
  110. <?php
  111. if($list){
  112. $sex[1]='男';
  113. $sex[2]='女';
  114. foreach ($list as $key => $val){
  115. echo '<tr>';
  116. echo '<td>'.$val['class_name'].'</td>';
  117. echo '<td>'.$val['modify_name'].'</td>';
  118. echo '<td>'.$sex[$val['sex']].'</td>';
  119. if($val['id_number']){
  120. echo '<td>'.$val['id_number'].'</td>';
  121. }else{
  122. echo '<td></td>';
  123. }
  124. if($val['student_card']){
  125. echo '<td>'.$val['student_card'].'</td>';
  126. }else{
  127. echo '<td></td>';
  128. }
  129. echo $val['ext'];
  130. echo '</tr>';
  131. }
  132. }
  133. ?>
  134. </table>
  135. <?php if(!empty($page_total)):?>
  136. <div class="row">
  137. <div class="col-xs-6">
  138. &nbsp;
  139. </div>
  140. <div class="col-xs-6">
  141. <div class="dataTables_paginate paging_simple_numbers">
  142. <?php
  143. $this->widget('CLinkPager', array(
  144. 'header' => '',
  145. 'firstPageLabel'=> '首页',
  146. 'lastPageLabel' => '末页',
  147. 'prevPageLabel' => '上一页',
  148. 'nextPageLabel' => '下一页',
  149. 'pages' => $pages,
  150. 'maxButtonCount'=> 5,
  151. ));
  152. echo '共:'.$page_total.'条';
  153. ?>
  154. </div>
  155. </div>
  156. </div>
  157. <?php endif;?>
  158. </div>
  159. </article>
  160. </section>
  161. </div>
  162. </div>
  163. <script>
  164. $(function(){
  165. var isImport=false;
  166. $('select[name="grade"]').change(function(){
  167. var grade=$(this).val();
  168. getClassByGrade(grade,0);
  169. });
  170. $('.search').click(function(){
  171. $('#form1').submit();
  172. });
  173. $('.save_result').click(function(){
  174. if(!isImport){
  175. var layer_index=layer.msg('正在导入中,请稍候。。。',{time:0});
  176. isImport=true;
  177. $.ajax({
  178. url:'<?php echo $this->createUrl('importstudent/confirm_import')?>',
  179. type:'POST',
  180. dataType:'json',
  181. success:function(res){
  182. layer.close(layer_index);
  183. if(res.status==1){
  184. layer.msg('导入成功',function(){
  185. window.location.href="<?php echo $this->createUrl('importstudent/index')?>";
  186. })
  187. }else{
  188. if(res.msg!=undefined){
  189. layer.msg(res.msg);
  190. }else{
  191. layer.msg('导入失败');
  192. }
  193. }
  194. isImport=false;
  195. }
  196. });
  197. }
  198. });
  199. })
  200. </script>