office_input.asp
来自「网络办公系统源码」· ASP 代码 · 共 188 行
ASP
188 行
<%@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")
pid=replace(trim(request.Form("pid")),"'","")
cgr=trim(request.Form("cgr"))
price=replace(trim(request.Form("price")),"'","")
num=replace(trim(request.Form("num")),"'","")
buytime=trim(request.Form("buytime"))
insql="insert into oa_officeinput(pid,cgr,price,num,buytime,companyid) "& _
"values("&pid&",'"&cgr&"',"&price&",'"&num&"','"&buytime&"',"&companyid&")"
upsql="update oa_offfice set num=num+"&num&" where id="&pid
if act="add" then
conn.execute(upsql)
conn.execute(insql)
call Message("发布成功","office_kc.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_input.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="pid" id="pid">
<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=""><%=rs("classname")%></option>
<%
fsql="select * from oa_offfice where classid="&rs(0)
set frs=conn.execute(fsql)
do while not frs.eof
%>
<option value="<%=frs("id")%>" 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"><span class="style2">
<select name="cgr" id="cgr" >
<option value="">选择员工</option>
<%
sql="select id, truename from oa_Admin where companyid="&session("companyid")
set rs=conn.execute(sql)
do while not rs.eof
%>
<option value="<%=rs("truename")%>"><%=rs("truename")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
*</span></td>
</tr>
<tr bgcolor="#F9F9F9">
<td height="25" align="center"> 单价</td>
<td height="25" align="left"><input name="price" type="text" class="tabel1" id="price">
<span class="style2">*(输入数字)</span></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="buytime" type="text" class="tabel1" id="buytime" 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"><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 + =
减小字号Ctrl + -
显示快捷键?