根据新模板调整配件销售发货清单导出的PDF样式
This commit is contained in:
parent
2ecdb7a9b7
commit
2c323af7ed
|
|
@ -219,7 +219,7 @@ public class ComponentPackingController {
|
||||||
ComponentPackingEditVO vo = getPackingInfo(packingId);
|
ComponentPackingEditVO vo = getPackingInfo(packingId);
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put("info", vo.getPackingVO());
|
variables.put("info", vo.getPackingVO());
|
||||||
variables.put("pages", PdfPageDTO.create(vo.getPackingItemVO(), 16, new ComponentPackingItemVO()));
|
variables.put("pages", PdfPageDTO.create(vo.getPackingItemVO(), 12, new ComponentPackingItemVO()));
|
||||||
String html = ThymeleafUtil.generator("/template/", "配件销售发货清单", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/", "配件销售发货清单", ".html", variables);
|
||||||
PdfGeneratorUtil.generatePdf("发货清单" + vo.getPackingVO().getNo(), html, response);
|
PdfGeneratorUtil.generatePdf("发货清单" + vo.getPackingVO().getNo(), html, response);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,18 @@
|
||||||
|
|
||||||
.table-cell {
|
.table-cell {
|
||||||
float: left;
|
float: left;
|
||||||
padding: 6px;
|
height: 50px;
|
||||||
|
padding: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-top: 1px solid #000;
|
border-top: 1px solid #000;
|
||||||
border-left: 1px solid #000;
|
border-left: 1px solid #000;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-cell-non-border {
|
||||||
|
float: left;
|
||||||
|
padding: 3px;
|
||||||
|
box-sizing: border-box;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
@ -60,134 +68,123 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 18pt;
|
font-size: 18pt;
|
||||||
padding: 10px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell-center {
|
.cell-center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.data-title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.data-item{
|
||||||
|
padding: 17px;
|
||||||
|
}
|
||||||
|
table{
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
td,th{
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.border td,tr,th{
|
||||||
|
border: 1px solid #000;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="table-container" th:each="page,pageStat : ${pages}">
|
<div class="table-container" th:each="page,pageStat : ${pages}">
|
||||||
<div class="table-row first-row">
|
|
||||||
<div class="table-cell header-cell last-col" style="width: 100%">发货清单</div>
|
|
||||||
</div>
|
|
||||||
<div class="table-row">
|
<div class="table-row">
|
||||||
<div class="table-cell" style="width: 35%" th:text="${info.no}">ZL-4.15(3-04)</div>
|
<div class="table-cell-non-border header-cell" style="width: 100%">
|
||||||
<div class="table-cell" style="width: 35%">福建南方路面机械股份有限公司</div>
|
福建南方路面机械股份有限公司<br/>Fujian South Highway Machinery Co., Ltd.
|
||||||
<div class="table-cell" style="width: 15%">装车号:V01</div>
|
|
||||||
<div class="table-cell last-col" style="width: 15%"
|
|
||||||
th:text="${#strings.isEmpty(info.cnum)?' ':info.cnum}"> </div>
|
|
||||||
</div>
|
|
||||||
<div class="table-row">
|
|
||||||
<div class="table-cell cell-center" style="width: 9%">订单号</div>
|
|
||||||
<div class="table-cell" style="width: 11%" th:utext="${#strings.isEmpty(info.vbeln)?' ':info.vbeln}">
|
|
||||||
1172000
|
|
||||||
</div>
|
|
||||||
<div class="table-cell cell-center" style="width: 8%">发货员</div>
|
|
||||||
<div class="table-cell" style="width: 8%" th:text="${#strings.isEmpty(info.uname)?' ':info.uname}">程慧芳
|
|
||||||
</div>
|
|
||||||
<div class="table-cell cell-center" style="width: 13%">办事处/代理商</div>
|
|
||||||
<div class="table-cell" style="width: 11%" th:text="${#strings.isEmpty(info.pName)?' ':info.pName}">测试
|
|
||||||
</div>
|
|
||||||
<div class="table-cell cell-center" style="width: 9%">发货日期</div>
|
|
||||||
<div class="table-cell" style="width: 11%"
|
|
||||||
th:text="${info.datum != null?#temporals.format(info.datum, 'yyyy-MM-dd'):' '}">
|
|
||||||
2025-08-04
|
|
||||||
</div>
|
|
||||||
<div class="table-cell cell-center" style="width: 9%">发运方式</div>
|
|
||||||
<div class="table-cell last-col" style="width: 11%"
|
|
||||||
th:text="${#strings.isEmpty(info.lBezei)?' ':info.lBezei}">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-row">
|
<table>
|
||||||
<div class="table-cell cell-center" style="width: 9%">设备编码</div>
|
<tr>
|
||||||
<div class="table-cell" style="width: 11%" th:utext="${#strings.isEmpty(info.matnr)?' ':info.matnr}">
|
<td style="width: 20%" rowspan="2"></td>
|
||||||
22222222222
|
<td rowspan="2" style="text-align: center;font-size: 18pt;font-weight: bold">
|
||||||
</div>
|
发货清单<br/>Shipping List
|
||||||
<div class="table-cell cell-center" style="width: 12%">收货人电话</div>
|
</td>
|
||||||
<div class="table-cell" style="width: 40%"
|
<td style="width: 20%;border: 1px solid #000;">
|
||||||
th:text="${#strings.isEmpty(info.gStrSuppl2)?' ':info.gStrSuppl2}">于文强18365529799
|
<span class="data-title">货单编号</span><br/>Shipping Order Number
|
||||||
</div>
|
</td>
|
||||||
<div class="table-cell cell-center" style="width: 8%">货单号</div>
|
</tr>
|
||||||
<div class="table-cell last-col" style="width: 20%"
|
<tr>
|
||||||
th:text="${#strings.isEmpty(info.huodh)?' ':info.huodh}">0000
|
<td th:text="${info.no}" style="border: 1px solid #000;">
|
||||||
</div>
|
ZL-4.15(3-04)
|
||||||
</div>
|
</td>
|
||||||
<div class="table-row">
|
</tr>
|
||||||
<div class="table-cell cell-center" style="width: 9%">收货单位</div>
|
</table>
|
||||||
<div class="table-cell" style="width: 40%" th:text="${#strings.isEmpty(info.lName)?' ':info.lName}">
|
<table class="border">
|
||||||
安徽华恒创远新材料有限责任公司
|
<tr>
|
||||||
</div>
|
<td style="width: 15%"><span class="data-title">订单号</span><br/>Order No.</td>
|
||||||
<div class="table-cell cell-center" style="width: 12%">签收人/电话</div>
|
<td style="width: 30%" colspan="2" th:text="${#strings.isEmpty(info.vbeln)?' ':info.vbeln}">1172000</td>
|
||||||
<div class="table-cell last-col" style="width: 39%"> </div>
|
<td style="width: 15%"><span class="data-title">设备编码</span><br/>Equipment Code</td>
|
||||||
</div>
|
<td colspan="3" th:text="${#strings.isEmpty(info.matnr)?' ':info.matnr}">200012111</td>
|
||||||
<div class="table-row">
|
</tr>
|
||||||
<div class="table-cell cell-center" style="width: 9%">收货地址</div>
|
<tr>
|
||||||
<div class="table-cell" style="width: 71%" th:text="${#strings.isEmpty(info.gStreen)?' ':info.gStreen}">
|
<td><span class="data-title">收货单位</span><br/>Consignee Unit</td>
|
||||||
安徽华恒创远新材料有限责任公司
|
<td colspan="2" th:text="${#strings.isEmpty(info.lName)?' ':info.lName}">安徽华恒创远新材料有限责任公司</td>
|
||||||
</div>
|
<td><span class="data-title">收货地址</span><br/>Consignee Address</td>
|
||||||
<div class="table-cell cell-center" style="width: 9%">收货日期</div>
|
<td colspan="3" th:text="${#strings.isEmpty(info.gStreen)?' ':info.gStreen}">1172000</td>
|
||||||
<div class="table-cell last-col" style="width: 11%">2025-08-04</div>
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
<div class="table-row">
|
<td><span class="data-title">收货人/电话</span><br/>Consignee's Phone No.</td>
|
||||||
<div class="table-cell cell-center" style="width: 6%">司机</div>
|
<td th:text="${#strings.isEmpty(info.gStrSuppl2)?' ':info.gStrSuppl2}">于文强18365529799</td>
|
||||||
<div class="table-cell" style="width: 14%" th:text="${#strings.isEmpty(info.bname)?' ':info.bname}">
|
<td style="width: 15%"><span class="data-title">签收人/电话</span><br/>Signatory/Phone No.</td>
|
||||||
于文强
|
<td style="width: 25%" colspan="2"></td>
|
||||||
</div>
|
<td style="width: 10%"><span class="data-title">收货日期</span><br/>Receipt Date</td>
|
||||||
<div class="table-cell cell-center" style="width: 8%">驾驶证</div>
|
<td></td>
|
||||||
<div class="table-cell" style="width: 26%" th:text="${#strings.isEmpty(info.zjshz)?' ':info.zjshz}">
|
</tr>
|
||||||
51254685465465465
|
</table>
|
||||||
</div>
|
<table class="border">
|
||||||
<div class="table-cell cell-center" style="width: 9%">车牌号</div>
|
<tr>
|
||||||
<div class="table-cell" style="width: 12%" th:text="${#strings.isEmpty(info.zchep)?' ':info.zchep}">
|
<td style="width: 15%"><span class="data-title">发货员</span><br/>Dispatcher</td>
|
||||||
粤A12345
|
<td style="width: 15%" th:text="${#strings.isEmpty(info.uname)?' ':info.uname}">程慧芳</td>
|
||||||
</div>
|
<td style="width: 15%"><span class="data-title">发货日期</span><br/>Shipping Date</td>
|
||||||
<div class="table-cell cell-center" style="width: 10%">司机电话</div>
|
<td style="width: 10%" th:text="${info.datum != null?#temporals.format(info.datum, 'yyyy-MM-dd'):' '}">2025-08-04</td>
|
||||||
<div class="table-cell last-col" style="width: 15%"
|
<td style="width: 15%"><span class="data-title">办事处/代理商</span><br/>Office/Agent</td>
|
||||||
th:text="${#strings.isEmpty(info.telNumber)?' ':info.telNumber}">18888888888
|
<td colspan="3" th:text="${#strings.isEmpty(info.pName)?' ':info.pName}">测试</td>
|
||||||
</div>
|
</tr>
|
||||||
</div>
|
<tr>
|
||||||
<div class="table-row">
|
<td><span class="data-title">发运方式</span><br/>Shipping Method</td>
|
||||||
<div class="table-cell cell-center" style="width: 6%">序号</div>
|
<td th:text="${#strings.isEmpty(info.lBezei)?' ':info.lBezei}">汽车</td>
|
||||||
<div class="table-cell cell-center" style="width: 9%">配件编码</div>
|
<td><span class="data-title">货单号</span><br/>Waybill No.</td>
|
||||||
<div class="table-cell cell-center" style="width: 39%">配件名称</div>
|
<td th:text="${#strings.isEmpty(info.huodh)?' ':info.huodh}">0000</td>
|
||||||
<div class="table-cell cell-center" style="width: 12%">货位号</div>
|
<td><span class="data-title">装车号</span><br/>Loading No.</td>
|
||||||
<div class="table-cell cell-center" style="width: 6%">单位</div>
|
<td colspan="3" th:text="${#strings.isEmpty(info.cnum)?' ':info.cnum}">V01</td>
|
||||||
<div class="table-cell cell-center" style="width: 8%">数量</div>
|
</tr>
|
||||||
<div class="table-cell cell-center last-col" style="width: 20%">备注</div>
|
<tr>
|
||||||
</div>
|
<td><span class="data-title">车牌号</span><br/>License Plate No.</td>
|
||||||
<div class="table-row" th:each="item,iterStat : ${page.datas}">
|
<td th:text="${#strings.isEmpty(info.zchep)?' ':info.zchep}">粤A12345</td>
|
||||||
<div class="table-cell cell-center" style="width: 6%" th:text="${iterStat.count}">1</div>
|
<td><span class="data-title">司机</span><br/>Driver</td>
|
||||||
<div class="table-cell cell-center" style="width: 9%"
|
<td th:text="${#strings.isEmpty(info.bname)?' ':info.bname}">于文强</td>
|
||||||
th:text="${#strings.isEmpty(item.idnrk)?' ':item.idnrk}">2100552783
|
<td><span class="data-title">驾驶证</span><br/>Driver's License No.</td>
|
||||||
</div>
|
<td th:text="${#strings.isEmpty(info.zjshz)?' ':info.zjshz}"></td>
|
||||||
<div class="table-cell" style="width: 39%" th:text="${#strings.isEmpty(item.ojtxb)?' ':item.ojtxb}">
|
<td style="width: 8%"><span class="data-title">电话</span><br/>Phone No.</td>
|
||||||
IH1213T.4 衬板6号
|
<td style="width: 10%" th:text="${#strings.isEmpty(info.telNumber)?' ':info.telNumber}">18888888888</td>
|
||||||
</div>
|
</tr>
|
||||||
<div class="table-cell cell-center" style="width: 12%"
|
</table>
|
||||||
th:text="${#strings.isEmpty(item.lgpbe)?' ':item.lgpbe}">E1-4-4
|
<table class="border" style="margin-top: 5px;">
|
||||||
</div>
|
<tr>
|
||||||
<div class="table-cell cell-center" style="width: 6%"
|
<td style="width: 10%"><span class="data-title">序号</span><br/>Serial No.</td>
|
||||||
th:text="${#strings.isEmpty(item.meins)?' ':item.meins}">PC
|
<td style="width: 15%"><span class="data-title">配件编码</span><br/>Spare Part Code</td>
|
||||||
</div>
|
<td><span class="data-title">配件名称</span><br/>Spare Part Name</td>
|
||||||
<div class="table-cell cell-center" style="width: 8%"
|
<td style="width: 15%"><span class="data-title">货位号</span><br/>Storage Location No.</td>
|
||||||
th:text="${#strings.isEmpty(item.outQty)?' ':item.outQty}">20.000
|
<td style="width: 5%"><span class="data-title">单位</span><br/>Unit</td>
|
||||||
</div>
|
<td style="width: 5%"><span class="data-title">数量</span><br/>Quantity</td>
|
||||||
<div class="table-cell last-col" style="width: 20%"
|
<td style="width: 10%"><span class="data-title">备注</span><br/>Remarks</td>
|
||||||
th:text="${#strings.isEmpty(item.zatwrt)?' ':item.zatwrt}">
|
</tr>
|
||||||
</div>
|
<tr th:each="item,iterStat : ${page.datas}">
|
||||||
</div>
|
<td th:text="${iterStat.count}">1</td>
|
||||||
<div class="table-row last-row">
|
<td th:text="${#strings.isEmpty(item.idnrk)?' ':item.idnrk}">2100552783</td>
|
||||||
<div class="table-cell" style="width: 6%"> </div>
|
<td style="text-align: left" th:text="${#strings.isEmpty(item.ojtxb)?' ':item.ojtxb}">IH1213T.4 衬板6号</td>
|
||||||
<div class="table-cell" style="width: 9%"> </div>
|
<td th:text="${#strings.isEmpty(item.lgpbe)?' ':item.lgpbe}">E1-4-4</td>
|
||||||
<div class="table-cell" style="width: 39%"> </div>
|
<td th:text="${#strings.isEmpty(item.meins)?' ':item.meins}">PC</td>
|
||||||
<div class="table-cell" style="width: 12%"> </div>
|
<td th:text="${#strings.isEmpty(item.outQty)?' ':item.outQty}">20.000</td>
|
||||||
<div class="table-cell" style="width: 6%"> </div>
|
<td th:text="${#strings.isEmpty(item.zatwrt)?' ':item.zatwrt}"> </td>
|
||||||
<div class="table-cell" style="width: 8%"> </div>
|
</tr>
|
||||||
<div class="table-cell last-col" style="width: 20%"> </div>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue