123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615 |
- <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">
- <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>
- <?php if(Yii::app()->session['coachInfo']['leader']==1){ ?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("school/add");?>"' 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("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="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/waitlist');?>">
- <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{ switch($grade_id){
- case 1:echo '高一';break;
- case 2:echo '高二';break;
- case 3:echo '高三';break;
- }}?></div>
- <div class='diy_select_btn1'></div>
- <ul class='diy_select_list1'>
- <li val="0" >请选择历史年级</li>
- <li val="1">高一</li>
- <li val="2">高二</li>
- <li val="3">高三</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">
- <input type='hidden' id="class_id" name="search_type" class='diy_select_input2' value="<?php if($search_type==1||!$search_type ){echo 1;}if($search_type==2 ){echo 2;}if($search_type==3 ){echo 3;}if($search_type==4 ){echo 4;}if($search_type==5 ){echo 5;}?>"/>
- <div class='diy_select_txt2'><?php if($search_type==1 ||!$search_type){echo '姓名';}if($search_type==2 ){echo '登录账号';}if($search_type==3 ){echo '系统准考证';}if($search_type==4 ){echo '学校准考证';}if($search_type==5 ){echo '智学网准考证';}?></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>
- <?php if($use_zhixue)
- {?>
- <li val="5">智学网准考证</li>
- <?php }?>
- </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: 40%">
- <div id="dynamic-table_filter" class="dataTables_filter mt5">
- <a class="btn btn-success btn-sm fr" href="">
- <i class="fa fa-plus" style="font-style: normal;"></i> 添加到新班级(<span class="checked_count">0</span>)
- </a>
- </div>
- </div>
- <?php endif;?>
- </div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <thead>
- <tr>
- <th><input type="checkbox" name="checkall" value="1"></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 }?>
- <th>性别</th>
- <th>是否为在籍生</th>
- <!--<th>创建时间</th>-->
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($userList)):foreach($userList as $ul):?>
- <tr>
- <td><input type="checkbox" class="assign" name="assign" value="<?php echo $ul['student_id']?>"></td>
- <td><?php echo $ul['realname'];?></td>
- <td><?php echo $ul['class_name'];?></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 }?>
- <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>
- <?php if($this->schoolManager->isCurrentSemester($semester_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'=>$ul['student_id']));?>'"></span>
-
- <!--<span title="踢出" class="iconfont addbx click-sc kick" studentId="<?php echo $ul['student_id'];?>"></span>-->
- <span class="iconfont addbx click-delete delStudent" title="删除" studentId="<?php echo $ul['student_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'=>$ul['student_id']));?>">编辑</a>
- </li>
- </ul>
- </div>
- </div>
- <?php else:?>
- --
- <?php endif;?>
- </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>
- <?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>
- <style>
- /*弹出层*/
- .confirmbox {
- background: #fff;
- border: 1px solid #cccccc;
- border-radius: 3px;
- padding: 40px 40px 30px;
- text-align: center;
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- z-index: 99;
- }
- .confirmbox-mask {
- background: rgba(0, 0, 0, .7);
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- z-index: 99;
- position: fixed;
- }
- button {
- border: none;
- background: #009965;
- width: 80px;
- height: 26px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- }
- button.save {
- display: block;
- margin: 40px auto;
- }
- .confirmbox .confirmbox-btns {
- margin-top: 40px;
- }
- .class-modal {
- width: 500px;
- background: #fff;
- // border-radius: 5px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- height:170px;
- }
- .class-modal-head {
- font-size: 14px;
- background:#2977ff;
- color:#fff;
- height:25px;
- line-height: 25px;
- padding: 0 0 0 15px;
- }
- .class-modal-body {
- overflow: auto;
- padding:15px;
- }
- .class-modal-body .classes {
- margin-bottom: 20px;
- }
- .class-modal-body .classes > div {
- display: inline-block;
- max-width: 640px;
- vertical-align: top;
- }
- .class-modal-body .classes a {
- text-decoration: none;
- display: inline-block;
- margin: 0 5px 5px;
- color: #136bfb;
- font-size: 14px;
- }
- .class-modal-body .classes a.active {
- color: #fc091b
- }
- .class-modal .icon-close{
- position: absolute;
- right: 20px;
- top: 2px;
- color:#fff;
- }
- .c-red {
- color: #CC3300
- }
- .avg{
- margin:0 10px;
- }
- .class_btn{
- text-align: center;
- }
- .confirmbox-mask p{
- word-wrap : break-word ;
- }
- .icon-close{
- cursor: pointer;
- }
- .model-input{
- padding:5px;
- margin-top:10px;
- }
- .model-input label{
- margin:0 15px;
- }
- </style>
- <!-- 弹窗 -->
- <div class="confirmbox-mask" style="display: none" id="assignClass">
- <div class="class-modal">
- <i class="icon close_1 icon-close">×</i>
- <div class="class-modal-head">添加到新班级(<span class="checked_count">0</span>)</div>
- <div class="class-modal-body">
- <div class="model-input first_input">
- 请先选择班级:
- <select name="toGrade" class="toGrade">
- <option value="0">请选择年级</option>
- <option value="1">高一</option>
- <option value="2">高二</option>
- <option value="3">高三</option>
- </select>
- <select name="toClass" class="toClass">
- <option value="0">请选择班级</option>
- </select>
- </div>
- </div>
- <p class="class_btn">
- <button type="button" class="assign_submit">确定</button>
- <button type="button" class="close_1">取消</button>
- </p>
- </div>
- </div>
- <script src="/js/layer/layer.js"></script>
- <script type="text/javascript">
- // 初始化学号排序图标
- $(function(){
- 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('studentinfo/getprevsemesterclassbygrade');?>",{grade_id:grade},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);
- }
- });
- });
- //选择学生
- $('input[name=assign]').click(function(){
- var count=parseInt($('input[name=assign]:checked').length);
- var total=parseInt($('input[name=assign]').length);
- $('.checked_count').html(count);
- if(count==total){
- $('input[name=checkall]').attr('checked',true);
- }
- if(count==0){
- $('input[name=checkall]').attr('checked',false);
- }
- });
- $('.btn-success').click(function(){
- var count=parseInt($('.checked_count').html());
- console.log(count);
- if(count==0){
- layer.msg('请先选择要分配的学生');
- return false;
- }
- $('#assignClass').show();
- return false;
- });
- $('input[name=checkall]').click(function(){
- if($(this).is(':checked')){
- $('.assign').prop('checked',true);
- var total=parseInt($('input[name=assign]').length);
- $('.checked_count').html(total)
- }else{
- $('.assign').prop('checked',false);
- }
- });
- $('.close_1').click(function(){
- $('#assignClass').fadeOut();
- });
- $('.toGrade').change(function(){
- var grade=$(this).val();
- getClass(grade);
- });
- //提交分配
- $('.assign_submit').click(function(){
- var student=new Array();
- $('.assign').each(function(){
- if($(this).is(':checked')){
- student.push($(this).val());
- }
- })
- var class_id=$('.toClass').val();
- if(class_id==0){
- layer.msg('请先选择班级');
- return false;
- }
- assign(student,class_id);
- });
- });
- function assign(student,class_id){
- if(student.length==0 || class_id==''){
- return false;
- }
- $.ajax({
- url:'<?php echo $this->createUrl('studentinfo/assignstudent')?>',
- type:'POST',
- dataType:'json',
- data:{'class_id':class_id,'student_id':student},
- success:function(res){
- if(res.status==1){
- layer.msg('分班成功');
- $('#search').click();
- }else{
- layer.msg('分班失败');
- }
- }
- });
- }
- // ajax获取班级
- function getClass(num) {
- if (!num) return;
- $.post("<?php echo $this->createUrl('classes/getclass');?>",{grade_id:num},function(data){
- var p = JSON.parse(data);
- if (p.status) {
- var html;
- if (p.result.length > 0){
- html = "<option value=''>请选择班级</option>";
- $.each(p.result,function(i,n){
- html += "<option value='"+n.class_id+"'>" + n.class_name + "</option>";
- });
- } else {
- html = "<option value=''>暂无班级</option>";
- }
- $('.toClass').html(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;
- }
- </script>
|