⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adddata.asp

📁 客户资源管理系统 1.显示所有客户资料 2.添加/修改客户资料; 3.添加客户拜访记录; 4.模糊搜索; 5.数据导出导入excal-access; 6.信息录入人员管理; 7.数据转移
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			<td width="9%" height="25">
			<p align="center"><font size="2">职  位</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td height="25">
			<p align="left"><% = getList(1,"baidu_clientsTrade","","clientsTrade","zhiwei","职位选择") %></td>
		</tr>
		<tr>
			<td width="9%" height="25">
			<p align="center"><font size="2">公司地址</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="30%" height="25">
			<p align="left"><input name="address" type="text" id="address" size="27"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">邮政编码</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="15%" height="25">
			<p align="left"><input name="zip" type="text" id="zip" size="12"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">联系电话</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td height="25">
			<p align="left"><input name="tel" type="text" id="tel" size="17" maxlength="36"></td>
		</tr>
		<tr>
			<td width="9%" height="25">
			<p align="center"><font size="2">邮  箱</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="30%" height="25">
			<p align="left"><input name="email" type="text" id="email" size="27" maxlength="36"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">手机号码</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="15%" height="25">
			<p align="left"><input name="shouji" type="text" id="shouji" size="12" maxlength="20"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">公司传真</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td height="25">
			<p align="left"><input name="fax" type="text" id="fax" size="17" maxlength="36"></td>
		</tr>
		<tr>
			<td width="9%" height="25">
			<p align="center"><font size="2">客户类型</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="30%" height="25">
			<p align="left"><% = getList(1,"baidu_clientsType","","clientsType","type","客户类型") %></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">录入人员</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="15%" height="25">
			<p align="left"><input name="user" type="text" id="user" value="<% = Session("CRM_name") %>" size="12" maxlength="16" readonly="true"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">所属部门</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td height="25">
			<p align="left"><input name="group" type="text" id="group" size="12" maxlength="24" value="<% = getGroupName(Session("CRM_group")) %>" readonly="true"></td>
		</tr>
          <!--<tr> 
            <td width="100" align="right">拜访记录:</td>
            <td colspan="3"><textarea name="record" rows="8" id="record" style="width: 80%;"></textarea></td>
          </tr>-->
          <tr> 
            <td colspan="9" align="center"> <input type="submit" name="Submit" value=" 提 交 "> 
              &nbsp;&nbsp; <input name="Reset" type="reset" id="Reset" value=" 重 置 "></td>
          </tr>
          <tr> 
            <td colspan="9"><hr size="1" noshade> <span class="emRed">说明:</span>同一数据项中有多个数据,请用“|”分隔</td>
          </tr></form>
	</table>
</div>

<%
End Sub

Sub saveData()
    Dim cdate,cCompany,cLinkman,cTel,cZip,cfax,cUser,cType,cAddress,czhiwei,cshouji,cemail
    Dim cGroup
	cdate = Trim(Request("date"))
	cCompany = Trim(Request("company"))
	cLinkman = Trim(Request("linkman"))
	czhiwei = Trim(Request("zhiwei"))
	cshouji = Trim(Request("shouji"))
	cemail = Trim(Request("email"))
	cTel = Trim(Request("tel"))
	cZip = Trim(Request("Zip"))
	cfax = Trim(Request("fax"))
	cUser = Trim(Request("user"))
	cType = Trim(Request("type"))
	cAddress = Trim(Request("address"))
	cGroup = Session("CRM_group")
	Dim rs,cId,flag
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.Open "Select * From baidu_client Where cCompany = '" & cCompany & "'",conn,3,1
	If rs.RecordCount > 0 Then
	    Response.Write("<font color=""#FF0000"">此客户已经存在,公司名称有重复。</font><br><br>")
		Response.Write("<input type=""button"" value="" 返 回 "" onClick=""history.back();"">")
		Response.End()
	End If
	rs.Close
	''
	rs.Open "Select Top 1 * From baidu_client",conn,3,2
	rs.AddNew
	rs("cdate") = cdate
	rs("cCompany") = cCompany
	rs("cLinkman") = cLinkman
	rs("czhiwei") = czhiwei
	rs("cshouji") = cshouji
	rs("cemail") = cemail
	rs("cTel") = cTel
	rs("cZip") = cZip
	rs("cfax") = cfax
	rs("cUser") = cUser
	rs("cType") = cType
	rs("cAddress") = cAddress
	rs("cGroup") = cGroup
	rs.Update
	cId = rs("cId")
	rs.Close
	Set rs = Nothing
	Response.Redirect("view.asp?cId=" & cId)
End Sub

Sub editform()
    Dim cId
	cId = CInt(ABS(Request("cId")))
	If Not IsNumeric(cId) Or cId <= 0 Then
	    Response.Write("<font color=""#FF0000""><b>数据请求错误。</b></font><br><br>")
		Response.Write("<input type=""button"" value="" 返 回 "" onClick=""location.replace('listAll.asp');"">")
	Else
	    Dim rs
		Set rs = Server.CreateObject("ADODB.Recordset")
		rs.Open "Select * From baidu_client Where cId = " & cId,conn,3,1
		If rs.RecordCount <> 1 Then		
	        Response.Write("<font color=""#FF0000""><b>数据请求错误。</b></font><br><br>")
		    Response.Write("<input type=""button"" value="" 返 回 "" onClick=""location.replace('listAll.asp');"">")
			Response.End()
		End If
    Dim cdate,cCompany,cLinkman,cTel,cZip,cfax,cUser,cType,cAddress,czhiwei,cshouji,cemail
    Dim cGroup
		cdate = rs("cdate")
		cCompany = rs("cCompany")
		cLinkman = rs("cLinkman")
		czhiwei = rs("czhiwei")
		cshouji = rs("cshouji")
		cemail = rs("cemail")
		cTel = rs("cTel")
		cZip = rs("cZip")
		cfax = rs("cfax")
		cUser = rs("cUser")
		cType = rs("cType")
		cAddress = rs("cAddress")
		cGroup = rs("cGroup")
		rs.Close
		Set rs = Nothing
%>




<div align="center">
	<table border="1" width="95%" id="table1" cellspacing="5" cellpadding="0" style="border-collapse: collapse" bordercolordark="#000000">
        <form name="editDataForm" action="?action=saveEdit" method="post" onSubmit="return checkInput();">
		<tr>
			<td width="74%" height="25" colspan="6"><font color="#137BB9"><b>
			客户资源管理系统</b></font></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">录入时间</font></td>
			<td width="3%" height="25">:</td>
			<td height="25"><% = cDate %></td>
		</tr>
		<tr>
			<td width="9%" height="25">
			<p align="center"><font size="2">公司名称</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="30%" height="25">
			<p align="left"><input name="company" type="text" id="company" value="<% = cCompany %>" size="27" maxlength="36"><input name="id" type="hidden" id="id" value="<% = cId %>"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">联 系 人</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="15%" height="25">
			<p align="left"><input name="linkman" type="text" id="linkman" value="<% = cLinkman %>" size="12" maxlength="48"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">职  位</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td height="25">
			<p align="left"><% = getList(1,"baidu_clientsTrade","","clientsTrade","zhiwei","职位选择") %></td>
		</tr>
		<tr>
			<td width="9%" height="25">
			<p align="center"><font size="2">公司地址</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="30%" height="25">
			<p align="left"><input name="address" type="text" id="address" value="<% = cAddress %>" size="27"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">邮政编码</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="15%" height="25">
			<p align="left"><input name="Zip" type="text" id="address" value="<% = cZip %>" size="12"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">联系电话</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td height="25">
			<p align="left"><input name="tel" type="text" id="tel" value="<% = cTel %>" size="17" maxlength="36"></td>
		</tr>
		<tr>
			<td width="9%" height="25">
			<p align="center"><font size="2">邮  箱</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="30%" height="25">
			<p align="left"><input name="email" type="text" id="email" value="<% = cemail %>" size="27"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">手机号码</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="15%" height="25">
			<p align="left"><input name="shouji" type="text" id="shouji" value="<% = cshouji %>" size="12" maxlength="16"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">公司传真</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td height="25">
			<p align="left"><input name="fax" type="text" id="fax" value="<% = cfax %>" size="17" maxlength="36"></td>
		</tr>
		<tr>
			<td width="9%" height="25">
			<p align="center"><font size="2">客户类型</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="30%" height="25">
			<p align="left"><% = getList(1,"baidu_clientsType","","clientsType","type","客户类型") %></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">录入人员</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td width="15%" height="25">
			<p align="left"><input name="user" type="text" id="user" value="<% = Session("CRM_name") %>" size="12" maxlength="16" readonly="true"></td>
			<td width="9%" height="25">
			<p align="center"><font size="2">所属部门</font></td>
			<td width="3%" height="25">
			<p align="center"><font size="2">:</font></td>
			<td height="25">
			<p align="left"><input name="group" type="text" id="group" size="12" maxlength="24" value="<% = getGroupName(Session("CRM_group")) %>" readonly="true"></td>
		</tr>
          <!--<tr> 
            <td width="100" align="right">拜访记录:</td>
            <td colspan="3"><textarea name="record" rows="8" id="record" style="width: 80%;"></textarea></td>
          </tr>-->
          <tr> 
            <td colspan="9" align="center"> <input type="submit" name="Submit" value=" 提 交 "> 
              &nbsp;&nbsp; <input name="Reset" type="reset" id="Reset" value=" 重 置 "></td>
          </tr>
          <tr> 
            <td colspan="9"><hr size="1" noshade> <span class="emRed">说明:</span>同一数据项中有多个数据,请用“|”分隔</td>
          </tr></form>
	</table>
</div>


      <script language="JavaScript">
<!--
var strType = "<% = cType %>";
for(var i=0;i<document.all.type.options.length;i++){
    if(document.all.type.options[i].value == strType){
	    document.all.type.options[i].selected = true;
	}
}
-->
</script>
<%
    End If
End Sub

Sub saveEditData()
    Dim cId
	cId = CInt(ABS(Request("id")))
	If Not IsNumeric(cId) Or cId <= 0 Then
	    Response.Write("<font color=""#FF0000""><b>数据请求错误。</b></font><br><br>")
		Response.Write("<input type=""button"" value="" 返 回 "" onClick=""location.replace('listAll.asp');"">")
	Else
    Dim cdate,cCompany,cLinkman,cTel,cZip,cfax,cUser,cType,cAddress,czhiwei,cshouji,cemail
    Dim cGroup
    	cdate = Trim(Request("date"))
    	cCompany = Trim(Request("company"))
    	cLinkman = Trim(Request("linkman"))
    	czhiwei = Trim(Request("zhiwei"))
    	cshouji = Trim(Request("shouji"))
    	cemail = Trim(Request("email"))
    	cTel = Trim(Request("tel"))
    	cZip = Trim(Request("Zip"))
    	cfax = Trim(Request("fax"))
    	cUser = Trim(Request("user"))
    	cType = Trim(Request("type"))
	cAddress = Trim(Request("address"))
	cGroup = CInt(Abs(getGroup(Request("group"))))
    	Dim rs
    	Set rs = Server.CreateObject("ADODB.Recordset")
	    rs.Open "Select * From baidu_client Where (cCompany = '" & cCompany & "') And cId <> " & cId,conn,3,1
	    If rs.RecordCount > 0 Then
	        Response.Write("<font color=""#FF0000"">此客户已经存在,公司名称有重复。</font><br><br>")
		    Response.Write("<input type=""button"" value="" 返 回 "" onClick=""history.back();"">")
		    Response.End()
	    End If
	    rs.Close
	    ''
    	rs.Open "Select Top 1 * From baidu_client Where cId = " & cId,conn,3,2
		If rs.RecordCount <> 1 Then		
	        Response.Write("<font color=""#FF0000""><b>数据请求错误。</b></font><br><br>")
		    Response.Write("<input type=""button"" value="" 返 回 "" onClick=""location.replace('listAll.asp');"">")
			Response.End()
		End If
	rs("cCompany") = cCompany
	rs("cLinkman") = cLinkman
	rs("czhiwei") = czhiwei
	rs("cshouji") = cshouji
	rs("cemail") = cemail
	rs("cTel") = cTel
	rs("cZip") = cZip
	rs("cfax") = cfax
	rs("cUser") = cUser
    	rs("cType") = cType
	rs("cAddress") = cAddress
	rs("cGroup") = cGroup
    	rs.Update
    	rs.Close
    	Set rs = Nothing
    	Response.Redirect("view.asp?cId=" & cId)
	End If
End Sub
%>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -