📄 officemain.asp
字号:
Search=Search & "Step<>'GD' AND " '不是待归档
Search=Search & "Step<>'YG'" '未归档
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select top 10 documentid, RecordID, Status, LockUserID, LockTime, Author, PSend_Dept, FileDate, DocMod, Subject, DocFileNo, DC_Doc_Sort, DC_Doc_Security, DC_Doc_Exigence, Step, BLXH, BLR, GZDBH, GZDXH, BLBZ from " & table & " " & Search & " order by BLBZ asc, DocumentID desc, BLXH desc"
'response.write sql
rs.open sql,oConn,1,1
'------------------------------------------------
%>
<%
if rs.RecordCount=0 then
response.write "暂时为空!"
else
%>
<SCRIPT language=javascript>
function WindowOpen(strURL){
DocumentWin = window.open(strURL,"","toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
DocumentWin.focus();
}
</SCRIPT>
<table border=0 cellspacing="1" cellpadding="2" width="100%" align=center class=tab>
<tr class="td3">
<td align=center nowrap width="55">收发</td>
<td align=center nowrap width="30">编号</td>
<td align=center nowrap>公文标题</td>
<td align=center nowrap>作者</td>
<td align=center nowrap>发文单位</td>
<td align=center nowrap width="70">拟制日期</td>
<td align=center nowrap>办理状态</td>
<td colspan="4" align=center nowrap>操作</td>
</tr>
<%for i = 0 to rs.RecordCount-1
If rs.EOF Then Exit For
td_class="td1"
if rs("BLBZ") = "Y" then td_class="tdBottom"
%>
<tr>
<td nowrap class="<%=td_class%>">
<%if rs("Status")="EDIT" then%>
<%if rs("LockUserID")=int(LoginID) then%>
<a href="../documents/DocumentUnLock_M.asp?unlock=true&RecordID=<%=rs("RecordID")%>" target="hidframe" title="<%=getusername(rs("LockUserID"))&" 于 "&rs("LockTime")&"锁定"%>">
<img src="../images/lockself.gif" border="0" align="left">
<%else%>
<a href="#" onclick="alert('对不起,你没有解锁权限!'); return false" title="<%=getusername(rs("LockUserID"))&" 于 "&rs("LockTime")&"锁定"%>">
<img src="../images/lock.gif" border="0" align="left">
<%end if%>
<%else%>
<a href="../documents/DocumentLock_M.asp?lock=true&RecordID=<%=rs("RecordID")%>" target="hidframe" title="未锁定">
<img src="../images/unlock.gif" border="0" align="left">
<%end if%>
<%=rs("DocMod")%>
</td>
<td nowrap class="<%=td_class%>"><%=htmlout(rs("documentid"))%></td>
<td nowrap class="<%=td_class%>"><%=htmlout(rs("Subject"))%></td>
<td nowrap class="<%=td_class%>"><%=htmlout(GetUserName(rs("Author")))%></td>
<td nowrap class="<%=td_class%>"><%=htmlout(rs("PSend_Dept"))%></td>
<td nowrap class="<%=td_class%>"><%=CDate(rs("FileDate"))%></td>
<td nowrap class="<%=td_class%>">
<%
select case rs("step")
case "FW"
Response.Write "发文拟制"
case "SW"
Response.Write "收文登记"
case "GD"
Response.Write "<font color=blue>待归档"
case "XH"
Response.Write "<font color=#888888>销毁"
case "CX"
Response.Write "<font color=red>撤销"
case else
set rs1 = server.CreateObject("ADODB.RecordSet")
rs1.Open "select blgzmc from tbioaOffice_Flow_Bldy where blgzbh='" & rs("GZDBH") & "'",oConn,1,1
if not rs1.EOF then
Response.Write server.HTMLEncode(rs1(0) & "")
end if
rs1.close
end select
select case cstr(oConn.execute ("select ZCBZ from tbioaOffice_Flow_Blqk where RecordID='"&rs("RecordID")&"' and BLXH="&rs("BLXH"))(0))
case "0"
Response.Write "(开始)"
case "1"
Response.Write "(正常)"
case "2"
Response.Write "(加签)"
case "3"
Response.Write "(退签)"
case "4"
Response.Write "(跳签)"
case "5"
Response.Write "(撤销)"
end select
%>
</td>
<td nowrap width="10" nowrap class="<%=td_class%>">
<a href="javascript:WindowOpen('../documents/DocumentShow.asp?RecordID=<%=rs("RecordID")%>&BLXH=<%=rs("BLXH")%>&GZDBH=<%=rs("GZDBH")%>');">
<img border="0" src="../images/icon_show.gif" align="left" title="查看">
</a>
</td>
<td nowrap width="10" nowrap class="<%=td_class%>">
<a href="javascript:WindowOpen('../documents/DocumentEdit.asp?RecordID=<%=rs("RecordID")%>&BLXH=<%=rs("BLXH")%>&GZDBH=<%=rs("GZDBH")%>');">
<%if rs("BLBZ") = "Y" then%><img border="0" src="../images/icon_edit.gif" align="left" title="重办" style="filter:gray">
<%else%><img border="0" src="../images/icon_edit.gif" align="left" title="办理"><%end if%>
</a>
</td>
<td nowrap width="10" nowrap class="<%=td_class%>">
<a href="javascript:WindowOpen('../documents/F_Point_Show.asp?RecordID=<%=rs("RecordID")%>')">
<img src="../images/icon_flow.gif" align="left" border=0 alt="流程">
</a>
</td>
</tr>
<%
rs.MoveNext
next
%>
</table>
<%
end if
rs.close
%>
</td>
</tr>
</table>
<!--公文处理END-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height=7></td>
</tr>
</table>
<!--公文处理-紧急公文 STAR-->
<table border="0" width="100%" class="tab" cellspacing="1" cellpadding="2">
<tr>
<td class="tdTop2" nowrap>
<img border=0 src=../images/icon_title.gif align=left> <b>紧急/特急公文
</td>
</tr>
<tr>
<td class="td1">
<%
'------------------------------------------------取记录
'分页取记录 (返回rs对象)
'
table="vioaOffice_Document_Bl" '表名
'接受查询参数
'查寻条件
Search="WHERE "
Search=Search & "((DC_Doc_Exigence = '特急') OR (DC_Doc_Exigence = '紧急')) AND (XGBZ <> '0') AND " '*流转中的可修改公文*
Search=Search & "(EXISTS(SELECT UserID FROM tbioaOffice_Bldlr WHERE SortID = DC_Doc_Sort AND UserID = blr AND DlrID ="&LoginID&") OR (blr ="&LoginID&" and DC_Doc_Sort not in (select SortID from tbioaOffice_Bldlr WHERE UserID ="&LoginID&"))) AND " '判断不显示指定代理人的公文 '判断显示别人指定我为代理人的公文
Search=Search & "(Step<>'CX' or (Step='CX' and cxblxh=blxh)) AND " '撤销标志为未撤销
'Search=Search & "Step<>'GD' AND " '不是待归档
Search=Search & "Step<>'YG'" '未归档
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select top 10 documentid, RecordID, Status, LockUserID, LockTime, Author, PSend_Dept, FileDate, DocMod, Subject, DocFileNo, DC_Doc_Sort, DC_Doc_Security, DC_Doc_Exigence, Step, BLXH, BLR, GZDBH, GZDXH, BLBZ from " & table & " " & Search & " order by BLBZ asc, DocumentID desc, BLXH desc"
'response.write sql
rs.open sql,oConn,1,1
'------------------------------------------------
%>
<%
if rs.RecordCount=0 then
response.write "暂时为空!"
else
%>
<SCRIPT language=javascript>
function WindowOpen(strURL){
DocumentWin = window.open(strURL,"","toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
DocumentWin.focus();
}
</SCRIPT>
<table border=0 cellspacing="1" cellpadding="2" width="100%" align=center class=tab>
<tr class="td3">
<td align=center nowrap width="55">收发</td>
<td align=center nowrap width="30">编号</td>
<td align=center nowrap width="55">紧急程度</td>
<td align=center nowrap>公文标题</td>
<td align=center nowrap>作者</td>
<td align=center nowrap>发文单位</td>
<td align=center nowrap width="70">拟制日期</td>
<td align=center nowrap>办理状态</td>
<td colspan="4" align=center nowrap>操作</td>
</tr>
<%for i = 0 to rs.RecordCount-1
If rs.EOF Then Exit For
td_class="td1"
if rs("BLBZ") = "Y" then td_class="tdBottom"
%>
<tr>
<td nowrap class="<%=td_class%>">
<%if rs("Status")="EDIT" then%>
<%if rs("LockUserID")=int(LoginID) then%>
<a href="../documents/DocumentUnLock_M.asp?unlock=true&RecordID=<%=rs("RecordID")%>" target="hidframe" title="<%=getusername(rs("LockUserID"))&" 于 "&rs("LockTime")&"锁定"%>">
<img src="../images/lockself.gif" border="0" align="left">
<%else%>
<a href="#" onclick="alert('对不起,你没有解锁权限!'); return false" title="<%=getusername(rs("LockUserID"))&" 于 "&rs("LockTime")&"锁定"%>">
<img src="../images/lock.gif" border="0" align="left">
<%end if%>
<%else%>
<a href="../documents/DocumentLock_M.asp?lock=true&RecordID=<%=rs("RecordID")%>" target="hidframe" title="未锁定">
<img src="../images/unlock.gif" border="0" align="left">
<%end if%>
<%=rs("DocMod")%>
</td>
<td nowrap class="<%=td_class%>"><%=htmlout(rs("documentid"))%></td>
<td nowrap class="<%=td_class%>"><%=htmlout(rs("DC_Doc_Exigence"))%></td>
<td nowrap class="<%=td_class%>"><%=htmlout(rs("Subject"))%></td>
<td nowrap class="<%=td_class%>"><%=htmlout(GetUserName(rs("Author")))%></td>
<td nowrap class="<%=td_class%>"><%=htmlout(rs("PSend_Dept"))%></td>
<td nowrap class="<%=td_class%>"><%=CDate(rs("FileDate"))%></td>
<td nowrap class="<%=td_class%>">
<%
select case rs("step")
case "FW"
Response.Write "发文拟制"
case "SW"
Response.Write "收文登记"
case "GD"
Response.Write "<font color=blue>待归档"
case "XH"
Response.Write "<font color=#888888>销毁"
case "CX"
Response.Write "<font color=red>撤销"
case else
set rs1 = server.CreateObject("ADODB.RecordSet")
rs1.Open "select blgzmc from tbioaOffice_Flow_Bldy where blgzbh='" & rs("GZDBH") & "'",oConn,1,1
if not rs1.EOF then
Response.Write server.HTMLEncode(rs1(0) & "")
end if
rs1.close
end select
select case cstr(oConn.execute ("select ZCBZ from tbioaOffice_Flow_Blqk where RecordID='"&rs("RecordID")&"' and BLXH="&rs("BLXH"))(0))
case "0"
Response.Write "(开始)"
case "1"
Response.Write "(正常)"
case "2"
Response.Write "(加签)"
case "3"
Response.Write "(退签)"
case "4"
Response.Write "(跳签)"
case "5"
Response.Write "(撤销)"
end select
%>
</td>
<td nowrap width="10" nowrap class="<%=td_class%>">
<a href="javascript:WindowOpen('../documents/DocumentShow.asp?RecordID=<%=rs("RecordID")%>&BLXH=<%=rs("BLXH")%>&GZDBH=<%=rs("GZDBH")%>');">
<img border="0" src="../images/icon_show.gif" align="left" title="查看">
</a>
</td>
<td nowrap width="10" nowrap class="<%=td_class%>">
<a href="javascript:WindowOpen('../documents/DocumentEdit.asp?RecordID=<%=rs("RecordID")%>&BLXH=<%=rs("BLXH")%>&GZDBH=<%=rs("GZDBH")%>');">
<%if rs("BLBZ") = "Y" then%><img border="0" src="../images/icon_edit.gif" align="left" title="重办" style="filter:gray">
<%else%><img border="0" src="../images/icon_edit.gif" align="left" title="办理"><%end if%>
</a>
</td>
<td nowrap width="10" nowrap class="<%=td_class%>">
<a href="javascript:WindowOpen('../documents/F_Point_Show.asp?RecordID=<%=rs("RecordID")%>')">
<img src="../images/icon_flow.gif" align="left" border=0 alt="流程">
</a>
</td>
</tr>
<%
rs.MoveNext
next
%>
</table>
<%
end if
rs.close
%>
</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height=7></td>
</tr>
</table>
<!--公文处理END-->
<!--公文处理STAR-->
<table border="0" width="100%" class="tab" cellspacing="1" cellpadding="2">
<tr>
<td class="tdTop2" nowrap>
<img border=0 src=../images/icon_title.gif align=left> <b>未读邮件
</td>
</tr>
<tr>
<td class="td1">
<%
'------------------------------------------------取记录
'查寻条件
Search="WHERE "
Search=Search & "folder='收件夹' and "
Search=Search & "userid="&LoginID&" and read_mod=0"'只能查看自己录入的记录
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select top 10 id,sdate,fjr,subject,read_mod from tbioamail " & Search & " order by ID desc"
rs.open sql,oConn,1,1
if rs.RecordCount=0 then
response.write "暂时为空!"
else
%>
<table width="100%" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td class="td3">主题</td>
<td class="td3" width="130">寄件部门</td>
<td class="td3" width="100">寄件人</td>
<td class="td3" width="120">时间</td>
</tr>
<%for i = 0 to rs.PageSize-1
If rs.EOF Then Exit For
if i mod 2 = 0 then td_class="td1" else td_class="td2"
%>
<tr>
<td class="<%=td_class%>"><a href="../mail/mail_show.asp?id=<%=rs("id")%>" target="_black"><%if rs("read_mod")=0 then response.write"<b>"%><%=HtmlOut(rs("subject"))%></a></td>
<td class="<%=td_class%>"><%=HtmlOut(GetTableValue("tbioaDepartment","name","id",GetTableValue("tbioaUser","department","id",rs("fjr"))))%></td>
<td class="<%=td_class%>"><%=HtmlOut(getusername(rs("fjr")))%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("sdate"))%></td>
</tr>
<%
rs.MoveNext
next
end if
%>
</td>
</tr>
</table>
<!--公文处理END-->
</td>
</tr>
</table>
</body>
</html>
<%'释放对象变量
oConn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -