Sin descripción

client_index.html 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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 state4">
  18. <!--<div class="mess_num" style="display: block;">99</div>-->
  19. <a class="client">
  20. <div class="Icon icon-1">
  21. <img src="../img/icon_01.png" class="mui-icon-img-1h" style="display: none;" />
  22. <img src="../img/icon_01c.png" class="mui-icon-img-1c" style="display: block;" />
  23. </div>
  24. <div class="mui-media-body state" style="color:#22c9a8;">待审批</div>
  25. </a>
  26. <div class="sanjiao_down" style="display: block;"></div>
  27. </li>
  28. <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 state1">
  29. <!--<div class="mess_num" style="display: block;">99</div>-->
  30. <a class="pend">
  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 dwc-color">已参与</div>
  36. </a>
  37. <div class="sanjiao_down dwc-2" style="display: none;"></div>
  38. </li>
  39. <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 state2">
  40. <!--<div class="mess_num" style="display: block;">99</div>-->
  41. <a class="finsh">
  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. <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 state3">
  51. <!--<div class="mess_num" style="display: block;">99</div>-->
  52. <a class="inquire">
  53. <div class="Icon icon-1">
  54. <img src="../img/icon_04.png" class="mui-icon-img-1h " />
  55. <img src="../img/icon_04c.png" class="mui-icon-img-1c " />
  56. </div>
  57. <div class="mui-media-body">综合查询</div>
  58. </a>
  59. <div class="sanjiao_down" style="display: none;"></div>
  60. </li>
  61. <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 state5">
  62. <!--<div class="mess_num" style="display: block;">99</div>-->
  63. <a class="waiting">
  64. <div class="Icon icon-1">
  65. <img src="../img/icon_02.png" class="mui-icon-img-1h dwc-1" />
  66. <img src="../img/icon_02c.png" class="mui-icon-img-1c dwc-2" />
  67. </div>
  68. <div class="mui-media-body">待接单</div>
  69. </a>
  70. <div class="sanjiao_down" style="display: none;"></div>
  71. </li>
  72. <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 state7">
  73. <!--<div class="mess_num" style="display: block;">99</div>-->
  74. <a class="haveorder">
  75. <div class="Icon icon-1">
  76. <img src="../img/icon_02.png" class="mui-icon-img-1h dwc-1" />
  77. <img src="../img/icon_02c.png" class="mui-icon-img-1c dwc-2" />
  78. </div>
  79. <div class="mui-media-body">待处理</div>
  80. </a>
  81. <div class="sanjiao_down" style="display: none;"></div>
  82. </li>
  83. <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 state8">
  84. <!--<div class="mess_num" style="display: block;">99</div>-->
  85. <a class="processed">
  86. <div class="Icon icon-1">
  87. <img src="../img/icon_02.png" class="mui-icon-img-1h dwc-1" />
  88. <img src="../img/icon_02c.png" class="mui-icon-img-1c dwc-2" />
  89. </div>
  90. <div class="mui-media-body">已处理</div>
  91. </a>
  92. <div class="sanjiao_down" style="display: none;"></div>
  93. </li>
  94. </ul>
  95. </div>
  96. </div>
  97. <!--待交办-->
  98. <div class="mui-content mui-content mui-scroll-wrapper workList" id="pullrefresh">
  99. <div class="mui-scroll">
  100. <ul class="mui-table-view" id="OA_task_2">
  101. </ul>
  102. </div>
  103. <div class="noinfor" style="text-align: center; font-size: 16px;">
  104. </div>
  105. <!--<div class="itemdiv userList" id="pullrefresh" style="display: block;"></div>-->
  106. </div>
  107. <div style="width: 100%; height: 50px;"></div>
  108. <!--底部-->
  109. <nav class="mui-tabs">
  110. <a class="mui-tabs-item mui-active" href="client_index.html">
  111. <span class="mui-icon iconfont">
  112. <img src="../img/task_c.png" />
  113. </span>
  114. <span class="mui-tab-label">任务中心</span>
  115. </a>
  116. <a class="mui-tabs-item reminder" href="press_list.html" style="display: none;">
  117. <span class="mui-icon iconfont">
  118. <img src="../img/reminder.png" />
  119. </span>
  120. <span class="mui-tab-label">超期工单</span>
  121. </a>
  122. <!--<a class="mui-tabs-item" href="dynamic.html">
  123. <span class="mui-icon iconfont">
  124. <img src="../img/dynamic.png" />
  125. </span>
  126. <span class="mui-tab-label">工作动态</span>
  127. </a>-->
  128. <a class="mui-tabs-item" href="Setting-1.html">
  129. <span class="mui-icon iconfont">
  130. <img src="../img/personage.png" />
  131. </span>
  132. <span class="mui-tab-label">我的</span>
  133. </a>
  134. </nav>
  135. <div class="add_icon">
  136. <img src="../img/add_icon.png" />
  137. </div>
  138. <script src="../js/zepto.js"></script>
  139. <script src="js/index.js"></script>
  140. <script src="../js/mui.min.js"></script>
  141. <script src="../Script/Common/huayi.config.js"></script>
  142. <script src="../Script/Common/huayi.http.js"></script>
  143. <script type="text/javascript">
  144. var openid = helper.cookies.get("openid");
  145. var UserType = helper.cookies.get("usertype");
  146. // alert(UserType)
  147. var itype = helper.request.queryString("itype");
  148. // var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
  149. var page = 1; //页数
  150. var pageSize = 10; //每页显示条目
  151. var total; //数据总条数
  152. if (UserType==2||UserType==3) {
  153. $(".state").text("待接单");
  154. }
  155. if(UserType==0){
  156. $(".state1").hide();
  157. }
  158. // if (UserType==4) {
  159. // $(".mui-col-xs-3").css("width","33%");
  160. // $(".state4").hide();
  161. // $(".dwc-1").hide();
  162. // $(".dwc-2").show();
  163. // $(".dwc-color").css("color","#2cc6a7");
  164. // $(".dwc-color").text("待处理");
  165. // }
  166. if(UserType==-1) {
  167. $(".add_icon").show();
  168. $(".reminder").hide();
  169. $(".state5").hide();
  170. $(".state6").hide();
  171. $(".state7").hide();
  172. $(".state8").hide();
  173. }else if(UserType==0){
  174. $(".add_icon").show();
  175. $(".state1").show();
  176. $(".state2").hide();
  177. $(".reminder").hide();
  178. $(".state5").hide();
  179. $(".state6").hide();
  180. $(".state7").hide();
  181. $(".state8").hide();
  182. }else if(UserType==1){
  183. $(".add_icon").show();
  184. $(".reminder").show();
  185. $(".state5").hide();
  186. $(".state6").hide();
  187. $(".state7").hide();
  188. $(".state8").hide();
  189. }else if(UserType==2){
  190. $(".add_icon").show()
  191. $(".reminder").show();
  192. $(".state5").hide();
  193. $(".state6").hide();
  194. $(".state7").hide();
  195. $(".state8").hide();
  196. }else if(UserType==3){
  197. $(".state4").hide();
  198. $(".state1").hide();
  199. $(".state2").hide();
  200. $(".state3").hide();
  201. $(".add_icon").show();
  202. $(".reminder").show();
  203. itype = 1
  204. }else if(UserType==4){
  205. $(".add_icon").show();
  206. $(".state1").show();
  207. $(".state2").hide();
  208. $(".reminder").hide();
  209. $(".state5").hide();
  210. $(".state6").hide();
  211. $(".state7").hide();
  212. $(".state8").hide();
  213. }else {
  214. itype = helper.request.queryString("itype");
  215. }
  216. mui.init({
  217. swipeBack: false,
  218. pullRefresh: {
  219. container: '#pullrefresh',
  220. up: {
  221. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  222. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  223. callback: pullupRefresh
  224. }
  225. }
  226. });
  227. // 页面跳转
  228. $('.client').on('tap', function() {
  229. window.location.href = "client_index.html";
  230. });
  231. // 待完成
  232. $('.pend').on('tap', function() {
  233. window.location.href = "pend_index.html";
  234. });
  235. // 已完成
  236. $('.finsh').on('tap', function() {
  237. window.location.href = "finsh_index.html";
  238. });
  239. // 综合查询
  240. $('.inquire').on('tap', function() {
  241. window.location.href = "../fisrt_comprehensive/report.html";
  242. });
  243. // 待接单
  244. $('.client').on('tap', function() {
  245. window.location.href = "client_index.html";
  246. });
  247. // 待接单
  248. $('.waiting').on('tap', function() {
  249. window.location.href = "Waiting_list.html";
  250. });
  251. //待处理
  252. $('.haveorder').on('tap', function() {
  253. window.location.href = "haveorder_list.html";
  254. });
  255. //已处理
  256. $('.processed').on('tap', function() {
  257. window.location.href = "processed_list.html";
  258. });
  259. Ajax();
  260. //下拉刷新
  261. function pullupRefresh() {
  262. setTimeout(function() {
  263. mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
  264. $.ajax({
  265. url: huayi.config.callcenter_url + 'WxLogin/GetList',
  266. data: {
  267. // ltype: itype,
  268. // openid: helper.cookies.get("openid"), //微信openid
  269. OpenId:openid,
  270. pageindex: page,
  271. pagesize: pageSize,
  272. state:0
  273. },
  274. async: true,
  275. dataType: 'json',
  276. type: 'get', //HTTP请求类型
  277. success: function(data) {
  278. total = data.total;
  279. if(data.rows && data.rows.length > 0) {
  280. data.rows.WorkOrderID
  281. $(data.rows).each(function(i, n) {
  282. if(n.CreateUser == "") {
  283. receiver = '</span><span class="font-color1">未选择创建人</span>'
  284. } else {
  285. receiver = '</span><span class="font-color3">创建人' + n.F_CreateBy + '</span>'
  286. //receiver= '受理人:'+n.CreateUser
  287. }
  288. var builName
  289. if (n.buildingname== null) {
  290. builName=""
  291. } else{
  292. builName=n.buildingname
  293. }
  294. var proName
  295. if (n.proname==null) {
  296. proName=""
  297. } else{
  298. proName=n.proname
  299. }
  300. // if(data.rows){
  301. //
  302. // }
  303. console.log(n.Customer);
  304. // |<button class="mui-btn-primary">重要' + '</button> 重要程度
  305. $('<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 +
  306. '</span>|<span>' + n.F_TypeName +
  307. '</span></div><div class="fr"><span>' + n.F_CreateOn +
  308. '</span></div></div>' +
  309. '<div class="mui-card-content"><div class="mui-card-content-inner"><p class="font-color2 details_line">' + n.F_Description +
  310. '</p><p class="font-color3 margin">' + n.F_DeptName + proName + builName +
  311. '</p><div class="mui-card-content-inner-span"><span id="">' + n.F_Salesman +
  312. '</span><span id="">' + n.F_CusPhone + receiver +
  313. '</div></div></div></a>').appendTo('#OA_task_2');
  314. });
  315. //工单跳转
  316. $('.order').on('tap', function() {
  317. var index = $(this).attr('data-index');
  318. window.location.href = "details.html?id=" + index + '&itype=' + itype;
  319. });
  320. }
  321. },
  322. error: function(xhr, type, errorThrown) {
  323. //异常处理;
  324. }
  325. })
  326. }, 1000);
  327. }
  328. //获取数据
  329. function Ajax() {
  330. $(".order").remove();
  331. $.ajax({
  332. url: huayi.config.callcenter_url + 'WxLogin/GetList',
  333. data: {
  334. // ltype: itype,
  335. // openid: helper.cookies.get("openid"), //微信openid
  336. OpenId:openid,
  337. pageindex: page,
  338. pagesize: pageSize,
  339. state:0
  340. },
  341. async: true,
  342. dataType: 'json',
  343. type: 'get', //HTTP请求类型
  344. success: function(data) {
  345. if(document.getElementById('hy_loading')){
  346. document.getElementById('hy_loading').style.opacity = 0;
  347. document.getElementById('hy_loading').remove();
  348. }
  349. if(data.rows && data.rows.length > 0) {
  350. data.rows.WorkOrderID
  351. $(data.rows).each(function(i, n) {
  352. if(n.CreateUser == "") {
  353. receiver = '</span><span class="font-color1">未选择创建人</span>'
  354. } else {
  355. receiver = '</span><span class="font-color3">创建人:' + n.F_CreateBy + '</span>'
  356. //receiver= '受理人:'+n.CreateUser
  357. }
  358. var builName
  359. if (n.buildingname==null) {
  360. builName=""
  361. } else{
  362. builName=n.buildingname
  363. }
  364. var proName
  365. if (n.proname==null) {
  366. proName=""
  367. } else{
  368. proName=n.proname
  369. }
  370. // console.log(n.Customer);
  371. //|<button class="mui-btn-primary">重要' + '</button> 重要程度
  372. $('<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 +
  373. '</span>|<span>' + n.F_TypeName +
  374. '</span></div><div class="fr"><span>' + n.F_CreateOn +
  375. '</span></div></div>' +
  376. '<div class="mui-card-content"><div class="mui-card-content-inner"><p class="font-color2 details_line">' + n.F_Description +
  377. '</p><p class="font-color3 margin">' + n.F_DeptName + proName + builName +
  378. '</p><div class="mui-card-content-inner-span"><span id="">' + n.F_Salesman +
  379. '</span><span id="">' + n.F_CusPhone + receiver +
  380. '</div></div></div></a>').appendTo('#OA_task_2');
  381. });
  382. //工单跳转
  383. $('.order').on('tap', function() {
  384. var index = $(this).attr('data-index');
  385. window.location.href = "details.html?id=" + index + '&itype=' + itype;
  386. });
  387. } else{
  388. $(".noinfor").text("暂无信息");
  389. }
  390. // alert(openid)
  391. },
  392. error: function(xhr, type, errorThrown) {
  393. //异常处理;
  394. // alert(openid)
  395. }
  396. })
  397. }
  398. $('.turnGo').on('tap', function() {
  399. window.location.href = "WorkSearch.html";
  400. })
  401. </script>
  402. </body>
  403. </html>