Нет описания

processed_list.html 12KB

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