Nenhuma Descrição

tourist.html 11KB

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