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

📄 k_stockedit.asp

📁 一个很好的在线购物系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:




<!--#include file="../include/Pubconn.asp"-->
<!--#include file="../include/PubFun.asp"--> 
<!--#include file="../include/Pubcode.asp"--> 

<%
'得到进货方式下拉单            
 set AdoRs1=Server.CreateObject("AdoDB.RecordSet")            
 lcsql="select NumValue from A_ConfigInfo Where Subject='stockway'"            
 AdoRS1.Open lcSql,PubConn,1,1            
 jhfs=Adors1("NumValue")            
 if not isNull(jhfs) then            
 	stockway=Split(jhfs,",") 					            
 end if            
 Set Adors1=Nothing            
'得到税率下拉单            
 set AdoRs2=Server.CreateObject("AdoDB.RecordSet")            
 lcsql="select NumValue from A_ConfigInfo Where Subject='tax'"            
 AdoRS2.Open lcSql,PubConn,1,1            
 HYvalue=Adors2("NumValue")            
 if not isNull(HYvalue) then            
 	tax=Split(HYValue,",") 					            
 end if            
 Set Adors2=Nothing
 '得到入库仓库下拉单
 set AdoRs3=Server.CreateObject("AdoDB.RecordSet")            
 lcsql="select NumValue from A_ConfigInfo Where Subject='storehouse'"            
 AdoRS3.Open lcSql,PubConn,1,1            
 HYvalue=Adors3("NumValue")            
 if not isNull(HYvalue) then            
 	house=Split(HYValue,",") 					            
 end if            
 Set Adors3=Nothing

 
 %>            

<%
'传过来的值
jhdh=request("jhdh")
'response.write jhdh
'response.end
set rsjh=Server.Createobject("ADODB.recordset")
sql="select * from k_tblstock where jhdh='"&jhdh&"'"
rsjh.open sql,pubconn,1
spbm1=rsjh("prodcode")
jhrq=rsjh("jhrq")
if jhrq<>"" then
   year2=left(jhrq,4)                  
   month2=mid(jhrq,6,2)                  
   date2=right(jhrq,2)  
end if 
if spbm1<>"" then
    '找出产品的有关的内容
    set rssp=Server.Createobject("ADODB.recordset")
    sql="select *  from A_ProductInfo where ProdCode='"&spbm1&"'"
    rssp.open sql,Pubconn,1
    if not rssp.eof then
       spmc1=rssp("ProdName")
       ggxh1=rssp("Model")+"-"+rssp("stanDard")
       jldw1=rssp("Unit")
       cbj1=rssp("costprice")
   end if 
   rssp.close
   set rssp=nothing

end if 

ghdwxh=request("ghdwxh")
year1=request("year1")
if month1="" then
   month1=month2
else
   month1=request("month1")
end if 
if date1="" then
   date1=date2
else
   date1=request("date1")
end if 
if jhbm="" then
  jhbm=rsjh("DepartCode")
else
  jhbm=request("jhbm")
end if 
if cgy="" then
   cgy=rsjh("stuffnum")
else
   cgy=request("cgy")
end if
jhfs=request("jhfs")
spbm=request("spxh")
if ghdwxh<>"" then
   ghdwmc=Gname(ghdwxh)
end if 
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 
   rssp.close
   set rssp=nothing

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 onecount;
   onecount=0;
   subcat = new Array();
    <%count = 0
     set rs5=server.CreateObject("adodb.recordset")
     rs5.open "SELECT pronum,proname FROM K_TblProvider",Pubconn,1,3
     if rs5.recordcount> 0 then
        do while not rs5.eof%>
           subcat[<%=count%>] = new Array("<%= trim(rs5("pronum"))%>","<%=trim(rs5("proname"))%>");
           <%count = count + 1
             rs5.movenext
             loop
     end if
     rs5.close
     set rs5=nothing%>
     onecount=<%=count%>;
     function ghxh()
     { 
     //供货单位名称响应
         var tag;
         tag=0;
         for (i=0;i<onecount;i++)
          {  
            if(document.form1.ghdwxh.value==subcat[i][0])   
              {      
                document.form1.ghdwmc.value=subcat[i][1];
                tag=1;
                break;
              }  
          }   
          if (tag==0)
          document.form1.ghdwmc.value="";
   
     } 
 //选择部门产生其对应的业务员
 var tj;
   tj=0;
   FindMC= new Array();
   <%count = 0
     set RSYWY=server.CreateObject("adodb.recordset")
     RSYWY.open "SELECT StuffNum,Name,departcode FROM A_StuffInfo where delflag='0'",Pubconn,1,3
     if RSYWY.recordcount> 0 then
        do while not RSYWY.eof%>
           FindMC[<%=count%>] = new Array("<%= trim(RSYWY("departcode"))%>","<%= trim(RSYWY("stuffnum"))%>","<%=trim(RSYWY("Name"))%>");
           <%count = count + 1
             RSYWY.movenext
             loop
     end if
     RSYWY.close
     set RSYWY=nothing%>
     tj=<%=count%>;   
 function  ywy(bmid)
 {
      bmid=document.form1.jhbm.options[document.form1.jhbm.selectedIndex].value
      document.form1.cgy.length = 0;
      document.form1.cgy.options[0] = new Option('','');

          for (n=0;n<tj;n++)
          {  
            if(bmid==FindMC[n][0])   
              {      
              document.form1.cgy.options[document.form1.cgy.length] = new Option(FindMC[n][2],FindMC[n][1]);
 
              }  
          }   

 
 } 
  </script> 
<script language="javascript">
  //商品名称响事件  
  
   var Pcount;
  
   Pcount=0;
  shang1 = new Array();
  shang2 = new Array();
   <%
     '得出大类的代码与名称  
     count = 0
    
     set rst=server.CreateObject("adodb.recordset")
     mysql="select ProdName,left(prodcode,4) as code2,model,prodcode,standard,unit ,costprice from  A_ProductInfo "
     rst.open mysql,Pubconn,1,3
    
    if rst.recordcount> 0 then
          do while not rst.eof
          %>
          
           shang1[<%=count%>]=new Array("<%= trim(rst("code2"))%>","<%= trim(rst("model"))%>");
           shang2[<%=count%>]=new Array("<%= trim(rst("prodcode"))%>","<%= trim(rst("standard"))%>","<%= trim(rst("unit"))%>","<%= trim(rst("ProdName"))%>","<%= trim(rst("CostPrice"))%>");
           <%count = count + 1
             rst.movenext
             loop
     end if 
     rst.close
     set rst=nothing
      %>
   Pcount=<%=count%>;
    
  function key2()
     {
     if (document.form1.ghdwxh.value=="")
      {
       alert("请先输入供应商!");  
       document.form1.spbm.value=""
       document.form1.ghdwxh.focus();
      }

     
        //取商品名称 
                           
          for (l=0;l<Pcount;l++)
          {
               if(document.form1.spbm.value.substring(0,4)==shang1[l][0])
              {
               document.form1.ggxh.value=shang1[l][1]; 
               break;
              }
               else
               {
               document.form1.ggxh.value="";
               } 
        
         }
         for (t=0;t<Pcount;t++)
         { 
            if(document.form1.spbm.value==shang2[t][0])
            {

⌨️ 快捷键说明

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