⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wuzi_edit.asp

📁 对学校物资管理系统的一份设计
💻 ASP
字号:
<!--#include file = "Startup.asp"-->
<!-- #include file="Function.asp" -->
<%
call adminer()
Call ComeUrl()
Call jifanggl()
%>
<%
dim id
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from cangku where id="&id
rs.open sql,oconn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="common.css" type="text/css" rel="stylesheet">
<title>无标题文档</title>
</head>
<script language=javascript>
function wuzisub(){
if (document.editform.bianhao.value==""){
alert("请填写物资编号!");
document.editform.bianhao.focus( ); 
document.editform.bianhao.select( ); 

return false
}

if(!isNumber(document.editform.bianhao.value)){
alert("物资编号填写不合法!\n请填写数字!");
document.editform.bianhao.focus( ); 
document.editform.bianhao.select( ); 
return false
}

if(document.editform.wzname.value==""){
alert("请填写物资名称!");
document.editform.wzname.focus( ); 
document.editform.wzname.select( ); 
return false
}
if(document.editform.danwei.value==""){
alert("请填写物资单位!");
document.editform.danwei.focus( ); 
document.editform.danwei.select( ); 
return false
}
if(document.editform.danjia.value==""){
alert("请填写物资单价!");
document.editform.danjia.focus( ); 
document.editform.danjia.select( ); 
return false
}
if(!isNumber(document.editform.danjia.value)){
alert("物资单价填写不合法!\n请填写数字!");
document.editform.danjia.focus( ); 
document.editform.danjia.select( ); 
return false
}
if(document.editform.gongyin.value==""){
alert("请填写物资供应商!");
document.editform.gongyin.focus( ); 
document.editform.gongyin.select( ); 
return false
}
if(document.editform.jbtime.value==""){
alert("请填写物资质保起始时间!");
document.editform.jbtime.focus( ); 
document.editform.jbtime.select( ); 
return false
}
if(document.editform.wzclass.value==""){
alert("请选择物资所属类别!");
document.editform.wzclass.focus( ); 
return false
}
if(document.editform.shcoolname.value==""){
alert("请选择物资所属校区!");
document.editform.shcoolname.focus( ); 
return false
}
if(document.editform.bmname.value=="" or document.editform.jfcode.value==""){
alert("请选择物资所属部门或是所属机房!");
document.editform.bmname.focus( ); 
return false
}
 if(document.editform.zhuangtai.value==""){
 alert("请选择物资状态!");
document.editform.zhuangtai.focus( ); 
 return false
 }
}

function isNumber(String)
{ 
var Letters = "1234567890"; //可以自己增加可输入值
var i;
var c;
if(String.charAt( 0 )=='-')
return false;
if( String.charAt( String.length - 1 ) == '-' )
return false;
for( i = 0; i < String.length; i ++ )
{
c = String.charAt( i );
if (Letters.indexOf???晩猠e??×???( c ) < 0)
return false;
}
return true;
}
</script>

<body>
<table width="100%" height="100%" border="0">
  <tr>
    <td align="center" valign="top"> <p>&nbsp;</p>
      <table width="80%" border="0">
        <tr>
          <td align="center">
<form action="wuzi_edit_save.asp?id=<%=id%>"  method="post" name="editform" id="editform" onSubmit="return wuzisub()" >              
              <table width="80%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
                <tr align="center" bgcolor="#E1E1E1"> 
                  <td colspan="2"><strong><font color="#FF0000">添 加 物 资 到 仓 库</font></strong></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td width="100">编号</td>
                  <td><input name="bianhao" type="text" id="bianhao" value="<%=rs("编号")%>"></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td>名称</td>
                  <td><input name="wzname" type="text" id="wzname" value="<%=rs("名称")%>"></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td>单位</td>
                  <td><input name="danwei" type="text" id="danwei" value="<%=rs("单位")%>"></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td>单价</td>
                  <td><input name="danjia" type="text" id="danjia" value="<%=rs("单价")%>"></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td>供应商</td>
                  <td><input name="gongyin" type="text" id="gongyin" value="<%=rs("供应商")%>"></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td>质保起始时间</td>
                  <td><input name="jbtime" type="text" id="jbtime" value="<%=rs("质保起始时间")%>">
                    填写格式:2005.10至2007.10</td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td>报修记录</td>
                  <td><input name="baoxiou" type="text" id="baoxiou" value="<%=rs("报修记录")%>"></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td bgcolor="#FFFFFF">借用记录</td>
                  <td bgcolor="#FFFFFF"> <input name="jieyon" type="text" id="jieyon" value="<%=rs("借用记录")%>"> 
                  </td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td bgcolor="#FFFFFF">所属类别</td>
                  <td bgcolor="#FFFFFF"><select name="wzclass" id="wzclass">
                      <option value="">请选择类别</option>
                      <%
						set rs2=server.createObject("adodb.recordset")
						sql2="select * from wuzi"
						rs2.open sql2,oconn,1,1
						do while not rs2.eof
						sex=rs2("物资名称")
						if sex=rs("所属分类") then 
						s="selected"
						else
						s=""
						end if
						response.write "<option "&s&" value="&sex&">"&sex&"</option>"
						rs2.movenext
						loop
						rs2.close
			         %>
                    </select></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td bgcolor="#FFFFFF">所属校区</td>
                  <td bgcolor="#FFFFFF"><select name="shcoolname" id="shcoolname">
                      <%
					  ssxq=trim(request("所属校区"))
					  if ssxq="" then
                        response.write "<option value=>请选择校区</option>"
						set rs2=server.createObject("adodb.recordset")
						sql2="select * from shcool_class"
						rs2.open sql2,oconn,1,1
						do while not rs2.eof
						sex=rs2("校区名称")
						if sex=rs("所属校区") then 
						s="selected"
						else
						s=""
						end if
						response.write "<option "&s&" value="&sex&">"&sex&"</option>"
						rs2.movenext
						loop
						rs2.close
					  else
						response.write "<option selected value="&ssxq&">"&ssxq&"</option>"
					  end if 
			         %>
                    </select></td>
                </tr>
                <%
   if session("userclass")<>3 then
	%>
                <tr bgcolor="#FFFFFF"> 
                  <td bgcolor="#FFFFFF">所属部门</td>
                  <td bgcolor="#FFFFFF"><select name="bmname" id="bmname">
                      <option value="">请选择部门</option>
                      <%
						set rs3=server.createObject("adodb.recordset")
						if ssxq<>"" then
						sql3="select * from bumen where 所属校区='"&ssxq&"'"
						else
						sql3="select * from bumen"
						end if 
						rs3.open sql3,oconn,1,1
						do while not rs3.eof
						sex=rs3("部门名称")
						if sex=rs("所属部门") then 
						s="selected"
						else
						s=""
						end if
						response.write "<option "&s&" value="&sex&">"&sex&"</option>"
						rs3.movenext
						loop
						rs3.close
			         %>
                    </select></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td bgcolor="#FFFFFF">所属办公室</td>
                  <td bgcolor="#FFFFFF"><select name="office" id="office">
                      <option value="">请选择办公室</option>
                      <%
						set rs3=server.createObject("adodb.recordset")
						if ssxq<>"" then
						sql3="select * from bumen where 所属校区='"&ssxq&"'"
						else
						sql3="select * from office"
						end if 
						rs3.open sql3,oconn,1,1
						do while not rs3.eof
						sex=rs3("办公室名称")
						if sex=rs("所属办公室") then 
						s="selected"
						else
						s=""
						end if
						response.write "<option "&s&" value="&sex&">"&sex&"</option>"
						rs3.movenext
						loop
						rs3.close
			         %>
                    </select></td>
                </tr>
                <%end if%>
                <tr bgcolor="#FFFFFF"> 
                  <td bgcolor="#FFFFFF">所属机房</td>
                  <td bgcolor="#FFFFFF"><select name="jfcode" id="select2">
                      <%
					  jfbh=trim(request("机房编号"))
					  if jfbh="" then
					    response.write "<option value=>请选择机房</option>"
						set rs4=server.createObject("adodb.recordset")
						sql4="select * from jifang"
						rs4.open sql4,oconn,1,1
						do while not rs4.eof
						sex=rs4("机房编号")
						if sex=rs("所属机房") then 
						s="selected"
						else
						s=""
						end if
						response.write "<option "&s&" value="&sex&">"&sex&"</option>"
						rs4.movenext
						loop
						rs4.close
					  else
						response.write "<option selected value="&jfbh&">"&jfbh&"</option>"
					  end if 
			         %>
                    </select></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td>状态</td>
                  <td><select name="zhuangtai" id="select3">
                      <option value="">请选择状态</option>
                      <%
						set rs5=server.createObject("adodb.recordset")
						sql5="select * from 状态"
						rs5.open sql5,oconn,1,1
						do while not rs5.eof
						sex=rs5("状态")
						if sex=rs("状态") then 
						s="selected"
						else
						s=""
						end if
						response.write "<option "&s&" value="&sex&">"&sex&"</option>"
						rs5.movenext
						loop
						rs5.close
			         %>
                    </select></td>
                </tr>
                <tr align="center" bgcolor="#CCCCCC"> 
                  <td colspan="2"><font color="#FF0000">以下为主机配置表单,非主机物资可不填写</font></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>CPU</td>
                  <td><input name="cpu" type="text" id="cpu" value="<%=rs("cpu")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>主板</td>
                  <td><input name="zhuban" type="text" id="zhuban" value="<%=rs("主板")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>硬盘</td>
                  <td><input name="disk" type="text" id="disk" value="<%=rs("硬盘")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>内存</td>
                  <td><input name="leicuen" type="text" id="leicuen" value="<%=rs("内存")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>显卡</td>
                  <td><input name="xianka" type="text" id="xianka" value="<%=rs("显卡")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>显示器</td>
                  <td><input name="xianshiqi" type="text" id="xianshiqi" value="<%=rs("显示器")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>声卡</td>
                  <td><input name="shenka" type="text" id="shenka" value="<%=rs("声卡")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>网卡</td>
                  <td><input name="wangka" type="text" id="wangka" value="<%=rs("网卡")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>机箱</td>
                  <td><input name="jixiang" type="text" id="jixiang" value="<%=rs("机箱")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>光驱/刻录机/DVD</td>
                  <td><input name="cdrom" type="text" id="cdrom" value="<%=rs("光驱")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>音箱</td>
                  <td><input name="yinxiang" type="text" id="yinxiang" value="<%=rs("音箱")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>键盘</td>
                  <td><input name="jianpan" type="text" id="jianpan" value="<%=rs("键盘")%>"></td>
                </tr>
                <tr bgcolor="#F6F6F6"> 
                  <td>鼠标</td>
                  <td><input name="shubiao" type="text" id="shubiao" value="<%=rs("鼠标")%>"></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td>备注</td>
                  <td><textarea name="beizhu" cols="30" rows="5" id="beizhu"><%=rs("备注")%></textarea></td>
                </tr>
                <tr align="center" bgcolor="#FFFFFF"> 
                  <td colspan="2"> <input type="submit" name="Submit" value="提交"> 
                    &nbsp;&nbsp; <input type="reset" name="Submit2" value="重置"> 
                  </td>
                </tr>
              </table>
            </form></td>
        </tr>
      </table>
      <p>&nbsp;</p> </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -