📄 oldview.asp
字号:
<%option explicit%>
<%
Response.Expires = -1
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "Cache-Control","no-cache,must-revalidate"
%>
<%
'----------------------------------------------------------------------
'---------------文件包含部分说明---------------------------------------
'----------------------------------------------------------------------
'--------------- 使用数据库连接包含 DataEnvi.asp ---------------
'--------------- 使用字符串包含 String.asp -----------------------
'--------------- 使用分页操作包含 Page.asp -------------------
'----------------------------------------------------------------------
%>
<!--#include file ="../../../Include/DataEnvi.asp"-->
<!--#include file = "../../../Include/String.asp"-->
<!--#include file = "../../../Include/Page.asp"-->
<!--#include file = "../../../include/function.asp"-->
<%
Dim objDB,objRS,strSQL
Dim From,ComMsgID,RecordID
Dim MsgType,FlowID,LocationID,AccountID,SendTime,Title,Body,IsHtml
Dim PassType,IsEnd
Dim strShow
Dim isShowEnd
Dim StrState
if session("AccountID")="" then
%>
<script language=javascript>
alert("因登录时间过长,会话失效,请退出重新登陆!")
</script>
<%
Response.End
end if
strShow = ""
isShowEnd = False
From = Request.QueryString("BoxID")
ComMsgID = Request.QueryString("ID")
RecordID = Request.QueryString("ID")
' If From="" Or ComMsgID="" Then Response.Redirect "Err.asp"
set objDB = server.CreateObject("ADODB.Connection")
set objRS = server.CreateObject("ADODB.Recordset")
OpenDB objDB
If From=4 Or From=5 Then
strSQL = "Select ComMsgID From t_OA_Work_ComMessage_Record Where ID = " & RecordID
objRS.Open strSQL,objDB,1,3
ComMsgID = objRS.Fields("ComMsgID")
objRS.Close()
End If
strSQL = "select Body,MsgType,FlowID,LocationID,AccountID,SendTime,Title,IsHtml From t_OA_Work_ComMessage Where ID = " & ComMsgID
objRS.Open strSQL,objDB,1,3
MsgType = objRS.Fields("MsgType")
FlowID = objRS.Fields("FlowID")
LocationID = objRS.Fields("LocationID")
AccountID = objRS.Fields("AccountID")
SendTime = objRS.Fields("SendTime")
Title = objRS.Fields("Title")
Body = objRS.Fields("Body")
IsHtml = objRS.Fields("IsHtml")
' Response.Write "IsHtml=" & IsHtml
objRS.Close()
' Response.Write "--"&From&"--"&ComMsgID&"--"&MsgType
If From = 1 Then
strSQL = "select State,GetTime from t_OA_Work_ComMessage_Record Where ComMsgID = " & ComMsgID & " And state=0 And IsSend=1 And ExecuteID="&session("AccountID")
objRS.Open strSQL,objDB,1,3
If Not objRS.EOF then
objRS.Fields("State") = 1
objRS.Fields("getTime") = Now()
objRS.Update()
End If
objRS.Close()
strSQL = "select Top 1 ID, PassType,IsEnd from t_OA_Work_ComMessage_Record Where ComMsgID = " & ComMsgID & " And state=1 And IsSend=1 And ExecuteID="&session("AccountID")
objRS.Open strSQL,objDB,1,3
PassType = objRS.Fields("PassType")
RecordID = objRS.Fields("ID")
IsEnd = objRS.Fields("IsEnd")
objRS.Close()
End If
'以下显示处理过程
If MsgType <> 1 Then
If From = 1 Then 'form=1 说明要执行批改,因此不把自己列出 :ExecuteID<>" & Session("AccountID")
If MsgType = 4 then
strSQL = "select * from t_OA_Work_ComMessage_Record Where ComMsgID = " & ComMsgID & " And isSend=1 And ExecuteID<>" & Session("AccountID")
Else
strSQL = "select * from t_OA_Work_ComMessage_Record Where ComMsgID = " & ComMsgID & " And ParentID<>0 And isSend=1 And ExecuteID<>" & Session("AccountID")
End If
Else
If MsgType = 4 then
strSQL = "select * from t_OA_Work_ComMessage_Record Where ComMsgID = " & ComMsgID & " And isSend=1"
Else
strSQL = "select * from t_OA_Work_ComMessage_Record Where ComMsgID = " & ComMsgID & " And ParentID<>0"
End If
End If
ElseIF MsgType = 1 Then
If From = 4 then '从已处理箱来
strSQL = "select * from t_OA_Work_ComMessage_Record Where ComMsgID = " & ComMsgID & " And isSend=1 "
ElseIf From = 3 then '从已发送箱来
strSQL = "select * from t_OA_Work_ComMessage_Record Where ComMsgID = " & ComMsgID & " And isSend=1 "
Else
strSQL = "select * from t_OA_Work_ComMessage_Record Where ComMsgID = " & ComMsgID & " And Not State in(99,100,101,102,103)"
End If
End IF
' Response.Write strSQL
objRS.Open strSQL,objDB,1,3
Do While Not objRS.EOF
If (objRS.Fields("IsEnd") = True) And Not ( IsNull(objRS.Fields("ExecuteTime")) )Then
isShowEnd = True
End If
strShow = strShow & "<tr class=LStr><td width='20%'><img src='../../../images/oa/work/flow/node.gif'>" & "</td>"
strShow = strShow & "<td width='80%'>" & objRS.Fields("NodeName") & "</td>"
strShow = strShow & "<tr><td>处理人:" & "</td>"
strShow = strShow & "<td>" & GetTrueName(objDB,objRS.Fields("ExecuteID")) & "</td>"
strShow = strShow & "<tr><td>状态:" & "</td>"
If IsNull(objRS.Fields("ExecuteTime")) Then
strShow = strShow & "<td><font color=red>尚未处理</font></td></tr>"
Else
strShow = strShow & "<td><font color=green>处理完毕</font></td></tr>"
strShow = strShow & "<tr><td>是否通过</td>"
strShow = strShow & "<td>" & objRS.Fields("IsPass") &"</td></tr>"
strShow = strShow & "<tr><td>处理意见</td>"
strShow = strShow & "<td>" & objRS.Fields("Advice") &"</td></tr>"
strShow = strShow & "<tr><td>处理时间</td>"
strShow = strShow & "<td>" & objRS.Fields("ExecuteTime") &"</td></tr>"
End If
objRS.MoveNext()
Loop
objRS.Close()
If From=2 Then
StrState = "尚未发送"
End If
If isShowEnd And From<>2 Then
StrState = "公文流转结束"
ElseIf From<>2 And Not isShowEnd Then
StrState = "公文正在流转中"
End If
%>
<%
Sub Main()
%>
<table class=Ltable cellspacing=1 cellpadding=3>
<tr class=LHtr>
<td width=20%>查看公文</td>
<td width=80%></td>
</tr>
<tr class=Ltr>
<td>公文发起人:</td>
<td><%=GetTrueName(objDB,AccountID)%></td>
</tr>
<tr class=Ltr>
<td>发送时间:</td>
<td><%=SendTime%></td>
</tr>
<tr class=Ltr>
<td>公文标题:</td>
<td><%=Title%></td>
</tr>
<tr class=Ltr>
<td>公文内容:</td>
<td height=200>
<%
If IsHtml Then
%>
<iframe src="ShowContent.asp?ID=<%=ComMsgID%>" class=textbody></iframe>
<%
Else
%>
<textarea class=textbody><%=Body%></textarea>
<%
End If
%>
</td>
</tr>
</table>
<table class=Ltable cellspacing=1 cellpadding=3>
<tr class=LHtr>
<td colspan=2>协同工作情况(<b><%=StrState%></b>)</td>
</tr>
<%=strShow%>
<%If From=1 Then%>
</table >
<table>
<table class=Ltable cellspacing=1 cellpadding=3>
<Form action=Execute.asp method="post">
<tr class=LStr>
<td>公文处理</td>
<td>
</tr>
<tr class=Ltr>
<td>请输入您的处理批示</td>
<td>
<TextArea name=advice class=textarea></textarea>
</td>
</tr>
<%If PassType=0 Then%>
<input type=hidden value=1 name=IsPass>
<%Else%>
<tr class=Ltr>
<td>审核结果</td>
<td>
<input type=radio name=IsPass value=0>不同意通过
<input type=radio name=IsPass value=1 checked>同意通过
</td>
</tr>
<%End If%>
</table>
<input type=hidden name="RecordID" value="<%=RecordID%>">
<input type=hidden name="MsgType" value="<%=MsgType%>">
<input type=hidden name="ComMsgID" value="<%=ComMsgID%>">
<input type=hidden name="LocationID" value="<%=LocationID%>">
<input type=hidden name="FlowID" value="<%=FlowID%>">
<input type=hidden name="Writer" value="<%=AccountID%>">
<input type=hidden name="IsEnd" value="<%=IsEnd%>">
<input type=submit class=button value="处理完毕"><%
End If
%><input type=button class=button value="返 回" onclick="history.go(-1)">
</form>
<%
End Sub
%>
<!--#include file ="Templet.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -