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

📄 accountdetail.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
sysid=1
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "account","read"

dim conn
dim rs 
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
rs.Open "select * from v_account where accountid="&Request.QueryString("accountid"),conn,1,1
if rs.EOF then
	Response.Write "记录不存在"
	Response.End 
end if
%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=rs("account")%></title>
</head>
<script language="JavaScript">
function window_onload()
{
window.moveTo(-2,-2);
window.resizeTo(screen.availWidth, screen.availHeight);
}
</script>
<body bgcolor="#ffffff" onload="window_onload()">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="35%"><strong><font size="2"><b><font  class="title">客户:<%=rs("account")%></font></b></td>
    <td width="65%">
		<a href="javascript:opensubwin3('newaccount.asp?id=<%=rs("accountid")%>&type=编辑','','resizable=yes, scrollbars=yes, left= 40, top=40, menubar=no, location=no, toolbar=no ,width=680, height=600');"><img src="../images/button_edit.gif" border=0></a>
		&nbsp;&nbsp;
  </tr>
    <tr > 
      <td height="16" colspan="2" background="../images/title.gif"></td>
    </tr>
    <tr>
      <td height=4></td>
    </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DECFAD">
  <tr> 
    <td align=center height=20 bgcolor="DEDFDE" width="10%">客户</td>
    <td align=center bgcolor="EFEFEF" width="20%"><%=rs("account")%></td>
    <td align=center bgcolor="DEDFDE" width="10%">电话</td>
    <td align=center bgcolor="EFEFEF" width="20%"><%=rs("phone")%></td>
    <td align=center bgcolor="DEDFDE" width="10%">传真</td>
    <td align=center bgcolor="EFEFEF" width="30%"><%=rs("fax")%></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18  bgcolor="DEDFDE">客户代码</td>
    <td align=center bgcolor="EFEFEF"><%=rs("Siccode")%></td>
    <td align=center bgcolor="DEDFDE">行业</td>
    <td align=center bgcolor="EFEFEF"><%=rs("industry")%></td>
    <td align=center bgcolor="DEDFDE">网址</td>
    <td align=center bgcolor="EFEFEF"><a href="http://<%=rs("webpage")%>" target="_blank"><%=rs("webpage")%></a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18  bgcolor="DEDFDE">类型</td>
    <td align=center bgcolor="EFEFEF"><%=rs("accounttype")%></td>
    <td align=center bgcolor="DEDFDE">帐期</td>
    <td align=center bgcolor="EFEFEF"><font color=red><%if rs("AccountPeriod")<>"" then response.write rs("AccountPeriod")&"天" else response.write "未设定" end if%></font></td>
    <td align=center bgcolor="DEDFDE">来源</td>
    <td align=center bgcolor="EFEFEF"><%=rs("source")%></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18  bgcolor="DEDFDE">开户银行</td>
    <td align=center bgcolor="EFEFEF"><%=rs("accountbank")%></td>
    <td align=center bgcolor="DEDFDE">区域</td>
    <td align=center bgcolor="EFEFEF"><%=rs("territory")%></td>
    <td align=center bgcolor="DEDFDE">省份</td>
    <td align=center bgcolor="EFEFEF"><%=rs("province1")%></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18  bgcolor="DEDFDE">帐号</td>
    <td align=center bgcolor="EFEFEF"><%=rs("accountno")%></td>
    <td align=center bgcolor="DEDFDE">邮编</td>
    <td align=center bgcolor="EFEFEF"><%=rs("zip1")%></td>
    <td align=center bgcolor="DEDFDE">城市</td>
    <td align=center bgcolor="EFEFEF"><%=rs("city1")%></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18  bgcolor="DEDFDE">税号</td>
    <td align=center bgcolor="EFEFEF"><%=rs("taxno")%></td>
    <td align=center bgcolor="DEDFDE">失效</td>
    <td align=center bgcolor="EFEFEF"><%if rs("disable") then response.write "是" else response.write "否"%></td>
    <td align=center bgcolor="DEDFDE">所有制</td>
    <td align=center bgcolor="EFEFEF"><%=rs("ownershipname")%></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18  bgcolor="DEDFDE">发货地址</td>
    <td colspan="3" align=center bgcolor="EFEFEF"><%=rs("shipaddress")%></td>
    <td align=center bgcolor="DEDFDE">地址</td>
    <td align=center bgcolor="EFEFEF"><%=rs("billaddress")%></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18  bgcolor="DEDFDE">创建者</td>
    <td align=center bgcolor="EFEFEF"><%=rs("createuser")%></td>
    <td align=center bgcolor="DEDFDE">创建时间</td>
    <td align=center bgcolor="EFEFEF"><%=rs("createdate")%></td>
    <td align=center bgcolor="DEDFDE">最后修改者</td>
    <td align=center bgcolor="EFEFEF"><%=rs("lastmodusername")%></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18  bgcolor="DEDFDE">最后修改时间</td>
    <td align=center bgcolor="EFEFEF"><%=rs("lastmoddate")%></td>
    <td align=center bgcolor="DEDFDE">所有者</td>
    <td align=center bgcolor="EFEFEF"><%=rs("owner")%> </td>
    <td align=center bgcolor="DEDFDE">星级</td>
    <td align=center bgcolor="EFEFEF"><font color=red><strong> 
      <%
	  if rs("accountlevel")<>"" then
	  	if rs("accountlevel")>0 then
			for l=1 to rs("accountlevel")
				'response.Write "<img src=../images/star.bmp>"
				response.Write "★"
			next
		end if
	  end if
	  %>
      </strong></font></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18  bgcolor="DEDFDE">描述</td>
    <td colspan="3" align=left bgcolor="EFEFEF"><%=rs("description")%></td>
    <td align=center bgcolor="DEDFDE">&nbsp;</td>
    <td align=center bgcolor="EFEFEF">&nbsp; </td>
  </tr>
</table>

<br>
<table cellspacing=1 bgcolor='#ffffff'>
  <tr> 
    <td height=18 align=center valign=center <% if Request.QueryString("type")="contact" or Request.QueryString("type")="" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=contact&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>联系人</font></a></td>
	<td height=18 align=center valign=center <% if Request.QueryString("type")="order" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=order&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>合同</font></a></td>
    <td height=18 align=center valign=center <% if Request.QueryString("type")="payment" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=payment&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>应收帐款</font></a></td>
	    <td height=18 align=center valign=center <% if Request.QueryString("type")="collection" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=collection&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>收款记录</font></a></td>
    <td height=18 align=center valign=center <% if Request.QueryString("type")="invoice" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=invoice&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>发票</font></a></td>
    <td height=18 align=center valign=center <% if Request.QueryString("type")="popayment" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=popayment&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>应付帐款</font></a></td>
	<td height=18 align=center valign=center <% if Request.QueryString("type")="pay" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=pay&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>付款记录</font></a></td>
    <td height=18 align=center valign=center <% if Request.QueryString("type")="quote" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=quote&accountid=<%=Request.QueryString("accountid")%>><font color="#FFFFFF">报价</font></a></td>
    
    <td height=18 align=center valign=center <% if Request.QueryString("type")="deal" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=deal&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>销售机会</font></a></td>
    <td height=18 align=center valign=center <% if Request.QueryString("type")="event" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=event&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>销售事件</font></a></td>
    <td height=18 align=center valign=center <% if Request.QueryString("type")="schedule" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=schedule&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>工作日程</font></a></td>
    <td height=18 align=center valign=center <% if Request.QueryString("type")="expense" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=expense&accountid=<%=Request.QueryString("accountid")%>><font color="#FFFFFF">费用</font></a></td>
	    <td height=18 align=center valign=center <% if Request.QueryString("type")="share" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=share&accountid=<%=Request.QueryString("accountid")%>><font color="#FFFFFF">共享</font></a></td>
    <td height=18 align=center valign=center <% if Request.QueryString("type")="all" then Response.Write "bgcolor=red" else Response.Write "bgcolor=4A699C"%>><a href=accountdetail.asp?type=all&accountid=<%=Request.QueryString("accountid")%>><font color='#FFFFFF'>所有</font></a></td>
  </tr>
</table>
<%
if Request.QueryString("type")="all" or Request.QueryString("type")="" or Request.QueryString("type")="contact" then 
'set rs1=conn.execute("select * from v_contact where (owner='"&session("loginid")&"' or owner in(select userid from v_userreportto_all where reportto='"&session("loginid")&"')) and accountid="&Request.QueryString("accountid"))
set rs1=conn.execute("select * from v_contact where accountid="&Request.QueryString("accountid"))
%>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="12%"><strong><font size="2">相关联系人</font></strong></td>
    <td width="88%"><a href="javascript:opensubwin3('../contact/newcontact.asp?accountid=<%=request("accountid")%>&accountname=<%=rs("account")%>&type=新建','联系人','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><img src="../images/button_new.gif" border="0"></a></td>
  </tr>
  <tr> 
    <td height=2 colspan="2" bgcolor="#4A699C"></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DECFAD">
  <tr bgcolor="efefef"> 
    <td width="15%" height=15 align=center bgcolor="efefef">联系人</td>
    <td width="15%" height="15" align=center>部门</td>
    <td width="15%" height="15" align=center>职务</td>
    <td width="15%" height="15" align=center>电话</td>
    <td width="15%" align=center>传真</td>
    <td width="15%" height="15" align=center>所有者</td>
    <td height="15" align=center>操作</td>
  </tr>
  <%do while not rs1.EOF%>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18><%=rs1("contact")%></td>
    <td align=center><%=rs1("contactdepartment")%></td>
    <td align=center><%=rs1("title")%></td>
    <td align=center><%=rs1("workphone")%></td>
    <td align=center><%=rs1("fax")%></td>
    <td align=center><%=rs1("ownername")%></td>
    <td align=center><a href="javascript:opensubwin3('../contact/newcontact.asp?id=<%=rs1("contactid")%>&type=编辑','联系人','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=520,height=360,top=150,left=160');">编辑</a> 
      <a href="javascript:opensubwin3('../delete.asp?contactid=<%=rs1("contactid")%>','删除','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=300,height=200,top=150,left=160');">删除</a></td>
  </tr>
  <%
  i=i+1
  rs1.MoveNext
  loop
  %>
</table>
<%end if%>
<%
if Request.QueryString("type")="all"  or Request.QueryString("type")="order" then 
sql="select * from v_order where accountid="&Request.QueryString("accountid")&" and sysaccountid="&sysid&" order by signeddate"
set rs1=conn.Execute(sql)
%>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="12%"><strong><font size="2">相关合同</font></b></strong></td>
    <td width="88%"><a href="javascript:opensubwin3('../order/neworder.asp?accountid=<%=request("accountid")%>&accountname=<%=rs("account")%>&type=新建','合同','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><img src="../images/button_new.gif" border="0"></a></td>
  </tr>
  <tr> 
    <td height=2 colspan="2" bgcolor="#4A699C"></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DECFAD">
  <tr bgcolor="efefef"> 
    <td width="200" height=15 align=center bgcolor="efefef">合同号</td>
    <td height="15" align=center>金额</td>
    <td height="15" align=center>状态</td>
    <td height="15" align=center>签订日期</td>
    <td height="15" align=center>销售员</td>
    <td width="80" height="15" align=center>操作</td>
  </tr>
  <%do while not rs1.EOF%>
  <tr bgcolor="#FFFFFF"> 
    <td align=center height=18><a href="javascript:opensubwin3('../order/orderdetail.asp?orderid=<%=rs1("orderid")%>','合同','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=520,height=360,top=150,left=160');"><%=rs1("ordernum")%></a></td>
    <td align=center><%=formatnumber(rs1("totalamount"),2)%></td>
    <td align=center><%=rs1("status")%></td>
    <td align=center><%=rs1("signeddate")%></td>
    <td align=center><%=rs1("owner")%></td>
    <td align=center>
        <%if rs1("status")="初始" then%>
    <a href="javascript:opensubwin3('../order/neworder.asp?id=<%=rs1("orderid")%>&type=编辑','合同','toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=520,height=360,top=150,left=160');">编辑</a> <a href="javascript:opensubwin3('../delete.asp?orderid=<%=rs1("orderid")%>','删除','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=300,height=200,top=150,left=160');">删除</a>
    <%end if%>
    </td>
  </tr>
  <%
  rs1.MoveNext
  loop
  %>
</table>
<%end if%>
<%
if Request.QueryString("type")="all" or Request.QueryString("type")="payment" then 
sql="select * from v_orderpaymentwithreceive where accountid="&Request.QueryString("accountid")&" and sysaccountid="&sysid&" order by PaymentDate"
set rs1=conn.Execute(sql)
%>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="12%"><strong><font size="2">相关应收帐款</font></b></strong></td>
    <td width="88%"><a href="javascript:opensubwin3('../payment/newpayment.asp?accountid=<%=request("accountid")%>&accountname=<%=rs("account")%>&type=新建','应收帐','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=600,height=400,top=150,left=160');"><img src="../images/button_new.gif" border="0"></a></td>
  </tr>
  <tr> 
    <td height=2 colspan="2" bgcolor="#4A699C"></td>

⌨️ 快捷键说明

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