123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <style>
- label{font-weight:100 !important;}
- th{text-align: center}
- </style>
- <link rel="stylesheet" href="/css/cylet.css" />
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
- <!-- 导航栏结束-->
- <div class="" style="width: 95%;margin:0 auto">
- <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
- <div class="row" style="margin:10px auto;padding-left:0">
- <form action="" method="get" name="cylet" id="cyletForm" style="padding-left: 0">
- <input type="text" name="exam_name" value="<?php echo $examName;?>">
- <button type="submit">搜索</button>
- </form>
- </div>
- <table id="dynamic-table"
- class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
- style="font-size:12px">
- <thead>
- <tr>
- <th>考试名称</th>
- <th>学科</th>
- <th>考试日期</th>
- <th>提交时间</th>
- <th width="12%">操作</th>
- </tr>
- </thead>
- <tbody>
- <?php
- if(isset($dataList) && !empty($dataList)):
- foreach ($dataList as $val):
- ?>
- <tr >
- <td><?php echo $val['exam_name'];?></td>
- <td ><?php echo $val['subject_name'] ?></td>
- <td><?php echo $val['exam_date']?></td>
- <td><?php echo date('Y-m-d H:i:s',$val['create_time']) ?></td>
- <td>
- <?php
- if($val['status']==1){
- ?>
- <span class="iconfont addbx restore" exam_group_id="<?php echo $val['exam_group_id']?>" exam_name="<?php echo $val['exam_name']?>" exam_date="<?php echo $val['exam_date']?>" style="background-color: red;font-size:12px;font-weight:normal" title="还原" >还原</span>
- <span class="iconfont addbx restore_back" exam_group_id="<?php echo $val['exam_group_id']?>" exam_name="<?php echo $val['exam_name']?>" exam_date="<?php echo $val['exam_date']?>" style="background-color: #2977ff;font-size:12px;font-weight:normal" title="退回" >退回</span>
- <?php
- }elseif($val['status']==2){
- ?>
- <span class="iconfont addbx " style="background-color: gray;font-size:12px;font-weight:normal" title="已还原" >已还原</span>
- <?php
- }
- ?>
- </td>
- </tr>
- <?php endforeach;endif;?>
- <?php
- if(isset($pageTotal) && $pageTotal>1){
- $StartPage=$page-5;
- $EndPage=$page+5;
- if($StartPage<1){
- $StartPage=1;
- }
- if($EndPage>$pageTotal){
- $EndPage=$pageTotal;
- }
- ?>
- <tr>
- <td colspan="10" class="page">
- <div class="row" style="padding-top:10px;">
- <div class="col-xs-7">
-
- </div>
- <div class="col-xs-5" style="font-size: 16px">
- <div class="dataTables_paginate paging_simple_numbers" style="vertical-align:sub;">
- <ul id="yw0" class="yiiPager">
- <?php
- if($page>1){
- echo '<li class="previous"><a href="'.$this->createUrl('print/restore').'?page='.($page-1).'&exam_name='.$examName.'">上一页</a></li>';
- }
- for($i=$StartPage;$i<=$EndPage;$i++){
- $url=$this->createUrl('print/restore')."?page=".$i."&exam_name=".$examName;
- if($page==$i){
- echo '<li class="page selected"><a href="#">'.$i.'</a></li>';
- }else{
- echo '<li class="page"><a href="'.$url.'">'.$i.'</a></li>';
- }
- }
- if($page<$pageTotal){
- echo '<li class="next"><a href="'.$this->createUrl('print/restore').'?page='.($page+1).'&exam_name='.$examName.'">下一页</a></li>';
- }
- ?>
- </ul>
- </div>
- </div>
- </div>
- </td>
- </tr>
- <?php }?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <script>
- $('.restore').click(function(){
- var examId=$(this).attr('exam_group_id'),
- examDate=$(this).attr('exam_date'),
- examName=$(this).attr('exam_name');
- msg="<b>你确定要还原该场考试?</b><br>考试名称:"+examName+" <br>考试日期:"+examDate;
- layer.msg(msg, {
- time: 0,
- icon:0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- layer.msg('正在发送申请,请稍候。。。。。',{time:0});
- $.post('<?php echo $this->createUrl("print/restoreExam");?>',{examId:examId},function(data){
- var obj = JSON.parse(data);
- layer.closeAll();
- if (obj.status == 1) {
- layer.msg('操作成功!',{
- icon: 1
- }, function(){
- layer.closeAll();
- window.location.reload()
- });
- } else {
- layer.msg(obj.msg);
- }
- });
- }
- });
- });
- $('.restore_back').click(function(){
- var examId=$(this).attr('exam_group_id'),
- examDate=$(this).attr('exam_date'),
- examName=$(this).attr('exam_name');
- msg="<b>你确定要退回该场考试的还原申请?</b><br>考试名称:"+examName+" <br>考试日期:"+examDate;
- layer.msg(msg, {
- time: 0,
- icon:0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- layer.msg('正在发送申请,请稍候。。。。。',{time:0});
- $.post('<?php echo $this->createUrl("print/restoreApplyBack");?>',{examId:examId},function(data){
- var obj = JSON.parse(data);
- layer.closeAll();
- if (obj.status == 1) {
- layer.msg('操作成功!',{
- icon: 1
- }, function(){
- layer.closeAll();
- window.location.reload()
- });
- } else {
- layer.msg(obj.msg);
- }
- });
- }
- });
- });
- </script>
|