📄 add.asp
字号:
<!--#include file ="date.asp"-->
<!--#include file ="conn.asp"-->
<style type="text/css">
<!--
.STYLE2 {font-size: 18px}
.STYLE3 {
font-size: 18px;
font-weight: bold;
color: #FFFFFF;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
body {
background-color: #ECF2FF;
margin-left: 0px;
margin-right: 0px;
}
.STYLE5 {
font-size: 12px;
color: #000055;
}
.STYLE18 {font-size: 16}
.STYLE19 {font-size: 12px}
.STYLE25 {font-size: 14px; font-weight: bold; }
.STYLE26 {color: #FF0000}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<BODY leftmargin="10" topmargin="0">
<p align="center" class="STYLE2">
<table width="100%" height="35" border="0" background="image/top.gif" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><span class="STYLE3">新增客户</span></div></td>
</tr>
</table>
<% if request("action")="save" then
name=request.Form("name")
set rr=server.CreateObject("adodb.recordset")
wwdsql="select * from company where name='"&name&"'"
rr.open wwdsql,conn,1,1
if not rr.eof then
response.Write "<br><br>公司已有此客户资料,请勿重复添加!<br><br>"
else
set rr=server.CreateObject("adodb.recordset")
wwdsql="select * from company"
rr.open wwdsql,conn,1,3
rr.addnew
rr("date")=request.form("date")
rr("seller")=request.form("seller")
rr("share")=request.form("share")
rr("name")=request.form("name")
rr("short")=request.form("short")
rr("area")=request.form("area")
rr("address")=request.form("address")
rr("tel")=request.form("tel")
rr("fax")=request.form("fax")
rr("www")=request.form("www")
rr("post")=request.form("post")
rr("bus")=request.form("bus")
rr("nature")=request.form("nature")
rr("des")=request.form("des")
rr("source")=request.form("source")
rr("cate")=request.form("cate")
rr("total")=request.form("total")
rr("high")=request.form("high")
rr("last_time")=request.Form("last_time")
rr("last_num")=request.Form("last_num")
rr("last_hos")=request.Form("last_hos")
rr("last_price")=request.Form("last_price")
rr("depart")=request.Form("depart")
rr("charge")=request.Form("charge")
rr("charge_post")=request.Form("charge_post")
rr("charge_phone")=request.Form("charge_phone")
rr("charge_tel")=request.Form("charge_tel")
rr("charge_mail")=request.Form("charge_mail")
rr("second")=request.Form("second")
rr("second_post")=request.Form("second_post")
rr("second_tel")=request.Form("second_tel")
rr("third")=request.Form("third")
rr("third_post")=request.Form("third_post")
rr("third_tel")=request.Form("third_tel")
rr("remark")=request.form("remark")
rr.update
%>
<br><br>保存成功!请立即
<input type="button" name="Submit" value="添加跟踪记录" onClick="location.href='follow.asp?id=<%=rr("id")%>'">
<br><br>
<% end if
else%>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function VerifyInput() {
if (form1.seller.value == "")
{
alert(" 销售员姓名不能为空!");
form1.seller.focus();
return (false);
}
if (form1.source.value == "")
{
alert(" 客户来源不能为空!");
form1.source.focus();
return (false);
}
if (form1.share.value == "")
{
alert(" 是否共享不能为空!");
form1.share.focus();
return (false);
}
if (form1.cate.value == "")
{
alert(" 客户类别不能为空!");
form1.cate.focus();
return (false);
}
if (form1.name.value == "")
{
alert(" 客户名称不能为空!");
form1.name.focus();
return (false);
}
if (form1.short.value == "")
{
alert(" 客户简称不能为空!");
form1.short.focus();
return (false);
}
if (form1.short.value.length>6 )
{
alert("客户简称最长6个汉字! !");
form1.short.focus();
return (false);
}
if (form1.area.value == "")
{
alert(" 所属区域不能为空!");
form1.area.focus();
return (false);
}
if (form1.bus.value == "")
{
alert(" 所属行业不能为空!");
form1.bus.focus();
return (false);
}
if (form1.nature.value == "")
{
alert(" 企业性质不能为空!");
form1.nature.focus();
return (false);
}
return true;
//submit();
}
//-->
</SCRIPT>
<form name="form1" method="post" action="add.asp?action=save" onSubmit="return VerifyInput();">
<input name="date" type="text" value="<%=date()%>" style="display:none" >
<p align="center">
<table width="579" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="28" colspan="4" background="image/headerbg.gif"><span class="STYLE25">基本信息</span></td>
</tr>
<tr>
<td height=28 width="80" ><span class="STYLE19">销售员:</span></td>
<td width="200"><select name="seller">
<option value="">姓 名</option>
<% branch="营销部"
ddStr = "Select cname From che Where branch='"&branch&"'"
Set dd=Conn.Execute(ddStr)
Do While Not dd.Eof
if session("cname")=dd(0) then
Response.Write "<option value="& dd(0) &" selected>"& dd(0) & "</option>"
else
Response.Write "<option value="& dd(0) &">"& dd(0) & "</option>"
end if
dd.MoveNext
Loop
%>
</select>
<span class="STYLE19"><span class="STYLE26">*</span></span></td>
<td height="28"><span class="STYLE19">客户来源:</span></td>
<td><select name="source">
<option value="" selected ></option>
<option value="朋友介绍">朋友介绍</option>
<option value="黄页查找">黄页查找</option>
<option value="网络查找">网络查找</option>
<option value="客户上门">客户上门</option>
<option value="客户介绍">客户介绍</option>
<option value="陌生拜访">陌生拜访</option>
</select>
<span class="STYLE19"><span class="STYLE26">*</span></span></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -