📄 slipdetail.jsp
字号:
<jsp:useBean id="salesSlip" class="src.wuyang.SalesSlip" scope="page"/>
<jsp:useBean id="slipProduct" class="src.wuyang.SlipProduct" scope="page"/>
<jsp:useBean id="employee" class="src.wuyang.Employee" scope="page"/>
<jsp:useBean id="product" class="src.wuyang.Production" scope="page"/>
<jsp:useBean id="dept" class="src.wuyang.Department" scope="page"/>
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>
<% if (global.isLogined == false) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="-4" />
</jsp:forward>
<% }
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body bgcolor=#949b93>
<table width="100%" border="1" height="88%" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" >
<td valign="top">
<blockquote> <br>
<%!String mode;%>
<%!String str;%>
<%
/*
0 初始
1 部门经理审核通过
2 销售部审核通过
3 总经理审核通过
4 审核未通过
*/
String slipId = request.getParameter("slipId");
String pack[] = {"带包装","净水"};
String format[] = {"计划内","计划外"};
String str1[]={"现金","汇票","转帐"};
String str2[]={"自提","直发","送货"};
String str3[]={"要求部门经理审核","部门经理通过","","高层审核通过","审核不通过","出入库","发票","完成","完成"};
salesSlip.load(slipId);
%>
<table width="88%" border="1" bordercolorlight="#000000" bordercolordark="#CCCCCC" cellpadding="0" cellspacing="0">
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>销售单编号:</b></div>
</td>
<td width="146" class="textb"><%=slipId%></td>
<td width="78" class="text" bgcolor="#949b93"><b>申请日期:</b></td>
<td width="139" class="textb">
<%
if ((salesSlip.getSlipDate()!=null)&&(!salesSlip.getSlipDate().equals(""))) {%>
<%=salesSlip.getStringDate(salesSlip.getSlipDate(),1)%>年<%=salesSlip.getStringDate(salesSlip.getSlipDate(),2)%>月<%=salesSlip.getStringDate(salesSlip.getSlipDate(),3)%>日</td>
<%}
else
{out.println(" ");}
%>
</tr>
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>客户编号:</b></div>
</td>
<td width="146" class="textb">
<%
if((salesSlip.getCustomerId()!=null)&&(!salesSlip.getCustomerId().equals(""))) {
out.println(salesSlip.getCustomerId());}
else
{out.println(" ");}%>
</td>
<td width="78" class="text" bgcolor="#949b93"><b>申请人:</b></td>
<td width="139" class="textb">
<%
if((salesSlip.getProposer()!=null)&&(!salesSlip.getProposer().equals(""))) {
employee.load(salesSlip.getProposer());
out.println(employee.getEmpName());}
else
{out.println(" ");}%>
</td>
</tr>
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>申请部门:</b></div>
</td>
<td width="146" class="textb">
<%
if ((salesSlip.getDeptId()!=null)&&(!salesSlip.getDeptId().equals(""))) {
dept.load(salesSlip.getDeptId());
out.println(dept.getDeptName());}
else
{out.println(" ");}%>
</td>
<td width="78" class="text" bgcolor="#949b93"><b>发货地:</b></td>
<td width="139" class="textb">
<%
if ((salesSlip.getFromAddress()!=null)&&(!salesSlip.getFromAddress().equals(""))) {
out.println(salesSlip.getFromAddress());}
else
{out.println(" ");}%>
</td>
</tr>
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>总金额:</b></div>
</td>
<td width="146" class="textb">
<%
if (salesSlip.getTotalPrice()!=0) {
out.println(salesSlip.doubleFormat(salesSlip.getTotalPrice(),2));}
else
{out.println(" ");}%>
</td>
<td width="78" class="text" bgcolor="#949b93"><b>付款方式:</b></td>
<td width="139" class="textb"><%=str1[salesSlip.getCreaditMethod()]%></td>
</tr>
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>汇票号:</b></div>
</td>
<td width="146" class="textb">
<%
if ((salesSlip.getHuiPiaoId()!=null)&&(!salesSlip.getHuiPiaoId().equals(""))) {
out.println(salesSlip.getHuiPiaoId());}
else
{out.println(" ");}%>
</td>
<td width="78" class="text" bgcolor="#949b93"><b>转帐号:</b></td>
<td width="139" class="textb">
<%
if ((salesSlip.getZhuanZhId()!=null)&&(!salesSlip.getZhuanZhId().equals(""))) {
out.println(salesSlip.getZhuanZhId());}
else
{out.println(" ");}%>
</td>
</tr>
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>取汇日期:</b></div>
</td>
<td width="146" class="textb">
<%if ((salesSlip.getQuHuiDate()!=null)&&(!salesSlip.getQuHuiDate().equals(""))) {%>
<%=salesSlip.getStringDate(salesSlip.getQuHuiDate(),1)%>年<%=salesSlip.getStringDate(salesSlip.getQuHuiDate(),2)%>月<%=salesSlip.getStringDate(salesSlip.getQuHuiDate(),3)%>日</td>
<%}
else
{out.println(" ");}%>
<td width="78" class="text" bgcolor="#949b93"><b>合同编号:</b></td>
<td width="139" class="textb">
<%
if ((salesSlip.getContractId()!=null)&&(!salesSlip.getContractId().equals(""))) {
out.println(salesSlip.getContractId());}
else
{out.println(" ");}%>
</td>
</tr>
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>发货方式:</b></div>
</td>
<td colspan="3" class="textb"><%=str2[salesSlip.getDelivWay()]%></td>
</tr>
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>备注:</b></div>
</td>
<td colspan="3" class="textb">
<%
if ((salesSlip.getComment()!=null)&&(!salesSlip.getComment().equals(""))) {
out.println(salesSlip.getComment()+" ");}
else
{out.println(" ");}%>
</td>
</tr>
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>部门经理:</b></div>
</td>
<td width="146" class="textb">
<%
if ((salesSlip.getDeptManager()!=null)&&(!salesSlip.getDeptManager().equals(""))) {
employee.load(salesSlip.getDeptManager());
out.println(employee.getEmpName());}
else
{out.println(" ");}%>
</td>
<td width="78" class="text" bgcolor="#949b93"><b>批准人:</b></td>
<td width="139" class="textb">
<%
if ((salesSlip.getRatifier()!=null)&&(!salesSlip.getRatifier().equals(""))) {
employee.load(salesSlip.getRatifier());
out.println(employee.getEmpName());}
else
{out.println(" ");}%>
</td>
</tr>
<tr>
<td width="107" class="text" bgcolor="#949b93">
<div align="left"><b>开票单状态:</b></div>
</td>
<td width="146" class="textb"><%=str3[salesSlip.getSlipState()]%></td>
<td width="78" class="text" bgcolor="#949b93"><b>形式:</b></td>
<td width="139" class="textb">
<% out.println(format[salesSlip.getFormat()]);%>
</td>
</tr>
</table>
<%slipProduct.query("slipId='" + slipId +"'","");%>
<table width="88%" border="1" class="text" cellpadding="0" cellspacing="0" borderColorLight=#666666 borderColorDark=#cccccc>
<tr bgcolor="#949B93">
<td align="center" class="text">
<div align="center"><b>产品编号</b></div>
</td>
<td align="center" class="text">
<div align="center"><b>产品名称</b></div>
</td>
<td align="center" class="text">
<div align="center"><b>规格/型号</b></div>
</td>
<td align="center" class="text">
<div align="center"><b>产品件数</b></div>
</td>
<td align="center" class="text">
<div align="center"><b>数量</b></div>
</td>
<td align="center" class="text">
<div align="center"><b>包装</b></div>
</td>
<td align="center" class="text">
<div align="center"><b>单价</b></div>
</td>
<td align="center" class="text">
<div align="center"><b>实际数量</b></div>
</td>
</tr>
<%
float totalPrice=0;
while(slipProduct.next()>0){
product.load(slipProduct.getProductId());
%>
<tr>
<td align="center" class="textb"><%=slipProduct.getProductId()%></td>
<td align="center" class="textb"><%=product.getProductName()%></td>
<td align="center" class="textb"><%=product.getProductDesc()%></td>
<td align="right" class="textb"><%=slipProduct.doubleFormat(slipProduct.getCounting(),0)%></td>
<td align="right" class="textb"><%=slipProduct.doubleFormat(slipProduct.getQuantity(),2)%></td>
<td align="right" class="textb"><%=pack[slipProduct.getPack()]%></td>
<td align="right" class="textb"><%=slipProduct.doubleFormat(slipProduct.getUnitPrice(),2)%></td>
<td align="right" class="textb"><%=slipProduct.doubleFormat(slipProduct.getActQuantity(),2)%></td>
</tr>
<%
float subPrice=slipProduct.getUnitPrice()*slipProduct.getQuantity();
totalPrice = totalPrice + subPrice;
}
%>
</table>
<span class="textb"><b>总金额:</b> <%=slipProduct.doubleFormat(totalPrice,2)%> </span></blockquote>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -