showdmts.asp
来自「创建和运行动态、交互的Web服务器应用程序」· ASP 代码 · 共 156 行
ASP
156 行
<!--#include file="conn.asp"-->
<html>
<head>
<title><%=webname%>--图书退书单</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css2.css" rel="stylesheet" type="text/css">
</head>
<body>
<script>
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
</script>
<%
dt = Session("mydt")
dtindex = session("dtindex")
%>
<table width="90%" border="0" height=450 cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#ece9d8"><br><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td>
<table width=77 border="0" cellpadding="0" cellspacing="0">
<tr valign=bottom>
<td background=images/get_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><font color=#ffffff>零售退书</font></div></td>
</tr>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#ffffff" bordercolorlight="#666666">
<tr><td>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr><td width="85%">
<table width="60%" align=center border="0" cellspacing="0" cellpadding="0" >
<form name="frm_dinhao" method="POST" action="adddmts.asp?action=addhao">
<tr height=28>
<td align="right">请输入小票流水号 </td>
<td><input type="text" name="liushuihao" size="20" style="BACKGROUND-COLOR: #ffffff"></td>
<td><input type="submit" value="查 询" class=bt3 name="submit"></td>
</tr>
</form>
</table>
<tr><td colspan=2>
<table width="100%" align=center border="0" cellpadding="0" cellspacing="1" bgcolor="#666666">
<tr>
<td width="35%" bgcolor="#ece9d8" align="center">书名</td>
<td width="7%" bgcolor="#ece9d8" align="center">定价</td>
<td width="10%" bgcolor="#ece9d8" align="center">退书数</td>
<td width="6%" bgcolor="#ece9d8" align="center">折扣</td>
<td width="15%" bgcolor="#ece9d8" align="center">码洋</td>
<td width="12%" bgcolor="#ece9d8" align="center">实洋</td>
<td width="8%" bgcolor="#ece9d8" align="center">修改</td>
<td width="10%" bgcolor="#ece9d8" align="center">取消</td>
</tr>
<%
dim i,total1,total2,total3,total4,total5,total6,total7
i=1:total1=0.00:total2=0.00:total3=0.00:total4=0.00:total5=0.00:total6=0.00:total7=0.00
while i < dtindex
bookid = dt(i,0)
bookname = dt(i,1)
shichangjia = dt(i,2)
bkcount = dt(i,3)
ts_bkcount = dt(i,4)
dtzk = dt(i,5)
if dt(i,3)<>0 then%>
<form method="POST" action="adddmts.asp?action=adchange">
<tr>
<td width="35%" bgcolor="#ffffff" align="center"><%=bookname%></td>
<td width="7%" bgcolor="#ffffff" align="center"><%=formatnumber(shichangjia)%>
<input type="hidden" value="<%=bkcount%>" size="6" name="bkcount"</td>
<td width="10%" bgcolor="#ffffff" align="center"><input type="text" value="<%=ts_bkcount%>" size="6" name="ts_bkcount" onkeypress="return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))"></td>
<td width="6%" bgcolor="#ffffff" align="center"><font color=blue><%=formatnumber(dtzk)%></font></td>
<%
total0=total0+bkcount
total1=total1+ts_bkcount
total2=total2+(shichangjia*ts_bkcount)
total3=total3+(shichangjia*ts_bkcount*dtzk)
%>
<td width="15%" bgcolor="#ffffff" align="center"><font color="#FF0000"><%=formatnumber((shichangjia*ts_bkcount),2)%></font></td>
<td width="12%" bgcolor="#ffffff" align="center"><font color="#FF0000"><%=formatnumber((shichangjia*ts_bkcount*dtzk),2)%></font></td>
<td width="8%" bgcolor="#ffffff" align="center"><input type="submit" value="修改" name="submit">
<input type="hidden" value="<%=i%>" name="index">
<td width="10%" bgcolor="#ffffff" align="center"><a href="adddmts.asp?action=addelet&index=<%=i%>"><img src=images/trash.gif width=15 height=17 border=0></a>
</tr>
</form>
<%
i=i+1
else
i=i+1
end if
wend
dtindex=i
session("dtindex") = dtindex
if total0=0 then
response.Write "<tr>"
response.Write "<td width=35% bgcolor=#ffffff align=center height=20></td>"
response.Write "<td width=7% bgcolor=#ffffff align=center></td>"
response.Write "<td width=10% bgcolor=#ffffff align=center></td>"
response.Write "<td width=6% bgcolor=#ffffff align=center></td>"
response.Write "<td width=15% bgcolor=#ffffff align=center></td>"
response.Write "<td width=12% bgcolor=#ffffff align=center></td>"
response.Write "<td width=8% bgcolor=#ffffff align=center></td>"
response.Write "<td width=7% bgcolor=#ffffff align=center></td>"
response.Write "</tr>"
response.Write "</table>"
response.Write "<table width=100% align=center border=0 cellpadding=0 cellspacing=0>"
response.Write "<tr>"
response.Write "<td bgcolor=#ece9d8 STYLE='PADDING-LEFT: 50px' colspan=9 height=40>总数量 <font color=#FF0000>0 </font> 册 "
response.Write "总码洋 <font color=#FF0000>0.00</font> 元 "
response.Write "总实洋 <font color=#FF0000>0.00</font> 元</td>"
response.Write "</tr>"
response.Write "</table>"
else
if total1=0 then
response.Write "<table width=100% align=center border=0 cellpadding=0 cellspacing=0>"
response.Write "<tr>"
response.Write "<td bgcolor=#ece9d8 STYLE='PADDING-LEFT: 50px' colspan=9 height=40>总数量 <font color=#FF0000>0 </font> 册 "
response.Write "总码洋 <font color=#FF0000>0.00</font> 元 "
response.Write "总实洋 <font color=#FF0000>0.00</font> 元</td>"
response.Write "</tr>"
response.Write "</table>"
else
response.Write "<table width=100% align=center border=0 cellpadding=0 cellspacing=0>"
response.Write "<tr>"
response.Write "<td bgcolor=#ece9d8 STYLE='PADDING-LEFT: 50px' colspan=9 height=40>总数量 <font color=#FF0000>"&total1 &"</font> 册 "
response.Write "总计码洋 <font color=#FF0000>"&formatnumber(total2,2)&"</font> 元 "
response.Write "总计实洋 <font color=#FF0000>"&formatnumber(total3,2)&"</font> 元</td>"
response.Write "<td><input type=button value='打 印' class=bt3 name='sbt_print_ts' onClick=location.href='dtlist.asp'></td>"
response.Write "</tr>"
response.Write "</table>"
end if
end if%>
</tr>
</table>
</tr>
</table>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?