123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- <div class="main-content-inner">
- <div class="breadcrumbs" id="breadcrumbs">
- <ul class="breadcrumb">
- <li>
- <i class="ace-icon fa fa-home home-icon"></i>
- <a>首页</a>
- </li>
- <li>
- <a>学生管理</a>
- </li>
- <li class="active">学生列表</li>
- </ul>
- </div>
- <div class="page-content">
- <div class="row">
- <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('userinfo/index');?>">
- <div class="col-xs-10">
- <div class="dataTables_length margin-zy">
- <select class="form-control" name="years_id" onchange="changeYears(this.value);">
- <option value="">请选择年级</option>
- <?php if(!empty($yearsInfo)):foreach($yearsInfo as $loop):?>
- <option <?php if(!empty($years_id) && $years_id == $loop->years_id){echo 'selected';}?> value="<?php echo $loop->years_id;?>"><?php echo $loop->years_name;?></option>
- <?php endforeach;endif;?>
- </select>
-
- <select class="form-control" id="class_id" name="class_id" <?php if(empty($class_id)){echo 'style="display:none;"';}?>>
- <?php if(!empty($classInfo)):foreach($classInfo as $lp):?>
- <option <?php if(!empty($class_id) && $class_id == $lp->class_id){echo 'selected';}?> value="<?php echo $lp->class_id;?>"><?php echo $lp->class_name;?></option>
- <?php endforeach;endif;?>
- </select>
- <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>
- </div>
- </div>
- </form>
- <div class="col-xs-2">
- <div id="dynamic-table_filter" class="dataTables_filter">
- <a class="btn btn-primary btn-sm" href="<?php echo $this->createUrl('userinfo/add');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 添加学生
- </a>
- </div>
- </div>
- </div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <thead>
- <tr>
- <th>姓名</th>
- <th>学号</th>
- <th>登录账号</th>
- <th>年级</th>
- <th>班级</th>
- <th>创建时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($userList)):foreach($userList as $ul):?>
- <tr>
- <td><?php echo $ul['realname'];?></td>
- <td><?php echo $ul['userno'];?></td>
- <td><?php echo $ul['username'];?></td>
- <td><?php echo $ul['years_name'];?></td>
- <td><?php echo $ul['class_name'];?></td>
- <td><?php echo date('Y-m-d H:i:s',$ul['add_time']);?></td>
-
- <td>
- <div class="hidden-sm hidden-xs action-buttons">
- <a class="green" title="编辑" href="<?php echo $this->createUrl('userinfo/edit',array('uuid'=>$ul['uuid']));?>">编辑
- <!-- <i class="ace-icon fa fa-pencil bigger-130"></i> -->
- </a>
- <a class="red" title="缴费" onclick="cancelPay('<?php echo $ul['uuid'];?>')" href="javascript:void(0)">缴费
- <!-- <i class="ace-icon fa fa-trash-o bigger-130"></i> -->
- </a>
- </div>
- </td>
- </tr>
- <?php endforeach;endif;?>
- </tbody>
- </table>
- <div class="row">
- <div class="col-xs-6">
-
- </div>
- <div class="col-xs-6">
- <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>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <script src="/js/layer/layer.js"></script>
- <script type="text/javascript">
- // ajax获取班级
- function changeYears(num) {
- if (!num) return;
- $.post("<?php echo $this->createUrl('classes/ajaxclass');?>",{yid: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){//alert(uid);return;
- if (!uid) return;
- layer.open({
- type: 2,
- skin: 'layui-layer-lan',
- title: '设置用户缴费信息',
- fix: false,
- shadeClose: true,
- maxmin: true,
- area: ['1000px', '500px'],
- content: "<?php echo $this->createUrl('payment/add');?>/uuid/"+uid,
- });
-
- }
- </script>
|