📄 func_device.asp
字号:
<SCRIPT LANGUAGE="JavaScript">
<!--
function CheckInput()
{
if(!dochange(document.theform.Quotient))
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>
<!-- #include file="func_verify.asp" -->
<%
dim sumcount,saveserial
set rs = Server.CreateObject("ADODB.Recordset")
if request("saveflag")<>"" then
dim msg
saveserial=1
msg=""
if trim(request("memo"))="" then
msg=msg & saveserial & "、请输入请假事由!<br>"
saveserial=saveserial+1
end if
if trim(request("SendDeptID"))="" then
msg=msg & saveserial & "、请选择主送部门!<br>"
saveserial=saveserial+1
end if
if trim(request("Quotient"))="" then
msg=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"))
sql="select * from cci_oa_device"
rs.open sql,connobj,3,3
rs.addnew
rs("wfid")=maxid
rs("userid")=session("userid")
rs("deptid")=session("deptid")
rs("senddeptid")=request("senddeptid")
rs("memo")=trim(request("memo"))
rs("indate")=now
rs("Quotient")=trim(request("Quotient"))
rs.update
rs.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="theform" method="post" action="" onSubmit="return CheckInput()">
<tr >
<th height="25" colspan="6" align="center" class=TopLighNav>计算机设备申领单</th>
</tr>
<tr>
<td width="90" align="center" class=TopLighNav><b>部门</b></td>
<td width="100" align="center" class=TopLighNav><%
sql="select deptname from cci_dept where id=" & session("deptid")
rs.open sql,connobj,1,1
if not rs.eof then
response.Write rs("deptname")
end if
rs.close
%></td>
<td width="80" align="center" class=TopLighNav><b>姓名</b></td>
<td width="80" align="center" class=TopLighNav><%=session("name")%></td>
<td width="80" align="center" class=TopLighNav><b>职务</b></td>
<td align="center" class=TopLighNav><%
sql="select stationname from cci_station where id=" & session("stationid")
rs.open sql,connobj,1,1
if not rs.eof then
response.Write rs("stationname")
end if
rs.close
%></td>
</tr>
<tr >
<td class=tablebody1 align="center"><b>事由</b></td>
<td colspan="5" class=tablebody1 align="left"><textarea name="memo" cols="75" rows="8"></textarea></td>
</tr>
<tr >
<td class=tablebody1 align="center"><b>主送部门</b></td>
<td class=tablebody1 align="left"><select name="SendDeptID"><%
sql="select * from cci_dept"
rs.open sql,connobj,1,1
do while not rs.eof
if session("deptid")=rs("id") then
response.Write "<option value=" & cstr(rs("id")) & " selected>" & rs("deptname") & "</option>"
else
response.Write "<option value=" & cstr(rs("id")) & ">" & rs("deptname") & "</option>"
end if
rs.movenext
loop
rs.close
%></select>
</td>
<td class=tablebody1 align="center"><b>份数</b></td>
<td colspan="3" class=tablebody1 align="left"><input name="Quotient" type="text" size="10">
(份) </td>
</tr>
<tr >
<td class=tablebody1 align="center"><b>工作流发起</b></td>
<td colspan="5" class=tablebody1 align="left"><select name="wfid">
<%
sql="select * from cci_oa_wfdefine where taskid=12"
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="6" align="center" class=tablebody1><input type="submit" name="Submit" value=" 申 请 "></td>
</tr>
<input type=hidden name=saveflag value="1">
</form>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -