📄 cus_addform.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<!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;
}
.style4 {color: #CC0000}
-->
</style>
</head>
<%
id=replace(request("id"),"'","")
act=request("act")
'基本信息
projectid=replace(trim(request.form("projectid")),"'","")
uname=replace(trim(request.form("uname")),"'","")
uid=session("adminid")
gdtime=replace(trim(request.form("gdtime")),"'","")
gdfs=replace(trim(request.form("gdfs")),"'","")
content=replace(trim(request.form("content")),"'","")
cusid=replace(trim(request.form("cusid")),"'","")
companyid=session("companyid")
gname=replace(trim(request.form("gname")),"'","")
sql="insert into oa_cus_form(cusid,projectid,uname,uid,gname,gdtime,gdfs,content,companyid) "& _
"values("&cusid&","&projectid&",'"&uname&"',"&uid&",'"&gname&"','"&gdtime&"','"&gdfs&"','"&content&"',"&companyid&")"
upsql="update oa_cus_form set projectid="&projectid&",uname='"&uname&"',mobile='"&mobile&"',tel='"&tel&"',fax='"&fax&"',email='"&email&"',qq='"&qq&"' where id="&request.Form("modid")
if act="add" then
conn.execute(sql)
call message("添加成功","cus_formlist.asp?cusid="&cusid&"")
call exitend()
elseif act="edit" then
conn.execute(upsql)
call message("修改成功","cus_formlist.asp?cusid="&cusid&"")
call exitend()
end if
%>
<body>
<%
if act="" then
%>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
<tr align="center">
<td height="25" bgcolor="#CC0000"><span class="style1">跟单信息设置</span></td>
</tr>
<form name="myform" method="post" action="cus_addform.asp?act=add" onSubmit="return CheckForm();">
<tr bgcolor="#F9F9F9">
<td height="25" align="center"><table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" colspan="2" align="left"> <strong>跟单信息 </strong> </td>
</tr>
<tr>
<td width="62%" align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD> 所属项目</TD>
<TD><select name="projectid" id="projectid">
<option value="">请选择项目</option>
<%
sql="select id, title,cusid from oa_cus_project where companyid="&session("companyid")
set rs=conn.execute(sql)
do while not rs.eof
cusid=rs(2)
%>
<option value="<%=rs("id")%>"><%=rs("title")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select></TD>
</TR>
<TR>
<TD WIDTH=117> 跟单日期 </TD>
<TD WIDTH=453><input name="gdtime" type=text class="tabel1" id="gdtime" value="<%=date()%>" size="10" maxlength="10" onFocus="setday(this)">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD> 联系人 </TD>
<TD><input name="uname" type=text class="tabel1" id="uname" maxlength="12">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD> 跟单方式 </TD>
<TD> <span class="style4">
<select name="gdfs" id="gdfs">
<option value="上门" selected>上门</option>
<option value="电话">电话</option>
</select>
*</span></TD>
</TR>
<TR>
<TD> 跟单内容 </TD>
<TD><textarea name="content" cols="30" rows="5" class="tabel1" id="content"></textarea></TD>
</TR>
<TR>
<TD> 跟单人 </TD>
<TD><input name="gname" type="text" class="tabel1" id="gname" value="<%=session("truename")%>" maxlength="11" readonly="true" ></TD>
</TR>
</TABLE></td>
<td width="38%" align="left" valign="top"> </td>
</tr>
<tr>
<td height="25" colspan="2" align="left"><input name="Submit" type="submit" class="tabel1" value="提交">
<input name="Submit2" type="reset" class="tabel1" value="重置">
<input name="cusid" type="hidden" id="cusid" value="<%=cusid%>"></td>
</tr>
</table></td>
</tr>
</form>
</table>
<%
elseif act="edits" then
msql="select cusid,uname,mobile,tel,fax,email,qq,b.cus_name from oa_cus_contact as a inner join oa_crm_cus as b on a.cusid=b.id where a.id="&id
set rs=conn.execute(msql)
if not rs.eof then
cusid1=trim(rs(0))
uname1=trim(rs(1))
mobile1=trim(rs(2))
tel1=trim(rs(3))
fax1=trim(rs(4))
email1=trim(rs(5))
qq1=trim(rs(6))
cus_name1=trim(rs(7))
end if
rs.close
set rs=nothing
%>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
<tr align="center">
<td height="25" bgcolor="#CC0000"><span class="style1">跟单信息修改</span></td>
</tr>
<form name="myform" method="post" action="cus_addcontact.asp?act=edit" onSubmit="return CheckForm();">
<tr bgcolor="#F9F9F9">
<td height="25" align="center"><table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" colspan="2" align="left"><b>联系人信息</b></td>
</tr>
<tr>
<td width="62%" align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD> 所属客户</TD>
<TD><select name="cusid" id="cusid">
<option value="<%=cusid1%>" selected><%=cus_name1%></option>
<option value="">请选择客户</option>
<%
sql="select id,cus_name from oa_crm_cus where uid="&session("adminid")
set rs=conn.execute(sql)
do while not rs.eof
%>
<option value="<%=rs(0)%>"><%=rs(1)%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select></TD>
</TR>
<TR>
<TD WIDTH=117>联系人姓名</TD>
<TD WIDTH=453><input name="uname" type=text class="tabel1" id="uname" maxlength="10" value="<%=uname1%>">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD>手机</TD>
<TD><input name="mobile" type=text class="tabel1" id="mobile" maxlength="12" value="<%=mobile1%>">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD>电话</TD>
<TD><input name="tel" type=text class="tabel1" id="tel" value="<%=tel1%>">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD>传真</TD>
<TD><input name="fax" type=text class="tabel1" id="fax" value="<%=fax1%>"></TD>
</TR>
<TR>
<TD>QQ</TD>
<TD><input name="qq" type=text class="tabel1" id="qq" maxlength="11" value="<%=qq1%>"></TD>
</TR>
<TR>
<TD>E-Mail</TD>
<TD><input name="email" type=text class="tabel1" id="email" value="<%=email1%>" ></TD>
</TR>
</TABLE></td>
<td width="38%" align="left" valign="top"> </td>
</tr>
<tr>
<td height="25" colspan="2" align="left"><input name="Submit" type="submit" class="tabel1" value="修改">
<input name="Submit2" type="reset" class="tabel1" value="重置">
<input name="modid" type="hidden" id="modid" value="<%=id%>"></td>
</tr>
</table></td>
</tr>
</form>
</table>
<%end if%>
</body>
</html>
<script language="javascript">
function CheckForm()
{
var objFrm=document.myform;
if(objFrm.projectid.value=="")
{
alert("请选镇项目!");
objFrm.projectid.focus();
return false;
}
if(objFrm.uname.value=="")
{
alert("请输入联系人姓名!");
objFrm.uname.focus();
return false;
}
if(objFrm.content.value=="")
{
alert("请输入跟单内容!");
objFrm.content.focus();
return false;
}
return true;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -