模板优化

This commit is contained in:
余文财 2025-05-20 15:28:35 +08:00
parent 70c2b487b3
commit 8adb80409e
6 changed files with 53 additions and 53 deletions

View File

@ -74,7 +74,7 @@ public class ReceiptPrintController {
int dinyHeight = 0; int dinyHeight = 0;
if (templateName.equals("department")) { if (templateName.equals("department")) {
// 由于是使用的门诊小票-T2那么默认的高度为1000强行设置通过动态修改渲染的图片的高度 // 由于是使用的门诊小票-T2那么默认的高度为1100强行设置通过动态修改渲染的图片的高度
height = 1100; height = 1100;
// 单行最大长度为10 // 单行最大长度为10

View File

@ -47,12 +47,12 @@ public class ReceiptPrintRequest implements Serializable {
/** /**
* 小票渲染宽度默认为600 * 小票渲染宽度默认为600
*/ */
private Integer width = 600; private Integer width = 690;
/** /**
* 生成的模板的高度默认为950 * 生成的模板的高度默认为950
*/ */
private Integer height = 950; private Integer height = 1100;
} }

View File

@ -5,23 +5,23 @@
<title>门诊缴费凭证</title> <title>门诊缴费凭证</title>
</head> </head>
<body> <body>
<div style="font-size: 23px; margin-top: 12px;font-weight: bold;"> <div style="font-size: 24px;font-weight: bold;">
<div> <div>
<div style="text-align: center; font-size: 31px; "><span th:text="${hospitalName}"></span> <div style="text-align: center; font-size: 32px; "><span th:text="${hospitalName}"></span>
</div> </div>
<div style="text-align: center; font-size: 19px;"> <div style="text-align: center; font-size: 20px;">
****<span th:text="${registeTerminalName}"></span>**** ****<span th:text="${registeTerminalName}"></span>****
</div> </div>
<div style="font-size: 23px;text-align: center; margin-bottom: -10px; margin-top: -10px;"> <div style="font-size: 24px;text-align: center; margin-bottom: -10px; margin-top: -10px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
<div style="text-align: center; font-size: 31px; "><span th:text="${registeType}"></span> <div style="text-align: center; font-size: 32px; "><span th:text="${registeType}"></span>
</div> </div>
<div style="font-size: 23px;text-align: center; margin-top: -15px;"> <div style="font-size: 24px;text-align: center; margin-top: -15px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
</div> </div>
<div style="font-size: 26px;word-break: break-all;margin: 10px 20px;"> <div style="font-size: 27px;word-break: break-all;margin: 10px 20px;">
<div style="display: flex;"> <div style="display: flex;">
<span style="margin-right: 25px;">姓名:<span th:text="${name}"></span></span> <span style="margin-right: 25px;">姓名:<span th:text="${name}"></span></span>
<span style="margin-right: 25px;">性别:<span th:text="${gender}"></span></span> <span style="margin-right: 25px;">性别:<span th:text="${gender}"></span></span>
@ -37,10 +37,10 @@
<div style="margin-top: 10px;" th:if="${department}">就诊科室:<span th:text="${department}"></span> <div style="margin-top: 10px;" th:if="${department}">就诊科室:<span th:text="${department}"></span>
</div> </div>
</div> </div>
<div style="text-align: center; font-size: 23px;"> <div style="text-align: center; font-size: 24px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
<div style="font-size: 26px; margin: 10px 20px"> <div style="font-size: 27px; margin: 10px 20px">
<div style="word-break: break-all;"> <div style="word-break: break-all;">
<span style="margin-right: 25px;">费用总额:<span th:text="${totalFee}"></span></span> <span style="margin-right: 25px;">费用总额:<span th:text="${totalFee}"></span></span>
<span>个人支付:<span th:text="${personalPayment}"></span></span> <span>个人支付:<span th:text="${personalPayment}"></span></span>
@ -49,18 +49,18 @@
th:text="${actualReceiptAmount}"></span></div> th:text="${actualReceiptAmount}"></span></div>
<div style="margin-top: 10px;"><span>实收金额:</span><span th:text="${actualReceiptAmountChinese}"></span></div> <div style="margin-top: 10px;"><span>实收金额:</span><span th:text="${actualReceiptAmountChinese}"></span></div>
</div> </div>
<div style="text-align: center; font-size: 23px;"> <div style="text-align: center; font-size: 24px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
<div style="margin: 10px 20px"> <div style="margin: 10px 20px">
<table style="width: 100%; table-layout: fixed; border-collapse: collapse;"> <table style="width: 100%; table-layout: fixed; border-collapse: collapse;">
<tr style="font-size: 26px;"> <tr style="font-size: 27px;">
<th style="width: 300px;text-align: left;">项目名称</th> <th style="width: 300px;text-align: left;">项目名称</th>
<th style="width: calc(25% - 5px);text-align: center;">数量</th> <th style="width: calc(25% - 5px);text-align: center;">数量</th>
<th style="width: calc(25% - 5px);text-align: center;">单价</th> <th style="width: calc(25% - 5px);text-align: center;">单价</th>
<th style="width: calc(25% - 5px);text-align: center;">小计</th> <th style="width: calc(25% - 5px);text-align: center;">小计</th>
</tr> </tr>
<tr style="font-size: 21px;word-break: break-all;" th:each="item : ${items}"> <tr style="font-size: 22px;word-break: break-all;" th:each="item : ${items}">
<td style="text-align: left;width: 300px;" th:text="${item.name}"></td> <td style="text-align: left;width: 300px;" th:text="${item.name}"></td>
<td style="text-align: center;" th:text="${item.quantity}"></td> <td style="text-align: center;" th:text="${item.quantity}"></td>
<td style="text-align: center;" th:text="${item.unitPrice}"></td> <td style="text-align: center;" th:text="${item.unitPrice}"></td>
@ -68,14 +68,14 @@
</tr> </tr>
</table> </table>
</div> </div>
<div style="text-align: center; font-size: 23px;"> <div style="text-align: center; font-size: 24px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
<div style="margin-left: 20px; font-size: 26px;"> <div style="margin-left: 20px; font-size: 27px;">
<div>终端编号:<span th:text="${terminalNumber}"></span></div> <div>终端编号:<span th:text="${terminalNumber}"></span></div>
<div>打印时间:<span th:text="${printTime}"></span></div> <div>打印时间:<span th:text="${printTime}"></span></div>
</div> </div>
<div style="margin-left: 20px; font-size: 26px; margin-top: 20px;"> <div style="margin-left: 20px; font-size: 27px; margin-top: 20px;">
<span style="margin-top: 20px;">温馨提示</span><br> <span style="margin-top: 20px;">温馨提示</span><br>
<span>1.请取走全部凭条、并妥善保管</span><br> <span>1.请取走全部凭条、并妥善保管</span><br>
<span>2.如果对缴费结算存在疑问,请到人工窗口咨询</span> <span>2.如果对缴费结算存在疑问,请到人工窗口咨询</span>

View File

@ -4,23 +4,23 @@
<title>挂号单</title> <title>挂号单</title>
</head> </head>
<body> <body>
<div style="font-size: 23px; margin-top: 12px;font-weight: bold;"> <div style="font-size: 24px;font-weight: bold;">
<div> <div>
<div style="text-align: center; font-size: 31px; "><span th:text="${hospitalName}"></span> <div style="text-align: center; font-size: 32px; "><span th:text="${hospitalName}"></span>
</div> </div>
<div style="text-align: center; font-size: 19px;"> <div style="text-align: center; font-size: 20px;">
****<span th:text="${registeTerminalName}"></span>**** ****<span th:text="${registeTerminalName}"></span>****
</div> </div>
<div style="font-size: 23px;text-align: center; margin-bottom: -10px; margin-top: -10px;"> <div style="font-size: 24px;text-align: center; margin-bottom: -10px; margin-top: -10px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
<div style="text-align: center; font-size: 31px; "><span th:text="${registeType}"></span> <div style="text-align: center; font-size: 32px; "><span th:text="${registeType}"></span>
</div> </div>
<div style="font-size: 23px;text-align: center; margin-top: -15px;"> <div style="font-size: 24px;text-align: center; margin-top: -15px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
</div> </div>
<div style=" font-size: 28px;"> <div style=" font-size: 29px;">
<div style="margin-left: 35px;">&emsp;&emsp;名:<span th:text="${name}"></span></div> <div style="margin-left: 35px;">&emsp;&emsp;名:<span th:text="${name}"></span></div>
<div style="margin-left: 35px;">&emsp;&emsp;别:<span th:text="${gender}"></span></div> <div style="margin-left: 35px;">&emsp;&emsp;别:<span th:text="${gender}"></span></div>
<div style="margin-left: 35px;">&emsp;&emsp;龄:<span th:text="${age}"></span></div> <div style="margin-left: 35px;">&emsp;&emsp;龄:<span th:text="${age}"></span></div>
@ -29,14 +29,14 @@
<div style="margin-left: 35px;">入院科室:<span th:text="${department}"></span></div> <div style="margin-left: 35px;">入院科室:<span th:text="${department}"></span></div>
<div style="margin-left: 35px;">&ensp;&ensp;用:<span th:text="${totalFee}"></span>&thinsp;</div> <div style="margin-left: 35px;">&ensp;&ensp;用:<span th:text="${totalFee}"></span>&thinsp;</div>
<div style="margin-left: 35px;">支付方式:<span th:text="${paymentMethod}"></span></div> <div style="margin-left: 35px;">支付方式:<span th:text="${paymentMethod}"></span></div>
<div style="margin-left: 35px;">交易流水:<span style="font-size: 26px;" th:text="${transactionNumber}"></span> <div style="margin-left: 35px;">交易流水:<span style="font-size: 27px;" th:text="${transactionNumber}"></span>
</div> </div>
</div> </div>
<div style=" margin-top: 8px;"> <div style=" margin-top: 8px;">
<div style="font-size: 27px;margin-left: 35px; ">备注:缴费凭证,请妥善保管!</div> <div style="font-size: 28px;margin-left: 35px; ">备注:缴费凭证,请妥善保管!</div>
<div style="font-size: 27px;margin-left: 35px;">&ensp;&ensp;号:<span th:text="${terminalNumber}"></span> <div style="font-size: 28px;margin-left: 35px;">&ensp;&ensp;号:<span th:text="${terminalNumber}"></span>
</div> </div>
<div style="font-size: 27px;margin-left: 35px;">打印时间:<span th:text="${printTime}"></span></div> <div style="font-size: 28px;margin-left: 35px;">打印时间:<span th:text="${printTime}"></span></div>
</div> </div>
</div> </div>
</body> </body>

View File

@ -4,37 +4,37 @@
<title>门诊缴费</title> <title>门诊缴费</title>
</head> </head>
<body> <body>
<div style="font-size: 23px; margin-top: 12px;font-weight: bold;"> <div style="font-size: 24px;font-weight: bold;">
<div> <div>
<div style="text-align: center; font-size: 31px; "><span th:text="${hospitalName}"></span> <div style="text-align: center; font-size: 32px; "><span th:text="${hospitalName}"></span>
</div> </div>
<div style="text-align: center; font-size: 19px;"> <div style="text-align: center; font-size: 20px;">
****<span th:text="${registeTerminalName}"></span>**** ****<span th:text="${registeTerminalName}"></span>****
</div> </div>
<div style="font-size: 23px;text-align: center; margin-bottom: -10px; margin-top: -10px;"> <div style="font-size: 24px;text-align: center; margin-bottom: -10px; margin-top: -10px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
<div style="text-align: center; font-size: 31px; "><span th:text="${registeType}"></span> <div style="text-align: center; font-size: 32px; "><span th:text="${registeType}"></span>
</div> </div>
<div style="font-size: 23px;text-align: center; margin-top: -15px;"> <div style="font-size: 24px;text-align: center; margin-top: -15px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
</div> </div>
<div style=" font-size: 28px;"> <div style=" font-size: 29px;">
<div style="margin-left: 35px;">&emsp;&emsp;名:<span th:text="${name}"></span></div> <div style="margin-left: 35px;">&emsp;&emsp;名:<span th:text="${name}"></span></div>
<div style="margin-left: 35px;">&emsp;&emsp;别:<span th:text="${gender}"></span></div> <div style="margin-left: 35px;">&emsp;&emsp;别:<span th:text="${gender}"></span></div>
<div style="margin-left: 35px;">&emsp;&emsp;龄:<span th:text="${age}"></span></div> <div style="margin-left: 35px;">&emsp;&emsp;龄:<span th:text="${age}"></span></div>
<div style="margin-left: 35px;">出生日期:<span th:text="${birthDate}"></span></div> <div style="margin-left: 35px;">出生日期:<span th:text="${birthDate}"></span></div>
<div style="margin-left: 35px;">&ensp;&ensp;用:<span th:text="${totalFee}"></span>&thinsp;</div> <div style="margin-left: 35px;">&ensp;&ensp;用:<span th:text="${totalFee}"></span>&thinsp;</div>
<div style="margin-left: 35px;">支付方式:<span th:text="${paymentMethod}"></span></div> <div style="margin-left: 35px;">支付方式:<span th:text="${paymentMethod}"></span></div>
<div style="margin-left: 35px;">交易流水:<span style="font-size: 26px;" th:text="${transactionNumber}"></span> <div style="margin-left: 35px;">交易流水:<span style="font-size: 27px;" th:text="${transactionNumber}"></span>
</div> </div>
</div> </div>
<div style=" margin-top: 8px;"> <div style=" margin-top: 8px;">
<div style="font-size: 27px;margin-left: 35px; ">备注:缴费凭证,请妥善保管!</div> <div style="font-size: 28px;margin-left: 35px; ">备注:缴费凭证,请妥善保管!</div>
<div style="font-size: 27px;margin-left: 35px;">&ensp;&ensp;号:<span th:text="${terminalNumber}"></span> <div style="font-size: 28px;margin-left: 35px;">&ensp;&ensp;号:<span th:text="${terminalNumber}"></span>
</div> </div>
<div style="font-size: 27px;margin-left: 35px;">打印时间:<span th:text="${printTime}"></span></div> <div style="font-size: 28px;margin-left: 35px;">打印时间:<span th:text="${printTime}"></span></div>
</div> </div>
</div> </div>
</body> </body>

View File

@ -4,23 +4,23 @@
<title>挂号单</title> <title>挂号单</title>
</head> </head>
<body> <body>
<div style="font-size: 23px; margin-top: 12px;font-weight: bold;"> <div style="font-size: 24px;font-weight: bold;">
<div> <div>
<div style="text-align: center; font-size: 31px;"><span th:text="${hospitalName}"></span> <div style="text-align: center; font-size: 32px;"><span th:text="${hospitalName}"></span>
</div> </div>
<div style="text-align: center;font-size: 19px;"> <div style="text-align: center;font-size: 20px;">
****<span th:text="${registeTerminalName}"></span>**** <span>****<span th:text="${registeTerminalName}"></span>****</span>
</div> </div>
<div style="font-size: 23px;text-align: center;margin-bottom: -10px; margin-top: -10px;"> <div style="font-size: 24px;text-align: center;margin-bottom: -10px; margin-top: -10px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
<div style="text-align: center; font-size: 31px;"><span th:text="${registeType}"></span> <div style="text-align: center; font-size: 32px;"><span th:text="${registeType}"></span>
</div> </div>
<div style="font-size: 23px;text-align: center; margin-top: -15px;"> <div style="font-size: 24px;text-align: center; margin-top: -15px;">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
</div> </div>
<div style="font-size: 28px;"> <div style="font-size: 29px;">
<div style="margin-left: 35px;">&emsp;&emsp;名:<span th:text="${name}"></span></div> <div style="margin-left: 35px;">&emsp;&emsp;名:<span th:text="${name}"></span></div>
<div style="margin-left: 35px;">&emsp;&emsp;别:<span th:text="${gender}"></span></div> <div style="margin-left: 35px;">&emsp;&emsp;别:<span th:text="${gender}"></span></div>
<div style="margin-left: 35px;">&emsp;&emsp;龄:<span th:text="${age}"></span></div> <div style="margin-left: 35px;">&emsp;&emsp;龄:<span th:text="${age}"></span></div>
@ -41,14 +41,14 @@
alt="QR Code"/> alt="QR Code"/>
</div> </div>
</div> </div>
<div style="margin-top: 8px;"> <div style="margin-top: 3px;">
<div style="font-size: 23px;margin-top: -40px; text-align: center; "> <div style="font-size: 24px;margin-top: -40px; text-align: center; ">
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
</div> </div>
<div style="font-size: 27px;margin-left: 35px; ">备注:凭此条退费,请妥善保管!</div> <div style="font-size: 28px;margin-left: 35px; ">备注:凭此条退费,请妥善保管!</div>
<div style="font-size: 27px;margin-left: 35px;">&ensp;&ensp;号:<span th:text="${terminalNumber}"></span> <div style="font-size: 28px;margin-left: 35px;">&ensp;&ensp;号:<span th:text="${terminalNumber}"></span>
</div> </div>
<div style="font-size: 27px;margin-left: 35px;">打印时间:<span th:text="${printTime}"></span></div> <div style="font-size: 28px;margin-left: 35px;">打印时间:<span th:text="${printTime}"></span></div>
</div> </div>
</div> </div>
</body> </body>