📄 rkthjzlist.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/sell.asp" -->
<!--#include file="../Fun_JS.asp" -->
<%
if request("qif")<>"" and request("qvalue")<>"" then
session("varif") = Request("qif")
session("varvalue") = Request("qvalue")
else
if session("varif")="" then
session("varif") = "thph"
session("varvalue") = "%"
end if
end if
'查询未结清账目的入库退货票号
set rsthph = Server.CreateObject("ADODB.Recordset")
rs_rkth = "SELECT * FROM dbo.tab_thph_rk WHERE " + Replace(session("varif"), "'", "''") +_
" = '" + Replace(session("varvalue"), "'", "''") + "' and whether = '否'"
rsthph.open rs_rkth,conn,1,3
'查询入库退货结账表中的最大票号
set rsmaxph = Server.CreateObject("ADODB.Recordset")
rs_max = "SELECT MAX(ID) AS MAXID FROM dbo.tab_thjz_rk "
rsmaxph.open rs_max,conn,1,3
%>
<html>
<head>
<title>网上商品交易系统--应收管理!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet">
<%
Dim no,cno,mymonth,cmonth,cday
no=trim(rsmaxph("MAXID"))
if (month(date())<10) then
cmonth="0"+Cstr(month(date()))
else
cmonth=Cstr(month(date()))
end if
if (day(date())<10) then
cday="0"+Cstr(day(date()))
else
cday=Cstr(day(date()))
end if
select case len(int(Right(no,5)+1))
case 1
cno="0000"+Cstr(int(Right(no,5)+1))
case 2
cno="000"+Cstr(int(Right(no,5)+1))
case 3
cno="00"+Cstr(int(Right(no,5)+1))
case 4
cno="0"+Cstr(int(Right(no,5)+1))
case 5
cno=Cstr(int(Right(no,5)+1))
case Else
cno="00001"
end select
intno="JK"+Cstr(year(date()))+cmonth+cday+cno
session("autonum")=intno
%>
<Script language="Javascript">
function autoje(){
if(form1.ws.value-form1.bcjk.value < 0)
{alert("结款金额不应大于未收金额!");form1.bcjk.focus();return;}
form1.ye.value=form1.ws.value-form1.bcjk.value;
}
</script>
<script language="JavaScript">
function check()
{
if (form1.bcjk.value==0)
{ alert("请输入结帐金额!");form1.bcjk.focus();return;}
str=form1.bcjk.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.bcjk.focus();return;}
}
if (CheckDate(form1.jkdate.value))
{alert("请输入标准日期(如:2004/09/27或2004-09-27)");form1.jkdate.focus();return;}
if (form1.jkczy.value=="")
{alert("您的使用权限已过期,请重新登录!");window.parent.location.href='../login.asp';return;}
if (form1.jkjsr.value=="")
{alert("请输入经手人姓名!");form1.jkjsr.focus();return;}
form1.hthph.value=form1.thph.value;
form1.hgysname.value=form1.gysname.value;
form1.hjkph.value=form1.jkph.value;
form1.hye.value=form1.ye.value;
form1.submit();
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../../images/bg.gif">
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="269">
<tr>
<td height="356" valign="top">
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="182">
<tr>
<td height="326" valign="top">
<form name="form1" method="post" action="rkthjzok.asp">
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="128">
<tr>
<td height="142" valign="top" align="center">
<table width="480" border="0" cellspacing="-2" cellpadding="-2" height="135">
<% if rsthph.eof then
response.Write("<b><font color="""+"#990000"""+_
"><br><br><br><br><br>无此记录!</font></b>")
response.End()
end if%>
<%'分页'
total=0
rsthph.pagesize=1
page=CLng(Request("page"))
if page<1 then page=1
rsthph.absolutepage=page
for i=1 to rsthph.pagesize %>
<tr>
<td width="73">退货票号:</td>
<td width="180">
<input type="text" name="thph" disabled=".t." value="<%=rsthph("thph")%>">
</td>
<td width="69">数 量:</td>
<td width="158">
<input type="text" name="sl" disabled=".t." value="<%=rsthph("sl")%>">
</td>
</tr>
<tr>
<td width="73">供应商全称:</td>
<td width="180">
<input type="text" name="gysname" disabled=".t." value="<%=rsthph("gysname")%>">
</td>
<td width="69">应 收:</td>
<td width="158">
<input type="text" name="ys" disabled=".t." value="<%=rsthph("ys")%>">
</td>
</tr>
<tr>
<td width="73">实 收:</td>
<td width="180">
<input type="text" name="ss" disabled=".t." value="<%=rsthph("ss")%>">
</td>
<td width="69">未 收:</td>
<td width="158">
<input type="text" name="ws" disabled=".t." value="<%=rsthph("ws")%>">
<% session("ws")=rsthph("ws") %>
</td>
</tr>
<tr>
<td width="73">退货日期:</td>
<td width="180">
<input type="text" name="xsdate" disabled=".t." value="<%=rsthph("thdate")%>">
</td>
<td width="69">操
作 员:</td>
<td width="158">
<input type="text" name="czy" disabled=".t." value="<%=rsthph("czy")%>">
</td>
</tr>
<tr>
<td width="73">结算方式:</td>
<td width="180">
<input type="text" name="jsfs" disabled=".t." value="<%=rsthph("jsfs")%>">
</td>
<td width="69">经
手 人:</td>
<td width="158">
<input type="text" name="jsr" disabled=".t." value="<%=rsthph("jsr")%>">
</td>
</tr>
<% rsthph.movenext
if rsthph.eof then exit for
next %>
</table>
<table width="480" border="0" cellspacing="-2" cellpadding="-2">
<tr>
<td height="25" width="195">
<% if page<>1 then %><a href=<%=path%>?page=1 class="l">第一页</a>
<a href=<%=path%>?page=<%=(page-1)%> class="l">上一页</a>
<%end if
if page<>rsthph.pagecount then %>
<a href=<%=path%>?page=<%=(page+1)%> class="l">下一页</a>
<a href=<%=path%>?page=<%=rsthph.pagecount%> class="l">最后一页</a>
<%end if %>
</td>
<td height="17" width="285"> </td>
</tr>
</table>
</td>
</tr>
<% if (not rsthph.eof or not rsthph.bof) then %>
<tr>
<td height="100" valign="middle">
<div align="center">
<table width="480" border="0" cellspacing="-2" cellpadding="-2" height="81" align="center">
<tr>
<td height="27" width="74">结款票号:</td>
<td height="27" width="176">
<input type="text" name="jkph" disabled=".t." value=<%=session("autonum") %>>
</td>
<td height="27" width="72">结款日期:</td>
<td height="27" width="158">
<input type="text" name="jkdate" value="<%=date() %>">
</td>
</tr>
<tr>
<td height="27" width="74">本次结款:</td>
<td height="27" width="176">
<input type="text" name="bcjk" onblur=autoje() value="0">
</td>
<td height="27" width="72">余 额:</td>
<td height="27" width="158">
<input type="text" name="ye" disabled=".t." value=<%=session("ws") %>>
</td>
</tr>
<tr>
<td height="27" width="74">操 作 员:</td>
<td height="27" width="176">
<input name="jkczy" type="text" value="<%=session("UserID")%>" readonly="yes">
</td>
<td height="27" width="72">经 手 人: </td>
<td height="27" width="158">
<input type="text" name="jkjsr">
</td>
</tr>
<tr>
<td height="27" colspan="4">
<div align="center">
<input type="hidden" name="hye">
<input type="hidden" name="hthph">
<input type="hidden" name="hjkph">
<input type="hidden" name="hgysname">
<input type="button" name="Button" value="确定" onclick=check()>
<input type="reset" name="Submit2" value="取消">
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<% end if %>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -