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

📄 addflow.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<%option explicit%>
<%
'----------------------------------------------------------------------
'---------------文件包含部分说明---------------------------------------
'----------------------------------------------------------------------
'---------------	使用数据库连接包含	DataEnvi.asp	---------------
'---------------	使用字符串包含	String.asp	-----------------------
'---------------	使用分页操作包含	Page.asp	-------------------
'----------------------------------------------------------------------
%>

<!--#include virtual ="/Include/DataEnvi.asp"-->
<!--#include virtual = "/Include/String.asp"-->
<!--#include virtual = "/Include/Page.asp"-->
<!--#include virtual="/Include/SelectValue.asp" -->
<%
	Dim objDB,objRS,strSQL
	Dim ExecuteID,PassType,IsNeed,IsEnd
	Dim SubmitOrder,LetMeEnd,strShowEnd
	Dim	flowName,intFlowID,CurrentFlowID,ParentID,NodeName
	Dim strShowPre,StrOptionExecute

	intFlowID		=	Request.QueryString("FlowIDFromEdit")
	if intFlowID="" then intFlowID=Request.Form("intFlowID")	
	
	
	Set objDB	=	server.CreateObject("ADODB.Connection")
	Set	objRS	=	server.CreateObject("ADODB.Recordset")
	OpenDB	objDB
	
	strSQL		=	"Select flowName from t_OA_Work_Flow Where ID="&intFlowID
	Response.Write strSQL
	objRS.Open strSQL,objDB,1,3
	if objRS.EOF then Response.End 
	flowName = objRS.Fields("flowName")
	Response.Write "flowName="&flowName
	objRS.Close()
	
	LetMeEnd	=	False
	SubmitOrder	=	Request.Form("SubmitOrder")
	IF SubmitOrder = "" Then 	SubmitOrder = 0
	SubmitOrder = SubmitOrder + 1
	
	NodeName	=	FixSQL(Request.Form("NodeName"))
	ExecuteID	=	Request.Form("ExecuteID")
	PassType	=	Request.Form("PassType")
	IsNeed		=	Request.Form("IsNeed")
	IsEnd		=	Request.Form("IsEnd")
'	intFlowID	=	Request.Form("intFlowID")
	ParentID	=	Request.form("CurrentFlowID")
	
	If Request.Form("isLastTime")	=	"True"	Then
		Response.Write "intFlowID="&intFlowID&"<br>"
		Response.Write "intFlowID="&Request.Form("intFlowID") &"<br>"
	'	Response.End 
		strSQL	=	"select IsValid	From t_OA_Work_Flow Where ID = " & Request.Form("intFlowID") 
		objRS.Open strSQL,objDB,1,3
		objRS.Fields("IsValid")	=	1
		objRS.Update()
		objRS.Close()
		Response.Write "<script language=javaScript>window.close()</script>"			'	在这里退出
	End If
	
	If SubmitOrder = 2 Then	
		strSQL		=	"select * from t_OA_Work_Flow_Node"
		objRS.Open strSQL,objDB,1,3
		objRS.AddNew()
		objRS.Fields("NodeName")	=	NodeName
		objRS.Fields("FlowID")		=	intFlowID
		objRS.Fields("ParentID")	=	0
		objRS.Fields("ExecuteID")	=	ExecuteID
		objRS.Fields("PassType")	=	PassType
		objRS.Fields("IsNeed")		=	IsNeed
		objRS.Fields("IsEnd")		=	IsEnd
		objRS.Update()
		CurrentFlowID	=	objRS.Fields("ID")
		objRS.Close()
		
		IF IsEnd	=	1	Then
			LetMeEnd	=	True
			strSQL	=	"Select * from t_OA_Work_Flow_Node where FlowID = " & IntFlowID & " Order By id "
			objRS.Open strSQL,objDB,1,3
			strShowEnd	=	""
			Do While Not objRS.EOF
				strShowEnd	=	strShowEnd	&	"<tr><td>"	&	objRS.Fields("ExecuteID")	&	"</td>"	&	vbcrlf
				strShowEnd	=	strShowEnd	&	"<td>"		&	objRS.Fields("PassType")	&	"</td>"	&	vbcrlf
				strShowEnd	=	strShowEnd	&	"<td>"		&	objRS.Fields("IsNeed")		&	"</td>"	&	vbcrlf
				strShowEnd	=	strShowEnd	&	"</tr>"
				objRS.MoveNext()
			Loop
			objRS.Close()
		End If
	End If
	
	If SubmitOrder > 2 Then	'以后提交只需操作一个表,添加一条记录		
		strSQL		=	"select * from t_OA_Work_Flow_Node"
		objRS.Open strSQL,objDB,1,3
		objRS.AddNew()
		objRS.Fields("NodeName")	=	NodeName
		objRS.Fields("FlowID")		=	intFlowID
		objRS.Fields("ParentID")	=	ParentID
		objRS.Fields("ExecuteID")	=	ExecuteID
		objRS.Fields("PassType")	=	PassType
		objRS.Fields("IsNeed")		=	IsNeed
		objRS.Fields("IsEnd")		=	IsEnd
		objRS.Update()
		CurrentFlowID	=	objRS.Fields("ID")
		objRS.Close()
		IF IsEnd	=	1	Then
			LetMeEnd	=	True
		End If
	End If

	StrOptionExecute = GetOption(ObjDB,"Select AccountID,TrueName From t_OA_SYS_Account_Character",0)
	If intFlowID<>"" Then
		strSQL	=	"select * from t_OA_Work_Flow_Node where FlowID	=	"	&	intFlowID
		objRS.Open strSQL,objDB,1,3
		strShowPre	=	""
		strShowPre	=	strShowPre	&	"<tr><td colspan=2><table width=100% border=0>"
		Do While Not objRS.EOF 
			strShowPre	=	strShowPre	&	"<tr><td>节点名称:" & objRS.Fields("NodeName")	&"</td>"
			strShowPre	=	strShowPre	&	"<td>处理人:" & objRS.Fields("ExecuteID")	&"</td>"
			
			if     objRS.Fields("PassType")=1 Then
				strShowPre	=	strShowPre	&	"<td>审核类型:审核</td>"
			elseif objRS.Fields("PassType")=0 then
				strShowPre	=	strShowPre	&	"<td>审核类型:阅读</td>"
			end if
			
			if     objRS.Fields("IsNeed") Then
				strShowPre	=	strShowPre	&	"<td>是否必须:是</td>"
			elseif Not objRS.Fields("IsNeed") then
				strShowPre	=	strShowPre	&	"<td>是否必须:否</td>"
			end if
			
			objRS.MoveNext()	
		Loop
		strShowPre	=	strShowPre	&	"</table></td></tr>"
		objRS.Close()
	End If
	
%>
<html>
<head>
<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
td,br,p,li {font-family:宋体;font-size:12px;}
A:link {text-decoration: none; color: 000080;font-size:12px}
A:visited {text-decoration: none; color: 000080;font-size:12px}
A:active {text-decoration: none;font-size:12px}
A:hover {text-decoration: underline; color: ff0000;font-size:12px}
A.a:link {text-decoration: none; color: 0000ff;font-size:16px}
A.a:visited {text-decoration: underline; color: 000080;font-size:16px}
A.a:active {text-decoration: none; font-size:16px}A.a:hover {text-decoration: underline; color: ff0000;font-size:16px}
</style>
<script language="javascript" src="../../../include/CheckForm.js">
</script>
<script language="javascript">
<!--
function CheckAll()  
{
	if(!CheckEmpty(thisForm.flowName, "工作流名称"))return false
	if(!CheckEmpty(thisForm.NodeName, "节点名称"))return false
	return true 
}	
-->
</script>

</head>


<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../../../images/fo_win2.gif','../../../images/hoster.gif','../../../images/ic_doc1.gif','../../../images/sc.gif','../../../images/find.gif','../../../images/fo_win3.gif')">
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="../../../images/3bg.gif" height="20">
  <tr> 
    <td>&nbsp; </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#C7DBE2">
  <tr> 
    <td height="23" width="85%"> 
      <div align="right"></div>
    </td>
    <td height="23" width="15%"> 
      <div align="right">2002年10月2日</div>
    </td>
  </tr>
</table>
<div align="center"><br>
  <table width="90%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td width="40%">&nbsp;</td>
      <td width="60%"> 
       
      </td>
    </tr>
  </table>
  <br>
  <form name="thisForm" onsubmit="return(CheckAll())" method="post" action="addFlow.asp">
   <table  width="60%" border="0" cellspacing="0" cellpadding="0" >
      <tr>
		<td width=40%>&nbsp</td>
		<td width=70%>&nbsp</td>
      </tr>
      <%IF NOT LetMeEnd THEN%>
      
      <tr align=center>
		<td>工作流名称:</td>
		<td><input name=flowName readonly value="<%=flowName%>"></td>
      </tr>
    
       <%=strShowPre%>
      <tr align=center height=70>
		<td colspan=2><B>请填写该工作流下一个节点的信息:</B></td>
      </tr>
     
      <tr align=center>
		<td colspan=2><HR></td>
      </tr>
       <tr align=center height=30>
		<td align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;节点名称:</td>
		<td align=left><input name=NodeName></td>
      </tr>
      <tr align=center height=30>
		<td align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;处理人:</td>
		<td align=left><select name=ExecuteID><%=StrOptionExecute%></select></td>
      </tr>
      <tr align=center height=30>
		<td align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;审核类型:</td>
		<td align=left>
			<select name=passType>
				<option value="1">审核</option>
				<option value="0">阅读</option>
			</select>
		</td>
      </tr>
      <tr align=center height=30>
		<td align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否必须</td>
		<td align=left>
			<input type=radio name=IsNeed value="1" checked>是
			<input type=radio name=IsNeed value="0">否
		</td>
      </tr>
       <tr align=center height=30>
		<td align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否为结束点</td>
		<td align=left>
			<input type=radio name=IsEnd value="1" >是
			<input type=radio name=IsEnd value="0" checked>否
		</td>
      </tr>
      <tr align=center height=30>
		<td colspan=2>
			<input type=submit value="确    定" id=submit1 name=submit1>
		</td>
      </tr>
      <input type=hidden name=IsSubmit value="True">
      <input type=hidden name=SubmitOrder value="<%=SubmitOrder%>">
      <input type=hidden name=intFlowID value="<%=intFlowID%>">
      <input type=hidden name= CurrentFlowID value="<%=CurrentFlowID%>">
  </form>
      <%ELSE%>
      <tr>
		<td colspan=2 align=center>
			<table width=100% border=0>
				<tr>
					<td width=70%>&nbsp</td>
					<td width=30%>&nbsp</td>
				</tr>
				<tr>
					<td colspan=2 align=center  height=80>
						<B>请确认你定义的工作流是否正确</B>
					</td>
				</tr>

				<tr>
					<td colspan=2>
						<HR>
					</td>
				</tr>
				<%=strShowPre%>
				<tr>
					<td colspan=2>
						<HR>
					</td>
				</tr>
				<Form action="" method="post" id=form1 name=form1>
					<input type=hidden name=isLastTime value="True">
					 <input type=hidden name=intFlowID value="<%=intFlowID%>">
					<tr>
					<td colspan=2 align=right>
						<input type=submit value="确    定" id=submit2 name=submit2>
					</td>
				</tr>
				</Form>
			</table>
		</tr>
      </tr>
      <%END IF%>
   </table>
   

  
</div>
</body>
</html>

⌨️ 快捷键说明

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