maintenance_system.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  5. <meta charset="utf-8">
  6. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  7. <meta content="yes" name="apple-mobile-web-app-capable">
  8. <meta content="black" name="apple-mobile-web-app-status-bar-style">
  9. <meta content="telephone=no" name="format-detection">
  10. <title>永天消防</title>
  11. <link rel="stylesheet" href="__PUBLIC__/wxapp/css/style1.css">
  12. </head>
  13. <style>
  14. .pages a,.pages span {
  15. display:inline-block;
  16. padding:2px 5px;
  17. margin:0 1px;
  18. border:1px solid #f0f0f0;
  19. -webkit-border-radius:3px;
  20. -moz-border-radius:3px;
  21. border-radius:3px;
  22. }
  23. .pages a,.pages li {
  24. display:inline-block;
  25. list-style: none;
  26. text-decoration:none; color:#58A0D3;
  27. }
  28. .pages a.first,.pages a.prev,.pages a.next,.pages a.end{
  29. margin:0;
  30. }
  31. .pages a:hover{
  32. border-color:#50A8E6;
  33. }
  34. .pages span.current{
  35. background:#50A8E6;
  36. color:#FFF;
  37. font-weight:700;
  38. border-color:#50A8E6;
  39. }
  40. a:link,a:visited,a:hover,a:active {
  41. text-decoration:none;
  42. }
  43. </style>
  44. <link rel="stylesheet" type="text/css" href="__PUBLIC__/wxapp/css/style1.css">
  45. <!--引入微信js-->
  46. <script src='https://res.wx.qq.com/open/js/jweixin-1.4.0.js'></script>
  47. <script type="text/javascript" src="__PUBLIC__/wxapp/js/jquery-1.11.3.min.js"></script>
  48. <body>
  49. <!--头部-->
  50. <div class="header"><a class="comblack" href="__MODULE__/Inspection/wb_index{$tokenurl}/companyid/{$companyid}"></a> 维保</div>
  51. <!--内容-->
  52. <div>
  53. <volist name="res5" id="vo" >
  54. <div class="content">
  55. <div class="item-list">
  56. <p>{$vo.plan_name}
  57. <span>{$vo.completion}%</span>
  58. </p>
  59. </div>
  60. <div >
  61. <volist name="vo" id="vo1" >
  62. <volist name="vo1" id="vo2" >
  63. <if condition="$vo2.data3 eq 1 ">
  64. <a class="wxcode" name="{$vo.id}" title="{$vo2.id}">
  65. <div class="bl">
  66. <p>{$vo2.spot_name}<span>未维保</span></p>
  67. </div>
  68. </a>
  69. <else />
  70. <a href="###" >
  71. <div class="bl">
  72. <p>{$vo2.spot_name}<span>已维保</span></p>
  73. </div>
  74. </a>
  75. </if>
  76. </volist>
  77. </volist>
  78. </div>
  79. </div>
  80. </volist>
  81. </div>
  82. <!--底部-->
  83. <div class="footer"></div>
  84. </body>
  85. <script type="text/javascript">
  86. var wbr_id={$wbr_id};
  87. function ajasscan(data,jh_id,dw_id){
  88. // alert(data);
  89. // alert(jh_id);
  90. // alert(dw_id);
  91. // alert(wbr_id);
  92. $.ajax({
  93. type: 'POST',
  94. url: "{:U('Scan/pdsflr2')}",
  95. data: {data:data,jh_id:jh_id,dw_id:dw_id},
  96. dataType: 'json',
  97. success: function(res1){
  98. // alert(res1);
  99. if (res1==1){
  100. alert('维保点位不匹配');
  101. } else {
  102. // alert(wbr_id);
  103. window.location.href ="{:U('Scan/from2')}?jh_id="+res1.jh_id+"&dw_id="+res1.dw_id+"&wbr_id="+wbr_id;
  104. }
  105. }
  106. })
  107. }
  108. $(document).ready(function () {
  109. $(".item-list").click(function () {
  110. $(this).next().slideToggle();
  111. })
  112. })
  113. var jh_id;
  114. var dw_id;
  115. $('.wxcode').click(function(){
  116. jh_id=$(this).attr("name");
  117. dw_id=$(this).attr("title");
  118. })
  119. wx.config({
  120. // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  121. debug: false,
  122. // 必填,公众号的唯一标识
  123. appId: "{$wxConfig.appId}",
  124. // 必填,生成签名的时间戳
  125. timestamp:"{$wxConfig.timestamp}",
  126. // 必填,生成签名的随机串
  127. nonceStr:"{$wxConfig.nonceStr}",
  128. // 必填,签名,见附录1
  129. signature:"{$wxConfig.signature}",
  130. // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
  131. jsApiList : [ 'scanQRCode' ]
  132. });
  133. wx.error(function(res) {
  134. // alert("----------出错了-----------:" + res.errMsg);//这个地方的好处就是wx.config配置错误,会弹出窗口哪里错误,然后根据微信文档查询即可。
  135. });
  136. wx.ready(function() {
  137. wx.checkJsApi({
  138. jsApiList : ['scanQRCode'],
  139. success : function(res) {
  140. }
  141. });
  142. //点击按钮扫描二维码
  143. $('.wxcode').click(function(){
  144. // alert(1);
  145. wx.scanQRCode({
  146. needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
  147. scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码,默认二者都有
  148. success: function (res) {
  149. var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
  150. // alert(result);
  151. // alert(jh_id);
  152. // alert(dw_id);
  153. ajasscan(result,jh_id,dw_id)
  154. }
  155. });
  156. })
  157. });
  158. </script>
  159. </html>