123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <link type="text/css" rel="stylesheet" href="/css/needDetail.css" />
- <style>
- .handle{float: right}
- </style>
- <div class="main-content-inner">
- <ul class="clearfix main-content-inner-ul">
- <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("semester/index");?>"' class="button button_normal button_group button_arrow" data-button="red">学期管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <?php }?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("teacher/index");?>"' class="button button_normal button_group button_arrow" data-button="red">教师管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("classes/index");?>"' class="button button_normal button_group button_arrow" data-button="red">班级管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">学生管理</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("classes/export");?>"' class="button button_normal button_group button_arrow " data-button="red">导出学生</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- </ul>
- <div class="layout-gap">
- <section class="anc-top flex status_1 ">
- <div class="flex-one flex">
- <p class="anc-title">导入教学班学生</p>
- </div>
- <div class="anc-opt-btn green-font pointer give-up-check">重新上传</div>
- </section>
- <section class="anc-main-con">
- <!-- 检测状态部分 -->
- <ul class="anc-status-con " >
- <li class="anc-status-list now-status first finish-status">
- <p class="status-top-msg">检查Excel</p>
- <p class="gray-font status-charact ">检查完成,导入的excel格式正确</p>
- </li>
- <li class="anc-status-list second <?php if(isset($is_last) && $is_last==1) echo 'finish-status'?>">
- <p class="status-top-msg">
- 检查学生姓名
- </p>
- <p class="gray-font status-charact"></p>
- </li>
- <li class="anc-status-list third <?php if(isset($is_last) && $is_last==1) echo 'finish-status'?>">
- <p class="status-top-msg">
- 匹配行政班学生
- </p>
- <p class="gray-font status-charact">
- </p>
- </li>
- </ul>
- </section>
- <section class="anc-finish-opt gray-border-top" >
- <!--<div class="anc-finish-btn save_result hide" >确认导入</div>-->
- </section>
- </div>
- </div>
- <div class="anc-pop">
- <div class="confirm-pop-con">
- <div class="need-pop-top clearfix">
- <div class="npt-title put-need fl">提示</div>
- <div class="npt-close fr">×</div>
- </div>
- <div class="confirm-msg red-font tac">
- 确认要放弃本次上传的数据吗?
- </div>
- <div class="pop-btns">
- <div class="confirm-pop-btn-sure">确认</div>
- <div class="confirm-pop-btn-cancel cancel-btn">取消</div>
- </div>
- </div>
- </div>
- <script>
- $(function(){
- checkAbnormal();
- //第一步,检测数据
- function checkAbnormal(){
- $('.second .status-charact').html('正在检测...');
- $('.second').addClass('now-status');
- $.ajax({
- url:'<?php echo $this->createUrl('importstudent/check_student_name_classified')?>',
- dataType:'json',
- type:'POST',
- success:function(res){
- if(res.status==1){
- count=res.count;
- $('.second .status-charact').html('检测完成,已为'+count+'名学生去除姓名中的非汉字字符');
- $('.second').addClass('finish-status');
- $('.second').removeClass('now-status');
- checkRepeat();
- }else{
- $('.second .status-charact').html('检测失败');
- $('.second').addClass('error-status');
- $('.second').removeClass('now-status');
- }
- }
- });
- }
- //第三步
- function checkRepeat(){
- $('.fourth .status-charact').html('正在检测...');
- $('.fourth').addClass('now-status');
- $.ajax({
- url:'<?php echo $this->createUrl('importstudent/matchingClassified')?>',
- dataType:'json',
- type:'POST',
- success:function(res){
- if(res.status==1){
- var html='';
- if(res.noExistent>0){
- html+='<p>班级名称不匹配<span class="handle"><a href="<?php echo $this->createUrl('importstudent/handle_classified_existent')?>">'+res.noExistent+'组</a></span></p>';
- }else{
- html+='<p>班级名称不匹配<span class="handle">'+res.noExistent+'组</span></p>';
- }
- if(res.repeat>0){
- html+='<p>匹配失败<span class="handle"><a href="<?php echo $this->createUrl('importstudent/handleClassifiedCard')?>">'+res.repeat+'组</a></span></p>';
- }else{
- html+='<p>匹配失败<span class="handle">'+res.repeat+'组</span></p>';
- }
- html+='<p>匹配成功<span class="handle"><a href="<?php echo $this->createUrl("importstudent/normalClassified")?>">'+res.success+'人</span></p>';
- $('.third .status-charact').html(html);
- if(res.repeat==0 && res.success>0){
- $('.save_result').removeClass('hide');
- }
- $('.third').addClass('now-status');
- }else{
- $('.third .status-charact').html('检测失败,请稍后再试');
- $('.third').addClass('error-status');
- $('.third').removeClass('now-status');
- }
- }
- });
- }
- $('.give-up-check').click(function(){
- $('.anc-pop').show()
- })
- $('.npt-close,.confirm-pop-btn-cancel').click(function(){
- $('.anc-pop').hide()
- })
- $('.confirm-pop-btn-sure').click(function () {
- $.ajax({
- url:'<?php echo $this->createUrl('importstudent/giveup')?>',
- dataType:'json',
- type:'POST',
- success:function(res){
- if(res.status==1){
- $('.anc-pop').hide();
- window.location.href='<?php echo $this->createUrl('importstudent/importStudentClassified')?>';
- }else{
- $('.anc-pop').hide();
- }
- }
- });
- });
- $('.save_result').click(function(){
- window.location.href="<?php echo $this->createUrl('importstudent/confirm_classified_import')?>";
- });
- })
- </script>
|