📄 editchance.asp
字号:
<!--#include file="../function/connect.asp"-->
<!--#include file="../function/function.asp"-->
<%
client_id=session("client_id")
chance_id=request("chance_id")
if chance_id="" then
chance_id=request("IID")
end if
if chance_id="" then
response.write "参数错误"
response.end
else
response.write "<script>top.frame2.location.href='user_design1.asp?strTable=31&chance_id=" & chance_id & "';top.frame2.location.reload();</script>"
end if
strsql="select * from chances where chance_id=" & chance_id
Set objRs = Server.CreateObject("adodb.recordset")
objRs.Open strsql,objConn,1,1
if not objrs.eof then
chance_title=objrs.fields("chance_title")
client_id=objrs.fields("chance_client")
chance_rival=objrs.fields("chance_rival")
chance_contact=objrs.fields("chance_contact")
chance_sale_status=objrs.fields("chance_sale_status")
chance_willsale_date=objrs.fields("chance_willsale_date")
chance_willsale_money=objrs.fields("chance_willsale_money")
chance_rate=objrs.fields("chance_rate")
chance_desc=objrs.fields("chance_desc")
IsPublic=objrs.fields("IsPublic")
end if
%>
<html>
<head>
<title>添加机会</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../cssD.css" rel=stylesheet>
<script language = "javascript" src="../function/date-picker.js"></script>
<script>
function check()
{
if(document.form1.chance_title.value==""){
alert("主题不能为空");
document.form1.chance_title.focus();
return false;
}
}
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
function fnDo(strTable,strFIdName,strIdName,strIDValue,strShowName)
{
var xmlDom = new ActiveXObject("Msxml2.DOMDocument");
var strURL = "GetCity.asp?strIDValue=" + strIDValue + "&strIdName="+strIdName+"&strTable="+strTable+"&strShowName="+strShowName+"&strFIdName="+strFIdName;
//alert(strURL);
xmlhttp.Open("POST",strURL , true);
xmlhttp.onreadystatechange = fnRun;
xmlhttp.Send(xmlDom);
}
//--------------------------------------------------------
function fnRun()
{
var state = xmlhttp.readyState;
var xmlDom = new ActiveXObject("Msxml2.DOMDocument");
if (state == 4)
{
xmlDom.loadXML(xmlhttp.responseXML.xml);
//alert(xmlDom.documentElement.selectSingleNode("//objXML").text)
var getInfo = xmlDom.documentElement.selectSingleNode("//objXML").text;
//document.write(getInfo);
subcat = new Array();
eval(getInfo);
changelocation(subcat)
}
}
function changelocation(subcat)
{
document.form1.chance_contact.length = 0;
var i;
document.form1.chance_contact.options[0] = new Option('====选择====','');
for (i=0;i <subcat.length; i++)
{
document.form1.chance_contact.options[document.form1.chance_contact.length] = new Option(subcat[i][0], subcat[i][1]);
if(subcat[i][1]=='<%=chance_contact%>')
{
document.form1.chance_contact.options[i+1].selected=true;
}
}
}
</script>
</head>
<body>
<table width="100%" border="1" cellspacing="0" cellpadding="2" bordercolorlight='#000000' bordercolordark='#FFFFFF'>
<form name="form1" method="post" action="../function/UpdateToDB.asp?InsertTable=chances&ModifyID=<%=chance_id%>&ModifyIDName=chance_id&RedirectUrl=../clients/editchance.asp?chance_id=<%=chance_id%>" onsubmit="return check();">
<tr class="tablehead">
<td height="22" colspan="4"><div align="center">添加机会</div></td>
</tr>
<tr>
<td width="25%" height="22"> <div align="right">主题:</div></td>
<td height="22" colspan="3"> <input name="chance_title" type="text" id="chance_title" size="50" maxlength="100" class="input" value="<%=chance_title%>">
</td>
</tr>
<tr>
<td width="25%" height="22"> <div align="right">相关客户:</div></td>
<td width="25%" height="22">
<select name="chance_client" style='width:150;' onchange="fnDo('Contacts','client_ID','Contact_ID',this.value,'Contact_Name');">
<%
strsql="select * from clients"
Set objRs = Server.CreateObject("adodb.recordset")
objRs.Open strsql,objConn,1,1
if not objrs.eof then
do while not objrs.eof
if client_id & "" = objrs.fields("client_id") & "" then
response.write "<option value=" & objrs.fields("client_id") & " selected>" & objrs.fields("client_name") & "</option>"
else
response.write "<option value=" & objrs.fields("client_id") & ">" & objrs.fields("client_name") & "</option>"
end if
objrs.movenext
loop
end if
%>
</select>
</td>
<td width="25%" height="22"> <div align="right">相关联系人:</div></td>
<td width="25%" height="22">
<select name="chance_contact" style="width:100">
<option value="">====选择====</option>
</select>
</td>
</tr>
<tr>
<td width="25%" height="22" nowrap> <div align="right">主要竞争对手:</div></td>
<td width="25%" height="22"><input name="chance_rival" type="text" size="23" class="input" value="<%=chance_rival%>"> </td>
<td width="25%" height="22" nowrap> <div align="right">销售流程状态:</div></td>
<td width="25%" height="22"><%getSelected "chance_sale_status","select * from Dict_SaleStatus ","ss_Title","ss_ID",chance_sale_status%></td>
</tr>
<tr>
<td width="25%" height="22" nowrap> <div align="right">销售预期日期:</div></td>
<td width="25%" height="22"> <input type="text" size="10" class=input name="chance_willsale_date" maxlength="20" onclick="show_calendar('form1.chance_willsale_date',null,null,'MM/DD/YYYY')" onmouseover="window.status='选择时间';return true;" onmouseout="window.status='';return true;" value="<%=chance_willsale_date%>"><input type="button" class=button value="..." onclick="show_calendar('form1.chance_willsale_date',null,null,'YYYY-MM-DD')"></td>
<td width="25%" height="22" nowrap> <div align="right">预计销售金额:</div></td>
<td width="25%" height="22">¥
<input name="chance_willsale_money" type="text" class="input" id="chance_willsale_money" value="<%=chance_willsale_money%>" size="10" maxlength="15">
元 </td>
</tr>
<tr>
<td width="25%" height="22"> <div align="right">机会概率:</div></td>
<td width="25%" height="22">
<select name="chance_rate">
<%for i=0 to 100 step 5%>
<%if i=chance_rate then%>
<option value="<%=i%>" selected><%=i%>%</option>
<%else%>
<option value="<%=i%>"><%=i%>%</option>
<%end if%>
<%next%>
</select>
</td>
<td width="25%" height="22"> </td>
<td width="25%" height="22"> </td>
</tr>
<tr>
<td height="22">
<div align="right">描述:</div></td>
<td height="22" colspan="3">
<textarea name="chance_desc" cols="40" rows="5" id="chance_desc" class="input"></textarea></td>
</tr>
<tr>
<td colspan="6" height="22">
<input type="checkbox" name="IsPublic" value="1" <%if IsPublic & ""="1" then%>checked<%end if%>>公开此条纪录
</td>
</tr>
<tr>
<td height="22"> <input type="hidden" name="chance_owner" value="<%=session("loginuser")%>"></td>
<td height="22" colspan="3"><input type="submit" value=" 确 定 " class="button">
<input type="reset" value=" 重 设 " class="button">
<input type="button" value=" 关 闭 " class="button" onclick="top.close();">
</td>
</tr>
</form>
</table>
</body>
</html>
<script>
function Openwin(str)
{
window.open(str,"","left=100,top=100,Width=500,Height=400,scrolling=yes");
}
</script>
<script>
if(document.form1.chance_client.options[document.form1.chance_client.selectedIndex].value!=""){
fnDo('Contacts','client_ID','Contact_ID',document.form1.chance_client.options[document.form1.chance_client.selectedIndex].value,'Contact_Name');
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -