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

📄 f_contract2.asp

📁 一个很好的在线购物系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="../include/Pubconn.asp"-->
<!--#include file="../include/PubCode.asp"-->
<!--#include file="../include/PubFun.asp"--> 
<% username=Getuser()
'response.write username
userclass=TableVisitor("F_Tblcontract2",username)
'response.write userclass
if userclass<2 then
   response.write"<br>"
   response.write"<br>"
   
   response.write "<center><font size=2>抱歉,您没有此项操作权限!<a href=F_swhtbrow.asp>返回</a>"
   response.end
end if


%>






<%
hth=request("hth")
khxh=request("khxh")
if khxh<>"" then
   '找出对应的客户名称电话及传真
   set rskh=Server.Createobject("ADODB.recordset")
   sql="select *  from D_ClientInfo where ClientNum='"&khxh&"'"
   rskh.open sql,Pubconn,1
   if not rskh.eof then
      khmc=rskh("ClientName")
      telephone=rskh("Telophone")
      fax=rskh("fax")
   end if 
end if 
'来自于产品选择表单
lxr=request("lxr")
spbm=request("spxh")
if spbm<>"" then
    '找出产品的有关的内容
    set rssp=Server.Createobject("ADODB.recordset")
    sql="select *  from A_ProductInfo where ProdCode='"&spbm&"'"
    rssp.open sql,Pubconn,1
    if not rssp.eof then
       spmc=rssp("ProdName")
       ggxh=rssp("Model")+"-"+rssp("stanDard")
       jldw=rssp("Unit")
       cbj=rssp("CostPrice")
   end if 


end if 


%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="../cread.css" rel="stylesheet" type="text/css">
</head>
<script language="javascript">
//以下为检验合同号有否重复
	var m_count1;
	Hetonghao=new Array();
	<%
	m_count=0
	set rshao=server.CreateObject("adodb.recordset")
	rshao.open "select contractnum from f_tblcontract2",pubconn,1,3
	%>
	<%if rshao.recordcount>0 then
		do while not rshao.eof
	%>
	Hetonghao[<%=m_count%>]=new Array("<%=trim(rshao("contractnum"))%>");
	<%
			rshao.movenext
			m_count=m_count+1
		loop
	end if
	rshao.close
	set rshao=nothing
	%>
	m_count1=<%=m_count%>
	function jian()
	
    {
     var tag;
     tag=0;
   if (document.form1.hth.value=="")
       {
         alert("合同序号不能为空!");
         document.form1.hth.focus();
         tag=1;
         return(false);  
        }
     if ((document.form1.khxh.value=="")||(document.form1.khmc.value==""))
       {
         alert("客户不能为空!")
         document.form1.khxh.focus();
         tag=1;  
         return(false);
        }
    if (document.form1.year1.value=="")
       {
         alert("签订日期不能为空!")
         document.form1.year1.focus();
         tag=1;  
         return(false);
        }
    if (document.form1.month1.value=="")
       {
         alert("签订日期不能为空!")
         document.form1.month1.focus();
         tag=1;  
         return(false);
        }
     if (document.form1.date1.value=="")
       {
         alert("签订日期不能为空!")
         document.form1.date1.focus();
         tag=1;  
         return(false);
        }
    
     for(i=0;i<m_count1;i++)
      {
       
		if(document.form1.hth.value==Hetonghao[i][0])
		{
			document.form1.hth.value=eval(Hetonghao[i][0])+eval(1);
			//alert("合同号重复,请重新输入!")
			//tag=1;
			//break;
			document.form1.submit();
		}
      }
       if (tag==0)
        {
          document.form1.submit();

       }
   

    } //合同号检验完毕
</script>
<script language="javascript">
//输入客户序号时,产生其对应的名称以及该客户的所有重要人员名单
   var onecount;
   var tj;
   tj=0;
   onecount=0;
   subcat = new Array();
   shu = new Array();
   <%count = 0
     set rs5=server.CreateObject("adodb.recordset")
     rs5.open "SELECT * FROM D_clientinfo where ( tag='khindex'or (type='潜在客户' and tag='kh') or (type='预期客户' and tag='kh')or (type='首次购买客户' and tag='kh') or (type='忠诚客户'and tag='kh') or (type='重复购买客户' and tag='kh') or  tag='hbdealer' ) and stuffnum='"&Session("UserID")&"' and delflag<>'1'",Pubconn,1,3
     if rs5.recordcount> 0 then
        do while not rs5.eof%>
           subcat[<%=count%>] = new Array("<%= trim(rs5("clientnum"))%>","<%=trim(rs5("clientname"))%>","<%=trim(rs5("telophone"))%>","<%=trim(rs5("fax"))%>");
           <%count = count + 1
             rs5.movenext
             loop
     end if
     rs5.close
     set rs5=nothing%>
     onecount=<%=count%>;
     
     <%count1 = 0
     set rs9=server.CreateObject("adodb.recordset")
     rs9.open "SELECT * FROM  D_LinkMan where  Onoroff='1' ",Pubconn,1,3
     if rs9.recordcount> 0 then
        do while not rs9.eof%>
           shu[<%=count1%>] = new Array("<%= trim(rs9("clientnum"))%>","<%=trim(rs9("LinkMan"))%>");
           <%count1 = count1 + 1
             rs9.movenext
             loop
     end if
     rs9.close
     set rs9=nothing%>
     tj=<%=count1%>;

     function keyup()
     { 
     //客户名称响应
         var tag;
         tag=0;
         for (i=0;i<onecount;i++)
          {  
            if(document.form1.khxh.value==subcat[i][0])   
              {      
                document.form1.khmc.value=subcat[i][1];
                document.form1.telephone.value=subcat[i][2];
                document.form1.fax.value=subcat[i][3];
                tag=1;
                break;
              }  
          }   
          if (tag==0)
         {
           document.form1.khmc.value="";
           document.form1.telephone.value="";
           document.form1.fax.value="";
         }
          //跟进对象下拉菜单
          document.form1.lxr.length = 0;

          document.form1.lxr.options[0] = new Option('','');

          for (n=0;n<tj;n++)
          {  
            if(document.form1.khxh.value==shu[n][0])   
              {      
              document.form1.lxr.options[document.form1.lxr.length] = new Option(shu[n][1],shu[n][1]);
 
              }  
          }   
          

     }  //客户事件完毕   
  </script> 
<script language="javascript">

⌨️ 快捷键说明

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