📄 office_userdj.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<%
if ChkAdmin("oa_office")=False then
call message("您没有管理办公用品的权限","back")
call endexit()
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<SCRIPT language=JavaScript src="../../inc/meizzDate.js"></SCRIPT>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
color: #FFFFFF;
font-weight: bold;
}
.style2 {color: #CC0000}
-->
</style>
</head>
<%
act=request.QueryString("act")
companyid=session("companyid")
productname=replace(trim(request.Form("productname")),"'","")
uname=trim(request.Form("uname"))
txt=replace(trim(request.Form("txt")),"'","")
num=replace(trim(request.Form("num")),"'","")
atime=trim(request.Form("atime"))
insql="insert into oa_officeuser(productname,uname,num,atime,txt,companyid) "& _
"values('"&productname&"','"&uname&"','"&num&"','"&atime&"','"&txt&"',"&companyid&")"
if act="add" then
'conn.execute(upsql)
conn.execute(insql)
call Message("信息增加成功","office_user.asp")
END IF
%>
<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
<form name="myform" method="post" action="office_userdj.asp?act=add" onSubmit="return CheckForm();">
<tr align="center">
<td height="25" colspan="2" bgcolor="#CC0000"><span class="style1">办公用品领用登记</span></td>
</tr>
<tr bgcolor="#F9F9F9">
<td width="13%" height="25" align="center"> <strong><img src="../img/item_point.gif" width="4" height="7"> 待领物品</strong></td>
<td width="87%" height="25" align="left"> </td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center">请选择产品</td>
<td height="25" align="left">
<select name="productname" id="productname">
<option value="">请选择产品</option>
<%
sql="select id, classname from oa_officeclass where companyid="&session("companyid")
set rs=conn.execute(sql)
do while not rs.eof
%>
<option value=""><%=trim(rs("classname"))%></option>
<%
fsql="select * from oa_offfice where classid="&rs(0)
set frs=conn.execute(fsql)
do while not frs.eof
%>
<option value="<%=trim(frs("office_name"))%>-<%=trim(frs("modle"))%>" style="color:#cc0000 ">--<%=frs("office_name")%>【现有库存:<%=frs("num")%><%=frs("unit")%>】</option>
<%
frs.movenext
loop
frs.close
set frs=nothing
%>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
<span class="style2">*</span></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"><strong><img src="../img/item_point.gif" width="4" height="7"> 领用信息</strong></td>
<td height="25" align="left"> </td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> 领用人</td>
<td height="25" align="left">
<select name="uname" id="uname">
<%
sql="select id, truename from oa_Admin where companyid="&session("companyid")
set rs=conn.execute(sql)
do while not rs.eof
%>
<option value="<%=trim(rs("truename"))%>"><%=rs("truename")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> 领用数量</td>
<td height="25" align="left"><input name="num" type="text" class="tabel1" id="num" value="1">
<span class="style2">*(输入数字)</span></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> 领用日期</td>
<td height="25" align="left"><input name="atime" type="text" class="tabel1" id="atime" value="<%=date()%>" onFocus="setday(this)">
<span class="style2">*</span></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> 备注 </td>
<td height="25" align="left"><textarea name="txt" cols="50" rows="5" class="tabel1" id="txt"></textarea></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> </td>
<td height="25" align="left"><input name="Submit2" type="submit" class="bon" value="提交">
<input name="Submit3" type="reset" class="bon" value="重置">
<span class="style1"><font style="font-size:15px ">
<input name="Submit" type="button" class="bon" value="返回" onClick="window.history.go(-1)">
</font></span></td>
</tr></form>
</table>
<%
set conn=nothing
%>
</body>
</html>
<script language="javascript">
function CheckForm()
{
var objFrm=document.myform;
if(objFrm.pid.value=="")
{
alert("请选择产品!");
objFrm.pid.focus();
return false;
}
if(objFrm.cgr.value=="")
{
alert("请输入采购人!");
objFrm.cgr.focus();
return false;
}
if(objFrm.price.value=="")
{
alert("请输入单价!");
objFrm.price.focus();
return false;
}
if(objFrm.num.value=="")
{
alert("请输入数量!");
objFrm.num.focus();
return false;
}
if(objFrm.buytime.value=="")
{
alert("请输入购买日期!");
objFrm.buytime.focus();
return false;
}
return true;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -