📄 kehu_add.asp
字号:
<!--#include file="../conn.asp"-->
<%
ckadd=douhao(trim(request("ckadd")))
coname=douhao(trim(request("coname")))
cocode=douhao(trim(request("cocode")))
cotype=douhao(trim(request("cotype")))
lxr=douhao(trim(request("lxr")))
tel=douhao(trim(request("tel")))
fax=douhao(trim(request("fax")))
email=douhao(trim(request("email")))
addr=douhao(trim(request("addr")))
pc=douhao(trim(request("pc")))
city=douhao(trim(request("city")))
hp=douhao(trim(request("hp")))
cqys=douhao(trim(request("cqys")))
bank=douhao(trim(request("bank")))
banknum=douhao(trim(request("banknum")))
meno=douhao(trim(request("meno")))
if ckadd<>"" then
set rs=server.createobject("adodb.recordset")
rs.open "select * from ht_kehu where coname='"&coname&"'",conn,1,1
if not rs.eof then
response.write "<script language='javascript'>alert('该记录已存在!请不要重复添加!');history.back();</script>"
response.end
else
end if
rs.close
set rs=nothing
end if
if ckadd="确定" then
conn.execute "insert into ht_kehu (coname,cocode,cotype,city,hp,cqys,lxr,tel,fax,email,addr,pc,bank,banknum,meno) values ('"&coname&"','"&cocode&"','"&cotype&"','"&city&"','"&hp&"','"&cqys&"','"&lxr&"','"&tel&"','"&fax&"','"&email&"','"&addr&"','"&pc&"','"&bank&"','"&banknum&"','"&meno&"')"
response.write "<script language='javascript'>window.opener.location.href = window.opener.location.href;window.close();</script>"
elseif ckadd="新增" then
conn.execute "insert into ht_kehu (coname,cocode,cotype,city,hp,cqys,lxr,tel,fax,email,addr,pc,bank,banknum,meno) values ('"&coname&"','"&cocode&"','"&cotype&"','"&city&"','"&hp&"','"&cqys&"','"&lxr&"','"&tel&"','"&fax&"','"&email&"','"&addr&"','"&pc&"','"&bank&"','"&banknum&"','"&meno&"')"
response.write "<script language='javascript'>window.opener.location.href = window.opener.location.href;</script>"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>基础资料维护--增加客户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/body.css" rel="stylesheet" type="text/css">
<link href="../css/test.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="00" marginwidth="0" marginheight="0">
<table width="100%" height="711" border="0" cellspacing="0">
<tr>
<td height="711" valign="top" class="borderon">
<table width="407" height="34" border="0" align="center">
<form action="kehu_add.asp" method="post" name="ck" id="ck">
<tr>
<td valign="top">
<table width="493" height="50" border="0" align="center">
<tr>
<td width="17%" height="25">单位名称:</td>
<td height="25" colspan="3">
<input name="coname" type="text" id="coname" size="30">
<font color="#FF0000">(*)</font></td>
</tr>
<tr>
<td height="25">代 码:</td>
<td width="22%" height="25">
<input name="cocode" type="text" id="cocode" size="12">
</td>
<td width="16%" height="25">
<div align="right">所属分类:</div></td>
<td width="45%" height="25">
<input name="cotype" type="text" id="cotype" size="15" readonly >
<img src="../images/hand.gif" width="14" height="14" class='button2' onClick="MM_openBrWindow('kehutype_select.asp','','width=500,height=350')"></td>
</tr>
</table>
<table width="511" border="0" align="center" cellspacing="0">
<tr>
<td width="402" align="center" valign="top"><table width="411" height="19" border="0" align="center" cellspacing="0">
<tr>
<td width="100" id="z1" height="19" class="b3" onClick="z1.className='b3';z2.className='b4';k1.style.display='inline';k2.style.display='none';">
<div align="center">基本信息</div></td>
<td width="100" id="z2" class="b4" onClick="z1.className='b4';z2.className='b3';k1.style.display='none';k2.style.display='inline';">
<div align="center">其它信息</div></td>
<td class="b4"> </td>
</tr>
</table>
<table width="411" border="0" align="center" cellspacing="0">
<tr>
<td width="486" valign="top" class="page">
<div id='k1'>
<table width="403" height="280" border="0" align="center">
<tr height="5">
<td height="5" colspan="2"></td>
</tr>
<tr>
<td width="84" height="25">
<div align="right">省份地区:</div></td>
<td width="309" height="25">
<input name="city" type="text" id="city" size="10" readonly>
<img src="../images/hand.gif" width="14" height="14" class='button2' onClick="MM_openBrWindow('area_select.asp','','width=500,height=300')"> </td>
</tr>
<tr>
<td width="84" height="25"> <div align="right">联
系 人:</div></td>
<td height="25"><input name="lxr" type="text" id="lxr" size="10">
<font color="#FF0000">(*)</font></td>
</tr>
<tr>
<td width="84" height="25"> <div align="right">联系电话:</div></td>
<td height="25"> <input name="tel" type="text" id="tel" size="20">
<font color="#FF0000">(*)</font> </td>
</tr>
<tr>
<td width="84" height="25"> <div align="right">手 机:</div></td>
<td height="25"> <input name="hp" type="text" id="hp" value="" size="20"></td>
</tr>
<tr>
<td width="84" height="25"> <div align="right">传 真:</div></td>
<td height="25"><input name="fax" type="text" id="fax" value="" size="20">
</td>
</tr>
<tr>
<td width="84" height="25"> <div align="right">E-mail:</div></td>
<td height="25"><input name="email" type="text" id="email" value="" size="20"></td>
</tr>
<tr>
<td width="84" height="25"> <div align="right">地 址:</div></td>
<td height="25"><input name="addr" type="text" id="addr" value="" size="35">
<font color="#FF0000">(*)</font></td>
</tr>
<tr>
<td width="84" height="25"> <div align="right">邮 编:</div></td>
<td height="25"><input name="pc" type="text" id="pc" size="10"></td>
</tr>
<tr>
<td width="84" height="25"> <div align="right">初期应收:</div></td>
<td height="25"><input name="cqys" type="text" id="cqys" size="10"></td>
</tr>
<tr>
<td height="10" colspan="2"> </td>
</tr>
</table>
</div>
<div id="k2" style="display:none;">
<table width="403" height="259" border="0" align="center">
<tr height="5">
<td height="5" colspan="2"></td>
</tr>
<tr>
<td height="18"> </td>
<td height="18"> </td>
</tr>
<tr>
<td width="84" height="35"> <div align="right">开户银行:</div></td>
<td width="309" height="35"> <input name="bank" type="text" id="bank" size="35" readonly>
<img src="../images/hand.gif" width="14" height="14" class='button2' onClick="MM_openBrWindow('bank_select.asp','','width=500,height=300')">
</td>
</tr>
<tr>
<td width="84" height="35"> <div align="right">银行帐号:</div></td>
<td height="35"> <input name="banknum" type="text" id="banknum" size="35"></td>
</tr>
<tr>
<td width="84" height="25"> <div align="right">备 注:</div></td>
<td height="25"> <textarea name="meno" cols="35" rows="6" id="meno"></textarea>
</td>
</tr>
<tr>
<td height="70" colspan="2"> </td>
</tr>
</table>
</div></td>
</tr>
</table></td>
<td width="105" valign="top"> <table width="75" height="119" border="0" align="center">
<tr>
<td height="23">
<div align="center"></div></td>
</tr>
<tr>
<td><div align="center">
<input name="ckadd" type="submit" id="ckadd" onClick="javascript:return check();" value=" 确定 ">
</div></td>
</tr>
<tr>
<td><div align="center">
<input type="button" name="Submit2" value=" 取消 " onClick="javascript:window.close();">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="ckadd" type="submit" id="ckadd" onClick="javascript:return check();" value=" 新增 ">
<script language="JavaScript">
function check(){
if (document.ck.coname.value==''){
alert('请输入单位名称!');
document.ck.coname.focus();
return false;
history.back();
}
if (document.ck.lxr.value==''){
alert('请输入联系人!');
if (k1.style.display='none'){
k1.style.display="inline";
z1.className='b3';
z2.className='b4';
k2.style.display='none';
}
document.ck.lxr.focus();
return false;
history.back();
}
if (document.ck.tel.value==''){
alert('请输入联系电话!');
if (k1.style.display='none'){
k1.style.display="inline";
z1.className='b3';
z2.className='b4';
k2.style.display='none';
}
document.ck.tel.focus();
return false;
history.back();
}
if (document.ck.addr.value==''){
alert('请输入地址!');
if (k1.style.display='none'){
k1.style.display="inline";
z1.className='b3';
z2.className='b4';
k2.style.display='none';
}
document.ck.addr.focus();
return false;
history.back();
}
return true;
}
</script>
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -