refs #7644 Minor changes
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-06-28 14:52:19 +02:00
parent 19bf606330
commit 85c7336d92
5 changed files with 32 additions and 50 deletions

View File

@ -1,10 +1,6 @@
html {
height: 100%;
margin-top: -6px;
}
* {
box-sizing: border-box;
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
margin-top: -7px;
font-size: 28px;
}
table {
@ -17,9 +13,6 @@ td {
padding: 5px;
width: 100%;
}
#barcode {
text-align: center;
}
span {
font-size: 48px;
font-weight: bold;
@ -30,29 +23,19 @@ span {
font-size: 18px;
display: block;
}
.flex-container {
display: flex;
justify-content: space-between;
}
.flex-item {
flex: 1;
}
.section {
.cell {
width: 157px;
height: 50px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.barcode {
text-align: center;
}
#variant {
width: 314px;
}
#producer {
width: 471px;
}
.cell {
width: 157px;
}
#leftBox {
border-right: 1px solid;
}

View File

@ -4,14 +4,14 @@
<tbody>
<tr>
<td colspan="2">
<div id="variant" class="section">
<span class="lbl">Variedad:</span>
<div id="variant" class="cell">
<span class="lbl">Variedad</span>
{{buy.name}}
</div>
</td>
<td>
<div class="cell">
<span class="lbl">Medida:</span>
<span class="lbl">Medida</span>
{{buy.size}}
</div>
</td>
@ -19,68 +19,68 @@
<tr>
<td>
<div class="cell">
<span class="lbl">Categoría:</span>
<span class="lbl">Categoría</span>
{{buy.category}}
</div>
</td>
<td>
<div class="cell">
<span class="lbl">Color:</span>
<span class="lbl">Color</span>
{{buy.color}}
</div>
</td>
<td>
<div class="cell">
<span class="lbl">Origen:</span>
{{buy.origin}}
<span class="lbl">Origen</span>
{{buy.code}}
</div>
</td>
</tr>
<tr>
<td>
<div class="cell">
<span class="lbl">Packing:</span>
<span class="lbl">Packing</span>
{{buy.packing}}
</div>
</td>
<td>
<div class="cell">
<span class="lbl">Grouping:</span>
<span class="lbl">Grouping</span>
{{buy.grouping}}
</div>
</td>
<td>
<div class="cell">
<span class="lbl">Und. venta:</span>
<span class="lbl">Ud. venta</span>
{{buy.stems}}
</div>
</td>
</tr>
<tr>
<td colspan="3" id="barcode">
<td colspan="3" class="barcode">
<div v-html="getBarcode(buy.id)"></div>
<span>{{buy.id}}</span>
</td>
</tr>
<tr>
<td colspan="3">
<div id="producer" class="section">
<span class="lbl">Productor:</span>
<div id="producer" class="cell">
<span class="lbl">Productor</span>
{{buy.producer}}
</div>
</td>
</tr>
<tr>
<td colspan="3">
<div class="flex-container">
<div class="flex-item" id="leftBox">
<span class="lbl">Control:</span>
06/11
</div>
<div class="flex-item">
<span class="lbl">Caja nº:</span>
{{`${buy.labelNum} / ${maxLabelNum}`}}
</div>
<td colspan="2">
<div class="cell">
<span class="lbl">Control</span>
06 / 11
</div>
</td>
<td>
<div class="cell">
<span class="lbl">Caja nº</span>
{{`${buy.labelNum} / ${maxLabelNum}`}}
</div>
</td>
</tr>

View File

@ -7,8 +7,7 @@ module.exports = {
mixins: [vnReport],
async serverPrefetch() {
this.buys = await this.rawSqlFromDef('entry', [this.id]);
const maxLabelNum = Math.max(...this.buys.map(buy => buy.labelNum));
this.maxLabelNum = maxLabelNum;
this.maxLabelNum = Math.max(...this.buys.map(buy => buy.labelNum));
},
methods: {
getBarcode(id) {

View File

@ -1,6 +1,6 @@
{
"width": "10cm",
"height": "10.3cm",
"height": "10cm",
"margin": {
"top": "0.17cm",
"right": "0.2cm",

View File

@ -3,7 +3,7 @@ SELECT ROW_NUMBER() OVER(ORDER BY b.id) labelNum,
i.`size`,
i.category,
ink.id color,
o.code origin,
o.code,
b.packing,
b.`grouping`,
i.stems,