Compare commits

...

2 Commits

Author SHA1 Message Date
Ledo
cc43aebb57 预览间距调整 2025-08-05 09:05:52 +08:00
Ledo
728dadf8f1 预览间距调整 2025-08-05 08:36:59 +08:00
6 changed files with 20 additions and 14 deletions

View File

@ -86,15 +86,18 @@ const open = async ( vals) => {
(qrCodeElement.innerHTML +=
`<div style="width: 90mm; height: 60mm; box-sizing: border-box; font-family: monospace; position: relative; background-color: white; color: black;">
<div style="font-size: 11px; margin-bottom: 1mm;">
<span style="display: inline-block; width: 100%;font-weight: 700; border-bottom: 1px solid black;margin-left: 2mm; padding-bottom: 0.2mm;">${item.code}</span>
<span style="display: inline-block; width: 100%;font-weight: 700; border-bottom: 1px solid black; padding-bottom: 0.2mm;">${item.code}</span>
</div>
<div style="display: flex; align-items: center;">
<span style="white-space: nowrap;margin-left: 2mm "> </span>
<span style="flex-grow: 1; border-bottom: 1px solid black; height: 2em; margin-left: 1mm;">${item.name}</span>
<span style="white-space: nowrap; "> </span>
<span style="flex-grow: 1; border-bottom: 1px solid black; margin-left: -1.2mm; padding-bottom: 0.2mm;">${item.name}</span>
</div>
<div style="display: flex; position: absolute; bottom: 2mm; left: 2mm; right: 2mm; height: 34mm;">
<div style="display: flex; position: absolute; bottom: 2mm; left: 0.1mm; right: 2mm; height: 34mm;">
<div style="display: flex; flex-direction: column; justify-content: center; align-items: flex-start; width: 13mm; margin-right: 1mm;">
<span style="font-size: 11px; margin-bottom: 0.5mm; margin-top:2mm; white-space: nowrap;"> ${item.amount}</span>
<div style="display: flex; align-items: center;">
<span style="white-space: nowrap; margin-right: 1mm;"> </span>
<span style="font-size: 11px; margin-bottom: 0.5mm;white-space: nowrap;margin-left: -2.3mm;">${item.amount}</span>
</div>
<span style="font-size: 5px; line-height: 1; margin-top: auto; white-space: nowrap;">${formattedDate}</span>
</div>
<div style="width: 34mm; height: 34mm; margin-left: auto; display: flex; align-items: flex-end; justify-content: flex-end;">

View File

@ -135,7 +135,7 @@ const onPrint = () => {
white-space: nowrap;
}
.timestamp {
font-size: 10px;
font-size: 12px;
line-height: 1;
margin-left: 0.5mm;
margin-top: auto;

View File

@ -106,17 +106,20 @@ const open = async (bomCode, vals) => {
const qrCodeElement = document.getElementById('qrCodeContainer')
if (qrCodeElement) {
(qrCodeElement.innerHTML +=
`<div style="width: 90mm; height: 60mm; padding: 2mm; box-sizing: border-box; font-family: monospace; position: relative; background-color: white; color: black;">
`<div style="width: 90mm; height: 60mm; box-sizing: border-box; font-family: monospace; position: relative; background-color: white; color: black;">
<div style="font-size: 11px; margin-bottom: 1mm;">
<span style="display: inline-block; width: 100%;font-weight: 700; border-bottom: 1px solid black; padding-bottom: 0.2mm;">${item.code}</span>
</div>
<div style="display: flex; align-items: center;">
<span style="white-space: nowrap; margin-right: 1mm;"> </span>
<span style="flex-grow: 1; border-bottom: 1px solid black; height: 2em; margin-left: 1mm;">${item.name}</span>
<span style="flex-grow: 1; border-bottom: 1px solid black; margin-left: -2.5mm;padding-bottom: 0.2mm;">${item.name}</span>
</div>
<div style="display: flex; position: absolute; bottom: 2mm; left: 2mm; right: 2mm; height: 34mm;">
<div style="display: flex; position: absolute; bottom: 2mm; left: 0.1mm; right: 2mm; height: 34mm;">
<div style="display: flex; flex-direction: column; justify-content: center; align-items: flex-start; width: 13mm; margin-right: 1mm;">
<span style="font-size: 11px; margin-bottom: 0.5mm; margin-top:2mm; white-space: nowrap;"> ${item.amount}</span>
<div style="display: flex; align-items: center;">
<span style="white-space: nowrap; margin-right: 1mm;"> </span>
<span style="font-size: 11px; margin-bottom: 0.5mm;white-space: nowrap;margin-left: -2.3mm;">${item.amount}</span>
</div>
<span style="font-size: 5px; line-height: 1; margin-top: auto; white-space: nowrap;">${formattedDate}</span>
</div>
<div style="width: 34mm; height: 34mm; margin-left: auto; display: flex; align-items: flex-end; justify-content: flex-end;">

View File

@ -130,7 +130,7 @@ const onPrint = () => {
white-space: nowrap;
}
.timestamp {
font-size: 10px;
font-size: 12px;
line-height: 1;
margin-left: 0.5mm;
margin-top: auto;

View File

@ -86,11 +86,11 @@ const open = async (vals) => {
(qrCodeElement.innerHTML +=
`<div style="width: 90mm; height: 60mm; padding: 2mm; box-sizing: border-box; font-family: monospace; position: relative; background-color: white; color: black;">
<div style="font-size: 11px; margin-bottom: 1mm;">
<span style="display: inline-block; width: 100%; border-bottom: 1px solid black; padding-bottom: 0.2mm;">物料编码${item.code}</span>
<span style="display: inline-block; width: 100%; border-bottom: 1px solid black; padding-bottom: 0.2mm;">物料编码:${item.code}</span>
</div>
<div style="display: flex; align-items: center;">
<span style="white-space: nowrap; margin-right: 1mm;"> </span>
<span style="flex-grow: 1; border-bottom: 1px solid black; height: 2em; margin-left: -1mm;">${item.name}</span>
<span style="flex-grow: 1; border-bottom: 1px solid black; margin-left: -1mm;padding-bottom: 0.2mm;">${item.name}</span>
</div>
<div style="display: flex; position: absolute; bottom: 2mm; left: 2mm; right: 2mm; height: 34mm;">
<div style="display: flex; flex-direction: column; justify-content: center; align-items: flex-start; width: 13mm; margin-right: 1mm;">

View File

@ -151,7 +151,7 @@ const onPrint = () => {
line-height: 1.2;
}
.timestamp {
font-size: 10px;
font-size: 12px;
line-height: 1;
margin-left: 0.5mm;
margin-top: auto;