📄 orderdetail.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "order","read"
dim conn
dim rs
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
sql="select * from MaterialTransaction where orderlineid in(select lineid from orderline where orderid="&request("orderid")&")"
set rs=conn.Execute(sql)
if not rs.EOF then
'检查合同细目发货情况
sql = "select lineid from orderline where orderid="&Request("orderid")&" and Qty<>issuedqty"
Set rs = conn.Execute(sql)
If rs.EOF Then
conn.Execute("update [order] set status='发货完成' where orderid="&Request("orderid"))
Else
conn.Execute("update [order] set status='部分发货' where orderid="&Request("orderid"))
End If
end if
set rs=conn.Execute("select * from v_order where orderid="&request("orderid"))
%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=rs("ordernum")%></title>
</head>
<script language="JavaScript">
function window_onload()
{
window.moveTo(-2,-2);
window.resizeTo(screen.availWidth, screen.availHeight);
}
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";');
}
}
</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("ordernum")%></font></b></td>
<td width="65%"><a href="orderprint.asp?orderid=<%=Request.QueryString("orderid")%>"><img src="../images/printorder.gif" border=0></a>
<a href="newdelivery.asp?orderid=<%=Request.QueryString("orderid")%>"><img src="../images/createdelivery.gif" border=0></a>
<%if session("admin") then%>
<a href="javascript:opensubwin('resizable=yes, scrollbars=yes, left=200, top=100, menubar=no, location=no, toolbar=no ,width=600, height=400','complete.asp?ordernum=<%=rs("ordernum")%>&signeddate=<%=rs("signeddate")%>&account=<%=rs("account")%>&orderid=<%=request("orderid")%>');"><img src="../images/complete.jpg" border=0></a>
<%end if%>
</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("ordernum")%></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"><%=formatnumber(rs("totalamount"),2)%></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("signeddate")%></td>
<td align=center bgcolor="DEDFDE">发货日期</td>
<td align=center bgcolor="efefef"><%=rs("shipdate")%></td>
<td align=center bgcolor="DEDFDE">发货地址</td>
<td align=center bgcolor="efefef"><%=rs("shipaddress")%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align=center height=18 bgcolor="DEDFDE">货币代码</td>
<td align=center bgcolor="efefef"><%=rs("currencycode")%></td>
<td align=center bgcolor="DEDFDE">客户采购单号</td>
<td align=center bgcolor="efefef"><%=rs("customerpo")%></td>
<td align=center bgcolor="DEDFDE">来自报价单</td>
<td align=center bgcolor="efefef"><a href="javascript:opensubwin3('../quote/quotedetail.asp?quoteid=<%=rs("fromquoteid")%>','','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=600,height=300,top=150,left=160');"><%=rs("quoteno")%></a></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align=center height=18 bgcolor="DEDFDE">销售机会</td>
<td align=center bgcolor="efefef"><%=rs("subject")%></td>
<td align=center bgcolor="DEDFDE"> </td>
<td align=center bgcolor="efefef"> </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 connorderline
dim rsorderline
set connorderline=server.CreateObject("adodb.connection")
set rsorderline=server.CreateObject("adodb.recordset")
connorderline.Open connstring
rsorderline.Open "select * from v_orderline where orderid="&request("orderid"),connorderline,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 bgcolor="efefef">
<td width="3%" height="15" align=center>序号</td>
<td width="12%" height=15 align=center>货号</td>
<td height="15" align=center>型号</td>
<td width="5%" height="15" align=center>数量</td>
<td width="6%" height="15" align=center>已发量</td>
<td width="5%" height="15" align=center>退货量</td>
<td width="5%" align=center>保留量</td>
<td width="5%" align=center>已定量</td>
<td width="8%" align=center>预计货期</td>
<td width="8%" align=center>入库货期</td>
<td width="4%" height="15" align=center>折扣</td>
<td width="5%" height="15" align=center>折扣价</td>
<td width="6%" align=center>金额</td>
<td width="8%" align=center>货期</td>
<td width="8%" height="15" align=center>保留</td>
</tr>
<%i=1
do while not rsorderline.EOF%>
<tr bgcolor="#FFFFFF">
<td align=center><%=i%></td>
<td height=18 align=center bgcolor="#FFFFFF"><%=rsorderline("productcode")%></a></td>
<td align=center><%=rsorderline("model")%></td>
<td align=center><%=rsorderline("qty")%></td>
<td align=center><%=rsorderline("issuedqty")%></td>
<td align=center><%=rsorderline("returnqty")%></td>
<td align=center><%if rsorderline("rsvdqty")<>"" then response.Write(rsorderline("rsvdqty")) else response.Write(0)%></td>
<td align=center>
<%if isnull(rsorderline("poqty")) then response.write "--" else response.write rsorderline("poqty")%>
</td>
<td align=center><%=rsorderline("deliverydate")%></td>
<td align=center><%=rsorderline("receiveddate")%></td>
<td align=center><%=rsorderline("discount")%>%</td>
<td align=center><%=formatnumber(rsorderline("discountprice"),2)%></td>
<td align=center><%=formatnumber(rsorderline("amount"),2)%></td>
<td align=center><%=rsorderline("shipdate")%></td>
<td align=center>
<%if rs("status")="初始" or rs("status")="保留中" or rs("status")="部分发货" then%>
<a href="javascript:opensubwin3('orderreserve.asp?orderid=<%=request("orderid")%>&productid=<%=rsorderline("productid")%>&lineid=<%=rsorderline("lineid")%>&issuedqty=<%=rsorderline("issuedqty")%>&qty=<%=rsorderline("qty")%>&productcode=<%=rsorderline("productcode")%>&model=<%=rsorderline("model")%>','','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=600,height=300,top=150,left=160');">申请</a>
<a href="javascript:opensubwin3('orderreserve.asp?cancelreserve=yes&lineid=<%=rsorderline("lineid")%>&orderid=<%=Request.QueryString("orderid")%>','','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,width=520,height=360,top=150,left=160');">取消</a>
<%end if%>
</td>
</tr>
<%
i=i+1
rsorderline.MoveNext
loop
rsorderline.Close
set rsorderline=nothing
connorderline.Close
set connorderline=nothing
%>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -