No Description

haveorder_list.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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: block;" />
  22. <img src="../img/icon_01c.png" class="mui-icon-img-1c" style="display: none;" />
  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" style="display: none;"/>
  33. <img src="../img/icon_02c.png" class="mui-icon-img-1c dwc-2" style="display: block;"/>
  34. </div>
  35. <div class="mui-media-body" style="color:#22c9a8;">待处理</div>
  36. </a>
  37. <div class="sanjiao_down" style="display: block;"></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="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. itype = 1
  160. }else {
  161. itype = helper.request.queryString("itype");
  162. }
  163. mui.init({
  164. swipeBack: false,
  165. pullRefresh: {
  166. container: '#pullrefresh',
  167. up: {
  168. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  169. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  170. callback: pullupRefresh
  171. }
  172. }
  173. });
  174. // 页面跳转
  175. $('.client').on('tap', function() {
  176. window.location.href = "client_index.html";
  177. });
  178. // 待完成
  179. $('.pend').on('tap', function() {
  180. window.location.href = "pend_index.html";
  181. });
  182. // 已完成
  183. $('.finsh').on('tap', function() {
  184. window.location.href = "finsh_index.html";
  185. });
  186. // 综合查询
  187. $('.inquire').on('tap', function() {
  188. window.location.href = "../fisrt_comprehensive/report.html";
  189. });
  190. //待接单
  191. $('.waiting').on('tap', function() {
  192. window.location.href = "Waiting_list.html";
  193. });
  194. // 已接单
  195. $('.haveorder').on('tap', function() {
  196. window.location.href = "haveorder_list.html";
  197. });
  198. //已处理
  199. $('.processed').on('tap', function() {
  200. window.location.href = "processed_list.html";
  201. });
  202. Ajax();
  203. //下拉刷新
  204. function pullupRefresh() {
  205. setTimeout(function() {
  206. mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
  207. $.ajax({
  208. url: huayi.config.callcenter_url + 'WxLogin/GetList',
  209. data: {
  210. // ltype: itype,
  211. // openid: helper.cookies.get("openid"), //微信openid
  212. OpenId:openid,
  213. pageindex: page,
  214. pagesize: pageSize,
  215. state:4,
  216. },
  217. async: true,
  218. dataType: 'json',
  219. type: 'get', //HTTP请求类型
  220. success: function(data) {
  221. total = data.total;
  222. if(data.rows && data.rows.length > 0) {
  223. data.rows.F_ID
  224. $(data.rows).each(function(i, n) {
  225. if(n.F_UserName == "") {
  226. receiver = '</span><span class="font-color1">未选择创建人</span>'
  227. } else {
  228. receiver = '</span><span class="font-color3">创建人' + n.F_CreateBy + n.F_CreateName+ '</span>'
  229. //receiver= '受理人:'+n.CreateUser
  230. }
  231. var builName
  232. if (n.buildingname== null) {
  233. builName=""
  234. } else{
  235. builName=n.buildingname
  236. }
  237. var proName
  238. if (n.proname==null) {
  239. proName=""
  240. } else{
  241. proName=n.proname
  242. }
  243. // if(data.rows){
  244. //
  245. // }
  246. console.log(n.Customer);
  247. // |<button class="mui-btn-primary">重要' + '</button> 重要程度
  248. $('<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 +
  249. '</span><span>'+
  250. '</span><span id="" style="margin-left:25px;">' +
  251. '</span></div><div class="fr"><span>' + n.F_CreateOn +
  252. '</span></div></div>' +
  253. '<div class="mui-card-content"><div class="mui-card-content-inner"><p class="font-color2 details_line" style="padding:13px 0">' + n.F_Description +
  254. '</p><div class="mui-card-content-inner-span"><span id="">' + n.F_StateName +
  255. '</span><span id="">' + n.F_WorkOrderCode + receiver +
  256. '</div></div></div></a>').appendTo('#OA_task_2');
  257. });
  258. //工单跳转
  259. $('.order').on('tap', function() {
  260. var index = $(this).attr('data-index');
  261. window.location.href = "details.html?id=" + index + '&itype=' + itype;
  262. });
  263. }
  264. },
  265. error: function(xhr, type, errorThrown) {
  266. //异常处理;
  267. }
  268. })
  269. }, 1000);
  270. }
  271. //获取数据
  272. function Ajax() {
  273. $(".order").remove();
  274. $.ajax({
  275. url: huayi.config.callcenter_url + 'WxLogin/GetList',
  276. data: {
  277. // ltype: itype,
  278. // openid: helper.cookies.get("openid"), //微信openid
  279. OpenId:openid,
  280. pageindex: page,
  281. pagesize: pageSize,
  282. state:4,
  283. },
  284. async: true,
  285. dataType: 'json',
  286. type: 'get', //HTTP请求类型
  287. success: function(data) {
  288. if(document.getElementById('hy_loading')){
  289. document.getElementById('hy_loading').style.opacity = 0;
  290. document.getElementById('hy_loading').remove();
  291. }
  292. if(data.rows && data.rows.length > 0) {
  293. data.rows.WorkOrderID
  294. $(data.rows).each(function(i, n) {
  295. if(n.CreateUser == "") {
  296. receiver = '</span><span class="font-color1">未选择创建人</span>'
  297. } else {
  298. receiver = '</span><span class="font-color3">创建人:' + n.F_CreateBy +n.F_CreateName+ '</span>'
  299. //receiver= '受理人:'+n.CreateUser
  300. }
  301. var builName
  302. if (n.buildingname==null) {
  303. builName=""
  304. } else{
  305. builName=n.buildingname
  306. }
  307. var proName
  308. if (n.proname==null) {
  309. proName=""
  310. } else{
  311. proName=n.proname
  312. }
  313. console.log(n.Customer);
  314. //|<button class="mui-btn-primary">重要' + '</button> 重要程度
  315. $('<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 +
  316. '</span><span>'+
  317. '</span><span id="" style="margin-left:25px;">' +
  318. '</span></div><div class="fr"><span>' + n.F_CreateOn +
  319. '</span></div></div>' +
  320. '<div class="mui-card-content"><div class="mui-card-content-inner"><p class="font-color2 details_line" style="padding:13px 0">' + n.F_Description +
  321. '</p><div class="mui-card-content-inner-span"><span id="">' + n.F_StateName +
  322. '</span><span id="">' + n.F_WorkOrderCode + receiver +
  323. '</div></div></div></a>').appendTo('#OA_task_2');
  324. });
  325. //工单跳转
  326. $('.order').on('tap', function() {
  327. var index = $(this).attr('data-index');
  328. window.location.href = "details.html?id=" + index + '&itype=' + itype;
  329. });
  330. } else{
  331. $(".noinfor").text("暂无信息");
  332. }
  333. },
  334. error: function(xhr, type, errorThrown) {
  335. //异常处理;
  336. }
  337. })
  338. }
  339. $('.turnGo').on('tap', function() {
  340. window.location.href = "WorkSearch.html";
  341. })
  342. </script>
  343. </body>
  344. </html>