📄 k_stock.asp
字号:
<!--#include file="../include/Pubconn.asp"-->
<!--#include file="../include/PubFun.asp"-->
<!--#include file="../include/Pubcode.asp"-->
<% username=Getuser()
userclass=TableVisitor("k_Tblstock",username)
if userclass<2 then
response.write"<br>"
response.write"<br>"
response.write "<center><font size=2>抱歉,您没有此项操作权限!<a href=K_stockbrow.asp>返回</a>"
response.end
end if
%>
<%'得到进货方式下拉单
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
%>
<%
ghdwxh=request("ghdwxh")
jhdh=request("jhdh")
year1=request("year1")
month1=request("month1")
date1=request("date1")
jhbm=request("jhbm")
cgy=request("cgy")
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
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])
{
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];
document.form1.hsdj.value=shang2[t][4];
break;
}
else
{
document.form1.jldw.value="";
document.form1.spmc.value="";
document.form1.bhsdj.value="";
document.form1.hsdj.value="";
}
}
} //key2事件响完成
//税率响应事件
function dj(spdj,spsl)
{
spdj=document.form1.bhsdj.value;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -