商丘12345 前端

Work-list.html 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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 rel="stylesheet" href="../css/iconfont.css" />
  11. <link rel="stylesheet" type="text/css" href="css/list.css" />
  12. </head>
  13. <body>
  14. <header class="mui-bar mui-bar-nav" style="padding-right: 15px;color: #fff;">
  15. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  16. <h1 class="mui-center mui-title"><span class="Totle-box"></span><span class="Totle">工单列表</span></h1>
  17. </header>
  18. <div class="mui-content mui-scroll-wrapper" id="pullrefresh">
  19. <div class="mui-scroll">
  20. <ul class="mui-table-view mui-table-view-striped mui-table-view-condensed" id="order_list">
  21. <li class="mui-table-view-cell">
  22. <div class="mui-input-row mui-search ">
  23. <input type="search" class="mui-input-clear go_search Width" placeholder="请输入关键字" style="margin-bottom: 0;">
  24. </div>
  25. </li>
  26. </ul>
  27. </div>
  28. <!--右上角弹出菜单-->
  29. </div>
  30. <script src="../js/mui.min.js"></script>
  31. <script src="../js/zepto.js"></script>
  32. <script src="../js/huayi.config.js"></script>
  33. <script type="text/javascript">
  34. window.onload = function() {
  35. mui.plusReady(function() {
  36. var wv = plus.webview.currentWebview();
  37. var token = wv.token,Index = wv.isdeal,wids = wv.wids,LXRs = wv.LXRs,LXRphones = wv.LXRphones,
  38. ZXResults = wv.ZXResults,zhuTiResults = wv.zhuTiResults,userResults = wv.userResults,
  39. DWResults = wv.DWResults,startData = wv.startData,endData = wv.endData,orderResult = wv.orderResult,
  40. dispatchResult = wv.dispatchResult,test = wv.test,keyw = wv.key;
  41. var State = orderResult,page = 1,pageSize = 10,total,searchState;
  42. plus.nativeUI.closeWaiting();
  43. //显示当前页面
  44. mui.currentWebview.show();
  45. listData();
  46. $('.go_search').on('input focus', function() {
  47. keyw = $(this).val();
  48. page = 1;
  49. searchState=true;
  50. $(".order").remove();
  51. listData(keyw);
  52. });
  53. $(".mui-icon-clear").on("tap",function(){
  54. keyw = $(".go_search").val();
  55. page = 1;
  56. searchState=true;
  57. $(".order").remove();
  58. listData(keyw);
  59. })
  60. mui.init({
  61. swipeBack: false,
  62. pullRefresh: {
  63. container: '#pullrefresh',
  64. up: {
  65. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  66. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  67. callback: pullupRefresh
  68. }
  69. }
  70. });
  71. function pullupRefresh() {
  72. setTimeout(function() {
  73. mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
  74. listData();
  75. }, 1000);
  76. }
  77. function listData() {
  78. //startData+endData+"+"+orderResult+"+"+dispatchResult
  79. mui.ajax(huayi.config.callcenter_url + 'WorkOrder/GetList', {
  80. data: {
  81. token: token,
  82. extensionphone: 1,
  83. page: page,
  84. key: keyw,
  85. pagesize: pageSize,
  86. workid: wids,
  87. type: userResults, //=工单类型
  88. tel: LXRphones, //=客户电话
  89. name: LXRs, //=客户名称
  90. usercode: ZXResults, //=坐席工号
  91. deptid: DWResults,
  92. keyid: zhuTiResults, //=关键词id
  93. state: orderResult, //工单状态
  94. ddusercode: dispatchResult, //调度员
  95. starttime: startData, //开始时间
  96. endtime: endData, //结束时间
  97. tab: Index
  98. },
  99. dataType: 'json', //服务器返回json格式数据
  100. type: 'get', //HTTP请求类型
  101. async: false,
  102. timeout: 10000, //超时时间设置为10秒;
  103. headers: {
  104. 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
  105. },
  106. success: function(data) {
  107. total = data.total;
  108. if(searchState){
  109. $(".order").remove()
  110. searchState=false;
  111. }
  112. for (var i = 0; i < data.rows.length; i++) {
  113. var a = data.rows[i].TypeName;
  114. var c = data.rows[i].F_WorkState;
  115. var time = data.rows[i].F_CreateTime.substring(0, data.rows[i].F_CreateTime.indexOf(' '));
  116. var time1 = data.rows[i].LimitTime
  117. if (time1 == null) {
  118. shixian = "";
  119. } else {
  120. shixian = "办理时限:" + data.rows[i].LimitTime.substring(0, data.rows[i].LimitTime.indexOf(' '))
  121. }
  122. var TypeName = '';
  123. if (!a) {
  124. TypeName = "其他来源"
  125. } else {
  126. TypeName = a
  127. }
  128. var html = '';
  129. if (c == 0) {
  130. html = '新工单';
  131. if (data.rows[i].F_IsReturn == 1) {
  132. html = '新工单(回退)';
  133. }
  134. } else if (c == 1) {
  135. html = '待交办';
  136. } else if (c == 2) {
  137. html = '待查收';
  138. } else if (c == 3) {
  139. html = '退回审核中';
  140. } else if (c == 4) {
  141. html = '办理中';
  142. } else if (c == 5) {
  143. html = '延时审核';
  144. } else if (c == 6) {
  145. html = '已办理';
  146. } else if (c == 7) {
  147. html = '已办理';
  148. } else if (c == 8) {
  149. html = '重办中';
  150. } else if (c == 9) {
  151. html = '已结案';
  152. }
  153. $('<li class="mui-table-view-cell order" data-index="' + data.rows[i].F_WorkOrderId + '">' +
  154. '<div class="mui-table">' +
  155. '<div class="mui-table-cell mui-col-xs-12">' +
  156. '<h5 class="mui-ellipsis new_title" >' + data.rows[i].F_ComTitle + '</h5>' +
  157. ' <p class="mui-h6 mui-ellipsis">' +
  158. '<span class="advice"><i class="mui-icon mui-icon-compose"></i>' + a + '</span>' +
  159. '<span class="advice">' + shixian + '</span>' +
  160. '<span class="time">提交时间:' + time + '</span>' +
  161. ' </p>' +
  162. ' </div>' +
  163. '</div>' +
  164. '</li>').appendTo('#order_list');
  165. }
  166. },
  167. error: function(xhr, type, errorThrown) {
  168. //异常处理;
  169. }
  170. })
  171. }
  172. $('#order_list').on('tap', '.order', function() {
  173. var id = $(this).attr('data-index');
  174. mui.openWindow({
  175. id: 'WorkDetails',
  176. url: '../search/WorkDetails.html',
  177. show: {
  178. aniShow: 'pop-in'
  179. },
  180. styles: {
  181. popGesture: 'hide'
  182. },
  183. waiting: {
  184. autoShow: true
  185. },
  186. extras: {
  187. name: id,
  188. token: token
  189. }
  190. });
  191. })
  192. });
  193. }
  194. </script>
  195. </body>
  196. </html>