【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-06-24 a51d070d364b0da8e5f8ea9203a6e50c8b4c0af3
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
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--#include virtual="/inc/chkadmin.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
if isDepartment("0302")=0 then
  Response.Redirect "/"
  Response.End()
end If
 
searchTXT=SafeRequest(trim(Request("searchTXT")))
OrdState=SafeRequest(Request("OrdState"))
OrdClassList=SafeRequest(Request("OrdClassList"))
OrdDateType=SafeRequest(Request("OrdDateType"))
OrdDateStart=SafeRequest(Request("OrdDateStart"))
OrdDateEnd=SafeRequest(Request("OrdDateEnd"))
PaidMoneyID=SafeRequest(Request("PaidMoneyID"))
OrdType=SafeRequest(Request("OrdType"))
UnitNameID=SafeRequest(Request("UnitNameID"))
 
Set rs = Server.CreateObject("ADODB.Recordset")
Set rsDt = Server.CreateObject("ADODB.Recordset")
'默认显示字段
If OrdState="" Then OrdState=0
If OrdClassList="" Then OrdClassList="0"
If OrdClassList="0" Then
    OrdClassName="未审核"
ElseIf OrdClassList="1" Then
    OrdClassName="已审核"
Else
    OrdClassName="全部"
End If
If OrdType="" Then OrdType=1
If OrdDateType="" Then OrdDateType=4
If OrdDateType="0" then
    If OrdDateStart="" And OrdDateEnd="" Then
        OrdDateStart=Date()
        OrdDateEnd=Date()&" 00:00"
    ElseIf OrdDateStart<>"" And OrdDateEnd="" Then
        OrdDateEnd=OrdDateStart
    ElseIf OrdDateStart="" And OrdDateEnd<>"" Then
        OrdDateStart=OrdDateEnd
    End If
    If Cdate(OrdDateStart)>Cdate(OrdDateEnd) Then
        OrdDateStart1=OrdDateStart
        OrdDateStart=OrdDateEnd
        OrdDateEnd=OrdDateStart1
    End if
    If OrdDateStart=OrdDateEnd Then
        OrdDateStart=FORMATDATETIME(OrdDateStart,vbShortDate)
        OrdDateTypeName=OrdDateStart
        OrdDateTypeName1=OrdDateTypeName
        OrdDateEnd=FORMATDATETIME(OrdDateEnd,vbShortDate)&" 23:59:59"
    Else
        OrdDateTypeName=OrdDateStart&" 至 "&OrdDateEnd
        OrdDateTypeName1="时间段"
    End If
    SqlOrdDateType="between '"&OrdDateStart&"' and '"&OrdDateEnd&"'"
    
Else
    sql="select vID,vtext,vOrder2 from dictionary where vType>=1 and vtitle='OrdDateType' and vID="&OrdDateType
    rs.open Sql,objConn,1,1
    If not rs.Eof Then
        OrdDateTypeName    = rs("vtext")
        OrdDateTypeName1=OrdDateTypeName
        SqlOrdDateType    = rs("vOrder2")
    Else
        OrdDateType=4
        OrdDateTypeName="本月"
        OrdDateTypeName1=OrdDateTypeName
        SqlOrdDateType="between DATEADD(mm,DATEDIFF(mm,0,getdate()),0) and dateadd(ms,-3,DATEADD(mm,DATEDIFF(m,0,getdate())+1,0))"
    End If
    rs.close()
End if
 
'各种返回信息
SystemMessageType=trim(Request("SystemMessageType"))
SMT=trim(Request("SMT"))
if SystemMessageType<>"" then
  if SMT="1" then
    SystemMessageTXT="请选择需要操作的单据"
  elseif SMT="2" then
    SystemMessageTXT="单据状态错误或重复提交"
  elseif SMT="23" then
    SystemMessageTXT="费用单审核完成!!"
  elseif SMT="24" then
    SystemMessageTXT="费用单反审核完成!!"
  elseif SMT="25" then
    SystemMessageTXT="费用单作废完成!!"
  elseif SMT="6" then
    SystemMessageTXT="受理单号/结算方式/结算金额不可为空!!"
  elseif SMT="7" then
    SystemMessageTXT="新建费用单完成!!"
  elseif SMT="8" then
    SystemMessageTXT="单据退款重复!!"
  end if
end if
 
 
'时间段列表
sql="select vID,vtext from dictionary where vType>=1 and vtitle='OrdDateType' order by vOrder"
rs.open Sql,objConn,1,1
do while not rs.Eof
    OrdDateTypes = OrdDateTypes & rs("vID") &","& rs("vtext") & "|"
rs.movenext
Loop
rs.close()
OrdDateTypes = left(OrdDateTypes,len(OrdDateTypes)-1)
OrdDateTypesPS = SPLIT(OrdDateTypes,"|")
 
'单据类型表列
If OrdType="1" Then
    OrdTypeName="收款单"
    PaidMoneyTitle="结算"
Else
    OrdTypeName="退款单"
    PaidMoneyTitle="退款"
End If
OrdTypes = "1,收款单|2,退款单|"
OrdTypes = left(OrdTypes,len(OrdTypes)-1)
OrdTypesPS = SPLIT(OrdTypes,"|")
 
'单据状态表列
OrdClassTypes = "2,全部|0,未审核|1,已审核|"
OrdClassTypes = left(OrdClassTypes,len(OrdClassTypes)-1)
OrdClassTypesPS = SPLIT(OrdClassTypes,"|")
 
'结算方式表列
If PaidMoneyID="" Or PaidMoneyID="0" Then
  PaidMoneyName="全部"
  PaidMoneyID=0
End If
PaidMoneyTypes = "0,全部|"
sql="select vID,vtext,vType from dictionary where vtitle='PaidMoneyType' and vType>0 order by vOrder"
rs.open Sql,objConn,1,1
do while not rs.Eof
    ClassName=rs("vtext")
    vType=rs("vType")
    If vType>1 Then
        vTypeTXT=""
        For I = 2 to vType
            vTypeTXT=vTypeTXT&"--"
        Next
        ClassName=vTypeTXT&ClassName
    End If
    If CInt(PaidMoneyID)=rs("vID") Then PaidMoneyName    = ClassName
    PaidMoneyTypes = PaidMoneyTypes & rs("vID") &","& ClassName & "|"
rs.movenext
Loop
rs.close()
PaidMoneyTypes = left(PaidMoneyTypes,len(PaidMoneyTypes)-1)
PaidMoneyTypesPS = SPLIT(PaidMoneyTypes,"|")
 
'公司列表
If UnitNameID<>"" Then
    Response.Cookies("CAME")("UnitNameID")=UnitNameID
ElseIf UnitNameID="" And Request.Cookies("CAME")("UnitNameID")<>"" Then
    UnitNameID=Request.Cookies("CAME")("UnitNameID")
End If
UnitNameName="全部"
UnitNames = "0,全部|"
sql="select vID,vtext,vType from dictionary where vType>=0 and vtitle='UnitName' order by vType desc,vOrder"
rs.open Sql,objConn,1,1
do while not rs.Eof
    UnitName=rs("vtext")
    If rs("vType")=0 Then UnitName=UnitName&"(停用)"
    UnitNames = UnitNames & rs("vID") &","& UnitName & "|"
    If UnitNameID=CStr(rs("vID")) Then UnitNameName    = UnitName
rs.movenext
Loop
rs.close()
UnitNames = left(UnitNames,len(UnitNames)-1)
UnitNamesPS = SPLIT(UnitNames,"|")
 
If OrdState<>"0" then
    OrdListName    = ServiceOrdStateA(OrdState)&"查询"
Else
    OrdListName    = "费用单审核"
End If
 
page_URL="&OrdState="&OrdState&"&OrdClassList="&OrdClassList&"&OrdDateType="&OrdDateType&"&OrdDateStart="&OrdDateStart&"&OrdDateEnd="&OrdDateEnd&"&searchTXT="&searchTXT&"&PaidMoneyID="&PaidMoneyID&"&OrdType="&OrdType&"&UnitNameID="&UnitNameID
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><%=LindemanAdmin%></title>
        <!--#include virtual="/inc/ccs.gds"-->
        <script src="js/jquery-1.12.3.min.js"></script>
        <style type="text/css"> 
        .category_solid {border-left: 1px solid #cdcdcd;}
        .AP {color: #4CAF50;}
        </style>
    </head>
    <body onkeydown="xKeyEvent(event)">
        <!--#INCLUDE FILE="menu_header.gds" -->
        <!-- content -->
        <div id="content">
            <!--#INCLUDE FILE="Dispatch_menu_left.gds" -->
            <!-- content / right -->
            <div id="right">
                <!-- table -->
                <div class="box">
                    <!-- box / title -->
                    <div class="title">
                        <h5><span id="right_Menu" style="display: none;">[<a onclick="JavaScript:JS_left_Menu2('1');" style="color: #ffffff;">显示菜单</a>]&nbsp;</span><%If searchTXT<>"" then%>费用单查询 <%=searchTXT%><%else%><%=OrdDateTypeName1&" "&OrdListName%><%End if%></h5>
                        <ul class="links">
                            <%If isDepartment("030202")=1 Then%><li><a onclick="javascript:PaidMoneyCreate.style.display='block';">新建</a></li><%End If%>
                            <%If isDepartment("030204")=1 Then%><li><a onClick="form1_AP_1()">审核</a></li><%End If%>
                            <%If isDepartment("030204")=1 Then%><li><a onClick="form1_AP_0()">反审</a></li><%End If%>
                            <%If isDepartment("030203")=1 Then%><li><a onClick="form1_AP_2()">作废</a></li><%End If%>
                            <%If isDepartment("0302")=1 Then%><li><a HREF="PaidMoney_List2_csv.gds?h_menu1_1=2<%=page_URL%>">导出</a></li><%End If%>
                    <script LANGUAGE="javascript">
                        //审核
                        function form1_AP_1(){
                            var PaidMoneyIDobj = document.getElementsByName("PaidMoneyID");
                            var num  = 0;
                            var PayNum  = 0;
                            var id  = '';
                            for (var i = 0; i < PaidMoneyIDobj.length; i++) {
                                if (PaidMoneyIDobj[i].checked){
                                    num++;
                                    id=PaidMoneyIDobj[i].value;
                                    Mono=document.getElementById("PaidMoneyMono_"+id).value;
                                    if (Mono.indexOf("[线上退款]")>=0){PayNum++;}
                                }
                            }
                            if (PayNum>0 && num>1){
                                alert("线上退款审核每次只能处理一单");
                            }else if (PayNum>0 && num==1){
                                <%If isDepartment("030209")=1 Then%>
                                if(confirm("确定审核并发起线上退款?"))
                                {
                                    var ToPaidMoney  = 1;
                                    PaidMoneyTypeName=document.getElementById("PaidMoneyTypeName_"+id).innerHTML;
                                    PayID=Mono.substr(0,Mono.indexOf("[线上退款]"));
                                    PaidMoney=document.getElementById("PaidMoney_"+id).innerHTML.substr(1);
                                    ToPayID=Mono.substr(Mono.indexOf("收款编号:")+5);
                                    $.ajax({
                                        type: "POST",
                                        dataType:'json',
                                        url: "Search_PaidMoney.gds",
                                        data: {
                                            PaidMoneyID:ToPayID,
                                            SearchType:"1"
                                        },
                                        success:function(data){
                                            
                                            if (data!=''){
                                                if (data.result==1){
                                                    ToPaidMoney=data.PaidMoney;
                                                    if (PaidMoneyTypeName=="微信支付"){
                                                        //微信支付退款
                                                        PaidMoneyRefundURL="https://api.966120.com.cn/weixin/jingnei/example/refund.php?ReturnID=list&PaidMoneyID="+id+"&transaction_id="+PayID+"&total_fee="+(ToPaidMoney*100)+"&refund_fee="+(-PaidMoney*100);
                                                        //console.log(PaidMoneyRefundURL);
                                                        window.location.replace(PaidMoneyRefundURL);
                                                    }else if (PaidMoneyTypeName=="支付宝"){
                                                        //支付宝退款
                                                        PaidMoneyRefundURL="https://api.966120.com.cn/alipay/wappay/refund.php?ReturnID=list&PaidMoneyID="+id+"&WIDtrade_no="+PayID+"&total_fee="+ToPaidMoney+"&WIDrefund_amount="+(-PaidMoney)+"&WIDout_request_no="+id
                                                        window.location.replace(PaidMoneyRefundURL);
                                                    }
                                                }
                                            }
                                        }
                                    });
                                }
                                <%else%>
                                alert("缺少在线退款审核权");
                                <%end if%>
                            }else{
                                if(confirm("确定审核所选费用单?"))
                                {
                                    document.form1.action = "admin_save.gds?ReturnID=2";
                                    document.form1.admin_save.value="34"
                                    document.form1.PaidMoney_Check.value="1"
                                    form1.submit();
                                }
                            }
                            
                        }
 
                        //反审核
                        function form1_AP_0(){
                        if(confirm("确定反审核所选费用单?"))
                            {
                                document.form1.action = "admin_save.gds?ReturnID=2";
                                document.form1.admin_save.value="34"
                                document.form1.PaidMoney_Check.value="0"
                                form1.submit();
                            }
                        }
                        //作废
                        function form1_AP_2(){
                        if(confirm("确定作废所选费用单?"))
                            {
                                document.form1.action = "admin_save.gds?ReturnID=2";
                                document.form1.admin_save.value="34"
                                document.form1.PaidMoney_Check.value="-1"
                                form1.submit();
                            }
                        }
 
                        //新建字典-关闭上传窗口
                        function JS_PaidMoneyCreateClose()
                        {
                        PaidMoneyCreate.style.display="none";
                        }
                        //新建字典-保存
                        function JS_PaidMoneyCreateSave()
                        {
                        form2.submit();
                        }
                        //受理单调单查询
                        function JS_PaidMoneySearch()
                        {
                        ServiceOrdNo=document.form2.ServiceOrdNo.value;
                        window.HiddenFrame.location.replace('Search_ServiceOrd.gds?ServiceOrdNo='+ServiceOrdNo);
                        }
                        //显示受理单数据
                        function JS_PaidMoneyData(ServiceOrdID,ServiceOrdPtName,PaidMoney)
                        {
                            document.form2.ServiceOrdPtName.value=ServiceOrdPtName;
                            document.form2.PaidMoney.value=PaidMoney;
                            document.form2.ServiceOrdID.value=ServiceOrdID;
                        }
                        //选择修改
                        function form1_Paid_Edit(id){
                            if (document.getElementById('Show_PaidMoneyMono_'+id).style.display=="none")
                            {
                                document.getElementById('Show_PaidMoneyMono_'+id).style.display='';
                                document.getElementById('Edit_PaidMoneyMono_'+id).style.display='none';
                            }
                            else
                            {
                                document.getElementById('Show_PaidMoneyMono_'+id).style.display='none';
                                document.getElementById('Edit_PaidMoneyMono_'+id).style.display='';
                            }
                        }
                    </script>
                    <div class="dialogJ  dialogJfix dialogJshadow" id="PaidMoneyCreate" style="width: 370px; right: 300px; top: 150px;display:none;">
                    
                        <div class="dialogJtitle">
                            <a href="javascript:JS_PaidMoneyCreateClose();" class="dialogJclose" title="关闭本窗口">&nbsp;</a>
                            <span class="dialogJtxt" id="EditPhotoTXT">新建费用单</span>
                        </div>
                        <form id="form2" name="form2" action="admin_save.gds?ReturnID=2" method="post">
                        <input name="admin_save" type="hidden" value="35">
                        <input name="searchTXT" type="hidden" value="<%=searchTXT%>">
                        <input name="ServiceOrdID" type="hidden" value="">
                        <input name="page" type="hidden" value="<%=acc1%>">
                        <input name="OrdState" type="hidden" value="<%=OrdState%>">
                        <input name="OrdClassList" type="hidden" value="<%=OrdClassList%>">
                        <input name="OrdDateType" type="hidden" value="<%=OrdDateType%>">
                        <input name="OrdType" type="hidden" value="<%=OrdType%>">
                        <input name="PaidMoneyTimestamp" id="PaidMoneyTimestamp" type="hidden" value="<%=ToUnixTime(now(),+8)%>">
                        <div class="dialogJcontent">
                            <div class="dialogJbody" id="dialogJbody" style="height: 210px;">
                                <div class="modify-album-name">
                                    <span>受理单号:</span>
                                    <input id="ServiceOrdNo" name="ServiceOrdNo" type="text" value="<%=ServiceOrdID_TXT%>" style="width: 165px;" maxlength="99/"><input type="button" style="text-indent:initial;" class="dialogJbtn first-child" onclick="JS_PaidMoneySearch()" value="调单"> 
                                </div>
                                <div class="modify-album-name">
                                    <span>患者姓名:</span>
                                    <input id="ServiceOrdPtName" name="ServiceOrdPtName" class="valid" type="text" value="" maxlength="99/" readonly="true">
                                </div>
                                <div class="modify-album-name">
                                    <span><%=PaidMoneyTitle%>方式:</span>
                                    <select name="PaidMoneyType" id="PaidMoneyType" style="padding: 5px 0 5px 8px;">
                                        <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>
                                </div>
                                <div class="modify-album-name">
                                    <span><%=PaidMoneyTitle%>金额:</span>
                                    <input id="vMono" name="PaidMoney" type="text" value="" maxlength="99/">
                                </div>
                                <div class="modify-album-name">
                                    <span><%=PaidMoneyTitle%>备注:</span>
                                    <input id="vMono" name="PaidMoneyMono" type="text" value="" maxlength="99/">
                                </div>
                            </div>
                        </div>
                        </form>
                        <div class="dialogJanswers">
                            <input type="button" class="dialogJbtn first-child" onclick="JS_PaidMoneyCreateSave()" value="确定"> 
                            <input type="button" class="dialogJbtn" onclick="JS_PaidMoneyCreateClose()" value="取消">
                        </div>
                    </div>
                            <li>
                                <div class="search">
                                <div id="Date_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_OrdDateType()">
                                    <span class="select-content" style="width: 46px;">期间:<%=OrdDateTypeName%></span><span class="arrow" id="Date_arrow"></span>
                                </div>
                                <div id="Date_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; width: 65px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 35px;">
                                    <div class="jspContainer" style="width: 63px;">
                                        <div style="padding: 0px; top: 0px; width: 63px;">
                                        <%for z = 0 to UBOUND(OrdDateTypesPS)
                                          OrdDateTypesPS1=SPLIT(OrdDateTypesPS(z),",")
                                          vID=OrdDateTypesPS1(0)
                                          vtext=OrdDateTypesPS1(1)
                                          %>
                                          <span title="<%=vtext%>" onmouseover="JS_OrdDateTypeMouseover('OrdDateType_<%=vID%>')" onclick="JS_OrdDateTypeJump('<%=vID%>')" id="OrdDateType_<%=vID%>" class="list-option<%if vID=OrdDateType then Response.Write "  option"%>"><%=vtext%></span>
                                        <%next%>
                                        <span title="自定义" onmouseover="JS_OrdDateTypeMouseover('OrdDateType_0')" onclick="JS_OrdDateTypeCreateOpen()" id="OrdDateType_0" name="OrdDateType" class="list-option">自定义</span>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            </li>
                            <%if isDepartment("070109")=1 then%>
                            <li>
                                <%
                                '下拉菜单设定
                                DownMenuName="公司"            '菜单名称
                                DownMenuNameID="UnitNameID"    '菜单ID
                                DownMenuOldName=UnitNameName    '默认值名称
                                DownMenuOldID=UnitNameID    '默认值ID
                                %>
                                <div class="search">
                                <div name="DownMenu_container" id="<%=DownMenuNameID%>_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_DownMenu('<%=DownMenuNameID%>')">
                                    <span class="select-content" style="width: 46px;"><%=DownMenuName%>:<%=DownMenuOldName%></span><span class="arrow" id="<%=DownMenuNameID%>_arrow" name="DownMenu_arrow"></span>
                                </div>
                                <div name="DownMenu_list" id="<%=DownMenuNameID%>_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; width: 90px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 69px;">
                                    <div class="jspContainer" style="width: 90px;">
                                        <div  style="padding: 0px; top: 0px; width: 90px;">
                                        <%for z = 0 to UBOUND(UnitNamesPS)
                                          UnitNamesPS1=SPLIT(UnitNamesPS(z),",")
                                          vID=UnitNamesPS1(0)
                                          vtext=UnitNamesPS1(1)
                                          %>
                                          <span title="<%=vtext%>" name="DownMenu_<%=DownMenuNameID%>" onmouseover="JS_DownMenuMouseover('<%=DownMenuNameID%>',<%=z%>)" onclick="JS_DownMenuJump('<%="?"&mid(page_URL,2)%>','<%=DownMenuOldID%>','<%=DownMenuNameID%>','<%=vID%>')" class="list-option<%if vID=DownMenuOldID then Response.Write "  option"%>"><%=vtext%></span>
                                        <%next%>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            </li>
                            <%End If%>
                            <li>
                                <%
                                '下拉菜单设定
                                DownMenuName="单据类型"            '菜单名称
                                DownMenuNameID="OrdType"    '菜单ID
                                DownMenuOldName=OrdTypeName    '默认值名称
                                DownMenuOldID=OrdType    '默认值ID
                                %>
                                <div class="search">
                                <div name="DownMenu_container" id="<%=DownMenuNameID%>_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_DownMenu('<%=DownMenuNameID%>')">
                                    <span class="select-content" style="width: 46px;"><%=DownMenuName%>:<%=DownMenuOldName%></span><span class="arrow" id="<%=DownMenuNameID%>_arrow" name="DownMenu_arrow"></span>
                                </div>
                                <div name="DownMenu_list" id="<%=DownMenuNameID%>_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; width: 90px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 69px;">
                                    <div class="jspContainer" style="width: 90px;">
                                        <div style="padding: 0px; top: 0px; width: 90px;">
                                        <%for z = 0 to UBOUND(OrdTypesPS)
                                          OrdTypesPS1=SPLIT(OrdTypesPS(z),",")
                                          vID=OrdTypesPS1(0)
                                          vtext=OrdTypesPS1(1)
                                          %>
                                          <span title="<%=vtext%>" name="DownMenu_<%=DownMenuNameID%>" onmouseover="JS_DownMenuMouseover('<%=DownMenuNameID%>',<%=z%>)" onclick="JS_DownMenuJump('<%="?"&mid(page_URL,2)%>','<%=DownMenuOldID%>','<%=DownMenuNameID%>','<%=vID%>')" class="list-option<%if vID=DownMenuOldID then Response.Write "  option"%>"><%=vtext%></span>
                                        <%next%>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            </li>
                            <li>
                                <div class="search">
                                <div id="OrdClass_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_OrdClassType()">
                                    <span class="select-content" style="width: 46px;">单据状态:<%=OrdClassName%></span><span class="arrow" id="OrdClass_arrow"></span>
                                </div>
                                <div id="OrdClass_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; width: 77px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 69px;">
                                    <div class="jspContainer" style="width: 75px;">
                                        <div style="padding: 0px; top: 0px; width: 80px;">
                                        <%for z = 0 to UBOUND(OrdClassTypesPS)
                                          OrdClassTypesPS1=SPLIT(OrdClassTypesPS(z),",")
                                          vID=OrdClassTypesPS1(0)
                                          vtext=OrdClassTypesPS1(1)
                                          %>
                                          <span title="<%=vtext%>" onmouseover="JS_OrdClassTypeMouseover('OrdClassType_<%=vID%>')" onclick="JS_OrdClassTypeJump('<%=vID%>')" id="OrdClassType_<%=vID%>" class="list-option<%if vID=OrdClassName then Response.Write "  option"%>"><%=vtext%></span>
                                        <%next%>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            </li>
                            <li>
                                <%
                                '下拉菜单设定
                                DownMenuName=PaidMoneyTitle&"方式"            '菜单名称
                                DownMenuNameID="PaidMoneyID"    '菜单ID
                                DownMenuOldName=PaidMoneyName    '默认值名称
                                DownMenuOldID=PaidMoneyID    '默认值ID
                                %>
                                <div class="search">
                                <div name="DownMenu_container" id="<%=DownMenuNameID%>_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_DownMenu('<%=DownMenuNameID%>')">
                                    <span class="select-content" style="width: 46px;"><%=DownMenuName%>:<%=DownMenuOldName%></span><span class="arrow" id="<%=DownMenuNameID%>_arrow" name="DownMenu_arrow"></span>
                                </div>
                                <div name="DownMenu_list" id="<%=DownMenuNameID%>_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; width: 90px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 69px;">
                                    <div class="jspContainer" style="width: 90px;">
                                        <div style="padding: 0px; top: 0px; width: 90px;">
                                        <%for z = 0 to UBOUND(PaidMoneyTypesPS)
                                          PaidMoneyTypesPS1=SPLIT(PaidMoneyTypesPS(z),",")
                                          vID=PaidMoneyTypesPS1(0)
                                          vtext=PaidMoneyTypesPS1(1)
                                          %>
                                          <span title="<%=vtext%>" name="DownMenu_<%=DownMenuNameID%>" onmouseover="JS_DownMenuMouseover('<%=DownMenuNameID%>',<%=z%>)" onclick="JS_DownMenuJump('<%="?"&mid(page_URL,2)%>','<%=DownMenuOldID%>','<%=DownMenuNameID%>','<%=vID%>')" class="list-option<%if vID=DownMenuOldID then Response.Write "  option"%>"><%=vtext%></span>
                                        <%next%>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            <input id="DownMenuTime" type="hidden" value="">
                            </li>
                            <div class="search">
                            <form action="?" method="post">
                            <input name="OrdState" type="hidden" value="<%=OrdState%>">
                            <input name="OrdClassList" type="hidden" value="<%=OrdClassList%>">
                            <input name="OrdDateType" type="hidden" value="<%=OrdDateType%>">
                                <div class="input">
                                    <input type="text" id="searchTXT" name="searchTXT" value="<%=searchTXT%>" />
                                </div>
                                <div class="button">
                                    <input type="submit" name="submit" value="搜索" />
                                </div>
                            </form>
                            </div>
                        </ul>
                    </div>
                    <div class="dialogJ  dialogJfix dialogJshadow" id="OrdDateTypeCreate" style="width: 440px;right: 80px; top: 150px;height:80px ;display:none;">
                        <div class="dialogJtitle">
                            <a href="javascript:JS_OrdDateTypeCreateClose();" class="dialogJclose" title="关闭本窗口">&nbsp;</a>
                            <span class="dialogJtxt" id="EditPhotoTXT">请选择时间段</span>
                        </div>
                        <div class="dialogJcontent" style="margin-left: 5px;margin-right:5px;">
                            <div class="input" style="float:left;margin-top: 10px;margin-left: 5px;">
                                期间:
                                <input type="text" id="OrdDateStart" name="OrdDateStart" class="date" style="width:138px;" value="<%=OrdDateStart%>">
                                至
                                <input type="text" id="OrdDateEnd" name="OrdDateEnd" class="date" style="width:138px;" value="<%=OrdDateEnd%>">
                                <input type="button" class="dialogJbtn first-child" onclick="JS_OrdDateJump()" value="查询">
                            </div>
                        </div>
                    </div>
                    <script type="text/javascript">
                        //时间表列显示下拉菜单
                        function JS_OrdDateType(){
                          if (Date_container.className!="select-container select-container-show-list"){
                            Date_container.className="select-container select-container-show-list";
                            Date_arrow.className="arrow arrow-up";
                            Date_list.style.display="block";
                            OrdClass_container.className="select-container";
                            OrdClass_arrow.className="arrow";
                            OrdClass_list.style.display="none";
                            OrdDateTypeCreate.style.display="none";
                          }
                          else {
                            Date_container.className="select-container";
                            Date_arrow.className="arrow";
                            Date_list.style.display="none";
                          }
                        }
                        //时间表列指针移动到下拉菜单
                        function JS_OrdDateTypeMouseover(id){
                          var d=document.getElementById(id);
                          <%for z = 0 to UBOUND(OrdDateTypesPS)
                          OrdDateTypesPS1=SPLIT(OrdDateTypesPS(z),",")
                          vID=OrdDateTypesPS1(0)
                          vtext=OrdDateTypesPS1(1)
                          %>
                          document.getElementById("OrdDateType_<%=vID%>").className="list-option";
                          <%next%>
                          document.getElementById("OrdDateType_0").className="list-option";
                          d.className="list-option option";
                        }
                        //自定义时间-打开窗口
                        function JS_OrdDateTypeCreateOpen()
                        {
                            JS_OrdDateType();
                            OrdDateTypeCreate.style.display="block";
                        }
                        //自定义时间-关闭窗口
                        function JS_OrdDateTypeCreateClose()
                        {
                            JS_OrdDateType();
                            OrdDateTypeCreate.style.display="none";
                        }
                        //时间类表列转跳
                        function JS_OrdDateJump(id){
                            var OrdDateStart=document.getElementById("OrdDateStart").value;
                            var OrdDateEnd=document.getElementById("OrdDateEnd").value;
                            window.location.href='?OrdState=<%=OrdState%>&OrdClassList=<%=OrdClassList%>&PaidMoneyID=<%=PaidMoneyID%>&OrdType=<%=OrdType%>&OrdDateType=0&OrdDateStart='+OrdDateStart+'&OrdDateEnd='+OrdDateEnd+'&searchTXT='+document.getElementById("searchTXT").value;
                        }
                        //自定义时间转跳
                        function JS_OrdDateTypeJump(id){
                            window.location.href='?OrdState=<%=OrdState%>&OrdClassList=<%=OrdClassList%>&PaidMoneyID=<%=PaidMoneyID%>&OrdType=<%=OrdType%>&OrdDateType='+id+'&searchTXT='+document.getElementById("searchTXT").value;
                        }
 
                        //单据类型显示下拉菜单
                        function JS_OrdClassType(){
                          if (OrdClass_container.className!="select-container select-container-show-list"){
                            OrdClass_container.className="select-container select-container-show-list";
                            OrdClass_arrow.className="arrow arrow-up";
                            OrdClass_list.style.display="block";
                            Date_container.className="select-container";
                            Date_arrow.className="arrow";
                            Date_list.style.display="none";
                            OrdDateTypeCreate.style.display="none";
                          }
                          else {
                            OrdClass_container.className="select-container";
                            OrdClass_arrow.className="arrow";
                            OrdClass_list.style.display="none";
                          }
                        }
                        //单据类型指针移动到下拉菜单
                        function JS_OrdClassTypeMouseover(id){
                          var d=document.getElementById(id);
                          <%for z = 0 to UBOUND(OrdClassTypesPS)
                          OrdClassTypesPS1=SPLIT(OrdClassTypesPS(z),",")
                          vID=OrdClassTypesPS1(0)
                          vtext=OrdClassTypesPS1(1)
                          %>
                          document.getElementById("OrdClassType_<%=vID%>").className="list-option";
                          <%next%>
                          document.getElementById("OrdClassType_0").className="list-option";
                          d.className="list-option option";
                        }
                        //时间表列转跳
                        function JS_OrdClassTypeJump(id){
                            window.location.href='?OrdState=<%=OrdState%>&OrdDateType=<%=OrdDateType%>&PaidMoneyID=<%=PaidMoneyID%>&OrdType=<%=OrdType%>&OrdClassList='+id+'&searchTXT='+document.getElementById("searchTXT").value;
                        }
                        
                    </script>
                    <!-- end box / title -->
            <%
            acc1=request("page")
            if acc1=empty then acc1=clng(1)
            QuantityInt = 20
            acc2=0
            acc3=0
 
            if searchTXT<>"" Then
              searchSql=" and ServiceOrd_CC_Time "&SqlOrdDateType&" "
              If OrdClassList="0" Then
                searchSql=searchSql&" and PaidMoney_AP_Check=0 "
              ElseIf OrdClassList="1" Then
                searchSql=searchSql&" and PaidMoney_AP_Check=1 "
              End If
              If OrdType="1" Then
                searchSql=searchSql&" and PaidMoney>0 "
              Else
                searchSql=searchSql&" and PaidMoney<0 "
              End If
 
              If Len(searchTXT)=14 And Not IsNumeric(Left(searchTXT,2)) And IsNumeric(Mid(searchTXT,3,8)) And IsNumeric(Right(searchTXT,3)) And Mid(searchTXT,11,1)="-" Then
                searchSql=" and (ServiceOrdID in (select ServiceOrdID from ServiceOrder where ServiceOrdClass='"&Left(searchTXT,2)&"' and CONVERT(VARCHAR(10),ServiceOrd_CC_Time,120)=CONVERT(VARCHAR(10),'"&Mid(searchTXT,3,4)&"-"&Mid(searchTXT,7,2)&"-"&Mid(searchTXT,9,2)&"',120) and Right('00'+convert(varchar(3),ServiceOrdNo),3)='"&Right(searchTXT,3)&"') or DispatchOrdIDDt in (select DispatchOrdID from DispatchOrd where DispatchOrdClass='"&Left(searchTXT,2)&"' and CONVERT(VARCHAR(10),DispatchOrd_NS_Time,120)=CONVERT(VARCHAR(10),'"&Mid(searchTXT,3,4)&"-"&Mid(searchTXT,7,2)&"-"&Mid(searchTXT,9,2)&"',120) and Right('00'+convert(varchar(3),DispatchOrdNo),3)='"&Right(searchTXT,3)&"'))"
              ElseIf Len(searchTXT)=10 And IsNumeric(searchTXT) Then
                searchSql=searchSql&" and (ServiceOrdID="&Right(searchTXT,10)&" or DispatchOrdIDDt="&Right(searchTXT,10)&") "
              ElseIf (Len(searchTXT)=8 And Not IsNumeric(Left(searchTXT,2)) And IsNumeric(Right(searchTXT,6))) Or (Len(searchTXT)=6 And IsNumeric(Right(searchTXT,6))) Then
                searchSql=searchSql&" and PaidMoney.id="&Right(searchTXT,6)&" "
              Else
                sql="select OA_User_ID from OA_User where OA_Name='"&searchTXT&"'"
                rs.open sql,objConn,1,1
                if not rs.eof Then
                    searchSql=searchSql&" and PaidMoneyOaID="&rs(0)
                Else
                    searchSql=searchSql&" and (ServiceOrdCoName like '%"&searchTXT&"%' or ServiceOrdCoPhone like '%"&searchTXT&"%' or ServiceOrdPtName like '%"&searchTXT&"%') "
                End If
                rs.close()
              End if
            else
              searchSql=" and ServiceOrd_CC_Time "&SqlOrdDateType&" "
              If OrdClassList="0" Then
                searchSql=searchSql&" and PaidMoney_AP_Check=0 "
              ElseIf OrdClassList="1" Then
                searchSql=searchSql&" and PaidMoney_AP_Check=1 "
              End If
              If OrdType="1" Then
                searchSql=searchSql&" and PaidMoney>0 "
              Else
                searchSql=searchSql&" and PaidMoney<0 "
              End If
              If PaidMoneyID<>"" And PaidMoneyID<>"0" Then
                searchSql=searchSql&" and PaidMoneyType="&PaidMoneyID&" "
              End If
            end If
            
            '人员列表
            sql="select vID,vtext from dictionary where vType=1 and vtitle='DispatchOrdEntourage' order by vOrder"
            rs.open sql,objConn,1,1
            i=0
            EntourageIDs=""
            do while not rs.Eof
                EntourageID    = rs("vID")
                EntourageName= rs("vtext")
                EntourageNames=EntourageNames&","&EntourageName
                EntourageIDs=EntourageIDs&","&EntourageID
                i=i+1
                rs.movenext
            loop
            rs.close()
            EntourageNamePS    = SPLIT(EntourageNames,",")
            EntourageIDPS    = SPLIT(EntourageIDs,",")
 
            sql="select PaidMoney.*,vtext,ServiceOrdPtName,ServiceOrdClass,ServiceOrdID,ServiceOrd_CC_Time,ServiceOrdNo,ServiceOrdPtOutHosp,ServiceOrdPtInHosp,DispatchOrdClass,DispatchOrd_NS_Time,DispatchOrdNo,DispatchOrd_OAName,ServiceOrdTraTxnPrice,StretcherMoney=isnull(StretcherMoney,0) from dictionary,PaidMoney LEFT JOIN ServiceOrder on ServiceOrdIDDt=ServiceOrdID LEFT JOIN DispatchOrd on DispatchOrdIDDt=DispatchOrdID where vtitle='PaidMoneyType' and vType>=1 and vID=PaidMoneyType "&searchSql&" and ServiceOrdClass in ('"&OrdClassListSql&"') order by ServiceOrdID desc,PaidMoneyTime"
            'Response.Write sql
            rs.open sql,objConn,1,1
            if not rs.eof then
            rs.pagesize=QuantityInt
            rs.absolutepage=acc1
            acc2=rs.pagecount
            acc3=rs.recordcount
            else
            SystemMessageType=2
            SystemMessageTXT="数据库中相关无数据!"
            end if
            %>
                    <!--#include virtual="/inc/SystemMessages.gds" -->
                    <script>
                    //全选按钮点击事件
                    function allCheck(allBoxName,itemBoxName) {
                     
                        if($("input[name="+allBoxName+"]").prop("checked")){
                            $("input[name=" + itemBoxName + "]").prop("checked",true);
                        } else {
                            $("input[name=" + itemBoxName + "]").prop("checked",false);
                        }
                    }
                     
                    //子项按钮点击事件
                    function itemCheck(allBoxName,itemBoxName) {
                        var hasNoSel = false;
                        var itemBoxArray = $("input[name="+itemBoxName+"]");
                        itemBoxArray.each(function() {
                            if(!$(this).prop("checked")){
                                hasNoSel = true;
                            }
                        });
                        if(hasNoSel){
                            $("input[name="+allBoxName+"]").prop("checked",false);
                        } else {
                            $("input[name="+allBoxName+"]").prop("checked",true);
                        }
                    }
                    </script>
                    <div class="table" style="overflow:auto">
                        <form id="form1" name="form1" action="" method="post">
                        <input name="admin_save" type="hidden" value="34">
                        <input name="PaidMoney_Check" type="hidden" value="">
                        <input name="searchTXT" type="hidden" value="<%=searchTXT%>">
                        <input name="page" type="hidden" value="<%=acc1%>">
                        <input name="OrdState" type="hidden" value="<%=OrdState%>">
                        <input name="OrdClassList" type="hidden" value="<%=OrdClassList%>">
                        <input name="OrdDateType" type="hidden" value="<%=OrdDateType%>">
                        <input name="OrdType" type="hidden" value="<%=OrdType%>">
                        <table>
                            <thead>
                                <tr style="white-space: nowrap;">
                                    <th class="selected"><input type="checkbox" class="checkall"  name="checkAll" onclick="allCheck('checkAll','PaidMoneyID')"/></th>
                                    <th>服务单号</th>
                                    <th>服务单时间</th>
                                    <th>相关调度单</th>
                                    <th>成交价</th>
                                    <th>出车人员</th>
                                    <th>转出/转入医院</th>
                                    <th>收款单号</th>
                                    <th>收款时间</th>
                                    <th>金额</th>
                                    <th><%=PaidMoneyTitle%>方式</th>
                                    <th><%=PaidMoneyTitle%>备注</th>
                                    <th>开单人</th>
                                    <th>审核</th>
                                    <th>审核人</th>
                                    <th class="last">审核时间</th>
                                </tr>
                            </thead>
                            <tbody>
            
            <%i=1
            old_ServiceOrdID=""
            do while not rs.Eof and i<=QuantityInt
              PaidMoneyID        = rs("id")                    '费用单号
              PaidMoneyClass    = rs("PaidMoneyClass")        '单据类型
              ServiceOrdID        = rs("ServiceOrdID")        '对应服务单号
              ServiceOrdClass    = rs("ServiceOrdClass")        '对应服务单类型
              ServiceOrd_CC_Time= rs("ServiceOrd_CC_Time")
              DispatchOrdIDDt    = rs("DispatchOrdIDDt")        '对应调度单号
              DispatchOrdClass    = rs("DispatchOrdClass")    '对应调度单类型
              ServiceOrdPtName    = rs("ServiceOrdPtName")    '患者姓名
              PaidMoney            = rs("PaidMoney")            '金额
              PaidMoneyType        = rs("PaidMoneyType")        '结算方式ID
              PaidMoneyTypeName    = rs("vtext")                '结算方式
              PaidMoneyMono        = rs("PaidMoneyMono")        '收款备注(收款类型和结算账号等)
              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")    '审核时间
 
              DispatchOrd_OAName= rs("DispatchOrd_OAName")
              OrdPrice            = rs("ServiceOrdTraTxnPrice")
              StretcherMoney    = rs("StretcherMoney")
 
              If old_ServiceOrdID<>Clng(ServiceOrdID) Then
                  old_ServiceOrdID=Clng(ServiceOrdID)
                  isOldOrd=0
                  ServiceOrdPtOutHosp=rs("ServiceOrdPtOutHosp")    '转出医院
                  If IsNumeric(ServiceOrdPtOutHosp) And ServiceOrdPtOutHosp<>"" And Len(ServiceOrdPtOutHosp)<10 then
                    sql="select vtext from dictionary where vType=1 and vtitle='HospName' and vID="&ServiceOrdPtOutHosp
                    rsDt.open sql,objConn,1,1
                    If not rsDt.Eof Then
                        ServiceOrdPtOutHospTXT=rsDt("vtext")
                    Else
                        ServiceOrdPtOutHospTXT=ServiceOrdPtOutHosp
                    End If
                    rsDt.close()
                  Else
                        ServiceOrdPtOutHospTXT=ServiceOrdPtOutHosp
                  End If
                  If ServiceOrdPtOutHospTXT="0" Then ServiceOrdPtOutHospTXT=""
 
                  ServiceOrdPtInHosp= rs("ServiceOrdPtInHosp")    '转入医院ID
                  If IsNumeric(ServiceOrdPtInHosp) And ServiceOrdPtInHosp<>"" And Len(ServiceOrdPtInHosp)<10 then
                    sql="select vtext from dictionary where vType=1 and vtitle='HospName' and vID="&ServiceOrdPtInHosp
                    rsDt.open sql,objConn,1,1
                    If not rsDt.Eof Then
                        ServiceOrdPtInHospTXT=rsDt("vtext")
                    Else
                        ServiceOrdPtInHospTXT=ServiceOrdPtInHosp
                    End If
                    rsDt.close()
                  Else
                    ServiceOrdPtInHospTXT=ServiceOrdPtInHosp
                  End If
                  If ServiceOrdPtInHospTXT="0" Then ServiceOrdPtInHospTXT=""
 
 
                  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 DispatchOrdIDDt<>"0" Then
                    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)    '调度单编号
                    DispatchOrdURL    = "DispatchOrder.gds?DispatchOrdID="&DispatchOrdIDDt&"&OrdDateType="&OrdDateType&"&OrdClassList="&OrdClassList&"&h_menu1_1=1"
                  Else
                    DispatchOrdNo    = "--"
                    DispatchOrdURL    = "#"
                  End If
 
                  OrdPriceTXT=FormatCurrency(OrdPrice+StretcherMoney,0)
                  If StretcherMoney>0 Then OrdPriceTXT=OrdPriceTXT&"<br>("&OrdPrice&"+"&StretcherMoney&")"
              Else
                isOldOrd=1
              End If
 
              If not isnull(PaidMoney_AP_Time) And PaidMoney_AP_Time<>"" Then PaidMoney_AP_Time=DateFormat(PaidMoney_AP_Time)
              i=i+1
 
              %>
              <tr style="white-space: nowrap;">
                <td class="selected"><input type="checkbox" id="PaidMoneyID_<%=PaidMoneyID%>" name="PaidMoneyID" onclick="javascript:form1_Paid_Edit('<%=PaidMoneyID%>');itemCheck('checkAll','PaidMoneyID')" value="<%=PaidMoneyID%>"/></td>
                <%If isOldOrd=0 Then%>
                    <td class="category"><A HREF="ServiceOrder.gds?ServiceOrdID=<%=ServiceOrdID%>&OrdDateType=<%=OrdDateType%>&OrdClassList=<%=OrdClassList%>&h_menu1_1=1" target="_blank"><%=ServiceOrdNo%></A></td>
                    <td class="category category_solid"><%=DateFormat(ServiceOrd_CC_Time)%></td>
                    <td class="category category_solid"><A HREF="<%=DispatchOrdURL%>" target="_blank"><%=DispatchOrdNo%></A></td>
                    <td class="category category_solid"><%=OrdPriceTXT%></td>
                    <td class="category category2 category_solid">
                    <%
                    If DispatchOrd_OAName<>"" Then
                        DispatchOrd_OANamePS    = SPLIT(DispatchOrd_OAName,",")
                        for j = 0 to UBOUND(DispatchOrd_OANamePS)
                            Response.Write DispatchOrd_OANamePS(j)&"<br>"
                        Next
                    End If
                    %>
                    </td>
                    <td class="category category_solid" style="line-height: 13px;"><span style='color: #E91E63;'><%=ServiceOrdPtOutHospTXT%></span><br><span style='color: #4CAF50;'><%=ServiceOrdPtInHospTXT%></span></td>
                <%else%>
                    <td class="category"></td>
                    <td class="category"></td>
                    <td class="category"></td>
                    <td class="category"></td>
                    <td class="category"></td>
                    <td class="category"></td>
                <%End If%>
                <td class="category category_solid"><A HREF="ServiceOrder.gds?ServiceOrdID=<%=ServiceOrdID%>&OrdDateType=<%=OrdDateType%>&OrdClassList=<%=OrdClassList%>&h_menu1_1=1" target="_blank"><%If PaidMoney_AP_Check=1 Then%><span style="color: #4CAF50;"><%=PaidMoneyClass&PaidMoneyID%></span><%Else%><%=PaidMoneyClass&PaidMoneyID%><%End If%></A></td>
                <td class="category category_solid<%If PaidMoney_AP_Check=1 Then Response.Write " AP"%>"><%=DateFormat(PaidMoneyTime)%></td>
                <td class="category category_solid<%If PaidMoney_AP_Check=1 Then Response.Write " AP"%>" id="PaidMoney_<%=PaidMoneyID%>"><%=FormatCurrency(PaidMoney,0,-1)%></td>
                <td class="category category_solid<%If PaidMoney_AP_Check=1 Then Response.Write " AP"%>" id="PaidMoneyTypeName_<%=PaidMoneyID%>"><%=PaidMoneyTypeName%></td>
                <td class="category category_solid<%If PaidMoney_AP_Check=1 Then Response.Write " AP"%>" id="Show_PaidMoneyMono_<%=PaidMoneyID%>" style="min-width:250px;"><%=PaidMoneyMono%></td>
                <td class="category category_solid<%If PaidMoney_AP_Check=1 Then Response.Write " AP"%>" id="Edit_PaidMoneyMono_<%=PaidMoneyID%>" style="display:none;"><input id="PaidMoneyMono_<%=PaidMoneyID%>" name="PaidMoneyMono_<%=PaidMoneyID%>" class="small" style="width:250px;text-align: center;" value="<%=PaidMoneyMono%>" type="text"></td>
                <td class="category category_solid<%If PaidMoney_AP_Check=1 Then Response.Write " AP"%>"><%=OAUser(PaidMoneyOaID,"UserName")%></td>
                <td class="category category_solid<%If PaidMoney_AP_Check=1 Then Response.Write " AP"%>"><%=AP_Check_A(PaidMoney_AP_Check)%></td>
                <td class="category category_solid<%If PaidMoney_AP_Check=1 Then Response.Write " AP"%>"><%=OAUser(PaidMoney_AP_ID,"UserName")%></td>
                <td class="category category_solid category2 last left<%If PaidMoney_AP_Check=1 Then Response.Write " AP"%>"><%=PaidMoney_AP_Time%></td>
                
              </tr>
            <%rs.movenext
            loop
            rs.close()
            %>
            <%for j=i to 20%>
            <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td class="last">&nbsp;</td>
            </tr>
            <%next%>
                            </tbody>
                        </table>
                        <!-- pagination -->
                        <div class="pagination pagination-left">
                            <div class="results">
                                <%
                                ShowingLeast = (acc1-1)*QuantityInt+1
                                ShowingMax = QuantityInt*acc1
                                if ShowingMax>acc3 then ShowingMax=acc3
                                %>
                                <span><%="显示&nbsp;"& ShowingLeast &"-"& ShowingMax &"&nbsp;of&nbsp;"&acc3%></span>
                            </div>
                            <%if acc2>1 then%>
                            <ul class="pager">
                                <%if acc1=1 then%>
                                  <li class="disabled">&laquo; 上页</li>
                                <%else%>
                                  <li><a href="?page=<%=acc1-1%><%=page_URL%>">&laquo; 上页</a></li>
                                <%end if%>
                                <%
                                acc4=""
                                for i=1 to acc2
                                  if acc2<=9 then
                                    acc4=acc4&","&i
                                  else
                                    if i=1 then
                                      acc4=acc4&","&i
                                    elseif acc1<=5 and i<=7 then
                                      acc4=acc4&","&i
                                    elseif acc1>=acc2-4 and i>=acc2-6 then
                                      acc4=acc4&","&i
                                    elseif i>=acc1-2 and i<=acc1+2 then 
                                      acc4=acc4&","&i
                                    elseif i=acc2 then
                                      acc4=acc4&","&i
                                    elseif i=2 or i=acc2-1 then
                                      acc4=acc4&",0"
                                    end if
                                  end if
                                next
                                acc4SP=SPLIT(acc4,",")
                                for i = 1 to UBOUND(acc4SP)%>
                                  <%if acc4SP(i)="0" then%>
                                    <li class="separator">...</li>
                                  <%elseif acc1=cint(acc4SP(i)) then%>
                                    <li class="current"><%=acc4SP(i)%></li>
                                  <%else%>
                                    <li><a href="?page=<%=acc4SP(i)%><%=page_URL%>"><%=acc4SP(i)%></a></li>
                                  <%end if%>
                                <%next%>
                                <%if acc1>=acc2 then%>
                                  <li class="disabled">下页 &raquo;</li>
                                <%else%>
                                  <li><a href="?page=<%=acc1+1%><%=page_URL%>">下页 &raquo;</a></li>
                                <%end if%>
                            </ul>
                            <%end if%>
                        </div>
                        <!-- end pagination -->
                        </form>
                    </div>
                </div>
                <!-- end table -->
 
 
                
            </div>
            <!-- end content / right -->
        </div>
        <!-- end content -->
        <!--#include FILE="vicgame.asp"-->
        <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>