change_scan.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <link rel="stylesheet" href="/fonts/fpdf/iconfont.css"/>
  2. <link rel="stylesheet" href="/css/alert.css"/>
  3. <link rel="stylesheet" href="/css/modelCreatePaper.css" />
  4. <style>
  5. .examInfo{border:1px solid #ccc;margin-left:22px;width:60%;padding:10px;}
  6. .examTd{text-align: right;width:10%;line-height:200%;}
  7. .scan_1{display: inline-block;width: 140px;height:40px;border:1px solid #ccc;text-align:center;
  8. line-height: 40px;}
  9. .scan_2{display: inline-block;width: 140px;height:40px;border:1px solid #ccc;text-align:center;
  10. line-height: 40px;background:#2977ff;color:#fff;}
  11. .classes span{display: inline-block;margin-right:15px;}
  12. .clearfix{clear: both}
  13. .mcp-fl-btns{text-align: left;padding-left:22px;padding-top:20px;}
  14. .application-box{margin-top:50px;}
  15. </style>
  16. <div class="main-content-inner">
  17. <!-- 导航栏开始-->
  18. <?php include(Yii::app()->basePath.'/views/layouts/view_navigation.php');?>
  19. <!-- 导航栏结束-->
  20. <div class="page-content">
  21. <div class="row" style="margin:0px;">
  22. <div class="col-xs-12">
  23. <!-- PAGE CONTENT BEGINS -->
  24. <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
  25. <div class="row">
  26. <form method="get" id="form1" action="">
  27. <div class="col-xs-12">
  28. <p class="red">适用于校本课程平台线上阅卷的考试扫描异常,改用第三方扫描</p>
  29. <h4>选择考试</h4>
  30. <div class="dataTables_length margin-zy">
  31. <select class="grade" name="grade" style="width:100px;">
  32. <option value="0">请选择年级</option>
  33. <option value="1" >高一</option>
  34. <option value="2" >高二</option>
  35. <option value="3" >高三</option>
  36. </select>
  37. <select name="class" class="class" style="width:150px;">
  38. <option value="0">班级</option>
  39. </select>
  40. <select class="exam" id="exam" name="exam" style="width:300px;">
  41. <option value="0">请选择考试</option>
  42. </select>
  43. </div>
  44. </div>
  45. </form>
  46. </div>
  47. <div class="examInfo col-xs-12">
  48. <!--考试信息-->
  49. <table>
  50. <tr>
  51. <td class="examTd">扫描方式:</td>
  52. <td><span class="scan_1">常规扫描</span> 切换到 <span class="scan_2">第三方扫描</span></td>
  53. </tr>
  54. <tr>
  55. <td class="examTd">题源:</td>
  56. <td class="subjectId"></td>
  57. </tr>
  58. <tr>
  59. <td class="examTd">教材:</td>
  60. <td class="textBook"></td>
  61. </tr>
  62. <tr>
  63. <td class="examTd">考试类型:</td>
  64. <td class="type"></td>
  65. </tr>
  66. <tr>
  67. <td class="examTd">主阅卷老师:</td>
  68. <td class="author"></td>
  69. </tr>
  70. <tr>
  71. <td class="examTd">考试班级:</td>
  72. <td class="classes"></td>
  73. </tr>
  74. <tr>
  75. <td class="examTd">阅卷方式:</td>
  76. <td class="mark_type"></td>
  77. </tr>
  78. <tr>
  79. <td class="examTd">考试时间:</td>
  80. <td class="examDate"></td>
  81. </tr>
  82. <tr>
  83. <td class="examTd">选择题量:</td>
  84. <td class="select_num"></td>
  85. </tr>
  86. <tr>
  87. <td class="examTd">多项选择题量:</td>
  88. <td class=" mult_select_num"></td>
  89. </tr>
  90. <tr>
  91. <td class="examTd">填空题量:</td>
  92. <td class="tiankong_num"></td>
  93. </tr>
  94. <tr>
  95. <td class="examTd">解答题量:</td>
  96. <td class="jieda_num"></td>
  97. </tr>
  98. <tr>
  99. <td class="examTd">选做题量:</td>
  100. <td class="xuanzuo_num"></td>
  101. </tr>
  102. </table>
  103. </div>
  104. </div>
  105. <div class="mcp-form-list mcp-fl-btns clearfix">
  106. <input type="button" value="确定" class="mcp-sure-btn" active="true">
  107. <input type="button" value="返回" class="mcp-back-btn">
  108. <input type="hidden" value="0" name="qxk" class="qxk">
  109. </div>
  110. <!-- PAGE CONTENT ENDS -->
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <script type="text/javascript">
  116. $(function(){
  117. $('.grade').change(function(){
  118. $.post("<?php echo $this->createUrl('classes/getclass');?>",{grade_id:$('.grade').val(),all_class:1},function(data){
  119. var m = JSON.parse(data);
  120. if(m.status==0)
  121. {
  122. var html = '<option value="0">请选择班级</option>';
  123. $(".class").html(html);
  124. }else{
  125. var html = '<option value="0">请选择班级</option>';
  126. $.each(m.result,function(i,n){
  127. html+='<option value="'+ n.class_id+'">'+ n.class_name+'</option>';
  128. });
  129. $(".class").html(html);
  130. }
  131. });
  132. })
  133. $('.class').change(function(){
  134. var grade=$('.grade').val();
  135. var class_id=$('.class').val();
  136. var subject='<?php echo $this->subjectId?>';
  137. index=layer.msg('正在加载考试。。。。。。',{time:0});
  138. $.ajax({
  139. url:'<?php echo $this->createUrl('print/ajaxsearchexam')?>',
  140. type:'POST',
  141. dataType:'json',
  142. data:{'grade':grade,'class':class_id},
  143. success:function(res){
  144. layer.close(index);
  145. if(res.status==1){
  146. var html = '<option value="0">请选择考试</option>';
  147. $.each(res.list,function(i,n){
  148. html+='<option value="'+ n.exam_group_id+'">'+ n.name+'</option>';
  149. });
  150. $(".exam").html(html);
  151. }
  152. }
  153. });
  154. });
  155. $('.exam').change(function(){
  156. var exam_group_id=$('.exam').val();
  157. $('.subjectId').html('');
  158. $('.classes').html('');
  159. $('.examDate').html('');
  160. $('.jieda_num').html('');
  161. $('.mark_type').html('');
  162. $('.select_num').html('');
  163. $('.textBook').html('');
  164. $('.tiankong_num').html('');
  165. $('.type').html('');
  166. $('.author').html('');
  167. $('.mult_select_num').html('');
  168. $('.xuanzuo_num').html('');
  169. $('.qxk').val(0);
  170. if(exam_group_id!=undefined && exam_group_id!=0){
  171. index=layer.msg('正在加载考试信息。。。。。。',{time:0});
  172. $.ajax({
  173. url:'<?php echo $this->createUrl('print/loadExamInfo')?>',
  174. type:'POST',
  175. dataType:'json',
  176. data:{'exam_group_id':exam_group_id},
  177. success:function(res){
  178. layer.close(index);
  179. if(res.status==1){
  180. $('.subjectId').html(res.data['subjectId']);
  181. $('.classes').html(res.data['class']);
  182. $('.examDate').html(res.data['examDate']);
  183. $('.jieda_num').html(res.data['jieda_num']);
  184. $('.mark_type').html(res.data['mark_type']);
  185. $('.select_num').html(res.data['select_num']);
  186. $('.mult_select_num').html(res.data['mult_select_num']);
  187. $('.textBook').html(res.data['textBook']);
  188. $('.tiankong_num').html(res.data['tiankong_num']);
  189. $('.type').html(res.data['type']);
  190. $('.author').html(res.data['author']);
  191. $('.xuanzuo_num').html(res.data['xuanzuo_num']);
  192. $('.qxk').val(res.data['qxk']);
  193. }
  194. }
  195. });
  196. }
  197. });
  198. $('.mcp-back-btn').click(function(){
  199. window.location.href='<?php echo $this->createUrl('print/index')?>';
  200. });
  201. $('.mcp-sure-btn').click(function(){
  202. var exam_group_id=$('.exam').val();
  203. var qxk= $('.qxk').val();
  204. var xNumber=parseInt($('.xuanzuo_num').html());
  205. var version_number='<?php echo $version_number?>';
  206. console.log(exam_group_id);
  207. if(exam_group_id==0 || exam_group_id=='' || exam_group_id==undefined){
  208. layer.msg('请选择一场考试');
  209. return false;
  210. }
  211. layer.open({
  212. type: 1,
  213. title: '确认',
  214. btn: ['确定', '取消'],
  215. area: ['420px', '240px'], //宽高
  216. btnAlign: 'c',
  217. content: '<div class="application-box" style="text-align: center;color: red;"><p>注意,切换之后不能回退,答题卡选做题只支持多选一设置,<br>确认要切换试卷扫描方式吗?</p></div>',
  218. yes: function (index, layero) {
  219. //提交
  220. $.ajax({
  221. type: 'post',
  222. url: "<?php echo Yii::app()->createUrl('print/ChangeExamScan');?>",
  223. data: {'exam_group_id': exam_group_id},
  224. dataType: 'json',
  225. success: function (data) {
  226. if (data.status) {
  227. layer.alert("切换成功", {icon:1,closeBtn:0},function () {
  228. window.location.href='<?php echo $this->createUrl('print/index')?>';
  229. })
  230. } else {
  231. layer.msg(data.msg);
  232. }
  233. }
  234. })
  235. },
  236. btn2: function (index, layero) {
  237. //取消按钮
  238. // console.log(111)
  239. //return false 开启该代码可禁止点击该按钮关闭
  240. }
  241. });
  242. });
  243. })
  244. </script>