123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308 |
- <script src="/js/xsgl.js" xmlns="http://www.w3.org/1999/html"></script>
- <style>
- .diy_select_list li{padding-left:0px;}
- .layer-zd{
- padding: 15px 40px;
- }
- #report-class-bulid{
- width: 75px;
- line-height: 25px;
- border-radius: 3px;
- float: right;
- color: #fff;
- background-color: #2977ff !important;
- border: none;
- outline: none;
- }
- .table-zd{
- margin-top:15px;
- width: 100%;
- line-height: 30px;
- text-align: center;
- }
- .page-zd{
- margin: 15px;
- text-align: center;
- }
- .layui-layer-title{
- font-size: 18px;
- color: #fff;
- background-color: #2977ff !important;
- }
- .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;
- }
- .class-add-list{
- position: absolute;
- background-color: #f9f9f9;
- min-width: 103px;
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
- padding: 12px 16px;
- left: 0px;
- top: 33px;
- display: none;
- color: rgb(51, 51, 51);
- z-index:1000;
- }
- .class-add-list button{
- display: flex;
- }
- .selcet-class-type{
- margin-right: 12px;
- }
- </style>
- <script type="text/javascript">
- jQuery(document).ready(function(){
- jQuery(".delClass").click(function(){
- document.classId = jQuery(this).attr("classId");
- document.semesterId = "<?php echo $semesterId;?>";
- var testFlag='<?php echo Yii::app()->session['testFlag']?>';
- var confirm=false;
- $.ajax({
- url:'<?php echo $this->createUrl('classes/checkBeforeDelClass')?>',
- type:'POST',
- dataType:'json',
- data:{classId:document.classId},
- success:function(res){
- if(res.status==1){
- icon = 5;
- if(testFlag==1){ //技术支持权限
- if(res.data==3){
- //两者皆有,不可删除
- msg="因为以下原因操作失败:<br/><font color='red'>该班级已关联学生<br>该班级已创建过考试</font>";
- layer.alert(msg, {icon: icon}, function(){
- location.href = "<?php echo $this->createUrl("classes/index");?>";
- });
- }else if(res.data==1){
- //有学生,不可删除
- msg="因为以下原因操作失败:<br/><font color='red'>该班级已创建考试</font>";
- layer.alert(msg, {icon: icon}, function(){
- location.href = "<?php echo $this->createUrl("classes/index");?>";
- });
- }else{
- confirm=true;
- }
- }else{
- if(res.data==3){
- //两者皆有,不可删除
- msg="因为以下原因操作失败:<br/><font color='red'>该班级已关联学生<br>该班级已创建过考试</font>";
- layer.alert(msg, {icon: icon}, function(){
- location.href = "<?php echo $this->createUrl("classes/index");?>";
- });
- }else if(res.data==2){
- //有学生,不可删除
- msg="因为以下原因操作失败:<br/><font color='red'>该班级已关联学生</font>";
- layer.alert(msg, {icon: icon}, function(){
- location.href = "<?php echo $this->createUrl("classes/index");?>";
- });
- }else if(res.data==1){
- //有考试,隐藏
- $('input[name=hideClassId]').val(document.classId);
- $('.modal1_multi').show();
- }else{
- confirm=true;
- }
- }
- if(confirm){
- var msg = "确定删除?";
- //直接删除
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function (index) {
- layer.close(index);
- jQuery.post(
- "<?php echo $this->createUrl("classes/delclassact");?>",
- {"classId": document.classId, "semesterId":document.semesterId},
- 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("classes/index?semesterId={$semesterId}");?>";
- });
- }
- );
- }
- })
- }
- }else{
- layer.msg('操作失败');
- }
- }
- });
- return false;
- });
- jQuery("#search").click(function(){
- //var semesterId = jQuery(this).val();
- var grade_id = jQuery(".diy_select1 input[name=grade_id]").val();
- var realname = jQuery("input[name=realname]").val();
- var smid = jQuery("input[name=semesters]").val();
- var arts_science=$("input[name=arts_science]").val();
- var class_type=$("input[name=class_type]").val();
- var subject_id=$("input[name=subject_id]").val();
- var show_type=$("input[name=show_type]").val();
- if(subject_id!=undefined){
- location.href = "<?php echo $this->createUrl("classes/index?grade_id=");?>"+grade_id+"&realname="+realname+"&semesterId="+smid+'&subject_id='+subject_id+'&class_type='+class_type+'&show_type='+show_type;
- }else{
- location.href = "<?php echo $this->createUrl("classes/index?grade_id=");?>"+grade_id+"&realname="+realname+"&semesterId="+smid+'&arts_science='+arts_science+'&class_type='+class_type+'&show_type='+show_type;
- }
- });
- });
- </script>
- <link rel="stylesheet" href="/fonts/zhuanzhang/iconfont.css" />
- <link rel="stylesheet" href="/css/toTransferPop.css" />
- <div class="main-content-inner">
- <!-- 导航栏开始-->
- <?php include(Yii::app()->basePath.'/views/layouts/class_navigation.php');?>
- <?php if(!isset($show_type) || !$show_type):?>
- <div class="nav-btns">
- <?php if(Yii::app()->params['section']==1){?>
- <a href="<?php echo $this->createUrl('classes/index')?>?class_type=1" class="<?php if($class_type==1) echo 'active' ?>" >行政班</a><a class="<?php if($class_type==2) echo 'active' ?>" href="<?php echo $this->createUrl('classes/index')?>?class_type=2">教学班</a>
- <?php }else{?>
- <a href="<?php echo $this->createUrl('classes/index')?>?class_type=1" class="<?php if($class_type==1) echo 'active' ?>" >行政班</a>
- <?php }?>
- </div>
- <?php endif;?>
- <!-- 导航栏结束-->
- <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">
- <div class="dataTables_length margin-zy">
- <div class="col-xs-9" style="margin-bottom: 10px;width: 70%">
- <?php if($class_type==2):?>
- <div style="float: left;margin-top: 4px; padding-left: 5px;">
- 学科:
- </div>
- <div class='diy_select3' style="display: inline;margin-right: 5px;border: 1px solid #c9ccd2; width: 131px">
- <input type='hidden' id="arts_science" name="subject_id" class='diy_select_input3' value="<?php if(empty($subject_id)){echo 0;}else{echo $subject_id;}?>"/>
- <div class='diy_select_txt3'><?php if(empty($subject_id)){echo '请选择学科';}else{ echo Yii::app()->params['subjectId'][$subject_id]; }?></div>
- <div class='diy_select_btn3'></div>
- <ul class='diy_select_list3'>
- <?php
- if($subjects){
- foreach ($subjects as $key => $val){
- echo '<li val="'.$key.'">'.$val.'</li>';
- }
- }
- ?>
- </ul>
- </div>
- <?php endif;?>
- <div style="float: left;margin-top: 4px;">
- 按学期筛选:
- </div>
- <div class='diy_select' style="width:215px;">
- <input type='hidden' class='diy_select_input' name="semesters" id="semesters" value="<?php echo $semesterId;?>"/>
- <div class='diy_select_txt' style="width:182px;">
- <?php
- echo empty($thisSemester['semester_name']) ? '--请选择--':$thisSemester['semester_name'];
- if($this->schoolManager->isCurrentSemester($semesterId)){echo "(当前学期)";}
- else if($this->schoolManager->isFutureSemester($semesterId)){echo "(未开始学期)";}
- else{echo "(已完成学期)";}
- ?>
- </div>
- <div class='diy_select_btn'></div>
- <ul class='diy_select_list'>
- <?php foreach($semesters as $semester){?>
- <li val="<?php echo $semester->semester_id;?>">
- <?php echo $semester->semester_name;
- if($this->schoolManager->isCurrentSemester($semester->semester_id)){echo "(当前学期)";}
- else if($this->schoolManager->isFutureSemester($semester->semester_id)){echo "(未开始学期)";}
- else{echo "(已完成学期)";}
- ?>
- </li>
- <?php }?>
- </ul>
- </div>
- <div style="float: left;margin-top: 4px; padding-left: 5px;">
- 年级:
- </div>
- <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{echo Yii::app()->params['grade_list'][$grade_id]['grade_name'];}?></div>
- <div class='diy_select_btn1'></div>
- <ul class='diy_select_list1'>
- <li val="0" >请选择年级</li>
- <?php
- if(Yii::app()->params['grade_config']){
- foreach (Yii::app()->params['grade_config'] as $val){
- echo '<li val="'.$val['id'].'" >'.$val['grade_name'].'</li>';
- }
- }
- ?>
- </ul>
- </div>
- <?php if($class_type==1 && Yii::app()->params['section']==1):?>
- <div style="float: left;margin-top: 4px; padding-left: 5px;">
- 文理科:
- </div>
- <div class='diy_select2' style="display: inline;margin-right: 5px;border: 1px solid #c9ccd2; width: 131px">
- <input type='hidden' id="arts_science" name="arts_science" class='diy_select_input2' value="<?php if(empty($arts_science)){echo 0;}else{echo $arts_science;}?>"/>
- <div class='diy_select_txt2'><?php if(empty($arts_science)){echo '不限';}else{ switch($arts_science){
- case 1:echo '文科';break;
- case 2:echo '理科';break;
- }}?></div>
- <div class='diy_select_btn2'></div>
- <ul class='diy_select_list2'>
- <li val="0" >不限</li>
- <li val="1">文科</li>
- <li val="2">理科</li>
- </ul>
- </div>
- <?php else:?>
- <input type='hidden' id="arts_science" name="arts_science" value="0"/>
- <?php endif;?>
- <input type="text" class="form-control input-sm" placeholder="请输入班级名称!" name="realname" value="<?php if(!empty($realname)){echo $realname;}?>">
- <input type="hidden" name="class_type" value="<?php echo $class_type?>">
- <input type="hidden" name="show_type" value="<?php echo $show_type?>">
- <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
- </div>
- <div class="col-xs-3" style="width:30%;">
- <div id="dynamic-table_filter" class="dataTables_filter position_g">
- <?php
- if($this->schoolManager->isCurrentSemester($thisSemester["semester_id"]) && !$show_type ) {
- if ($class_type == 1) {
- ?>
- <?php if(Yii::app()->params['section']==1){?>
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl("classes/settingProgress")?>" id="">
- <i class="fa teach-progress" style="font-style: normal;"></i> 教学进度
- </a>
- <?php }?>
- <a class="btn btn-success btn-sm" id="zhuanban" href="javascript:void(0)" style="<?php if(empty($_semester['semesters'])){ echo "display:none";}?>">
- <i class="iconfont_zhuan icon-zhuanhuan" style="font-style: normal; "></i> 班级转移
- </a>
- <a class="btn btn-success btn-sm add-class-list" href="javascript:void(0)">
- <div class="class-add-list">
- <button onclick="location='<?php echo $semesterId ? $this->createUrl("classes/add?semesterId={$semesterId}") : $this->createUrl("classes/add");?>'">单个添加</button>
- <button onclick="location='<?php echo $this->createUrl("classes/batchAdd");?>'">批量添加</button>
- </div>
- <i class="fa fa-plus " style="font-style: normal;"></i> 添加班级
- </a>
-
- <a class="btn btn-success btn-sm" href="#" id="change-class-sort">
- <i class="fa fa-sort-numeric-asc" style="font-style: normal;"></i> 班级排序
- </a>
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('classes/index',array('show_type'=>1))?>" id="">
- <i class="fa teach-progress" style="font-style: normal;"></i> 已隐藏班级
- </a>
- <a class="btn btn-success btn-sm" href="javascript:void(0)" id="export-class">
- <i class="fa teach-progress fa-download" style="font-style: normal;"></i> 导出
- </a>
- <?php
- } else {
- ?>
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('classes/classShift')?>" id="">
- <i class="fa teach-progress" style="font-style: normal;"></i> 走班学科设置
- </a>
- <a class="btn btn-success btn-sm add-class-list" href="javascript:void(0)">
- <div class="class-add-list">
- <button onclick="location='<?php echo $this->createUrl("classes/addClass");?>'">单个添加</button>
- <button onclick="location='<?php echo $this->createUrl("classes/batchAddClass");?>'">批量添加</button>
- </div>
- <i class="fa fa-plus " style="font-style: normal;"></i> 添加教学班
- </a>
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('importstudent/importStudentClassified')?>">
- <i class="fa fa-plus " style="font-style: normal;"></i> 导入教学班学生
- </a>
- <a class="btn btn-success btn-sm" href="<?php echo $this->createUrl('classes/index',array('show_type'=>1,'class_type'=>2))?>" id="">
- <i class="fa teach-progress" style="font-style: normal;"></i> 已隐藏班级
- </a>
- <a class="btn btn-success btn-sm" href="javascript:void(0)" id="export-class-type2">
- <i class="fa teach-progress fa-download" style="font-style: normal;"></i> 导出
- </a>
- <?php
- }
- }
- ?>
- </div>
- </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>
- <?php
- if($class_type==1):
- if(Yii::app()->params['section']==1):
- ?>
- <th>文理科</th>
- <?php endif;?>
- <th>班主任</th>
- <?php endif;?>
- <th>执教老师</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($yearsList)){foreach($yearsList as $cl){?>
- <tr>
- <td><?php if(isset($cl['class_name'])){echo $cl['class_name'];}?></td>
- <td><?php echo Yii::app()->params['grade_list'][$cl['grade']]['grade_name'];?></td>
- <td><?php echo $cl["level"] ? Char::numToLetter($cl['level'], 1) : "未分层";?></td>
- <?php if($class_type==1): ?>
- <?php if(Yii::app()->params['section']==1): ?>
- <td><?php echo $cl['arts_science']==0?'不分科':($cl['arts_science']==1?'文科':'理科')?></td>
- <?php endif;?>
- <td>
- <?php
- if(isset($cl['bzr'])){
- echo $cl['bzr']['teacher_name'];
- }
- ?>
- </td>
- <?php endif;?>
- <td><?php echo $cl['teachers'];?></td>
- <td>
- <?php if(isset($thisSemester["semester_id"]) && $model->isCurrentSemester($thisSemester["semester_id"])){?>
- <div class="hidden-sm hidden-xs action-buttons">
- <?php if($show_type){?>
- <span class="iconfont click-sc click-tc addbx recover" classId="<?php echo $cl['class_id'];?>" title="恢复班级"></span>
- <?php }else{?>
- <?php if ($class_type == 1) {?>
- <!---<span style="cursor:pointer" title="编辑" class="label-sm label-primary-s label-primary-green arrowed-right" onclick="javascript:location.href='<?php echo $this->createUrl('classes/edit',array('cid'=>$cl['class_id']));?>'">
- 编辑
- </span>
- -->
- <span class="iconfont addbx click-sc" title="编辑" onclick="javascript:location.href='<?php echo $this->createUrl('classes/edit',array('cid'=>$cl['class_id']));?>'"></span>
- <!--<a class="green" title="添加学生" href="<?php echo $this->createUrl('studentinfo/add',array('cid'=>$cl['class_id']));?>">添加学生</i></a>-->
- <span title="添加学生" class="iconfont addbx click-sc" onclick="javascript:location.href='<?php echo $this->createUrl('studentinfo/add',array('cid'=>$cl['class_id']));?>'">󰀈</span>
- <!--<a class="green" href="<?php echo $this->createUrl('classes/import',array('cid'=>$cl['class_id']));?>" title="导入学生">
- 导入学生</i>
- </a>-->
- <?php /*if(isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){*/?><!--
- <span title="导入学生" class="iconfont addbx click-sc" onclick="javascript:location.href='<?php /*echo $this->createUrl('classes/import',array('cid'=>$cl['class_id']));*/?>'"></span>
- <?php /*}else{*/?>
- <span title="分班导入学生" class="iconfont addbx click-sc" onclick="javascript:location.href='<?php /*echo $this->createUrl('classes/part_student',array('cid'=>$cl['class_id']));*/?>'"></span>
- --><?php /*}*/?>
- <!--<a class="green" title="查看学生" href="<?php echo $this->createUrl('classes/view',array('cid'=>$cl['class_id']));?>">
- 查看学生</i>
- </a>-->
- <span title="查看学生" class="iconfont addbx click-sc" onclick="javascript:location.href='<?php echo $this->createUrl('classes/view',array('cid'=>$cl['class_id']));?>'"></span>
- <!--<a class="green" title="学生转班" href="<?php echo $this->createUrl('classes/copy',array('cid'=>$cl['class_id']));?>">
- 转班</i>
- </a>-->
- <span title="转班" class="iconfont addbx click-sc" onclick="javascript:location.href='<?php echo $this->createUrl('classes/copy',array('cid'=>$cl['class_id']));?>'"></span>
- <!--<a class="green delClass" classId="<?php echo $cl['class_id'];?>" title="删除" href="javascript:;">
- 删除
- </a>-->
- <?php if(Yii::app()->params['section']==1){?>
- <span title="下载年级报告" class="iconfont addbx click-sc" onclick="downfile('<?php echo $cl['class_id'] ?>',<?php echo $cl['report_status'];?>)" href="javascript:void(0);" reportstatus="<?php echo $cl['report_status'];?>">年</span>
- <?php }?>
- <span class="iconfont addbx click-delete delClass" classId="<?php echo $cl['class_id'];?>" title="删除"></span>
- <?php }else{?>
- <span class="iconfont addbx click-sc" title="编辑" onclick="javascript:location.href='<?php echo $this->createUrl('classes/editClassified',array('cid'=>$cl['class_id']));?>'"></span>
- <span title="添加学生" class="iconfont addbx click-sc" onclick="javascript:location.href='<?php echo $this->createUrl('studentinfo/addClassified',array('cid'=>$cl['class_id']));?>'">󰀈</span>
- <span title="查看学生" class="iconfont addbx click-sc" onclick="javascript:location.href='<?php echo $this->createUrl('classes/view',array('cid'=>$cl['class_id']));?>'"></span>
- <span title="转班" class="iconfont addbx click-sc" onclick="javascript:location.href='<?php echo $this->createUrl('classes/copyClassified',array('cid'=>$cl['class_id']));?>'"></span>
- <span class="iconfont addbx click-delete delClass" classId="<?php echo $cl['class_id'];?>" title="删除"></span>
- <?php }?>
- <?php }?>
- </div>
- <?php }else{?>
- <ul>
- <li style="list-style-type:none;">
- <!----<a class="green" title="查看学生" href="<?php echo $this->createUrl('classes/view',array('cid'=>$cl['class_id']));?>">查看学生</i>---->
- <span title="查看学生" class="iconfont addbx click-sc" onclick="javascript:location.href='<?php echo $this->createUrl('classes/view',array('cid'=>$cl['class_id']));?>'"></span>
- </a>
- </li>
- </ul>
- <?php }?>
- </td>
- </tr>
- <?php }}else{?>
- <tr><td colspan="10">暂无数据!</td></tr>
- <?php }?>
- </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>
- <div class="ttf-pop dn" id="pop-zhuan">
- <div class="ttf-pop-con">
- <div class="ttf-close-btn">×</div>
- <div class="ttf-toggle-tab clearfix">
- <div class="fl ttf-tog-menu massive-to-reansfer active " >批量转班</div>
- <div class="fl ttf-tog-menu single-to-reansfer" >单个转班</div>
- </div>
- <div class="ttf-tab-con clearfix">
- <form method="post" action="<?php echo Yii::app()->createUrl('classes/into_multi_class');?>" style="float: left;padding: 0;margin:0;height: 100%">
- <div class="fl ttf-tab-left">
- <div class="ttl-title">从下面学期转移班级</div>
- <div class="similar-select"><?php if(!empty($_semester['semesters'])){ echo $_semester['semesters']->semester_name;}?><input type="hidden" name="f_semester" value="<?php if(!empty($_semester['semesters'])){ echo $_semester['semesters']->semester_id;}?>"></div>
- <div class="ttf-warn"><img src="/images/warn-icon.png" alt="" class=""><span>注意:</span></div>
- <div class="ttf-warn-con">1、只能从上一个学期中转移班级;</div>
- <div class="ttf-warn-con">2、如果没有需要的学期/班级,请先新建</div>
- </div>
- <div class="fl ttf-tab-right">
- <div class="ttf-title fl">转移班级到:</div>
- <ul class="ttf-radio-con clearfix">
- <?php
- if(Yii::app()->params['grade_config']){
- $select=true;
- foreach (Yii::app()->params['grade_config'] as $val){
- if($select){
- $select=false;
- echo '<li><span class="sel-btn select"></span>'.$val['grade_name'].'</li>';
- }else{
- echo '<li><span class="sel-btn "></span>'.$val['grade_name'].'</li>';
- }
- }
- }
- ?>
- </ul>
- <?php
- if(Yii::app()->params['grade_config']){
- $class='';
- foreach (Yii::app()->params['grade_config'] as $val){
- ?>
- <ul class="ttf-sel-datas <?php echo $class;?>">
- <li class="tsd-lis clearfix">
- <span class="prev-class prev-class-title">
- 上学期班级
- </span>
- <span class="fr current-class current-class-title ellipsis">当前学期班级</span>
- </li>
- <?php if(isset($_currClass[$val['id']])){
- foreach($_currClass[$val['id']] as $v)
- {
- ?>
- <li class="tsd-lis clearfix">
- <span class="prev-class">
- <select name="one_class[<?php echo $v['class_id']?>]" class="one_class">
- <option value="0">选择要转移班级</option>
- <?php if($_fluClass)
- {
- foreach($_fluClass as $fc){
- ?>
- <option value="<?php echo $fc['class_id']?>"><?php echo $fc['class_name']?></option>
- <?php
- }
- }?>
- </select>
- </span>
- <span class="tsd-line"></span>
- <input type="hidden" name="one_class_id[<?php echo $v['class_id']?>]" value="<?php echo $v['class_id']?>">
- <span class="fr current-class ellipsis"><?php echo $v['class_name']?></span>
- </li>
- <?php }
- } ?>
- </ul>
- <?php
- $class='hide';
- }
- }
- ?>
- </div>
- <div class="ttf-pop-bottom clearfix">
- <div class="fl ttf-warn-opt">
- 点击<span>确定</span>修改才会被保存哦!
- </div>
- <div class="ttf-bottom-btn fr">
- <input type="submit" value="确定" class="ttf-bottom-sure">
- <!--<input type="button" value="取消" class="ttf-bottom-cancel">-->
- </div>
- </div>
- </form>
- </div>
- <div class="ttf-tab-con hide clearfix">
- <form method="post" action="<?php echo Yii::app()->createUrl('classes/into_alone_class');?>" style="float: left;padding: 0;margin:0;height: 100%">
- <div class="fl ttf-tab-left">
- <div class="ttl-title">从下面学期转移班级</div>
- <div class="similar-select"><?php if(!empty($_semester['semesters'])){ echo $_semester['semesters']->semester_name;}?><input type="hidden" name="f_semester" value="<?php if(!empty($_semester['semesters'])){ echo $_semester['semesters']->semester_id;}?>"></div>
- <div class="ttf-warn"><img src="/images/warn-icon.png" alt="" class=""><span>注意:</span></div>
- <div class="ttf-warn-con">1、只能从上一个学期中转移班级;</div>
- <div class="ttf-warn-con">2、如果没有需要的学期/班级,请先新建</div>
- </div>
- <div class="fl ttf-tab-right alone">
- <div class="ttf-title fl">转移班级到:</div>
- <ul class="ttf-radio-con alone clearfix ">
- <?php
- if(Yii::app()->params['grade_config']){
- $select=true;
- foreach (Yii::app()->params['grade_config'] as $val){
- if($select){
- $select=false;
- echo '<li><span class="sel-btn alone select"></span>'.$val['grade_name'].'</li>';
- }else{
- echo '<li><span class="sel-btn alone "></span>'.$val['grade_name'].'</li>';
- }
- }
- }
- ?>
- </ul>
- <?php
- if(Yii::app()->params['grade_config']){
- $class='';
- foreach (Yii::app()->params['grade_config'] as $val) {
- ?>
- <ul class="ttf-sel-datas <?php echo $class;?>">
- <li class="tsd-lis clearfix">
- <span class="prev-class prev-class-title">
- 上学期班级
- </span>
- <span class="fr current-class current-class-title ellipsis">当前学期班级</span>
- </li>
- <li class="tsd-lis clearfix">
- <span class="prev-class">
- <select name="alone_one_f_class" id="alone_two_f_class" class="aline_one_class">
- <option value="0">选择要转移班级</option>
- <?php if($_fluClass)
- {
- foreach($_fluClass as $fc){
- ?>
- <option value="<?php echo $fc['class_id']?>"><?php echo $fc['class_name']?></option>
- <?php
- }
- }?>
- </select>
- </span>
- <span class="tsd-line"></span>
- <span class="fr current-class ellipsis">
- <select name="alone_one_c_class" id="" class="">
- <option value="0">请选择班级</option>
- <?php if(isset($_currClass[$val['id']])){
- foreach($_currClass[$val['id']] as $v)
- {
- ?>
- <option value="<?php echo $v['class_id']?>"><?php echo $v['class_name']?></option>
- <?php }
- }
- ?>
- </select>
- </span>
- </li>
- </ul>
- <?php
- $class='hide';
- }
- }
- ?>
- </div><div class="ttf-pop-bottom clearfix">
- <div class="fl ttf-warn-opt">
- 点击<span>确定</span>修改才会被保存哦!
- </div>
- <div class="ttf-bottom-btn fr">
- <input type="submit" value="确定" class="ttf-bottom-sure">
- <!--<input type="button" value="取消" class="ttf-bottom-cancel">-->
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="ttf-pop dn" id="pop-sortClass">
- <div class="ttf-pop-con">
- <div class="ttf-close-btn">×</div>
- <div class="ttf-toggle-tab clearfix">
- <div class="fl ttf-tog-menu massive-to-reansfer active">编辑班级排序</div>
- </div>
- <div class="ttf-tab-con clearfix">
- <div style="float: left;padding: 0;margin:0;height: 100%">
- <div class="fl ttf-tab-left">
- <div class="ttf-warn"><img src="/images/warn-icon.png" alt="" class=""><span>注意:</span></div>
- <div class="ttf-warn-con">1、班级排序保存后,教师端在发送打印时,选择考试班级所展示的班级顺序也会同步修改。</div>
- <div class="ttf-warn-con">2、目前班级的顺序是按照创建的时间,最新创建的排在最前面。</div>
- </div>
- <div class="fl ttf-tab-right">
- <ul class="ttf-sel-datas">
- <li class="tsd-lis clearfix">
- <span class="prev-class prev-class-title">班级</span>
- <span class="fr current-class current-class-title ellipsis">排序</span>
- </li>
- </ul>
- <ul class="ttf-sel-datas class-list">
- </ul>
- </div>
- <div class="ttf-pop-bottom clearfix">
- <div class="fl ttf-warn-opt">
- 点击<span>确定</span>修改才会被保存哦!
- </div>
- <div class="ttf-bottom-btn fr">
- <input type="button" onclick="saveClassSort()" value="确定" class="ttf-bottom-sure">
- <!--<input type="button" value="取消" class="ttf-bottom-cancel">-->
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="ttf-pop dn" id="pop-export-class">
-
- </div>
- <style>
- .model-score input{padding-left: 5px; height: 30px;width: 230px;border:1px solid #ccc;outline: none;}
- .model-score input:focus{border-color: #2977ff;box-shadow: 0 0 5px #2977ff;}
- .modal-btn{text-align: center;margin:10px 0;}
- .modal-btn a{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #2977ff;color: #fff;}
- .modal-content{position: absolute;left: 50%;top: 50%;padding-top: 40px; width: 500px;background: #fff; transform: translate(-50%,-50%);}
- .modal-title{position: absolute;top: 0;left: 0;padding-left: 20px; width: 100%;height: 40px;line-height: 40px;background: #2977ff;color:#fff;}
- .modal-title em{width: 40px;height: 40px;text-align: center;font-size: 20px;cursor: pointer;}
- .model-score1 input{padding-left: 5px; height: 30px;width: 230px;border:1px solid #ccc;outline: none;}
- .model-score1 input:focus{border-color: #2977ff;box-shadow: 0 0 5px #2977ff;}
- .modal-btn{text-align: center;margin:10px 0;}
- .modal-btn a{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #2977ff;color: #fff;}
- .model-score2 input{padding-left: 5px; height: 30px;width: 230px;border:1px solid #ccc;outline: none;}
- .model-score2 input:focus{border-color: #2977ff;box-shadow: 0 0 5px #2977ff;}
- .modal-btn{text-align: center;margin:10px 0;}
- .modal-btn a{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #2977ff;color: #fff;}
- .modal-btn .close3{display: inline-block;margin:0 5px; width: 100px; line-height: 40px;background: #fff;color: #000;border:1px solid #555;border-radius: 3px;}
- .modal1_multi{position: fixed;top: 0;left: 0;width: 100%;height: 100%;font-size:14px;display:none ;background: rgba(0,0,0,.4)}
- .model-rule{width:80%;margin:15px auto;text-align: center;font-size:18px;}
- .modal1_multi .model-score1{width:80%;margin:10px auto;text-align: left}
- .modal1_multi .model-score-m{width:80%;margin:5px auto;}
- .modal1_multi .model-score-m label{margin:5px 0;font-size: 12px;color:red;font-weight: initial}
- .modal1_multi em{color:#fff;}
- </style>
- <!-- 重置提示框 -->
- <div class="modal1_multi">
- <div class="modal-shadow"></div>
- <div class="modal-content">
- <div class="modal-title clearfix">
- 提示<em class="fr close3">×</em>
- </div>
- <div class="model-rule">
- 该班级已有考试数据,不可删除,<br>
- 可隐藏班级
- </div>
- <div class="model-score-m">
- </div>
- <div class="modal-btn">
- <a href="javascript:;" class="sumbit3">隐藏</a>
- <a href="javascript:;" class="close3 chameleon">关闭</a>
- <input type="hidden" name="hideClassId" value="0">
- </div>
- </div>
- </div>
- <script src="/js/layer/layer.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- var _one_select_class = [];
- var _two_select_class = [];
- var _three_select_class = [];
- $("#zhuanban").click(function(){
- $("#pop-zhuan").removeClass("dn");
- });
- //班级排序
- $("#change-class-sort").click(function(){
- $.ajax({
- type:'post',
- url: "<?php echo $this->createUrl('classes/getClassWithSort');?>",
- dataType: 'json',
- success: function (res) {
- var html = ''
- if (res.status){
- for (var i=0; i<res.data.length; i++) {
- var item = res.data[i];
- html += '<li class="tsd-lis clearfix" classId="'+item.class_id+'">';
- html += '<span class="rev-class prev-class-title ellipsis">'+item.class_name+'</span>';
- html += '<span class="fr current-class">';
- html += '<input type="number" style="width: 50px;height: 30px;text-align: center" name="sort" value="'+item.sort+'">';
- html += '</span></li>';
- }
- $('.class-list').html(html);
- $("#pop-sortClass").removeClass("dn");
- }else {
- layer.msg("暂无班级");
-
- }
- }
- })
- })
-
- $(".one_class").each(function(){
- var _this = $(this);
- _this.data("last",_this.val()).change(function(){
- var oldVal = _this.data("last");
- var newVal = _this.val();
- var temp = 0;
- for(var i=0;i<$(".one_class").length;i++){
- if($(".one_class").eq(i).val() == newVal){
- if(newVal!=0){
- temp++;
- if(temp>1){
- _this.val(oldVal);
- _this.data("last",oldVal);
- alert("不能重复选择班级")
- break;
- }
- }
- }else{
- _this.data("last",_this.val());
- }
- }
- })
- })
- $(".aline_one_class").each(function(){
- var _this = $(this);
- _this.data("alast",_this.val()).change(function(){
- var oldVal = _this.data("alast");
- var newVal = _this.val();
- var temp = 0;
- for(var i=0;i<$(".aline_one_class").length;i++){
- if($(".aline_one_class").eq(i).val() == newVal){
- if(newVal!=0){
- temp++;
- if(temp>1){
- _this.val(oldVal);
- _this.data("alast",oldVal);
- alert("不能重复选择班级")
- break;
- }
- }
- }else{
- _this.data("alast",_this.val());
- }
- }
- })
- })
- //恢复班级
- $('.recover').click(function(){
- var classId=$(this).attr('classId');
- layer.msg('确定要恢复隐藏的班级吗', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function (index) {
- layer.closeAll();
- $.ajax({
- type:'post',
- url: "<?php echo $this->createUrl('classes/recoverClass');?>",
- dataType: 'json',
- data:{classId:classId},
- success: function (res) {
- if (res.status){
- window.location.href='<?php echo $this->createUrl('classes/index')?>';
- }else {
- layer.msg("恢复失败");
- }
- }
- })
- }
- })
- });
- // 点击单选
- $("#pop-zhuan .ttf-radio-con li").click(function(){
- $(this).find(".sel-btn").addClass("select");
- $(this).siblings().find(".sel-btn").removeClass("select");
- $(this).closest(".ttf-tab-right").find(".ttf-sel-datas").hide().removeClass('hide');
- $(this).closest(".ttf-tab-right").find(".ttf-sel-datas").eq($(this).index()).show();
- });
- $("#pop-zhuan .ttf-radio-con.alone li").click(function(){
- console.log('1111');
- $(this).find(".sel-btn.alone").addClass("select");
- $(this).siblings().find(".sel-btn.alone").removeClass("select");
- $(this).closest(".ttf-tab-right").find(".ttf-sel-datas").hide().removeClass('hide');
- $(this).closest(".ttf-tab-right").find(".ttf-sel-datas").eq($(this).index()).show();
- });
- // 内容切换
- $("#pop-zhuan .ttf-tog-menu").click(function(){
- // console.log($(this).index());
- $(this).addClass("active").siblings().removeClass("active");
- $(".ttf-tab-con").hide();
- $(".ttf-tab-con").eq($(this).index()).show().removeClass("hide");
- });
- // 点击关闭
- $(".ttf-close-btn").click(function(){
- $("select").val(0);
- $(".ttf-pop").addClass('dn');
- });
- });
- function cancelPay(cid){//alert(uid);return;
- if (!cid) return;
- layer.open({
- type: 2,
- skin: 'layui-layer-lan',
- title: '设置用户缴费',
- fix: false,
- shadeClose: true,
- maxmin: true,
- area: ['1000px', '500px'],
- content: "<?php echo $this->createUrl('classes/import');?>/cid/"+cid,
- });
- }
-
- function saveClassSort() {
- var classSort = [];
- $('input[name="sort"]').each(function () {
- var str = $(this).parent().parent().attr('classId')+'_'+$(this).val();
- classSort.push(str);
- });
- if(classSort.length==0){
- layer.msg("排序参数错误");
- return false;
- }
- $.ajax({
- type:'post',
- url: "<?php echo $this->createUrl('classes/saveClassSort');?>",
- data: {'classSort': classSort},
- dataType: 'json',
- success: function (res) {
- var html = ''
- if (res.status){
- $(".ttf-pop").addClass('dn');
- layer.alert('修改成功',{icon:1,closeBtn:0},function () {
- location.reload();
- })
- }else {
- layer.msg("修改失败");
- }
- }
- })
- }
-
- function classesMesByGradeAndPage(grade,page){
- if(!grade){
- grade = 1;
- }
- if(!page){
- page = 1;
- }
- $.ajax({
- type:'get',
- url: "<?php echo $this->createUrl('classes/ajaxGetClassesByGrade');?>",
- data:{grade:grade,page:page},
- dataType: 'json',
- success: function (res) {
- var html = ''
- if (res.status == 1){
- console.log(res.data);
- html += "<table border=1 class='table-zd'>";
- html += " <tr>";
- html += " <td><input type='checkbox' class='select-class-all'></td>";
- html += " <td>班级</td>";
- html += " <td>人数</td>";
- html += " <td>状态</td>";
- html += " <td>生成进度</td>";
- html += " </tr>";
- for(var i = 0;i<res.data.rs.length;i++){
- html += " <tr>";
- if(res.data.rs[i]['report_status'] == 0){
- if(res.data.rs[i]['stu_count'] > 0 ){
- html += " <td><input type='checkbox' class='select-class' classId='"+res.data.rs[i]['class_id']+"'></td>";
- }else{
- html += " <td><input type='checkbox' class='select-class' classId='"+res.data.rs[i]['class_id']+"' disabled='disabled'></td>";
- }
-
- }else{
- html += " <td><input type='checkbox' class='select-class' classId='"+res.data.rs[i]['class_id']+"' disabled='disabled'></td>";
- }
-
- html += " <td>"+res.data.rs[i]['class_name']+"</td>";
- html += " <td>"+res.data.rs[i]['stu_count']+"</td>";
- if(res.data.rs[i]['report_status'] == 0){
- html += " <td>未生成</td>";
- html += " <td>0/"+res.data.rs[i]['stu_count']+"</td>";
- }else if(res.data.rs[i]['report_status'] == 1){
- html += " <td>正在生成</td>";
- html += " <td>0/"+res.data.rs[i]['stu_count']+"</td>";
- }else if(res.data.rs[i]['report_status'] == 2){
- html += " <td>已生成</td>";
- html += " <td>"+res.data.rs[i]['stu_count']+"/"+res.data.rs[i]['stu_count']+"</td>";
- }
-
-
- html += " </tr>";
- }
- html += "</table>";
- html += '<div class="page-zd">';
- html += ' <div class="dataTables_paginate paging_simple_numbers">';
- html += res.data.pages_index;
- html +='共:'+res.data.page.rowsCount+'条';
- html += "</div>";
- html += "</div>";
- $(".class-data").html(html);
- }else {
- console.log(11);
- }
- }
- })
- }
- $("#year-report").click(function () {
- //通过年级页码获取班级信息
- var html = "";
- html += "<div class='layer-zd'>";
- html += "<select class='report-grade'>";
- html += "<option value='1'>高一</option>";
- html += "<option value='2'>高二</option>";
- html += "<option value='3'>高三</option>";
- html += "</select>";
- html += "<button id='report-class-bulid'>生成</button>";
- html += "<div class='class-data'></div>";
- html += "<div>";
- html += "<div class='notice-report-1'>注:</div>";
- html += "<div class='notice-report-2'>1、确认哪些班级需要使用学生年度账单,然后再勾选进行生成!</div>";
- html += "<div class='notice-report-3'>2、点击生成后,稍后再确认是否为“已生成”状态,只有已生成的班级才可以在班级列表中下载学生年度账单</div>";
- html += "</div>";
- html += "</div>";
- layer.open({
- type: 1,
- title: '生成年度账单',
- btn: [],
- area: ['640px', '500px'], //宽高
- btnAlign: 'c',
- content: html,
- btn2: function (index, layero) {
- }
- });
- classesMesByGradeAndPage(1,1);
-
- // alert(1);
- });
- $("body").delegate(".report-grade","change",function(){
- var grade = $(this).val();
- if(grade){
- classesMesByGradeAndPage(grade,1);
- }
- })
- $("body").delegate(".select-class-all","click",function(){
- if($(this).prop("checked")){
- $('.select-class').each(function(i){
- if(!$(this).prop("disabled")){
- $(this).prop("checked",true);
- }
- });
- }else{
- $('.select-class').prop("checked",false);
- }
- })
-
- $("body").delegate("#report-class-bulid","click",function(){
- var classIds = [];
- $(".select-class:checked").each(function(){
- classIds.push($(this).attr('classId'));
- });
- if(classIds.length>0){
- var url = "<?php echo $this->createUrl("classes/yearReport") ?>";
- $.post(url, {classId: classIds}, function(data) {
- var m = JSON.parse(data);
- console.log(m);
- if (m.status == 0)
- {
-
- } else
- {
- setTimeout(function() {
- $(".loading-pop").hide();
- }, 500);
- layer.msg(m.error)
- }
- });
- $(".select-class:checked").each(function(){
- $(this).prop("disabled",true);
- $(this).parent().parent().find("td:eq(3)").html("正在生成");
- });
- }
- })
- $("body").delegate(".page-zd ul li a","click",function(){
- var page = $(this).html();
- var grade = $(".report-grade").val();
- if(isNaN(page)){
- var current_page = parseInt($(".page-zd ul .selected").text());
- if(page == '下一页'){
- classesMesByGradeAndPage(grade,(current_page + 1));
- }else if(page == '上一页'){
- classesMesByGradeAndPage(grade,(current_page-1));
- }
-
- }else{
- classesMesByGradeAndPage(grade,page);
- }
-
- })
- $('.close3').click(function(){
- $('.modal1_multi').hide();
- });
- //隐藏班级
- $('.sumbit3').click(function(){
- var classId=$('input[name=hideClassId]').val();
- if(classId==0 || classId==undefined || classId==''){
- alert('参数错误');
- }
- $.ajax({
- url:'<?php echo $this->createUrl('classes/hideClass')?>',
- type:'POST',
- dataType:'json',
- data:{classId:classId},
- success:function(res){
- if(res.status==1){
- layer.msg('班级已成功隐藏',{
- icon: 1
- }, function(){
- location.reload();
- });
- }else{
- layer.msg('操作失败')
- }
- }
- });
- });
-
- $(".add-class-list").hover(function(){
- $('.class-add-list').toggle();
- });
- // $(".class-add-list").hover(function(){
- // $('.class-add-list').show();
- //
- // },function(){
- // $('.class-add-list').hide();
- //
- // });
- $("body").delegate(".all-select","click",function(){
- if($(this).prop("checked")){
- $(this).parent().find(".all-select-option").prop("checked",true);
- }else{
- $(this).parent().find(".all-select-option").prop("checked",false);
- }
- });
- $("body").delegate(".all-select-option","click",function(){
-
- if($(".all-select-option").length == $(".all-select-option:checked").length){
- $(".all-select").prop("checked",true);
- }else{
- $(".all-select").prop("checked",false);
- }
- });
- //导出班级数据
- $("#export-class").click(function(){
- var str = '<div id="hgc_editor" style="padding:20px 35px;">';
- str += ' <p>请选择需要导出的字段:</p>';
- str += '<input type="checkbox" name="export-class-type-all" value="0" checked="checked" class="all-select"><span class="selcet-class-type">全选</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="1" class="all-select-option" checked="checked"><span class="selcet-class-type">班级</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="2" class="all-select-option" checked="checked"><span class="selcet-class-type">年级</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="3" class="all-select-option" checked="checked"><span class="selcet-class-type">层级</span>';
- <?php if(Yii::app()->params['section']==1):?>
- str += '<input type="checkbox" name="export-class-type[]" value="4" class="all-select-option" checked="checked"><span class="selcet-class-type">文理科</span>';
- <?php endif;?>
- str += '<input type="checkbox" name="export-class-type[]" value="5" class="all-select-option" checked="checked"><span class="selcet-class-type">班主任</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="6" class="all-select-option" checked="checked"><span class="selcet-class-type">执教老师</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="7" class="all-select-option" checked="checked"><span class="selcet-class-type">学生人数</span>';
- str += ' </div>';
- layer.open({
- title:'班级信息导出'
- ,area:'740px'
- ,type: 1
- ,offset: 'auto'
- ,content: str
- ,btn: ['确定','取消']
- ,btnAlign: 'c' //按钮居中
- ,shade: 0.6 //不显示遮罩
- ,yes:function(){
- var semesterId = $("#semesters").val();
- var grade = $("#grade_id").val();
- var arts_science = $("#arts_science").val();
- var class_name = $("input[name='realname']").val();
- var class_type = 1;
- var choose_type = [];
- $(".all-select-option").each(function(){
- if($(this).is(':checked')){
- choose_type.push($(this).val());
- }
- });
- if(choose_type.length > 0){
- window.location.href = "<?php echo $this->createUrl("classes/exportClass");?>"+"?semesterId="+semesterId+"&grade="+grade+"&arts_science="+arts_science+"&class_name="+class_name+"&class_type=1&choose_type="+choose_type;
- }
- }
- });
-
- });
-
- //导出教学班数据
- $("#export-class-type2").click(function(){
- var str = '<div id="hgc_editor" style="padding:20px 35px;">';
- str += ' <p>请选择需要导出的字段:</p>';
- str += '<input type="checkbox" name="export-class-type-all" value="0" class="all-select" checked="checked"><span class="selcet-class-type">全选</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="1" class="all-select-option" checked="checked"><span class="selcet-class-type">班级</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="2" class="all-select-option" checked="checked"><span class="selcet-class-type">年级</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="3" class="all-select-option" checked="checked"><span class="selcet-class-type">层级</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="6" class="all-select-option" checked="checked"><span class="selcet-class-type">执教老师</span>';
- str += '<input type="checkbox" name="export-class-type[]" value="7" class="all-select-option" checked="checked"><span class="selcet-class-type">学生人数</span>';
- str += ' </div>';
- layer.open({
- title:'班级信息导出'
- ,area:'740px'
- ,type: 1
- ,offset: 'auto'
- ,content: str
- ,btn: ['确定','取消']
- ,btnAlign: 'c' //按钮居中
- ,shade: 0.6 //不显示遮罩
- ,yes:function(){
- var semesterId = $("#semesters").val();
- var grade = $("#grade_id").val();
- var arts_science = $("#arts_science").val();
- var class_name = $("input[name='realname']").val();
- var class_type = 2;
- var choose_type = [];
- $(".all-select-option").each(function(){
- if($(this).is(':checked')){
- choose_type.push($(this).val());
- }
- });
- if(choose_type.length > 0){
- window.location.href = "<?php echo $this->createUrl("classes/exportClass");?>"+"?semesterId="+semesterId+"&grade="+grade+"&arts_science="+arts_science+"&class_name="+class_name+"&class_type=2&choose_type="+choose_type;
- }
- }
- });
-
- });
- function downfile(classId,status) {
- $(".loading-pop").show();
- if(status == 2){
- var msg = '是否确定下载该班级学生的年度使用报告吗?';
- layer.msg(msg, {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- location.href="<?php echo $this->createUrl("classes/down_load_yearreport")?>"+"?classId="+classId;
- }
- });
- }else{
- layer.msg('账单未生成');
- }
- var url = "<?php echo $this->createUrl("classes/yearReport") ?>";
-
-
-
- }
- </script>
|