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

📄 k_pdsy_复制(1).asp

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


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

<%
 '得到入库仓库下拉单
 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

 
 %>            

<%
sydh=request("sydh")
year1=request("year1")
month1=request("month1")
date1=request("date1")
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 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()
     {
    

     
        //取商品名称 
                           
          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])
            {
               document.form1.spmc.value=shang2[t][3];  
               document.form1.ggxh.value=shang1[l][1]+"-"+shang2[t][1];
               document.form1.jldw.value=shang2[t][2];
               document.form1.bhsdj.value=shang2[t][4];
              
               break;
            }
            else
             {
               document.form1.jldw.value=""; 
               document.form1.spmc.value=""; 
               document.form1.bhsdj.value="";             
             }
          }  
          
          
            
   }    //key2事件响完成
//税率响应事件
function dj(spdj,spsl)
{
 spdj=document.form1.bhsdj.value;
 spsl=document.form1.spsl.options[document.form1.spsl.selectedIndex].value
  if (spdj=="")
      {
       alert("请先输入不含税单价!");
       document.form1.spsl.options[0] = new Option('','');
       document.form1.spsl.options[0].selected=true;
       document.form1.hsdj.value="";
       document.form1.bhsdj.focus();
       return false();
      }
  if (spsl=="")
  {
  document.form1.hsdj.value=eval(spdj);
  }
 else
 {
 document.form1.hsdj.value=eval(spdj)*(1+eval(spsl));

 }
}
</script>

 
 <script language="vbscript">
 
'在该表单提交前,检验字段是否为空,否则不许提交   
Sub datacheck() 
   

    if form1.year1.value="" or form1.date1.value="" or form1.date1.value="" then       
        MsgBox "请完整输入进货日期!", 64, "提示:"
        focusto(1)
        Exit Sub
    end if 
    if form1.spbm.value="" then
       MsgBox "请选择商品!", 64, "提示:"
        focusto(4)
        Exit Sub
    end if 

    if form1.rkck.value="" then
       MsgBox "请选择入库仓库!", 64, "提示:"
        focusto(15)
        Exit Sub
    end if 
    if form1.sl.value="" then
       MsgBox "请输入损溢数量!", 64, "提示:"
        focusto(17)
        Exit Sub
    end if 

     form1.submit
End Sub
Sub focusto(x)
    '将游标定位于表单(Form)的某个栏位
    document.form1.elements(x).focus()
End Sub
sub cpmc()
    '选择产品时,新开一个窗口
    sydh=document.form1.sydh.value
    year1=document.form1.year1.value
    month1=document.form1.month1.value
    date1=document.form1.date1.value
   
    aa="K_pdsycp.asp?sydh="+sydh+"&year1="+year1+"&month1="+month1+"&date1="+date1
     window.open aa,"产品信息","menubar=no,status=no,width=600,height=500,scrollbars=yes" 
end sub 
'以下判断只有为数字型才能输入
sub sl_onkeypress
		window.event.keyCode=PublicKeyAscii(document.form1.sl.value,"Num",window.event.keyCode)
end sub
sub sl_onkeyup
if form1.spbm.value="" then
   alert("请先选择商品!")
   document.form1.sl.value=""
   exit sub   
end if
if form1.rkck.value="" then
   alert("请先选择仓库!")
   document.form1.sl.value=""
   exit sub   
end if



if form1.sl.value="" then
   sl=0
else
   sl=eval(form1.sl.value)
end if
if  form1.bhsdj.value="" then
   bhsdj=0
else

⌨️ 快捷键说明

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