📄 sign5.asp
字号:
<%option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/config.inc" -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/debug.inc" -->
<!-- #include file="../include/db.inc" -->
<!-- #include file="../include/date.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/security.inc" -->
<!-- #include file="../common/commonpage.inc" -->
<%
'call CheckSecurity()
dim fid : fid = GetParam("fid")
if IsEmpty(fid) then
Response.Clear()
Server.Transfer("sign.asp")
Response.End
end if
if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
OpinionMaintain()
else
OpinionTable()
End If
%>
<html>
<head>
<title>上海信息大楼 Shanghai Information Tower</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../common/common.css" type="text/css">
<script language="VBScript">
Sub btnSubmit_OnClick()
if document.all.flowform.opinion.value = "" then
msgbox "请填写审批意见!"
exit sub
end if
document.all.flowform.submit()
End Sub
</script>
</head>
<br>
<br>
</body>
</html>
<%
'===========================================================
' Useful Functions
'-----------------------------------------------------------
Sub OpinionTable()
Response.write("<center>")
Response.write("<form name=flowform method=""post"" action='sign5.asp?fid="&fid&"'>")
Response.write("<table cellspacing=0 cellpadding=0 border=0 align=center width=500 class=tblDashed>")
Response.write("<tr height=60><td class=tblTitle align=center><marquee width=400>填 写 审 批 意 见</marquee></td></tr>")
dim crs
set crs = New CRecordset
dim strSQL
dim rs
strSQL = "select flow_stat from t_flow where flow_id=" & fid
set rs = crs.open(dbLocal,strSQL)
if CINT(rs("flow_stat")) <> 1 Then
response.write ("<tr><td class=noborder align=center>当前状态不能填写审批意见!!</textarea></td></tr></table>")
rs.Close()
exit sub
end If
set crs = New CRecordset
strSQL = "select step_op_person from t_flow_step b, t_cur_step c where b.step_no=c.cur_step and b.flow_id=c.flow_id and b.flow_id=" & fid
set rs = crs.open(dbLocal,strSQL)
If rs("step_op_person") <> GetEmpSerial Then
response.write ("<tr><td class=noborder align=center>流程已经交由下一领导审批,不能重复填写审批意见!!</textarea></td></tr></table>")
crs.Close()
exit sub
end If
strSQL="select opinion from t_flow_opinion a,t_cur_step b"
strSQL=strSQL & " where a.flow_id=b.flow_id and a.step_no=b.cur_step "
strSQL=strSQL & " and a.flow_id=" & fid
rs.close()
set rs = crs.open(dbLocal,strSQL)
response.write("<tr><td class=noborder align=center><textarea name=""opinion"" rows=8 cols=60 style=""font-size:11pt;border:solid;border-width:1px;border-color:gray gray gray gray"">")
If Not Rs.eof Then
Response.Write(Rs("opinion"))
End If
Response.write("</textarea></td></tr>")
Response.write("<tr height=40px><td class=noborder align=center><input type=button name=btnSubmit value=""确认审批"" class=FlatBtn> <input type=reset value=""重新输入"" class=FlatBtn></td></tr>")
response.write("</table>")
response.write("</center>")
crs.Close()
End Sub
Sub OpinionMaintain()
Dim fid: fid=GetParam("fid")
dim crs
set crs = New CRecordset
dim strSQL
dim sid,sid_all
strSQL="select cur_step from t_cur_step where flow_id=" & fid
dim rs : set rs = crs.open(dbLocal,strSQL)
sid=rs("cur_step")
rs.Close
strSQL="select opinion from t_flow_opinion "
strSQL= strSQL & "where flow_id= " & Request.QueryString("fid")
strSQL=strSQL & " and step_no=" & sid
set rs = crs.open(dbLocal,strSQL)
If Rs.eof Then
strSQL="insert into t_flow_opinion"
strSQL=strSQL & " (opinion,step_no,flow_id) values ('"
strSQL=strSQL & GetParam("opinion") &"'," & sid &","
strSQL=strSQL & fid & ")"
Else
strSQL="update t_flow_opinion"
strSQL=strSQL & " set opinion='" & GetParam("opinion")
strSQL=strSQL & "' where flow_id=" & fid
strSQL=strSQL & " and step_no=" & sid
End If
dim sError:sError=ExecuteSQL(dbLocal,strSQL)
if sError <> "" then
Response.Write "<script language=""javascript"">alert('对不起,审批出错!')</script>"
exit sub
Else
Response.Clear()
rs.close()
strSQL="select count(*) num from t_flow_step where flow_id=" & Request.QueryString("fid")
set rs=crs.open(dbLocal,strSQL)
response.write("<center>")
response.write("<marquee width=400 behavior=alternate>审批成功!!</marquee><br><br><br>")
sid_all=Rs("num")
If sid>1 Then
response.write("<a href='up.asp?fid="&fid&"'><img border=0 src=""image/up.gif"" alt=""上一步"">上一步</a>")
End If
If sid<=sid_all Then
response.write("<a href='down.asp?fid="&fid&"'><img border=0 src=""image/down.gif"" alt=""下一步"">下一步</a>")
End If
end if
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -