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

📄 jgtz.asp

📁 企业进销存管理系统
💻 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"> &nbsp;当前位置:库存管理> 价格调整 &gt;&gt;&gt;</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">&nbsp;      </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">&nbsp; 
        </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="确定">
          &nbsp;
          <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 + -