説明なし

WorkCL.html 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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" href="../css/inits.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. .san {
  20. font-size: 14px;
  21. margin-right: 5px
  22. }
  23. .nav_a {
  24. border-right: 1px solid #ccc;
  25. }
  26. .time {
  27. text-align: right;
  28. }
  29. .mui-table-view .mui-media-object {
  30. /* line-height: 71px; */
  31. max-width: 80px;
  32. height: 80px;
  33. }
  34. input[type=search] {
  35. border: 1px solid #ccc;
  36. border-radius: 18px;
  37. background-color: rgb(255, 255, 255);
  38. }
  39. .Success {
  40. color: #4cd964;
  41. }
  42. .Finish {
  43. color: #ccc;
  44. }
  45. .mui-search.mui-active:before {
  46. font-size: 20px;
  47. right: auto;
  48. left: 5px;
  49. display: block;
  50. margin-right: 0;
  51. top: 25px;
  52. }
  53. .mui-icon-clear{
  54. right: 80px!important;
  55. }
  56. .mui-search{
  57. margin-right: 55px;
  58. }
  59. .success{
  60. color: #ccc;
  61. }
  62. .wait{
  63. color: #2AC845;
  64. }
  65. </style>
  66. </head>
  67. <body>
  68. <div class="mui-content mui-content mui-scroll-wrapper" id="pullrefresh">
  69. <div class="mui-scroll">
  70. <ul class="mui-table-view" id="OA_task_2">
  71. <li class="mui-table-view-cell">
  72. <div class="mui-input-row mui-search">
  73. <input type="search" class="mui-input-clear go_search" placeholder="请输入关键字" style="margin-bottom: 0;">
  74. </div>
  75. <div class="mui-btn mui-btn-primary turnGo">更多</div>
  76. </li>
  77. </ul>
  78. </div>
  79. </div>
  80. <script src="../js/zepto.js"></script>
  81. <script src="../Script/Common/huayi.config.js"></script>
  82. <script src="../Script/Common/huayi.http.js"></script>
  83. <script src="../js/mui.min.js"></script>
  84. <script type="text/javascript">
  85. var usercode=helper.cookies.get("usercode");
  86. console.log(usercode);
  87. // if(usercode){
  88. var page = 1; //页数
  89. var pageSize = 10; //每页显示条目
  90. var total; //数据总条数
  91. var Type_=1;
  92. var state=helper.request.queryString("state");//手机号
  93. var name=helper.request.queryString("name");//手机号
  94. var tel=helper.request.queryString("tel");//受理编号
  95. // var starttime=helper.request.queryString("starttime");//受理编号
  96. // var endtime=helper.request.queryString("endtime");//受理编号
  97. var workid=helper.request.queryString("workid");//受理编号
  98. var source=helper.request.queryString("source");//受理编号
  99. var infotype=helper.request.queryString("infotype");//受理编号
  100. mui.init({
  101. swipeBack: false,
  102. pullRefresh: {
  103. container: '#pullrefresh',
  104. up: {
  105. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  106. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  107. callback: pullupRefresh
  108. }
  109. }
  110. });
  111. //查找
  112. $('.go_search').on('input focus', function() {
  113. keyw = $(this).val();
  114. page = 1;
  115. console.log();
  116. Ajax(keyw);
  117. })
  118. Ajax();
  119. // 下拉刷新
  120. function pullupRefresh(keyw) {
  121. setTimeout(function() {
  122. mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
  123. $.ajax({
  124. url: huayi.config.callcenter_url + 'WxLogin/GetList',
  125. data: {
  126. // openid: helper.cookies.get("openid"), //微信openid
  127. openid: "oKOqcv31fh76rtNmJDjKc39oIsfA",
  128. key: keyw,
  129. page: page,
  130. state:state,
  131. name:name, ///联系人
  132. tel:tel,//联系电话
  133. // starttime:starttime, //
  134. // endtime:endtime, //
  135. workid:workid,//工单编号
  136. source:source,//工单来源
  137. infotype:infotype, //信息分类
  138. pagesize: pageSize
  139. },
  140. async: true,
  141. dataType: 'json',
  142. type: 'get', //HTTP请求类型
  143. success: function(data) {
  144. total = data.total;
  145. $(data.rows).each(function(i, n) {
  146. var States = n.State;
  147. console.log(States);
  148. var html=''
  149. var Html = '';
  150. if(States < 2) {
  151. html='<div class="mui-table-cell mui-col-xs-2 mui-text-right">' +
  152. ' <span class="mui-h5 wait">待处理</span>' +
  153. ' </div>'
  154. }else{
  155. html='<h5 class="success" style="text-align:right;"><span>已完成</span></h5>'
  156. }
  157. $('<li class="mui-table-view-cell order" data-index="' + n.ID + '">' +
  158. ' <div class="mui-table">'+
  159. '<div class = "mui-table-cell mui-col-xs-10" > ' +
  160. '<h4 class = "mui-ellipsis" > ' + n.Detail + ' </h4> ' +
  161. '<h5 > <span>联系人:' + n.Customer + '</span>' +
  162. '</h5>' +
  163. '</div >' +
  164. ''+html+''+
  165. '</div> ' +
  166. '</div> ' +
  167. '</li > ').appendTo('#OA_task_2 ');
  168. })
  169. //工单跳转
  170. $('.order').on('tap', function() {
  171. var index = $(this).attr('data-index');
  172. window.location.href = "Schedule.html?id=" + index;
  173. });
  174. },
  175. error: function(xhr, type, errorThrown) {
  176. //异常处理;
  177. }
  178. })
  179. }, 1000);
  180. }
  181. //获取数据
  182. function Ajax(keyw) {
  183. $(".order").remove();
  184. $.ajax({
  185. url: huayi.config.callcenter_url + 'WxLogin/GetList',
  186. data: {
  187. // openid: helper.cookies.get("openid"), //微信openid ,
  188. openid: "oKOqcv31fh76rtNmJDjKc39oIsfA",
  189. key: keyw,
  190. page: page,
  191. state:state,
  192. name:name, ///联系人
  193. tel:tel,//联系电话
  194. workid:workid,//工单编号
  195. source:source,//工单来源
  196. infotype:infotype, //信息分类
  197. pagesize: pageSize
  198. },
  199. async: true,
  200. dataType: 'json',
  201. type: 'get', //HTTP请求类型
  202. success: function(data) {
  203. total = data.total;
  204. $(data.rows).each(function(i, n) {
  205. var States = n.State;
  206. console.log(States);
  207. var html=''
  208. var Html = '';
  209. if(States < 2) {
  210. html='<div class="mui-table-cell mui-col-xs-2 mui-text-right">' +
  211. ' <span class="mui-h5 wait">待处理</span>' +
  212. ' </div>'
  213. }else{
  214. html='<h5 class="success" style="text-align:right;"><span>已完成</span></h5>'
  215. }
  216. $('<li class="mui-table-view-cell order" data-index="' + n.ID + '">' +
  217. ' <div class="mui-table">'+
  218. '<div class = "mui-table-cell mui-col-xs-10" > ' +
  219. '<h4 class = "mui-ellipsis" > ' + n.Detail + ' </h4> ' +
  220. '<h5 > <span>联系人:' + n.Customer + '</span>' +
  221. '</h5>' +
  222. '</div >' +
  223. ''+html+''+
  224. '</div> ' +
  225. '</div> ' +
  226. '</li > ').appendTo('#OA_task_2 ');
  227. })
  228. //工单跳转
  229. $('.order').on('tap', function() {
  230. var index = $(this).attr('data-index');
  231. window.location.href = "Cschedule.html?id=" + index;
  232. });
  233. },
  234. error: function(xhr, type, errorThrown) {
  235. //异常处理;
  236. }
  237. })
  238. }
  239. (function($) {
  240. var btnArray = ['确认', '取消'];
  241. //第二个demo,向左拖拽后显示操作图标,释放后自动触发的业务逻辑
  242. $('#OA_task_2').on('slideleft', '.mui-table-view-cell', function(event) {
  243. var elem = this;
  244. var Workindex = elem.getAttribute("data-index");
  245. mui.confirm('确认要处理此工单?', '提示', btnArray, function(e) {
  246. if(e.index == 0) {
  247. window.location.href = "Workdeal.html?id=" + Workindex;
  248. } else {
  249. setTimeout(function() {
  250. $.swipeoutClose(elem);
  251. }, 0);
  252. }
  253. });
  254. });
  255. })(mui);
  256. $('.turnGo').on('tap',function(){
  257. window.location.href = "WorkSearch.html?Tye="+Type_;
  258. })
  259. // }else{
  260. // window.location.href ="../login.html?";
  261. // }
  262. </script>
  263. </body>
  264. </html>