taskClean.php 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <title>清洁单列表</title>
  7. <meta name="description" content="">
  8. <meta name="keywords" content="">
  9. <link href="/css/ims/base.css" rel="stylesheet">
  10. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css"/>
  11. <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css"/>
  12. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
  13. <style>
  14. .green {
  15. color: green;
  16. }
  17. .red {
  18. color: red;
  19. }
  20. .ims-box {
  21. margin: 20px;
  22. }
  23. .screen > div {
  24. float: left;
  25. margin-right: 8px;
  26. }
  27. .screen .date > input {
  28. height: 30px;
  29. border-radius: 4px;
  30. border: 1px solid #ccc;
  31. box-shadow: none;
  32. text-indent: 10px;
  33. }
  34. .screen .purposeOrderNo > input {
  35. height: 30px;
  36. border-radius: 4px;
  37. border: 1px solid #ccc;
  38. box-shadow: none;
  39. text-indent: 10px;
  40. }
  41. .screen button {
  42. padding: 4px 12px;
  43. }
  44. .table-box {
  45. margin-top: 30px;
  46. }
  47. .btn-formal-order {
  48. cursor: pointer;
  49. }
  50. .application-number-box {
  51. margin-top: 50px;
  52. text-align: center;
  53. }
  54. .application-number-box span {
  55. margin-right: 20px;
  56. }
  57. .layui-layer-btn .layui-layer-btn0 {
  58. border-color: #15ae68 !important;
  59. background-color: #15ae68 !important;
  60. color: #fff;
  61. }
  62. .btn-date_show{
  63. display: inline-block;width: 170px;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
  64. }
  65. </style>
  66. </head>
  67. <body>
  68. <div class="ims-box">
  69. <form action="<?php echo Yii::app()->createUrl('imsDevice/taskClean'); ?>" method="get">
  70. <div class="screen">
  71. <div class="purposeOrderNo">
  72. <input type="text" placeholder="计划名称" id="epName" name="epName" value="<?php echo isset($_GET['epName'])?$_GET['epName']:'' ;?>"/>
  73. </div>
  74. <div class="date">
  75. <input type="text" placeholder="清洁开始时间" name="beginTime" class="some_class" value="<?php echo isset($_GET['beginTime'])?$_GET['beginTime']:'' ;?>" id="some_class_1"/>
  76. <span style="position: relative;left:-25px;cursor: pointer;color: red;" onclick="javascript:$(this).prev().val('');">x</span>
  77. --
  78. <input type="text" placeholder="清洁结束时间" name="endTime" class="some_class" value="<?php echo isset($_GET['endTime'])?$_GET['endTime']:'' ;?>" id="some_class_2"/>
  79. <span style="position: relative;left:-25px;cursor: pointer;color: red;" onclick="javascript:$(this).prev().val('');">x</span>
  80. </div>
  81. <button type="submit" class="label-primary-s bth-s">查询</button>
  82. </div>
  83. </form>
  84. <div class="table-box">
  85. <table id="intention-table"
  86. class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
  87. style="font-size:12px">
  88. <thead>
  89. <tr>
  90. <th>计划名称</th>
  91. <th>计划编号</th>
  92. <th>提交截止时间</th>
  93. <th>要求清洁日期</th>
  94. <th>设备编号</th>
  95. <th>设备名称</th>
  96. <th>设备状态</th>
  97. <th>任务提交时间</th>
  98. <th>状态</th>
  99. <th>最终审核结果</th>
  100. <th>组长</th>
  101. <th>组长审核意见</th>
  102. <th>学管部审核意见</th>
  103. <th>设备部审核意见</th>
  104. <th>操作</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. <?php
  109. if ($list):
  110. ?>
  111. <?php foreach ($list as $item): ?>
  112. <tr>
  113. <td><?php echo $item['epName'];?></td>
  114. <td><?php echo $item['epCode'];?></td>
  115. <td><?php echo $item['coachDate'];?></td>
  116. <td><?php echo $item['epDate'];?></td>
  117. <td><?php echo $item['fixedCode'];?></td>
  118. <td><?php echo $item['itemName'];?></td>
  119. <td><?php echo $item['fixedStatus'];?></td>
  120. <td><?php echo $item['coachRealDate'];?></td>
  121. <td><?php echo $item['statusName'];?></td>
  122. <td><?php echo $item['finalResultName'];?></td>
  123. <td><?php echo $item['groupName'];?></td>
  124. <td><?php echo $item['groupCheckResultName'];?></td>
  125. <td><?php echo $item['recheckResultName'];?></td>
  126. <td><?php echo $item['spotCheckResultName'];?></td>
  127. <td>
  128. <?php
  129. if($item['status'] == 1) echo '<a href="'.$this->createUrl('imsDevice/taskSubmit',array('epsId'=>$item['epsId'])).'">提交</a>';
  130. elseif($item['status'] > 1) {
  131. // echo '<a onclick="submitOrder('.$item['epsId'].')" class="btn-review">中止</a>';
  132. if($item['status'] == 9 && !$item['finalResult']){
  133. echo '<a href="'.$this->createUrl('imsDevice/taskView',array('epsId'=>$item['epsId'], 'isGroup'=>0)).'">查看</a> '.'<a href="'.$this->createUrl('imsDevice/taskSubmit',array('epsId'=>$item['epsId'])).'">重新提交</a>' ;
  134. }elseif($item['status'] == 2){
  135. echo '<a href="'.$this->createUrl('imsDevice/taskView',array('epsId'=>$item['epsId'], 'isGroup'=>0)).'">查看</a> '.'<a style="cursor:pointer;" onclick="submitOrder(\''.$item['epsId'].'\')" class="btn-review">中止</a>' ;
  136. }else{
  137. echo '<a href="'.$this->createUrl('imsDevice/taskView',array('epsId'=>$item['epsId'], 'isGroup'=>0)).'">查看</a>' ;
  138. }
  139. }
  140. ?>
  141. </td>
  142. </tr>
  143. <?php endforeach; ?>
  144. <?php endif; ?>
  145. </tbody>
  146. </table>
  147. <?php if ($page): ?>
  148. <div class="col-sm-12">
  149. <ul class="pagination">
  150. <?php
  151. $params = array();
  152. if (isset($_GET['epName']) && $_GET['epName']) {
  153. $params['epName'] = $_GET['epName'];
  154. }
  155. if (isset($_GET['beginTime']) && $_GET['beginTime']) {
  156. $params['beginTime'] = $_GET['beginTime'];
  157. }
  158. if (isset($_GET['endTime']) && $_GET['endTime']) {
  159. $params['endTime'] = $_GET['endTime'];
  160. }
  161. if (isset($_GET['page'])) {
  162. $params['page'] = $_GET['page'];
  163. }else{
  164. $params['page'] = 1;
  165. }
  166. echo formatPage($page, 'imsDevice/taskClean', $params);
  167. ?>
  168. </ul>
  169. </div>
  170. <?php endif; ?>
  171. </div>
  172. </div>
  173. <script src="/js/productset/jquery.min.js"></script>
  174. <script src="/js/ims/jquery.datetimepicker.js"></script>
  175. <script src="/js/ims/xsgl.js"></script>
  176. <script src="/js/layer/layer.js"></script>
  177. <script>
  178. $(document).ready(function () {
  179. //筛选条件赋值
  180. <?php if(isset($_GET['goodsId']) && $_GET['goodsId']):?>
  181. var goodsId = "<?php echo $_GET['goodsId'];?>";
  182. $('#goodsId').val(goodsId);
  183. var txt = $('.diy_select li[val='+goodsId+']').html();
  184. $('.diy_select_txt').html(txt);
  185. <?php endif;?>
  186. $('.some_class').datetimepicker({
  187. format: "Y-m-d H:i:s", //格式化日期
  188. //timepicker: false //关闭时间选项
  189. });
  190. // $(".btn-date_show").on("click", function () {
  191. // layer.alert($(this).text(), {
  192. // title: '使用月份',
  193. // area: ['420px', '240px']
  194. // });
  195. // });
  196. });
  197. $('body').on('focus', '#applicationNumber', function () {
  198. $('.alert-msg').css("display",'none');
  199. });
  200. //确认提交
  201. function submitOrder(id) {
  202. layer.confirm('确认中止?', {
  203. btn: ['确定','取消'] //按钮
  204. }, function(){
  205. $.ajax({
  206. url: "<?php echo $this->createUrl('imsDevice/Suspend?epsId=');?>" + id,
  207. type: "post",
  208. dataType: "json",
  209. success: function (data) {
  210. if (data.status === 1) {
  211. layer.alert("操作成功", {icon: 1,closeBtn:0}, function () {
  212. location.reload();
  213. })
  214. }else {
  215. layer.msg(data.msg);
  216. }
  217. }
  218. });
  219. });
  220. }
  221. </script>
  222. </body>
  223. </html>