tuihui.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>湖北智慧水运</title>
  5. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  6. <meta http-equiv="description" content="this is my page">
  7. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
  9. <link>
  10. <link href="../css/base.min.css" rel="stylesheet">
  11. <link rel="stylesheet" type="text/css" href="../css/mui.min.css">
  12. <script type="text/javascript" src="../js/zepto.min.js"></script>
  13. <script type="text/javascript">
  14. var tempdata = parent.tempdata;
  15. var wxuserid = parent.wxuserid;
  16. function backs(){
  17. parent.huanjietuihuiclose();
  18. }
  19. $(function(){
  20. $.ajax({
  21. type: 'post',
  22. url: '../../wfcontroller/chooseuserwf.do',
  23. data:{taskId:parent.taskId,wfid:parent.wfid,flag:"th"},
  24. dataType: 'json',
  25. success: function(data){
  26. console.log(data)
  27. for(var i=0;i<data.stepNodeList.length;i++){
  28. var handlerNames = "";
  29. var handlerIds = "";
  30. for(var j=0;j<data.stepNodeList[i].handlerNames.length;j++){
  31. handlerNames=data.stepNodeList[i].handlerNames[j]+","
  32. }
  33. for(var k=0;k<data.stepNodeList[i].handlerIds.length;k++){
  34. handlerIds+=data.stepNodeList[i].handlerIds[k]+","
  35. }
  36. handlerIds = handlerIds.substring(0, handlerIds.length-1)
  37. handlerNames = handlerNames.substring(0, handlerNames.length-1)
  38. var taskKey = data.stepNodeList[i].taskKey
  39. $("#content").append('<tr>'+
  40. '<td width="100px">'+(i+1)+'</td>'+
  41. '<td width="100px">'+data.stepNodeList[i].taskName+'</td>'+
  42. '<td width="100px">'+handlerNames+'</td>'+
  43. '<td width="100px"><a href="javascript:void" onclick="tuihui(\''+handlerIds+'\',\''+taskKey+'\')">退回</a></td>'+
  44. '</tr>')
  45. }
  46. }})
  47. })
  48. function tuihui(handlerIds,taskKey){
  49. var days = $("#dayss").val();
  50. layer.open({
  51. content: '确定退回吗?',
  52. btn: ['取消', '确定'],
  53. shadeClose: false,
  54. yes: function(){
  55. layer.closeAll()
  56. }, no: function(){
  57. if(days.replace(/\s+/g,"")!=""){
  58. if(days <=0 || days!=parseInt(days)||days>10 ){
  59. layer.open({
  60. content: '请填写正确待办天数',
  61. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  62. time: 1
  63. });
  64. $("#dayss").val("");
  65. return;
  66. }
  67. }
  68. $.ajax({
  69. type: 'post',
  70. url: '../../'+parent.controller+'/'+parent.whmethd+'.do',
  71. data:{tempdata:tempdata,wxuserid:wxuserid,id:parent.idid,step:taskKey,yj:parent.yj,usersStr:handlerIds,days:days,uid:"402881e44e86c26d014e86c9ae8c0008"},
  72. dataType: 'json',
  73. success: function(data){
  74. console.log(data)
  75. if(data.resultCode==0){
  76. layer.open({
  77. shade:false,
  78. content: '退回成功',
  79. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  80. time: 1
  81. });
  82. setTimeout(function(){
  83. window.location.href=parent.iframurl;
  84. },1000);
  85. }else{
  86. layer.open({
  87. shade:false,
  88. content: '退回失败',
  89. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  90. time: 1
  91. });
  92. }
  93. // if(data.resultCode=="0"){
  94. // layer.open({
  95. // shade:false,
  96. // content: '退回成功',
  97. // style: 'background-color:black;font-size:20px;opacity:0.5; ;color:white; border:none;text-align:center;position: fixed;left:30%;bottom:50px',
  98. // time: 1
  99. // });
  100. // setTimeout(function(){
  101. // window.location.href="../dbfw.html";
  102. // },1000)
  103. // }
  104. }})
  105. }
  106. });
  107. }
  108. </script>
  109. <style type="text/css">
  110. .header {
  111. width:100%;
  112. height:45px;
  113. line-height:45px;
  114. padding:0;
  115. color:#eee;
  116. font-size:22px;
  117. text-align:center;
  118. color:white;
  119. background: #2196f3;
  120. }
  121. .nav{position: fixed;}
  122. body,button,input,div{margin: 0px;padding: 0px}
  123. body{
  124. font-family: "Helvetica Neue",Helvetica,sans-serif;
  125. font-size: 17px;}
  126. .mui-h5, h5{font-size:17px}
  127. </style>
  128. </head>
  129. <body>
  130. <header class="header">
  131. <ul class="nav nav-list pull-left">
  132. <li><a href="javascript:void(0);" id="goback" onclick="backs()" ><span class="icon icon-arrow-back icback"></span>
  133. </a></li>
  134. </ul>
  135. <a class="" href="#">选择环节用户</a>
  136. </header>
  137. <div class="content" style="margin-top: 45px;">
  138. <div class="content-inner">
  139. <div class="container">
  140. <div class="table-responsive">
  141. <table class="table" title="Default Tabl">
  142. <tbody id="content" style="text-align: center;">
  143. <tr>
  144. <td>序号</td>
  145. <td>环节</td>
  146. <td>办理人</td>
  147. <td>操作</td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. <h5 class="mui-content-padded"><label>限办天数</label><input type="text" id="dayss" style="width: 60px;margin-left:10px ;" />&nbsp;&nbsp;&nbsp;<span style="color: red;">可不填,最多可以设置10天</span></h5>
  152. </div>
  153. </div>
  154. </div>
  155. <div class="mui-button-row" style="">
  156. <button class="mui-btn mui-btn-positive" onclick="backs()" type="button" style="width: 60%;background: #2196f3;border: 0px;" id="yijianclick">取消 </button>&nbsp;&nbsp;
  157. </div>
  158. </div>
  159. </body>
  160. </html>