【调度系统】广东民航医疗快线调度系统源代码
wzp
2024-12-06 0df39a8c5a45c6ff25411eace15d40a606f9769c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--#include virtual="/inc/chkadmin.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
if isDepartment("070103")=0 then
  Response.Redirect "/"
  Response.End()
end If
 
 
 
searchTXT=SafeRequest(Request("searchTXT"))
OrdClassType=SafeRequest(Request("OrdClassType"))
UnitNameID=SafeRequest(Request("UnitNameID"))
CoopUnitID=SafeRequest(Request("CoopUnitID"))
 
Set rs = 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
 
'各种返回信息
SystemMessageType=trim(Request("SystemMessageType"))
SMT=trim(Request("SMT"))
if SystemMessageType<>"" then
  if SMT="1" then
    SystemMessageTXT="请选择日期"
  end if
end If
 
OrdDateType=SafeRequest(Request("OrdDateType"))
OrdDateStart=SafeRequest(Request("OrdDateStart"))
OrdDateEnd=SafeRequest(Request("OrdDateEnd"))
If OrdDateType="" Then
  OrdDateType=4
  OrdDateTop=" top 20 "
End If
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)
    Else
        OrdDateTypeName=OrdDateStart&" 至 "&OrdDateEnd
        OrdDateTypeName1="时间段"
    End If
    SqlOrdDateType="between '"&OrdDateStart&"' and '"&OrdDateEnd&" 23:59:59'"
    
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
 
 
If OrdState<>"0" then
    OrdListName    = ServiceOrdStateA(OrdState)&"记录"
Else
    OrdListName    = "调度单明细汇总"
End If
 
'============================== 
'功能描述: 用正则除去HTML标记 
'不能保留<b><strong>等以及用户自定义的<和> 
'============================== 
 
Function RemoveHTMLTag(fString) 
        Dim re 
        Set re = New RegExp 
        re.IgnoreCase = True 
        re.Pattern = "<(.[^>]*)>" 
        fString = re.Replace(fString, "") 
        Set re = Nothing 
        RemoveHTMLTag = fString 
End Function 
 
'============================== 
'功能描述: 除去HTML标记 
'不能保留<b><strong>等以及用户自定义的<和> 
'============================== 
 
Function Remove_HTML(Str1) 
        Do While InStr(1, Str1, "<", 1) >0 
                ilen1 = InStr(1, Str1, "<", 1) 
                ilen2 = InStr(1, Str1, ">", 1) 
                Str1 = Left(Str1, ilen1 -1) & Mid(Str1, ilen2 + 1) 
        Loop 
        If Str1<>"" And Not isnull(Str1) Then
            Str1 = replace(Str1,"&nbsp;"," ")
            Str1 = replace(Str1,"↓","")
            Str1 = replace(Str1,"↑","")
        End If
        Remove_HTML = Str1 
End Function 
 
page_URL="&searchTXT="&searchTXT&""
%>
 
<%'数据读取
is_CSV=1%>
<!--#include virtual="Report_DispatchDetailed_Data.gds" -->
            
<%
 
TitleTXT=OrdListName
response.buffer = true 
response.addheader "content-disposition","attachment;filename="&TitleTXT&"导出"&DTimeID()&".csv;" 
response.contenttype = "application/octet-stream" 
Response.BinaryWrite ChrB(&HEF) & ChrB(&HBB) & ChrB(&HBF)
 
'表头
For X=Lbound(FormArray)+1 to Ubound(FormArray)
    If X=Ubound(FormArray) Then
      classHtml=" class=""last"""
    ElseIf X=1 Then
      classHtml=" class=""selected"""
    Else
      classHtml=""
    End If
    strfields = strfields&","&Remove_HTML(FormArray(X,0))
Next
response.write Mid(strfields,2) & vbcrlf
 
'列表
For Y=Lbound(FormArray,2)+2 to Ubound(FormArray,2)
    For X=Lbound(FormArray)+1 to Ubound(FormArray)
        response.write Remove_HTML(FormArray(X,Y))
        If X<Ubound(FormArray) Then response.write ","
    Next
    response.write(vbcrlf)
Next
%>