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

📄 addproduct.asp

📁 客户管理crm xitong ,希望能给你带来帮助
💻 ASP
字号:
<!--#include file="../function/connect.asp"-->
<!--#include file="../function/function.asp"-->
<html>
<head>
<title>添加客户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../cssD.css" rel=stylesheet>
<script>
	function check()
	{
		if(document.form1.product_cat1_id.value==""){
			alert("产品大类不能为空");
			document.form1.product_cat1_id.focus();
			return false;
		}
		if(document.form1.product_cat2_id.value==""){
			alert("产品小类不能为空");
			document.form1.product_cat2_id.focus();
			return false;
		}
		if(document.form1.product_name.value==""){
			alert("产品名不能为空");
			document.form1.product_name.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;
			//alert(getInfo);
			subcat = new Array();
			eval(getInfo);
			changelocation(subcat)
		} 
	}
	function changelocation(subcat)
	{
		
		document.form1.product_cat2_id.length = 0;
		var i;
		document.form1.product_cat2_id.options[0] = new Option('====选择====','');
		for (i=0;i <subcat.length; i++)
		{
			document.form1.product_cat2_id.options[document.form1.product_cat2_id.length] = new Option(subcat[i][0], subcat[i][1]);
		}
	}
	
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="1" cellspacing="0" cellpadding="2"  bordercolorlight='#000000' bordercolordark='#FFFFFF'>
  <form name="form1" method="post" action="../function/InsertToDB.asp?InsertTable=products&CheckIt=product_name&RedirectUrl=../clients/productlist.asp" onsubmit="return check();">
    <tr> 
      <td colspan="4" height="25" class="tablehead"> <div align="center">添加客户信息</div></td>
    </tr>
    <tr> 
      <td width="17%" height="22" nowrap><div align="right">产品大类:</div></td>
      <td width="35%" height="22">
      <%
      strsql="select * from cat1"
      Set objRs = Server.CreateObject("adodb.recordset")
	    objRs.Open strsql,objConn,1,1
      %>
      <select name="product_cat1_id" style="width:100" onchange="fnDo('cat2','cat2_cat1_id','cat2_id',this.value,'cat2_name');">
      <option value="">====选择====</option>
      <%if not objrs.eof then
      		do while not objrs.eof
      %>
      		<option value="<%=objrs.fields("cat1_id")%>"><%=objrs.fields("cat1_name")%></option>
      <%
      		objrs.movenext      		
      		loop
        end if
      %>
      </select>
      </td>
      <td width="18%" height="22" nowrap><div align="right">产品小类:</div></td>
      <td width="30%" height="22">
      <select name="product_cat2_id" style="width:100">
      <option value="">====选择====</option>
      </select>
	</td>
    </tr>
    <tr> 
      <td width="17%" height="22" nowrap><div align="right">产品名:</div></td>
      <td height="22"> <div align="left">
          <input name="product_name" type="text" class="input" id="product_name" size="30" maxlength="50">
</div></td>
      <td width="18%" height="22" nowrap><div align="right">产品编码:</div></td>
      <td width="30%" height="22"><input name="product_code" type="text" class="input" id="product_code" size="30" maxlength="20"></td>
    </tr>
    <tr> 
      <td width="17%" height="23" nowrap> <div align="right">产品规格:</div></td>
      <td height="23"><input name="product_standard" type="text" class="input" id="product_standard" size="30" maxlength="20"></td>
      <td width="18%" height="23" nowrap><div align="right">计量单位:</div></td>
      <td width="30%" height="23"><input name="product_unit" type="text" class="input" id="product_unit" size="30" maxlength="20"></td>
    </tr>
    <tr> 
      <td width="17%" height="22" nowrap><div align="right">销售定价:</div></td>
      <td height="22"><input name="product_sale_price" type="text" class="input" id="product_sale_price" size="30" maxlength="20"></td>
      <td width="18%" height="22" nowrap><div align="right">成本价:</div></td>
      <td width="30%" height="22"><input name="product_cost" type="text" class="input" id="product_cost" size="30" maxlength="20"></td>
    </tr>
    <tr> 
      <td width="17%" height="22" nowrap> <div align="right">折扣价:</div></td>
      <td height="22"><input name="product_discount" type="text" class="input" id="product_discount" size="30" maxlength="20"></td>
      <td width="18%" height="22" nowrap> <div align="right">拼音码:</div></td>
      <td width="30%" height="22"><input name="product_PY_code" type="text" class="input" id="product_PY_code" size="30" maxlength="20"></td>
    </tr>
    <tr> 
      <td height="22" nowrap><div align="right">备注信息:</div></td>
      <td height="22" colspan="3"><textarea name="product_desc" cols="50" rows="5" class="input" id="product_desc"></textarea></td>
    </tr>
    <tr> 
      <td colspan="4" height="22"> <div align="center"> 
          <input type="submit" value="  提 交  " class="button">
          <input type="reset" value="  重 设  " class="button">
        </div></td>
    </tr>
  </form>
</table>
</body>
</html>
<script>
	function Openwin(str)
	{
		window.open(str,"","left=100,top=100,Width=500,Height=400,scrolling=yes");
	}
</script>

⌨️ 快捷键说明

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