123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- <style>
- .nav-btns{
- margin: 10px 20px;
- }
- .nav-btns>a{
- display: inline-block;
- width: 120px;
- border: 1px solid #2977ff;
- text-align: center;
- line-height: 30px;
- }
- .active{
- color: #fff;
- background-color: #2977ff;
- }
- .btn-garder{
- margin-right: 10px;
- display: inline-block;
- width: 100px;
- border: none;
- text-align: center;
- line-height: 30px;
- color: #fff;
- background-color: #2977ff;
- }
- .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;
- }
- .btn_area button {
- border: none;
- background: #2977ff;
- width: 111px;
- height: 36px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- }
- .btn_area button.save {
- display: block;
- margin: 40px auto;
- }
- .confirmbox .confirmbox-btns {
- margin-top: 40px;
- }
- .class-modal-body .classes {
- margin-bottom: 10px;
- }
- .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: #2977ff;
- font-size: 14px;
- }
- .class-modal-body .classes a.active {
- color: #fc091b
- }
- .class-modal .icon-close{
- position: absolute;
- right: 20px;
- top: 20px;
- }
- .class-modal-1 {
- width: auto;
- background: #fff;
- border-radius: 5px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .class-modal-head-1 {
- font-size: 14px;
- text-align: left;
- color:#fff;
- line-height:30px;
- background: #2977ff;
- padding-left:15px;
- }
- .class-modal-body-1{
- padding:15px;
- }
- .class-modal-body-1 h2,.class-modal-body-1 h3{
- font-size:14px;
- font-weight:normal;
- margin-top:10px;
- }
- .class-modal-body-1 h3 span{
- font-size:10px;
- color:#ccc;
- }
- .class-modal-body-1 label{
- display: inline-block;
- font-weight: normal;
- margin-right: 15px;
- height:30px;
- position: relative;
- }
- .class-modal-1 .icon-close-1{
- position: absolute;
- right: 10px;
- top:5px;
- }
- .class-modal-1 .class_area{
- height:115px;
- border:1px solid #ccc;
- padding:5px;
- overflow-y: auto;
- margin-bottom:15px;
- }
- .class-modal-1 .checkAll{
- position:absolute;
- right:5px;
- top:115px;
- }
- .class-modal-1 .subsection{
- }
- .class-modal-1 .btn p{color:#000;}
- .class-modal-1 .btn_area{
- padding: 10px;
- border-top: 1px solid #aab6aa;
- margin-top:10px;
- }
- .class-modal-1 .btn_area p{
- display: inline-block;
- }
- .class-modal-1 .btn_area button{
- margin-left:5px;
- }
- .class-modal-1 .btn_area .cancel{
- background: #fff;
- color:#000;
- border:1px solid #666;
- }
- .c-red-1 {
- color: #CC3300;
- font-size:10px;
- display: inline-block;
- position:absolute;
- left:15px;
- top:18px;
- }
- .pdp-con .pop-opt-con{border-top: 1px solid #ddd;padding-top: 20px;}
- .tit-sub-intro span{font-size: 12px;}
- .notice-btn{background:#CC3300;color:#fff;font-size: 12px;font-weight: normal }
- </style>
- <script type="text/javascript">
- function in_array(search, array){
- for(var i in array){
- if(array[i]==search){
- return true;
- }
- }
- return false;
- }
- jQuery(document).ready(function(){
- // 根据年级筛选班级
- jQuery("#grade").change(function(){
- var grade = $(this).val();
- if (!grade) return false;
- jQuery.post(
- '<?php echo $this->createUrl("print/getGradeClass");?>',{"grade": grade},function(data){
- data = JSON.parse(data);
- if(data.success == 1){
- var classObj = $("#class");
- var html = "<option value=''>全部班级</option>";
- classObj.empty();
- $.each(data.message,function(i,n){
- html += "<option value='"+n.class_id+"'>" + n.class_name + "</option>";
- });
- classObj.append(html);
- }
- }
- );
- });
- });
- </script>
- <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/view_production_navigation.php');?>
- <!-- 导航栏结束-->
- <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" id="form1" action="<?php echo $this->createUrl("correct/index");?>">
- <div class="col-xs-12">
- <div class="dataTables_length margin-zy clearfix">
- <select class="form-control" id="grade" name="grade">
- <option value="">年级</option>
- <option value="1" <?php if($grade == 1) echo "selected";?>>高一</option>
- <option value="2" <?php if($grade == 2) echo "selected";?>>高二</option>
- <option value="3" <?php if($grade == 3) echo "selected";?>>高三</option>
- </select>
- <input type="text" class="form-control input-sm" placeholder="请输入打印任务名称" name="name" value="<?php echo $printName;?>">
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
- <span class="red">生成的纠错本仅保留7天,请及时下载/打印</span>
- <span class="fr ">
- <a href="/vue/index.html#/JiuCuoSet" class="btn-garder">生成纠错本</a>
- </span>
- </div>
- </div>
- </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 class="center">
- <input type="checkbox" class="ace selectAll" />
- </th>
- <th>产品名称</th>
- <th>年级</th>
- <th>创建时间</th>
- <th>状态</th>
- <th>已下载/打印的班级数量</th>
- <th >操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($printList)):foreach($printList as $cl):?>
- <tr>
- <td>
- <input type="checkbox" class="ace myselect" value="<?php echo $cl['gp_group_id'];?>">
- </td>
- <td style="max-width:260px">
- <?php
- if($cl['isDown']==0 && $cl['reset_times']==0)
- { echo "<span style='color: #ff0000;font-weight: bold;'>【New】</span>";};
- echo "<a href=".$this->createUrl("correct/resetclass",array("name"=>$cl['name'],"gp_group_id"=>$cl['gp_group_id'])).">{$cl['name']}</a>"
- ?>
- </td>
- <td style="max-width:100px"><?php echo Yii::app()->params['grade_config'][$cl['grade']]['grade_name'];?></td>
- <td><?php echo date('Y-m-d H:i:s',$cl['create_time']);?></td>
- <td>
- <?php
- if($cl['status']==5){
- echo '生成异常';
- }elseif($cl['isCreate']==0){
- echo '排队中';
- }elseif($cl['isAllCreate']==1){
- echo '已生成';
- }else{
- echo '生成中';
- }
- ?>
- </td>
- <td><?php echo $cl['isDown'].'/'.$cl['totalClass'];?></td>
- <td style="width:265px;">
- <a class="iconfont click-sc addbx" aria-hidden="true" title="查看班级" href="<?php echo $this->createUrl('correct/classlist',array('gpGroupId'=>$cl['gp_group_id']))?>">班</a>
- <?php
- if($cl['abnormal'] && $cl['status']==5){
- ?>
- <span class="iconfont notice-btn addbx viewAbnormal" aria-hidden="true" id="<?php echo $cl['gp_group_id']?>" examCount="<?php echo $cl['examGroupIdCount']?>" title="<?php echo $cl['abnormal'] ?>" >查看异常</span>
- <?php
- }
- ?>
- </td>
- </tr>
- <?php endforeach;else:?>
- <tr><td colspan="8">暂无数据!</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>
- <!--上传模板弹窗-->
- <!--发送云印任务弹窗-->
- <div class="confirmbox-mask" id="classModal-1" style="display:none ;">
- <div class="class-modal-1">
- <i class="icon icon-close-1" style="color: white">X</i><div class="class-modal-head-1">异常提示</div>
- <div class="class-modal-body-1">
- <div>
- <span class="abnormal-txt">异常提示:所选班级内:高一1班、高一2班、高一3班 均未参加过所选的4场考试,无法生成产品<br>
- 选择【继续生成】将剔除异常班级生成<br>
- 选择【编辑设置】进入编辑页面,重新设置生成!<br></span>
- </div>
- <div class="btn_area" style="text-align: center;">
- <input type="hidden" name="gpGroupId" value="">
- <button class="cancel">编辑设置</button>
- <button id="proceedCreate" class="proceedCreate">继续生成</button>
- </div>
- </div>
- </div>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <?php include(Yii::app()->basePath.'/views/print/_print.php');?>
- <script src="/js/jquery.ajaxfileupload.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- });
- // 搜索事件
- $("#search").click(function(){
- $("#form1").submit();
- });
- // 全选\反选
- $(".selectAll").click(function(){
- if ($(this).prop("checked")) {
- var s_obj = $(".myselect");
- var s_len = s_obj.length;
- for (var i=0;i<s_len;i++) {
- if (!s_obj[i].disabled) {
- s_obj[i].checked=true;
- }
- }
- } else {
- $(".myselect").prop("checked",false);
- }
- });
- $('.viewAbnormal').click(function () {
- txt=$(this).attr('title');
- number=$(this).attr('examCount');
- id=$(this).attr('id');
- html='异常提示:所选班级内:<span class="red">'+txt+'</span> 均未参加过所选的'+number+'场考试,无法生成产品<br>\n' +
- '选择【继续生成】将剔除异常班级生成<br>\n' +
- '选择【编辑设置】进入编辑页面,重新设置生成!<br>';
- $('.abnormal-txt').html(html);
- $('input[name=gpGroupId]').val(id);
- $('#classModal-1').show();
- });
- $('.confirmbox-mask .icon-close-1').click(function () {
- $('.confirmbox-mask').hide();
- });
- $('.confirmbox-mask .cancel').click(function () {
- id=$('input[name=gpGroupId]').val();
- url="/vue/index.html#/JiuCuoSet?EditId="+id;
- window.location.href=url;
- $('.confirmbox-mask').hide();
- });
- $('.proceedCreate').click(function () {
- id=$('input[name=gpGroupId]').val();
- $.ajax({
- url: "<?php echo $this->createUrl('correct/proceed');?>",
- type: "POST",
- dataType: "json",
- data: {"gpGroupId": id},
- beforeSend:function(){
- layer.msg("数据处理中请稍后...",{"time": <?php echo Yii::app()->params["product_download_time_limit"];?>});
- },
- success: function (data){
- if(data.status==1){
- layer.msg('数据处理成功,进入生成队列',{time:2000},function () {
- window.location.reload();
- });
- $('.confirmbox-mask').hide();
- }else{
- if(data.msg!=undefined && data.msg!=''){
- layer.msg(data.msg);
- }else{
- layer.msg('数据处理失败');
- }
- }
- },
- });
- });
- </script>
|