提交 f6375080 authored 作者: 133's avatar 133

[pdf 模版提交]

上级 f6917f06
...@@ -122,10 +122,34 @@ public class FileController { ...@@ -122,10 +122,34 @@ public class FileController {
@PostMapping("/printCheck") @PostMapping("/printCheck")
public ResponseEntity printCheck(@RequestBody Confirm confirm) { public ResponseEntity printCheck(@RequestBody Confirm confirm) {
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderVerification2(confirm,url+"htmlModel/"); String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderVerification2(confirm,url+"htmlModel/");
log.info("[file] 调用了生成确认单据对接口 confirm"); log.info("[file] 调用了生成核查确认单对接口 confirm");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf90(content,url,preview,"confirm/"));
}
/**
* 生成单据 导出设备相关信息 核查的模版
* @return
*/
@ApiOperation(value = "生成单据 导出设备相关信息 核查的模版")
@PostMapping("/exportDdevice")
public ResponseEntity exportDdevice(@RequestBody Confirm confirm) {
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderExportDevice(confirm,url+"htmlModel/");
log.info("[file] 调用了生成设备相关信息单据对接口 核查模版");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf90(content,url,preview,"confirm/")); return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf90(content,url,preview,"confirm/"));
} }
/**
* 生成单据 导出设备相关信息 出入库类模版
*/
@ApiOperation(value = "生成单据")
@PostMapping("/exportDdevice1")
public ResponseEntity exportDdevice1(@RequestBody Documents documents) throws IOException, DocumentException {
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/");
log.info("[file] 调用了生成出入单据对接口 出入库单据");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"documents/"));
}
/** /**
* 生成单据 确认单据合并 * 生成单据 确认单据合并
......
...@@ -55,6 +55,12 @@ public class DocumentDevice { ...@@ -55,6 +55,12 @@ public class DocumentDevice {
@ApiModelProperty(value = "状态") @ApiModelProperty(value = "状态")
private String status; private String status;
@ApiModelProperty
private String store;
@ApiModelProperty
private String ownUnit;
private Integer oneCount; private Integer oneCount;
public Integer getLen(){ public Integer getLen(){
......
package com.tykj.dev.device.file.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @author zjm
* @version 1.0.0
* @ClassName Check.java
* @Description TODO
* @createTime 2021年07月22日 12:29:00
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ExportDevice {
private String model;
private String name;
private List<String> strings;
private Integer count;
private String seqStirng;
private Integer oneCount;
private String store;
private String ownUnit;
}
...@@ -37,7 +37,7 @@ public class PdfServiceImpl implements PdfService { ...@@ -37,7 +37,7 @@ public class PdfServiceImpl implements PdfService {
} }
private DocumentDevice toDocDev(ScriptSaveVo scriptSaveVo){ private DocumentDevice toDocDev(ScriptSaveVo scriptSaveVo){
return new DocumentDevice(null,scriptSaveVo.getModel(),null,scriptSaveVo.getType(),scriptSaveVo.getSecretLevel(),scriptSaveVo.getInvisibleRange(),scriptSaveVo.getNum(),scriptSaveVo.getSeqNumber(),null,scriptSaveVo.getRemark(),null,null,null); return new DocumentDevice(null,scriptSaveVo.getModel(),null,scriptSaveVo.getType(),scriptSaveVo.getSecretLevel(),scriptSaveVo.getInvisibleRange(),scriptSaveVo.getNum(),scriptSaveVo.getSeqNumber(),null,scriptSaveVo.getRemark(),null,null,null,null,null);
} }
} }
...@@ -783,16 +783,16 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -783,16 +783,16 @@ public class JavaToPdfHtmlFreeMarker {
List<String> stringList = check.getStrings().stream().sorted(Comparator.comparing(String::toString)).collect(Collectors.toList()); List<String> stringList = check.getStrings().stream().sorted(Comparator.comparing(String::toString)).collect(Collectors.toList());
int max = toMaxList(check.getStrings()) + 1; int max = toMaxList(check.getStrings()) + 1;
if (i + max == 24) { if (i + max == 34) {
check.setSeqStirng(toALLSeqStirng(stringList)); check.setSeqStirng(toALLSeqStirng(stringList));
check.setOneCount(max - 1); check.setOneCount(max - 1);
checkList2.add(check); checkList2.add(check);
lists.add(checkList2); lists.add(checkList2);
checkList2 = new ArrayList<>(); checkList2 = new ArrayList<>();
i = 0; i = 0;
} else if (i + max > 24) { } else if (i + max > 34) {
//当前页面少了多少行 //当前页面少了多少行
int differ = 24 - i; int differ = 34 - i;
check.setSeqStirng(toALLSeqStirng(stringList.subList(0, (differ-1) * 7))); check.setSeqStirng(toALLSeqStirng(stringList.subList(0, (differ-1) * 7)));
check.setOneCount(differ - 1); check.setOneCount(differ - 1);
checkList2.add(check); checkList2.add(check);
...@@ -801,25 +801,25 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -801,25 +801,25 @@ public class JavaToPdfHtmlFreeMarker {
List<String> strings = stringList.subList((differ-1) * 7, stringList.size()); List<String> strings = stringList.subList((differ-1) * 7, stringList.size());
Integer max2 = toMaxList(strings); Integer max2 = toMaxList(strings);
int count = (max2 % 24 > 0) ? max2 / 24 + 1 : max2 / 24; int count = (max2 % 34 > 0) ? max2 / 34 + 1 : max2 / 34;
if (count != 1) { if (count != 1) {
int o = 1; int o = 1;
while (o <= count - 1) { while (o <= count - 1) {
Check check1 = new Check(); Check check1 = new Check();
check1.setSeqStirng(toALLSeqStirng(strings.subList((o - 1) * 7 * 24, o * 7 * 24))); check1.setSeqStirng(toALLSeqStirng(strings.subList((o - 1) * 7 * 34, o * 7 * 34)));
check1.setOneCount(24); check1.setOneCount(34);
checkList2.add(check1); checkList2.add(check1);
lists.add(checkList2); lists.add(checkList2);
checkList2 = new ArrayList<>(); checkList2 = new ArrayList<>();
o++; o++;
} }
List<String> endList = strings.subList((count - 1) * 7 * 24, strings.size()); List<String> endList = strings.subList((count - 1) * 7 * 34, strings.size());
Integer max4 = toMaxList(endList); Integer max4 = toMaxList(endList);
int count1 = (max4 % 24 > 0) ? max4 / 24 + 1 : max4 / 24; int count1 = (max4 % 34 > 0) ? max4 / 34 + 1 : max4 / 34;
if (count1 == 24) { if (count1 == 34) {
Check check1 = new Check(); Check check1 = new Check();
check1.setSeqStirng(toALLSeqStirng(endList)); check1.setSeqStirng(toALLSeqStirng(endList));
check1.setOneCount(24); check1.setOneCount(34);
checkList2.add(check1); checkList2.add(check1);
lists.add(checkList2); lists.add(checkList2);
checkList2 = new ArrayList<>(); checkList2 = new ArrayList<>();
...@@ -1695,5 +1695,158 @@ public class JavaToPdfHtmlFreeMarker { ...@@ -1695,5 +1695,158 @@ public class JavaToPdfHtmlFreeMarker {
//----------------------导出设备信息相关接口-------------------
/**
* freemarker渲染html 核查确认单据 修改
*/
public static String[] freeMarkerRenderExportDevice(Confirm confirm,String htmlPath) {
Writer out = new StringWriter();
String [] strings=new String[100000];
int index=0;
Instant instant = new Date().toInstant();
String local1 = LocalDateTime.ofInstant(instant, ZoneId.systemDefault()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
try {
Template template = freemarkerCfg.getTemplate("bill11.html");
template.setEncoding("UTF-8");
List<DocumentDevice> list=confirm.getConfirmDevices();
List<List<ExportDevice>> listList=toExportDeviceList(list,confirm.getUnit());
int count=listList.size();
Integer page=1;
for (List<ExportDevice> list1:listList) {
String htmlname=htmlPath+ UUID.randomUUID().toString()+".html";
// 合并数据模型与模板
FileWriter fileWriter = new FileWriter(new File(htmlname));
template.process(toExportDeviceMap(confirm,list1,page,count,local1),fileWriter);
out.flush();
strings[index]=htmlname;
index++;
page++;
}
return strings;
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
out.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
return null;
}
public static List<List<ExportDevice>> toExportDeviceList(List<DocumentDevice> deviceList,String unit) throws UnsupportedEncodingException {
List<List<ExportDevice>> lists = new ArrayList<>();
Map<String, ExportDevice> map = new HashMap<>();
deviceList.forEach(
documentDevice -> {
String key = documentDevice.getModel() + documentDevice.getParts()+documentDevice.getStore()+documentDevice.getOwnUnit();
if (map.containsKey(key)) {
ExportDevice check = map.get(key);
check.setCount(check.getCount() + 1);
List<String> strings = check.getStrings();
strings.add(documentDevice.getDeviceSerialNumber());
check.setStrings(strings);
map.put(key, check);
} else {
ExportDevice check = new ExportDevice();
List<String> strings = new ArrayList<>();
check.setCount(1);
check.setStore(documentDevice.getStore());
check.setOwnUnit(documentDevice.getOwnUnit());
check.setModel(documentDevice.getModel());
check.setName(documentDevice.getParts());
strings.add(documentDevice.getDeviceSerialNumber());
check.setStrings(strings);
map.put(key, check);
}
}
);
List<ExportDevice> checkList = map.values().stream().sorted(Comparator.comparing(ExportDevice::getModel)).collect(Collectors.toList());
List<ExportDevice> checkList2 = new ArrayList<>();
int i = 0;
for (int j = 0; j < checkList.size(); j++) {
ExportDevice check = checkList.get(j);
List<String> stringList = check.getStrings().stream().sorted(Comparator.comparing(String::toString)).collect(Collectors.toList());
int max = toMaxList(check.getStrings()) + 1;
if (i + max == 34) {
check.setSeqStirng(toALLSeqStirng(stringList));
check.setOneCount(max - 1);
checkList2.add(check);
lists.add(checkList2);
checkList2 = new ArrayList<>();
i = 0;
} else if (i + max > 34) {
//当前页面少了多少行
int differ = 34 - i;
check.setSeqStirng(toALLSeqStirng(stringList.subList(0, (differ-1) * 7)));
check.setOneCount(differ - 1);
checkList2.add(check);
lists.add(checkList2);
checkList2 = new ArrayList<>();
List<String> strings = stringList.subList((differ-1) * 7, stringList.size());
Integer max2 = toMaxList(strings);
int count = (max2 % 34 > 0) ? max2 / 34 + 1 : max2 / 34;
if (count != 1) {
int o = 1;
while (o <= count - 1) {
ExportDevice check1 = new ExportDevice();
check1.setSeqStirng(toALLSeqStirng(strings.subList((o - 1) * 7 * 34, o * 7 * 34)));
check1.setOneCount(34);
checkList2.add(check1);
lists.add(checkList2);
checkList2 = new ArrayList<>();
o++;
}
List<String> endList = strings.subList((count - 1) * 7 * 34, strings.size());
Integer max4 = toMaxList(endList);
int count1 = (max4 % 34 > 0) ? max4 / 34 + 1 : max4 / 34;
if (count1 == 34) {
ExportDevice check1 = new ExportDevice();
check1.setSeqStirng(toALLSeqStirng(endList));
check1.setOneCount(34);
checkList2.add(check1);
lists.add(checkList2);
checkList2 = new ArrayList<>();
i = 0;
} else {
ExportDevice check1 = new ExportDevice();
check1.setOneCount(max4);
check1.setSeqStirng(toALLSeqStirng(endList));
checkList2.add(check1);
i = max4;
}
} else {
ExportDevice check1 = new ExportDevice();
check1.setOneCount(toMaxList(strings));
check1.setSeqStirng(toALLSeqStirng(strings));
checkList2.add(check1);
i = toMaxList(strings);
}
} else {
check.setSeqStirng(toALLSeqStirng(stringList));
check.setOneCount(max - 1);
checkList2.add(check);
i = i + max;
}
}
if (checkList2.size() != 0) {
lists.add(checkList2);
}
return lists;
}
private static Map<String,Object> toExportDeviceMap(Confirm confirm, List<ExportDevice> list,Integer page,Integer count,String time){
Map<String,Object> data = new HashMap();
data.put("title",confirm.getTitle());
data.put("unit",confirm.getUnit());
data.put("page",page);
data.put("count",count);
data.put("checks",list);
data.put("time",time);
return data;
}
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
body { body {
margin: 0; margin: 0;
padding: 0; padding: 0;
font-family: SimHei; font-family: FangSong_GB2312;
} }
.bottomTxt { .bottomTxt {
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
.returnTablePrint .title { .returnTablePrint .title {
width: 100%; width: 100%;
font-size: 20px; font-size: 24px;
text-align: center; text-align: center;
position: relative; position: relative;
margin: 0; margin: 0;
...@@ -127,12 +127,12 @@ ...@@ -127,12 +127,12 @@
background-color: #dedede; background-color: #dedede;
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
font-size: 10px; font-size: 15px;
} }
table.altrowstable td { table.altrowstable td {
height: 25px; height: 23px;
line-height:25px; line-height:23px;
font-size: 15px; font-size: 15px;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
...@@ -141,74 +141,99 @@ ...@@ -141,74 +141,99 @@
} }
.td2{ .td2{
height: 50px !important; height: 50px !important;
line-height:25px;
} }
.td3{ .td3{
height: 75px !important; height: 75px !important;
line-height:25px;
} }
.td4{ .td4{
line-height:25px;
height: 100px !important; height: 100px !important;
} }
.td5{ .td5{
line-height:25px;
height: 125px !important; height: 125px !important;
} }
.td6{ .td6{
line-height:25px;
height: 150px !important; height: 150px !important;
} }
.td7{ .td7{
line-height:25px;
height: 175px !important; height: 175px !important;
} }
.td8{ .td8{
line-height:25px;
height: 200px !important; height: 200px !important;
} }
.td9{ .td9{
line-height:25px;
height: 225px !important; height: 225px !important;
} }
.td10{ .td10{
line-height:25px;
height: 250px !important; height: 250px !important;
} }
.td11{ .td11{
line-height:25px;
height: 275px !important; height: 275px !important;
} }
.td12{ .td12{
line-height:25px;
height: 300px !important; height: 300px !important;
} }
.td13{ .td13{
line-height:25px;
height: 325px !important; height: 325px !important;
} }
.td14{ .td14{
line-height:25px;
height: 350px !important; height: 350px !important;
} }
.td15{ .td15{
line-height:25px;
height: 375px !important; height: 375px !important;
} }
.td16{ .td16{
line-height:25px;
height: 400px !important; height: 400px !important;
} }
.td17{ .td17{
line-height:25px;
height: 425px !important; height: 425px !important;
} }
.td18{ .td18{
line-height:25px;
height: 450px !important; height: 450px !important;
} }
.td19{ .td19{
line-height:25px;
height: 475px !important; height: 475px !important;
} }
.td20{ .td20{
line-height:25px;
height: 500px !important; height: 500px !important;
} }
.td21{ .td21{
line-height:25px;
height: 525px !important; height: 525px !important;
} }
.td22{ .td22{
line-height:25px;
height: 550px !important; height: 550px !important;
} }
.td23{ .td23{
line-height:25px;
height: 575px !important; height: 575px !important;
} }
.td24{ .td24{
line-height:25px;
height: 600px !important; height: 600px !important;
} }
.td25{ .td25{
line-height:25px;
height: 625px !important; height: 625px !important;
} }
.oddrowcolor { .oddrowcolor {
...@@ -237,131 +262,131 @@ ...@@ -237,131 +262,131 @@
</head> </head>
<body> <body>
<div class="returnTablePrint"> <div class="returnTablePrint">
<div class="content"> <div class="content">
<div> <div>
<div class="listWrapper"> <div class="listWrapper">
<div class="list"> <div class="list">
<p class="title" style="margin-bottom:20px;"> <p class="title" style="margin-bottom:20px;">
<div class="main-title"> <div class="main-title">
<span> <span>
核心密码装备库存统计表 核心密码装备库存统计表
</span> </span>
</div>
</p>
<div style="height: 900px;">
<#list checks as dev>
<table class="altrowstable" id="alternatecolor">
<#if (dev.model)??>
<tr>
<td>${dev.model!}</td>
<td>${dev.name!}</td>
<td>${dev.count!}</td>
</tr>
</#if>
<tr>
<#if dev.oneCount == 1>
<td colspan="3" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 2>
<td colspan="3" class="td2" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 3>
<td colspan="3" class="td3" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 4>
<td colspan="3" class="td4" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 5>
<td colspan="3" class="td5" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 6>
<td colspan="3" class="td6" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 7>
<td colspan="3" class="td7" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 8>
<td colspan="3" class="td8" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 9>
<td colspan="3" class="td9" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 10>
<td colspan="3" class="td10" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 11>
<td colspan="3" class="td11" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 12>
<td colspan="3" class="td12" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 13>
<td colspan="3" class="td13" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 14>
<td colspan="3" class="td14" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 15>
<td colspan="3" class="td15" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 16>
<td colspan="3" class="td16" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 17>
<td colspan="3" class="td17" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 18>
<td colspan="3" class="td18" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 19>
<td colspan="3" class="td19" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 20>
<td colspan="3" class="td20" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 21>
<td colspan="3" class="td21" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 22>
<td colspan="3" class="td22" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 23>
<td colspan="3" class="td23" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 24>
<td colspan="3" class="td24" style="text-align: left">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 25>
<td colspan="3" class="td25" style="text-align: left">${dev.seqStirng!}</td>
</#if>
</tr>
</table>
</#list>
</div>
</div> </div>
<p class="person" style="margin-top: 20px;font-size: 10px;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;">制表时间:${time!}</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> </p>
<div style="height: 853px;border: 2px solid #000">
<#list checks as dev>
<table class="altrowstable" id="alternatecolor">
<#if (dev.model)??>
<tr>
<td>${dev.model!}</td>
<td>${dev.name!}</td>
<td>${dev.count!}</td>
</tr>
</#if>
<tr>
<#if dev.oneCount == 1>
<td colspan="3" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 2>
<td colspan="3" class="td2" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 3>
<td colspan="3" class="td3" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 4>
<td colspan="3" class="td4" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 5>
<td colspan="3" class="td5" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 6>
<td colspan="3" class="td6" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 7>
<td colspan="3" class="td7" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 8>
<td colspan="3" class="td8" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 9>
<td colspan="3" class="td9" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 10>
<td colspan="3" class="td10" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 11>
<td colspan="3" class="td11" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 12>
<td colspan="3" class="td12" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 13>
<td colspan="3" class="td13" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 14>
<td colspan="3" class="td14" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 15>
<td colspan="3" class="td15" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 16>
<td colspan="3" class="td16" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 17>
<td colspan="3" class="td17" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 18>
<td colspan="3" class="td18" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 19>
<td colspan="3" class="td19" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 20>
<td colspan="3" class="td20" style="text-align: center;color: #555;t">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 21>
<td colspan="3" class="td21" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 22>
<td colspan="3" class="td22" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 23>
<td colspan="3" class="td23" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 24>
<td colspan="3" class="td24" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 25>
<td colspan="3" class="td25" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
</#if>
</tr>
</table>
</#list>
</div> </div>
</div> </div>
</div> <p class="person" style="margin-top: 20px;font-size: 10px;width: 100%;text-align: left;">
<div> <span style="width: 200px;text-align: center;width: 24%;margin: 0;">制表单位:${unit!}</span>
<!--<p class="bottomTxt" style="float: left;">注:编号连续使用"-"省略</p>--> <span style="width: 200px;text-align: center;width: 24%;margin: 0;">制表时间:${time!}</span>
<p class="bottomTxt" style="float: right;">第${page}页/共${count}页</p> <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>
<!--<script type="text/javascript">--> </div>
<!--function altRows(id){--> <div>
<!--if(document.getElementsByTagName){--> <!--<p class="bottomTxt" style="float: left;">注:编号连续使用"-"省略</p>-->
<p class="bottomTxt" style="float: right;">第${page}页/共${count}页</p>
<!--var table = document.getElementById(id);--> </div>
<!--var rows = table.getElementsByTagName("tr");--> </div>
<!--<script type="text/javascript">-->
<!--for(i = 0; i < rows.length; i++){--> <!--function altRows(id){-->
<!--if(i % 2 == 0){--> <!--if(document.getElementsByTagName){-->
<!--rows[i].className = "evenrowcolor";-->
<!--}else{--> <!--var table = document.getElementById(id);-->
<!--rows[i].className = "oddrowcolor";--> <!--var rows = table.getElementsByTagName("tr");-->
<!--}-->
<!--}--> <!--for(i = 0; i < rows.length; i++){-->
<!--}--> <!--if(i % 2 == 0){-->
<!--}--> <!--rows[i].className = "evenrowcolor";-->
<!--}else{-->
<!--window.onload=function(){--> <!--rows[i].className = "oddrowcolor";-->
<!--altRows('alternatecolor');--> <!--}-->
<!--}--> <!--}-->
<!--</script>--> <!--}-->
<!--}-->
<!--window.onload=function(){-->
<!--altRows('alternatecolor');-->
<!--}-->
<!--</script>-->
</body> </body>
</html> </html>
\ No newline at end of file
<!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;
}
/*@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: 20px;
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: 24px;
color: #000000;
text-align: center;
}
table.altrowstable {
width: 100%;
font-size: 14px;
color: #141414;
border-width: 0px;
border-color: #000;
border-collapse: collapse;
text-align: center;
table-layout: fixed;
word-break: break-all;
}
table.altrowstable th {
border-width: 1px;
padding: 0px;
border-style: solid;
border-color: #ccc;
background-color: #dedede;
height: 25px;
line-height: 25px;
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 #bebebe;
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{
height: 425px !important;
line-height:25px;
}
.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;
}
.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: 881px;border:2px solid #000">
<table class="altrowstable" id="alternatecolor">
<tr>
<th>型号</th>
<th>名称</th>
<th>所属单位</th>
<th>存放位置</th>
<th>数量</th>
</tr>
<#list checks as dev>
<!--<table class="altrowstable" id="alternatecolor">-->
<!--<tr>-->
<!--<th>型号</th>-->
<!--<th>名称</th>-->
<!--<th>所属单位</th>-->
<!--<th>存放位置</th>-->
<!--<th>数量</th>-->
<!--</tr>-->
<#if (dev.model)??>
<tr>
<td>${dev.model!}</td>
<td>${dev.name!}</td>
<td>${dev.ownUnit!}</td>
<td>${dev.store!}</td>
<td>${dev.count!}</td>
</tr>
</#if>
<tr>
<#if dev.oneCount == 1>
<td colspan="5" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 2>
<td colspan="5" class="td2" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 3>
<td colspan="5" class="td3" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 4>
<td colspan="5" class="td4" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 5>
<td colspan="5" class="td5" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 6>
<td colspan="5" class="td6" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 7>
<td colspan="5" class="td7" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 8>
<td colspan="5" class="td8" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 9>
<td colspan="5" class="td9" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 10>
<td colspan="5" class="td10" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 11>
<td colspan="5" class="td11" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 12>
<td colspan="5" class="td12" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 13>
<td colspan="5" class="td13" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 14>
<td colspan="5" class="td14" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 15>
<td colspan="5" class="td15" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 16>
<td colspan="5" class="td16" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 17>
<td colspan="5" class="td17" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 18>
<td colspan="5" class="td18" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 19>
<td colspan="5" class="td19" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 20>
<td colspan="5" class="td20" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 21>
<td colspan="5" class="td21" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 22>
<td colspan="5" class="td22" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 23>
<td colspan="5" class="td23" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 24>
<td colspan="5" class="td24" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
<#elseif dev.oneCount == 25>
<td colspan="5" class="td25" style="text-align: center;color: #555;">${dev.seqStirng!}</td>
</#if>
</tr>
</#list>
</table>
</div>
</div>
<p class="person" style="margin-top: 20px;font-size: 10px;width: 100%;text-align: left;">
<span style="width: 200px;text-align: center;width: 49%;margin: 0;">制表单位:${unit!}</span>
<span style="width: 200px;text-align: center;width: 49%;margin: 0;">制表时间:${time!}</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
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<!--自查确认--> <!--自查确认 不使用-->
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>Document</title> <title>Document</title>
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<!--核查确认单据--> <!--核查确认单据 不使用-->
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>Document</title> <title>Document</title>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论