优化小票打印
This commit is contained in:
@@ -3,6 +3,7 @@ import getLodop from "./LodopFuncs.js";
|
||||
* 打印交班小票
|
||||
*/
|
||||
export default (data) => {
|
||||
console.log("data.deviceName===", data.deviceName);
|
||||
let LODOP = getLodop();
|
||||
LODOP.PRINT_INIT("打印小票");
|
||||
// 设置打印纸大小D
|
||||
@@ -17,7 +18,7 @@ export default (data) => {
|
||||
<div style="font-size: 16px;display: flex; justify-content:center;margin-top:6px;">
|
||||
交班小票
|
||||
</div>
|
||||
<div style="margin-top: 30px;font-size: 12px;">
|
||||
<div style="font-size: 12px;margin-top:50px;">
|
||||
当班时间:${data.startTime}
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
@@ -91,9 +92,8 @@ export default (data) => {
|
||||
<div style="font-size: 12px;margin-top: 4px;">商品数据</div>
|
||||
<table class="table" style="width: 100%;">
|
||||
<tr>
|
||||
<td style="font-size: 12px;width:50%;">商品</td>
|
||||
<td style="font-size: 12px;width:75%;">商品</td>
|
||||
<td style="font-size: 12px;width:25%;">数量</td>
|
||||
<td style="font-size: 12px;width:25%;">总计</td>
|
||||
</tr>
|
||||
`;
|
||||
|
||||
@@ -102,13 +102,10 @@ export default (data) => {
|
||||
for (let item of data.productInfos) {
|
||||
tableBody += `
|
||||
<tr>
|
||||
<td style="font-size: 12px;width:50%;">
|
||||
<td style="font-size: 12px;width:75%;">
|
||||
<div>${item.productName}</div>
|
||||
</td>
|
||||
<td style="font-size: 12px;width:25%;">${item.num}</td>
|
||||
<td style="font-size: 12px;width:25%;">
|
||||
${item.amount}
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
}
|
||||
@@ -141,18 +138,17 @@ export default (data) => {
|
||||
<span>应交金额:</span>
|
||||
<span>${data.payable}</span>
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
<span>上交金额:</span>
|
||||
<span>${data.handIn}</span>
|
||||
</div>
|
||||
<div style="margin-top: 20px; font-size: 12px;">
|
||||
<span>总订单数:</span>
|
||||
<span>${data.orderNum}</span>
|
||||
</div>
|
||||
<div style="padding-bottom: 50px;font-size: 12px;">
|
||||
<div style="font-size: 12px;">
|
||||
打印时间:${data.printTime}
|
||||
</div>
|
||||
<div style="height: 50px;"></div>
|
||||
<div>.</div>
|
||||
<div>.</div>
|
||||
<div>.</div>
|
||||
<div>.</div>
|
||||
`;
|
||||
|
||||
let lastHtml = `${html}${payInfos}${memberTitle}${memberData}${productCategoriesTabHead}${productCategoriesTableBody}${tabHead}${tableBody}${str}`;
|
||||
|
||||
Reference in New Issue
Block a user