商丘12345 前端

Work-listDCL.html 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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 rel="stylesheet" href="../css/mui.min.css" />
  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 src="../js/huayi.http.js"></script>
  34. <script src="js/listCommon.js"></script>
  35. <script type="text/javascript">
  36. window.onload = function() {
  37. mui.plusReady(function() {
  38. var token=localStorage.getItem("token"),page = 1,pageSize = 10,total;
  39. var keyw,State,searchState; //工单状态
  40. plus.nativeUI.closeWaiting();
  41. //显示当前页面
  42. mui.currentWebview.show();
  43. listData();
  44. $('.go_search').on('input focus', function() {
  45. keyw = $(this).val();
  46. page = 1;
  47. searchState=true;
  48. $(".order").remove()
  49. listData(keyw);
  50. });
  51. mui.init({
  52. swipeBack: false,
  53. pullRefresh: {
  54. container: '#pullrefresh',
  55. up: {
  56. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  57. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  58. callback: pullupRefresh
  59. }
  60. }
  61. });
  62. function pullupRefresh() {
  63. setTimeout(function() {
  64. mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
  65. listData();
  66. }, 1000);
  67. }
  68. function listData(){
  69. //alert("state"+index+"--tab"+isdeal)
  70. mui.ajax(huayi.config.callcenter_url + 'WorkOrder/GetLDDealList', {
  71. data: {
  72. token: token,
  73. extensionphone: 1,
  74. page: page,
  75. key: keyw,
  76. pagesize: pageSize,
  77. state: index, //=工单状态
  78. issatisfie: issatisfie,
  79. tab: isdeal
  80. },
  81. dataType: 'json', //服务器返回json格式数据
  82. async: false,
  83. type: 'get', //HTTP请求类型
  84. timeout: 10000, //超时时间设置为10秒;
  85. headers: {
  86. 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
  87. },
  88. success: function(data) {
  89. total = data.total;
  90. if(searchState){
  91. $(".order").remove()
  92. searchState=false;
  93. }
  94. $(".Totle").text('(' + total + ')');
  95. for(var i = 0; i < data.rows.length; i++) {
  96. var a = data.rows[i].TypeName;
  97. var time = data.rows[i].F_CreateTime.substring(0, data.rows[i].F_CreateTime.indexOf(' '));
  98. var time1=data.rows[i].LimitTime
  99. if (time1 == null) {
  100. shixian = "";
  101. } else{
  102. shixian = "办理时限:"+data.rows[i].LimitTime.substring(0, data.rows[i].LimitTime.indexOf(' '))
  103. }
  104. var TypeName = '';
  105. if(!a) {
  106. TypeName = "其他来源"
  107. } else {
  108. TypeName = a
  109. }
  110. $('<li class="mui-table-view-cell order" data-index="' + data.rows[i].F_WorkOrderId + '">' +
  111. '<div class="mui-table">' +
  112. '<div class="mui-table-cell mui-col-xs-12">' +
  113. '<h5 class="mui-ellipsis new_title" >' + data.rows[i].F_ComTitle + '</h5>' +
  114. ' <p class="mui-h6 mui-ellipsis">' +
  115. '<span class="advice"><i class="mui-icon mui-icon-compose"></i>' + a + '</span>' +
  116. '<span class="advice">' + shixian + '</span>' +
  117. '<span class="time">提交时间:' + time + '</span>' +
  118. ' </p>' +
  119. ' </div>' +
  120. '</div>' +
  121. '</li>').appendTo('#order_list');
  122. }
  123. },
  124. error: function(xhr, type, errorThrown) {
  125. //异常处理;
  126. }
  127. })
  128. }
  129. $('#order_list').on('tap', '.order', function() {
  130. var id = $(this).attr('data-index');
  131. var yclState=wv.yclList;
  132. mui.openWindow({
  133. id: 'WorkDetails',
  134. url: 'WorkDetails.html',
  135. createNew:true,
  136. show: {
  137. aniShow: 'pop-in'
  138. },
  139. styles: {
  140. popGesture: 'hide'
  141. },
  142. waiting: {
  143. autoShow: true
  144. },
  145. extras: {
  146. name: id,
  147. yclState:yclState,
  148. token: token
  149. }
  150. });
  151. })
  152. });
  153. }
  154. </script>
  155. </body>
  156. </html>