123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <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
- if(isset($list) && $list){
- $topic_score=json_decode($list[0]['score_data'],true);
- $check_field=$list[0]['check_field'];
- if($check_field=='student_name'){
- $scoreArr=array_slice($topic_score,1);
- echo '<td>科目总分</td>';
- }else{
- $scoreArr=array_slice($topic_score,2);
- if(isset($fieldName[$check_field])){
- echo '<td>'.$fieldName[$check_field].'</td>';
- }else{
- echo '<td>考号</td>';
- }
- echo '<td>科目总分</td>';
- }
- for($i=1;$i<=count($scoreArr);$i++){
- echo '<td>第'.$i.'题</td>';
- }
- echo '</tr>';
- foreach($list as $val){
- $topic_score=json_decode($val['score_data'],true);
- if($check_field=='student_name'){
- $scoreArr=array_slice($topic_score,1);
- $totalScore=$topic_score['C'];
- }else{
- $cardValue=$topic_score['C'];
- $totalScore=$topic_score['D'];
- $scoreArr=array_slice($topic_score,2);
- }
- 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>';
- if(isset($cardValue)){
- echo '<td><input type="text" data="'.$val['check_field_value'].'" class="change_card" id="'.$val['id'].'" value="'.$val['check_field_value'].'"></td>';
- }
- echo '<td>'.$totalScore.'</td>';
- foreach($scoreArr 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('record/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('record/check_excel')?>";
- });
- })
- </script>
|