123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <div class="main-content-inner">
- <ul class="clearfix main-content-inner-ul">
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/index",array('type'=>'wp'));?>"' class="button button_normal button_group button_arrow " data-button="red">打印试卷</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'wtb'));?>"' class="button button_normal button_group button_arrow button_active" data-button="red">下载错题本</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <!--<button onclick='ccc()' class="button button_normal button_group button_arrow" data-button="red">下载提分方案</button>-->
- <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'isp'));?>"' class="button button_normal button_group button_arrow" data-button="red">下载提分方案</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("export/index");?>"' class="button button_normal button_group button_arrow" data-button="red">导出报告</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("vacationhomework/classes");?>"' class="button button_normal button_group button_arrow <?php if($printType == 'vh'){echo 'button_active';}?>" data-button="red">下载暑假作业</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("cylet/index");?>"' class="button button_normal button_group button_arrow" data-button="red">全学科统考</button>
- </li>
- </ul>
-
- <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("vacationhomework/students");?>">
- <div class="col-xs-10">
- <div class="dataTables_length" style="margin: 6px 0px;">
- <div class="dataTables_length">
- <label><input type="text" class="form-control input-sm" placeholder="请输入学生姓名" name="sname" value="<?php echo $sname;?>"></label>
- <!--<button class="btn btn-minier btn-primary" id="search">搜索</button>-->
- <button style="padding:4px 12px;"class="label-primary-s bth-s">搜索</button>
- </div>
- </div>
- </div>
- <input type="hidden" name="classId" value="<?php echo $class_id;?>" />
-
- </form>
- <div class="col-xs-2">
- <div class="dataTables_filter" id="dynamic-table_filter">
- <a href="javascript:void(0);" class="btn label-primary-green btn-sm" id="selectPrint">
- <i style="font-style: normal;" class="fa fa-print"></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 class="center">
- <input type="checkbox" class="ace selectAll">
- </th>
- <th>学生名称</th>
- <th>班级</th>
- <th>学生编号</th>
- <th>暑假作业</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($rs)):foreach($rs as $rt):?>
- <tr>
- <td class="center">
- <input type="checkbox" <?php if($rt['is_generated'] == 0){echo "disabled='disabled'";}?> class="ace myselect" value="<?php echo $rt['student_id'];?>" stnm="<?php echo $rt['student_id'];?>">
- </td>
- <td><?php echo $rt['realname'];?></td>
- <td><?php echo $rt['student_id'];?></td>
- <td><?php echo $rt['class_name'];?></td>
- <td>
- <?php if ($rt['is_generated'] == 0): ?>
- <span class="label label-sm label-warning">正在生成</span>
- <?php else: ?>
- <span class="label label-sm label-success">已生成</span>
- <?php endif; ?>
- </td>
- </tr>
- <?php endforeach;else:?>
- <tr><td colspan="5">暂无数据!</td></tr>
- <?php endif;?>
- </tbody>
- </table>
- </div>
- <input type="hidden" name="classId" id="classId" value="<?php echo $class_id;?>" />
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- function ccc(){
- layer.msg('敬请期待!', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
- return false;
- }
- });
- }
- $(function(){
-
- // 全选\反选
- $(".selectAll").click(function(){
-
- if ($(this).prop("checked")) {
- // $(".myselect").prop("checked",true);
- 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);
- }
- });
-
-
- $("#selectPrint").click(function(){
- // 判断是否有选中
- if (!$("input[class='ace myselect']").is(':checked')) {
- layer.msg('请至少选择一个学生!');return false;
- }
-
- layer.msg('您确定下载暑假作业吗?', {
- time: 0,
- btn: ['确定', '取消'],
- yes: function(index){
- layer.close(index);
-
- //var paperId = $("#paperId").val();
- var classId = $("#classId").val();
- //var examId = $("#examId").val();
- var examId = '96642437073601695';
- if (!classId || !examId) {
- layer.msg('未找到试卷、班级或周周练信息!');return false;
- }
-
- var result = [];
- $(".myselect").each(function(m,n){
- if ($(this).prop('checked')) {
- if ($(this).val() && $(this).attr("stnm")) {
- result.push($(this).val());
- }
- }
- })
- if (result.length < 1) {
- layer.msg('未找到要下载的学生!');return false;
- }
- layer.msg("下载中请稍后...");
- location.href = "<?php echo $this->createUrl('print/changewrongtopicdo');?>/cid/"+classId+"/eid/"+examId+"/stids/"+result;
- }
- });
- });
- })
- </script>
|