Açıklama Yok

gcyi_list.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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 state9">
  18. <div class="GCDBL mess_num" style="display: block;">0</div>
  19. <a class="high_rise">
  20. <div class="Icon icon-1">
  21. <img src="../img/icon_03.png" class="mui-icon-img-1h" />
  22. <img src="../img/icon_03c.png" class="mui-icon-img-1c" />
  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 state10">
  29. <div class="YBL mess_num" style="display: block;">0</div>
  30. <a class="nvolved">
  31. <div class="Icon icon-1">
  32. <img src="../img/icon_03.png" class="mui-icon-img-1h" style="display: none;"/>
  33. <img src="../img/icon_03c.png" class="mui-icon-img-1c" 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. </ul>
  40. </div>
  41. </div>
  42. <!--待交办-->
  43. <div class="mui-content mui-content mui-scroll-wrapper workList" id="pullrefresh">
  44. <div class="mui-scroll">
  45. <ul class="mui-table-view" id="OA_task_2">
  46. </ul>
  47. </div>
  48. <div class="noinfor" style="text-align: center; font-size: 16px;">
  49. </div>
  50. <!--<div class="itemdiv userList" id="pullrefresh" style="display: block;"></div>-->
  51. </div>
  52. <div style="width: 100%; height: 50px;"></div>
  53. <!--底部-->
  54. <nav class="mui-tabs">
  55. <a class="mui-tabs-item mui-active" href="gcyi_list.html">
  56. <span class="mui-icon iconfont">
  57. <img src="../img/task_c.png" />
  58. </span>
  59. <span class="mui-tab-label">任务中心</span>
  60. </a>
  61. <a class="mui-tabs-item" href="Setting-1.html">
  62. <span class="mui-icon iconfont">
  63. <img src="../img/personage.png" />
  64. </span>
  65. <span class="mui-tab-label">我的</span>
  66. </a>
  67. </nav>
  68. <div class="add_icon">
  69. <img src="../img/add_icon.png" />
  70. </div>
  71. <script src="../js/zepto.js"></script>
  72. <script src="../js/mui.min.js"></script>
  73. <script src="../Script/Common/huayi.config.js"></script>
  74. <script src="../Script/Common/huayi.http.js"></script>
  75. <script src="js/index.js"></script>
  76. <script type="text/javascript">
  77. var itype = helper.request.queryString("itype");
  78. // var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
  79. var page = 1; //页数
  80. var pageSize = 10; //每页显示条目
  81. var total; //数据总条数
  82. if (UserType==2||UserType==3) {
  83. $(".state").text("待接单");
  84. }
  85. if(UserType==0){
  86. $(".state1").hide();
  87. }
  88. // if (UserType==4) {
  89. // $(".mui-col-xs-3").css("width","33%");
  90. // $(".state4").hide();
  91. // $(".dwc-1").hide();
  92. // $(".dwc-2").show();
  93. // $(".dwc-color").css("color","#2cc6a7");
  94. // $(".dwc-color").text("待处理");
  95. // }
  96. if(UserType==-1) {
  97. itype = 0
  98. $(".add_icon").show();
  99. $(".reminder").show();
  100. $(".state5").hide();
  101. $(".state6").hide();
  102. $(".state7").hide();
  103. $(".state8").hide();
  104. }else if(UserType==0){
  105. itype = 0
  106. $(".add_icon").show();
  107. $(".state1").show();
  108. $(".state2").hide();
  109. $(".state3").hide();
  110. $(".reminder").show();
  111. $(".state5").hide();
  112. $(".state6").hide();
  113. $(".state7").hide();
  114. $(".state8").hide();
  115. }else if(UserType==1){
  116. $(".add_icon").show();
  117. $(".reminder").show();
  118. $(".state5").hide();
  119. $(".state6").hide();
  120. $(".state7").hide();
  121. $(".state8").hide();
  122. }else if(UserType==2){
  123. $(".add_icon").hide();
  124. $(".reminder").show();
  125. $(".state1").hide();
  126. $(".state2").hide();
  127. $(".state3").hide();
  128. $(".state4").hide();
  129. $(".state5").hide();
  130. $(".state6").hide();
  131. $(".state7").hide();
  132. $(".state8").hide();
  133. $(".state9").show();
  134. $(".state10").show();
  135. }else if(UserType==3){
  136. $(".state4").hide();
  137. $(".state1").hide();
  138. $(".state2").hide();
  139. $(".state3").hide();
  140. $(".add_icon").hide();
  141. $(".reminder").show();
  142. itype = 1
  143. }else if(UserType==4){
  144. $(".state4").hide();
  145. $(".state1").hide();
  146. $(".state2").hide();
  147. $(".state3").hide();
  148. $(".add_icon").show()
  149. $(".reminder").show();
  150. itype = 1
  151. }else {
  152. itype = helper.request.queryString("itype");
  153. }
  154. mui.init({
  155. swipeBack: false,
  156. pullRefresh: {
  157. container: '#pullrefresh',
  158. up: {
  159. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  160. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  161. callback: pullupRefresh
  162. }
  163. }
  164. });
  165. // 页面跳转
  166. $('.client').on('tap', function() {
  167. window.location.href = "client_index.html";
  168. });
  169. // 待完成
  170. $('.pend').on('tap', function() {
  171. window.location.href = "pend_index.html";
  172. });
  173. // 已完成
  174. $('.finsh').on('tap', function() {
  175. window.location.href = "finsh_index.html";
  176. });
  177. // 综合查询
  178. $('.inquire').on('tap', function() {
  179. window.location.href = "../fisrt_comprehensive/report.html";
  180. });
  181. // 待接单
  182. $('.waiting').on('tap', function() {
  183. window.location.href = "Waiting_list.html";
  184. });
  185. //待处理
  186. $('.haveorder').on('tap', function() {
  187. window.location.href = "haveorder_list.html";
  188. });
  189. //已处理
  190. $('.processed').on('tap', function() {
  191. window.location.href = "processed_list.html";
  192. });
  193. //高层待审批
  194. $('.high_rise').on('tap', function() {
  195. window.location.href = "high_list.html";
  196. });
  197. //高层已参与
  198. $('.nvolved').on('tap', function() {
  199. window.location.href = "gcyi_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: helper.cookies.get("openid"), //微信openid
  211. OpenId:openid,
  212. pageindex: page,
  213. pagesize: pageSize,
  214. state:1,
  215. },
  216. async: true,
  217. dataType: 'json',
  218. type: 'get', //HTTP请求类型
  219. success: function(data) {
  220. total = data.total;
  221. if(data.rows && data.rows.length > 0) {
  222. data.rows.WorkOrderID
  223. $(data.rows).each(function(i, n) {
  224. if(n.CreateUser == "") {
  225. receiver = '</span><span class="font-color1">未选择创建人</span>'
  226. } else {
  227. receiver = '</span><span class="font-color3">创建人' + n.CreateUser +n.F_CreateName+ '</span>'
  228. //receiver= '受理人:'+n.CreateUser
  229. }
  230. var builName
  231. if (n.buildingname== null) {
  232. builName=""
  233. } else{
  234. builName=n.buildingname
  235. }
  236. var proName
  237. if (n.proname==null) {
  238. proName=""
  239. } else{
  240. proName=n.proname
  241. }
  242. // if(data.rows){
  243. //
  244. // }
  245. console.log(n.Customer);
  246. // |<button class="mui-btn-primary">重要' + '</button> 重要程度
  247. $('<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 +
  248. '</span><span>'+
  249. '</span><span id="" style="margin-left:25px;">' +
  250. '</span></div><div class="fr"><span>' + n.F_CreateOn +
  251. '</span></div></div>' +
  252. '<div class="mui-card-content"><div class="mui-card-content-inner"><p class="font-color2 details_line" style="padding:13px 0">' + n.F_Description +
  253. '</p><div class="mui-card-content-inner-span"><span id="">' + n.F_StateName +
  254. '</span><span id="">' + n.F_WorkOrderCode + receiver +
  255. '</div></div></div></a>').appendTo('#OA_task_2');
  256. });
  257. //工单跳转
  258. $('.order').on('tap', function() {
  259. var index = $(this).attr('data-index');
  260. window.location.href = "details.html?id=" + index + '&itype=' + itype;
  261. });
  262. }
  263. },
  264. error: function(xhr, type, errorThrown) {
  265. //异常处理;
  266. }
  267. })
  268. }, 1000);
  269. }
  270. //获取数据
  271. function Ajax() {
  272. $(".order").remove();
  273. $.ajax({
  274. url: huayi.config.callcenter_url + 'WxLogin/GetList',
  275. data: {
  276. // ltype: itype,
  277. // openid: helper.cookies.get("openid"), //微信openid
  278. OpenId:openid,
  279. pageindex: page,
  280. pagesize: pageSize,
  281. // isaudit:1,
  282. state:1,
  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 + '</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=' + 333;
  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>