📄 dx_todepot_edit.asp
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--#include file="Inc/Config.asp"-->
<!--#include file="inc/Dx_admin_check.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="Css/style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="Ajax/ajaxrequest.js"></script>
<script language="javascript" src="Ajax/Check.js"></script>
<title>商品入库</title>
<style>
body {
background-color:#FFFFFF;
}
#Product_x {
width:450px;
display:none;
}
</style>
<%
if request.QueryString.Count>0 then
dx_ToDepot_id=request.QueryString("dx_ToDepot_id")
CheckNum(dx_ToDepot_id)
sql="select * from [dx_ToDepot] where dx_ToDepot_id="&dx_ToDepot_id
rs.open sql,conn,1,1
dx_ToDepot_list=rs("dx_ToDepot_list")
dx_ToDepot_product=rs("dx_ToDepot_product")
dx_ToDepot_buy_price=rs("dx_ToDepot_buy_price")
dx_ToDepot_sell_price=rs("dx_ToDepot_sell_price")
dx_ToDepot_buy_count=rs("dx_ToDepot_buy_count")
dx_ToDepot_now_count=rs("dx_ToDepot_now_count")
dx_ToDepot_ToNew=rs("dx_ToDepot_ToNew")
dx_ToDepot_user=rs("dx_ToDepot_user")
rs.close
sql="select * from [dx_ToList] where dx_ToList_id="&dx_ToDepot_list
rs.open sql,conn,1,1
dx_ToList_business=rs("dx_ToList_business")
rs.close
sql="select * from [dx_product] where dx_product_id="&dx_ToDepot_product
rs.open sql,conn,1,1
dx_product_class=rs("dx_product_class")
dx_product_brand=rs("dx_product_brand")
dx_product_model=rs("dx_product_model")
dx_product_parameter=rs("dx_product_parameter")
dx_product_about=rs("dx_product_about")
dx_product_depot=rs("dx_product_depot")
rs.close
elseif request.Form.Count>0 then
dx_ToDepot_id=request.Form("dx_ToDepot_id")
dx_ToList_id=request.Form("dx_ToList_id")
dx_product_id=request.Form("dx_product_id")
dx_product_class=request.Form("dx_product_class")
dx_product_brand=request.Form("dx_product_brand")
dx_product_model=request.Form("dx_product_model")
dx_ToDepot_buy_count=request.Form("dx_ToDepot_buy_count")
dx_ToDepot_now_count=request.Form("dx_ToDepot_now_count")
dx_ToDepot_now_count_old=request.Form("dx_ToDepot_now_count_old")
dx_ToDepot_buy_price=request.Form("dx_ToDepot_buy_price")
dx_ToDepot_buy_price_old=request.Form("dx_ToDepot_buy_price_old")
dx_ToDepot_sell_price=request.Form("dx_ToDepot_sell_price")
dx_ToList_business=request.Form("dx_ToList_business")
dx_product_depot=request.Form("dx_product_depot")
dx_product_parameter=request.Form("dx_product_parameter")
dx_product_about=request.Form("dx_product_about")
dx_product_user=request.Form("dx_product_user")
'计算修改后的差价,根据现有数量计算:
'原来价值=原来现有数量*原来进价
'现在价值=现在现有数量*现在进价
'差价=原来价值-现在价值
PriceOld=dx_ToDepot_now_count_old*dx_ToDepot_buy_price_old
PriceEdit=dx_ToDepot_buy_count*dx_ToDepot_buy_price
PriceNow=PriceOld-PriceEdit
' response.Write(PriceOld&" "&PriceEdit&" "&PriceNow)
' response.End()
sql="select * from [dx_ToDepot] where dx_ToDepot_id="&dx_ToDepot_id
rs.open sql,conn,1,3
rs("dx_ToDepot_buy_count")=dx_ToDepot_buy_count
rs("dx_ToDepot_now_count")=dx_ToDepot_now_count
rs("dx_ToDepot_buy_price")=dx_ToDepot_buy_price
rs("dx_ToDepot_sell_price")=dx_ToDepot_sell_price
rs.update
rs.close
sql="select * from [dx_ToList] where dx_ToList_id="&dx_ToList_id
rs.open sql,conn,1,3
rs("dx_ToList_business")=dx_ToList_business
rs.update
rs.close
sql="select * from [dx_product] where dx_product_id="&dx_product_id
rs.open sql,conn,1,3
rs("dx_product_class")=dx_product_class
rs("dx_product_brand")=dx_product_brand
rs("dx_product_model")=dx_product_model
rs("dx_product_depot")=dx_product_depot
rs("dx_product_parameter")=dx_product_parameter
rs("dx_product_about")=dx_product_about
rs("dx_product_user")=dx_product_user
rs.update
rs.close
sql="select * from [dx_site]"
rs.open sql,conn,1,3
rs("dx_site_money")=rs("dx_site_money")+PriceNow
rs.update
rs.close
call ShowErr("信息修改成功!","Dx_ToDepot.asp")
end if
%>
</head>
<body>
<%
if session("Dx_Admin")="" then
%>
<br><center><img src="Images/note.gif" align="absmiddle"> <font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%
response.end
end if
%>
<script language="javascript">
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++) {
TempChar= InString.substring (Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)
return (false);
}
return (true);
}
function check1()
{
if (document.form1.huohao1.value=="单击选择产品")
{
alert("还没有选择产品!");
return false;
}
if (document.form1.shulian1.value=="")
{
alert("请输入数量!");
return false;
}
}
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="Images/r_1.gif" alt="" /></td>
<td width="100%" background="Images/r_0.gif">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 入库信息修改(带*号的为必填项)</td>
<td align="right"> </td>
</tr>
</table>
</td>
<td><img src="Images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<form name="Dx_ToDepot_edit_new" action="Dx_ToDepot_edit.asp" method="post">
<input name="dx_ToDepot_id" type="hidden" value="<%=dx_ToDepot_id%>" />
<input name="dx_ToList_id" type="hidden" value="<%=dx_ToDepot_list%>" />
<input name="dx_product_id" type="hidden" value="<%=dx_ToDepot_product%>" />
<tr>
<td width="20%" align="right" height="30">商品类别:</td>
<td width="80%" class="category">
<select name="dx_product_class">
<%
sql="select * from [dx_class] order by dx_class_id desc"
rs.open sql,conn,1,1
while not rs.eof
if dx_product_class=rs("dx_class_id") then
selected="selected='selected'"
else
selected=""
end if
response.Write("<option "&selected&" value='"&rs("dx_class_id")&"'>"&rs("dx_class_name")&"</option>")
rs.movenext
wend
rs.close
%>
</select>
</td>
</tr>
<tr>
<td align="right" height="30">商品品牌:</td>
<td class="category">
<select name="dx_product_brand">
<%
sql="select * from [dx_brand] order by dx_brand_id desc"
rs.open sql,conn,1,1
while not rs.eof
if dx_product_brand=rs("dx_brand_id") then
selected="selected='selected'"
else
selected=""
end if
response.Write("<option "&selected&" value='"&rs("dx_brand_id")&"'>"&rs("dx_brand_name")&"</option>")
rs.movenext
wend
rs.close
%>
</select>
</td>
</tr>
<tr>
<td align="right" height="30">商品名称:</td>
<td class="category">
<%
set rst=conn.execute("select dx_product_model from [dx_product] where dx_product_id="&dx_ToDepot_product)
dx_product_model=rst("dx_product_model")
rst.close
%>
<input name="dx_product_model" type="text" value="<%=dx_product_model%>">
<font color="#FF0000">*</font>
</td>
</tr>
<tr>
<td align="right" height="30">入库数量:</td>
<td class="category">
<input name="dx_ToDepot_buy_count" type="text" onKeyUp="value=value.replace(/[^\d.]/g,'')" value="<%=dx_ToDepot_buy_count%>" size="20" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))">
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td align="right" height="30">现存数量:</td>
<td class="category">
<input name="dx_ToDepot_now_count_old" type="hidden" value="<%=dx_ToDepot_now_count%>" />
<input name="dx_ToDepot_now_count" type="text" onKeyUp="value=value.replace(/[^\d.]/g,'')" value="<%=dx_ToDepot_now_count%>" size="20" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))">
<font color="#FF0000">*</font>修改后会影响库存资金,请慎重修改</td>
</tr>
<tr>
<td align="right" height="30">商品进价:</td>
<td class="category">
<input name="dx_ToDepot_buy_price_old" type="hidden" value="<%=dx_ToDepot_buy_price%>" />
<input name="dx_ToDepot_buy_price" type="text" onKeyUp="value=value.replace(/[^\d.]/g,'')" value="<%=dx_ToDepot_buy_price%>" size="20" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))">
<font color="#FF0000">*</font>修改后会影响库存资金,请慎重修改</td>
</tr>
<tr>
<td align="right" height="30">商品售价:</td>
<td class="category"><input name="dx_ToDepot_sell_price" type="text" onKeyUp="value=value.replace(/[^\d.]/g,'')" value="<%=dx_ToDepot_sell_price%>" size="20" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))">
<font color="#FF0000">*</font>
</td>
</tr>
<tr>
<td align="right" height="30">商品供应:</td>
<td class="category">
<select name="dx_ToList_business">
<%
sql="select * from [dx_business] order by dx_business_id desc"
rs.open sql,conn,1,1
while not rs.eof
if dx_ToList_business=rs("dx_business_id") then
selected="selected='selected'"
else
selected=""
end if
response.Write("<option "&selected&" value='"&rs("dx_business_id")&"'>"&rs("dx_business_name")&"</option>")
rs.movenext
wend
rs.close
%>
</select>
</td>
</tr>
<tr>
<td align="right" height="30">
存放仓库:</td>
<td class="category"><select name="dx_product_depot">
<%
sql="select * from [dx_depot] order by dx_depot_id desc"
rs.open sql,conn,1,1
while not rs.eof
if dx_product_depot=rs("dx_depot_id") then
selected="selected='selected'"
else
selected=""
end if
response.Write("<option "&selected&" value='"&rs("dx_depot_id")&"'>"&rs("dx_depot_name")&"</option>")
rs.movenext
wend
rs.close
%>
</select>
</td>
</tr>
<tr>
<td align="right" height="30">商品参数:</td>
<td class="category">
<textarea name="dx_product_parameter" cols="40" rows="7"><%=dx_product_parameter%></textarea> <font color="#FF0000">*</font>
</td>
</tr>
<tr>
<td align="right" height="30">商品介绍:</td>
<td class="category">
<textarea name="dx_product_about" cols="40" rows="7"><%=dx_product_about%></textarea>
</td>
</tr>
<tr>
<td align="right" height="30">经办人:</td>
<td class="category">
<select name="dx_product_user">
<%
sql="select * from [dx_admin] order by dx_admin_id desc"
rs.open sql,conn,1,1
while not rs.eof
if dx_ToDepot_user=rs("dx_admin_name") then
selected="selected='selected'"
else
selected=""
end if
response.Write("<option "&selected&" value='"&rs("dx_admin_name")&"'>"&rs("dx_admin_name")&"</option>")
rs.movenext
wend
rs.close
%>
</select>
</td>
</tr>
<tr>
<td height="30"> </td>
<td class="category">
<input type="submit" value=" 确认修改 " class="button">
<input type="reset" value=" 重新填写 " class="button">
</td>
</tr>
</form>
</table>
</td>
<td></td>
</tr>
<tr>
<td><img src="Images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="Images/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -