?? jgtz.asp
字號:
<%'顯示商品信息
set conn=server.createobject("adodb.connection")
conn.open application("dsn")
set rs_sp=server.createobject("adodb.recordset")
sql="select spname from tab_kucun group by spname"
rs_sp.open sql,conn,1,3
if rs_sp.eof and rs_sp.bof then
response.write "<div align=center><font color=red>暫時沒有要調整的數據</font></div>"
response.End()
end if
defaultSP=trim(rs_sp("spname"))
rs_sp.movefirst
set rs_gg1=server.CreateObject("ADODB.RecordSet")
sql="select * from tab_spinfo where spname='"&defaultSP&"'"
rs_gg1.open sql,conn,1,3
defaultGG=rs_gg1("gg")
defaultdw=rs_gg1("dw")
%>
<html>
<head>
<script language="javascript">
function k()
{
form1.dj.select();
}
function changesp(value){
url="jgtz.asp?SPname="+value;
window.location.href=url;
}
function changeGG(value){
url="jgtz.asp?GG="+value+"&SPname="+form1.spname.value;
window.location.href=url;
}
function ti()
{
if (form1.dj.value==0)
{ alert("請輸入單價!");form1.dj.focus();return;}
str=form1.dj.value;
len=str.length;
for(i=0;i<len;i++){
x=str.substr(i,1);
if(x!="0"&x!="1"&x!="2"&x!="3"&x!="4"&x!="5"&x!="6"&x!="7"&x!="8"&x!="9"&x!=".")
{alert("您輸入的不是有效值(請輸入0-9之間的數)!");form1.dj.focus();form1.dj.select();return;}
}
if (event.keyCode==13)
{
form1.kcje.value=form1.dj.value*form1.kcsl.value
send()
}
}
function send()
{
if (form1.dj.value==0)
{alert("請輸入要調整的單價")
form1.dj.focus()
return false
}
form1.submit()
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>價格調整界面</title>
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body onload="k()">
<form action="checkjgtz.asp" method="post" name="form1">
<table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#9CA6C6" bordercolordark="#CCE3FF">
<tr bgcolor="#FF9933">
<td height="18" colspan="4" nowrap class="word_white"> 當前位置:庫存管理> 價格調整 >>></td>
</tr>
<tr>
<td bgcolor="#CCE3FF"><font color="#336699">商品名稱</font></td>
<%spname=request.QueryString("SPname")
if spname="" then
spname=defaultSP
end if
%>
<td bgcolor="#CCE3FF"><font color="#0099ff">
<select name="spname" id="select4" onChange="changesp(this.value)" style="width:256px;">
<% while not rs_sp.eof %>
<option value="<%=trim(rs_sp("spname"))%>" <%if trim(rs_sp("spname"))=spname then response.Write(" selected")%> ><%=rs_sp("spname")%></option>
<%
rs_sp.movenext
wend%>
</select>
</font></td>
<td colspan="2" bgcolor="#CCE3FF"><font color="#336699">規 格:</font>
<select name="GG" id="select5" onChange="changeGG(this.value)">
<%
GG_Q=request.QueryString("GG")
set rs_select=server.CreateObject("ADODB.RecordSet")
sql="select * from tab_spinfo where spname='"&trim(spname)&"'"
rs_select.open sql,conn,1,3
while not rs_select.eof
gg=rs_select("gg")
if GG_Q="" then
GG_Q=gg
dw=defaultdw
End if
%>
<option value="<%=gg%>" <%if GG_Q=gg then response.Write(" selected")%>><%=gg%></option>
<%
rs_select.movenext
wend%>
</select>
<font color="#0099ff">
</font> </td>
<%
set rs_GG=server.CreateObject("ADODB.RecordSet")
sql="select * from tab_spinfo sp inner join tab_kucun kc on sp.id=kc.id where sp.spname='"&spname&"' and sp.gg='"&GG_Q&"'"
rs_GG.open sql,conn,1,3
spID=trim(rs_GG("id"))
dw=rs_GG("dw")
%>
</tr>
<tr>
<td width="112" bgcolor="#CCE3FF"><font color="#006699">產 地:<input type="hidden" value="<%=rs_GG("id")%>" name="spid"> </font></td>
<td width="338" bgcolor="#CCE3FF"><font color="#0099FF"><%=rs_GG("cd")%></font><font color="#0099ff"> </font></td>
<td width="107" bgcolor="#CCE3FF"><font color="#006699">簡 稱:</font></td>
<td width="392" bgcolor="#CCE3FF"><font color="#0099FF"><%=rs_GG("jc")%> </font></td>
</tr>
<tr>
<td width="112" bgcolor="#CCE3FF"><font color="#006699">包 裝:</font></td>
<td width="338" bgcolor="#CCE3FF"><font color="#0099FF"><%=rs_GG("bz")%>
</font></td>
<td width="107" bgcolor="#CCE3FF"><font color="#006699">單 位:</font></td>
<td width="392" bgcolor="#CCE3FF"><font color="#0099FF"><%=dw%> </font></td>
</tr>
<tr>
<td width="112" bgcolor="#CCE3FF"><font color="#336699">單 價:</font></td>
<td width="338" bgcolor="#CCE3FF"><font color="#0099FF">
<input name="dj" type="text" id="dj3" value="<%=rs_GG("dj")%>" size="15" onKeyUp="ti()">
</font></td>
<td width="107" bgcolor="#CCE3FF"><font color="#336699">庫存數量:</font></td>
<td width="392" bgcolor="#CCE3FF"><font color="#0099FF">
<input name="kcsl" type="text" id="kcsl2" disabled value="<%=rs_GG("kcsl")%>"kcsl")" size="15">
</font></td>
</tr>
<tr>
<td width="112" height="21" bgcolor="#CCE3FF"><font color="#006699">庫存金額:</font></td>
<td colspan="3" bgcolor="#CCE3FF"><font color="#0099FF">
<input name="kcje" type="text" id="kcje2" disabled value="<%=rs_GG("dj")*rs_GG("kcsl")%>" size="15">
</font> <font color="#0099FF">
</font> </td>
</tr>
<tr>
<td height="42" colspan="4" bordercolor="#FFFFFF" bgcolor="#CCE3FF"><div align="center">
<input name="subb" type="button" class="btn_grey" id="subb" onclick="send()" value="確定">
<input name="but" type="reset" class="btn_grey" id="but" value="取消">
</div></td>
</tr>
</table>
</form>
<!-- #include file="../bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -