商丘12345 前端

Work-SecondList.html 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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,Isdeal = wv.index,wids = wv.wids,
  38. LXRs = wv.LXRs,LXRphones = wv.LXRphones,ZXResults = wv.ZXResults,
  39. zhuTiResults = wv.zhuTiResults,userResults = wv.userResults,
  40. DWResults = wv.DWResults;
  41. var keyw,State,page = 1,pageSize = 10,total,searchState;
  42. plus.nativeUI.closeWaiting();
  43. //显示当前页面
  44. mui.currentWebview.show();
  45. if (Isdeal == 4) {
  46. $(".Totle-box").text('待办理')
  47. } else if (Index == 0) {
  48. $(".Totle-box").text('待查收')
  49. }else if (Index == 2) {
  50. $(".Totle-box").text('退回审核')
  51. }
  52. if (Index == 3) {
  53. $(".Totle-box").text('延时审核')
  54. }
  55. if (Isdeal == 8) {
  56. $(".Totle-box").text('重办待交办')
  57. }
  58. if (Isdeal == 8 && Index == 0) {
  59. $(".Totle-box").text('重办待查收')
  60. }
  61. //二级单位已办理状态
  62. if (Isdeal == 6&&Index == 4) {
  63. $(".Totle-box").text('待回访')
  64. }
  65. if (Isdeal == 7&&Index == 4) {
  66. $(".Totle-box").text('已回访')
  67. }
  68. if (Isdeal == 8&&Index == 4) {
  69. $(".Totle-box").text('重办中')
  70. }
  71. if (Isdeal == 9&&Index == 4) {
  72. $(".Totle-box").text('已结案')
  73. }
  74. listData();
  75. $('.go_search').on('input focus', function() {
  76. keyw = $(this).val();
  77. page = 1;
  78. searchState=true;
  79. $(".order").remove();
  80. listData(keyw);
  81. });
  82. $(".mui-icon-clear").on("tap",function(){
  83. keyw = $(".go_search").val();
  84. page = 1;
  85. searchState=true;
  86. $(".order").remove();
  87. listData(keyw);
  88. })
  89. mui.init({
  90. swipeBack: false,
  91. pullRefresh: {
  92. container: '#pullrefresh',
  93. up: {
  94. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  95. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  96. callback: pullupRefresh
  97. }
  98. }
  99. });
  100. function pullupRefresh() {
  101. setTimeout(function() {
  102. mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
  103. listData()
  104. }, 1000);
  105. }
  106. function listData() {
  107. //alert("state="+Isdeal+"-----tab="+Index)
  108. mui.ajax(huayi.config.callcenter_url + 'WorkOrder/GetDWDealList', {
  109. data: {
  110. token: token,
  111. state: Isdeal,
  112. extensionphone: 1,
  113. page: page,
  114. key: keyw,
  115. pagesize: pageSize,
  116. workid: wids,
  117. type: userResults, //=工单类型
  118. tel: LXRphones, //=客户电话
  119. name: LXRs, //=客户名称
  120. usercode: ZXResults, //=坐席工号
  121. deptid: DWResults,
  122. keyid: zhuTiResults, //=关键词id
  123. tab: Index
  124. },
  125. dataType: 'json', //服务器返回json格式数据
  126. type: 'get', //HTTP请求类型
  127. async: false,
  128. timeout: 10000, //超时时间设置为10秒;
  129. headers: {
  130. 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
  131. },
  132. success: function(data) {
  133. total = data.total;
  134. if(searchState){
  135. $(".order").remove()
  136. searchState=false;
  137. }
  138. $(".Totle").text('(' + total + ')');
  139. for (var i = 0; i < data.rows.length; i++) {
  140. var a = data.rows[i].TypeName;
  141. var time = data.rows[i].F_CreateTime.substring(0, data.rows[i].F_CreateTime.indexOf(' '));
  142. var time1 = data.rows[i].LimitTime
  143. if (time1 == null) {
  144. shixian = "";
  145. } else {
  146. shixian = "办理时限:" + data.rows[i].LimitTime.substring(0, data.rows[i].LimitTime.indexOf(' '))
  147. }
  148. //alert(times)
  149. var TypeName = '';
  150. if (!a) {
  151. TypeName = "其他来源"
  152. } else {
  153. TypeName = a
  154. }
  155. $('<li class="mui-table-view-cell order" data-index="' + data.rows[i].F_WorkOrderId + '">' +
  156. '<div class="mui-table">' +
  157. '<div class="mui-table-cell mui-col-xs-12">' +
  158. '<h5 class="mui-ellipsis new_title" >' + data.rows[i].F_ComTitle + '</h5>' +
  159. ' <p class="mui-h6 mui-ellipsis">' +
  160. '<span class="advice"><i class="mui-icon mui-icon-compose"></i>' + a + '</span>' +
  161. '<span class="advice">' + shixian + '</span>' +
  162. '<span class="time">提交时间:' + time + '</span>' +
  163. ' </p>' +
  164. ' </div>' +
  165. '</div>' +
  166. '</li>').appendTo('#order_list');
  167. }
  168. },
  169. error: function(xhr, type, errorThrown) {
  170. //异常处理;
  171. }
  172. })
  173. }
  174. $('#order_list').on('tap', '.order', function() {
  175. var id = $(this).attr('data-index');
  176. mui.openWindow({
  177. id: 'WorkDetails',
  178. url: 'WorkDetails.html',
  179. show: {
  180. aniShow: 'pop-in'
  181. },
  182. styles: {
  183. popGesture: 'hide'
  184. },
  185. waiting: {
  186. autoShow: true
  187. },
  188. extras: {
  189. name: id,
  190. token: token
  191. }
  192. });
  193. })
  194. });
  195. }
  196. </script>
  197. </body>
  198. </html>