提交 73ad44f5 authored 作者: zjm's avatar zjm

fix(PDF模块): 修改了自查核查单据模版

修改了自查核查单据模版
上级 58a106f7
...@@ -59,6 +59,18 @@ public class FileController { ...@@ -59,6 +59,18 @@ public class FileController {
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"documents/")); return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"documents/"));
} }
/**
* 生成单据签字配发单据
*/
@ApiOperation(value = "生成单据签字配发单据")
@PostMapping("/printDocuments/Signature")
public ResponseEntity printDocumentsSignature(@RequestBody Documents documents) throws IOException, DocumentException {
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderNew(documents,url+"htmlModel/");
log.info("[file] 调用了生成出入单据对接口 出入库单据");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"documents/"));
}
/** /**
* 生成维修单据 * 生成维修单据
*/ */
...@@ -204,13 +216,13 @@ public class FileController { ...@@ -204,13 +216,13 @@ public class FileController {
public ResponseEntity printDocuments(HttpServletResponse response,HttpServletRequest request) throws IOException, DocumentException { public ResponseEntity printDocuments(HttpServletResponse response,HttpServletRequest request) throws IOException, DocumentException {
int interval = request.getSession().getMaxInactiveInterval(); int interval = request.getSession().getMaxInactiveInterval();
System.out.println("-------"+interval); System.out.println("-------"+interval);
List<Documents> documentsList=new ArrayList<>();
Documents documents=new Documents(); Documents documents=new Documents();
documents.setNumber("NO:第221321134号"); documents.setNumber("NO:第221321134号");
documents.setReceiveUnit("杭州机要"); documents.setReceiveUnit("杭州机要");
documents.setReplyNum("123123123131"); documents.setReplyNum("123123123131");
documents.setSenderUnit("浙江省"); documents.setSenderUnit("浙江省");
documents.setTitle("密码装备清退单"); documents.setTitle("密码装备清退单");
documents.setId(1);
List<DocumentDevice> documentDevices=new ArrayList<>(); List<DocumentDevice> documentDevices=new ArrayList<>();
for (int i=0;i<20;i++){ for (int i=0;i<20;i++){
DocumentDevice documentDevice=new DocumentDevice(); DocumentDevice documentDevice=new DocumentDevice();
...@@ -226,14 +238,11 @@ public class FileController { ...@@ -226,14 +238,11 @@ public class FileController {
documentDevices.add(documentDevice); documentDevices.add(documentDevice);
} }
documents.setDocumentDevices(documentDevices); documents.setDocumentDevices(documentDevices);
documentsList.add(documents); String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/");
List<String> list=new ArrayList<>();
documentsList.forEach(
documents1 -> list.addAll(Objects.requireNonNull(JavaToPdfHtmlFreeMarker.freeMarkerRenderList(documents1, url + "htmlModel/")))
);
log.info("[file] 调用了生成出入单据对接口 documents"); log.info("[file] 调用了生成出入单据对接口 documents");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(list.toArray(new String[0]),url,preview,"documents/")); return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"documents/"));
} }
......
...@@ -72,6 +72,9 @@ public class DocumentDevice { ...@@ -72,6 +72,9 @@ public class DocumentDevice {
@ApiModelProperty(value = "设备类型 装备、配件") @ApiModelProperty(value = "设备类型 装备、配件")
private Integer isPart; private Integer isPart;
@ApiModelProperty(value = "是否异常")
private Integer abnormal;
public Integer getLen(){ public Integer getLen(){
return deviceSerialNumber.length(); return deviceSerialNumber.length();
} }
......
...@@ -64,6 +64,18 @@ public class Documents { ...@@ -64,6 +64,18 @@ public class Documents {
@ApiModelProperty(value = "后端转换使用") @ApiModelProperty(value = "后端转换使用")
private List<ScriptSaveVo> scriptSaveVos; private List<ScriptSaveVo> scriptSaveVos;
@ApiModelProperty(value = "发送方人员签字base64")
private String userSrcA1;
@ApiModelProperty(value = "发送方人员签字base64")
private String userSrcA2;
@ApiModelProperty(value = "接收方人员签字base64")
private String userSrcB1;
@ApiModelProperty(value = "接收方人员签字base64")
private String userSrcB2;
public Documents(String number, String title, String receiveUnit, String replyNum, String senderUnit, String srcA, String srcB, String nameA, String nameA1, String nameB, String nameB1, List<ScriptSaveVo> scriptSaveVos) { public Documents(String number, String title, String receiveUnit, String replyNum, String senderUnit, String srcA, String srcB, String nameA, String nameA1, String nameB, String nameB1, List<ScriptSaveVo> scriptSaveVos) {
this.number = number; this.number = number;
this.title = title; this.title = title;
......
...@@ -2271,4 +2271,219 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -2271,4 +2271,219 @@ public class JavaToPdfHtmlFreeMarker {
} }
return null; return null;
} }
//有异常的分类
/**
* 工作交接计算每一页数据
* @param deviceList
* @return
* @throws UnsupportedEncodingException
*/
public static List<List<DocumentDevice>> toWorkHandoverDeviceList2(List<DocumentDevice> deviceList) throws UnsupportedEncodingException {
List<List<DocumentDevice>> lists=new ArrayList<>();
List<DocumentDevice> documentDevices=new ArrayList<>();
deviceList=deviceList.stream().sorted(Comparator.comparing(DocumentDevice::getModel).thenComparing(DocumentDevice::getParts)).collect(Collectors.toList());
Integer code=0;
int i=0;
for (int j=0;j< deviceList.size();j++){
DocumentDevice documentDevice=deviceList.get(j);
int max= toWorkHandoverMax(documentDevice);
if (i+max==15){
String s=String.join("",toListString(documentDevice.getDeviceSerialNumber(),56));
documentDevice.setOneCount(max);
documentDevice.setModel(String.join("",toListString(documentDevice.getModel(),17)));
documentDevice.setParts(String.join("",toListString(documentDevice.getParts(),17)));
documentDevice.setRemark(String.join("",toListString(documentDevice.getRemark(),15)));
documentDevice.setDeviceSerialNumber(isAddUnderline(s,documentDevice.getAbnormal()));
code++;
documentDevice.setCode(code);
documentDevices.add(documentDevice);
lists.add(documentDevices);
documentDevices=new ArrayList<>();
i=0;
}else if (i+max>15){
//当前页面少了多少行
int differ=15-i;
List<String> modelList= toListString(documentDevice.getModel(),17);
List<String> seqList=toListString(documentDevice.getDeviceSerialNumber(),56);
List<String> pasList=toListString(documentDevice.getParts(),17);
List<String> remarkList=toListString(documentDevice.getRemark(),15);
DocumentDevice documentDevice1=new DocumentDevice();
if (modelList.size()>differ){
documentDevice.setModel(String.join("",modelList.subList(0,differ)));
documentDevice1.setModel(String.join("",modelList.subList(differ,modelList.size())));
}else {
documentDevice.setModel(String.join("",modelList.subList(0,modelList.size())));
}
if (seqList.size()>differ){
documentDevice.setDeviceSerialNumber(isAddUnderline(String.join("",seqList.subList(0,differ)),documentDevice.getAbnormal()));
documentDevice1.setDeviceSerialNumber(isAddUnderline(String.join("",seqList.subList(differ,seqList.size())),documentDevice.getAbnormal()));
}else {
documentDevice.setDeviceSerialNumber(isAddUnderline(String.join("",seqList.subList(0,seqList.size())),documentDevice.getAbnormal()));
}
if (pasList.size()>differ){
documentDevice.setParts(String.join("",pasList.subList(0,differ)));
documentDevice1.setParts(String.join("",pasList.subList(differ,pasList.size())));
}else {
documentDevice.setParts(String.join("",pasList.subList(0,pasList.size())));
}
if (remarkList.size()>differ){
documentDevice.setRemark(String.join("",remarkList.subList(0,differ)));
documentDevice1.setRemark(String.join("",remarkList.subList(differ,remarkList.size())));
}else {
documentDevice.setRemark(String.join("",remarkList));
}
code++;
documentDevice.setCode(code);
documentDevice.setOneCount(differ);
documentDevices.add(documentDevice);
lists.add(documentDevices);
documentDevices=new ArrayList<>();
code++;
documentDevice1.setCode(code);
documentDevice1.setOneCount(max-differ);
documentDevices.add(documentDevice1);
i=max-differ;
}else {
String s=String.join("",toListString(documentDevice.getDeviceSerialNumber(),56));
code++;
documentDevice.setModel(String.join("",toListString(documentDevice.getModel(),17)));
documentDevice.setParts(String.join("",toListString(documentDevice.getParts(),17)));
documentDevice.setRemark(String.join("",toListString(documentDevice.getRemark(),15)));
documentDevice.setCode(code);
documentDevice.setOneCount(max);
documentDevice.setDeviceSerialNumber(isAddUnderline(s,documentDevice.getAbnormal()));
documentDevices.add(documentDevice);
i=i+max;
}
}
if (documentDevices.size()!=0){
lists.add(documentDevices);
}
return lists;
}
private static String isAddUnderline(String seq,Integer isNot){
if (isNot!=null && isNot==1) {
return "<span class=\"decorationLine\">"+seq+"</span>";
}else {
return seq;
}
}
/**
* freemarker渲染html 签字图片
*/
public static String[] freeMarkerRenderNew(Documents documents,String htmlPath) {
Writer out = new StringWriter();
String [] strings=new String[100000];
int index=0;
try {
String QRCode= ZXingUtil.encode(documents.getId());
// 获取模板,并设置编码方式
Template template = freemarkerCfg.getTemplate("billSignature.html");
template.setEncoding("UTF-8");
List<DocumentDevice> list=documents.getDocumentDevices();
List<List<DocumentDevice>> listList=toDocList(list);
int count=listList.size();
for (int i=1; i<=3; i++){
Integer page=1;
for (List<DocumentDevice> list1:listList) {
String htmlname=htmlPath+ UUID.randomUUID().toString()+".html";
// 合并数据模型与模板
FileWriter fileWriter = new FileWriter(new File(htmlname));
template.process(toMapNew(documents,list1,MAP.get(i),page,count,QRCode),fileWriter);
out.flush();
strings[index]=htmlname;
index++;
page++;
}
}
return strings;
} catch (Exception e) {
log.error("[freeMarkerRender] 方法找不到地址:{}",htmlPath);
} finally {
try {
out.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
return null;
}
private static Map<String,Object> toMapNew(Documents documents,List<DocumentDevice> list,String test,Integer page,Integer count,String QRCode){
Map<String,Object> data = new HashMap();
data.put("ul",test);
data.put("number",documents.getNumber());
data.put("title",documents.getTitle());
data.put("receiveUnit",documents.getReceiveUnit());
data.put("replyNum",documents.getReplyNum());
data.put("senderUnit",documents.getSenderUnit());
data.put("page",page);
data.put("count",count);
data.put("QRCode","\""+"data:image/png;base64,"+QRCode+"\"");
if (documents.getSrcA()==null||documents.getSrcA().equals("")){
data.put("srcA","\""+1+"\"");
}else {
data.put("srcA","\""+documents.getSrcA()+"\"");
}
if (documents.getUserSrcA1()==null||documents.getUserSrcA1().equals("")){
data.put("userSrcA1","\""+1+"\"");
}else {
data.put("userSrcA1","\""+documents.getUserSrcA1()+"\"");
}
if (documents.getUserSrcA2()==null||documents.getUserSrcA2().equals("")){
data.put("userSrcA2","\""+1+"\"");
}else {
data.put("userSrcA2","\""+documents.getUserSrcA2()+"\"");
}
if (documents.getUserSrcB1()==null||documents.getUserSrcB1().equals("")){
data.put("userSrcB1","\""+1+"\"");
}else {
data.put("userSrcB1","\""+documents.getUserSrcB1()+"\"");
}
if (documents.getUserSrcB2()==null||documents.getUserSrcB2().equals("")){
data.put("userSrcB2","\""+1+"\"");
}else {
data.put("userSrcB2","\""+documents.getUserSrcB2()+"\"");
}
data.put("nameA",documents.getNameA());
data.put("nameA1",documents.getNameA1());
data.put("nameB",documents.getNameB());
data.put("nameB1",documents.getNameB1());
if (documents.getSrcB()==null||documents.getSrcB().equals("")){
data.put("srcB","\""+1+"\"");
}else {
data.put("srcB","\""+documents.getSrcB()+"\"");
}
// List<DocumentDevice> list1=new ArrayList<>();
// AtomicInteger i= new AtomicInteger(1);
// list.forEach(
// documentDevice -> {
// documentDevice.setCode(i.get());
// i.set(i.get() + 1);
// list1.add(documentDevice);
// }
// );
data.put("documentDevices",list);
return data;
}
} }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
<style>
body {
margin: 0;
padding: 0;
font-family: FangSong_GB2312;
}
.bottomTxt {
text-align: center;
font-size: 10px;
color: #646464;
height: 10px;
line-height: 10px;
}
.decorationLine{
/*text-decoration:underline;*/
/*text-decoration-color: red;*/
/*-webkit-text-decoration-color: red;*/
box-sizing: border-box;
border-bottom: 1px solid #f40;
height: 24px;
}
/*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/
@page {
size: 210mm 297mm;
/*margin: 0.25in;*/
/*-fs-flow-bottom: "footer";*/
/*-fs-flow-left: "left";*/
/*-fs-flow-right: "right";*/
/*border: thin solid black;*/
/*padding: 1em;*/
}
.returnTablePrint {
width: 100%;
height: 100%;
overflow: hidden;
color: #000;
cursor: default;
}
.returnTablePrint .content {
width: 100%;
height: 100%;
/* background: url("../../../assets/img/detailsBg.png") no-repeat; */
/*background-size: 100% 100%;*/
/*padding: 30px;*/
/*box-sizing: border-box;*/
}
.returnTablePrint .content>div {
width: 100%;
height: 100%;
background: #fff;
/* padding: 30px; */
box-sizing: border-box;
}
.returnTablePrint .content>p {
width: 100%;
text-align: center;
font-size: 22px;
font-weight: bold;
color: #4a475d;
}
.returnTablePrint .listWrapper {
/* width: 92%; */
margin: 0 auto;
/* padding: 0px 20px 20px 20px; */
height: calc(100% - 70px);
/*padding: 10px 30px;*/
box-sizing: border-box;
}
.returnTablePrint .list {
/* width: 92%; */
margin: 0 auto;
/* padding: 0px 20px 20px 20px; */
/* height: calc(100% - 75px); */
height: calc(100% - 12px)
}
.returnTablePrint .title {
width: 100%;
font-size: 24px;
text-align: center;
position: relative;
margin: 0;
padding: 0;
box-sizing: border-box;
margin-top: 9px;
}
.returnTablePrint .title span:nth-child(2) {
font-size: 28px;
color: #000000;
}
.returnTablePrint .title span:nth-child(2) span {
font-size: 20px;
color: #141414;
}
.returnTablePrint .main-title {
font-size: 17px;
color: #000000;
text-align: center;
}
table.altrowstable {
width: 100%;
font-size: 14px;
color: #141414;
border-width: 2px;
border-color: #000;
border-collapse: collapse;
text-align: center;
table-layout: fixed;
word-break: break-all;
}
table.altrowstable th {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #000;
background-color: #dedede;
height: 20px;
line-height: 20px;
font-size: 15px;
}
table.altrowstable td {
height: 23px;
line-height:23px;
font-size: 15px;
word-break: break-all;
word-wrap: break-word;
border:1px solid #000;
width: 100%;
}
.td2{
height: 50px !important;
line-height:25px;
}
.td3{
height: 75px !important;
line-height:25px;
}
.td4{
line-height:25px;
height: 100px !important;
}
.td5{
line-height:25px;
height: 125px !important;
}
.td6{
line-height:25px;
height: 150px !important;
}
.td7{
line-height:25px;
height: 175px !important;
}
.td8{
line-height:25px;
height: 200px !important;
}
.td9{
line-height:25px;
height: 225px !important;
}
.td10{
line-height:25px;
height: 250px !important;
}
.td11{
line-height:25px;
height: 275px !important;
}
.td12{
line-height:25px;
height: 300px !important;
}
.td13{
line-height:25px;
height: 325px !important;
}
.td14{
line-height:25px;
height: 350px !important;
}
.td15{
line-height:25px;
height: 375px !important;
}
.td16{
line-height:25px;
height: 400px !important;
}
.td17{
line-height:25px;
height: 425px !important;
}
.td18{
line-height:25px;
height: 450px !important;
}
.td19{
line-height:25px;
height: 475px !important;
}
.td20{
line-height:25px;
height: 500px !important;
}
.td21{
line-height:25px;
height: 525px !important;
}
.td22{
line-height:25px;
height: 550px !important;
}
.td23{
line-height:25px;
height: 575px !important;
}
.td24{
line-height:25px;
height: 600px !important;
}
.td25{
line-height:25px;
height: 625px !important;
}
.td26{
line-height:25px;
height: 650px !important;
}
.td27{
line-height:25px;
height: 675px !important;
}
.td28{
line-height:25px;
height: 700px !important;
}
.td29{
line-height:25px;
height: 725px !important;
}
.td30{
line-height:25px;
height: 750px !important;
}
.oddrowcolor {
background-color: #fff;
}
.evenrowcolor {
background-color: #fafafa;
}
.person {
color: #4a475b;
text-align: right;
font-size: 16px;
}
.person>span {
display: inline-block;
margin-right: 30pt;
}
/* tr:nth-child(odd) {
background: #fafafa;
} */
</style>
</head>
<body>
<div class="returnTablePrint">
<div class="content">
<div>
<div class="listWrapper">
<div class="list">
<p class="title" style="margin-bottom:20px;">
<div class="main-title">
<span>
核心密码装备库存统计表
</span>
</div>
</p>
<div style="height: 853px;overflow: hidden">
<#list checks as dev>
<table class="altrowstable" border="0" id="alternatecolor">
<#if (dev.model)??>
<#if dev.isPart == 0>
<tr>
<td style="font-weight: bold;:overflow: hidden">${dev.model!}</td>
<td style="font-weight: bold;overflow: hidden">${dev.name!}</td>
<td style="font-weight: bold;">${dev.count!}</td>
</tr>
<#else>
<tr>
<td style="overflow: hidden">${dev.model!}</td>
<td style="overflow: hidden">${dev.name!}</td>
<td>${dev.count!}</td>
</tr>
</#if>
</#if>
<tr>
<#if dev.oneCount == 1>
<td colspan="3" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 2>
<td colspan="3" class="td2" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 3>
<td colspan="3" class="td3" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 4>
<td colspan="3" class="td4" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 5>
<td colspan="3" class="td5" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 6>
<td colspan="3" class="td6" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 7>
<td colspan="3" class="td7" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 8>
<td colspan="3" class="td8" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 9>
<td colspan="3" class="td9" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 10>
<td colspan="3" class="td10" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 11>
<td colspan="3" class="td11" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 12>
<td colspan="3" class="td12" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 13>
<td colspan="3" class="td13" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 14>
<td colspan="3" class="td14" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 15>
<td colspan="3" class="td15" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 16>
<td colspan="3" class="td16" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 17>
<td colspan="3" class="td17" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 18>
<td colspan="3" class="td18" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 19>
<td colspan="3" class="td19" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 20>
<td colspan="3" class="td20" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 21>
<td colspan="3" class="td21" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 22>
<td colspan="3" class="td22" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 23>
<td colspan="3" class="td23" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 24>
<td colspan="3" class="td24" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 25>
<td colspan="3" class="td25" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 26>
<td colspan="3" class="td26" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 27>
<td colspan="3" class="td27" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 28>
<td colspan="3" class="td28" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 29>
<td colspan="3" class="td29" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 30>
<td colspan="3" class="td30" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
</#if>
</tr>
</table>
</#list>
</div>
</div>
<p class="person" style="margin-top: 10px;font-size: 15px;width: 100%;text-align: left;">
<span style="width: 200px;text-align: center;width: 24%;margin: 0;">制表单位:${unit!}</span>
<span style="width: 200px;text-align: center;width: 24%;margin: 0;">制表时间:</span>
<span style="width: 200px;text-align: center;width: 24%;margin: 0;">经办人:</span>
<span style="width: 200px;text-align: center;width: 24%;margin: 0;">审核人:</span>
</p>
</div>
</div>
</div>
<div>
<!--<p class="bottomTxt" style="float: left;">注:编号连续使用"-"省略</p>-->
<p class="bottomTxt" style="float: right;">第${page}页/共${count}页</p>
</div>
</div>
<!--<script type="text/javascript">-->
<!--function altRows(id){-->
<!--if(document.getElementsByTagName){-->
<!--var table = document.getElementById(id);-->
<!--var rows = table.getElementsByTagName("tr");-->
<!--for(i = 0; i < rows.length; i++){-->
<!--if(i % 2 == 0){-->
<!--rows[i].className = "evenrowcolor";-->
<!--}else{-->
<!--rows[i].className = "oddrowcolor";-->
<!--}-->
<!--}-->
<!--}-->
<!--}-->
<!--window.onload=function(){-->
<!--altRows('alternatecolor');-->
<!--}-->
<!--</script>-->
</body>
</html>
\ No newline at end of file
...@@ -304,8 +304,14 @@ ...@@ -304,8 +304,14 @@
</div> </div>
</p> </p>
<div style="height: 853px;overflow: hidden"> <div style="height: 853px;overflow: hidden">
<#list checks as dev>
<table class="altrowstable" border="0" id="alternatecolor"> <table class="altrowstable" border="0" id="alternatecolor">
<tr>
<th>型号</th>
<th>名称</th>
<th>数量</th>
</tr>
<#list checks as dev>
<#if (dev.model)??> <#if (dev.model)??>
<#if dev.isPart == 0> <#if dev.isPart == 0>
<tr> <tr>
...@@ -394,8 +400,8 @@ ...@@ -394,8 +400,8 @@
<td colspan="3" class="td30" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td> <td colspan="3" class="td30" style="text-align: left;padding: 0 2em;color: #555;">${dev.seqStirng!}</td>
</#if> </#if>
</tr> </tr>
</#list>
</table> </table>
</#list>
</div> </div>
</div> </div>
<p class="person" style="margin-top: 10px;font-size: 15px;width: 100%;text-align: left;"> <p class="person" style="margin-top: 10px;font-size: 15px;width: 100%;text-align: left;">
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
<style>
body,span,p,tr,td {
font-size: 15px;
font-family: FangSong_GB2312;
margin: 0;
padding: 0;
}
/*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/
@page {
size: 297mm 210mm;
}
.erwei{
width: 43px;
height: 43px;
position: fixed;
left: 150px;
top: 0px;
}
.bottomTxt {
text-align: center;
font-size: 15px;
color: #000;
height: 10px;
line-height: 10px;
margin-top: 4px;
}
.returnTablePrint {
width: 100%;
height: 100%;
overflow: hidden;
color: #000;
cursor: default;
}
.returnTablePrint .content {
width: 100%;
height: 100%;
}
.returnTablePrint .content>div {
width: 100%;
height: 100%;
background: #fff;
/* padding: 30px; */
box-sizing: border-box;
}
/* .returnTablePrint .content>p{
width: 100%;
text-align: center;
font-size: 22px;
font-weight: bold;
color: #4a475d;
} */
.returnTablePrint .listWrapper {
/*margin: 0 auto;*/
/* height: calc(100% - 40px); */
box-sizing: border-box;
}
.returnTablePrint .list {
/*margin: 0 auto;*/
height: calc(100% - 12px)
}
.returnTablePrint .title {
width: 100%;
font-size: 22px;
text-align: center;
position: relative;
/* margin: 0 0 15px; */
box-sizing: border-box;
margin-bottom: 4px;
}
/* .returnTablePrint .title span:nth-child(2){
font-size: 28px;
color: #000000;
}
.returnTablePrint .title span:nth-child(2) span{
font-size: 20px;
color: #141414;
} */
.returnTablePrint .title .number {
font-size: 15px;
color: #000;
}
/* .returnTablePrint .other{
width: 100%;
color: #141414;
font-size: 20px;
margin-top: 20px;
padding-left: 50px;
position: relative;
box-sizing: border-box;
margin-bottom: 20px;
}
.returnTablePrint .other>span span:nth-child(2){
display: inline-block;
margin:0 40px 0 10px;
} */
.returnTablePrint .listCon {
height: 100%;
border: 1px solid #7f7f7f;
}
.returnTablePrint .line1 {
width: 100%;
font-size: 15px;
box-sizing: border-box;
border-bottom: 1px solid #7f7f7f;
color: #333;
line-height: 20px;
height: 24px;
}
.returnTablePrint .line1 .sendTo {
display: inline-block;
width: 49%;
height: 24px;
color: #000;
line-height: 24px;
box-sizing: border-box;
/*padding-left: 20px;*/
}
.returnTablePrint .line1 .sendNum {
display: inline-block;
width: 49%;
font-size: 15px;
height: 24px;
line-height: 24px;
color: #000;
box-sizing: border-box;
/*padding-left: 20px;*/
}
.returnTablePrint .line1 .sendTo {
border-right: 1px solid #7f7f7f;
}
.returnTablePrint .line1 .sendTo span:nth-child(2),
.returnTablePrint .line1 .sendNum span:nth-child(2) {
display: inline-block;
margin-left: 5px;
}
.returnTablePrint .line2 {
height: 100%;
/* padding: 20px; */
border-bottom: 1px solid #7f7f7f;
}
.returnTablePrint .tableList {
height: 375px;
overflow:hidden;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(odd) {
background-color: #fff;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(even) {
background-color: #fff;
}
.returnTablePrint .line3 {
height: 164px;
width: 100%;
}
.returnTablePrint .line3 .left {
display: inline-block;
width: 47%;
box-sizing: border-box;
position: relative;
/* padding-bottom: 80px; */
}
.returnTablePrint .line3 .right {
display: inline-block;
/* width: 49%; */
box-sizing: border-box;
position: relative;
/* padding-bottom: 80px; */
}
.returnTablePrint .line3 .left {
border-right: 1px solid #7f7f7f;
padding: 5px 10px 0;
height:97%;
}
.returnTablePrint .line3 .left>span,
.returnTablePrint .line3 .right>span {
display: block;
/* line-height: 50px; */
}
.returnTablePrint .line3 .right {
height: 100%;
padding: 5px 10px;
box-sizing: border-box;
}
.returnTablePrint .line3 .left>span>span:nth-child(2),
.returnTablePrint .line3 .right>span>span:nth-child(2) {
margin-left: 8px;
}
.returnTablePrint .line3 i {
display: block;
text-align: right;
position: absolute;
right: 5px;
bottom: 5px;
font-style: normal;
font-size: 12px;
}
.returnTablePrint .line3 .right i {
font-style: normal;
}
.returnTablePrint .line3 i>span>span {
display: block;
}
.returnTablePrint>>>.el-scrollbar__wrap {
overflow-x: hidden;
margin-bottom: 0;
}
.returnTablePrint .checkName span:nth-child(2) {
color: #000;
display: inline-block;
}
.returnTablePrint>>>.el-table tbody .cell {
color: #000;
}
.returnTablePrint .label {
color: #000;
font-size: 15px;
}
.returnTablePrint .value {
color: #000;
font-size: 15px;
}
.returnTablePrint .main-title span{
font-size: 22px;
color: #333;
font-weight: bold;
}
.returnTablePrint .main-title {
font-size: 22px;
color: #333;
line-height: 20px;
text-align: center;
margin-bottom: 4px;
}
.returnTablePrint .footer {
display: flex;
justify-content: flex-end;
padding: 0 40px;
box-sizing: border-box;
}
.button-submit {
margin-left: 50px;
}
table.altrowstable2 {
width: 100%;
font-size: 16px;
color: #000;
border-width: 0px;
border-color: #a9c6c9;
border-collapse: collapse;
text-align: center;
table-layout: fixed;
word-break: break-all;
}
table.altrowstable2 th {
height: 25px;
line-height:25px;
font-size: 15px;
background-color: #fff;
border:1px solid #bebebe;
padding-top: 0;
}
table.altrowstable2 td {
height: 25px;
line-height:25px;
font-size: 15px;
word-break: break-all;
word-wrap: break-word;
border:1px solid #bebebe;
width: 100%;
}
.td2{
height: 50px !important;
}
.td3{
height: 75px !important;
}
.td4{
height: 100px !important;
}
.td5{
height: 125px !important;
}
.td6{
height: 150px !important;
}
.td7{
height: 175px !important;
}
.td8{
height: 200px !important;
}
.td9{
height: 225px !important;
}
.td10{
height: 250px !important;
}
.td11{
height: 275px !important;
}
.td12{
height: 300px !important;
}
.td13{
height: 325px !important;
}
table.altrowstable {
width: 100%;
font-size: 16px;
color: #000;
border-width: 0px;
border-color: #a9c6c9;
border-collapse: collapse;
text-align: center;
table-layout: fixed;
word-break: break-all;
}
table.altrowstable th {
height: 24px;
line-height:24px;
font-size: 15px;
background-color: #ebebeb;
marign-top:none;
border:1px solid #bebebe;
padding-top: 0;
padding-bottom: 0;
}
table.altrowstable td {
height: 24px;
line-height:24px;
font-size: 15px;
word-break: normal;
word-wrap: normal;
border:1px solid #bebebe;
width: 100%;
}
/*table.altrowstable .altrowstableTr:nth-child(odd) {
height: 18px;
word-break: break-all;
word-wrap: break-word;
background-color: #f2f2f2;
} */
.leftImg {
position: absolute;
bottom: 0px;
right: 150px;
}
.rightImg {
position: absolute;
bottom: 0px;
right: 150px;
.oddrowcolor {
background-color: #fff;
}
.evenrowcolor {
background-color: #fafafa;
}
/*tr:nth-child(odd) {*/
/* background: #fafafa;*/
/*}*/
</style>
</head>
<body>
<div class="returnTablePrint">
<img class="erwei" src=${QRCode} />
<div class="content">
<div>
<div class="listWrapper">
<div class="list">
<div class="title">
<div class="main-title">
<span>
${title!}
</span>
</div>
<div style="width:100%;font-size: 1px;">
<div style="display:inline-block;text-align:left; width: 33%; font-size: 10px;"
class="number">
<span>${number!}</span>
</div>
<div style="display:inline-block;text-align:center; width: 33%; font-size: 10px;"
class="number">
<span>(${ul!})</span>
</div>
<div style="display:inline-block;text-align:right; width: 33%; font-size: 10px;"
class="number">
<span>机密</span>
</div>
</div>
</div>
<div class="listCon">
<div class="line1">
<span class="sendTo">
<span style="text-indent: 5px; display: inline-block;">发往:</span>
<span>${receiveUnit!}</span>
</span>
<span class="sendNum">
<span style="text-indent: 5px; display: inline-block;">批复文号:</span>
<span>${replyNum!}</span>
</span>
</div>
<div class="line2 tableList">
<table class="altrowstable" id="alternatecolor">
<tr style="border-bottom: 1px solid #dedede; border-top: 1px solid #dedede;">
<!-- <th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>数量</th><th style="width: 420px;">装备序列号</th><th>备注</th> -->
<th width="70px">序号</th>
<th width="96px">型号</th>
<th width="96px">部件</th>
<th width="50px">密级</th>
<th width="100px">应用领域</th>
<th width="72px">数量</th>
<th width="420px">装备序列号</th>
<th>备注</th>
</tr>
<#list documentDevices as dev>
<tr class="altrowstableTr">
<td>
${dev.code!}
</td>
<td>${dev.model!}</td><td>${dev.parts!}</td><td>${dev.securityClassification!}</td><td>${dev.applicationField!}</td>
<td>
${dev.count!}
</td>
<!--<td>${dev.deviceSerialNumber!}</td>-->
<#if dev.oneCount == 1>
<td>${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 2>
<td class="td2">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 3>
<td class="td3">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 4>
<td class="td4">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 5>
<td class="td5">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 6>
<td class="td6">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 7>
<td class="td7">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 8>
<td class="td8">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 9>
<td class="td9">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 10>
<td class="td10">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 11>
<td class="td11">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 12>
<td class="td12">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 13>
<td class="td13">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 14>
<td class="td14">${dev.deviceSerialNumber!}</td>
</#if>
<td>${dev.remark!}</td>
</tr>
</#list>
</table>
<table class="altrowstable2" id="alternatecolor">
<tr style="border-bottom: 1px solid #dedede;">
<th width="70px"></th>
<th width="96px"></th>
<th width="96px"></th>
<th width="50px"></th>
<th width="100px"></th>
<th width="72px"></th>
<th width="420px"></th>
<th></th>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="altrowstableTr">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
<div class="line3">
<span class="left">
<span style="padding:20px 0 32px ;">
<span class="label">发件单位:</span>
<span class="value">${senderUnit!}</span>
</span>
<span style="padding-bottom:32px ;">
<span class="label"><span style="letter-spacing: 7px;">签发</span>人:</span>
<span class="value">${nameA1!}</span>
</span>
<span>
<span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span>
<span class="value">${nameA!}</span>
</span>
<i>
<span style="color: #000">
<span style="margin-bottom: 5px;">(公章)</span>
<span><span style="color: #fff;">1234</span><span
style="color: #fff;">0121</span><span
style="color: #fff;">0232</span></span>
<div class="leftImg">
<div id="pos0">
<img style="width:80px;height:80px" src=${srcA} class="" id="" />
</div>
</div>
</span>
</i>
</span>
<span class="right">
<div style="width: 100%;">
<span style="width: 100%;display: inline-block;padding:20px 0 32px ;">
<span class="label">收件单位:</span>
<span class="value">${receiveUnit}</span>
</span>
<span style="width: 100%;display: inline-block;padding-bottom:32px ;">
<span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span>
<span class="value">${nameB!}</span>
</span>
<span style="width: 100%;display: inline-block;">
<span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span>
<span class="value">${nameB1!}</span>
</span>
</div>
<div style="left: 250px;top: 38px;">
<!--<div style="position: relative;left: 250px;top: 38px;">-->
<#if srcB=='"1"'>
<i style="position: absolute;bottom: 10px;right: -150px;">
<#else>
<i style="position: absolute;bottom: 10px;right: -85px;">
</#if>
<!--<i style="bottom: 30px;right: 90px;"> -->
<span style="color: #000">
<span style="margin-bottom: 5px;">(公章)</span>
<span><span style="color: #fff;">1234</span><span
style="color: #fff;">0121</span><span
style="color: #fff;">0232</span></span>
<!--<div class="rightImg">-->
<!--<div id="pos1">-->
<img id="imgB" style="position: fixed;bottom: 95px;right: 164px;width:80px;height:80px" src=${srcB} />
<!--</div>-->
<!--</div>-->
</span>
</i>
</div>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<p class="bottomTxt" style="float: left;">注:编号连续使用"-"省略</p>
<p class="bottomTxt" style="float: right;">第${page}页/共${count}页</p>
</div>
</div>
</body>
</html>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论