📄 podetail.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "po","read"
set objcheck=nothing
dim conn
dim rs
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
rs.Open "select * from v_po where poid="&request("poid"),conn,1,1
if rs.EOF then
Response.Write "记录不存在"
Response.End
end if
%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=rs("pono")%></title>
</head>
<script language="JavaScript">
function showit(objname,imgn){
if (eval(objname+'.style.display=="block"') == true)
{
eval(objname+'.style.display="none";');
eval('IMG'+objname+'.style.display="block";');
eval('IMG1'+objname+'.style.display="none";');
//alert('IMG'+objname+'.src = "../images/button2.gif";');
//eval('IMG'+objname+'.src = "../images/button2.gif";');
}
else
{
eval(objname+'.style.display="block";');
eval('IMG'+objname+'.style.display="none";');
eval('IMG1'+objname+'.style.display="block";');
//alert('IMG'+objname+'.src = "../images/button1.gif";');
//eval('IMG'+objname+'.src = "../images/button1.gif";');
}
}
function window_onload()
{
window.moveTo(-2,-2);
window.resizeTo(screen.availWidth, screen.availHeight);
}
</script>
<body bgcolor="#ffffff" onload="window_onload()">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="35%"><b><font class="title">采购:<%=rs("pono")%></font></b></td>
<td width="65%"> <a href="poprint.asp?poid=<%=Request.QueryString("poid")%>"><!--img src="../images/printpo.gif" border=0></a> <a href="inquireprintresult.asp?poid=<%'=Request.QueryString("poid")%>"><img src="../images/printinquire.gif" border=0></a--></td>
</tr>
<tr >
<td height="16" colspan="2" background="../images/title.gif"></td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DECFAD">
<tr>
<td width="10%" height=20 align=center bgcolor="DEDFDE">采购单号</td>
<td width="25%" align=center bgcolor="efefef"><%=rs("pono")%></td>
<td width="10%" align=center bgcolor="DEDFDE">状态</td>
<td width="20%" align=center bgcolor="efefef"><%=rs("status")%></td>
<td width="10%" align=center bgcolor="DEDFDE">总金额</td>
<td width="25%" align=center bgcolor="efefef"><%if rs("totalamount")<>"" then Response.write formatnumber(rs("totalamount"),2) else Response.Write 0%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align=center height=18 bgcolor="DEDFDE">客户</td>
<td align=center bgcolor="efefef"><%=rs("account")%></td>
<td align=center bgcolor="DEDFDE">联系人</td>
<td align=center bgcolor="efefef"><%=rs("contact")%></td>
<td align=center bgcolor="DEDFDE">电话</td>
<td align=center bgcolor="efefef"><%=rs("workphone")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align=center height=18 bgcolor="DEDFDE">付款方式</td>
<td align=center bgcolor="efefef"><%=rs("term")%></td>
<td align=center bgcolor="DEDFDE">运货方式</td>
<td align=center bgcolor="efefef"><%=rs("shipvia")%></td>
<td align=center bgcolor="DEDFDE">所有者</td>
<td align=center bgcolor="efefef"><%=rs("owner")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align=center height=18 bgcolor="DEDFDE">创建日期</td>
<td align=center bgcolor="efefef"><%=rs("podate")%></td>
<td align=center bgcolor="DEDFDE">货币代码</td>
<td align=center bgcolor="efefef"><%=rs("currencycode")%></td>
<td align=center bgcolor="DEDFDE"> </td>
<td align=center bgcolor="efefef"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td align=center height=18 bgcolor="DEDFDE">描述</td>
<td colspan="5" align=center bgcolor="efefef">
<div align="left"><%=rs("description")%></div></td>
</tr>
</table>
<%
dim connpoline
dim rspoline
set connpoline=server.CreateObject("adodb.connection")
set rspoline=server.CreateObject("adodb.recordset")
connpoline.Open connstring
rspoline.Open "select * from v_poline where poid="&request("poid")&" order by lineid",connpoline,1,1
%>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><strong><font size="2"><b><font class="title">采购明细</font></b></font></strong></td>
</tr>
<tr>
<td height=2 colspan="2" bgcolor="#4A699C"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="DECFAD">
<tr valign="middle" bgcolor="efefef">
<td width="5%" height="15" align=center>序号</td>
<td width="8%" height=15 align=center>货号</td>
<td height="15" align=center>型号</td>
<td width="6%" height="15" align=center>数量</td>
<td width="6%" height="15" align=center>已收量</td>
<td width="6%" align=center>入库日期</td>
<td width="6%" align=center>价格</td>
<td width="6%" height="15" align=center>金额</td>
<td width="8%" height="15" align=center>希望日期</td>
<td width="8%" height="15" align=center>确认日期</td>
<td width="8%" height="15" align=center>SLIP编号</td>
<td width="8%" height="15" align=center>特价编号</td>
<td width="8%" height="15" align=center>备注</td>
</tr>
<%i=1
do while not rspoline.EOF%>
<tr bgcolor="#FFFFFF">
<td align=center><%=i%></td>
<td align=center height=18><%=rspoline("productcode")%></td>
<td align=center><%=rspoline("model")%></td>
<td align=center><%=rspoline("qty")%></td>
<td align=center>
<%if cint(rspoline("issuedqty"))=cint(rspoline("qty")) then
response.write "<font color=blue>"&rspoline("issuedqty")&"</font>"
else
response.write "<font color=red>"&rspoline("issuedqty")&"</font>"
end if
%>
</td>
<td align=center><%=rspoline("receiveddate")%></td>
<td align=center><%=rspoline("price")%></td>
<td align=center><%=formatnumber(rspoline("amount"),2)%></td>
<td align=center><%=rspoline("expecteddate")%></td>
<td align=center><%=rspoline("confirmeddate")%></td>
<td align=center><%=rspoline("slipno")%></td>
<td align=center><%=rspoline("specialpriceno")%></td>
<td align=center><%=rspoline("description")%></td>
</tr>
<%
i=i+1
rspoline.MoveNext
loop
%>
</table>
<b><br>
</b>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b> <font color=#0000FF>预付款记录</font> <a href="javascript:opensubwin3('../popayment/newpay.asp?straccountid=<%=rs("accountid")%>&straccount=<%=rs("account")%>&stramount=<%=rs("totalamount")%>&strpoid=<%=rs("poid")%>&strpono=<%=rs("pono")%>','','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=520,height=360,top=150,left=160');"><img src="../images/button_new.gif" border=0></a></b>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="EADBB8">
<tr bgcolor="#FFCCFF">
<td align=center>No.</td>
<td align=center>金额</td>
<td align=center>日期</td>
<td align=center>创建人</td>
<td align=center>类型</td>
<td> 操作</td>
</tr>
<%
sql="select * from v_pay where (popaymentid=-1 or popaymentid is null) and poid="&rs("poid")
'response.Write(sql)
set rsc=conn.Execute(sql)
if not rsc.eof then
i=1
do while not rsc.eof
%>
<tr bgcolor=white>
<td width=40 align=center><font color=red><%=i%></font></td>
<td width=80 align=right><%=formatnumber(rsc("amount"),2)%></td>
<td width=80 align=center><%=rsc("receiveddate")%></td>
<td width=80 align=center><%=rsc("username")%></td>
<td width=80 align=center><%=rsc("paytype")%></td>
<td> <a href="javascript:opensubwin3('../popayment/newpay.asp?id=<%=rsc("payid")%>','','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=520,height=360,top=150,left=160');">编辑</a>
<a href="javascript:opensubwin3('../delete.asp?pono=<%=rs("pono")%>&account=<%=rs("account")%>&amount=<%=rsc("amount")%>&payid=<%=rsc("payid")%>','','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=300,height=200,top=200,left=300');">删除</a></td>
</tr>
<%
i=i+1
rsc.movenext
loop
else
%>
<tr>
<td colspan=6 bgcolor=white> 无记录</td>
</tr>
<%
end if
%>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b> <font color=#0000FF>预收发票记录</font> <a href="javascript:opensubwin3('../popayment/newinvoice.asp?straccountid=<%=rs("accountid")%>&straccount=<%=rs("account")%>&stramount=<%=rs("totalamount")%>&strpoid=<%=rs("poid")%>&strpono=<%=rs("pono")%>','','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=520,height=360,top=150,left=160');"><img src="../images/button_new.gif" border=0></a></b>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="EADBB8">
<tr bgcolor="#FFCCFF">
<td align=center>No.</td>
<td align=center>金额</td>
<td align=center>发票号</td>
<td align=center>日期</td>
<td align=center>创建人</td>
<td align=center>类型</td>
<td> 操作</td>
</tr>
<%
set rsc=conn.Execute("select * from v_poinvoice where (popaymentid=-1 or popaymentid is null) and poid="&rs("poid"))
if not rsc.eof then
i=1
do while not rsc.eof
%>
<tr bgcolor=white>
<td width=40 align=center><font color=red><%=i%></font></td>
<td width=80 align=right><%=formatnumber(rsc("amount"),2)%></td>
<td width=80 align=center><%=rsc("invoiceno")%></td>
<td width=80 align=center><%=rsc("invoicedate")%></td>
<td width=80 align=center><%=rsc("username")%></td>
<td width=80 align=center><%=rsc("invoicetype")%></td>
<td> <a href="javascript:opensubwin3('../popayment/newinvoice.asp?id=<%=rsc("poinvoiceid")%>','','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=520,height=360,top=150,left=160');">编辑</a>
<a href="javascript:opensubwin3('../delete.asp?pono=<%=rs("pono")%>&account=<%=rs("account")%>&amount=<%=rsc("amount")%>&poinvoiceid=<%=rsc("poinvoiceid")%>','','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=300,height=200,top=200,left=300');">删除</a></td>
</tr>
<%
i=i+1
rsc.movenext
loop
else
%>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -