📄 newaccount.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
if request("id")<>"" then
objcheck.CheckUserFunction "account","edit"
else
objcheck.CheckUserFunction "account","add"
end if
set objcheck=nothing
'编辑取记录
if request("id")<>"" then
dim connq
dim rsq
set connq=server.CreateObject("adodb.connection")
set rsq=server.CreateObject("adodb.recordset")
connq.Open connstring
rsq.Open "select * from account where accountid="&request("id"),connq,2,3,1
if rsq("owner")<>session("loginid") then
set rsq2=connq.Execute("select accountid from accountshare where shareto='"&session("loginid")&"' and accountid="&request("id")&" and edit=0")
if not rsq2.eof then
response.write "<br><LINK href='../global.css' rel=stylesheet type=text/css>"
response.Write "<div align=center>"
response.Write "<FONT SIZE=2 class=title>"
response.write "<img src=../images/jg.gif>"
response.write "无权限"
Response.Write "<br><br><input type=button value=关闭 onclick='window.close()' id=button1 name=button1>"
response.write "</div>"
Response.End
end if
end if
straccount=rsq("account")
straccounte=rsq("accounte")
straccounttype=rsq("accounttype")
strindustry=rsq("industry")
strTerritory=rsq("Territory")
strsource=rsq("source")
strcountry1=rsq("country1")
strProvince1=rsq("Province1")
strcity1=rsq("city1")
strownership=rsq("ownership")
strSicCode=rsq("SicCode")
strphone=rsq("phone")
strAccountBank=rsq("AccountBank")
strAccountNo=rsq("accountno")
strTaxNo=rsq("TaxNo")
strZip1=rsq("Zip1")
strBillAddress=rsq("BillAddress")
strShipAddress=rsq("ShipAddress")
strfax=rsq("fax")
strwebpage=rsq("webpage")
strowner=rsq("owner")
strdescription=rsq("description")
strownername=getfieldvalue("usertable","loginid",rsq("owner"),"username")
straccountlevel=rsq("accountlevel")
strdisable=rsq("disable")
strAccountPeriod=rsq("AccountPeriod")
rsq.Close
set rsq=nothing
connq.Close
set connq=nothing
else
strowner=session("loginid")
strownername=session("username")
end if
if request("account")<>"" then
Dim objaccount
Set objaccount=Server.CreateObject("SmartSales.Account")
objaccount.SaveAccount
set objaccount=nothing
%>
<script language=javascript>
window.opener.location.reload();
window.close();
</script>
<%
end if
%>
<HTML><HEAD><TITLE>客户</TITLE>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script language="javascript">
function save(){
if (form1.account.value==''){
alert('请输入客户名称');
form1.account.focus();
return;
}
if (form1.accounttype.value=='-1'){
alert('请选择客户类型');
form1.accounttype.focus();
return;
}
if (form1.industry.value=='-1'){
alert('请选择行业');
form1.industry.focus();
return;
}
if (form1.territory.value=='-1'){
alert('请选择区域');
form1.territory.focus();
return;
}
if (form1.province1.value=='-1'){
alert('请选择省份');
form1.province1.focus();
return;
}
if (form1.phone.value==''){
alert('请输入电话');
form1.phone.focus();
return;
}
if (form1.fax.value==''){
alert('请输入传真');
form1.fax.focus();
return;
}
if (form1.siccode.value==''){
alert('请输入客户代码');
form1.siccode.focus();
return;
}
form1.submit();
}
</script>
<body>
<form name=form1 method="post" id=form1>
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong><font size="2" class=title><b><%=request("type")%>客户</b></font></strong></td>
<td> </td>
</tr>
<tr >
<td height="16" colspan="2" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4></td>
</tr>
<tr><td><div align="center" style="cursor:hand"> <a onclick="save();"><img src="../images/button_save.gif"></a> <a onclick="window.close();"><img src="../images/button_cancel.gif"></a>
</DIV></td>
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
<tr bgcolor="white">
<td width="15%" bgcolor="DEDFDE" align="center" ><font color=red>* </font>客户名称</td>
<td width="35%" bgcolor="EFEFEF" > <input name=account type=text value="<%=straccount%>" size="28">
<input type="button" name="bnowner2" onClick="JavaScript:window.open('checkaccount.asp?account='+form1.account.value,'Select','resize=yes,toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=600,height=450,top=150,left=160')" class=black value=审核>
</td>
<td width="15%" bgcolor="DEDFDE"> <div align="center">英文名称</div></td>
<td width="35%" bgcolor="EFEFEF"> <input name=accounte type=text value="<%=straccounte%>" size="20">
</td>
</tr>
<tr bgcolor="white">
<td nowrap bgcolor="DEDFDE"><div align="center"><font color=red>* </font>客户类型</div></td>
<td width="40%" bgcolor="EFEFEF"> <select name=accounttype>
<option value=-1></option>
<%getdefine "客户类型",straccounttype%>
</select> </td>
<td bgcolor="DEDFDE"><div align="center"><font color=red>* </font>行业</div></td>
<td bgcolor="EFEFEF"> <select name=industry>
<option value=-1></option>
<%getdefine "行业",strindustry%>
</select></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center"><font color=red>* </font>区域</div></td>
<td bgcolor="EFEFEF"> <select name=territory>
<option value=-1></option>
<%getdefine "区域",strTerritory%>
</select></td>
<td bgcolor="DEDFDE"><div align="center">来源</div></td>
<td bgcolor="EFEFEF"> <select name=source>
<option value=-1></option>
<%getdefine "销售来源类型",strsource%>
</select></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center">国家</div></td>
<td bgcolor="EFEFEF"> <select name=country1>
<option value=-1></option>
<%getdefine "国家",strcountry1%>
</select></td>
<td bgcolor="DEDFDE"><div align="center"><font color=red>* </font>省份</div></td>
<td bgcolor="EFEFEF"><select name=province1>
<option value=-1></option>
<%getdefine "省份",strprovince1%>
</select> </td>
</tr>
<tr bgcolor="white">
<td align="center" bgcolor="DEDFDE" >城市</td>
<td bgcolor="EFEFEF"><input name=city1 type=text value="<%=strcity1%>" size="14"></td>
<td align="center" bgcolor="DEDFDE">所有制</td>
<td bgcolor="EFEFEF"><select name=ownership>
<option value=-1></option>
<%getdefine "客户所有制类型",strownership%>
</select></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center"><font color=red>* </font>电话</div></td>
<td bgcolor="EFEFEF"> <input name=phone type=text value="<%=strphone%>" size="14"></td>
<td bgcolor="DEDFDE"><div align="center"><font color=red>* </font>传真</div></td>
<td bgcolor="EFEFEF"> <input name=fax type=text value="<%=strfax%>" size="14"></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center"><font color=red>* </font>客户代码</div></td>
<td bgcolor="EFEFEF"> <input name=siccode type=text value="<%=strsiccode%>" size="14"></td>
<td bgcolor="DEDFDE"><div align="center">网址</div></td>
<td bgcolor="EFEFEF"> <input name=webpage type=text value="<%=strwebpage%>" size="14">
</td>
</tr>
<tr bgcolor="white">
<td height="23" bgcolor="DEDFDE" ><div align="center">开户银行</div></td>
<td bgcolor="EFEFEF"> <input name=accountbank type=text value="<%=straccountbank%>" size="14"></td>
<td bgcolor="DEDFDE"><div align="center">帐号</div></td>
<td bgcolor="EFEFEF"> <input name=accountno type=text value="<%=straccountno%>" size="20"></td>
</tr>
<tr bgcolor="white">
<td height="23" bgcolor="DEDFDE" ><div align="center">税号</div></td>
<td bgcolor="EFEFEF"> <input name=taxno type=text value="<%=strtaxno%>" size="20">
</td>
<td bgcolor="DEDFDE"><div align="center">邮编</div></td>
<td bgcolor="EFEFEF"> <input name=zip1 type=text value="<%=strzip1%>" size="14">
</td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center">地址</div></td>
<td colspan="3" bgcolor="EFEFEF"> <input name=billaddress type=text value="<%=strbilladdress%>" size="60"></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center">发货地址</div></td>
<td colspan="3" bgcolor="EFEFEF"> <input name=shipaddress type=text value="<%=strshipaddress%>" size="60"></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center">星级</div></td>
<td bgcolor="EFEFEF"> <select name=accountlevel>
<option value=1>★</option>
<option value=2 <%if straccountlevel=2 then response.Write("selected")%>>★★</option>
<option value=3 <%if straccountlevel=3 then response.Write("selected")%>>★★★</option>
<option value=4 <%if straccountlevel=4 then response.Write("selected")%>>★★★★</option>
<option value=5 <%if straccountlevel=5 then response.Write("selected")%>>★★★★★</option>
</select> </td>
<td bgcolor="DEDFDE"><div align="center">所有者</div></td>
<td bgcolor="EFEFEF"> <input name="owner" type="hidden" size="8" value="<%=strowner%>">
<input name="ownername" type="text" size="8" value="<%=strownername%>" readonly>
<input type="button" name="bnowner" onClick="JavaScript:opensubwin2('form1','owner')" class=black value=...>
</td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center">失效</div></td>
<td bgcolor="EFEFEF"><input type="checkbox" name="disable" value=1 <%if strdisable=true then Response.Write "checked"%>>
</td>
<td bgcolor="DEDFDE"><div align="center">帐期</div></td>
<td bgcolor="EFEFEF"> <font color=red><%if strAccountPeriod<>"" then response.write strAccountPeriod&"天" else response.write "未设定" end if%></font></td>
</tr>
<tr bgcolor="white">
<td bgcolor="DEDFDE" ><div align="center">描述</div></td>
<td colspan="3" bgcolor="EFEFEF"> <textarea name="description" cols="45" rows="4"><%=strdescription%></textarea>
</td>
</tr>
</table>
</form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -