123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <link type="text/css" rel="stylesheet" href="/css/needDetail.css" />
- <style>
- html {overflow-y: scroll;}
- </style>
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
- <!-- 导航栏结束-->
- <div class="layout-gap">
- <section class="hrn-top flex">
- <div class="flex-one hrn-top-title fw">学生在系统中不存在</div>
- <div class="green-font pointer" onclick="javascript:history.go(-1);">返回</div>
- </section>
- <section class="flex hrn-main-con">
- <article class="flex-one handle-detail-con">
- <div class="handle-detail-top flex">
- <div class="flex-one">
- <p>excel中学生:</p>
- </div>
- <span>处理办法:请修改<?php if(isset($check_field) && isset($fieldName[$check_field])){echo $fieldName[$check_field];}else{echo '考号';} ?>后重新导入</span>
- <div class="check-btn pointer save_student_id" data="">确认</div>
- </div>
- <div class="handle-detail-main-excel">
- <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <tr>
- <td>姓名</td>
- <td>班级</td>
- <?php
- $letters = array('C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','AA','AB','AC','AD','AE','AF','AG','AH','AI','AJ','AK','AL','AM');
- $allSubject=Yii::app()->params['subjectId'];
- unset($allSubject[3]);
- unset($allSubject[51]);
- unset($allSubject[20]);
- $ExcelToSubject=array();
- $subjectOrder=0;
- foreach ($allSubject as $key =>$val){
- $ExcelToSubject[$letters[$subjectOrder]]=$key;
- $subjectOrder++;
- }
- if(isset($list) && $list){
- $scoreArr=json_decode($list[0]['score_data'],true);
- $check_field=$list[0]['check_field'];
- foreach($scoreArr as $f=>$v){
- echo '<th>'.Yii::app()->params['subjectId'][$ExcelToSubject[$f]].'</th>';
- }
- echo '</tr>';
- foreach($list as $val){
- $topic_score=json_decode($val['score_data'],true);
- echo '<tr>';
- if($check_field=='student_name'){
- echo '<td><input type="text" data="'.$val['student_name'].'" class="change_name" id="'.$val['id'].'" value="'.$val['student_name'].'"></td>';
- }else{
- echo '<td>'.$val['student_name'].'</td>';
- }
- echo '<td>'.$val['class_name'].'</td>';
- foreach($topic_score as $v){
- echo '<td>'.$v.'</td>';
- }
- echo '</tr>';
- }
- }
- ?>
- </table>
- </div>
- </article>
- </section>
- </div>
- </div>
- <script>
- $(function() {
- //修改姓名
- $('.handle-detail-main-excel')
- .on('change','.change_name',function(){
- var new_name=$(this).val();
- var id=$(this).attr('id');
- var data=$(this).attr('data');
- var obj=$(this);
- changeValue(new_name,id,data,obj);
- })
- .on('change','.change_card',function(){
- var new_card=$(this).val();
- var id=$(this).attr('id');
- var data=$(this).attr('data');
- var obj=$(this);
- changeValue(new_card,id,data,obj);
- })
- function changeValue(value,id,data,obj){
- if(value=='' || value==undefined){
- return false;
- }
- if(id=='' || id==undefined){
- return false;
- }
- indexSend=layer.msg('正在修改,请稍候......',{time:0});
- $.ajax({
- url:'<?php echo $this->createUrl('zhiliao/change_value')?>',
- type:'POST',
- dataType:'json',
- data:{'id':id,'value':value},
- success:function(res){
- layer.close(indexSend);
- if(res.status==1){
- layer.msg('修改成功');
- //obj.attr('data',value);
- obj.closest('tr').remove();
- }else{
- obj.val(data);
- if(res.msg!=undefined){
- layer.msg(res.msg);
- }else{
- layer.msg('修改失败');
- }
- }
- }
- });
- }
- $('.save_student_id').click(function(){
- window.location.href="<?php echo $this->createUrl('zhiliao/check_excel')?>";
- });
- })
- </script>
|