<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%><%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%><%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
response.setHeader("Cache-Control", "no-cache"); //HTTP 1.1
response.setHeader("Pragma", "no-cache"); //HTTP 1.0
response.setDateHeader("Expires", 0);
%>
<%
String wwwroot = request.getContextPath();
%>
<%@page contentType="text/html; charset=utf-8" language="java" errorPage=""%>
<%@page import="java.util.Map"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Iterator"%>
<%@page import="com.qeweb.sanygsp.model.logistics.LmGoodsDeliveryItemPO"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> </title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="../../css/style.css">
<style media=print>
.Noprint {
display: none;
}
.PageNext {
page-break-after: always;
}
</style>
<style>
body {
font-family: "宋体";
color: #484848;
font-size: 13px;
}
.tdp {
border-bottom: 1 solid #000000;
border-left: 1 solid #000000;
border-right: 0 solid #ffffff;
border-top: 0 solid #ffffff;
}
.tabp {
border-color: #000000 #000000 #000000 #000000;
border-style: solid;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 1px;
border-left-width: 1px;
}
.NOPRINT {
font-family: "宋体";
font-size: 9pt;
}
table.simple td,table.simple th {
border: 2px solid #ccc;
vertical-align: middle;
text-align: center;
}
.queryListcontainer {
padding: 2px;
margin-left: 8px;
margin-right: 2px;
background: white
}
table.simple thead tr {
background-color: #ffffff;
}
table.simple tr.even {
background-color: #FFF;
height: 30px;
onmouseover: expression(onmouseover=function (){this.style.backgroundColor ='#FC9';});
onmouseout: expression(onmouseout=function (){this.style.backgroundColor ='#FFF';});
}
table.simple {
border: 1px solid #ccc;
border-collapse: collapse;
width: 100%;
}
table.simple td,table.simple th {
border: 1px solid #ccc;
}
tr.odd {
background-color: #EDF4FE;
onmouseover: expression(onmouseover=function (){this.style.backgroundColor ='#FC9';});
onmouseout: expression(onmouseout=function (){this.style.backgroundColor ='#EDF4FE';});
height: 30px;
}
</style>
</head>
<body>
<%
Map<String, List<LmGoodsDeliveryItemPO>> pM = (Map<String, List<LmGoodsDeliveryItemPO>>) request.getAttribute("printTable");
Integer printTableNum = (Integer) request.getAttribute("printTableNum");
%>
<DIV class="queryListcontainer" align="left"><span id='div1'>
<hr>
<center class="Noprint"><span class="wp_btn wp_btn2"><a href="javascript:window.close();"><b class="btn_closewindow btn_image"></b><span class="btn_text">关闭</span></a></span> <span class="wp_btn wp_btn2"><a href="#"
onclick="doPrint();"><b class="btn_print btn_image"></b><span class="btn_text">打印</span></a></span></center>
<%
if (pM != null && pM.size() > 0) {
int curPage = 0;
for (Iterator it = pM.entrySet().iterator(); it.hasNext();) {
curPage++;
Map.Entry entry = (Map.Entry) it.next();
List printList = pM.get(entry.getKey());
%>
<table style="width: 740px;">
<TR>
<TD colspan="3" style="text-align: center;"><B><font size="5"><bean:message key="btn.logistics.print.bill.receive.point" /></font> </B></TD>
</TR>
<TR>
<td style="width: 80px;"> </td>
<TD><bean:message key="label.common.logistics.resultlist.vendorCode" />:<bean:write name="vendorCode" /></TD>
<TD><bean:message key="label.common.logistics.resultlist.vendorName" />:<bean:write name="vendorName" /></TD>
</TR>
<TR>
<td style="width: 80px;"> </td>
<TD><bean:message key="label.common.logistics.resultlist.goodsDelvCode" />:<bean:write name="goodsDelvCode" /></TD>
<TD><bean:message key="label.common.logistics.resultlist.arriveDatetime" />:<bean:write name="passTime" /></TD>
</TR>
</table>
<table class="simple" style="width: 740px;" id="row">
<thead>
<tr>
<th style="width: 75px;" nowrap="nowrap"><bean:message key="label.common.logistics.resultlist.materialName" /></th>
<th><bean:message key="label.common.logistics.resultlist.materialDesc" /></th>
<th><bean:message key="label.common.logistics.resultlist.materialUnit" /></th>
<th style="width: 35px;"><bean:message key="label.common.logistics.resultlist.materialCheckProperty" /></th>
<th style="width: 35px;"><bean:message key="label.common.logistics.resultlist.qualityPlantCode" /></th>
<th style="width: 35px;"><bean:message key="label.common.logistics.resultlist.storageAddr" /></th>
<th style="width: 35px;"><bean:message key="label.common.logistics.resultlist.storageAttr" /></th>
<th style="width: 40px;"><bean:message key="label.common.logistics.resultlist.storagePeople" /></th>
<th style="width: 40px;"><bean:message key="label.common.logistics.resultlist.storageLocation" /></th>
<th><bean:message key="label.common.logistics.resultlist.delvQty.buyer" /></th>
<th><bean:message key="label.common.logistics.resultlist.eligibleQty" /></th>
<th><bean:message key="label.common.logistics.resultlist.returnQty" /></th>
<th><bean:message key="label.common.logistics.resultlist.vouchCode" /></th>
</tr>
</thead>
<tbody>
<%
for (int i = 0; i < printList.size(); i++) {
LmGoodsDeliveryItemPO itemPo = (LmGoodsDeliveryItemPO) printList.get(i);
%>
<tr class="odd">
<td><%=itemPo.getMaterialCode()%></td>
<td><%=itemPo.getMaterialNameCn()%></td>
<td><%=itemPo.getMeasureUnit()%></td>
<td><%=(itemPo.getZjflag() == null || "".equals(itemPo.getZjflag())) ? " " : itemPo.getZjflag()%></td>
<td><%=(itemPo.getWerks() == null || "".equals(itemPo.getWerks())) ? " " : itemPo.getWerks()%></td>
<td><%=(itemPo.getLgort() == null || "".equals(itemPo.getLgort())) ? " " : itemPo.getLgort()%></td>
<td><%=(itemPo.getLtkze() == null || "".equals(itemPo.getLtkze())) ? " " : itemPo.getLtkze()%></td>
<td><%=(itemPo.getQname() == null || "".equals(itemPo.getQname())) ? " " : itemPo.getQname()%></td>
<td><%=(itemPo.getNlpla() == null || "".equals(itemPo.getNlpla())) ? " " : itemPo.getNlpla()%></td>
<td><%=(itemPo.getDelvQty() == null || "".equals(itemPo.getDelvQty())) ? " " : itemPo.getDelvQty()%></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<%
}
%>
</table>
<br>
<TABLE style="width: 740px;">
<TR>
<TD><bean:message key="label.common.logistics.resultlist.tallyClerk" />:</TD>
<TD width="20%"></TD>
<TD><bean:message key="label.common.logistics.resultlist.qualityPeople" />:</TD>
<TD width="20%"></TD>
<TD><bean:message key="label.common.logistics.resultlist.receivePeople" />:</TD>
<TD width="20%"></TD>
</TR>
</TABLE>
<%
if (curPage < printTableNum.intValue()) {
%>
<hr align="center" width="100%" size="1" noshade class="NOPRINT">
<!--分页-->
<div class="PageNext"></div>
<%
}
%> <%
}
}
%>
</DIV>
<script type="text/javascript">
function doPrint(){
if(window.confirm('<bean:message key="btn.printConfirm"/>')){
window.print();
}
}
function doClose(){
window.close();
}
</script>
</body>
</html>
分享到:
相关推荐
使用JS的Window对象的Print方法实现兼容性强的分页打印功能,可直接运行,代码直接复制即可用。
wpf分页打印打印(使用printDialog.PrintDocument打印flowDocument流文档)第一版本。以后功能完善了更新第二版本。 使用此方法打印:printDialog.PrintDocument(((IDocumentPaginatorSource)flowDocument)....
利用jquery插件jqprint打印当前页面的标签内容,自动换页,包含jar包,js,java代码。
代码如下: <%... charset=UTF-8″ pageEncoding=”UTF-8″%> <!... <HEAD>...javascript打印-打印页面设置-打印预览代码</TITLE> <META http-equiv=Content-Type content=”text/html
网页表格默认打印 分页会断开,很难看. 本人研究2天才解决 设置a4纸页边距为13mm,打印预览该网页看看,分页完美 如果你的打印效果不对, 可能需要改一下里面的参数,反正原理肯定对的
html页面打印时,通过样式表进行分页打印控制。
1.Web Html 分页打印 2.内容、图片、表格跨页断裂,封边 3.table并行、并列双边、重边 4.自动计算页码(总数及每一页),样式、位置、形式完全个性化 5.页眉页脚,去除浏览默认,自定义内容、样式、位置 6.保持页脚...
使用js实现打印分页的功能(包括页码,表头,表尾)
vue实现页面打印自动分页的两种方法 本文实例为大家分享了vue实现页面打印自动分页的具体代码,供大家参考,具体内容如下 一、通过ref方式获取元素进行打印 1.封装一个js文件 // 打印类属性、方法定义 /* ...
1.首先引入一个WebBrowser在需要打印的页面,可以直接添加: 代码如下: <object id=”WebBrowser” classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=”0″ width=”0″> </object> 到页面...
js打印,将数据读取到打印页面,用js截取,从而...打印的时候如果页面数据过多,打印机可以自动分页打印!我的是hp的打印机,下载的朋友可以试试!注意,本人声明:这个并不是针对于打印分页而写,只是普通的js打印!
在调用window.print()时,可以实现打印效果,但内容太多时要进行分页打印。 在样式中有规定几个打印的样式 page-break-before和page-break-after CSS属性并不会修改网页在屏幕上的显示,这两个属性是用来控制文件的...
非常实用好看的特效代码,可以完美运行,可以二次修改!
Vue打印插件
excel中工资表分页打印,按部门分页,并在每个打印页面显示本页小计以及从第一页到当前页的合计数
* 基于jquery的打印分页插件 * 方法API: * loadDate data,model,shownum(数据源[数组],模板页面,每页显示数) data 建议最大数据量不要超过500 * loadTABLE 利用模版创建TABLE代码 * insertTABLE 插入数据 ...
原生JS打印插件之jQuery.EasyPrint.js使用文档 调用浏览器自带打印功能,...js控制分页打印、打印分页示例;js 打印插件;js使用window.print()实现打印功能;代码仅5kb; 自主研发的一个轻量级超简单的js打印插件。
ASP实现web分页打印及web页面导出Excel文件.pdf
js前端打印s分页实现共几页和第几页功能,触底自动换页,并每页表头新增固定部分,包括金额大写转换和当前时间获取