暫無描述

Work-jiaoban.html 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>我要投诉</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <link href="../css/mui.min.css" rel="stylesheet" />
  10. <link href="../css/mui.poppicker.css" rel="stylesheet" />
  11. <link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
  12. <style>
  13. .mui-bar-popover {
  14. width: 30%;
  15. }
  16. .mui-popover.mui-bar-popover .mui-table-view {
  17. width: 100%;
  18. }
  19. .mui-table-view .mui-table-view-cell>a:not(.mui-btn) {
  20. text-align: center;
  21. }
  22. .mui-table-view-cell {
  23. padding: 1px 15px!important;
  24. }
  25. .san {
  26. font-size: 14px;
  27. margin-right: 5px
  28. }
  29. .nav_a {
  30. border-right: 1px solid #ccc;
  31. }
  32. .radio_box {
  33. display: inline-block;
  34. }
  35. .mui-radio input[type=radio]:before {
  36. font-size: 20px;
  37. vertical-align: middle;
  38. }
  39. .mui-radio.mui-left input[type=radio] {
  40. line-height: 24px!important;
  41. }
  42. .mui-radio.mui-left label {
  43. padding-right: 1px!important;
  44. padding-left: 51px!important;
  45. }
  46. .ztext {
  47. width: 100%;
  48. margin: 0;
  49. border: 0;
  50. }
  51. .action {
  52. padding: 5px 15px;
  53. }
  54. .type_down {
  55. float: right!important;
  56. display: inline-block!important;
  57. vertical-align: middle!important;
  58. line-height: 42px;
  59. }
  60. .type_con {
  61. width: 55%!important;
  62. float: left!important;
  63. vertical-align: middle!important;
  64. display: inline-block!important;
  65. padding: 10px 0!important;
  66. }
  67. .label {
  68. width: 30%!important;
  69. padding: 11px 0px!important;
  70. }
  71. .get_yzm {
  72. padding: 5px!important;
  73. width: auto!important;
  74. }
  75. .yzm_con {
  76. float: left!important;
  77. width: 40%!important;
  78. }
  79. .mui-bar-nav {
  80. background-color: #00a1cb;
  81. }
  82. .mui-input-row label {
  83. text-align: -webkit-right;
  84. }
  85. .mui-btn-block {
  86. padding: 10px;
  87. width: 100%;
  88. }
  89. label {
  90. font-size: 16px;
  91. color: #fe6604;
  92. }
  93. </style>
  94. </head>
  95. <body>
  96. <header class="mui-bar mui-bar-nav " style="padding-right: 15px;height: 50px;color: #fff;">
  97. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  98. <h1 class="mui-center mui-title" style="color: #fff;">工单交办</h1>
  99. </header>
  100. <div class="mui-content">
  101. <ul class="mui-table-view">
  102. <li class="mui-table-view-cell">
  103. <div class="mui-input-row">
  104. <label class="label">调度意见:</label>
  105. <textarea name="" rows="" cols="" id="DDYJ"></textarea>
  106. </div>
  107. </li>
  108. <li class="mui-table-view-cell" id="showUserPicker">
  109. <div class="mui-input-row">
  110. <label class="label">办理时限:</label>
  111. <input id='demo1' data-options='{"type":"datetime","beginYear":year,"beginMonth":month,"beginDay":day}' type="text" class="mui-input-clear btn contact" />
  112. </div>
  113. </li>
  114. <li class="mui-table-view-cell" id="DW">
  115. <div class="mui-input-row">
  116. <label class="label">交办单位:</label>
  117. <input type="text" id='DWResult' class="ui-alert type_con" data-index="" readonly="readonly" />
  118. <a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
  119. </div>
  120. </li>
  121. </ul>
  122. <!--<button type="button" class="mui-btn mui-btn-primary mui-btn-block block_button">提交</button>-->
  123. <div style="padding: 10px;">
  124. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block block_button submit">提交</button>
  125. </div>
  126. </div>
  127. <script src="../js/mui.min.js?"></script>
  128. <script src="../js/mui.poppicker.js"></script>
  129. <script src="../js/mui.picker.min.js"></script>
  130. <script src="../js/zepto.js"></script>
  131. <script src="../js/huayi.config.js"></script>
  132. <script type="text/javascript">
  133. mui.init({
  134. swipeBack: false,
  135. })
  136. mui.plusReady(function() {
  137. var year=new Date().getFullYear();
  138. var month=new Date().getMonth();
  139. var day=new Date().getDate();
  140. var wv = plus.webview.currentWebview();
  141. var token = wv.token;
  142. var isdeals = wv.name;
  143. var btns = mui('.btn');
  144. //交办单位
  145. var dwList=[];
  146. $.ajax({
  147. type: "get",
  148. //GetDeptList
  149. url: huayi.config.callcenter_url + 'Department/GetDeptListtree',
  150. async: false,
  151. data: {
  152. token: token
  153. },
  154. dataType: 'json',
  155. success: function(data) {
  156. console.log(data)
  157. dwList = data.data;
  158. // alert(JSON.stringify(data));
  159. }
  160. });
  161. (function($, doc) {
  162. $.ready(function() {
  163. //交办单位
  164. var ZTiPickers = new $.PopPicker({
  165. layer: 3
  166. });
  167. ZTiPickers.setData(dwList);
  168. var ZXs = doc.getElementById('DW');
  169. var ZXResults = doc.getElementById('DWResult');
  170. ZXs.addEventListener('tap', function(event) {
  171. ZTiPickers.show(function(items) {
  172. console.log(items)
  173. ZXResults.value = items[2].text;
  174. ZXResults.setAttribute("data-index", items[2].id);
  175. //返回 false 可以阻止选择框的关闭
  176. //return false;
  177. });
  178. }, false);
  179. })
  180. })(mui, document);
  181.  
  182. btns.each(function(i, btn) {  
  183. btn.addEventListener('tap', function() {   
  184. var dtPicker = new mui.DtPicker({    
  185. type: "date", //设置日历初始视图模式
  186. beginDate: new Date(year, month, day),//设置开始日期
  187.   
  188. });  
  189. dtPicker.show(function(e) {
  190. $("#demo1").val(e)
  191. }); 
  192. }, false);
  193. })
  194. //提交按钮
  195. $('.submit').on('tap', function() {
  196. var DDYJ = $("#DDYJ").val();
  197. var demo1 = $("#demo1").val();
  198. var DWResult = $("#DWResult").val();
  199. if(!DDYJ) {
  200. plus.nativeUI.toast('调度意见不能为空');
  201. } else if(!demo1) {
  202. plus.nativeUI.toast('输入办理时限');
  203. } else if(!DWResult) {
  204. plus.nativeUI.toast('输入交办单位');
  205. } else {
  206. var btnArray = ['取消', '确定'];
  207. mui.confirm('是否交办工单', '提示', btnArray, function(e) {
  208. if(e.index == 1) {
  209. mui.ajax(huayi.config.callcenter_url + 'WorkOrder/AssignWorkOrder', {
  210. data: {
  211. workorderid: isdeals,
  212. maindeptid: $("#DWResult").attr('data-index'), //单位
  213. limittime: $("#demo1").val(), //办理时限
  214. assignedopinion: $("#DDYJ").val(), //交办意见
  215. state: 1,
  216. token: token
  217. },
  218. dataType: 'json', //服务器返回json格式数据
  219. type: 'post', //HTTP请求类型
  220. timeout: 10000, //超时时间设置为10秒;
  221. success: function(data) {
  222. plus.nativeUI.toast('成功');
  223. $("#DDYJ").val('');
  224. $("#demo1").val('');
  225. $("#DWResult").val('');
  226. var wobj = plus.webview.getWebviewById("Work-listDCL");
  227. wobj.reload(true);
  228. },
  229. error: function(xhr, type, errorThrown) {
  230. plus.nativeUI.toast('失败');
  231. }
  232. });
  233. } else {
  234. plus.nativeUI.toast('取消申请');
  235. }
  236. })
  237. }
  238. })
  239. });
  240. </script>
  241. </body>
  242. </html>