【调度系统】广东民航医疗快线调度系统源代码
hzj
2025-07-09 4418374d26a16ec759e06059c2b1fedabe1827e6
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
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<%
'Response.Cookies("OA")("adminID")=""
'Response.end
DispatchOrdID=request("DispatchOrdID")
closeWindow=SafeRequest(Request("closeWindow"))
state=request("state")
If state<>"" Then
    stateSP=split(state,"|")
    for i = 0 to UBOUND(stateSP)
        If InStr(stateSP(i),"DispatchOrdID=")=1 Then
            DispatchOrdID=Replace(stateSP(i),"DispatchOrdID=","")
        ElseIf InStr(stateSP(i),"closeWindow=")=1 Then
            closeWindow=Replace(stateSP(i),"closeWindow=","")
        End If
    Next
End If
if DispatchOrdID="" then Response.Redirect "/"
state=DispatchOrdID%>
<!--#include virtual="/weixin/OAuth2.gds"-->
<!--#include virtual="/inc/function.gds"-->
<!--#include virtual="/weixin/sha1.gds"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no">  
<title>费用支付</title>
<link href="css/main.css" type="text/css" rel="stylesheet">
</head>
<%
errmsg=trim(Request("errmsg"))
if errmsg<>"" then
    Response.Write "<script type=""text/javascript"">alert('"&errmsg&"');</script>"
end if
%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from DispatchOrd where DispatchOrdState>0 and DispatchOrdID="&DispatchOrdID
rs.open sql,objConn,1,1
If not rs.Eof Then
    DispatchOrdID            = rs("DispatchOrdID")            '调度单号
    DispatchOrdClass        = rs("DispatchOrdClass")        '单据类型
    ServiceOrdID            = rs("ServiceOrdIDDt")            '对应受理单号
    DispatchOrdState        = rs("DispatchOrdState")        '调度单状态
    DispatchOrdStartDate    = rs("DispatchOrdStartDate")    '调度单状态时间
    DispatchOrd_NS_ID        = rs("DispatchOrd_NS_ID")        '开单人ID
    DispatchOrd_NS_Time        = rs("DispatchOrd_NS_Time")        '开单时间
    DispatchOrd_AP_ID        = rs("DispatchOrd_AP_ID")        '审核人ID
    DispatchOrd_AP_Time        = rs("DispatchOrd_AP_Time")        '审核时间
    DispatchOrd_AP_Check    = rs("DispatchOrd_AP_Check")    '是否审核(0否,1是)
    DispatchOrdCarID        = rs("DispatchOrdCarID")        '派遣车辆ID
    DispatchOrdTraSDTime    = rs("DispatchOrdTraSDTime")    '拟出发时间
    DispatchOrdActualDate    = rs("DispatchOrdActualDate")    '实际出车时间
    DispatchOrdArriveDate    = rs("DispatchOrdArriveDate")    '实际到达时间
    DispatchOrdReturnDate    = rs("DispatchOrdReturnDate")    '实际返回时间
    DispatchOrdTraDistance    = rs("DispatchOrdTraDistance")    '实际距离
    DispatchOrdTraStreet    = rs("DispatchOrdTraStreet")    '实际出发地
    DispatchOrdTraEnd        = rs("DispatchOrdTraEnd")        '实际目的地
    DispatchOrdTraVia        = rs("DispatchOrdTraVia")        '实际途经地
    DispatchOrdCoName        = rs("DispatchOrdCoName")        '调度联系人
    DispatchOrdCoPhone        = rs("DispatchOrdCoPhone")        '调度联系电话
    DispatchOrdTraStreetMileage= rs("DispatchOrdTraStreetMileage")'开始里程数
    DispatchOrdTraEndMileage= rs("DispatchOrdTraEndMileage")'结束里程数
    DispatchOrdMileage        = rs("DispatchOrdMileage")        '实际里程数
    DispatchOrdGasoline        = rs("DispatchOrdGasoline")        '油耗
    DispatchOrdRemarks        = rs("DispatchOrdRemarks")        '行驶备注记录
    EntourageName_aid1        = rs("EntourageName_aid1")        '外援人员1
    EntourageName_aid2        = rs("EntourageName_aid2")        '外援人员2
    StretcherMoney            = rs("StretcherMoney")            '担架费
    IsLocking                = rs("IsLocking")                '财务锁定
    DispatchOrdNo            = DispatchOrdClass& year(rs("DispatchOrd_NS_Time"))&Right("0"&month(rs("DispatchOrd_NS_Time")),2)&Right("0"&day(rs("DispatchOrd_NS_Time")),2) & "-"&Right("00"&rs("DispatchOrdNo"),3)    '调度单编号
 
Else
    Response.Redirect "/m_DispatchOrder_List.gds?DispatchOrdID="&DispatchOrdID&"&SystemMessageType=4&SMT=9"
End If
rs.close()
 
'相关受理单
If ServiceOrdID<>"" then
sql="select * from ServiceOrder where ServiceOrdID="&ServiceOrdID
rs.open sql,objConn,1,1
If not rs.Eof then
      ServiceOrdID            = rs("ServiceOrdID")            '服务单号
      ServiceOrdClass        = rs("ServiceOrdClass")            '单据类型
      ServiceOrdType        = rs("ServiceOrdType")            '服务单类型
      ServiceOrdState        = rs("ServiceOrdState")            '服务单状态
      ServiceOrdStartDate    = rs("ServiceOrdStartDate")        '开单日期
      ServiceOrdApptDate    = rs("ServiceOrdApptDate")        '预约日期
      ServiceOrdCoName        = rs("ServiceOrdCoName")        '联系人姓名
      ServiceOrdCoPhone        = rs("ServiceOrdCoPhone")        '联系人电话
      ServiceOrdCoTies        = rs("ServiceOrdCoTies")        '联系人与患者关系
      ServiceOrdPtName        = rs("ServiceOrdPtName")        '患者姓名
      ServiceOrdPtAge        = rs("ServiceOrdPtAge")            '患者年龄
      ServiceOrdPtSex        = rs("ServiceOrdPtSex")            '患者性别
      ServiceOrdPtNat        = rs("ServiceOrdPtNat")            '患者国籍
      ServiceOrdPtOutHosp    = rs("ServiceOrdPtOutHosp")        '转出医院
      ServiceOrdPtServices    = rs("ServiceOrdPtServices")    '科室
      ServiceOrdPtDiagnosis    = rs("ServiceOrdPtDiagnosis")    '诊断
      ServiceOrdPtCondition    = rs("ServiceOrdPtCondition")    '病情描述
      ServiceOrdPtDoctor    = rs("ServiceOrdPtDoctor")        '患者医生
      ServiceOrdPtDoctorPhone=rs("ServiceOrdPtDoctorPhone")    '患者医生电话
      ServiceOrdTraProvince    = rs("ServiceOrdTraProvince")    '出发地省份
      ServiceOrdTraCity        = rs("ServiceOrdTraCity")        '出发地城市
      ServiceOrdTraStreet    = rs("ServiceOrdTraStreet")        '出发地
      ServiceOrdTraStreetCoo= rs("ServiceOrdTraStreetCoo")    '出发地坐标
      ServiceOrdTraEnd        = rs("ServiceOrdTraEnd")        '目的地
      ServiceOrdTraEndCoo    = rs("ServiceOrdTraEndCoo")        '目的地坐标
      ServiceOrdTraDistance    = rs("ServiceOrdTraDistance")    '距离(公里)
      ServiceOrdTraDuration    = rs("ServiceOrdTraDuration")    '预计行程时间
      ServiceOrdTraUnitPrice= rs("ServiceOrdTraUnitPrice")    '单价/公里
      ServiceOrdTraOfferPrice=rs("ServiceOrdTraOfferPrice")    '标准报价
      ServiceOrdTraTxnPrice    = rs("ServiceOrdTraTxnPrice")    '成交价
      ServiceOrdTraPaidPrice= rs("ServiceOrdTraPaidPrice")    '已支付金额
      ServiceOrdTraPriceReason=rs("ServiceOrdTraPriceReason")'差价原因
      ServiceOrd_CC_ID        = rs("ServiceOrd_CC_ID")        '第一次接单人员ID
      ServiceOrd_CC_Time    = rs("ServiceOrd_CC_Time")        '第一次接单时间
      ServiceOrd_NS_ID        = rs("ServiceOrd_NS_ID")        '确认服务单人员ID
      ServiceOrd_NS_Time    = rs("ServiceOrd_NS_Time")        '确认服务单时间
      ServiceOrd_AP_Check    = rs("ServiceOrd_AP_Check")        '服务单审核状态(0未审核,1已审核)
      ServiceOrd_AP_ID        = rs("ServiceOrd_AP_ID")        '服务单审核人员ID
      ServiceOrd_AP_Time    = rs("ServiceOrd_AP_Time")        '服务单审核时间
      ServiceOrdUnitID        = rs("ServiceOrdUnitID")        '第三方ID
      PayQRcodeURL            = rs("PayQRcodeURL")            '第三方支付链接
      ServiceOrdNo            = ServiceOrdClass& year(rs("ServiceOrd_CC_Time"))&Right("0"&month(rs("ServiceOrd_CC_Time")),2)&Right("0"&day(rs("ServiceOrd_CC_Time")),2) & "-"&Right("00"&rs("ServiceOrdNo"),3)
      If IsNumeric(ServiceOrdTraDistance) Then ServiceOrdTraDistance=ServiceOrdTraDistance&"公里"
End If
rs.close()
End If
 
'领队情况
sql="select DispatchOrd_Entourage.id,EntourageOAid,EntourageLead,OA_weixinUserID,EntourageState,EntourageState_Time,OA_Name,OA_weixinAvatar,vtext from DispatchOrd_Entourage,OA_User,dictionary where vtitle='DispatchOrdEntourage' and  EntourageID=vID and OA_User_ID=EntourageOAid and EntourageState<>4 and EntourageLead=1 and DispatchOrdIDDt="&DispatchOrdID
rs.open sql,objConn,1,1
If not rs.Eof Then
    EntourageLeadID=rs("EntourageOAid")
End If
rs.close()
 
'行驶里程
If DispatchOrdMileage=0 And DispatchOrdTraStreetMileage<>0 And DispatchOrdTraEndMileage<>0 Then
    DispatchOrdMileage1=DispatchOrdTraEndMileage-DispatchOrdTraStreetMileage
    DispatchOrdGasoline1=""
Else
    DispatchOrdMileage1=DispatchOrdMileage
    DispatchOrdGasoline1=DispatchOrdGasoline
End If
 
'审核状态
If DispatchOrdState="8" Or DispatchOrdState="9" Then
    If DispatchOrd_AP_Check="1" then
        DispatchOrd_CheckTXT    = DispatchOrdStateA(12)
    ElseIf DispatchOrd_AP_Check="0" And DispatchOrdMileage>0 then
        DispatchOrd_CheckTXT    = "等待审核"
    ElseIf DispatchOrd_AP_Check="0" And DispatchOrdMileage=0 then
        DispatchOrd_CheckTXT    = "未提交"
    End If
    If DispatchOrd_CheckTXT<>"" Then DispatchOrd_CheckTXT="("&DispatchOrd_CheckTXT&" )"
End If
 
If DispatchOrdCarID<>"" And DispatchOrdCarID<>"0" Then
    DispatchOrdCarLicense=CarDataA(DispatchOrdCarID,"","CarLicense")
ElseIf DispatchOrdState=3 And CInt(session("adminID"))=CInt(EntourageLeadID) Then
    DispatchOrdCarLicense="点击选择车辆"
Else
    DispatchOrdCarLicense="未指派"
End If
%>
<body>
<div id="m_Orer">
    <!--#include virtual="/m_DispatchOrder_header.gds"-->
    <!--<div class="order_head"><a href="order_List.asp"><font></font></a>调度详情</div>-->
    <!--<div class="os_status"><span class="os_statusfirst">订单状态:等待卖家发货</span><span class="os_refresh">刷新</span></div>-->
    
    <!--<div class="os_line"></div>-->
 
    <form id="form1" name="form1" action="admin_save.gds" method="post">
    <input name="admin_save" type="hidden" value="">
    <input name="ServiceOrdID" type="hidden" value="<%=ServiceOrdID%>">
    <input name="DispatchOrdID" type="hidden" value="<%=DispatchOrdID%>">
    <input name="EntourageLeadID" type="hidden" value="<%=EntourageLeadID%>">
    <input name="OA_latitude" type="hidden" value="">
    <input name="OA_longitude" type="hidden" value="">
    <input name="OA_address" type="hidden" value="<%=OA_address%>">
    <input name="PaidMoneyTimestamp" id="PaidMoneyTimestamp" type="hidden" value="<%=ToUnixTime(now(),+8)%>">
        
        <!--<div class="os_shopname">调度单状态:<%=replace(DispatchOrdStateA(DispatchOrdState),"全部确定:","")&DispatchOrd_CheckTXT%></div>-->
        
        <%'支付情况
        If ServiceOrdTraTxnPrice<>"" then%>
            <div class="os_shopname">成交价:<%=FormatCurrency(ServiceOrdTraTxnPrice,-1,-1)%><%If StretcherMoney<>"" And StretcherMoney>0 Then%>&nbsp;&nbsp;&nbsp;&nbsp;附加用费:<%=FormatCurrency(StretcherMoney,-1,-1)%><%End if%>
            <%If ServiceOrdTraPaidPrice<>"" Then%><br>已支付:<%=FormatCurrency(ServiceOrdTraPaidPrice,-1,-1)%><%End if%>
            <%If (ServiceOrdTraTxnPrice+StretcherMoney)-ServiceOrdTraPaidPrice>0 Then%><br>现支付:
            <select name="PaidMoneyType" id="PaidMoneyType" style="-webkit-appearance: none;outline: none;border: none;font-size: 14px;" onChange="javascript:select_PaidMoneyType()">
                <option value="">请选择</option>
                <%sql="select vID,vtext from dictionary where vtitle='PaidMoneyType' and vType=1 order by vOrder"
                rs.open Sql,objConn,1,1
                do while not rs.Eof%>
                <option value="<%=rs("vID")%>"><%=rs("vtext")%></option>
                <%rs.movenext
                Loop
                rs.close()%>
            </select>
            <script LANGUAGE="javascript">
            function select_PaidMoneyType(){
                if (document.getElementById('PaidMoneyType').value=='3') {
                    document.getElementById('form1payweixin').style.display='';
                    document.getElementById('form1pay1').style.display='none';
                    document.getElementById('form1payalipay').style.display='none';
                } else if (document.getElementById('PaidMoneyType').value=='4') {
                    document.getElementById('form1payalipay').style.display='';
                    document.getElementById('form1pay1').style.display='none';
                    document.getElementById('form1payweixin').style.display='none';
 
                }else{
                    document.getElementById('form1pay1').style.display='';
                    document.getElementById('form1payweixin').style.display='none';
                    document.getElementById('form1payalipay').style.display='none';
                }
                document.getElementById('form1pay2').style.display='none';
            }
            </script>
            <input type="text" id="PaidMoney" name="PaidMoney" style="width:40px;border: none;font-size: 14px;text-align:center;" value="<%=(ServiceOrdTraTxnPrice+StretcherMoney)-ServiceOrdTraPaidPrice%>" placeholder="<%=(ServiceOrdTraTxnPrice+StretcherMoney)-ServiceOrdTraPaidPrice%>">元
            <%If 1=2 Then%>
            <br><%=UnitUser(ServiceOrdUnitID,"UnitShort")%>支付二维码<br>
            <img src="<%=PayQRcodeURL%>" width="355" border="0">
            <%End If%>
            <%else%>
            <input name="PaidMoneyType" id="PaidMoneyType" type="hidden" value="">
            <input name="PaidMoney" id="PaidMoney" type="hidden" value="0">
            <%End if%>
            </div>
        <%ElseIf ServiceOrdTraTxnPrice<>"" Then%>
            <div class="os_shopname">成交价:<%=FormatCurrency(ServiceOrdTraTxnPrice,-1,-1)%><%If StretcherMoney<>"" And StretcherMoney>0 Then%>&nbsp;&nbsp;&nbsp;&nbsp;担架费:<%=FormatCurrency(StretcherMoney,-1,-1)%><%End if%>
            <%If ServiceOrdTraPaidPrice<>"" Then%><br>已支付:<%=FormatCurrency(ServiceOrdTraPaidPrice,-1,-1)%><%End if%></div>
        <%End if%>
 
    </form>
        
                <div class="os_img">
 
                <%
                              sql="select PaidMoney.id,vtext,PaidMoney,PaidMoneyType,PaidMoneyTime,PaidMoneyOaID,PaidMoney_AP_Check,PaidMoney_AP_ID,PaidMoney_AP_Time,PaidMoneyMono from PaidMoney,dictionary where vtitle='PaidMoneyType' and vType>=1 and vID=PaidMoneyType and PaidMoney<>0 and ServiceOrdIDDt="&ServiceOrdID&" order by PaidMoneyTime desc"
                                rs.open sql,objConn,1,1
                                i=0
                                PaidMoney_Check=0
                                sunPaidMoney=0
                                do while not rs.Eof
                                  PaidMoneyID        = rs("ID")                        '收款单号
                                  PaidMoneyName        = rs("vtext")                    '收款方式名称
                                  PaidMoneyType        = rs("PaidMoneyType")            '收款方式ID
                                  PaidMoney            = rs("PaidMoney")                '收款金额
                                  PaidMoneyTime        = rs("PaidMoneyTime")            '收款时间
                                  PaidMoneyOaID        = rs("PaidMoneyOaID")            '收款操作人员ID
                                  PaidMoney_AP_Check= rs("PaidMoney_AP_Check")        '审核状态(0未审核,1已审核)
                                  PaidMoney_AP_ID        = rs("PaidMoney_AP_ID")        '审核人员ID
                                  PaidMoney_AP_Time    = rs("PaidMoney_AP_Time")        '审核时间
                                  PaidMoneyMono        = rs("PaidMoneyMono")
 
                                  sunPaidMoney=sunPaidMoney+PaidMoney
                                  If PaidMoney_AP_Check=0 Then PaidMoney_Check=1
                                  If PaidMoneyMono<>"" Then PaidMoneyMono="<br>"&PaidMoneyMono
                                  %>
                                  <div style=" margin:10px 10px;border-bottom: 1px solid #f1f1f1;">
                                        <div class="os_name" style="width: 50%;"><%=PaidMoneyName&"&nbsp;"&FormatCurrency(PaidMoney,-1,-1)&"("&AP_Check_A(PaidMoney_AP_Check)&")"&PaidMoneyMono%></div>
                                        <div class="os_weight"><%=OAUser(PaidMoneyOaID,"UserName")&"&nbsp;&nbsp;"&PaidMoneyTime%></div>
                                  </div>
                                <%rs.movenext
                                loop
                                rs.close()
                                %>
 
 
            
                </div>
            <div style="height:50px;"></div>
         <div class="posi" id="posi1">
            <div class="ljgm"><a class="bttt" id="posi1TXT">正在获取位置...</a></div>
         </div>
         <%'等待确认
         If (ServiceOrdTraTxnPrice+StretcherMoney)-ServiceOrdTraPaidPrice>0 Then
            'sql="update DispatchOrd_Entourage set EntourageRead_Time=GETDATE() where EntourageRead_Time is null and id="&UserEId
            'objConn.Execute sql
         %>
         <div class="posi" id="posi" style="display:none;">
            <div class="ljgm">
                <a id="form1pay1" href="javascript:form1_submit32_1()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700;display: none;" >确认支付</a>
                <a id="form1payweixin" href="javascript:form1_submit_weixinPay()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700;display: none;" >显示微信支付二维码</a>
                <a id="form1payalipay" href="javascript:form1_submit_alipayPay()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700;display: none;" >显示支付宝二维码</a>
                <a id="form1pay2" href="javascript:myrefresh()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700;">刷新</a>
            </div>
            <div class="ljgm" style="width: 20%;"><a href="/m_DispatchOrder_AddMoney.gds?DispatchOrdID=<%=DispatchOrdID%>" class="bttt">附加费用</a></div>
         </div>
         <script LANGUAGE="javascript">
         function form1_submit32_1(){
            var OA_latitude=document.form1.OA_latitude.value;
            var OA_longitude=document.form1.OA_longitude.value;
            //if (OA_latitude=='' || OA_longitude==''){alert("正在获取地理位置...");return false;}
 
            PaidMoney=document.getElementById('PaidMoney').value
            PaidMoneyType=document.getElementById('PaidMoneyType').value
            PaidMoneyTimestamp=document.getElementById('PaidMoneyTimestamp').value
            if (PaidMoney==''){PaidMoney=0}
            if (isNaN(PaidMoney)){alert("收款金额请输入数字");return false;}
            if (PaidMoneyType!='')
                {if(confirm("确定现收款:"+PaidMoney+"元?"))
                    {
                        document.form1.action = "admin_save.gds";
                        document.form1.admin_save.value = "32";
                        form1.submit();
                    }
                }
            else
                {alert("请选择收款方式");}
         }
         //微信支付
         function form1_submit_weixinPay(){
            var OA_latitude=document.form1.OA_latitude.value;
            var OA_longitude=document.form1.OA_longitude.value;
            //if (OA_latitude=='' || OA_longitude==''){alert("正在获取地理位置...");return false;}
 
            PaidMoney=document.getElementById('PaidMoney').value
            PaidMoneyType=document.getElementById('PaidMoneyType').value
            PaidMoneyTimestamp=document.getElementById('PaidMoneyTimestamp').value
            if (PaidMoney==''){PaidMoney=0}
            if (isNaN(PaidMoney)){alert("收款金额请输入数字");return false;}
            if (PaidMoneyType!='')
                {
                    window.location.replace('/weixin_pay_QR.asp?DispatchOrdID=<%=DispatchOrdID%>&ServiceOrdID=<%=ServiceOrdID%>&total_fee='+PaidMoney);
                }
            else
                {alert("请选择收款方式");}
         }
         //支付宝
         function form1_submit_alipayPay(){
            var OA_latitude=document.form1.OA_latitude.value;
            var OA_longitude=document.form1.OA_longitude.value;
            //if (OA_latitude=='' || OA_longitude==''){alert("正在获取地理位置...");return false;}
 
            PaidMoney=document.getElementById('PaidMoney').value
            PaidMoneyType=document.getElementById('PaidMoneyType').value
            PaidMoneyTimestamp=document.getElementById('PaidMoneyTimestamp').value
            if (PaidMoney==''){PaidMoney=0}
            if (isNaN(PaidMoney)){alert("收款金额请输入数字");return false;}
            if (PaidMoneyType!='')
                {
                    window.location.replace('/alipay_pay_QR.php?DispatchOrdID=<%=DispatchOrdID%>&ServiceOrdID=<%=ServiceOrdID%>&total_fee='+PaidMoney);
                }
            else
                {alert("请选择收款方式");}
         }
         function myrefresh()
            {
               window.location.reload();
            }
         </script>
         <%ElseIf IsLocking<>"1" Then%>
         <div class="posi" id="posi" style="display:none;">
            <div class="ljgm"><a href="/m_DispatchOrder_AddMoney.gds?DispatchOrdID=<%=DispatchOrdID%>" class="bttt">附加费用</a></div>
         </div>
         <div class="posi" id="posi" style="display:none;"></div>
         <%End if%>
</div>
 
 
    <%
    '微信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>
    function getLocation_JS(){
            wx.getLocation({
            success: function (res) {
                document.form1.OA_latitude.value = JSON.stringify(res.latitude);
                document.form1.OA_longitude.value = JSON.stringify(res.longitude);
                document.getElementById('posi1').style.display='none';
                document.getElementById('posi').style.display='';
            },
            cancel: function (res) {
                alert('用户拒绝授权获取地理位置');
                return false;
            }
            });
    }
    function getLocation1_JS(){
                document.getElementById('posi1').style.display='none';
                document.getElementById('posi').style.display='';
    }
    function closeWindow_JS(){
            alert('数据保存完成');
            wx.closeWindow();
    }
    
    
    <%'返回时关闭页面
    if closeWindow="YES" then%>
    window.setTimeout(closeWindow_JS,500);
    window.setTimeout(closeWindow_JS,2000);
    <%else
    '获取地理位置
    %>
    window.setTimeout(getLocation_JS,1000);
    window.setTimeout(getLocation1_JS,100);
    <%end if%>
 
    </script>
<IFRAME id="HiddenFrame" name="HiddenFrame" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#ffffff></IFRAME>
</body>
</html>