商丘市柘城县——前端

Work-jiaoban.html 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  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. .mui-input-row label~input, .mui-input-row label~select, .mui-input-row label~textarea{
  94. float: left;
  95. }
  96. </style>
  97. </head>
  98. <body>
  99. <header class="mui-bar mui-bar-nav " style="padding-right: 15px;height: 50px;color: #fff;">
  100. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  101. <h1 class="mui-center mui-title" style="color: #fff;">工单交办</h1>
  102. </header>
  103. <div class="mui-content">
  104. <ul class="mui-table-view">
  105. <li class="mui-table-view-cell">
  106. <div class="mui-input-row">
  107. <label class="label">调度意见:</label>
  108. <textarea name="" rows="" cols="" id="DDYJ"></textarea>
  109. </div>
  110. </li>
  111. <li class="mui-table-view-cell" id="showUserPicker">
  112. <div class="mui-input-row">
  113. <label class="label">办理时限:</label>
  114. <input id='demo1' data-options='{"type":"datetime","beginYear":year,"beginMonth":month,"beginDay":day}' type="text" class="mui-input-clear btn contact" />
  115. </div>
  116. </li>
  117. <li class="mui-table-view-cell" id="DW">
  118. <div class="mui-input-row">
  119. <label class="label">交办单位:</label>
  120. <input type="text" id='DWResult' class="ui-alert type_con" data-index="" readonly="readonly" />
  121. <a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
  122. </div>
  123. </li>
  124. </ul>
  125. <!--<button type="button" class="mui-btn mui-btn-primary mui-btn-block block_button">提交</button>-->
  126. <div style="padding: 10px;">
  127. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block block_button submit">提交</button>
  128. </div>
  129. </div>
  130. <script src="../js/mui.min.js?"></script>
  131. <script src="../js/mui.poppicker.js"></script>
  132. <script src="../js/mui.picker.min.js"></script>
  133. <script src="../js/zepto.js"></script>
  134. <script src="../js/huayi.config.js"></script>
  135. <script type="text/javascript">
  136. mui.init({
  137. swipeBack: false,
  138. })
  139. mui.plusReady(function() {
  140. var year=new Date().getFullYear();
  141. var month=new Date().getMonth();
  142. var day=new Date().getDate();
  143. var wv = plus.webview.currentWebview();
  144. var token = wv.token;
  145. var isdeals = wv.name;
  146. var btns = mui('.btn');
  147. //交办单位
  148. var dwList=[];
  149. $.ajax({
  150. type: "get",
  151. //GetDeptList
  152. url: huayi.config.callcenter_url + 'Department/GetDeptListtree',
  153. async: false,
  154. data: {
  155. token: token
  156. },
  157. dataType: 'json',
  158. success: function(data) {
  159. console.log(data)
  160. dwList = data.data;
  161. // alert(JSON.stringify(data));
  162. }
  163. });
  164. (function($, doc) {
  165. $.ready(function() {
  166. //交办单位
  167. var ZTiPickers = new $.PopPicker({
  168. layer: 3
  169. });
  170. ZTiPickers.setData(dwList);
  171. var ZXs = doc.getElementById('DW');
  172. var ZXResults = doc.getElementById('DWResult');
  173. ZXs.addEventListener('tap', function(event) {
  174. ZTiPickers.show(function(items) {
  175. console.log(items)
  176. ZXResults.value = items[2].text;
  177. ZXResults.setAttribute("data-index", items[2].id);
  178. //返回 false 可以阻止选择框的关闭
  179. //return false;
  180. });
  181. }, false);
  182. })
  183. })(mui, document);
  184. btns.each(function(i, btn) {  
  185. btn.addEventListener('tap', function() {   
  186. var dtPicker = new mui.DtPicker({    
  187. type: "date", //设置日历初始视图模式
  188. beginDate: new Date(year, month, day),//设置开始日期
  189.   
  190. });  
  191. dtPicker.show(function(e) {
  192. $("#demo1").val(e)
  193. }); 
  194. }, false);
  195. })
  196. //提交按钮
  197. $('.submit').on('tap', function() {
  198. var DDYJ = $("#DDYJ").val();
  199. var demo1 = $("#demo1").val();
  200. var DWResult = $("#DWResult").val();
  201. if(!DDYJ) {
  202. plus.nativeUI.toast('调度意见不能为空');
  203. } else if(!demo1) {
  204. plus.nativeUI.toast('输入办理时限');
  205. } else if(!DWResult) {
  206. plus.nativeUI.toast('输入交办单位');
  207. } else {
  208. var btnArray = ['取消', '确定'];
  209. mui.confirm('是否交办工单', '提示', btnArray, function(e) {
  210. if(e.index == 1) {
  211. mui.ajax(huayi.config.callcenter_url + 'WorkOrder/AssignWorkOrder', {
  212. data: {
  213. workorderid: isdeals,
  214. maindeptid: $("#DWResult").attr('data-index'), //单位
  215. limittime: $("#demo1").val(), //办理时限
  216. assignedopinion: $("#DDYJ").val(), //交办意见
  217. state: 1,
  218. token: token
  219. },
  220. dataType: 'json', //服务器返回json格式数据
  221. type: 'post', //HTTP请求类型
  222. timeout: 10000, //超时时间设置为10秒;
  223. success: function(data) {
  224. plus.nativeUI.toast('成功');
  225. $("#DDYJ").val('');
  226. $("#demo1").val('');
  227. $("#DWResult").val('');
  228. var wobj = plus.webview.getWebviewById("Work-listDCL");
  229. wobj.reload(true);
  230. },
  231. error: function(xhr, type, errorThrown) {
  232. plus.nativeUI.toast('失败');
  233. }
  234. });
  235. } else {
  236. plus.nativeUI.toast('取消申请');
  237. }
  238. })
  239. }
  240. })
  241. });
  242. </script>
  243. </body>
  244. </html>