📄 jgtz.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/sell.asp" -->
<%
set rsspname = Server.CreateObject("ADODB.Recordset")
sql_kc = "SELECT ID, spname FROM dbo.tab_kucun"
rsspname.open sql_kc,conn,1,3
%>
<%
varID=1
if (Request.Form("selectspname") <> "") then varID = Request.Form("selectspname")
%>
<%
set rslist = Server.CreateObject("ADODB.Recordset")
sql_list = "SELECT * FROM dbo.tab_kucun WHERE ID = '" + Replace(varID, "'", "''") + "'"
rslist.open sql_list,conn,1,3
%>
<script language="JavaScript" >
function mysubmit2(){
form2.hid.value=form1.id.value;
form2.hkcsl.value=form1.kcsl.value;
form2.hdj.value=form1.dj.value;
form2.submit();}
</script>
<html>
<head>
<title>网上商品交易系统--价格调整!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet">
<script language="JavaScript">
function autoje(){
if (form1.dj.value==0)
{alert("请输入单价!");form1.dj.focus();return;}
if(isNaN(form1.dj.value))
{alert("您输入的不是有效值(请输入0-9之间的数)!");form1.dj.focus();return;}
form1.kcje.value=form1.kcsl.value*form1.dj.value;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../../images/bg.gif">
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="279">
<tr>
<td valign="top">
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="51">
<tr>
<td>
<h2 style="filter:glow(color=#ccccff,strength=5);height:1pt"align="center">
<font size="2" color=#000099>
商品价格调整 </font></h2>
</td>
</tr>
</table>
<form name="form1" method="post" action="">
<table width="470" border="0" cellspacing="-2" cellpadding="-2" height="40" align="center">
<tr>
<td valign="top">
<select name="selectspname" onchange="JScript:form1.submit();">
<option value="myempty" selected>请选择调整价格的商品名称:</option>
<% While (NOT rsspname.EOF)%>
<option value="<%=rsspname("ID")%>" ><%=rsspname("spname")%></option>
<% rsspname.MoveNext()
Wend %>
</select>
</td>
</tr>
</table>
<% if (not rslist.eof) then %>
<table width="470" border="0" cellspacing="-2" cellpadding="-2" height="132" align="center">
<tr>
<td width="68"><font color="#336699">商品编号:</font></td>
<td width="175"><font color="#0099FF"><%=(rslist.Fields.Item("ID").Value)%>
<input type="hidden" name="id" value="<%=rslist("id")%>">
</font></td>
<td width="65"><font color="#006699">产 址:</font></td>
<td width="162"><font color="#0099FF"><%=(rslist.Fields.Item("cd").Value)%></font></td>
</tr>
<tr>
<td width="68"><font color="#336699">商品名称:</font></td>
<td width="175"><font color="#0099FF"><%=(rslist.Fields.Item("spname").Value)%></font></td>
<td width="65"><font color="#006699">简 称:</font></td>
<td width="162"><font color="#0099FF"><%=(rslist.Fields.Item("jc").Value)%></font></td>
</tr>
<tr>
<td width="68"><font color="#336699">规 格:</font></td>
<td width="175"><font color="#0099FF"><%=(rslist.Fields.Item("gg").Value)%></font></td>
<td width="65"><font color="#006699">包 装:</font></td>
<td width="162"><font color="#0099FF"><%=(rslist.Fields.Item("bz").Value)%></font></td>
</tr>
<tr>
<td width="68"><font color="#336699">库存数量:</font></td>
<td width="175">
<input type="text" name="kcsl" disabled=".t." value="<%=rslist("kcsl")%>" size="17">
</td>
<td width="65"><font color="#006699">库存金额:</font></td>
<td width="162">
<input type="text" name="kcje" disabled=".t." value="<%=rslist("kcje")%>" size="17">
</td>
</tr>
<tr>
<td width="68"><font color="#336699">单 价:</font></td>
<td width="175">
<input type="text" name="dj" value="<%=rslist("dj")%>" onblur="autoje()" size="17">
</td>
<td width="65"> </td>
<td width="162"> </td>
</tr>
</table>
</form>
<form name="form2" method="post" action="./jgtzok.asp">
<table width="470" align="center">
<tr>
<td colspan="4">
<div align="center">
<input type="hidden" name="hid">
<input type="hidden" name="hkcsl">
<input type="hidden" name="hdj">
<input type="button" name="Button" value="确定" onclick="mysubmit2()">
<input type="button" name="Submit2" value="取消" onclick="JScript:form1.reset();">
</div>
</td>
</tr>
</table>
<% end if %>
</form>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -