⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 document_file_gd_s.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
'功能:归档报表修改
%>

<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->

<%
'------------------------------------------------设置参数
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
mRecordID=Request("RecordID")	'取得编号
'------------------------------------------------
'------------------------------------------------读入文档内容
  mSql="Select * From tbioaDocument_File Where RecordID='"& mRecordID & "'"
  Set TbMainRs=Server.CreateObject("ADODB.RecordSet")
  TbMainRs.Open mSql,oConn,1,3

  If TbMainRs.Eof then '如果无文档记录则退出
  	response.write "该报表不存在!"
  	response.end
  else  '如果有记录则取记录参数
	'------------------------------------------------
	mFLH               = TbMainRs("FLH")	  	  '报表类别
	mGZDBH             = TbMainRs("GZDBH")            '工作点编号
	mFile_Man          = TbMainRs("File_Man")         '归档人
	mFile_Date         = TbMainRs("File_Date")        '归档日期
	mFile_Save         = TbMainRs("File_Save")        '保存日期
	mDocFileNo         = TbMainRs("DocFileNo")	  '报表文号
	mFileType          = TbMainRs("FileType")         '文档类型
	mDocType	   = TbMainRs("DocType")	  '内外部报表
	mDocMod            = TbMainRs("DocMod")           '收发文
	mDC_Doc_Sort       = TbMainRs("DC_Doc_Sort")	  '报表种类
	mDC_Doc_Security   = TbMainRs("DC_Doc_Security")  '报表密级
	mSubject	   = TbMainRs("Subject")	  '报表标题
	mAuthor            = TbMainRs("Author")           '拟制人
	mFileDate          = TbMainRs("FileDate")         '拟制日期
	mCXQXBZ            = TbMainRs("CXQXBZ")		  '报表查询权限标志
	mCXQX              = TbMainRs("CXQX")		  '报表查询权限
	mZFBZ              = TbMainRs("ZFBZ")		  '报表作废标志
	'------------------------------------------------
    end if
	TbMainRs.Close
	Set TbMainRs=Nothing
%>

<html>
<head>
<title>报表办理</title>
<link rel='stylesheet' type='text/css' href='../css/main.css'>
<script src="../js/iweboffice_func.js" type="text/javascript"></script>
<script src="../js/Popup.js"></script>
<script src="../js/front_chec.js"></script>
<script language="javascript">
//检查是否必填
function require(form){
	return  checnull(form.FLH,"请填选择档案目录!")&&
		checnull(form.viewer,"请设置档案查询权限!") &&
		checnull(form.File_Save,"请填写档案保存期限!")&&
		confirm('确定要修改该条报表归档信息吗?');
}

function doSel_Cx(sCxqx,sCxqxsz){
	url = "../inc/SelectQx.asp?cxqx="+sCxqx+"&cxqxsz="+sCxqxsz
	k=showModalDialog(url,"","dialogWidth:510px;status:no;dialogHeight:60px")
	if (k!="") {
		k=k.split("_")
		if (k[0]!="0"){
			webform.viewer.value=k[2].replace(/ /g,"\n")
			webform.input_CXQX.value=k[1]
			webform.input_CXQXBZ.value=k[0]
		}else{
			webform.viewer.value='全部人员'
			webform.input_CXQX.value=k[1]
			webform.input_CXQXBZ.value=k[0]
		}
	}
}
</script>
</head>

<body topmargin="10" leftmargin="10">
<table width=98% class=tabletoolbar border=0 align=center>
	<tr valign=center><td align=left nowrap><img src="../images/icon_title.gif" align="absmiddle"> 修改报表归档信息</td>
	<td align=right valign=bottom nowrap>
	</td></tr>
</table>
<hr width="100%" size=1 color="#000000">
<br>
<form name="webform" method="post" action="Document_File_Save.asp" OnSubmit="return require(this)">
<input type=hidden name=RecordID value="<%=mRecordID%>">
<table border=0 cellspacing='1' cellpadding='2' align=center class="tab">
  <tr>
    <td align="right" class="tdBottom">报表种类:</td>
    <td class="tdBottom">
      <input type=text name='DC_Doc_Sort' size='8' value="<%=htmlout(GetTableValue("tbioaOffice_Document_Sort","doc_sort","id",mDC_Doc_Sort))%>" class="inputreadonly" readonly>
      报表类型:<input type=text name='DocType' value="<%=mDocType%>" size=8 class="inputreadonly" readonly>
      <input  type="text" name='DocMod' size='8' value="<%=mDocMod%>" class="inputreadonly" readonly>
      报表密级:
      <input type=text name='DC_Doc_Security' size='8' value="<%=mDC_Doc_Security%>" class="inputreadonly" readonly>
    </td>
  </tr>
  <tr>
    <td align="right" class="tdBottom">报表文号:</td>
    <td class="tdBottom"><input type="text" name="DocFileNo" size="25" maxlength="15" value="<%=mDocFileNo%>" class="inputreadonly" readonly></td>
  </tr>
  <tr>
    <td  align="right" class="tdBottom">报表标题:</td>
    <td  class="tdBottom"><input type="text" name="Subject" size="75" maxlength="150" value="<%=mSubject%>" class="inputreadonly" readonly></td>
  </tr>
  <tr>
    <td align=right class="tdBottom">类别目录:</td>
    <td class="tdBottom">
	<select id=FLH name=FLH>
		<%=pOptions2("tbioaDocument_Sort","LMMC",0,mFLH,"","SJFLH")%>
	</select>
    </td>
  </tr>
  <tr>
    <td class="td1" align="right" valign="_top" nowrap>查询权限:
      <img src="../images/selectman.gif" border="0" onclick="doSel_Cx(webform.input_CXQX.value,webform.input_CXQXBZ.value)" style="cursor:hand">
    </td>
    <td class="td1"><textarea rows="7" name="viewer" cols=75" class="textarea" readonly><%=ShowNames(mCXQXBZ,mCXQX)%></textarea>
      <input type=hidden name="input_CXQXBZ" value="<%=mCXQXBZ%>">
      <input type=hidden name="input_CXQX" value="<%=mCXQX%>">
    </td>
  </tr>
  <tr>
    <td align=right class="tdBottom">归档人:</td>
    <td class="tdBottom">
    	<input type=text name="File_Man_Name" value="<%=getusername(mFile_Man)%>" class="inputreadonly" readonly>
    	<input type=hidden name="File_Man" value="<%=LoginID%>" class="inputreadonly" readonly>
    	归档时间:<input type=text name="File_Date" value="<%=now()%>" class="inputreadonly" readonly size="20" >
    	保存日期:<input type=text name="File_Save" value="<%=mFile_Save%>" class="input" size="9" readonly>
    	<a href=# title="选择日期" onClick="fPopUpDlg('../js/calendar.htm', document.webform.File_Save, 'winpop', 234, 261);return false"><img src="../images/datetime.gif" border=0></a>
    </td>
  </tr>
  <tr>
    <td  class="tdBottom" colspan=2 align=center>
	<input type="submit" value="修改" class="button0" onmouseout=className="button0" onmouseover=className="button1">
	<input type="button" value="恢复为待归档状态" onclick="if(confirm('确定要恢复该条报表归档信息为待归档吗?')) window.location.href='Document_File_ReSave.asp?RecordID=<%=mRecordID%>&FLH=<%=mFLH%>'" class="button0" onmouseout=className="button0" onmouseover=className="button1">
	<%if not mZFBZ then%>
	<input type="button" value="作废" onclick="if(confirm('确定要作废该条报表吗?')) window.location.href='Document_File_Repeal.asp?RecordID=<%=mRecordID%>&ZFBZ=1'" class="button0" onmouseout=className="button0" onmouseover=className="button1">
	<%else%>
	<input type="button" value="恢复" onclick="if(confirm('确定要恢复该条报表吗?')) window.location.href='Document_File_Repeal.asp?RecordID=<%=mRecordID%>&ZFBZ=0'" class="button0" onmouseout=className="button0" onmouseover=className="button1">
	<%end if%>
	<input type="button" value="返回" class="button0" onmouseout=className="button0" onmouseover=className="button1" onclick="history.back()">
    </td>
  </tr>
</table>
</form>

</body>
</html>

<%'释放对象变量
<!--#include file="../inc/conn_close.asp"-->
%>

<%
Function pOptions2(TableName,Field,ParentID,Selected,Heads,ParentField)
'递归下拉菜单(表名,字段名,选中字段ID,起始字段ID,分割头,存放上级栏目ID的字段名)-----
	set rs_sort=Server.CreateObject("ADODB.RecordSet")
	sql="select * from "& TableName &" where "&ParentField&" = '"& ParentID &"' order by FLH"
	rs_sort.open sql,oConn,1,1
	while not rs_sort.EOF '循环
		if Selected="" then Selected="0"
		if Return_Sort_Manage(rs_sort("GDQXBZ"),rs_sort("FLH"),"GDQX",TableName) then
			if rs_sort("FLH")= Selected then
				response.write "<option value='"&rs_sort("FLH")&"' selected>"& Heads & rs_sort(Field)&"</option>" & vbcrlf
			else
				response.write "<option value='"&rs_sort("FLH")&"'>"& Heads & rs_sort(Field)&"</option>" & vbcrlf
			end if
		end if

		Call pOptions2(TableName,Field,rs_sort("FLH"),Selected,Heads&rs_sort(Field)&"/",ParentField)
	rs_sort.MoveNext: wend
	rs_sort.close
End Function

Function ShowNames(smod,sid)
	if not smod then ShowNames="全部人员"

	dim sql,str
	if smod=1 then
		sql="select * from tbioaDepartment where ID in (" + sid + ")"
		set rs_ShowNames=oConn.execute(sql)
		while not rs_ShowNames.EOF '循环
			str=str + htmlout(rs_ShowNames("name")) + vbcrlf
			rs_ShowNames.MoveNext
		wend
		rs_ShowNames.close
		ShowNames=str
	elseif smod=2 then
		sql="select a.*,b.name	from tbioaRole a,tbioaDepartment b where a.department=b.id and a.id in (" + sid + ")"
		set rs_ShowNames=oConn.execute(sql)
		while not rs_ShowNames.EOF '循环
			str=str + htmlout(rs_ShowNames("name")) + "/" + htmlout(rs_ShowNames("rolename")) + vbcrlf
			rs_ShowNames.MoveNext
		wend
		rs_ShowNames.close
		ShowNames=str
	end if
End Function

''''''''''''''''''''''返回当前用户是否有操作权限'''''''''''''''''''''
Function Return_Sort_Manage(managemod,ArchivesID,SField,STable)
''''''''''''''''''''''列表类型,id号,查找字段,查找表名
'返回用户是否有管理/查看权限
dim i
if ArchivesID<>"" and IsNumeric(ArchivesID) then
	select case managemod		'管理/查看列表类型  0:所有用户 1:部门2:职务
		case "0"
			Return_Sort_Manage=true
		case "1"
			TmpSQL="select "&SField&" from " & STable & " where FLH='"&ArchivesID&"'"	'取得管理/查看权限
			set TmpRS=Server.CreateObject("ADODB.RecordSet")
			TmpRS.open TmpSQL,oconn,1,1
			if TmpRS.eof then
				TmpRS=close
				set TmpRS=nothing
				Return_Sort_Manage=false
			else
				ManageStr=TmpRS(SField)
				TmpRS.close
				set TmpRS = nothing
				if len(ManageStr)>0 then
					if Instr(1,","&ManageStr&",",","&session("DepID")&",", 1)>0 then '判断管理/查看权限中是否包含有当前用户部门ID
						Return_Sort_Manage=true
					else
						Return_Sort_Manage=false
					end if
				else
					Return_Sort_Manage=false
				end if
			end if
		case "2"
			TmpSQL="select "&SField&" from " & STable & " where FLH='"&ArchivesID&"'"	'取得管理/查看权限
			set TmpRS=Server.CreateObject("ADODB.RecordSet")
			TmpRS.open TmpSQL,oconn,1,1
			if TmpRS.eof then
				Return_Sort_Manage=false
			else
				ManageStr=TmpRS(SField)
				TmpRS=close
				TmpSQL="select roleID from tbioaUser where id="&session("LoginID")	'取得当前用户职务
				set TmpRS=Server.CreateObject("ADODB.RecordSet")
				TmpRS.open TmpSQL,oconn,1,1
				if TmpRS.eof then
					TmpRS.close
					set TmpRS=nothing
					Return_Sort_Manage=false
				else
					RoleArr=split(TmpRS("RoleID"),",")
					TmpRS.close
					set TmpRS=nothing
					Return_Sort_ManageR=false
					for i=0 to UBound(RoleArr)
						if instr(1,","&ManageStr&",",","&RoleArr(i)&",")>0 then	'判断管理/查看权限中是否包含有当前用户职务
							Return_Sort_ManageR=true
						end if
					next
					Return_Sort_Manage=Return_Sort_ManageR
				end if
			end if
		case else
			Return_Sort_Manage=false
	end select
else
	Return_Sort_Manage=false
end if
end Function
'-----------------------------------------------------------
%> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -