📄 supplier.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp"-->
<html>
<head>
<title>∷企业生产管理信息系统:.</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<SCRIPT language=javascript src="js/selectcity.js"></script>
<script language="JavaScript" src="js/validate.js" type="text/JavaScript"></script>
<SCRIPT language=javascript src="css/init.js"></SCRIPT>
<style type="text/css">
<!--
td { font-family: "宋体"; font-size: 9pt}
body { font-family: "宋体"; font-size: 9pt}
select { font-family: "宋体"; font-size: 9pt}
A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt}
-->
</style>
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(myform)
{
if (myform.Supplier_name.value == "")
{
alert("供应单位名称不能为空!");
myform.Supplier_name.focus();
return (false);
}
if (myform.Contact_person.value == "")
{
alert("联系人不能为空!");
myform.Contact_person.focus();
return (false);
}
if (myform.adr.value == "")
{
alert("单位地址不能为空!");
myform.adr.focus();
return (false);
}
if (myform.Condition.value == "")
{
alert("邮政编码不能为空!");
myform.Condition.focus();
return (false);
}
if (myform.tel.value == "")
{
alert("电话号码不能为空!");
myform.tel.focus();
return (false);
}
if (myform.zhanghao.value == "")
{
alert("银行帐号不能为空!");
myform.zhanghao.focus();
return (false);
}
if (myform.kaipiaosh.value == "")
{
alert("开票税号不能为空!");
myform.kaipiaosh.focus();
return (false);
}
}
function SelectAll() {
for (var i=0;i<document.selform.selBigClass.length;i++) {
var e=document.selform.selBigClass[i];
e.checked=!e.checked;
}
}
//-->
</script>
</HEAD>
<BODY topMargin=0 rightMargin=0 leftMargin=0>
<!--#include file="top.asp"--><% dim sql,rs
select case request("action")
case "add"
call SaveAdd()
case "modify"
call SaveModify()
case "del"
call delCate()
case "edit"
isEdit=True
call myform(isEdit)
case "view"
isEdit=True
call myform(isview)
case else
isEdit=False
call myform(isEdit)
end select
sub SaveAdd
set rs=server.createobject("adodb.recordset")
sql="select * from Supplier"
rs.open sql,conn,1,3
rs.addnew
rs("Supplier_name") = trim(request.Form("Supplier_name"))
rs("Contact_person") = trim(request.Form("Contact_person"))
rs("adr") = trim(request.Form("adr"))
rs("tel") = trim(request.Form("tel"))
rs("yinhang") = trim(request.Form("yinhang"))
rs("zhanghao") = trim(request.Form("zhanghao"))
rs("Facsimile") = trim(request.Form("Facsimile"))
rs("Condition") = trim(request.Form("Condition"))
rs("kaipiaosh") = trim(request.Form("kaipiaosh"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('添加成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=Supplier.asp"">"
response.end
rs.close
set rs=nothing
end sub
sub SaveModify
set rs=server.createobject("adodb.recordset")
sql="select * from Supplier where id="&request.Form("id")
rs.open sql,conn,1,3
rs("Supplier_name") = trim(request.Form("Supplier_name"))
rs("Contact_person") = trim(request.Form("Contact_person"))
rs("adr") = trim(request.Form("adr"))
rs("tel") = trim(request.Form("tel"))
rs("yinhang") = trim(request.Form("yinhang"))
rs("zhanghao") = trim(request.Form("zhanghao"))
rs("Facsimile") = trim(request.Form("Facsimile"))
rs("Condition") = trim(request.Form("Condition"))
rs("kaipiaosh") = trim(request.Form("kaipiaosh"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('修改成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=Supplier.asp"">"
response.end
rs.close
set rs=nothing
end sub
sub delCate()
conn.execute("delete from Supplier where id in ("&Request.Form("selBigClass")&")")
response.Write "<script language=javascript>alert('删除成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=Supplier.asp"">"
response.end
end sub
%>
<% sub myform(isEdit) %>
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
<TR>
<td align="center" valign="top">
<%if oskey="supper" or oskey="yuanliao" or oskey="cailiao" then%>
<%
set rs=server.createobject("adodb.recordset")
if isedit then
rs.open "select * from Supplier where id=" & request("id"),conn,1,1
%>
<table width="800" border="0" cellpadding="0" cellspacing="0" >
<tr >
<td height=26 background="images/background.gif">
<b><font color="#ffffff">编辑供货单位信息</font></b>
</td>
</tr>
</table>
<%
else
%>
<table width="800" border="0" cellpadding="0" cellspacing="0" >
<tr >
<td height=26 background="images/background.gif">
<b><font color="#ffffff">添加供货单位信息</font></b>
</td>
</tr>
</table>
<%end if %>
<table width="800" border="0" cellpadding="0" cellspacing="0" bordercolor="#0055E6">
<tr class="but">
<td colspan="2" width="240" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">单位名称</td>
<td width="150" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">联系人</td>
<td width="220" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">单位地址</td>
<td width="190" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">邮政编码</td>
</tr>
<form name="reg" method="post" action="Supplier.asp" onSubmit="return Juge(this)" >
<tr> <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else %>add<% End If %>'>
<% If isedit then%><input type="Hidden" name="id" value="<%=rs("id")%>"> <% End If %>
<td colspan="2" height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but1'" onMouseOut="this.className='but11'">
<input name="Supplier_name" type="text" size="30" value='<% if isedit then
response.write rs("Supplier_name")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but1'" onMouseOut="this.className='but11'"><input name="Contact_person" type="text" size="10" value='<% if isedit then
response.write rs("Contact_person")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but1'" onMouseOut="this.className='but11'"><input name="adr" type="text" size="20" value='<% if isedit then
response.write rs("adr")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but1'" onMouseOut="this.className='but11'"><input name="Condition" type="text" size="15" value='<% if isedit then
response.write rs("Condition")
end if %>'></td>
</tr>
<tr class="but">
<td width="120" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">电话号码</td>
<td width="120" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">传真号码</td>
<td width="150" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">开户银行</td>
<td width="220" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">银行帐号</td>
<td width="190" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">开票税号</td>
</tr>
<tr>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="tel" type="text" size="15" value='<% if isedit then
response.write rs("tel")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="Facsimile" type="text" size="15" value='<% if isedit then
response.write rs("Facsimile")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><select name="yinhang" size="1" style='width:100'>
<% if isedit then%><option ><%=rs("yinhang")%></option><%end if%>
<%
set rs3=server.createobject("adodb.recordset")
rs3.open "select * from yinhang",conn,1,1
if not rs3.eof then
do while not rs3.eof
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -