【调度系统】广东民航医疗快线调度系统源代码
wzp
2024-12-05 8a09f655eace34e9c90bbfc711eedb7a69e4e068
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
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--#include virtual="/inc/chkadmin.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
searchTXT=SafeRequest(trim(Request("searchTXT")))
searchTXTMore=SafeRequest(Request("searchTXTMore"))
If InStr(searchTXT,",")>0 Then
    searchTXTMore=searchTXT
    searchTXT=""
End If
OrdState=SafeRequest(Request("OrdState"))
OrdClassList=SafeRequest(Request("OrdClassList"))
OrdDateType=SafeRequest(Request("OrdDateType"))
OrdDateStart=SafeRequest(Request("OrdDateStart"))
OrdDateEnd=SafeRequest(Request("OrdDateEnd"))
UnitNameID=SafeRequest(Request("UnitNameID"))
CoopUnitID=SafeRequest(Request("CoopUnitID"))
 
Set rs = Server.CreateObject("ADODB.Recordset")
Set rsDt = Server.CreateObject("ADODB.Recordset")
'默认显示字段
If isDepartment("070107")=1  Then    '只显示个人分管医院
    OAHospsql=" and (ServiceOrdPtOutHospID in (select HospID from HospData where HospOAID='"&session("adminID")&"' or HospOAID like '%,"&session("adminID")&",%') or ServiceOrdPtInHospID in (select HospID from HospData where HospOAID='"&session("adminID")&"' or HospOAID like '%,"&session("adminID")&",%')) "
End If
If OrdState="" Then OrdState=0
If OrdClassList="" Then OrdClassList="0"
If OrdClassList="0" Then
    OrdClassName="全部"
Else
    'sql="select vID,vtext from dictionary where vType=1 and vtitle='OrderClass' and vOrder2 in ('"&OrdClassListSql&"') order by vOrder"
    'rs.open Sql,objConn,1,1
    'If not rs.Eof Then OrdClassName    = rs("vtext")
    'rs.close()
    OrdClassName="全部"
End if
If OrdDateType="" Then
  OrdDateType=4
  'OrdDateTop=" top 20 "
End If
If OrdDateType="0" then
    If OrdDateStart="" And OrdDateEnd="" Then
        OrdDateStart=Date()
        OrdDateEnd=Date()&" 23:59:59"
    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)
    Else
        OrdDateTypeName=OrdDateStart&" 至 "&OrdDateEnd
        OrdDateTypeName1="时间段"
    End If
    If InStr(OrdDateEnd," ")>1 Then
        SqlOrdDateType="between '"&OrdDateStart&"' and '"&OrdDateEnd&"'"
    Else
        SqlOrdDateType="between '"&OrdDateStart&"' and '"&OrdDateEnd&" 23:59:59'"
    End If
    
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="创建新员工完成,默认密码:000000.点击[<a href=""/weixin/user_inviteSend.gds?OA_weixinUserID="&trim(Request("NEW_weixinUserID"))&"&departmentID="&departmentID&""">发出关注邀请</a>]关注微信OA"
  elseif SMT="3" then
    SystemMessageTXT="微信OA同步失败,请联系IT部!!"
  elseif SMT="4" then
    SystemMessageTXT="发出关注邀请完成,新员工默认密码:000000.请首次登陆后尽快修改"
  elseif SMT="5" then
    SystemMessageTXT="发出关注邀请失败,请点击[<a href=""/weixin/user_list.gds?departmentID="&departmentID&""">刷新数据</a>]并修改微信相关联系方式后再次发送"
  elseif SMT="6" then
    SystemMessageTXT="请选择需要取消的服务单"
  elseif SMT="7" then
    SystemMessageTXT="服务单取消完成"
 
  end if
end if
 
 
If OrdState<>"0" then
    OrdListName    = ServiceOrdStateA(OrdState)&"查询"
Else
    OrdListName    = "服务单查询"
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,"|")
 
'单据类型表列
OrdClassTypes = "0,全部|"
sql="select vID,vtext,vOrder2 from dictionary where vType=1 and vtitle='ServiceOrderType' order by vOrder"
rs.open Sql,objConn,1,1
do while not rs.Eof
    OrdClassTypes = OrdClassTypes & rs("vID") &","& rs("vtext") & "|"
    If Cstr(rs("vID"))=Cstr(OrdClassList) Then OrdClassName    = rs("vtext")
rs.movenext
Loop
rs.close()
OrdClassTypes = left(OrdClassTypes,len(OrdClassTypes)-1)
OrdClassTypesPS = SPLIT(OrdClassTypes,"|")
 
'公司列表
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 searchTXTMore<>"" Then
    If Right(searchTXTMore,1)="," Then searchTXTMore=searchTXTMore&" "
    searchTXTMorePS = SPLIT(searchTXTMore,", ")
    searchTXTMoreUBOUND=UBOUND(searchTXTMorePS)
    If searchTXTMoreUBOUND>=0 Then searchTXTMore0=searchTXTMorePS(0)    '成交价范围-低
    If searchTXTMoreUBOUND>=1 Then searchTXTMore1=searchTXTMorePS(1)    '成交价范围-高
    If searchTXTMoreUBOUND>=2 Then searchTXTMore2=searchTXTMorePS(2)    '联系人姓名
    If searchTXTMoreUBOUND>=3 Then searchTXTMore3=searchTXTMorePS(3)    '联系电话
    If searchTXTMoreUBOUND>=4 Then searchTXTMore4=searchTXTMorePS(4)    '患者姓名
    If searchTXTMoreUBOUND>=5 Then searchTXTMore5=searchTXTMorePS(5)    '转出医院
    If searchTXTMoreUBOUND>=6 Then searchTXTMore6=searchTXTMorePS(6)    '转入医院
    If searchTXTMoreUBOUND>=7 Then searchTXTMore7=searchTXTMorePS(7)    '销售*
    If searchTXTMoreUBOUND>=8 Then searchTXTMore8=searchTXTMorePS(8)    '介绍人
    If searchTXTMoreUBOUND>=9 Then searchTXTMore9=searchTXTMorePS(9)    '客服*
    If searchTXTMoreUBOUND>=10 Then searchTXTMore10=searchTXTMorePS(10)    '调度*
    If searchTXTMoreUBOUND>=11 Then searchTXTMore11=searchTXTMorePS(11)    '来源*
    searchTXTMoreSql=""
    If searchTXTMore0<>"" And IsNumeric(searchTXTMore0) Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdTraTxnPrice>="&searchTXTMore0&" "
    End If
    If searchTXTMore1<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdTraTxnPrice<="&searchTXTMore1&" "
    End If
    If searchTXTMore2<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdCoName like '%"&searchTXTMore2&"%' "
    End If
    If searchTXTMore3<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdCoPhone like '%"&searchTXTMore3&"%' "
    End If
    If searchTXTMore4<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdPtName like '%"&searchTXTMore4&"%' "
    End If
    If searchTXTMore5<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdPtOutHospID in (select HospID from HospData where HospName like '%"&searchTXTMore5&"%') "
    End If
    If searchTXTMore6<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdPtInHospID in (select HospID from HospData where HospName like '%"&searchTXTMore6&"%') "
    End If
    If searchTXTMore7<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrd_Sale_ID in (select OA_User_ID from OA_User where OA_Name like '%"&searchTXTMore7&"%') "
    End If
    If searchTXTMore8<>"" Then
        If IsNumeric(searchTXTMore8) Then
            searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdIntroducer in ('"&searchTXTMore8&"') "
            If OrdState<>"0" Then
                searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdState in ("&OrdState&") "
            End If
        Else
            searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdIntroducer in (select IntroducerID from IntroducerData where IntroducerName like '%"&searchTXTMore8&"%') "
        End If
    End If
    If searchTXTMore9<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrd_CC_ID in (select OA_User_ID from OA_User where OA_Name like '%"&searchTXTMore9&"%') "
    End If
    If searchTXTMore10<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdID in (select ServiceOrdIDDt from DispatchOrd where DispatchOrd_NS_ID in (select OA_User_ID from OA_User where OA_Name like '%"&searchTXTMore10&"%')) "
    End If
    If searchTXTMore11<>"" Then
        searchTXTMoreSql=searchTXTMoreSql&" and ServiceOrdSource in (select vID from dictionary where vtitle in ('OrdSource') and vtext like '%"&searchTXTMore11&"%') "
    End If
    If searchTXTMoreSql<>"" Then
        searchTXTMoreSql= Mid(searchTXTMoreSql,5)
        searchTXT=searchTXTMore
    End If
End If
 
page_URL="&OrdState="&OrdState&"&OrdClassList="&OrdClassList&"&OrdDateType="&OrdDateType&"&OrdDateStart="&OrdDateStart&"&OrdDateEnd="&OrdDateEnd&"&UnitNameID="&UnitNameID&"&searchTXT="&searchTXT&"&h_menu1_1=1"
If CoopUnitID<>"" Then page_URL=page_URL&"&CoopUnitID="&CoopUnitID
 
%>
<!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"-->
    </head>
    
    <body onkeydown="xKeyEvent(event)">
        <!--#INCLUDE FILE="menu_header.gds" -->
        <!-- content -->
        <div id="content">
            <!--#INCLUDE FILE="ServiceCenter_menu_left.gds" -->
            <!-- content / right -->
            <div id="right">
                <!-- table -->
                <div class="box">
                    <!-- box / title -->
                    <div class="title title3">
                        <h5><span id="right_Menu" style="display: none;">[<a onclick="JavaScript:JS_left_Menu2('1');" style="color: #ffffff;">显示菜单</a>]&nbsp;</span><%If searchTXT<>"" then%>服务单查询 <%=Trim(Replace(searchTXT,",",""))%><%else%><%=OrdDateTypeName1&" "&OrdListName%><%End if%></h5>
                        <ul class="links">
                            <%If InStr(searchTXT,"|")>0 Then%>
                            <li><a href="Report_DispatchDetailed.php?OrdClassType=2&OrdDateType=<%=OrdDateType%>&OrdDateStart=<%=OrdDateStart%>&OrdDateEnd=<%=OrdDateEnd%>&searchTXT=<%=searchTXT%>&UnitNameID=<%=UnitNameID%>">导出</a></li>
                            <%End If%>
                            <%If isDepartment("020108")=1 Then%>
                            <li><a onClick="form1_Del_JS()">批量取消</a></li>
                            <script LANGUAGE="javascript">
                                //批量取消
                                function form1_Del_JS(){
                                if(confirm("确定取消所选服务单?"))
                                    {
                                        document.form1.action = "admin_save.gds";
                                        document.form1.admin_save.value="101"
                                        form1.submit();
                                    }
                                }
                            </script>
                            <%End If%>
                            <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: 105px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 69px;">
                                    <div class="jspContainer" style="width: 105px;">
                                        <div style="padding: 0px; top: 0px; width: 105px;">
                                        <%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>
                                <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>
                            <div class="search" id="searchSim"<%If searchTXTMore<>"" Then Response.Write " style='display: none;'"%>>
                            <form action="ServiceOrder_List.gds?h_menu1_1=<%=session("h_menu1_1")%>" method="post">
                                <input name="OrdState" type="hidden" value="<%=OrdState%>">
                                <input name="OrdClassList" type="hidden" value="<%=OrdClassList%>">
                                <input name="OrdDateType" type="hidden" value="<%=OrdDateType%>">
                                <input name="OrdDateStart" type="hidden" value="<%=OrdDateStart%>">
                                <input name="OrdDateEnd" type="hidden" value="<%=OrdDateEnd%>">
                                <div class="input">
                                    <input type="text" id="search" name="searchTXT" value="<%=searchTXT%>" />
                                </div>
                                <div class="button">
                                    <input type="submit" name="submit" value="搜索" />
                                    <input type="button" value="高级搜索" onclick="JavaScript:document.getElementById('searchSim').style.display='none';document.getElementById('searchMore').style.display='';"/>
                                </div>
                            </form>
                            </div>
                        </ul>
                    </div>
 
                    <div class="title title3" id="searchMore" style="margin-top: -19px;<%If searchTXTMore="" Then Response.Write " display: none;'"%>">
                    
                    <form action="ServiceOrder_List.gds?h_menu1_1=<%=session("h_menu1_1")%>" method="post">
                        <input name="OrdState" type="hidden" value="<%=OrdState%>">
                        <input name="OrdClassList" type="hidden" value="<%=OrdClassList%>">
                        <input name="OrdDateType" type="hidden" value="<%=OrdDateType%>">
                        <input name="OrdDateStart" type="hidden" value="<%=OrdDateStart%>">
                        <input name="OrdDateEnd" type="hidden" value="<%=OrdDateEnd%>">
                    <ul class="links" style="float: left;">
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">成交价范围:<input type="text" id="search" name="searchTXTMore" style="width: 40px;" value="<%=searchTXTMore0%>" />~<input type="text" id="search" style="width: 40px;" name="searchTXTMore" value="<%=searchTXTMore1%>" /></span>
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">联系人姓名:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore2%>" />
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">联系电话:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore3%>" />
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">患者姓名:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore4%>" />
                                </div>
                            </div>
                        </li>
                    </ul>
                    <ul class="links" style="float: left;">
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">转出医院:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore5%>" />
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">转入医院:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore6%>" />
                                </div>
                            </div>
                        </li>
                    </ul>
                    <ul class="links" style="float: left;">
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">销售:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore7%>" />
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">介绍人:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore8%>" />
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">客服:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore9%>" />
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">调度:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore10%>" />
                                </div>
                            </div>
                        </li>
                        <li>
                            <div class="search">
                                <div class="input">
                                    <span class="select-content" style="width: 46px;color: #ffffff;">来源:</span><input type="text" id="search" name="searchTXTMore" value="<%=searchTXTMore11%>" />
                                </div>
                            </div>
                        </li>
                        
                    </ul>
                    <ul class="links">
                        <div class="search">
                                    <div class="button">
                                        <input type="submit" name="submit" value="搜索" />
                                        <input type="button" value="隐藏高级搜索" onclick="JavaScript:document.getElementById('searchSim').style.display='';document.getElementById('searchMore').style.display='none';" />
                                    </div>
                        
                        </div>
                        </li>
                    
                    </ul>
                    </form>
                    </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;"  id="two-inputs">
                                期间:
                                <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>
 
                <!--时间选择js  liang------------->
                    <link rel="stylesheet" href="css/daterangepicker.css">
                    <script src="js/jquery-1.12.3.min.js"></script>
                    <script src="js/moment.min.js"></script>
                    <script src="js/jquery.daterangepicker.js"></script>
                    <script>
                            $(function()
                        {
                            $('#two-inputs').dateRangePicker(
                            {
                                separator : ' to ',
                                getValue: function()
                                {
                                    if ($('#OrdDateStart').val() && $('#OrdDateEnd').val() )
                                        return $('#OrdDateStart').val() + ' to ' + $('#OrdDateEnd').val();
                                    else
                                        return '';
                                },
                                setValue: function(s,s1,s2)
                                {
                                    $('#OrdDateStart').val(s1);
                                    $('#OrdDateEnd').val(s2);
                                }
                            });
                        });
                    </script>
                <!--时间选择js  liang------------->
                    <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_OrdDateTypeCreateSave()
                        {
                        document.getElementById('ServiceOrdTraStreet').value=document.getElementById('Duration').value;
                        document.getElementById('ServiceOrdTraEnd').value=document.getElementById('ServiceOrdTraEnd').value;
                        document.getElementById('ServiceOrdTraStreetCoo').value=results.sw.point.lng + ','+ results.sw.point.lat; //起点坐标
                        document.getElementById('ServiceOrdTraEndCoo').value=results.Lu.point.lng + ','+ results.Lu.point.lat; //起点坐标
                        }
                        //时间类表列转跳
                        function JS_OrdDateJump(id){
                            var OrdDateStart=document.getElementById("OrdDateStart").value;
                            var OrdDateEnd=document.getElementById("OrdDateEnd").value;
                            window.location.href='ServiceOrder_List.gds?h_menu1_1=1&OrdState=<%=OrdState%>&OrdClassList=<%=OrdClassList%>&OrdDateType=0&searchTXT=<%=searchTXT%>&UnitNameID=<%=UnitNameID%>&OrdDateStart='+OrdDateStart+'&OrdDateEnd='+OrdDateEnd;
                        }
                        //自定义时间转跳
                        function JS_OrdDateTypeJump(id){
                            window.location.href='ServiceOrder_List.gds?h_menu1_1=1&OrdState=<%=OrdState%>&OrdClassList=<%=OrdClassList%>&searchTXT=<%=searchTXT%>&UnitNameID=<%=UnitNameID%>&OrdDateType='+id;
                        }
 
                        //单据类型显示下拉菜单
                        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='ServiceOrder_List.gds?h_menu1_1=1&OrdState=<%=OrdState%>&OrdDateType=<%=OrdDateType%>&searchTXT=<%=searchTXT%>&UnitNameID=<%=UnitNameID%>&OrdDateStart=<%=OrdDateStart%>&OrdDateEnd=<%=OrdDateEnd%>&OrdClassList='+id;
                        }
                        
                    </script>
                    <!-- end box / title -->
            <%
            acc1=clng(request("page"))
            if acc1=empty then acc1=clng(1)
            QuantityInt = 20
            acc2=0
            acc3=0
 
            If searchTXTMoreSql<>"" Then
              searchSql=searchTXTMoreSql&" and ServiceOrd_CC_Time "&SqlOrdDateType&" "
            elseif searchTXT<>"" Then
              searchSql=""
              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=" 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)&"' "
              ElseIf Len(searchTXT)=10 And IsNumeric(searchTXT) Then
                searchSql=" ServiceOrdID="&Right(searchTXT,10)&" "
              ElseIf Mid(searchTXT,1,4)="out|" Then    ' and DispatchOrdState in (8)
                searchSql=" (ServiceOrdPtOutHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,5)&"')) and ServiceOrd_CC_Time "&SqlOrdDateType
              ElseIf Mid(searchTXT,1,3)="in|" Then
                searchSql=" (ServiceOrdPtInHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,4)&"')) and ServiceOrd_CC_Time "&SqlOrdDateType
              ElseIf Mid(searchTXT,1,5)="hosp|" Then
                searchSql=" (ServiceOrdPtOutHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"') or ServiceOrdPtInHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"')) and ServiceOrd_CC_Time "&SqlOrdDateType
              Else
                searchSql=" (ServiceOrdCoName like '%"&searchTXT&"%' or ServiceOrdCoPhone like '%"&searchTXT&"%' or ServiceOrdPtName like '%"&searchTXT&"%' or ServiceOrdTraVia like '%"&searchTXT&"%' or ServiceOrdTraEnd like '%"&searchTXT&"%' or ServiceOrdPtOutHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext like '%"&searchTXT&"%') or ServiceOrdPtInHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext like '%"&searchTXT&"%')) "
              End if
            else
              If OrdState="2" Then
                searchSql=" (ServiceOrd_CC_Time "&SqlOrdDateType&" or ServiceOrdType in (7))"
              Else
                searchSql=" ServiceOrd_CC_Time "&SqlOrdDateType&" "
              End If
              If OrdClassList<>"" And OrdClassList<>"0" Then
                searchSql=searchSql&" and ServiceOrdType in ("&OrdClassList&") "
              End If
              If OrdState="0" Then
                searchSql=searchSql&""
              Else
                searchSql=searchSql&" and ServiceOrdState in ("&OrdState&") "
              End If
            end If
 
            '查看合作公司
            If CoopUnitID<>"" And CoopUnitID<>"0" Then
              If Left(CoopUnitID,2)="0," Then CoopUnitID=Mid(CoopUnitID,3)
              CoopUnitSql=" And  ServiceOrdUnitID in ("&CoopUnitID&")"
            Else
              CoopUnitSql=""
            End If
            
            '查看各分公司报表权限
            if isDepartment("070109")=1 And UnitNameID<>"" then
              OrdClassListSql=""
              If UnitNameID<>"" And UnitNameID<>"0" Then
                sql="select vOrder2 from dictionary where vtitle='UnitName' and vID="&UnitNameID
                rs.open sql,objConn,1,1
                If not rs.Eof Then
                    UnitTypeID=rs(0)
                    rs.close()
                    sql="select vID,vtext,vOrder2 from dictionary where vID in ("&UnitTypeID&") and vtitle='OrderClass' order by vOrder"
                    rs.open sql,objConn,1,1
                    do while not rs.Eof
                        OrderClassID    = rs("vOrder2")
                        OrdClassListSql    = OrdClassListSql&","&OrderClassID
                        rs.movenext
                    Loop
                    OrdClassListSql=Mid(OrdClassListSql,2)
                    OrdClassListSql=Replace(OrdClassListSql,",","','")
                End If
                rs.close()
              Else
                sql="select vID,vtext,vOrder2 from dictionary where vType in (1,2) and vtitle='OrderClass' order by vOrder"
                rs.open sql,objConn,1,1
                do while not rs.Eof
                    OrderClassID    = rs("vOrder2")
                    OrdClassListSql    = OrdClassListSql&","&OrderClassID
                    rs.movenext
                loop
                rs.close()
                OrdClassListSql=Mid(OrdClassListSql,2)
                OrdClassListSql=Replace(OrdClassListSql,",","','")
              End If
            end If
'OrdClassListSql="AB"
            sql="select "&OrdDateTop&"*,StretcherMoney=isnull((select sum(StretcherMoney) from DispatchOrd where ServiceOrdIDDt=ServiceOrdID),0) from ServiceOrder where "&searchSql&CoopUnitSql&OAHospsql&" and ServiceOrdClass in ('"&OrdClassListSql&"') order by ServiceOrdID desc"
            '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
            'Response.Write acc2
            %>
                    <!--#include virtual="/inc/SystemMessages.gds" -->
                    <div class="table" style="overflow:auto">
                        <form id="form1" name="form1" action="admin_save.gds" method="post">
                        <input name="admin_save" type="hidden" value="">
                        <input name="searchTXT" type="hidden" value="<%=searchTXT%>">
                        <input name="OrdState" type="hidden" value="<%=OrdState%>">
                        <input name="OrdClassList" type="hidden" value="<%=OrdClassList%>">
                        <input name="OrdDateType" type="hidden" value="<%=OrdDateType%>">
                        <input name="OrdDateStart" type="hidden" value="<%=OrdDateStart%>">
                        <input name="OrdDateEnd" type="hidden" value="<%=OrdDateEnd%>">
                        <table>
                            <thead>
                                <tr style="white-space: nowrap;">
                                    <%If isDepartment("020108")=1 Then%>
                                    <th>选择</th>
                                    <%ElseIf isDepartment("010401")=0 Then%>
                                    <th>序号</th>
                                    <%End If%>
                                    <th>单据编号</th>
                                    <th>状态</th>
                                    <th>日期</th>
                                    <th>类型</th>
                                    <%If isDepartment("010401")=0 Then%><th>价钱</th><%End If%>                                    
                                    <th>目的地</th>
                                    <th>距离</th>
                                    <th>介绍人</th>
                                    <th>开单客服</th>
                                    <th class="last">操作备注</th>
                                    
                                </tr>
                            </thead>
                            <tbody<%If isDepartment("010401")=1 then Response.Write " style=""white-space: nowrap;"" "%>>
            
            <%i=1
            do while not rs.Eof and i<=QuantityInt
              ServiceOrdID            = rs("ServiceOrdID")            '服务单号
              ServiceOrdClass        = rs("ServiceOrdClass")            '单据类型
              ServiceOrdType        = rs("ServiceOrdType")            '服务单类型
              ServiceOrdState        = rs("ServiceOrdState")            '服务单状态
              ServiceOrdStartDate    = rs("ServiceOrdStartDate")        '开单日期
              ServiceOrdApptDate    = rs("ServiceOrdApptDate")        '预约日期
              ServiceOrdCoName        = rs("ServiceOrdCoName")        '联系人姓名
              ServiceOrdCoPhone        = rs("ServiceOrdCoPhone")        '联系人电话
              ServiceOrdPtAge        = rs("ServiceOrdPtAge")            '患者年龄
              ServiceOrdPtSex        = rs("ServiceOrdPtSex")            '患者性别
              ServiceOrdTraProvince    = rs("ServiceOrdTraProvince")    '出发地省份
              ServiceOrdTraCity        = rs("ServiceOrdTraCity")        '出发地城市
              ServiceOrdTraStreet    = rs("ServiceOrdTraStreet")        '出发地
              ServiceOrdTraEnd        = rs("ServiceOrdTraEnd")        '目的地
              ServiceOrdTraVia        = rs("ServiceOrdTraVia")        '途经地(计划)
              ServiceOrdTraDistance    = rs("ServiceOrdTraDistance")    '距离(公里)
              ServiceOrdTraSDTime    = rs("ServiceOrdTraSDTime")        '拟出发时间
              ServiceOrdTraTxnPrice    = rs("ServiceOrdTraTxnPrice")    '成交价
              StretcherMoney        = rs("StretcherMoney")            '附加费用
              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")        '审核时间
              ServiceOrdVIP            = rs("ServiceOrdVIP")
              ServiceOrdUnitID        = rs("ServiceOrdUnitID")        '第三方ID
              ServiceOrdUnitRemarks    = rs("ServiceOrdUnitRemarks")    '第三方订单备注
              ServiceOrdIntroducer    = rs("ServiceOrdIntroducer")    '介绍人
              ServiceOrdOperationRemarks    = rs("ServiceOrdOperationRemarks")    '操作备注
              ServiceOrdPtOutHospID    = rs("ServiceOrdPtOutHospID")    '转出医院ID
              ServiceOrdPtOutHosp    = rs("ServiceOrdPtOutHosp")        '转出医院
              ServiceOrdPtInHospID    = rs("ServiceOrdPtInHospID")    '转入医院ID
              ServiceOrdPtInHosp    = rs("ServiceOrdPtInHosp")        '转入医院
              ServiceOrdCancelReasonTXT=rs("ServiceOrdCancelReasonTXT")
              ServiceOrdCancelReason= rs("ServiceOrdCancelReason")
              If isDepartment("010401")=0 Then
                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)
              Else
                ServiceOrdNo    = ServiceOrdClass&ServiceOrdID
              End If
 
              i=i+1
 
              If ServiceOrdTraTxnPrice="" Or isnull(ServiceOrdTraTxnPrice) Then ServiceOrdTraTxnPrice=0
              If instr(ServiceOrdTraDistance,"公里")=0 Then
                ServiceOrdTraDistance=ServiceOrdTraDistance&"公里"
              End If
              If ServiceOrdTraSDTime<>"" Then
                ServiceOrdTraSDTime=FORMATDATETIME(ServiceOrdTraSDTime,vbShortDate) &" "& Right("0"&Hour(ServiceOrdTraSDTime),2) &":"& Right("0"&Minute(ServiceOrdTraSDTime),2)
              End If
              If ServiceOrdApptDate<>"" Then
                ServiceOrdApptDate=FORMATDATETIME(ServiceOrdApptDate,vbShortDate) &" "& Right("0"&Hour(ServiceOrdApptDate),2) &":"& Right("0"&Minute(ServiceOrdApptDate),2)
              End If
              
              'VIP客户订单
              If ServiceOrdVIP="1" Then
                ServiceOrdVIPTXT="[<span style='color: #E91E63;font-weight: bold;'>VIP</span>]"
              Else
                ServiceOrdVIPTXT=""
              End If
 
              '新订单
              CC=OAUser(ServiceOrd_CC_ID,"UserName")
              If CC="0" And ServiceOrdUnitID<>"0" Then CC=UnitUser(ServiceOrdUnitID,"UnitShort")&"新订单"
 
              '出发地
              If ServiceOrdTraVia<>"" Then
                OrdTraVia=ServiceOrdTraVia
              Else
                OrdTraVia=ServiceOrdTraStreet
              End If
 
              '已发送内部通知次数
              sql="select count(MID) from ServiceOrd_Message where MessageHeadline like '已发送通知给%' and MessageState>0 and ServiceOrdIDDt="&ServiceOrdID
              rsDt.open sql,objConn,1,1
              MessageCountInt    = rsDt(0)
              rsDt.close()
              
              '订单颜色标记
              If ServiceOrdUnitID="2" Then
                OrdCssSign=" style='color: #F44336;'"
              ElseIf MessageCountInt>0 Then 
                OrdCssSign=" style='color: #ff4aff;'"
              Else
                OrdCssSign=""
              End If
              
 
              '取消订单加上原因
              If ServiceOrdState="4" Then ServiceOrdOperationRemarks=ServiceOrdOperationRemarks&"<br><font color='#f44336'>"&CancelReasonA(ServiceOrdCancelReason)&","&ServiceOrdCancelReasonTXT&"</font>"
              %>
              <tr>
                <%If isDepartment("020108")=1 Then%>
                <td class="selected" style="width: 1%;"><input type="checkbox" id="ServiceOrdID_<%=ServiceOrdID%>" name="ServiceOrdID" value="<%=ServiceOrdID%>"/></td>
                <%ElseIf isDepartment("010401")=0 Then%>
                <td class="selected" style="width: 1%;"><%=i+((acc1-1)*QuantityInt)-1%></td>
                <%End If%>
                <td class="selected"><A HREF="ServiceOrder.gds?ServiceOrdID=<%=ServiceOrdID%>&OrdDateType=<%=OrdDateType%>&OrdClassList=<%=OrdClassList%>&h_menu1_1=1"<%=OrdCssSign%>><%=ServiceOrdNo%><%=ServiceOrdVIPTXT%></A></td>
                <td class="selected"><%=ServiceOrdStateB(ServiceOrdState)%></td>
                <td class="selected"><A HREF="ServiceOrder.gds?ServiceOrdID=<%=ServiceOrdID%>&OrdDateType=<%=OrdDateType%>&OrdClassList=<%=OrdClassList%>&h_menu1_1=1"><%=DateFormat(ServiceOrdStartDate)%></A></td>
                <td class="selected"><%=ServiceOrdTypeA(ServiceOrdType)%></td>
                <%If isDepartment("010401")=0 Then%><td class="selected" style="text-align: right;"><%If ServiceOrdTraTxnPrice+StretcherMoney<>0 then%><%=FormatCurrency(ServiceOrdTraTxnPrice+StretcherMoney,0)%><%else%>--<%End If%></td><%End If%>
                
                <td class="category category2 last left" style="line-height: 13px;"><span style='color: #E91E63;'><%If ServiceOrdPtOutHosp="814" Then Response.Write OrdTraVia Else Response.Write HospA(ServiceOrdPtOutHosp,"HospName") End If%></span><br><span style='color: #4CAF50;'><%If ServiceOrdPtInHosp="814" Then Response.Write ServiceOrdTraEnd Else Response.Write HospA(ServiceOrdPtInHosp,"HospName") End If%></span></td>
                <td class="selected" style="width: 1%;white-space:nowrap;text-align: right;"><%=ServiceOrdTraDistance%></td>
                <td class="selected"><%=UnitIntroducer(ServiceOrdIntroducer,"UnitName")%></td>
                <td class="selected"><%=CC%></td>
                <td class="category last" style="text-align: left;line-height: 13px;" ><%=ServiceOrdOperationRemarks%></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 class="last">&nbsp;</td>
            </tr>
            <%next%>
                            </tbody>
                        </table>
                        </form>
                        <!-- 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 cint(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 CInt(acc1)>=CInt(acc2) then%>
                                  <li class="disabled">下页 &raquo;</li>
                                <%else%>
                                  <li><a href="?page=<%=acc1+1%><%=page_URL%>">下页 &raquo;</a></li>
                                <%end if%>
                             <li>
                            <form action="?1=1<%=page_URL%>" method="post">&nbsp;
                                    <input type="text" name="page" value="<%=acc1%>" style="width: 20px;" />
                                    <input type="submit" name="submit" value="转跳" />
                            </form>
                            </li>
                            </ul>
                            <%end if%>
                        </div>
                        <!-- end pagination -->
                        
                    </div>
                </div>
                <!-- end table -->
 
 
                
            </div>
            <!-- end content / right -->
        </div>
        <!-- end content -->
        <!--#include FILE="vicgame.asp"-->
    </body>
</html>