123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687 |
- <script src="/js/xsgl.js"></script>
- <script type="text/javascript">
- jQuery(document).ready(function(){
- jQuery(".kick").click(function(){
- document.studentId = jQuery(this).attr("studentId");
- layer.msg('确定踢出?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
-
- jQuery.post(
- "<?php echo $this->createUrl("studentinfo/kick");?>",
- {"studentId": document.studentId},
- function(data){
- msg = "操作成功";
- icon = 6;
-
- layer.alert(msg, {icon: icon}, function(index){
- layer.close(index);
- });
- }
- );
- }
- });
- });
-
- jQuery(".delStudent").click(function(){
- document.studentId = jQuery(this).attr("studentId");
-
- layer.msg('确定从本班中删除该学生?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
-
- jQuery.post(
- "<?php echo $this->createUrl("studentinfo/delstudentact");?>",
- {"studentId": document.studentId, "classId": "<?php echo $class_id;?>"},
- function(data){
- data = eval("("+data+")");
-
- if(data.code == "0"){
- msg = data.msg;
- icon = 6;
- }
- else{
- msg = "因为以下原因操作失败:<br/>"+data.msg;
- icon = 5;
- }
-
- layer.alert(msg, {icon: icon}, function(){
- location.href = "<?php echo $this->createUrl("studentinfo/index?class_id={$class_id}");?>";
- });
- }
- );
- }
- });
- });
- });
- </script>
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/class_navigation.php');?>
- <!-- 导航栏结束-->
- <style>
- .clearfix:after{content:'';display: block;clear: both;height:0;visibility: hidden;}
- .fl{float: left;}
- table{ border-collapse:collapse;}
- td{border:1px solid #ccc;border-spacing:0;width:100px;}
- tr:last-child td{border-bottom:0}
- .box{margin:50px auto;border-bottom:1px solid #ccc;width:500px;}
- .left{width:100%;overflow-y: auto}
- .right{width:10%;}
- .table1{min-width:1200px;}
- .table2 td{padding:0 5px!important;}
- .selcet-class-type{margin-right:10px}
- .change-stu-class{margin-left:10px}
- /* Tooltip 容器 */
- .tooltipclass {
- display: inline-block;
- }
- /* Tooltip 文本 */
- .tooltipclass .tooltiptext {
- visibility: hidden;
- width: 160px;
- background-color: #555;
- color: #fff;
- padding: 5px;
- border-radius: 6px;
- font-size:11px;
- text-align: left;
- /* 定位 */
- position: absolute;
- z-index: 1;
- }
- /* 鼠标移动上去后显示提示框 */
- .tooltipclass:hover .tooltiptext {
- visibility: visible;
- }
- </style>
- <div class="page-content">
- <div class="row" style="margin:0px;">
- <div class="col-xs-12">
- <!-- PAGE CONTENT BEGINS -->
- <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
- <div class="row">
- <form method="get" action="<?php echo $this->createUrl('studentinfo/index');?>">
- <div class="col-xs-7">
- <div class="dataTables_length margin-zy">
- <div class='diy_select1' style="display: inline;margin-right: 5px;border: 1px solid #c9ccd2; width: 131px">
- <input type='hidden' id="grade_id" name="grade_id" class='diy_select_input1' value="<?php if(empty($grade_id)){echo 0;}else{echo $grade_id;}?>"/>
- <div class='diy_select_txt1'><?php if(empty($grade_id)){echo '请选择年级';}else{ echo Yii::app()->params['grade_list'][$grade_id]['grade_name'];}?></div>
- <input type='hidden' id="zhuanban-class" name="zhuanban-class" value="0"/>
- <div class='diy_select_btn1'></div>
- <ul class='diy_select_list1'>
- <li val="0" >请选择年级</li>
- <?php
- if(Yii::app()->params['grade_config']){
- foreach (Yii::app()->params['grade_config'] as $val){
- echo '<li val="'.$val['id'].'" >'.$val['grade_name'].'</li>';
- }
- }
- ?>
- </ul>
- </div>
-
- <?php if(!empty($classInfo)):?>
- <div class='diy_select' style="width: 131px">
- <input type='hidden' id="class_id" name="class_id" class='diy_select_input' value="<?php if(empty($grade_id) || empty($grade_class) || empty($class_id)){echo 0;}else{echo $class_id;}?>"/>
- <div class='diy_select_txt'><?php if(empty($grade_id) || empty($class_id) || empty($grade_class)){echo '请选择班级';}else{ if(isset($grade_class[$class_id]) && !empty($grade_class[$class_id])){ echo $grade_class[$class_id]['class_name'];}}?></div>
- <div class='diy_select_btn'></div>
- <ul class='diy_select_list'>
- <li val="0">请选择班级</li>
- <?php if(empty($grade_id) || empty($grade_class)){echo '';}else{ foreach ($grade_class as $v)
- {?>
- <li val="<?php echo $v['class_id']?>"><?php echo $v['class_name']?></li>
- <?php }}?>
- </ul>
- </div>
- <?php endif;?>
- <div class='diy_select2' style="width: 131px;margin-left: 10px">
- <?php
- if(!$search_type) $search_type=1;
- $select_txt2='';
- switch ($search_type){
- case 1:
- $select_txt2='姓名';
- break;
- case 2:
- $select_txt2='登录账号';
- break;
- case 3:
- $select_txt2='系统准考证';
- break;
- case 4:
- $select_txt2='学校准考证';
- break;
- case 4:
- $select_txt2='智学网准考证';
- break;
- default:
- if(isset($studentextend)){
- foreach ($studentextend as $key => $val){
- if($search_type==$key){
- $select_txt2=$val['field_mean'];
- }
- }
- }
- }
- ?>
- <input type='hidden' id="class_id" name="search_type" class='diy_select_input2' value="<?php echo $search_type;?>"/>
- <div class='diy_select_txt2'><?php echo $select_txt2; ?></div>
- <div class='diy_select_btn2'></div>
- <ul class='diy_select_list2'>
- <li val="1">姓名</li>
- <li val="2">登录账号</li>
- <li val="3">系统准考证</li>
- <li val="4">学校准考证</li>
- <li val="5">智学网准考证</li>
- <?php
- if(isset($studentExtend)){
- foreach ($studentExtend as $key => $val){
- if($val['is_enable']==1){
- echo '<li val="'.$key.'">'.$val['field_mean'].'</li>';
- }
- }
- }
- ?>
- </ul>
- </div>
- <input type="text" class="form-control input-sm" placeholder="请输入" name="realname" value="<?php if(!empty($realname)){echo $realname;}?>">
- <!--<button class="btn btn-minier btn-primary">搜索</button>-->
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
- </div>
- </div>
- </form>
- <?php if(!isset(Yii::app()->session['session_semester_state'])):?>
- <div class="col-xs-4 fr" style="width: 15%">
- <div id="dynamic-table_filter" class="dataTables_filter mt5">
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('studentinfo/add');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 添加学生
- </a>
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('importstudent/index');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 导入学生
- </a>
- <?php /*if(!isset(Yii::app()->session["crmUserInfo"])){*/?><!--
- <?php /*if($use_zhixue){*/?>
- <a class="btn btn-success btn-sm" href="<?php /*echo $this->createUrl("classes/zhixue_student");*/?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 关联智学网考号
- </a><?php /*}*/?>
- <a class="btn btn-success btn-sm" href="<?php /*echo $this->createUrl('studentinfo/schoolcard');*/?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 导入学校准考证号
- </a>
- --><?php /*}*/?>
- <!--
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('classes/resetpwd');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 重置学生密码
- </a>
- <?php if(isset($waitStudent) && $waitStudent>0):?>
- <a class="btn btn-success btn-sm fr" href="<?php echo $this->createUrl('studentinfo/waitlist');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 待分班学生(<?php echo $waitStudent?>)
- </a>
- <?php endif;?>
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('checkstudent/index');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 学生账号检测
- </a>
- <?php if(Yii::app()->params['section']==1):?>
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('studentinfo/target');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 目标院校管理
- </a>
- <?php endif;?>
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('studentinfo/level');?>">
- 学生能力等级
- </a>
- -->
- </div>
- </div>
- <?php endif;?>
- </div>
- <div class="clearfix">
- <div class="fl left">
- <table id="dynamic-table" class="table table1 table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <thead>
- <tr>
- <th>姓名</th>
- <th>身份证号</th>
- <th>班级</th>
- <th id="my_sort" class="sorting" onclick="student_sort(<?php if(empty($sort)){echo 1;}else{echo $sort;}?>)">学号</th>
- <th>班级序号</th>
- <th>登录账号</th>
- <th>准考证</th>
- <th>学校准考证</th>
- <?php if($use_zhixue)
- {?>
- <th>智学网准考证</th>
- <?php }?>
- <?php
- if(isset($studentExtend)){
- foreach ($studentExtend as $key=>$val){
- if($val['is_enable']==1){
- echo '<th>'.$val['field_mean'].'</th>';
- }
- }
- }
- ?>
- <th>性别</th>
- <th>是否为在籍生</th>
- <!--<th>创建时间</th>-->
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $actionArr=array();
- $actionMsgArr=array();
- if(!empty($userList)):foreach($userList as $ul):
- $actionArr[]=$ul['student_id'];
- $actionMsgArr[$ul['student_id']]['stu_name'] = $ul['realname'];
- $actionMsgArr[$ul['student_id']]['grade'] = $ul['grade'];
- $actionMsgArr[$ul['student_id']]['class_id'] = $ul['class_id'];
- ?>
- <tr>
- <td><?php echo $ul['realname'];?></td>
- <td><?php echo $ul['id_number'];?></td>
- <td><?php
- echo $ul['class_name'];
- $classList=array();
- $subjectList=array();
- if(isset($student_class[$ul['student_id']])){
- foreach ($student_class[$ul['student_id']] as $class){
- $classList[]=$class['class_name'];
- if($class['subject']){
- $subjectList[]=implode(',',$class['subject']);
- }
- }
- }
- if($classList){
- $str="所在教学班:".implode(';',$classList);
- if($subjectList){
- $str.="<br>所选学科:".implode(';',$subjectList);
- }
- echo '<div class="tooltipclass"> <img src="/images/icon-warning-red.png"><span class="tooltiptext">'.$str.'</span></div>';
- }
- ?>
- </td>
- <td><?php echo $ul['userno'];?></td>
- <td><?php echo $ul['serial_number'];?></td>
- <td><?php echo $ul['username'];?></td>
- <td><?php echo isset($ul['student_card'])?$ul['student_card']:'';?></td>
- <td><?php echo isset($ul['school_student_card'])?$ul['school_student_card']:'';?></td>
- <?php if($use_zhixue)
- {?>
- <td><?php echo isset($ul['zhixue_student_card'])?$ul['zhixue_student_card']:'';?></td>
- <?php }?>
- <?php
- if(isset($studentExtend)){
- foreach ($studentExtend as $key=>$val){
- if($val['is_enable']==1){
- if(isset($ul[$key])){
- echo '<td>'.$ul[$key].'</td>';
- }else{
- echo '<td></td>';
- }
- }
- }
- }
- ?>
- <td><?php if($ul['sex'] == 1){echo '男';}else{echo '女';}?></td>
- <td><?php if($ul['is_outer'] == 1){echo '否';}else{echo '是';}?></td>
- <!--<td><?php echo date('Y-m-d H:i:s',$ul['add_time']);?></td>-->
- <td>
- <?php if($ul['status'] == 0):?>
- <span class="label label-sm label-success">有效</span>
- <?php else:?>
- <span class="label label-sm label-warning">无效</span>
- <?php endif;?>
- </td>
- <td style="min-width:114px">
- <?php
- $ac = $ul['student_id']
- ?>
- <div class="hidden-sm hidden-xs btn-group">
- <span class="iconfont addbx click-sc" title="编辑" onclick="javascript:location.href='<?php echo $this->createUrl('studentinfo/edit', array('stid' => $ac)); ?>'"></span>
- <span class="iconfont addbx click-delete delStudent" title="删除" studentId="<?php echo $ac; ?>"></span>
- <span class="iconfont addbx click-sc changeStudent" title="学生转班" studentId="<?php echo $ac; ?>" grade="<?php echo isset($actionMsgArr[$ac]['grade']) ? $actionMsgArr[$ac]['grade'] : ''; ?>" realname="<?php echo isset($actionMsgArr[$ac]['stu_name']) ? $actionMsgArr[$ac]['stu_name'] : ''; ?>" classId="<?php echo isset($actionMsgArr[$ac]['class_id']) ? $actionMsgArr[$ac]['class_id'] : ''; ?>"></span>
- </div>
- <div class="hidden-md hidden-lg">
- <div class="inline pos-rel">
- <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown" data-position="auto">
- <i class="ace-icon fa fa-caret-down icon-only bigger-120"></i>
- </button>
- <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
- <li>
- <a class="tooltip-success green" data-rel="tooltip" title="编辑" href="<?php echo $this->createUrl('studentinfo/edit', array('stid' => $ac)); ?>">编辑</a>
- </li>
- </ul>
- </div>
- </div>
- <?php
- ?>
- </td>
- </tr>
- <?php endforeach;else:?>
- <?php if($use_zhixue)
- {?>
- <tr><td colspan="11">暂无数据!</td></tr>
- <?php }else{
- ?>
- <tr><td colspan="10">暂无数据!</td></tr>
- <?php }?>
- <?php endif;?>
- </tbody>
- </table>
- </div>
- <!-- <div class="fl right">
- <table class="table2 table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <thead>
- <tr><th>操作</th></tr>
- </thead>
- <?php
- if($actionArr){
- foreach ($actionArr as $ac){
- if($ac) {
- ?>
- <tr>
- <td>
- <div class="hidden-sm hidden-xs btn-group">
- <span class="iconfont addbx click-sc" title="编辑"
- onclick="javascript:location.href='<?php echo $this->createUrl('studentinfo/edit', array('stid' => $ac)); ?>'"></span>
- <span class="iconfont addbx click-delete delStudent" title="删除"
- studentId="<?php echo $ac; ?>"></span>
- <span class="iconfont addbx click-sc changeStudent" title="学生转班"
- studentId="<?php echo $ac; ?>" grade="<?php echo isset($actionMsgArr[$ac]['grade'])?$actionMsgArr[$ac]['grade']:'';?>" realname="<?php echo isset($actionMsgArr[$ac]['stu_name'])?$actionMsgArr[$ac]['stu_name']:'';?>" classId="<?php echo isset($actionMsgArr[$ac]['class_id'])?$actionMsgArr[$ac]['class_id']:'';?>"></span>
- </div>
- <div class="hidden-md hidden-lg">
- <div class="inline pos-rel">
- <button class="btn btn-minier btn-yellow dropdown-toggle"
- data-toggle="dropdown" data-position="auto">
- <i class="ace-icon fa fa-caret-down icon-only bigger-120"></i>
- </button>
- <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
- <li>
- <a class="tooltip-success green" data-rel="tooltip"
- title="编辑"
- href="<?php echo $this->createUrl('studentinfo/edit', array('stid' => $ac)); ?>">编辑</a>
- </li>
- </ul>
- </div>
- </div>
- </td>
- </tr>
- <?php
- }else{
- echo '<tr><td>--</td></tr>';
- }
- }
- }
- ?>
- </table>
- </div> -->
- </div>
- <?php if(!empty($page_total)):?>
- <div class="row">
- <div class="col-xs-7">
-
- </div>
- <div class="col-xs-5">
- <div class="dataTables_paginate paging_simple_numbers">
- <?php
- $this->widget('CLinkPager', array(
- 'header' => '',
- 'firstPageLabel'=> '首页',
- 'lastPageLabel' => '末页',
- 'prevPageLabel' => '上一页',
- 'nextPageLabel' => '下一页',
- 'pages' => $pages,
- 'maxButtonCount'=> 5,
- ));
- echo '共:'.$page_total.'条';
- ?>
- </div>
- </div>
- </div>
- <?php endif;?>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <script src="/js/layer/layer.js"></script>
- <script type="text/javascript">
- // 初始化学号排序图标
- $(function(){
- initHeight();
- function initHeight(){
- $('.table1 tr').each(function(index,val){
- $('.table2 tr').eq(index).height($(val).height());
- console.log($(val).height())
- })
- }
- $(window).resize(function(){
- initHeight();
- })
- var init_sort = '<?php echo $sort;?>';
- if ($.trim(init_sort) == '') {
- $('#my_sort').attr('class','sorting');
- } else if ($.trim(init_sort) == '1') {
- $('#my_sort').attr('class','sorting_desc');
- } else if ($.trim(init_sort) == '2') {
- $('#my_sort').attr('class','sorting_asc');
- }
- $(".diy_select1").click(function(){
- var grade = $(".diy_select1 input[class=diy_select_input1]").val();
- if(grade==0)
- {
- $(".diy_select input[class=diy_select_input]").val(0);
- $(".diy_select_txt").text("请选择班级");
- $(".diy_select_list li").text("请选择班级");
- $(".diy_select_list li").attr("val",0);
- }
- $.post("<?php echo $this->createUrl('classes/getclass');?>",{grade_id:grade,filter_hide:1},function(data){
- var m = JSON.parse(data);
- if(m.status==0)
- {
- $(".diy_select input[class=diy_select_input]").val(0);
- $(".diy_select_txt").text("请选择班级");
- $(".diy_select_list").empty();
- var html = '<li val="0">请选择班级</li>';
- $(".diy_select_list").html(html);
- }else{
- $(".diy_select input[class=diy_select_input]").val(0);
- $(".diy_select_txt").text("请选择班级");
- $(".diy_select_list").empty();
- var html = '<li val="0">请选择班级</li>';
- $.each(m.result,function(i,n){
- html+='<li val="'+ n.class_id+'">'+ n.class_name+'</li>';
- });
- $(".diy_select_list").html(html);
- }
- });
- });
- });
- // ajax获取班级
- function getClass(num) {
- if (!num) return;
- $.post("<?php echo $this->createUrl('classes/ajaxclass');?>",{smid:num},function(data){
- var p = eval("("+data+")");
- if (p.flag) {
- var html;
- var cityObj = $("#class_id");
- cityObj.show();
- cityObj.empty();
- if (p.classList.length > 0){
- html = "<option value=''>请选择班级</option>";
- $.each(p.classList,function(i,n){
- html += "<option <?php if(!empty($class_id) && $class_id == "+n.class_id+"){echo 'selected';}?> value='"+n.class_id+"'>" + n.class_name + "</option>";
- });
- } else {
- html = "<option value=''>暂无班级</option>";
- }
- cityObj.append(html);
- } else {
- alert("获取数据失败!");
- }
- });
- }
-
- // 缴费操作
- function cancelPay(uid){
- if (!uid) return;
- layer.open({
- type: 2,
- skin: 'layui-layer-lan',
- title: '设置用户缴费',
- fix: false,
- shadeClose: true,
- maxmin: true,
- area: ['1000px', '375px'],
- content: "<?php echo $this->createUrl('payment/add');?>/stid/"+uid,
- });
- }
-
- // 学号排序操作
- function student_sort(sum){
- /*var obj_sort = $('#my_sort');
- if (sum == 1) {
- obj_sort.attr('class','sorting_asc');
- } else if (sum == 2) {
- obj_sort.attr('class','sorting_desc');
- } else {
- obj_sort.attr('class','sorting');
- }*/
-
- window.location.href = '<?php echo $this->createUrl('studentinfo/index');?>'+'/sort/'+sum;
- }
-
- //转班获取班级
- function getClassByGrade(grade){
- var class_id = $("#zhuanban-class").val();
- $.post("<?php echo $this->createUrl('classes/getclass');?>",{grade_id:grade,filter_hide:1},function(data){
- var class_html = '';
- data = eval('(' + data + ')');
- if(data.status == 1){
- class_html += '<select class="select-class">';
- for(var i in data.result){
- if(class_id == data.result[i].class_id){
- class_html += '<option selected="selected" value="'+data.result[i].class_id+'">'+data.result[i].class_name+'</option>';
- }else{
- class_html += '<option value="'+data.result[i].class_id+'">'+data.result[i].class_name+'</option>';
- }
- }
- class_html += '</select>';
- }
- $(".change-stu-class").html(class_html);
- });
- }
- $("body").delegate(".all-select-option","change",function(){
- var grade = $(this).val();
- getClassByGrade(grade);
-
- });
-
- //单个学生转班
- $("body").delegate(".changeStudent","click",function(){
- var realname = $(this).attr("realname");
- var classId = $(this).attr("classId");
- var grade = $(this).attr("grade");
- var student_id = $(this).attr("studentId");
- // var checked1 = '';
- // var checked2 = '';
- // var checked3 = '';
- // if(grade == 1){
- // var checked1 = "checked='checked'";
- // }else if(grade == 2){
- // var checked2 = "checked='checked'";
- // }else if(grade == 3){
- // var checked3 = "checked='checked'";
- // }
- $("#zhuanban-class").val(classId);
- var str = '<div id="hgc_editor" style="padding:20px 35px;">';
- str += '<div>转移学生到:';
- <?php foreach(Yii::app()->params['grade_config'] as $k=>$v):?>
- if(grade == <?php echo $v['id']?>){
- var check_str = "checked='checked'";
- }else{
- var check_str = "";
- }
- str += '<input type="radio" name="change-grade[]" value="<?php echo $v['id'];?>" '+check_str+' class="all-select-option" ><span class="selcet-class-type"><?php echo $v['grade_name'];?></span>';
- <?php endforeach;?>
- str += '</div>'
- str += '<div>';
- str += realname+' -------';
- str += '<span class="change-stu-class"></span>'
- str += '</div>';
- str += ' </div>';
- layer.open({
- title:'学生转班'
- ,area:'500px'
- ,type: 1
- ,offset: 'auto'
- ,content: str
- ,btn: ['确定','取消']
- ,btnAlign: 'c' //按钮居中
- ,shade: 0.6 //不显示遮罩
- ,yes:function(){
- var class_id = $(".select-class").val();
- if(class_id){
- var class_array = [];
- class_array.push(student_id);
- var semester_id = '<?php echo $this->semesterId;?>';
- $.post("<?php echo $this->createUrl('classes/copy');?>"+"?cid="+class_id,{cid:class_id,class_array:class_array,semester_id:semester_id,class_id:classId,is_ajax:1},function(data){
- data = eval('(' + data + ')');
- if(data.status == 1){
- msg = "操作成功";
- icon = 6;
- layer.closeAll();
- layer.alert(msg, {icon: icon}, function(index){
- // layer.close(index);
- window.location.reload();
- });
- // window.location.reload();
- }
- });
- }
- }
- });
- if(grade){
- getClassByGrade(grade);
- }
- });
- </script>
|