📄 f_contract2.asp
字号:
//商品名称响事件
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()
{
//var flag1;
// flag1=0;
if (document.form1.khxh.value=="")
{
alert("请先输入客户!"); //要先输入客户
document.form1.spbm.value=""
document.form1.khxh.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.cbj.value=shang2[t][4];
// document.form1.swtk.value=shang2[t][4];
break;
}
else
{
document.form1.jldw.value="";
document.form1.spmc.value="";
}
}
} //key2事件响完成
</script>
<script language="vbscript">
sub kh()
hth=document.form1.hth.value
window.open "F_clientinfo1.asp?hth="+hth,"客户信息","menubar=no,status=no,width=600,height=500,scrollbars=yes"
end sub
sub cpclick()
hth=document.form1.hth.value
khxh=document.form1.khxh.value
lxr=document.form1.lxr.value
if khxh="" then
alert("请先选择客户!")
exit sub
end if
aa="G_CpInfo1.asp?hth="+hth+"&khxh="+khxh+"&lxr="+lxr
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 htzj_onkeypress
window.event.keyCode=PublicKeyAscii(document.form1.htzj.value,"Num",window.event.keyCode)
end sub
sub hmj_onkeypress
window.event.keyCode=PublicKeyAscii(document.form1.hmj.value,"Num",window.event.keyCode)
end sub
sub zbyear_onkeypress
window.event.keyCode=PublicKeyAscii(document.form1.zbyear.value,"Num",window.event.keyCode)
end sub
sub sl_onkeyup
if document.form1.spbm.value="" then
document.form1.sl.value=""
alert("请先选择商品!")
exit sub
end if
end sub
sub htzj_onkeyup
if document.form1.spbm.value="" then
document.form1.htzj.value=""
alert("请先选择商品!")
exit sub
end if
if document.form1.sl.value="" then
document.form1.htzj.value=""
alert("请先输入商品数量!")
exit sub
end if
if document.form1.htzj.value="" then
htzj=0
else
htzj=eval(document.form1.htzj.value)
end if
if document.form1.hmj.value="" then
hmj=0
else
hmj=eval(document.form1.hmj.value)
end if
if hmj<>0 then
if htzj=0 then
document.form1.hjxs.value=0
else
document.form1.hjxs.value=round(cdbl(htzj/hmj),2)
end if
else
document.form1.hjxs.value=""
end if
end sub
sub hmj_onkeyup
if document.form1.spbm.value="" then
document.form1.htzj.value=""
alert("请先选择商品!")
exit sub
end if
if document.form1.sl.value="" then
document.form1.htzj.value=""
alert("请先输入商品数量!")
exit sub
end if
if document.form1.htzj.value="" then
htzj=0
else
htzj=eval(document.form1.htzj.value)
end if
if document.form1.hmj.value="" then
hmj=0
else
hmj=eval(document.form1.hmj.value)
end if
if hmj<>0 then
if htzj=0 then
document.form1.hjxs.value=0
else
document.form1.hjxs.value=round(cdbl(htzj/hmj),2)
end if
else
document.form1.hjxs.value=""
end if
end sub
</script>
<body bgcolor="#FFFFFF" >
<form method="POST" action="F_ContractInfo2.asp" name="form1" >
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%"><b><font size="3"><img border="0" src="../pic/it_22.gif">
</font><font size="2">商务合同</font></b><hr width="40%" size="1" align="left">
</td>
</tr>
</table>
<table border="1" width="100%" cellspacing="0" height="8" bgcolor="#F7F4E5">
<tr>
<td width="11%" height="23" align="right" bgcolor="#F7F4E5" bordercolorlight="#F7F4E5" bordercolor="#F7F4E5">
合同号
</td>
<td width="24%" height="23" bgcolor="#F7F4E5" bordercolorlight="#F7F4E5" bordercolor="#F7F4E5">
<input type="text" name="hth" size="15" <%if hth<>"" then%> value="<%=hth%>" <%end if %> value="<%=getdj("F_tblcontract2","contractnum","H")%>" >
<td width="8%" height="23" align="right" bgcolor="#F7F4E5" bordercolorlight="#F7F4E5" bordercolor="#F7F4E5">
销售代表
</td>
<td width="17%" height="23" colspan="3" bgcolor="#F7F4E5" bordercolorlight="#F7F4E5" bordercolor="#F7F4E5" >
<input type="text" name="xsdb" size=10 value=<%=Session("StuffName")%> readonly style="background-color: #edefef">
</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -