暂无描述

YiChuLi_list.html 14KB

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