📄 cus_inputht.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<%
if ChkAdmin("oa_addcusht")=False then
call message("您没有添加合同的权限","back")
call endexit()
end if
%>
<!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>
<%
num="HT"&year(now())&month(now())&day(now())&second(now())&minute(now())
act=request("act")
id=replace(request("id"),"'","")
'基本信息
projectid=replace(trim(request.form("projectid")),"'","")
pro_num=replace(trim(request.form("pro_num")),"'","")
pro_title=replace(trim(request.form("pro_title")),"'","")
pro_money=replace(trim(request.form("pro_money")),"'","")
pro_tk=replace(trim(request.form("pro_tk")),"'","")
pro_sale=replace(trim(request.form(" pro_sale")),"'","")
pro_time1=replace(trim(request.form("pro_time1")),"'","")
pro_time2=replace(trim(request.form("pro_time2")),"'","")
pro_time3=replace(trim(request.form("pro_time3")),"'","")
pro_company=replace(trim(request.form("pro_company")),"'","")
pro_qname=replace(trim(request.form("pro_qname")),"'","")
pro_time=replace(trim(request.form("pro_time")),"'","")
companyid=session("companyid")
adduid=session("adminid")
sql="insert into oa_cus_ht(projectid,pro_num,pro_title,pro_money,"& _
"pro_tk,pro_sale,pro_time1,pro_time2,pro_time3,"& _
"pro_company,pro_qname,pro_time,companyid) "& _
"values("&projectid&",'"&pro_num&"','"&pro_title&"','"&pro_money&"'" &_
",'"&pro_tk&"','"&pro_sale&"','"&pro_time1&"','"&pro_time2&"','"&pro_time3&"'"& _
",'"&pro_company&"','"&pro_qname&"','"&pro_time&"',"&companyid&")"
upsql="update oa_crm_cus set cus_num='"&cus_num&"',cus_name='"&cus_name&"',cus_hangye='"&cus_hangye&"',cus_comefrom='"&cus_comefrom&"',"& _
"cus_contactname='"&uname&"',cus_contactmobile='"&mobile&"',cus_contactphone='"&phone&"',cus_contactfax='"&fax&"',cus_contactemail='"&email&"',"& _
"cus_address='"&cus_address&"',cus_post='"&cus_post&"',cus_url='"&cus_url&"',cus_txt='"&cus_txt&"' where id="&request.Form("modid")
if act="add" then
conn.execute(sql)
call message("添加成功","cus_ht.asp")
call exitend()
elseif act="edit" then
if ChkAdmin("oa_managecus")=False then
call message("您没有管理客户信息的权限","back")
call endexit()
end if
conn.execute(upsql)
if ChkAdmin("oa_manageht")=False then
call message("您没有管理合同的权限","back")
call endexit()
end if
call message("修改成功","cus_ht.asp")
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_inputht.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" align="left"> <strong>合同信息</strong> </td>
<td height="20" align="left"> </td>
</tr>
<tr>
<td align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD> <strong>项目信息 </strong> </TD>
<TD><select name="projectid" id="projectid">
<option value="">请选择项目</option>
<%
sql="select id, title from oa_cus_project where companyid="&session("companyid")
set rs=conn.execute(sql)
do while not rs.eof
%>
<option value="<%=rs("id")%>"><%=rs("title")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select></TD>
</TR>
<TR>
<TD WIDTH=72> 合同编号 </TD>
<TD WIDTH=300><input name="pro_num" type=text class="tabel1" id="pro_num" value="<%=num%>" >
<span class="style4">*</span></TD>
</TR>
<TR>
<TD> 合同标题 </TD>
<TD WIDTH=300><input name="pro_title" type=text class="tabel1" id="pro_title" size="40" >
<span class="style4">*</span></TD>
</TR>
<TR>
<TD> 合同金额 </TD>
<TD> <input name="pro_money" type=text class="tabel1" id="pro_money" ></TD>
</TR>
<TR>
<TD> 签约时间 </TD>
<TD><input name="pro_time" type=text class="tabel1" id="pro_time" value="<%=date()%>" onFocus="setday(this)"></TD>
</TR>
</TABLE></td>
<td align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD WIDTH=72> 生效日 </TD>
<TD WIDTH=300> <span class="style4">
<input name="pro_time1" type=text class="tabel1" id="pro_time12" maxlength="12" onFocus="setday(this)">
*</span></TD>
</TR>
<TR>
<TD>有效期至</TD>
<TD> <span class="style4">
<input name="pro_time2" type=text class="tabel1" id="pro_time22" maxlength="10" onFocus="setday(this)">
*</span></TD>
</TR>
<TR>
<TD> 免费维护期至 </TD>
<TD><input name="pro_time3" type=text class="tabel1" id="15" onFocus="setday(this)">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD> 工程实施机构 </TD>
<TD><input name="pro_company" type=text class="tabel1" id="pro_company" ></TD>
</TR>
<TR>
<TD>签约人</TD>
<TD><select name="pro_qname" id="pro_qname">
<%
sql="select truename from oa_Admin where companyid="&session("companyid")&" "
set rs=conn.execute(sql)
do while not rs.eof
%>
<option value="<%=rs(0)%>"><%=rs("truename")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
<span class="style4">*</span></TD>
</TR>
</TABLE></td>
</tr>
<tr>
<td align="left"> 主要条款 </td>
<td align="left"> 售后条款 </td>
</tr>
<tr>
<td align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD><textarea name="pro_tk" cols="50" rows="7" class="tabel1" id="pro_tk"></textarea></TD>
</TR>
</TABLE></td>
<td align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD colspan="2"><textarea name="pro_sale" cols="50" rows="7" class="tabel1" id="pro_sale"></textarea></TD>
</TR>
</TABLE></td>
</tr>
<tr>
<td width="47%" height="25" align="left"> </td>
<td width="53%" align="left"><input name="Submit" type="submit" class="tabel1" value="提交">
<input name="Submit2" type="reset" class="tabel1" value="重置"></td>
</tr>
</table></td>
</tr>
</form>
</table>
<%
elseif act="edits" then
sql="select a.*,b.truename from oa_crm_cus as a inner join oa_admin as b on a.uid=b.id where a.id="&id
set rs=conn.execute(sql)
if not rs.eof then
'基本信息
cus_num1=trim(rs("cus_num"))
cname=trim(rs("cus_name"))
hangye=trim(rs("cus_hangye"))
comefrom=trim(rs("cus_comefrom"))
'联系人信息
uname=trim(rs("cus_contactname"))
mobile=trim(rs("cus_contactmobile"))
phone=trim(rs("cus_contactphone"))
fax=trim(rs("cus_contactfax"))
email=trim(rs("cus_contactemail"))
'单位信息
address=trim(rs("cus_address"))
post=trim(rs("cus_post"))
url=trim(rs("cus_url"))
txt=trim(rs("cus_txt"))
truename=trim(rs("truename"))
uid=rs("uid")
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_input.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" align="left"><b>基本信息</b></td>
<td height="20" align="left"><B>联系人信息</B></td>
</tr>
<tr>
<td align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD WIDTH=72>客户编号</TD>
<TD WIDTH=300><input name="cus_num" type=text class="tabel1" id="cus_num" value="<%=cus_num1%>">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD>客户名称</TD>
<TD WIDTH=300><input name="cus_name" type=text class="tabel1" id="cus_name" value="<%=cname%>" size="40">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD>行业</TD>
<TD> <input name="cus_hangye" type=text class="tabel1" id="cus_hangye" value="<%=hangye%>"></TD>
</TR>
<TR>
<TD>客户来源</TD>
<TD><select name="cus_comefrom" id="cus_comefrom">
<option value="<%=comefrom%>" selected><%=comefrom%></option>
<option value="互联网">互联网</option>
<option value="找资料">找资料</option>
<option value="朋友介绍">朋友介绍</option>
<option value="QQ/MSN">QQ/MSN</option>
<option value="邮件咨询">邮件咨询</option>
<option value="电话咨询">电话咨询</option>
</select></TD>
</TR>
<TR>
<TD>业务人员</TD>
<TD>
<select name="uid" id="uid">
<option value="<%=uid%>" selected><%=truename%></option>
</select>
<span class="style4">*</span></TD></TR>
</TABLE></td>
<td align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD WIDTH=72>联系人姓名</TD>
<TD WIDTH=300><input name="uname" type=text class="tabel1" id="uname" maxlength="10" value="<%=uname%>">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD>手机</TD>
<TD><input name="mobile" type=text class="tabel1" id="mobile" maxlength="12" value="<%=mobile%>">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD>电话</TD>
<TD><input name="cus_contactphone" type=text class="tabel1" id="15" value="<%=phone%>">
<span class="style4">*</span></TD>
</TR>
<TR>
<TD>传真</TD>
<TD><input name="cus_contactfax" type=text class="tabel1" id="cus_contactfax" value="<%=fax%>"></TD>
</TR>
<TR>
<TD>E-Mail</TD>
<TD><input name="cus_contactemail" type=text class="tabel1" id="cus_contactemail" value="<%=email%>" ></TD>
</TR>
</TABLE></td>
</tr>
<tr>
<td align="left"><B>单位信息</B></td>
<td align="left"><b>其它信息</b></td>
</tr>
<tr>
<td align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD WIDTH=72>通讯地址</TD>
<TD WIDTH=300><input name="cus_address" type=text class="tabel1" id="cus_address" size="40" value="<%=address%>"></TD>
</TR>
<TR>
<TD>邮政编码</TD>
<TD WIDTH=300><input name="cus_post" type=text class="tabel1" id="cus_post" maxlength="6" value="<%=post%>"></TD>
</TR>
<TR>
<TD>单位网站</TD>
<TD><input name="cus_url" type=text class="tabel1" id="cus_url" value="<%=url%>"></TD>
</TR>
</TABLE></td>
<td align="left" valign="top"><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=5>
<TR>
<TD WIDTH=72>其他描述</TD>
<TD WIDTH=300 rowspan="2" valign="top"><textarea name="cus_txt" cols="40" rows="4" class="tabel1" id="cus_txt"><%=txt%></textarea></TD>
</TR>
<TR>
<TD VALIGN=top> </TD>
</TR>
</TABLE></td>
</tr>
<tr>
<td width="47%" height="25" align="left"> </td>
<td width="53%" 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.cus_num.value=="")
{
alert("请输入客户号!");
objFrm.cus_num.focus();
return false;
}
if(objFrm.cus_name.value=="")
{
alert("请输入客户名称!");
objFrm.cus_name.focus();
return false;
}
if(objFrm.uname.value=="")
{
alert("请输入联系人姓名!");
objFrm.uname.focus();
return false;
}
if(objFrm.mobile.value=="")
{
alert("请输入联系人手机!");
objFrm.mobile.focus();
return false;
}
if(objFrm.cus_contactphone.value=="")
{
alert("请输入联系人电话!");
objFrm.cus_contactphone.focus();
return false;
}
return true;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -