📄 editaddnode.asp
字号:
<%option explicit%>
<!--#include virtual = "/Include/DataEnvi.asp"-->
<!--#include virtual = "/Include/String.asp"-->
<!--#include virtual = "/Include/Page.asp"-->
<!--#include virtual = "/Include/Function.asp"-->
<!--#include virtual = "/Include/SelectValue.asp" -->
<!--#include file = "Function.asp" -->
<%
Dim objDB,objRS,strSQL,NodeID,NodeRS,C,IntRows
Dim ExecuteID,PassType,IsNeed,IsEnd,FlowObjRS
Dim SubmitOrder,LetMeEnd,strShowEnd
Dim flowName,intFlowID,CurrentFlowID,ParentID,NodeName
Dim strShowPre,StrOptionExecute,IsAllPass
Set objDB = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
OpenDB objDB
intFlowID = Request.QueryString("ID")
LetMeEnd = False
if Request.Form.Count > 0 then
NodeID = FixSQL(Request.Form("Location"))
NodeName = FixSQL(Request.Form("NodeName"))
ExecuteID = Request.Form("ExecuteID")
PassType = Request.Form("PassType")
IsNeed = Request.Form("IsNeed")
IsEnd = Request.Form("IsEnd")
IsAllPass = Request.form("IsAllPass")
If PassType = "" Then PassType = 0
If IsNeed = "" Then IsNeed = 0
If IsEnd = "" Then IsEnd = 0
If IsAllPass = "" Then IsAllPass = 0
StrSQL = "Select ParentID, ChildID From t_OA_Work_Flow_Node Where id = " & NodeID
Set NodeRS = ObjDB.Execute(StrSQL)
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") = NodeRS("ParentID")
objRS.Fields("ChildID") = NodeID
objRS.Fields("ExecuteID") = ExecuteID
objRS.Fields("PassType") = PassType
objRS.Fields("IsNeed") = IsNeed
objRS.Fields("IsEnd") = 0
objRS.Fields("IsAllPass") = IsAllPass
objRS.Update()
CurrentFlowID = objRS.Fields("ID")
objRS.Close()
StrSQL = "Update t_OA_Work_Flow_Node Set ChildID = " & CurrentFlowID & " Where ID = " & NodeRS("ParentID")
'Response.Write StrSQL
ObjDB.Execute(StrSQL)
StrSQL = "Update t_OA_Work_Flow_Node Set ParentID = " & CurrentFlowID & " Where ID = " & NodeID
ObjDB.Execute(StrSQL)
IF IsEnd = 1 Then
LetMeEnd = True
End If
%>
<script language=javascript>
parent.parent.IframeMain.location="index.asp"
</script>
<%
End if
StrOptionExecute = GetOption(ObjDB,"Select AccountID,TrueName From t_OA_SYS_Account_Character",0)
Sub Main()
%>
<form name="thisForm" onsubmit="return(CheckForm(this))" method="post" action="">
<!-------------工作流名称显示区域--------------------------------->
<table class=Ltable cellspacing=1 cellpadding=3>
<tr class=LHtr>
<td width=20%>新增节点</td>
<td width=80%></td>
</tr>
</table>
<!--------------------------------------------------------------->
<!-------------工作流流程图显示区域--------------------------------->
<%
If intFlowID<>"" Then
%>
<table class=Ltable cellspacing=1 cellpadding=3>
<tr>
<td>
<table><tr>
<td><%Call DrawNode("起始节点","创建人",1,0,2)%></td>
<td><img src="<%=Application("RootPath")%>Images/OA/Work/Flow/Next.gif"></td>
<%
Dim i, RS, ChildID
i = 0
strSQL = "select * from t_OA_Work_Flow_Node where FlowID = " & intFlowID
objRS.Open strSQL,objDB,1,3
Do While Not objRS.EOF
if i = 0 then
StrSQL = "Select * From t_OA_Work_Flow_Node Where FlowID = " & FixSQL(intFlowID) & " and ParentID = 0 "
Set RS = ObjDB.Execute(StrSQL)
ChildID = RS("ChildID")
else
StrSQL = "Select * From t_OA_Work_Flow_Node Where ID = " & ChildID
Set RS = ObjDB.Execute(StrSQL)
ChildID = RS("ChildID")
end if
%>
<td><%Call DrawNode(FixStr(RS("NodeName")),Replace(GetTrueNames(ObjDB,RS("ExecuteID")),Vbcrlf,"<br>"),RS("IsAllPass"),RS("PassType"),RS("IsNeed"))%></td>
<td><img src="<%=Application("RootPath")%>Images/OA/Work/Flow/Next.gif"></td>
<%
i = i + 1
objRS.MoveNext()
Loop
objRS.Close()
'RS.Close()
%>
<td><%Call DrawNode("结束节点","归档人",1,0,2)%></td>
</tr></table>
</td>
</tr>
</table>
<%
End If
%>
<!--------------------------------------------------------------->
<!-------------新增加工作流节点显示区域--------------------------------->
<%
If Not LetMeEnd Then
%>
<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><input name=NodeName class=Input Check=1 Show="节点名称"></td>
</tr>
<tr class=Ltr>
<td>插入位置</td>
<td>
<%
i = 0
strSQL = "select * from t_OA_Work_Flow_Node where FlowID = " & intFlowID
objRS.Open strSQL,objDB,1,3
Response.Write "<select name='Location' style='width:133px'>"
Response.Write "<option value=0> ---请 选 择--- </option>"& Chr(10)
'Response.Write "<OPTION value=1>" & IntRows & "</OPTION>" & Chr(10)
Do While Not objRS.EOF
if i = 0 then
StrSQL = "Select * From t_OA_Work_Flow_Node Where FlowID = " & FixSQL(intFlowID) & " and ParentID = 0 "
Set RS = ObjDB.Execute(StrSQL)
ChildID = RS("ChildID")
else
StrSQL = "Select * From t_OA_Work_Flow_Node Where ID = " & ChildID
Set RS = ObjDB.Execute(StrSQL)
ChildID = RS("ChildID")
end if
Response.Write "<OPTION value=" & RS("ID") & ">" & RS("NodeName") & "</OPTION>" & Chr(10)
i = i + 1
objRS.MoveNext()
Loop
Response.Write "</select>"
%>
<font size=3>前</font></td>
</tr>
<tr class=Ltr>
<td valign=top>处理人</td>
<td><select name=ExecuteID class=Input multiple size=10 Check=1 Show="处理人"><%=StrOptionExecute%></select></td>
</tr>
<tr class=Ltr>
<td></td>
<td>
<input type=Checkbox name=passType value="1" checked>需要审核(处理人明确给出通过或者不通过)<br>
<input type=Checkbox name=IsNeed value="1" checked>需要等待本节点处理后才流向下个节点<br>
<input type=Checkbox name=IsAllPass value="1" >需要节点内所有人员处理<br>
<input type=CheckBox name=IsEnd value="1">结束点
</td>
</tr>
</table>
<input type=submit class=button value="确 定"><input class=button type=button value="返 回" onclick="window.location.href='list.asp'">
</form>
<%
End if
End Sub
%>
<!--#include file ="Templet.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -