📄 chancelist.asp
字号:
<!--#include file="../function/connect.asp"-->
<%
meth=request("meth")
if meth="del" and request("chance_id")<>"" then
strsql="delete from chances where chance_id in (" & request("chance_id") &")"
objConn.execute strsql
response.redirect "chancelist.asp"
end if
ID=session("Client_ID")
strsql="select ch.*,co.Contact_Name,cl.client_name,s.ss_Title from chances ch,contacts co,clients cl,Dict_SaleStatus s where s.ss_ID=ch.chance_sale_status and ch.chance_contact=co.Contact_ID and ch.chance_client=cl.client_id and (chance_owner='" & session("loginuser") & "' or ch.IsPublic=1)"
if ID<>"" and ID<>"all" then
strsql=strsql & " and chance_client=" & ID
end if
'response.write strsql
Set objRs = Server.CreateObject("adodb.recordset")
objRs.Open strsql,objConn,1,1
%>
<html>
<head>
<title>国家</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../cssD.css" rel=stylesheet>
<script>
function checkNum()
{
rNum=0;
var actID=document.all.chance_id;
for(i=1;i<actID.length;i++){
if(actID[i].checked==true){
rNum=rNum +1 ;
}
}
return rNum;
}
function checkAll()
{
var actID=document.all.chance_id;
if(document.form1.checkall.checked==false){
for(i=0;i<actID.length;i++){
actID[i].checked=false;
}
}else{
for(i=0;i<actID.length;i++){
actID[i].checked=true;
}
}
}
function modify()
{
if(checkNum()!=1)
{
alert('修改的项目只能是一个.');
}else{
chance_id=getValue();
window.open('chance_edit.asp?chance_id='+ chance_id,'修改','left=150,top=150,width=630,height=360');
//document.form1.action="editchance.asp";
//document.form1.submit();
}
}
function getValue(){
var actID=document.all.chance_id;
var getv="";
for(i=0;i<actID.length;i++){
if(actID[i].checked==true){
getv=actID[i].value;
}
}
return getv;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="103%" border="1" cellspacing="0" cellpadding="2" bordercolorlight='#000000' bordercolordark='#FFFFFF'>
<form name="form1" method="post" action="chancelist.asp">
<tr class="tablehead">
<td width="4%"><input type="checkbox" name="checkall" value="1" onclick="checkAll();"><input type="checkbox" name="chance_id" value="0" disabled style="display:none;"></td>
<td width="20%" nowrap>
<div align="center">主题</div>
</td>
<td width="19%" nowrap>
<div align="center">相关客户</div>
</td>
<td width="19%" nowrap>
<div align="center">相关联系人</div>
</td>
<td width="19%" nowrap>
<div align="center">销售流程状态</div>
</td>
<td width="19%" nowrap>
<div align="center">预计销售金额</div>
</td>
<td width="19%" nowrap>
<div align="center">预期销售日期</div>
</td>
</tr>
<%if not objrs.eof then
do while not objrs.eof
%>
<tr align="center">
<td width="4%" class="tablehead">
<input type="checkbox" name="chance_id" value="<%=objrs.fields("chance_id")%>">
</td>
<td width="20%" nowrap> <%=objrs.fields("chance_title")%></td>
<td width="19%" nowrap> <%=objrs.fields("client_name")%></td>
<td width="19%" nowrap> <%=objrs.fields("Contact_Name")%></td>
<td width="19%" nowrap> <%=objrs.fields("ss_Title")%></td>
<td width="19%" nowrap> <%=objrs.fields("chance_willsale_money")%></td>
<td width="19%" nowrap> <%=objrs.fields("chance_date")%></td>
</tr>
<%
objrs.movenext
loop
else%>
<tr align="center">
<td colspan="7">
没有机会
</td>
</tr>
<%end if%>
<input type="hidden" name="meth" value="del">
<input type="hidden" name="ID" value="<%=ID%>">
<tr align="center">
<td colspan="7">
<input type="button" value=" 添加 " class="button" onclick="window.open('chance.asp?ID=<%=ID%>','联系活动','left=150,top=150,width=630,height=360');"> <input type="submit" value=" 删除 " class="button"> <input type="button" value=" 修改 " class="button" onclick="modify();">
</td>
</tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -