taskView.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>查看任务</title>
  6. <link href="/css/ims/base.css" rel="stylesheet">
  7. <link href="/css/ims/ims.css" rel="stylesheet">
  8. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css" />
  9. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css" />
  10. <link rel="stylesheet" type="text/css" href="/css/ims/jquery.datetimepicker.css" />
  11. <style>
  12. .ims-box {
  13. margin: 20px;
  14. }
  15. .screen {
  16. padding-left: 20px;
  17. height: 44px;
  18. line-height: 44px;
  19. background-color: #eff4fa;
  20. }
  21. .screen li {
  22. float: left;
  23. margin-right: 65px;
  24. }
  25. .bg-d9bf6e {
  26. margin-left: 5px;
  27. padding: 0 20px;
  28. color: #fff;
  29. background-color: #d9bf6e;
  30. }
  31. .list {
  32. padding: 0 40px;
  33. /*margin-top: 40px;*/
  34. overflow: hidden;
  35. }
  36. .list h2 {
  37. line-height: 30px;
  38. font-size: 14px;
  39. }
  40. .list .student-list_box {
  41. width: 500px;
  42. margin-bottom: 15px;
  43. }
  44. .list .student-list_box>ul {
  45. height: 260px;
  46. overflow: auto;
  47. padding: 20px;
  48. background-color: #eef3ff;
  49. }
  50. .list .student-list_box li {
  51. line-height: 30px;
  52. cursor: pointer;
  53. }
  54. .list .student-list {
  55. display: none;
  56. margin-left: 20px;
  57. }
  58. .list .student-list li.active .btn-select_all {
  59. display: inline-block;
  60. }
  61. .list .student-list span {
  62. cursor: pointer;
  63. }
  64. .list .btn-select_all {
  65. margin-left: 84px;
  66. color: #008000;
  67. }
  68. .student-name_box li {
  69. position: relative;
  70. margin-left: 28px;
  71. line-height: 30px;
  72. }
  73. .student-name_box input {
  74. position: absolute;
  75. left: 155px;
  76. top: 8px;
  77. }
  78. .btn-select_all,
  79. .student-name_box {
  80. display: none;
  81. }
  82. .student-selected {
  83. width: 320px;
  84. height: 300px;
  85. overflow: auto;
  86. }
  87. .student-selected li {
  88. float: left;
  89. margin-right: 24px;
  90. margin-bottom: 12px;
  91. width: 280px;
  92. height: 26px;
  93. line-height: 26px;
  94. text-indent: 20px;
  95. background-color: #f2f2f2;
  96. }
  97. .student-selected .btn-delete {
  98. float: right;
  99. margin-right: 20px;
  100. color: red;
  101. cursor: pointer;
  102. }
  103. .btn-confirm_purchase {
  104. display: block;
  105. margin: 0 auto;
  106. margin-top: 100px;
  107. margin-bottom: 50px;
  108. width: 430px;
  109. line-height: 54px;
  110. color: #fff;
  111. font-family: PingFangSC-Regular, "PingFang SC";
  112. font-weight: 400;
  113. font-style: normal;
  114. font-size: 20px;
  115. text-align: center;
  116. background-color: rgba(0, 153, 102, 1);
  117. cursor: pointer;
  118. }
  119. .sale-table input {
  120. border: 1px solid #ccc;
  121. border-radius: 4px;
  122. }
  123. #imgPreview {
  124. display: inline-block;
  125. margin-top: 12px;
  126. }
  127. #imgPreview > img {
  128. max-width: 100px;
  129. max-height: 100px;
  130. margin-right: 5px;
  131. cursor: pointer;
  132. }
  133. .layui-layer-btn .layui-layer-btn0 {
  134. border-color: #15ae68 !important;
  135. background-color: #15ae68 !important;
  136. color: #fff;
  137. }
  138. .stop-layer-box, .resubmit-layer-box, .delete-layer-box {
  139. line-height: 140px;
  140. text-align: center;
  141. }
  142. .layui-layer-content{
  143. text-align: center;
  144. }
  145. .layui-layer-content img {
  146. max-width: 100% !important;
  147. max-height: 100% !important;
  148. }
  149. </style>
  150. </head>
  151. <body>
  152. <h3 class="sale-title">查看任务</h3>
  153. <input type="hidden" name="itemName">
  154. <input type="hidden" name="itemSpec">
  155. <input type="hidden" name="itemCode">
  156. <input type="hidden" name="unitId">
  157. <div class="sale-table">
  158. <table width="100%">
  159. <tr>
  160. <th>学校</th>
  161. <td >
  162. <?php echo $storageName; ?>
  163. </td>
  164. <th>学管</th>
  165. <td >
  166. <?php echo $coachName; ?>
  167. </td>
  168. </tr>
  169. <tr>
  170. <th>清洁时间</th>
  171. <td >
  172. <?php echo date('Y-m-d H:i:s'); ?>
  173. </td>
  174. <th>提交截止时间</th>
  175. <td >
  176. <?php echo $epDate; ?>
  177. </td>
  178. </tr>
  179. <tr>
  180. <th>图片上传</th>
  181. <td colspan="3">
  182. <div id="imgPreview">
  183. <?php if(!empty($images)){
  184. foreach($images as $v){
  185. ?>
  186. <img class="preview" src="<?php echo $v; ?>">
  187. <?php
  188. }
  189. }?>
  190. </div>
  191. </td>
  192. </tr>
  193. <tr>
  194. <th>备注</th>
  195. <td colspan="3">
  196. <textarea name="remark" id="remark" cols="90" class="use-explain" rows="5" readonly><?php echo $remark; ?></textarea>
  197. </td>
  198. </tr>
  199. </table>
  200. <h3 class="sale-title">清洁设备</h3>
  201. <table width="100%" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" id="P_list">
  202. <tr>
  203. <td>设备编号</td>
  204. <td>设备名称</td>
  205. <td>规格</td>
  206. <td>设备状态</td>
  207. </tr>
  208. <tr>
  209. <td><?php echo $fixedCode; ?></td>
  210. <td><?php echo $itemName; ?></td>
  211. <td><?php echo $itemSpec; ?></td>
  212. <td><?php echo $fixedStatus; ?></td>
  213. <input type="hidden" id="epsId" value="<?php echo $epsId; ?>" />
  214. </tr>
  215. </table>
  216. <h3 class="sale-title">审核记录</h3>
  217. <table width="100%" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable" id="P_list">
  218. <?php if(!empty($log)){
  219. foreach($log as $type=>$info){
  220. if($type == 0){ //0组长审核 1学管审核 2设备部审核
  221. ?>
  222. <tr>
  223. <td>组长审核</td>
  224. <td><?php echo $info['checkDate'].' '.$info['checkResult'].' '.$info['comment'];?></td>
  225. </tr>
  226. <?php
  227. }elseif($type == 1){
  228. ?>
  229. <tr>
  230. <td>学管审核</td>
  231. <td><?php echo $info['checkDate'].' '.$info['checkResult'].' '.$info['comment'];?></td>
  232. </tr>
  233. <?php
  234. }elseif($type == 2){
  235. ?>
  236. <tr>
  237. <td>设备部审核</td>
  238. <td><?php echo $info['checkDate'].' '.$info['checkResult'].' '.$info['comment'];?></td>
  239. </tr>
  240. <?php
  241. }
  242. ?>
  243. <?php
  244. }
  245. }?>
  246. </table>
  247. </div>
  248. <div class="sale-submit" style="margin-top: 25px;">
  249. <button type="button" class="go_back " id="">返回</button>
  250. <input type="hidden" name="back_page" value="<?php echo $page?>">
  251. <?php if($isGroup == 1) {?><button type="button" data-id="<?php echo $processInfoBO['currentTaskId']; ?>" class=" label-primary-s bth-s" id="savebutton">审核</button> <?php } ?>
  252. </div>
  253. <script src="/js/jquery-2.2.2.min.js" ></script>
  254. <script src="/js/jquery.datetimepicker.js"></script>
  255. <script src="/js/layer/layer.js"></script>
  256. <script src="/js/xsgl.js"></script>
  257. <script>
  258. $(document).ready(function () {
  259. // 添加图片
  260. $("#uploadImg").on("change", function () {
  261. //限制图片数量
  262. var imgObj = $('#imgPreview img');
  263. var formData = new FormData();
  264. formData.append('uploadFile', document.getElementById('uploadImg').files[0]);
  265. var basic = "<?php echo $basic;?>";
  266. $.ajax({
  267. url: "<?php echo $uploadUrl;?>",
  268. type: "post",
  269. data: formData,
  270. processData: false,
  271. contentType: false,
  272. beforeSend: function (req) {
  273. req.setRequestHeader("Authorization", basic);
  274. },
  275. success: function (data) {
  276. console.log(data);
  277. if (data.errCode == '00') {
  278. var html = "<img src='" + data.data.url + "'>";
  279. $('#imgPreview').append(html);
  280. $('#uploadImg').val('');
  281. } else {
  282. layer.msg(data.errMsg);
  283. }
  284. }
  285. });
  286. });
  287. //删除图片
  288. // $("body").on("click", "#imgPreview img", function () {
  289. // var obj = $(this);
  290. // var imgUrl = $(this).attr('src');
  291. // layer.confirm('您确定删除此图片吗?', {
  292. // btn: ['确定', '取消'] //按钮
  293. // }, function () {
  294. // obj.remove();
  295. // layer.closeAll();
  296. // });
  297. // });
  298. //查看图片
  299. var thatDom
  300. $('body').on('click', '#imgPreview img', function () {
  301. thatDom = $(this) //当前dom
  302. layer.open({
  303. type: 1,
  304. title: '查看图片',
  305. btn: ['上一个','关闭','下一个'],
  306. yes: function(index, layero){
  307. // 上一个
  308. if(thatDom.index()===0){
  309. layer.msg('已经是第一张了!');
  310. return
  311. }
  312. thatDom = thatDom.prev()
  313. // this.content = '<img src="'+thatDom.attr('src')+'" alt="" style="margin-top:5px;width: 100%;height: 100%">'
  314. $(layero.selector).find('img').attr("src",thatDom.attr('src'));
  315. },btn2: function(index, layero){
  316. // 关闭
  317. layer.closeAll();
  318. //return false 开启该代码可禁止点击该按钮关闭
  319. },btn3: function(index, layero){
  320. // 下一个
  321. if(thatDom.index()===thatDom.parent().find('img').length-1){
  322. layer.msg('已经是最后一张了!');
  323. return
  324. }
  325. thatDom = thatDom.next()
  326. // this.content = '<img src="'+thatDom.attr('src')+'" alt="" style="margin-top:5px;width: 100%;height: 100%">'
  327. $(layero.selector).find('img').attr("src",thatDom.attr('src'));
  328. //return false 开启该代码可禁止点击该按钮关闭
  329. },
  330. area: ['800px', '500px'], //宽高
  331. btnAlign: 'c',
  332. content: '<img src="'+thatDom.attr('src')+'" alt="" style="margin-top:5px;">',
  333. });
  334. })
  335. $(".go_back").on("click", function (){
  336. window.location="<?php echo $isGroup ? $this->createUrl('imsDevice/taskVerify') : $this->createUrl('imsDevice/taskClean') ;?>";
  337. });
  338. $(".bth-s").on("click", function () {
  339. var currentTaskId = $(this).attr('data-id');
  340. layer.open({
  341. type: 1,
  342. title: '审核',
  343. btn: ['确定', '取消'],
  344. area: ['420px', '240px'], //宽高
  345. btnAlign: 'c',
  346. content: '<div class="application-number-box"><table><tr><td width="150px;" style="text-align: center;padding-top: 10px;">结果:</td><td tyle="text-align: center;padding-top: 10px;"><input type="radio" checked name="verify" value="0" />合格&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="verify" value="1" />不合格</td></tr><tr><td><div style="line-height: 10px;height:10px;"></div></td></tr><tr><td style="text-align: center">备注:</td><td><textarea id="comment" cols="25" rows="5"></textarea> </td></tr></table> </div>',
  347. yes: function (index, layero) {
  348. var verify = $('input:radio[name=verify]:checked').val();
  349. var comment = $("#comment").val();
  350. // alert(verify);alert(comment);
  351. // alert(currentTaskId);return false;
  352. $.ajax({
  353. type: 'post',
  354. url: "<?php echo $this->createUrl('imsDevice/taskView') ;?>",
  355. data: {'verify':verify, 'comment':comment, 'currentTaskId': currentTaskId},
  356. dataType: 'json',
  357. success: function (data) {
  358. if (data.status){
  359. window.location="<?php echo $this->createUrl('imsDevice/taskVerify',array('page'=>$page)) ;?>";
  360. } else{
  361. layer.msg(data.msg);
  362. }
  363. },
  364. error: function () {
  365. layer.msg("异常错误");
  366. }
  367. });
  368. },
  369. btn2: function (index, layero) {
  370. //return false 开启该代码可禁止点击该按钮关闭
  371. }
  372. });
  373. return false;
  374. });
  375. })
  376. </script>
  377. <?php //include_once '_allocationJs.php'?>
  378. </body>
  379. </html>