fix: refs #7266 Minor changes
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-11-27 10:40:47 +01:00
parent c550f711c6
commit 0afae5c2d6
5 changed files with 22 additions and 14 deletions

View File

@ -38,7 +38,7 @@
<tr> <tr>
<td class="md-txt xl-width bold center"> <td class="md-txt xl-width bold center">
<div class="overflow-line"> <div class="overflow-line">
{{buy.itemFk}} {{formatNumber(buy.itemFk)}}
</div> </div>
</td> </td>
<td colspan="2" class="md-txt md-width center"> <td colspan="2" class="md-txt md-width center">
@ -56,7 +56,7 @@
{{'LAID'}} {{'LAID'}}
</div> </div>
<div v-else class="overflow-line"> <div v-else class="overflow-line">
{{buy.entryFk}} {{formatNumber(buy.entryFk)}}
</div> </div>
</td> </td>
</tr> </tr>
@ -73,17 +73,17 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="center xl-width"> <td class="center xs-txt xl-width">
<div class="overflow-line"> <div class="overflow-line">
{{buy.buyFk}} {{formatNumber(buy.buyFk)}}
</div> </div>
</td> </td>
<td class="xs-txt sm-width center"> <td class="center xs-txt sm-width">
<div class="overflow-line"> <div class="overflow-line">
{{date}} {{date}}
</div> </div>
</td> </td>
<td class="xs-txt sm-width cursive center bold"> <td class="cursive center bold xs-txt sm-width">
<div class="overflow-line"> <div class="overflow-line">
{{`${buy.labelNum}/${buy.quantity / (packing || buy.packing)}`}} {{`${buy.labelNum}/${buy.quantity / (packing || buy.packing)}`}}
</div> </div>

View File

@ -9,7 +9,7 @@ module.exports = {
this.date = Date.vnNew(); this.date = Date.vnNew();
this.buys = await this.rawSqlFromDef('buy', [this.copies || 1, this.id]); this.buys = await this.rawSqlFromDef('buy', [this.copies || 1, this.id]);
if (!this.buys.length) throw new UserError(`Empty data source`); if (!this.buys.length) throw new UserError(`Empty data source`);
this.date = moment(this.date).format('WW/E'); this.date = moment(this.date).format('WW/DD');
}, },
methods: { methods: {
getBarcode(data) { getBarcode(data) {
@ -25,6 +25,9 @@ module.exports = {
margin: 0 margin: 0
}); });
return new XMLSerializer().serializeToString(svgNode); return new XMLSerializer().serializeToString(svgNode);
},
formatNumber(number) {
return new Intl.NumberFormat('es-ES', {maximumFractionDigits: 0}).format(number);
} }
}, },
props: { props: {

View File

@ -34,6 +34,9 @@ html {
background-color: black; background-color: black;
color: white; color: white;
} }
.sm-txt {
font-size: 18px;
}
.md-txt { .md-txt {
font-size: 20px; font-size: 20px;
} }

View File

@ -11,8 +11,8 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2" class="sm-txt">
{{buy.buyFk}} {{formatNumber(buy.buyFk)}}
</td> </td>
</tr> </tr>
<tr> <tr>
@ -28,7 +28,7 @@
<tr> <tr>
<td colspan="3" class="lg-width black-bg center bold xl-txt padding"> <td colspan="3" class="lg-width black-bg center bold xl-txt padding">
<div class="overflow-line"> <div class="overflow-line">
{{buy.itemFk}} {{formatNumber(buy.itemFk)}}
</div> </div>
</td> </td>
</tr> </tr>
@ -78,8 +78,7 @@
<div v-if="buy.isLaid && typeId === 'buy'" class="overflow-line black-bg bold"> <div v-if="buy.isLaid && typeId === 'buy'" class="overflow-line black-bg bold">
{{'LAID'}} {{'LAID'}}
</div> </div>
<div v-else class="overflow-line"> <div v-else class="overflow-line xs-txt">
{{buy.entryFk}}
</div> </div>
</td> </td>
</tr> </tr>
@ -103,7 +102,7 @@
<tr> <tr>
<td class="sm-width"> <td class="sm-width">
<div class="overflow-line"> <div class="overflow-line">
<i>Entrada:</i> {{buy.entryFk}} <i>Entrada:</i> {{formatNumber(buy.entryFk)}}
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -9,7 +9,7 @@ module.exports = {
this.buys = await this.rawSqlFromDef('buy', [this.copies || 1, this.id]); this.buys = await this.rawSqlFromDef('buy', [this.copies || 1, this.id]);
if (!this.buys.length) throw new UserError(`Empty data source`); if (!this.buys.length) throw new UserError(`Empty data source`);
this.qr = await this.getQr(this.buys[0].buyFk); this.qr = await this.getQr(this.buys[0].buyFk);
this.date = moment(this.date).format('WW/E'); this.date = moment(this.date).format('WW/DD');
}, },
methods: { methods: {
getQr(data) { getQr(data) {
@ -24,6 +24,9 @@ module.exports = {
margin: 0, margin: 0,
errorCorrectionLevel: 'L' errorCorrectionLevel: 'L'
}); });
},
formatNumber(number) {
return new Intl.NumberFormat('es-ES', {maximumFractionDigits: 0}).format(number);
} }
}, },
props: { props: {