📄 punish.asp
字号:
<!-- #include file="conn/logors.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name=description content="<%=site_title%>" >
<meta name=keyword content="<%=site_title%>">
<title><%=site_title%></title>
</head>
<%=styletext%>
<DIV class=menuskin id=popmenu
onmouseover="clearhidemenu();highlightmenu(event,'on')" style="Z-INDEX: 100"
onmouseout="highlightmenu(event,'off');dynamichide(event)"></DIV><!--顶部表格-->
<SCRIPT language=JavaScript src="style/main.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function DoSubmit(value)
{
document.regform.submit();
}
function select()
{
var values;
with(document.creator.types)
{
values = options[selectedIndex].value;
}
for(i = 0;i < itemarray.length;i ++)
{
if (itemarray[i].value== values)
{
loca3 = (itemarray[i].lsitems).split("#");
for(j = 0;j < loca3.length;j++)
{
with(document.creator.userid)
{
length = loca3.length;
temparraya=loca3[j].split("@");
options[j].text = temparraya[0];
options[j].value =temparraya[1];
}
}
break;
}
}
}
function init()
{
with(document.creator.types)
{
length = itemarray.length;
for(k=0;k<itemarray.length;k++)
{
options[k].text =itemarray[k].text;
options[k].value =itemarray[k].value;
}
selectedIndex=0;
}
with(document.creator.userid)
{
loca3 = (itemarray[0].lsitems).split("#");
length = loca3.length;
for(l=0;l<length;l++)
{
temparrayb=(loca3[0]).split("@");
options[l].text = temparrayb[0];
options[l].value = temparrayb[1];
}
selectedIndex=0;
}
}
function comefrom(text,value,lsitems)
{
this.text = text;
this.value= value;
this.lsitems = lsitems;
}
function OnSubmitCheck()
{
if(document.creator.userid.selectedIndex==0)
{
alert("请选择被处罚员工!");
return false;
}
if(!dochange(document.creator.amerce))
return false;
return true;
}
function dochange(object)
{
var i,strText,s;
s=object.value;
strText="请输入正确值,必须用阿拉伯数字填写";
for (i = 0; i < s.length; i++)
{
// Check that current character is number.
var c = s.charAt(i);
if (!(((c >= "0") && (c <= "9")) || c == "."))
{
object.focus();
window.alert(strText);
return false;
}
}
return true;
}
//-->
</SCRIPT>
<%
set rs = Server.CreateObject("ADODB.Recordset")
set rsitem = Server.CreateObject("ADODB.Recordset")
sql="select * from cci_dept"
rs.open sql,connObj,1,1
sumcount=rs.recordcount
i=0
if sumcount>0 then
response.Write "<script language=javascript>" & chr(13) & "var itemarray = new Array(" & rs.recordcount+1 & ");"& chr(13)
response.Write "itemarray[0]=new comefrom(""请选择部门"",0,""请选择员工@0""); "& chr(13)
i=1
else
response.Write "<script language=javascript>" & chr(13) & "var itemarray = new Array(2);"& chr(13)
response.Write "itemarray[0]=new comefrom(""请选择部门"",""0"",""请选择员工@0""); "& chr(13)
i=1
end if
do while not rs.eof
response.Write "itemarray[" & i & "]=new comefrom(""" & rs("deptname") & """," & rs("id") & ",""请选择员工@0"
sql="select id,name from cci_user where deptid=" & rs("id")
rsitem.open sql,connObj,1,1
do while not rsitem.eof
response.Write "#" & rsitem("name") & "@" & rsitem("id")
rsitem.movenext
loop
i=i+1
response.Write """);"& chr(13)
rsitem.close
rs.movenext
loop
rs.close
response.Write "</script>"
%>
<body onload="init()">
<table width="750" height="200" align="center">
<tr>
<td height="97" align="center" class=TableTitle2>
<!-- #include file="sitehead.asp" -->
</td>
</tr>
<tr>
<td align="center" colspan="2" class="tablebody1">
<% navigation_flag=6 %>
<!-- #include file="func_navigationbar.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" height="66" valign="top"> <!-- #include file="func_menulist.asp" --></td>
<td valign="top">
<!-- #include file="func_verify.asp" -->
<%
dim sumcount,saveserial
if request("saveflag")<>"" then
dim msg
saveserial=1
msg=""
if trim(request("memo"))="" then
msg=saveserial & "、请输入处罚事实说明!<br>"
saveserial=saveserial+1
end if
if request("wfid")="" then
msg=msg & saveserial & "、请选择发起工作流!<br>"
saveserial=saveserial+1
end if
if saveserial<=1 then
maxid=getmaxid(request("wfid"))
set rspunish = Server.CreateObject("ADODB.Recordset")
sql="select * from cci_oa_punish"
rspunish.open sql,connobj,3,3
rspunish.addnew
rspunish("wfid")=maxid
rspunish("destdeptid")=request("types")
rspunish("destuserid")=request("userid")
rspunish("userid")=session("userid")
rspunish("deptid")=session("deptid")
rspunish("memo")=request("memo")
rspunish("amerce")=cdbl(request("amerce"))
rspunish("InDate")=now
rspunish.update
rspunish.close
sql="select * from cci_oa_flowlist where id="& maxid
rs.open sql,connobj,3,3
if not rs.eof then
rs("title")="关于"& session("name") & "的『处罚录入』"
rs.update
end if
rs.close
response.redirect "message.asp?rediurl=defaultA.asp&msgurl=首页&msginfo=处罚录入操作成功!请耐心等待领导审批!"
end if
response.Write("<div align=center><font color=#FF0000>" &msg & "</font></div>")
end if
%>
<table width="100%" align="center" cellpadding="1" cellspacing="1" class=tableborder1>
<form name="creator" method="post" action="" onSubmit="return OnSubmitCheck()">
<tr >
<th height="25" colspan="4" align="center" class=TopLighNav>处罚通知单</th>
</tr>
<tr>
<td width="150" align="center" class=TopLighNav><b>部门</b></td>
<td width="100" class=TopLighNav><select name=types onChange = "select()"></select></td>
<td width="100" align="center" class=TopLighNav><b>姓名</b></td>
<td class=TopLighNav><select name="userid"></select></td>
</tr>
<tr >
<td class=tablebody1 align="center"><b>处罚金额</b></td>
<td colspan="3" class=tablebody1 align="left"><input name="amerce" type="text" id="amerce" size="10">
<font color="#FF0000">*</font>(元)</td>
</tr>
<tr >
<td class=tablebody1 align="center"><b>事实说明</b></td>
<td colspan="3" class=tablebody1 align="left"><textarea name="memo" cols="75" rows="8" id="reason"></textarea><font color="#FF0000">*</font></td>
</tr>
<tr >
<td class=tablebody1 align="center"><b>工作流发起</b></td>
<td colspan="3" class=tablebody1 align="left"><select name="wfid">
<%
sql="select * from cci_oa_wfdefine where taskid=10"
Rs.Open Sql,connObj,1,1
do while not rs.eof
response.Write "<option value=" & rs("id") & ">" & rs("wfname")& "</option>"
rs.movenext
loop
rs.close
%></select>
</td>
</tr>
<tr>
<td colspan="4" align="center" class=tablebody1><input type="submit" name="Submit" value=" 申 请 "></td>
</tr>
<input type=hidden name=saveflag value="1">
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="tablebody1">
<!-- #include file="sitefloor.asp" --> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -