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

📄 addexpense.asp

📁 客户管理crm xitong ,希望能给你带来帮助
💻 ASP
字号:
<!--#include file="../function/connect.asp"-->
<!--#include file="../function/function.asp"-->
<%
client_id=session("client_id")
if client_id="all" then   
	client_id=""
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 checkEnd(obj)
	{
		if(obj.checked==true){
			document.form1.Close_Date.disabled=false;
			document.form1.Solution.disabled=false;
		}else{
			document.form1.Close_Date.disabled=true;
			document.form1.Solution.disabled=true;
		}
	}
	function check()
	{
		if(document.form1.Regarding.value==""){
			alert("主题不能为空");
			document.form1.Regarding.focus();
			return false;
		}
		if(document.form1.client_ID.value==""){
			alert("相关客户不能为空");
			document.form1.client_ID.focus();
			return false;
		}
		if(document.form1.Contact_ID.value==""){
			alert("相关联系人不能为空");
			document.form1.Contact_ID.focus();
			return false;
		}
		//if(document.form1.chance_id.value==""){
		//	alert("相关机会不能为空");
		//	document.form1.chance_id.focus();
		//	return false;
		//}
	}
	function Openwin(str)
	{
		window.open(str,"","left=100,top=100,Width=500,Height=400,scrolling=yes");
	}
	
	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.Contact_ID.length = 0;
		var i;
		document.form1.Contact_ID.options[0] = new Option('====选择====','');
		for (i=0;i <subcat.length; i++)
		{
			document.form1.Contact_ID.options[document.form1.Contact_ID.length] = new Option(subcat[i][0], subcat[i][1]);
		}
	}
	
	
	
	xmlhttp1 = new ActiveXObject("Msxml2.XMLHTTP");
	function fnDo1(strTable,strFIdName,strIdName,strIDValue,strShowName)
	{
		var xmlDom1 = new ActiveXObject("Msxml2.DOMDocument"); 
		var strURL = "GetCity.asp?strIDValue=" + strIDValue + "&strIdName="+strIdName+"&strTable="+strTable+"&strShowName="+strShowName+"&strFIdName="+strFIdName;
		//alert(strURL);
		
		xmlhttp1.Open("POST",strURL , true);
		xmlhttp1.onreadystatechange = fnRun1;
		
		xmlhttp1.Send(xmlDom1);
	}
	//--------------------------------------------------------
	function fnRun1()
	{
		var state = xmlhttp1.readyState;
		var xmlDom = new ActiveXObject("Msxml2.DOMDocument");
	
		if (state == 4)
		{
			xmlDom.loadXML(xmlhttp1.responseXML.xml);
			//alert(xmlDom.documentElement.selectSingleNode("//objXML").text)
			var getInfo = xmlDom.documentElement.selectSingleNode("//objXML").text;
			//document.write(getInfo);
			subcat = new Array();
			eval(getInfo);
			changelocation1(subcat)
		} 
	}
	function changelocation1(subcat)
	{
		
		document.form1.chance_id.length = 0;
		var i;
		document.form1.chance_id.options[0] = new Option('====选择====','0');
		for (i=0;i <subcat.length; i++)
		{
			document.form1.chance_id.options[document.form1.chance_id.length] = new Option(subcat[i][0], subcat[i][1]);
		}
	}
</script>
</head>

<body>
<table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolorlight='#000000' bordercolordark='#FFFFFF'>
  <form name="form1" method="post" action="../function/InsertToDB.asp?InsertTable=Expense&RedirectUrl=../clients/editexpense.asp" onsubmit="return check();">
    <tr> 
      <td height="22" colspan="4" class="tablehead"><div align="center">费用</div></td>
    </tr>
    <tr> 
      <td width="121" height="22" nowrap> <div align="right">费用主题:</div></td>
      <td width="273" height="22"> <input name="Regarding" type="text" class="input" id="Regarding" size="30" maxlength="50"></td>
      <td width="109" height="22" nowrap> <div align="right">费用发生日期:</div></td>
      <td width="385" height="22"> <input name="Expense_Date" type="text" id="Expense_Date" size="10" class="input" onclick="show_calendar('form1.Start_Date',null,null,'MM-DD-YYYY')" onmouseover="window.status='选择时间';return true;" onmouseout="window.status='';return true;" value="<%=year(date())%>-<%=month(date())%>-<%=day(date())%>"> 
        <input type="button" class=button value="..." onclick="show_calendar('form1.Start_Date',null,null,'YYYY-MM-DD')"></td>
    </tr>
    <tr> 
      <td width="121" height="22" nowrap> <div align="right">相关客户:</div></td>
      <td height="22"> 
      <select name="client_ID" style='width:150;' onchange="fnDo('Contacts','client_ID','Contact_ID',this.value,'Contact_Name');fnDo1('SalesOpportunities','client_ID','chance_id',this.value,'Regarding');">
       <option value="0">====选择====</option>
          <%
        strsql="select * from clients where client_owner='" & session("loginuser") & "' or IsPublic=1"
        	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="109" height="22" nowrap> <div align="right">相关联系人:</div></td>
      <td height="22"> 
      <select name="Contact_ID" style="width:100">
      <option value="">====选择====</option>
      </select>
      </td>
    </tr>
    <tr> 
      <td width="121" height="22" nowrap> 
	<div align="right">相关机会:</div></td>
      <td height="22"> 
      <select name="chance_id" style="width:150">
      <option value="0">====选择====</option>
      </select>
      </td>
      <td width="109" height="22" nowrap> 
        <div align="right">费用类型:</div></td>
      <td height="22"> 
        <%getSelect "Expense_Type_ID","select * from Dict_ExpenseTypes ","Expense_Type","Expense_Type_ID"%>
      </td>
    </tr>
    <tr> 
      <td width="121" height="22" nowrap><div align="right">费用金额:</div></td>
      <td height="22">&yen;
        <input name="Amount" type="text" class="input" id="Amount" value="0" size="20" maxlength="20"></td>
      <td width="109" height="22" nowrap>&nbsp;</td>
      <td height="22">&nbsp;</td>
    </tr>
    <tr> 
      <td width="121" height="10"> <div align="right">详细描述:</div></td>
      <td height="10" colspan="3"><textarea name="Details" cols="60" rows="8" id="Details" class="input"></textarea></td>
    </tr>
     <tr> 
      <td colspan="6" height="22"> 
        <input type="checkbox" name="IsPublic" value="1" checked>公开此条纪录
      </td>
    </tr>
    <tr> 
      <td height="10" colspan="4"><div align="center"> <input type="hidden" name="Creator" value="<%=session("loginuser")%>">
          <input type="submit" value="  提交  " class="button">
          &nbsp; 
          <input type="reset" value="  重设  " class="button">
        </div></td>
    </tr>
  </form>
</table>
</body>
</html>
<%if client_id<>"" then%>
<script>
		fnDo('Contacts','client_ID','Contact_ID','<%=client_id%>','Contact_Name');
		fnDo1('chances','chance_client','chance_id','<%=client_id%>','chance_title');
</script>
<%end if%>

⌨️ 快捷键说明

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