123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <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 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('print/index');?>">
- <div class="col-xs-10">
- <div class="dataTables_length">
- <select class="form-control" name="status">
- <option value="">选择状态</option>
- <option value="1" <?php if($status==1){echo 'selected';}?>>已完成</option>
- <option value="0" <?php if($status==='0'){echo 'selected';}?>>未打印</option>
- <option value="2" <?php if($status==2){echo 'selected';}?>>正在编辑</option>
- <option value="3" <?php if($status==3){echo 'selected';}?>>正在打印</option>
- </select>
-
- <label><input type="text" class="form-control input-sm" placeholder="请输入打印项目名称!" name="printName" value="<?php if(!empty($getName)){echo $getName;}?>"></label>
-
- <button class="btn btn-minier btn-primary">搜索</button>
- </div>
- </div>
- </form>
- </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>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($printList)):foreach($printList as $cl):?>
- <tr>
- <td><?php echo $cl['print_name'];?></td>
- <td><?php echo $cl['class_name'];?></td>
- <td><?php if(!empty($cl['add_time'])){ echo date('Y-m-d H:i:s',$cl['add_time']);}?></td>
- <td><?php if(!empty($cl['print_time'])){ echo date('Y-m-d H:i:s',$cl['print_time']);}?></td>
- <td>
- <a href="<?php echo $this->createUrl('print/studentsispslist?classId='. $cl['class_id'] .'&examId='. $cl['exam_id']); ?>"><?php if ($cl['is_checked'] == 0): ?><span style="cursor: pointer;" class="label label-sm label-pink arrowed-right">检查</span><?php else: ?><span style="cursor: pointer;" class="label label-sm label-success">已检查</span><?php endif; ?></a>
- <?php if($cl["is_print"] == 1){?><span class="label label-sm label-success">已打印</span><?php }else{?><span style="cursor:pointer" title="点击打印" class="label label-sm label-pink arrowed-right" onclick="print('<?php echo $cl['class_id'];?>','<?php echo $cl['exam_id'];?>','<?php echo $cl['type'];?>');">打印</span><?php }?>
- </td>
- </tr>
- <?php endforeach;else:?>
- <tr><td colspan="5">暂无数据!</td></tr>
- <?php endif;?>
- </tbody>
- </table>
- <?php if(!empty($page_total)):?>
- <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>
- <?php endif;?>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- function print(cid,eid,tid){
- //alert(cid+'-'+eid+'-'+tid);return;
- if (!cid || !eid) return false;
- if(confirm('您确定要打印嘛!')) {
- /*$.post("<?php echo $this->createUrl('print/ajaxupdate');?>",{cid:cid,eid:eid,tid:tid},function(obj){
- if(obj.flag){
- alert('提交打印成功!');
- location.reload();
- } else {
- //alert('打印失败!');
- alert(obj.msg);
- }
- },'json');*/
- $.ajax({
- url:"<?php echo $this->createUrl('print/ajaxupdate');?>",
- type:"post",
- data:{cid:cid,eid:eid,tid:tid},
- dataType: "json",
- beforeSend:function(){
- // 发送请求显示打印中
- layer.msg('打印中', {icon: 16,time: 20000});
- },
- success:function(obj){
- var index = layer.msg();
- layer.close(index);
-
- if (obj.success == 1) {
- alert('提交打印成功!');
- location.reload();
- } else {
- alert(obj.message);
- }
-
- /*if(obj.flag){
- alert('提交打印成功!');
- location.reload();
- } else {
- alert(obj.msg);
- }*/
- },
- complete:function(){
- var index = layer.msg();
- layer.close(index);
- },
- error:function(){
- var index = layer.msg();
- layer.close(index);
- }
- });
- }
-
- }
- </script>
|