暫無描述

tourist.html 11KB

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