打印window.print();
<%@ page contentType="text/html;charset=utf-8"%>
<%@ page language="java" import="java.util.*"%>
<%@ page language="java" import="com.beyond.framework.common.config.*"%>
<%@ page language="java" import="com.beyond.framework.util.tools.*"%>
<%@ page language="java" import="com.beyond.framework.user.entity.*"%>
<%@ page import="com.beyond.framework.dictionary.entity.DictionaryInfo"%>
<%@ page
import="com.beyond.framework.jurisdiction.entity.AdminGroupInfo"%>
<%@ page language="java"
import="com.mohe.schedule.classteam.entity.ClassTeam"%>
<%@ page language="java" import="com.mohe.schedule.leave.entity.Leave"%>
<%@ page import="com.beyond.framework.dictionary.entity.DictionaryInfo"%>
<%@ page import="com.beyond.framework.user.entity.UserInfo"%>
<%@page import="com.beyond.framework.util.tools.Global"%>
<%@ taglib uri="/pageTag" prefix="pageTag"%>
<link rel="stylesheet" href="print.css" media="print" />
<link rel="stylesheet" href="css/mainstylesheet.css" media="screen" />
<link rel="stylesheet" href="css/printstylesheet.css" media="print" />
<%
String path = request.getContextPath();
UserInfo info = (UserInfo)request.getAttribute("info");
Leave leave = (Leave)request.getAttribute("leaves");
if(leave == null){
leave = new Leave();
}
%>
<%@include file="../headSmartAdmin.jsp"%>
<style media="print">
@page {
size: auto; /* auto is the initial value */
margin: 0mm; /* this affects the margin in the printer settings */
}
</style>
<style type="text/css">
.smart-form-mh {
margin: 0;
outline: 0;
color: #666;
position: relative;
}
</style>
<style type="text/css">
@import url("css/printstylesheet.css") print;
@media print {}{
#wid-id-1 {
color: blue;
}
}
</style>
<style type="text/css" media="print"></style>
<body>
<div id="printBody" style="width:95%;height:90%;margin:1% auto auto auto">
<div style="text-align:center;margin:10% auto auto auto;"><h1>勤务保障队人员外出请假条</h1></div>
<table border ="1" cellspacing="0" cellpadding="0">
<tr height="100px">
<td style="width:15%;" align="center">部 门</td>
<td style="width:15%;" align="center">${info.className}</td>
<td style="width:14%;" align="center">姓 名</td>
<td style="width:14%;" align="center">${info.realName}</td>
<td align="center">联系电话</td>
<td align="center">${info.mobileNo}</td>
</tr>
<tr height="100px">
<td align="center">请假开始时间</td>
<td colspan="2" align="center">${leaves.startDateStr}</td>
<td align="center">请假结束时间</td>
<td colspan="2" align="center">${leaves.endDateStr}</td>
</tr>
<tr height="100px">
<td align="center">请假事由</td>
<td align="center">${leaves.reason}</td>
<td align="center">代理人</td>
<td align="center">${leaves.abroadPerson}</td>
<td align="center">代理人电话</td>
<td align="center">${leaves.agentPhone}</td>
</tr>
<tr height="100px">
<td align="center">部门领导</td>
<td align="center">${leaves.departmentLeaderName}</td>
<td align="center">队 干</td>
<td align="center">${leaves.teamWorkName}</td>
<td align="center">其他说明</td>
<td align="center">${leaves.remk}</td>
</tr>
<tr height="100px">
<td align="center">人员外出行为规范</td>
<td colspan="6" align="left">
<p>一、严守军委“十一条禁令”和海军“五条禁令”,不在任何时间,任何场合唱歌饮酒。</p>
<p>二、拒绝“黄” “赌” “毒”,不涉足歌厅舞厅,桑拿洗浴等不健康场所,不乱拉男女关系。</p>
<p>三、培养高尚情操,不看色情,暴力,迷信题材影视片,不唱不健康歌曲,不参与封建迷信,宗教组织和宗教活动,不围观参与社会游行,示威,静坐等活动。</p>
<p>四、遵守社会公德,举止文明,自觉维护军队声誉,不猬集街头,嬉笑大闹喧哗,不携带违禁物品,不随地吐痰,不乱扔弃废物,不在公共场所吸烟。</p>
<p>五、遵守公共秩序和交通规则,乘坐公共汽车,地铁等交通工具时,主动给老人,幼童,孕妇和伤,病,残人员让座。</p>
</td>
</tr>
</table>
<%-- <div style="margin:30px auto auto auto";>
部门:<input type="text" name="className" style="margin:auto 80px auto auto" value="<%=info.getClassName()%>" readonly="readonly">
姓名:<input type="text" name="className" style="margin:auto auto auto auto" value="<%=info.getClassName()%>" readonly="readonly">
</div>
<div style="margin:32px auto auto auto";>
联系电话:<input type="text" style="margin:auto 70px auto auto" name="mobileNo" value="<%=Global.nvlToString(info.getMobileNo())%>" readonly="readonly">
请假是由:<input type="text" name="className" style="margin:auto auto auto auto" value="<%=info.getClassName()%>" readonly="readonly">
</div>
<div style="margin:34px auto auto auto" ;>
请假开始时间:<input readonly="readonly" type="text" style="margin:auto 50px auto auto"
name="startDateStr" id="startDateStr"
value="<%=Global.nvlToString(leave.getStartDateStr())%>" readonly="readonly">
请假结束时间:<input readonly="readonly" type="text" style="margin:auto auto auto auto"
name="endDateStr" id="endDateStr"
value="<%=Global.nvlToString(leave.getEndDateStr())%>" readonly="readonly">
</div>
<div style="margin:36px auto auto auto";>
代理人:<input type="text" name="className" style="margin:auto 80px auto auto" value="<%=info.getClassName()%>" readonly="readonly">
代理人电话:<input type="text" style="margin:auto auto auto auto" name="mobileNo" value="<%=Global.nvlToString(info.getMobileNo())%>" readonly="readonly">
</div>
<div style="margin:38px auto auto auto";>
部门领导:<input type="text" name="className" style="margin:auto 80px auto auto" value="<%=info.getClassName()%>" readonly="readonly">
队干:<input type="text" style="margin:auto auto auto auto" name="mobileNo" value="<%=Global.nvlToString(info.getMobileNo())%>" readonly="readonly">
</div>
<div style="margin:40px auto auto auto";>
其他说明:<input type="text" name="className" style="margin:auto auto auto auto" value="<%=info.getClassName()%>" readonly="readonly">
</div> --%>
<div style="margin:2% auto auto 65%";>
填报时间: 年 月 日
</div>
</div>
</body>
<!-- /.modal-dialog -->
<script type="text/javascript" src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
/* var pdata = [
{"id":"部门","top":"95","left":"20"},
{"id":"姓名","top":"120","left":"80"},
{"id":"联系方式","top":"150","left":"50"}
]
var infoHtml = ''; */
/* for (var i = 0;i<pdata.length;i++){
var top1 = (pdata[i].top/176)*100+'%';
var left = (pdata[i].left/261)*100+'%';
infoHtml += '<span style="display:block;position:absolute;top:'+top1+';left:'+left+';">'+pdata[i].id+'</span>';
} */
/* aahtml = window.document.getElementById("#printBody");
alert(aahtml);
$("#printBody").html(aahtml); */
window.print();
</script>