cooperate_scan.php 12 KB

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