export.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <style>
  2. .addborder{border:1px solid #ccc}
  3. .addheight{height:30px;border-radius:2px;}
  4. .addheight:focus{border-color: #66afe9;box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6);outline: 0 none;}
  5. .ace{position:relative;top:0px !important;left:0px !important;}
  6. label{font-weight:100 !important;}
  7. </style>
  8. <script src="/js/jquery.validate.min.js"></script>
  9. <script type="text/javascript">
  10. jQuery(document).ready(function(){
  11. jQuery("#schoolSubmit").click(function(){
  12. var grade = $(".diy_select_txt").text();
  13. var class_name = $(".diy_select_txt1").text();
  14. var _text = '';
  15. if(grade=='全年级' && class_name=='全班级')
  16. {
  17. _text = '全年级';
  18. }else{
  19. _text = grade+class_name;
  20. }
  21. var msg = '确定导出'+_text+'学生信息?';
  22. layer.msg(msg, {
  23. time: 0,
  24. btn: ['确定', '取消'],
  25. yes: function(index){
  26. layer.close(index);
  27. jQuery(this).attr("disabled", true);
  28. jQuery("#classAdd").submit();
  29. }
  30. });
  31. });
  32. });
  33. </script>
  34. <div class="main-content-inner">
  35. <!-- 导航栏开始-->
  36. <?php include(Yii::app()->basePath.'/views/layouts/class_navigation.php');?>
  37. <!-- 导航栏结束-->
  38. <div class="page-content" style="margin-top:15px;">
  39. <div class="row" style="margin:0px;">
  40. <div class="col-xs-12">
  41. <!-- PAGE CONTENT BEGINS -->
  42. <form enctype="multipart/form-data" class="form-horizontal" action="<?php echo $this->createUrl('classes/export');?>" method="post" id="classAdd">
  43. <div class="form-group">
  44. <label class="control-label col-xs-12 col-sm-3 no-padding-right">选择学期:</label>
  45. <div class="col-sm-9">
  46. <div class='diy_select2' style="width: 240px; border: 1px solid #ccc;">
  47. <input type='hidden' id="semester_id" name="semester_id" class='diy_select_input2' value="<?php echo $currSemester['semester_id']?>" />
  48. <div class='diy_select_txt2' style=" width: 207px;"><?php echo $currSemester['semester_name']?>(当前学期)</div>
  49. <div class='diy_select_btn2'></div>
  50. <ul class='diy_select_list2'>
  51. <li val="<?php echo $currSemester['semester_id']?>"><?php echo $currSemester['semester_name']?>(当前学期)</li>
  52. <?php if(!empty($semester)){?><li val="<?php echo $semester->semester_id?>"><?php echo $semester->semester_name ?>(上学期)</li><?php }?>
  53. </ul>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="form-group">
  58. <label class="control-label col-xs-12 col-sm-3 no-padding-right">选择年级:</label>
  59. <div class="col-sm-9">
  60. <div class='diy_select' style="width: 131px">
  61. <input type='hidden' id="grade" name="grade" class='diy_select_input' value="0" />
  62. <div class='diy_select_txt' >全年级</div>
  63. <div class='diy_select_btn'></div>
  64. <ul class='diy_select_list'>
  65. <li val="0">全年级</li>
  66. <?php
  67. if(Yii::app()->params['grade_config']){
  68. foreach (Yii::app()->params['grade_config'] as $id => $val){
  69. echo ' <li val="'.$id.'">'.$val['grade_name'].'</li>';
  70. }
  71. }
  72. ?>
  73. </ul>
  74. </div>
  75. </div>
  76. </div>
  77. <?php if(Yii::app()->params['section']==1):?>
  78. <div class="form-group">
  79. <label class="control-label col-xs-12 col-sm-3 no-padding-right">班级类型:</label>
  80. <div class="col-sm-9">
  81. <select class="class_type" name="class_type">
  82. <option value="1">行政班</option>
  83. <option value="2">教学班</option>
  84. </select>
  85. </div>
  86. </div>
  87. <?php endif;?>
  88. <div class="form-group">
  89. <label class="control-label col-xs-12 col-sm-3 no-padding-right">选择班级:</label>
  90. <div class="col-sm-9">
  91. <div class='diy_select1' style="border: 1px solid #ccc;width: 131px">
  92. <input type='hidden' id="class_id" name="class_id" class='diy_select_input1' value="0" />
  93. <div class='diy_select_txt1' >全班级</div>
  94. <div class='diy_select_btn1'></div>
  95. <ul class='diy_select_list1'>
  96. <li val="0">全班级</li>
  97. </ul>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="clearfix form-actions">
  102. <div class="col-md-offset-3 col-md-9">
  103. <button class="btn btn-success btn-sm" type="button" id="schoolSubmit">
  104. <i class="ace-icon fa fa-check bigger-110"></i>
  105. 导出
  106. </button>
  107. </div>
  108. </div>
  109. <div class="clearfix form-actions" style="margin-top:20px;">
  110. <div class=" col-md-9 " style="margin-left: 19%;">
  111. <span style=" padding: 0px 0px;color: red; id="show_msg"><div style='text-align:left;'>打印条形码须知内容:<br/>1、首先将学生信息导出,导出表格必须有学生姓名与系统准考证号这两个字段<br/>2、然后你将表格发给打印室的小姐姐告诉她要打印的样式为code128A或者code128B,要用2cm*5cm的粘贴纸,将学生姓名与系统准考证号都打印上<br/>3、最后在考试之前发给每个学生就可以,或者多打印一点让学生自己保管每次考试贴上就可以了<br/>4、注意:只要此学生的系统准考证号不改变,则他的条形码每次打印都是一样的,所以可以多打印一点屯着<br/></div></span>
  112. </div>
  113. </div>
  114. </form>
  115. <!-- PAGE CONTENT ENDS -->
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <script src="/js/xsgl.js"></script>
  121. <script>
  122. $(function(){
  123. $(".diy_select_list").click(function(){
  124. getClass();
  125. });
  126. $('.class_type').change(function(){
  127. getClass();
  128. });
  129. function getClass(){
  130. var grade = $("#grade").val();
  131. var semester_id = $("#semester_id").val();
  132. var class_type=$('.class_type').val();
  133. var html = '<li val="0">全班级</li>';
  134. $('.diy_select_list1').html(html);
  135. if(grade>0){
  136. var data={
  137. grade:grade,
  138. semester_id:semester_id,
  139. class_type:class_type
  140. };
  141. $.post("<?php echo Yii::app()->createUrl('classes/ajax_class')?>",data,function(flags){
  142. var m = JSON.parse(flags);
  143. if(m.status>0)
  144. {
  145. $.each(m.data,function(index,val){
  146. if(val.is_hide==0){
  147. html+='<li val="'+val.class_id+'">'+val.class_name+'</li>'
  148. }
  149. });
  150. $('.diy_select_list1').html(html);
  151. }
  152. });
  153. }else
  154. {
  155. $('.diy_select_list1').html(html);
  156. }
  157. }
  158. /*$("#show_msg").mouseover(function(){
  159. msg = "<div style='text-align:left;'>须知内容为:<br/>1、首先将学生信息导出,导出表格必须有学生姓名与系统准考证号这两个字段<br/>2、然后你将表格发给打印室的小姐姐告诉她要打印的样式为code128A或者code128B,要用2cm*5cm的粘贴纸,将学生姓名与系统准考证号都打印上<br/>3、最后在考试之前发给每个学生就可以,或者多打印一点让学生自己保管每次考试贴上就可以了<br/>4、注意:只要此学生的系统准考证号不改变,则他的条形码每次打印都是一样的,所以可以多打印一点屯着<br/></div>";
  160. layer.msg(msg););
  161. });*/
  162. });
  163. </script>