<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include virtual="/inc/chkadmin.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<%
|
if isDepartment("070103")=0 And isDepartment("070107")=0 then
|
Response.Redirect "/"
|
Response.End()
|
end If
|
|
|
|
searchTXT=SafeRequest(Request("searchTXT"))
|
OrdClassType=SafeRequest(Request("OrdClassType"))
|
|
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"))
|
UnitNameID=SafeRequest(Request("UnitNameID"))
|
CoopUnitID=SafeRequest(Request("CoopUnitID"))
|
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," "," ")
|
Str1 = replace(Str1,"↓","")
|
Str1 = replace(Str1,"↑","")
|
End If
|
Remove_HTML = Str1
|
End Function
|
|
page_URL="&searchTXT="&searchTXT&""
|
%>
|
|
<%'数据读取
|
is_CSV=1%>
|
<!--#include virtual="Report_Hosp_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
|
%>
|