【调度系统】广东民航医疗快线调度系统源代码
wzp
2024-12-06 0df39a8c5a45c6ff25411eace15d40a606f9769c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<%
'Response.Cookies("OA")("adminID")=""
'Response.end
searchTXT=Request("searchTXT")
ReportType=SafeRequest(Request("ReportType"))
RType=SafeRequest(Request("RType"))
ListType=SafeRequest(Request("ListType"))
state=request("state")
UnitIDCookies=request("UnitIDCookies")
If UnitIDCookies<>"" Then 
    Response.Cookies("UnitIDCookies")=UnitIDCookies
End If
If ReportType="" And state<>"" Then
    stateSP=split(state,"|")
    for i = 0 to UBOUND(stateSP)
        If InStr(stateSP(i),"searchTXT=")=1 Then
            searchTXT=Replace(stateSP(i),"searchTXT=","")
        ElseIf InStr(stateSP(i),"ReportType=")=1 Then
            ReportType=Replace(stateSP(i),"ReportType=","")
        ElseIf InStr(stateSP(i),"RType=")=1 Then
            RType=Replace(stateSP(i),"RType=","")
        ElseIf InStr(stateSP(i),"ListType=")=1 Then
            ListType=Replace(stateSP(i),"ListType=","")
        End If
    Next
End If
If ReportType="" Then ReportType="2"
If RType="" Then RType="1"
If searchTXT="1" Then searchTXT=date()-weekday(date())+7
'if OrdState="" then Response.Redirect "/"
state=ReportType%>
<!--#include virtual="/weixin/OAuth2.gds"-->
<!--#include virtual="/inc/function.gds"-->
<!--#include virtual="/weixin/sha1.gds"-->
<%
Set rs = Server.CreateObject("ADODB.Recordset")
'session("adminID")=85
'个人信息
sql="select * from OA_User where OA_User_ID="&session("adminID")
rs.open sql,objConn,1,1
If not rs.Eof then
OA_weixinUserID    = rs("OA_weixinUserID")
OA_Name            = rs("OA_Name")
OA_weixinAvatar    = rs("OA_weixinAvatar")
OA_DepartmentID    = rs("OA_DepartmentID")
session("admin_Power")=rs("OA_Power")
admin_Power=session("admin_Power")
End If
rs.close()
If isDepartment("0702")=0 Then Response.Redirect "/m_logout.html"
If OA_weixinAvatar="" Then OA_weixinAvatar="/resources/images/icon_avatar_default.png"
Call OA_Running("手机端打开订单报表")
 
'公司列表
UnitNameName=""
UnitNames = ""
sql="select vID,vtext from dictionary where vType>=1 and vtitle='UnitName' order by vOrder"
rs.open Sql,objConn,1,1
do while not rs.Eof
    UnitNames = UnitNames & rs("vID") &","& rs("vtext") & "|"
    If UnitNameID=CStr(rs("vID")) Then UnitNameName    = rs("vtext")
rs.movenext
Loop
rs.close()
UnitNames = left(UnitNames,len(UnitNames)-1)
UnitNamesPS = SPLIT(UnitNames,"|")
 
'显示相关公司
If UnitIDCookies<>"" Then
    sql="SELECT OrderClassIDs = STUFF((select ','+vOrder2 from dictionary where vType>=1 and vtitle='UnitName' and vID in ("&UnitIDCookies&") FOR XML PATH('')), 1, 1, '')"
    rs.open Sql,objConn,1,1
    If not rs.Eof Then
        OrderClassIDs = rs(0)
    End If
    rs.close()
    If OrderClassIDs<>"" Then
        OrdClassListSql=""
        sql="select vOrder2 from dictionary where vType>=1 and vtitle='OrderClass' and vID in ("&OrderClassIDs&") order by vOrder"
        rs.open Sql,objConn,1,1
        do while not rs.Eof
            OrdClassListSql = OrdClassListSql &"','"& rs("vOrder2")
        rs.movenext
        Loop
        rs.close()
        If OrdClassListSql<>"" Then OrdClassListSql=Mid(OrdClassListSql,4)
    Else
        UnitIDCookies=""
    End If
    
End If
'Response.Write OrdClassListSql
 
If RType="1" Then
  ReportName="订单金额"
ElseIf RType="2" Then
  ReportName="订单数量"
End If
If searchTXT="" Then
  searchDate="getdate()"
Else
  searchDate="'"&searchTXT&"'"
End If
If ReportType="1" then        '日
  SqlDate=" between dateadd(ms,0,DATEDIFF(d,0,"&searchDate&")) and dateadd(ms,3,DATEDIFF(d,-1,"&searchDate&")) "
  DateFF="h"
  DateDD="d"
ElseIf ReportType="2" Then    '周
  SqlDate=" between dateadd(ms,0,DATEDIFF(d,6,"&searchDate&")) and dateadd(ms,-3,DATEDIFF(d,-1,"&searchDate&")) "
  DateFF="d"
  DateDD="ww"
ElseIf ReportType="3" Then    '月
  SqlDate=" between dateadd(ms,0,DATEDIFF(d,29,"&searchDate&")) and dateadd(ms,-3,DATEDIFF(d,-1,"&searchDate&")) "
  DateFF="d"
  DateDD="m"
ElseIf ReportType="4" Then    '年
  SqlDate=" between dateadd(mm,-12,DATEADD(mm, DATEDIFF(m,0,"&searchDate&")+1,0)) and dateadd(ms,-3,DATEADD(mm, DATEDIFF(m,0,"&searchDate&")+1,0)) "
  DateFF="d"
  DateDD="yyyy"
ElseIf ReportType="5" Then    '整月
  SqlDate=" between DATEADD(mm,DATEDIFF(mm,0,"&searchDate&"),0) and dateadd(ms,-3,DATEADD(mm,DATEDIFF(m,0,"&searchDate&")+1,0)) "
  DateFF="d"
  DateDD="m"
ElseIf ReportType="6" Then    '结算月
  SqlDate=" between CAST(DATENAME(YEAR,DATEADD(MONTH,-1,"&searchDate&"))+DATENAME(MONTH,DATEADD(MONTH,-1,"&searchDate&"))+'25' AS DATE) and CAST(DATENAME(YEAR,"&searchDate&")+DATENAME(MONTH,"&searchDate&")+'25' AS DATE) "
  DateFF="d"
  DateDD="m"
End if
'SqlDate=" between dateadd(ms,0,DATEDIFF(d,86,getdate())) and dateadd(ms,0,DATEDIFF(d,79,getdate())) "
sql=Replace(Replace(SqlDate," between","select ")," and ",",")
'Response.Write sql
rs.open sql,objConn,1,1
DateA=rs(0)
DateB=rs(1)
DateB=dateadd(DateFF,-1,DateB)
DateC=DateA
rs.close()
DateDay = DateDiff("d",DateA,DateB)+1
'Response.Write DateDay
'Response.end
labelsArr=labelsArr_A(DateA,DateB)
 
If ReportType="1" then        '日
  DateH2 = Year(DateA) &"年"& Month(DateA) &"月"& Day(DateA) &"日"
ElseIf ReportType="2" Then    '周
  DateH2 = Month(DateA) &"月"& Day(DateA) &"日~"
  If Month(DateA)<>Month(DateB) Then
    DateH2 = DateH2 & Month(DateB) &"月"& Day(DateB) &"日"
  Else
    DateH2 = DateH2 & Day(DateB) &"日"
  End If
ElseIf ReportType="3" Then    '月
  DateH2 = Month(DateA) &"月"& Day(DateA) &"日~"
  If Month(DateA)<>Month(DateB) Then
    DateH2 = DateH2 & Month(DateB) &"月"& Day(DateB) &"日"
  Else
    DateH2 = DateH2 & Day(DateB) &"日"
  End If
ElseIf ReportType="4" Then    '年
  DateH2 = Right(Year(DateA),2) &"年"& Month(DateA) &"月~"
  If Year(DateA)<>Year(DateB) Then
    DateH2 = DateH2 & Right(Year(DateB),2) &"年"& Month(DateB) &"月"
  Else
    DateH2 = DateH2 & Month(DateB) &"月"
  End If
ElseIf ReportType="5" Then    '整月
  DateH2 = Right(Year(DateA),2) &"年"& Month(DateA) &"月"
 
ElseIf ReportType="6" Then    '结算月
  DateH2 = Right(Year(dateadd("m",1,DateA)),2) &"年"& Month(dateadd("m",1,DateA)) &"月"
End if
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><%=DateH2%></title>
 
<!-- Bootstrap style="display:none"-->
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/layout.css" rel="stylesheet">
 
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
 
</head>
 
<body>
<DIV id="div1" >
    <a href="?ListType=<%=ListType%>&ReportType=<%=ReportType%>&searchTXT=<%=dateadd(DateDD,-1,DateB)%>&RType=<%=RType%>"><div style="float:left;margin-top: 5%;margin-left: 4%;width: 6%;margin-bottom: 4%;position:absolute;top:0;left:0;"><img src="/resources/images/xiangleft.png" width="100%"></div></a>
    <div class="container">
        <h1 class="text-center h2"><%=DateH2%></h1>
    </div>
    <a href="?ListType=<%=ListType%>&ReportType=<%=ReportType%>&searchTXT=<%=dateadd(DateDD,1,DateB)%>&RType=<%=RType%>"><div style="float:right;margin-top: 5%;margin-left: 90%;width: 6%;margin-bottom: 4%;position:absolute;top:0;left:0;"><img src="/resources/images/xiangright.png" width="100%"></div></a>
 
    <div class="container-fluid title" style="height: auto;">
        <div class="row">
            <div class="col-xs-12" id="ReportName"><%=ReportName%></div>
        </div>
        <%if isDepartment("070109")=1 Then
        
        If UnitIDCookies<>"" Then
            UnitIDCookiesPS=SPLIT(UnitIDCookies,",")
            UnitIDCookies=""
            for z = 0 to UBOUND(UnitIDCookiesPS)
                UnitIDCookies=UnitIDCookies&","&right("00"&Trim(UnitIDCookiesPS(z)),3)
            next
        End If%>
            <form name="Unitform" id="Unitform" action="?ListType=<%=ListType%>&ReportType=<%=ReportType%>&searchTXT=<%=searchTXT%>&RType=<%=RType%>" method="POST"> 
            <div style="height: 40px;line-height: 30px;">
                <button type="button" onclick="selectAll()" style="width: 70px;font: icon;">全选</button>
                <button type="button" onclick="unSelectAll()" style="width: 70px;font: icon;">全不选</button>
                <button type="button" onclick="converSelectAll()" style="width: 70px;font: icon;">反选</button>
                <button type="button" onclick="checkboxOnclick()" style="width: 90px;font: icon;">提交</button>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <%for z = 0 to UBOUND(UnitNamesPS)
                      UnitNamesPS1=SPLIT(UnitNamesPS(z),",")
                      vID=UnitNamesPS1(0)
                      vtext=replace(replace(UnitNamesPS1(1),"分公司",""),"公司","")
                      vtext=replace(vtext,"转运组","")
                      %>
                        <input type="checkbox" name="UnitIDCookies" value="<%=vID%>" id="UnitID_<%=vID%>"<%If UnitIDCookies="" Or InStr(UnitIDCookies,right("00"&vID,3))>0 Then Response.Write " checked"%>><label for="UnitID_<%=vID%>"><%=vtext%></label>&nbsp;&nbsp;&nbsp;&nbsp;
                        <%If z=3 Or z=7 Or z=11 Or z=15 Or z=19 Then Response.Write "<BR>"%>
                    <%next%>
                </div>
 
            </div>
            </form>
        <%End If%>
    </div>
    <script type="text/javascript">
        function checkboxOnclick(checkbox){
            Unitform.submit();
        }
        var inputs =  document.getElementsByName("UnitIDCookies");
        function selectAll(){
            for(var i = 0;i<inputs.length;i++){
                inputs[i].checked = true;
            }
            Unitform.submit();
        }
        function unSelectAll(){
            for(var i = 0;i<inputs.length;i++){
                inputs[i].checked = false;
            }
        }
        function converSelectAll(){
            var j=0;
            for(var i = 0;i<inputs.length;i++){
                if(inputs[i].checked){
                    inputs[i].checked = false;
                }else{
                    j++;
                    inputs[i].checked = true;
                }
            }
            if (j>0)
            {
                Unitform.submit();
            }
        }
    </script>
 
 
    <div class="container-fluid content">
    <%
    Sum_OrdInt=0
    Sum_TraTxnPrice=0
    DateC=DateA
    dataArr1=""
    dataArr2=""
 
    If ReportType="1" then        '日
      sql="select OrdInt=SUM(OrdInt),TraTxnPrice=SUM(TraTxnPrice+StretcherMoney),yy,mm,dd,hh from (select OrdInt=COUNT(DispatchOrdID),StretcherMoney=sum(StretcherMoney),case when isnull(SUM(ServiceOrdTraTxnPrice),0)=0 or DispatchOrdPerfomance=0 then 0 else SUM(ServiceOrdTraTxnPrice)/((select SUM(DispatchOrdPerfomance) from DispatchOrd where ServiceOrdIDDt=ServiceOrdID and DispatchOrdState not in (0,10,14))/DispatchOrdPerfomance) END as TraTxnPrice,yy=YEAR(DispatchOrd_NS_Time),mm=MONTH(DispatchOrd_NS_Time),dd=day(DispatchOrd_NS_Time),hh=DATEPART(hh,DispatchOrd_NS_Time) from DispatchOrd LEFT JOIN ServiceOrder on ServiceOrdIDDt=ServiceOrdID  where DispatchOrd_NS_Time "&SqlDate&" and DispatchOrdState not in (0,10,14) and (ServiceOrdClass in ('"&OrdClassListSql&"') or DispatchOrdClass in ('"&OrdClassListSql&"')) GROUP BY YEAR(DispatchOrd_NS_Time),MONTH(DispatchOrd_NS_Time),day(DispatchOrd_NS_Time),DATEPART(hh,DispatchOrd_NS_Time),ServiceOrdID,DispatchOrdPerfomance) as aa GROUP BY yy,mm,dd,hh order by yy,mm,dd,hh"
      DateFF="h"
    ElseIf ReportType="2" Or ReportType="3" Or ReportType="5" Or ReportType="6" Then    '周
      sql="select OrdInt=SUM(OrdInt),TraTxnPrice=SUM(TraTxnPrice+StretcherMoney),yy,mm,dd,hh from (select OrdInt=COUNT(DispatchOrdID),StretcherMoney=sum(StretcherMoney),case when isnull(SUM(ServiceOrdTraTxnPrice),0)=0 or DispatchOrdPerfomance=0 then 0 else SUM(ServiceOrdTraTxnPrice)/((select SUM(DispatchOrdPerfomance) from DispatchOrd where ServiceOrdIDDt=ServiceOrdID and DispatchOrdState not in (0,10,14))/DispatchOrdPerfomance) END as TraTxnPrice,yy=YEAR(DispatchOrd_NS_Time),mm=MONTH(DispatchOrd_NS_Time),dd=day(DispatchOrd_NS_Time),hh=0 from DispatchOrd LEFT JOIN ServiceOrder on ServiceOrdIDDt=ServiceOrdID  where DispatchOrd_NS_Time "&SqlDate&" and DispatchOrdState not in (0,10,14) and (ServiceOrdClass in ('"&OrdClassListSql&"') or DispatchOrdClass in ('"&OrdClassListSql&"')) GROUP BY YEAR(DispatchOrd_NS_Time),MONTH(DispatchOrd_NS_Time),day(DispatchOrd_NS_Time),ServiceOrdID,DispatchOrdPerfomance) as aa GROUP BY yy,mm,dd,hh order by yy,mm,dd,hh"
      DateFF="d"
    ElseIf ReportType="4" Then    '年
      sql="select OrdInt=SUM(OrdInt),TraTxnPrice=SUM(TraTxnPrice+StretcherMoney),yy,mm,dd,hh from (select OrdInt=COUNT(DispatchOrdID),StretcherMoney=sum(StretcherMoney),case when isnull(SUM(ServiceOrdTraTxnPrice),0)=0 or DispatchOrdPerfomance=0 then 0 else SUM(ServiceOrdTraTxnPrice)/((select SUM(DispatchOrdPerfomance) from DispatchOrd where ServiceOrdIDDt=ServiceOrdID and DispatchOrdState not in (0,10,14))/DispatchOrdPerfomance) END as TraTxnPrice,yy=YEAR(DispatchOrd_NS_Time),mm=MONTH(DispatchOrd_NS_Time),dd=1,hh=0 from DispatchOrd LEFT JOIN ServiceOrder on ServiceOrdIDDt=ServiceOrdID  where DispatchOrd_NS_Time "&SqlDate&" and DispatchOrdState not in (0,10,14) and (ServiceOrdClass in ('"&OrdClassListSql&"') or DispatchOrdClass in ('"&OrdClassListSql&"')) GROUP BY YEAR(DispatchOrd_NS_Time),MONTH(DispatchOrd_NS_Time),ServiceOrdID,DispatchOrdPerfomance) as aa GROUP BY yy,mm,dd,hh order by yy,mm,dd,hh"
      DateFF="m"
    End If
    'Response.Write sql
    'Response.end
    rs.open sql,objConn,1,1
    do While not rs.Eof
        OrdInt        = rs("OrdInt")            '订单数量
        TraTxnPrice    = int(rs("TraTxnPrice"))'金额汇总
        yy            = rs("yy")
        mm            = rs("mm")
        dd            = rs("dd")
        hh            = rs("hh")
        Sum_OrdInt    = Sum_OrdInt+OrdInt
        Sum_TraTxnPrice=Sum_TraTxnPrice+TraTxnPrice
        If RType="1" Then
          ReportInt="¥"&TraTxnPrice
        ElseIf RType="2" Then
          ReportInt=OrdInt
        End If
 
        If ListType="2" Then
          RURL="m_ReportOrdList.gds?ListType=1&ReportType=5&RType="&RType&"&searchTXT="&DateSerial(yy,mm,dd)
        Else
          RURL="m_ReportOrdList1.gds?ReportType=1&RType="&RType&"&searchTXT="&DateSerial(yy,mm,dd)
        End If
        %>
        <a href="<%=RURL%>">
        <div class="row">
            <div class="col-xs-3 pull-left left"><%=ReportInt%></div>
            <div class="col-xs-9 pull-right right text-right"><%=yy%>年<%=mm%>月<%If ListType="1" then%><%=dd%>日<%End If%></div>
        </div>
        </a>
        <%
        rs.movenext
    loop
    rs.close()
    'Response.Write dataArr1
    dataArr1=Mid(dataArr1,2)
    dataArr2=Mid(dataArr2,2)
    %>
    </div>
</div>
<script>
<%If RType="1" Then%>
document.getElementById('ReportName').innerHTML="<%=ReportName%>   汇总:¥<%=Sum_TraTxnPrice%>"
<%ElseIf RType="2" Then%>
document.getElementById('ReportName').innerHTML="<%=ReportName%>   汇总:<%=Sum_OrdInt%>"
<%End If%>
</script>
<!--#include virtual="/m_Report_footer.gds"-->
<input name="OA_latitude" type="hidden" value="">
<input name="OA_longitude" type="hidden" value="">
<input name="OA_address" type="hidden" value="<%=OA_address%>">
    <%
    '微信JS-SDK
     timestamp = ToUnixTime(now(),+8)
     wxnonceStr = "5P1QYH5OEW6BCXTo"
     wxticket = Getjsapi_ticket()
     wxurl = WEBURL&Request.ServerVariables("URL")
     if Request.ServerVariables("QUERY_STRING")<>"" then wxurl=wxurl&"?"&Request.ServerVariables("QUERY_STRING")
     wxOri = "jsapi_ticket="&wxticket&"&noncestr="&wxnonceStr&"&timestamp="&timestamp&"&url="&wxurl
     wxSha1 = hex_sha1(wxOri)
    %>
    <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script>
      wx.config({
          debug: false,
          appId: '<%=corpid%>',
          timestamp: <%=timestamp%>,
          nonceStr: '<%=wxnonceStr%>',
          signature: '<%=wxSha1%>',
          jsApiList: [
            'checkJsApi',
            'openLocation',
            'getLocation',
            'closeWindow'
          ]
      });
      
    </script>
    <script src="/js/zepto.min.js"></script>
 
 
    <script>
    wx.ready(function () { 
            wx.getLocation({
            success: function (res) {
                document.all.OA_latitude.value = JSON.stringify(res.latitude);
                document.all.OA_longitude.value = JSON.stringify(res.longitude);
            },
            cancel: function (res) {
                alert('用户拒绝授权获取地理位置');
                //document.getElementById('div1').style.display='none';
                return false;
            }
            });
        })
    wx.ready(function () {
                var add_url;
                var formatted_address;
                var cuan;
                wx.getLocation({
                    type: 'wgs84', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
                    success: function (res) {
                        document.getElementById('div1').style.display='';
                        var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
                        var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
                        var speed = res.speed; // 速度,以米/每秒计
                        var accuracy = res.accuracy; // 位置精度
                        var point_url = "http://restapi.amap.com/v3/geocode/regeo?output=JSON&location="+longitude+","+latitude+"&key=fc226a9479cdd12eed4ab6acbc692fca&coordsys=gps";
 
                        $.get(point_url, function(result){
                            cuan = result.regeocode.addressComponent.township+result.regeocode.addressComponent.streetNumber.street+result.regeocode.addressComponent.streetNumber.number+result.regeocode.addressComponent.neighborhood.name;
                            formatted_address = "实时定位:"+result.regeocode.formatted_address;
                            $('.xqP2').html(formatted_address);
                            document.all.OA_address.value = result.regeocode.formatted_address;
                            document.all.OA_latitude.value = JSON.stringify(res.latitude);
                            document.all.OA_longitude.value = JSON.stringify(res.longitude);
                            Running_address(JSON.stringify(res.latitude),JSON.stringify(res.longitude),result.regeocode.formatted_address);
                        });
                        
                    },
                    fail: function (res) {
                        //alert('获取地理位置失败');
                        //document.getElementById('div1').style.display='none';
                        $('.xqP2').html('获取地理位置失败');
                        return false;
                    },
                    cancel: function (res) {
                        alert('用户拒绝授权获取地理位置');
                        //document.getElementById('div1').style.display='none';
                        $('.xqP2').html('用户拒绝授权获取地理位置');
                        return false;
                    }
                });
              function lbs_GPS(addressname,address,lat,lng) {
                wx.openLocation({ 
                  latitude: lat,
                  longitude: lng,
                  name: addressname,
                  address: address,
                  scale: 14,
                  infoUrl: 'http://weixin.qq.com'
                });
              };
 
        });
    function Running_address(latitude,longitude,address) {
            //alert(address);
            $.ajax({
                type: "POST",  
                url: "/Running_address.gds",//需要跳转到的界面 the page you want to post data  
                data: {  
                        address: address//要传给后台的数据 the data you should send to background  
                    }
            })
        };
 
    </script>
 
</body>
</html>