cooperate.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <link rel="stylesheet" href="/css/assist/taskPage.css">
  2. <script src="/js/assist/drag.js" type="text/javascript"></script>
  3. <div class="hgc_taskPage">
  4. <div class="hgc_totalHeader">
  5. <span class="active">素材切割任务</span>
  6. <span><a href="<?php echo $this->createUrl('assistTask/scanTask'); ?>">扫描处理任务</a></span>
  7. </div>
  8. <div class="searchArea">
  9. <form class="task_search" action="<?php echo $this->createUrl('assistTask/index');?>" method="get" >
  10. <div class="searchLeft">
  11. <div class="conditionItem">
  12. <em>答题卡:</em>
  13. <select name="answer_sheet_task">
  14. <option value="0">全部</option>
  15. <option value="1" <?php if($condition['answer_sheet_task']==1) echo 'selected'?>>排队中</option>
  16. <option value="2" <?php if($condition['answer_sheet_task']==2) echo 'selected'?>>受理中</option>
  17. <option value="3" <?php if($condition['answer_sheet_task']==3) echo 'selected'?>>已完成 </option>
  18. </select>
  19. </div>
  20. <div class="conditionItem">
  21. <em>试卷:</em>
  22. <select name="paper_task">
  23. <option value="0">全部</option>
  24. <option value="1" <?php if($condition['paper_task']==1) echo 'selected'?>>排队中</option>
  25. <option value="2" <?php if($condition['paper_task']==2) echo 'selected'?>>受理中</option>
  26. <option value="3" <?php if($condition['paper_task']==3) echo 'selected'?>>已完成 </option>
  27. </select>
  28. </div>
  29. <div class="conditionItem">
  30. <em>答案解析:</em>
  31. <select name="parse_task">
  32. <option value="0">全部</option>
  33. <option value="1" <?php if($condition['parse_task']==1) echo 'selected'?>>排队中</option>
  34. <option value="2" <?php if($condition['parse_task']==2) echo 'selected'?>>受理中</option>
  35. <option value="3" <?php if($condition['parse_task']==3) echo 'selected'?>>已完成 </option>
  36. </select>
  37. </div>
  38. <div class="conditionItem">
  39. <input type="text" placeholder="请输入考试名称/学校名称/学管姓名的等关键字搜索" name="search_name" value="<?php echo $condition['search_name'] ?>">
  40. <div class="submit hbtn">搜索</div>
  41. <input type="hidden" name="subject_id" value="<?php echo $subjectId?>">
  42. </div>
  43. </div>
  44. </form>
  45. <div class="conditionItem last">
  46. <em>学科:</em>
  47. <select name="subject_id" id="selectId">
  48. <option value="0">全部</option>
  49. <?php
  50. if(isset($subjects)){
  51. foreach ($subjects as $key => $subject){
  52. if($key==$subjectId){
  53. echo '<option value="'.$key.'" selected>'.$subject.'</option>';
  54. }else{
  55. echo '<option value="'.$key.'">'.$subject.'</option>';
  56. }
  57. }
  58. }
  59. ?>
  60. </select>
  61. </div>
  62. </div>
  63. <div class="tableBox">
  64. <table class="hgc_table" border="1" cellspacing="0">
  65. <thead>
  66. <tr>
  67. <th>考试名称</th>
  68. <th>学科</th>
  69. <th>学校名称</th>
  70. <th>学校地址</th>
  71. <th>学管姓名</th>
  72. <th>学管手机号</th>
  73. <th>答题卡任务</th>
  74. <th>试卷任务</th>
  75. <th>答案解析任务</th>
  76. <th>任务更新时间</th>
  77. <th>受理操作员</th>
  78. <th>操作</th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. <?php $i = 1; if ($dataList):foreach ($dataList as $loop): ?>
  83. <tr>
  84. <td><p class="examName" title="<?php echo $loop['exam_name'] ?>"><?php echo $loop['exam_name'] ?></p></td>
  85. <td><?php echo Yii::app()->params['subjectId'][$loop['subject_id']] ?></td>
  86. <td><?php echo $loop['school_name'] ?></td>
  87. <td><?php echo $loop['address'] ?></td>
  88. <td><?php echo $loop['coach_name'] ?></td>
  89. <td><?php echo $loop['coach_mobile'] ?></td>
  90. <?php
  91. switch ($loop['answer_sheet_task']){
  92. case 0:
  93. echo '<td> 无</td>';
  94. break;
  95. case 1:
  96. echo '<td class="warning">排队中</td>';
  97. break;
  98. case 2:
  99. echo '<td class="notice">受理中</td>';
  100. break;
  101. case 3:
  102. echo ' <td class="theme">已完成</td>';
  103. break;
  104. default:
  105. echo '<td> 无</td>';
  106. }
  107. ?>
  108. <?php
  109. switch ($loop['paper_task']){
  110. case 0:
  111. echo '<td> 无</td>';
  112. break;
  113. case 1:
  114. echo '<td class="warning">排队中</td>';
  115. break;
  116. case 2:
  117. echo '<td class="notice">受理中</td>';
  118. break;
  119. case 3:
  120. echo '<td class="theme">已完成</td>';
  121. break;
  122. default:
  123. echo '<td> 无</td>';
  124. }
  125. ?>
  126. <?php
  127. switch ($loop['parse_task']){
  128. case 0:
  129. echo '<td> 无</td>';
  130. break;
  131. case 1:
  132. echo '<td class="warning">排队中</td>';
  133. break;
  134. case 2:
  135. echo '<td class="notice">受理中</td>';
  136. break;
  137. case 3:
  138. echo '<td class="theme">已完成</td>';
  139. break;
  140. default:
  141. echo '<td> 无</td>';
  142. }
  143. ?>
  144. <td class=" open-tips" tipstext="<?php echo $loop['tips']?>"><?php echo date('Y-m-d H:i:s',$loop['update_time'])?></td>
  145. <td><?php echo $loop['operator'] ?></td>
  146. <td >
  147. <div class="operator">
  148. <a href="<?php echo $this->createUrl('assistTask/detail',array('exam_group_id'=>$loop['exam_group_id']));?>" class="theme artical">任务详情</a>
  149. <a href="#" class="apply" eid="<?php echo $loop['exam_group_id']?>"
  150. <?php if($loop['operator']=='--'):?>
  151. class="blue opreator"> 分配操作员
  152. <?php else:?>
  153. <a class="blue complete">修改操作员
  154. <?php endif;?>
  155. </a>
  156. </div>
  157. </td>
  158. </tr>
  159. <?php ++$i;endforeach;
  160. else:?>
  161. <tr><td colspan="12">暂无任务数据</td></tr>
  162. <?php
  163. endif;
  164. ?>
  165. </tbody>
  166. </table>
  167. <div class="dataTables_paginate paging_simple_numbers" >
  168. <?php
  169. if(isset($pages['totalPage']) && $pages['totalPage']>1){
  170. $StartPage=$pages['page']-5;
  171. $EndPage=$pages['page']+5;
  172. if($StartPage<1){
  173. $StartPage=1;
  174. }
  175. if($EndPage>$pages['totalPage']){
  176. $EndPage=$pages['totalPage'];
  177. }
  178. ?>
  179. <div class="row" style="padding-top:10px;margin:0 auto;">
  180. <div class="col-xs-5" style="font-size: 16px;text-align: center;width: 100%;padding: 20px 0;">
  181. <div class="dataTables_paginate paging_simple_numbers" style="vertical-align:sub;">
  182. <ul id="yw0" class="yiiPager">
  183. <?php
  184. if($pages['page']>1){
  185. echo '<li class="previous"><a href="'.$this->createUrl('assistTask/index')."?page=".($pages['page']-1).'&'.http_build_query($condition).'">上一页</a></li>';
  186. }
  187. for($i=$StartPage;$i<=$EndPage;$i++){
  188. $url=$this->createUrl('assistTask/index')."?page=".$i.'&'.http_build_query($condition);
  189. if($pages['page']==$i){
  190. echo '<li class="page selected"><a href="#">'.$i.'</a></li>';
  191. }else{
  192. echo '<li class="page"><a href="'.$url.'">'.$i.'</a></li>';
  193. }
  194. }
  195. if($pages['page']<$pages['totalPage']){
  196. echo '<li class="previous"><a href="'.$this->createUrl('assistTask/index')."?page=".($pages['page']+1).'&'.http_build_query($condition).'">下一页</a></li>';
  197. }
  198. ?>
  199. </ul>
  200. 共:<?php echo $pages['total']?>条
  201. </div>
  202. </div>
  203. </div>
  204. <?php } ?>
  205. </div>
  206. </div>
  207. <div class="hgc_dialog" style="display: none">
  208. <div class="hgc_dialogContent">
  209. <h2>设置操作员 <i class="close btn-colse">x</i></h2>
  210. <div class="content">
  211. <p class="warning">注意:若更改操作员,该次任务的所有任务量统计将计入新的操作员账号下,请谨慎操作!</p>
  212. <div class="conditionItem">
  213. <em>答题卡:</em>
  214. <select name="user_id" id="user_id" style="position:absolute;z-index:1;">
  215. <option value="0">请选择用户</option>
  216. <?php
  217. if($users){
  218. foreach ($users as $user){
  219. echo '<option value="'.$user['user_id'].'">'.$user['real_name'].'-'.$user['user_name'].'</option>';
  220. }
  221. }
  222. ?>
  223. </select>
  224. <input type="hidden" name="exam_group_id" value="0">
  225. </div>
  226. </div>
  227. <div class="btns">
  228. <input type="hidden" name="exam_id" value="0">
  229. <input type="hidden" name="file_type" value="">
  230. <div class="hbtn up-form" id="btnSubmit">确定</div>
  231. <div class="hbtn btn-colse" id="btnClose">取消</div>
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. <script type="text/javascript">
  237. $(document).ready(function () {
  238. //关闭弹窗
  239. $(".btn-colse").on("click", function () {
  240. // layer.close(layer.index);
  241. layer.closeAll();
  242. $('.hgc_dialog').hide();
  243. });
  244. $('.up-form').click(function(){
  245. var examGroupId= $('input[name=exam_group_id]').val(),
  246. userId=$('#user_id').val();
  247. $.ajax({
  248. url:'<?php echo $this->createUrl('assistTask/apply')?>',
  249. type:'POST',
  250. dataType:'json',
  251. data:{exam_group_id:examGroupId,user_id:userId},
  252. success:function(res){
  253. if(res.status==1){
  254. layer.msg('操作成功');
  255. window.location.reload();
  256. }else{
  257. layer.msg('操作失败');
  258. }
  259. }
  260. });
  261. });
  262. $('.apply').click(function(){
  263. var examGroupId=$(this).attr('eid');
  264. if(examGroupId!=undefined && examGroupId!=''){
  265. $('input[name=exam_group_id]').val(examGroupId);
  266. // layer.open({
  267. // title: false,
  268. // closeBtn: 0,
  269. // type: 1,
  270. //
  271. // content: $(".port-down-pop")
  272. // });
  273. $('.hgc_dialog').show();
  274. }
  275. });
  276. // tips
  277. $(".open-tips").on("mouseenter", function () {
  278. var tips_text = $(this).attr("tipstext");
  279. layer.tips(tips_text, this, {
  280. tips: [1, '#14AE68'] //还可配置颜色
  281. });
  282. });
  283. $('#selectId').change(function(){
  284. window.location.href='<?php echo $this->createUrl('assistTask/index')?>?subject_id='+$(this).val();
  285. });
  286. $(".prompt").mouseover(function(event){
  287. var tooltipHtml = "<div id='tooltip' class='tooltip'>Hello!</div>";
  288. $(this).append(tooltipHtml);
  289. $("#tooltip").css({
  290. "top": "0px",
  291. "left": (event.pageX) + "px" //紧跟在内容的后面
  292. }).show("fast"); //设置提示框的坐标,并显示
  293. }).mouseout(function(){
  294. $("#tooltip").remove();
  295. })
  296. $('.submit').click(function(){
  297. $('.task_search').submit();
  298. });
  299. });
  300. </script>