暫無描述

Waiting_list.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  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/index.css" rel="stylesheet" />
  11. </head>
  12. <body>
  13. <div class="mui-content">
  14. <div class="mui-card cardfixe" >
  15. <div class="mui-card-content itemtit">
  16. <ul class="mui-table-view mui-grid-view mui-grid-9 Common-box Dispatch_">
  17. <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 state5">
  18. <div class="mess_num DJD">0</div>
  19. <a class="waiting">
  20. <div class="Icon icon-1">
  21. <img src="../img/icon_01.png" class="mui-icon-img-1h" style="display: none;" />
  22. <img src="../img/icon_01c.png" class="mui-icon-img-1c" style="display: block;" />
  23. </div>
  24. <div class="mui-media-body" style="color:#22c9a8;">待接单</div>
  25. </a>
  26. <div class="sanjiao_down" style="display: block;"></div>
  27. </li>
  28. <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 state7">
  29. <div class="mess_num DCL">0</div>
  30. <a class="haveorder">
  31. <div class="Icon icon-1">
  32. <img src="../img/icon_02.png" class="mui-icon-img-1h dwc-1" />
  33. <img src="../img/icon_02c.png" class="mui-icon-img-1c dwc-2" />
  34. </div>
  35. <div class="mui-media-body">待处理</div>
  36. </a>
  37. <div class="sanjiao_down" style="display: none;"></div>
  38. </li>
  39. <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 state8">
  40. <div class="mess_num YCL">0</div>
  41. <a class="processed">
  42. <div class="Icon icon-1">
  43. <img src="../img/icon_03.png" class="mui-icon-img-1h" />
  44. <img src="../img/icon_03c.png" class="mui-icon-img-1c" />
  45. </div>
  46. <div class="mui-media-body">已处理</div>
  47. </a>
  48. <div class="sanjiao_down" style="display: none;"></div>
  49. </li>
  50. </ul>
  51. </div>
  52. </div>
  53. <!--待交办-->
  54. <div class="mui-content mui-content mui-scroll-wrapper workList" id="pullrefresh">
  55. <div class="mui-scroll">
  56. <ul class="mui-table-view" id="OA_task_2">
  57. </ul>
  58. </div>
  59. <div class="noinfor" style="text-align: center; font-size: 16px;">
  60. </div>
  61. <!--<div class="itemdiv userList" id="pullrefresh" style="display: block;"></div>-->
  62. </div>
  63. <div style="width: 100%; height: 50px;"></div>
  64. <!--底部-->
  65. <nav class="mui-tabs">
  66. <a class="mui-tabs-item mui-active" href="client_index.html">
  67. <span class="mui-icon iconfont">
  68. <img src="../img/task_c.png" />
  69. </span>
  70. <span class="mui-tab-label">任务中心</span>
  71. </a>
  72. <a class="mui-tabs-item reminder" href="press_list.html" style="display: none;">
  73. <span class="mui-icon iconfont">
  74. <img src="../img/reminder.png" />
  75. </span>
  76. <span class="mui-tab-label">超期工单</span>
  77. </a>
  78. <a class="mui-tabs-item" href="Setting-1.html">
  79. <span class="mui-icon iconfont">
  80. <img src="../img/personage.png" />
  81. </span>
  82. <span class="mui-tab-label">我的</span>
  83. </a>
  84. </nav>
  85. <div class="add_icon">
  86. <img src="../img/add_icon.png" />
  87. </div>
  88. <script src="../js/zepto.js"></script>
  89. <script src="../js/mui.min.js"></script>
  90. <script src="../Script/Common/huayi.config.js"></script>
  91. <script src="../Script/Common/huayi.http.js"></script>
  92. <script src="js/index.js"></script>
  93. <script type="text/javascript">
  94. var openid = helper.cookies.get("openid");
  95. var UserType = helper.cookies.get("usertype");
  96. var itype = helper.request.queryString("itype");
  97. // var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
  98. // alert(openid);
  99. var page = 1; //页数
  100. var pageSize = 10; //每页显示条目
  101. var total; //数据总条数
  102. if (UserType==2||UserType==3) {
  103. $(".state").text("待接单");
  104. }
  105. if(UserType==0){
  106. $(".state1").hide();
  107. }
  108. if(UserType==-1) {
  109. itype = 0
  110. $(".add_icon").show();
  111. $(".reminder").show();
  112. $(".state5").hide();
  113. $(".state6").hide();
  114. $(".state7").hide();
  115. $(".state8").hide();
  116. }else if(UserType==0){
  117. itype = 0
  118. $(".add_icon").show();
  119. $(".state1").show();
  120. $(".state2").hide();
  121. $(".state3").hide();
  122. $(".reminder").show();
  123. $(".state5").hide();
  124. $(".state6").hide();
  125. $(".state7").hide();
  126. $(".state8").hide();
  127. }else if(UserType==1){
  128. $(".add_icon").show();
  129. $(".reminder").show();
  130. $(".state5").hide();
  131. $(".state6").hide();
  132. $(".state7").hide();
  133. $(".state8").hide();
  134. }else if(UserType==2){
  135. $(".add_icon").show()
  136. $(".reminder").show();
  137. $(".state5").hide();
  138. $(".state6").hide();
  139. $(".state7").hide();
  140. $(".state8").hide();
  141. }else if(UserType==3){
  142. $(".state4").hide();
  143. $(".state1").hide();
  144. $(".state2").hide();
  145. $(".state3").hide();
  146. $(".add_icon").hide();
  147. $(".reminder").show();
  148. itype = 1
  149. }else if(UserType==4){
  150. $(".state4").hide();
  151. $(".state1").hide();
  152. $(".state2").hide();
  153. $(".state3").hide();
  154. $(".add_icon").show()
  155. $(".reminder").show();
  156. itype = 1
  157. }else {
  158. itype = helper.request.queryString("itype");
  159. }
  160. mui.init({
  161. swipeBack: false,
  162. pullRefresh: {
  163. container: '#pullrefresh',
  164. up: {
  165. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  166. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  167. callback: pullupRefresh
  168. }
  169. }
  170. });
  171. // 页面跳转
  172. $('.client').on('tap', function() {
  173. window.location.href = "client_index.html";
  174. });
  175. // 待完成
  176. $('.pend').on('tap', function() {
  177. window.location.href = "pend_index.html";
  178. });
  179. // 已完成
  180. $('.finsh').on('tap', function() {
  181. window.location.href = "finsh_index.html";
  182. });
  183. // 综合查询
  184. $('.inquire').on('tap', function() {
  185. window.location.href = "../fisrt_comprehensive/report.html";
  186. });
  187. // 待接单
  188. $('.waiting').on('tap', function() {
  189. window.location.href = "Waiting_list.html";
  190. });
  191. //待处理
  192. $('.haveorder').on('tap', function() {
  193. window.location.href = "haveorder_list.html";
  194. });
  195. //已处理
  196. $('.processed').on('tap', function() {
  197. window.location.href = "processed_list.html";
  198. });
  199. Ajax();
  200. //下拉刷新
  201. function pullupRefresh() {
  202. setTimeout(function() {
  203. mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
  204. $.ajax({
  205. url: huayi.config.callcenter_url + 'WxLogin/GetList',
  206. data: {
  207. // ltype: itype,
  208. // openid: helper.cookies.get("openid"), //微信openid
  209. OpenId:openid,
  210. pageindex: page,
  211. pagesize: pageSize,
  212. state:2,
  213. },
  214. async: true,
  215. dataType: 'json',
  216. type: 'get', //HTTP请求类型
  217. success: function(data) {
  218. total = data.total;
  219. if(data.rows && data.rows.length > 0) {
  220. data.rows.WorkOrderID
  221. $(data.rows).each(function(i, n) {
  222. if(n.F_UserName == "") {
  223. receiver = '</span><span class="font-color1">未选择创建人</span>'
  224. } else {
  225. receiver = '</span><span class="font-color3">创建人' + n.F_CreateBy + n.F_CreateName + '</span>'
  226. //receiver= '受理人:'+n.CreateUser
  227. }
  228. var builName
  229. if (n.buildingname== null) {
  230. builName=""
  231. } else{
  232. builName=n.buildingname
  233. }
  234. var proName
  235. if (n.proname==null) {
  236. proName=""
  237. } else{
  238. proName=n.proname
  239. }
  240. // if(data.rows){
  241. //
  242. // }
  243. console.log(n.Customer);
  244. // |<button class="mui-btn-primary">重要' + '</button> 重要程度
  245. $('<a class="mui-card mui-card-detail order" data-index="' + n.F_ID + '"><div class="mui-card-header"><div class="fl"><span>' + n.F_TypeName +
  246. '</span><span>'+
  247. '</span><span id="" style="margin-left:25px;">' +
  248. '</span></div><div class="fr"><span>' + n.F_CreateOn +
  249. '</span></div></div>' +
  250. '<div class="mui-card-content"><div class="mui-card-content-inner"><p class="font-color2 details_line" style="padding:13px 0">' + n.F_Description +
  251. '</p><div class="mui-card-content-inner-span"><span id="">' + n.F_StateName +
  252. '</span><span id="">' + n.F_WorkOrderCode + receiver +
  253. '</div></div></div></a>').appendTo('#OA_task_2');
  254. });
  255. //工单跳转
  256. $('.order').on('tap', function() {
  257. var index = $(this).attr('data-index');
  258. window.location.href = "details.html?id=" + index + '&itype=' + itype;
  259. });
  260. }
  261. },
  262. error: function(xhr, type, errorThrown) {
  263. //异常处理;
  264. }
  265. })
  266. }, 1000);
  267. }
  268. //获取数据
  269. function Ajax() {
  270. $(".order").remove();
  271. $.ajax({
  272. url: huayi.config.callcenter_url + 'WxLogin/GetList',
  273. data: {
  274. // ltype: itype,
  275. // openid: helper.cookies.get("openid"), //微信openid
  276. OpenId:openid,
  277. pageindex: page,
  278. pagesize: pageSize,
  279. // isaudit:1,
  280. state:2,
  281. },
  282. async: true,
  283. dataType: 'json',
  284. type: 'get', //HTTP请求类型
  285. success: function(data) {
  286. if(document.getElementById('hy_loading')){
  287. document.getElementById('hy_loading').style.opacity = 0;
  288. document.getElementById('hy_loading').remove();
  289. }
  290. if(data.rows && data.rows.length > 0) {
  291. data.rows.WorkOrderID
  292. $(data.rows).each(function(i, n) {
  293. if(n.F_UserName == "") {
  294. receiver = '</span><span class="font-color1">未选择创建人</span>'
  295. } else {
  296. receiver = '</span><span class="font-color3">创建人:' + n.F_CreateBy + n.F_CreateName + '</span>'
  297. //receiver= '受理人:'+n.CreateUser
  298. }
  299. var builName
  300. if (n.buildingname==null) {
  301. builName=""
  302. } else{
  303. builName=n.buildingname
  304. }
  305. var proName
  306. if (n.proname==null) {
  307. proName=""
  308. } else{
  309. proName=n.proname
  310. }
  311. console.log(n.Customer);
  312. //|<button class="mui-btn-primary">重要' + '</button> 重要程度
  313. $('<a class="mui-card mui-card-detail order" data-index="' + n.F_ID + '"><div class="mui-card-header"><div class="fl"><span>' + n.F_TypeName +
  314. '</span><span>'+
  315. '</span><span id="" style="margin-left:25px;">' +
  316. '</span></div><div class="fr"><span>' + n.F_CreateOn +
  317. '</span></div></div>' +
  318. '<div class="mui-card-content"><div class="mui-card-content-inner"><p class="font-color2 details_line" style="padding:13px 0">' + n.F_Description +
  319. '</p><div class="mui-card-content-inner-span"><span id="">' + n.F_StateName +
  320. '</span><span id="">' + n.F_WorkOrderCode + receiver +
  321. '</div></div></div></a>').appendTo('#OA_task_2');
  322. });
  323. //工单跳转
  324. $('.order').on('tap', function() {
  325. var index = $(this).attr('data-index');
  326. window.location.href = "details.html?id=" + index + '&itype=' + itype;
  327. });
  328. } else{
  329. $(".noinfor").text("暂无信息");
  330. }
  331. },
  332. error: function(xhr, type, errorThrown) {
  333. //异常处理;
  334. }
  335. })
  336. }
  337. $('.turnGo').on('tap', function() {
  338. window.location.href = "WorkSearch.html";
  339. })
  340. </script>
  341. </body>
  342. </html>