📄 spxsjzlist.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") = "xsph"
session("varvalue") = "%"
end if
end if
set rsxsph = Server.CreateObject("ADODB.Recordset")
sql_sellph = "SELECT * FROM dbo.tab_sellph WHERE "+Replace(session("varif"), "'", "''") +_
" = '" + Replace(session("varvalue"), "'", "''") + "' and whether = '否'"
rsxsph.open sql_sellph,conn,1,3
'查询最大的结账票号
set rsmaxph = Server.CreateObject("ADODB.Recordset")
sql_max = "SELECT MAX(ID) AS MAXID FROM dbo.tab_selljz "
rsmaxph.open sql_max,conn,1,3
%>
<html>
<head>
<title>网上商品交易系统--应收管理!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet">
<% '生成结账票号
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;}
if(isNaN(form1.bcjk.value))
{alert("您输入的不是有效值(请输入0-9之间的数)!");form1.bcjk.focus();return;}
if(CheckDate(form1.jkdate.value))
{alert("请输入标准日期(如:2002/09/27或2002-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.hxsph.value=form1.xsph.value;
form1.hkhname.value=form1.khname.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="332">
<tr>
<td height="356" valign="top">
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="326">
<tr>
<td height="326" valign="top">
<form name="form1" method="post" action="./spxsjzok.asp">
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="300">
<tr>
<td valign="top" align="center">
<table width="480" border="0" cellspacing="-2" cellpadding="-2" height="135">
<% if rsxsph.eof then
response.Write("<b><font color="""+"#990000"""+_
"><br><br><br><br><br>无此记录!</font></b>")
response.End()
end if%>
<%'分页'
total=0
rsxsph.pagesize=1
page=CLng(Request("page"))
if page<1 then page=1
rsxsph.absolutepage=page
for i=1 to rsxsph.pagesize %>
<tr>
<td width="73" height="27">销售票号:</td>
<td width="180" height="27">
<input type="text" name="xsph" disabled value="<%=rsxsph("xsph")%>">
</td>
<td width="69" height="27">数 量:</td>
<td width="158" height="27">
<input type="text" name="sl" disabled value="<%=rsxsph("sl")%>">
</td>
</tr>
<tr>
<td width="73" height="27">客户全称:</td>
<td width="180" height="27">
<input type="text" name="khname" disabled value="<%=rsxsph("khname")%>">
</td>
<td width="69" height="27">应 收:</td>
<td width="158" height="27">
<input type="text" name="ys" disabled value="<%=rsxsph("ys")%>">
</td>
</tr>
<tr>
<td width="73" height="27">实 收:</td>
<td width="180" height="27">
<input type="text" name="ss" disabled value="<%=rsxsph("ss")%>">
</td>
<td width="69" height="27">未 收:</td>
<td width="158" height="27">
<input type="text" name="ws" disabled value="<%=rsxsph("ws")%>">
<% session("ws")=rsxsph("ws") %>
</td>
</tr>
<tr>
<td width="73" height="27">销售日期:</td>
<td width="180" height="27">
<input type="text" name="xsdate" disabled value="<%=rsxsph("xsdate")%>">
</td>
<td width="69" height="27">操
作 员:</td>
<td width="158" height="27">
<input type="text" name="czy" disabled value="<%=rsxsph("czy")%>">
</td>
</tr>
<tr>
<td width="73" height="27">结算方式:</td>
<td width="180" height="27">
<input type="text" name="jsfs" disabled value="<%=rsxsph("jsfs")%>">
</td>
<td width="69" height="27">经
手 人:</td>
<td width="158" height="27">
<input type="text" name="jsr" disabled value="<%=rsxsph("jsr")%>">
</td>
</tr>
<% rsxsph.movenext
if rsxsph.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<>rsxsph.pagecount then %>
<a href=<%=path%>?page=<%=(page+1)%> class="l">下一页</a>
<a href=<%=path%>?page=<%=rsxsph.pagecount%> class="l">最后一页</a>
<%end if %>
</td>
<td height="25" width="285">
</td>
</tr>
</table>
</td>
</tr>
<% if (not rsxsph.eof or not rsxsph.bof) then %>
<tr>
<td valign="top">
<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="yes" 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="yes" 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="hxsph">
<input type="hidden" name="hjkph">
<input type="hidden" name="hkhname">
<input type="button" name="Button" value="确定" onclick="check()">
<input type="reset" name="Submit2" value="取消">
</div>
</td>
</tr>
<% end if %>
</table>
</div>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -