refs #4550 collection-label changes
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Guillermo Bonet 2022-11-30 08:18:37 +01:00
parent b7fa4dca4c
commit d0acd3e4c0
4 changed files with 28 additions and 20 deletions

View File

@ -9,7 +9,8 @@ html {
}
#vertical {
writing-mode: vertical-rl;
height: 240px;
height: 235px;
font-size: 30px;
margin-left: -13px;
}
.outline {
@ -34,6 +35,6 @@ html {
#shipped {
font-weight: bold;
}
#ticketFk, #vertical {
font-size: 34px;
#ticketFk {
font-size: 32px;
}

View File

@ -5,30 +5,30 @@
<tbody>
<tr>
<td rowspan="6"><span id="vertical" class="ellipsize">
{{labelData.collectionFk ? `${labelData.collectionFk} ~ ${labelData.wagon}-${labelData.level}` : '-'.repeat(19)}}
{{labelData.collectionFk ? `${labelData.collectionFk} ~ ${getVertical(labelData.code, labelData.wagon, labelData.level, labelData.color)}` : '-'.repeat(19)}}
</span></td>
<td id="ticketFk">
{{labelData.clientFk ? `${labelData.ticketFk} « ${labelData.clientFk}` : labelData.ticketFk}}
</td>
<td colspan="2" id="shipped">{{labelData.shipped ? labelData.shipped : '---'}}</td>
<td colspan="2" id="shipped">{{labelData.shipped || '---'}}</td>
</tr>
<tr>
<td rowspan="3"><div v-html="getBarcode(labelData.ticketFk)" id="barcode"></div></td>
<td class="outline">{{labelData.workerCode ? labelData.workerCode : '---'}}</td>
<td class="outline">{{labelData.workerCode || '---'}}</td>
</tr>
<tr>
<td class="outline">{{labelData.labelCount ? labelData.labelCount : 0}}</td>
<td class="outline">{{labelData.labelCount || 0}}</td>
</tr>
<tr>
<td class="outline">{{labelData.code == 'plant' ? labelData.size + 'cm' : labelData.volume + 'm³'}}</td>
<td class="outline">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td>
</tr>
<tr>
<td><div id="agencyDescripton" class="ellipsize">{{labelData.agencyDescription.toUpperCase()}}</div></td>
<td id="bold">{{labelData.lineCount ? labelData.lineCount : 0}}</td>
<td><div id="agencyDescripton" class="ellipsize">{{labelData.agencyDescription ? labelData.agencyDescription.toUpperCase() : '---'}}</div></td>
<td id="bold">{{labelData.lineCount || 0}}</td>
</tr>
<tr>
<td id="nickname" class="ellipsize">{{labelData.nickName ? labelData.nickName.toUpperCase() : '---'}}</td>
<td id="bold">{{labelData.shipped ? labelData.shippedHour : labelData.zoneHour}}</td>
<td id="bold">{{labelData.shippedHour || labelData.zoneHour}}</td>
</tr>
</tbody>
</table>

View File

@ -25,7 +25,6 @@ module.exports = {
ticketIds = [this.id];
this.labelsData = await this.rawSqlFromDef('labelsData', [ticketIds]);
if (!this.labelsData.length)
throw new UserError('Empty data source');
},
@ -44,6 +43,14 @@ module.exports = {
});
return xmlSerializer.serializeToString(svgNode);
},
getVertical(code, wagon, level, color) {
let value;
if (code == 'V')
value = `${wagon}-${level}`;
else
value = `${color.substring(0, 4)}`;
return value;
},
},
components: {
'report-body': reportBody.build()

View File

@ -1,13 +1,13 @@
SELECT tc.collectionFk,
SELECT c.itemPackingTypeFk code,
tc.collectionFk,
SUBSTRING('ABCDEFGH', tc.wagon, 1) wagon,
tc.`level`,
t.id ticketFk,
COALESCE(et.description, zo.name, am.name) agencyDescription,
am.name,
cc.code color,
t.clientFk,
CAST(SUM(sv.volume) AS DECIMAL(5, 2)) volume,
MAX(i.`size`) `size`,
ic.code,
w.code workerCode,
TIME_FORMAT(t.shipped, '%H:%i') shippedHour,
TIME_FORMAT(zo.`hour`, '%H:%i') zoneHour,
@ -21,13 +21,13 @@ SELECT tc.collectionFk,
LEFT JOIN vn.collectionColors cc ON cc.shelve = tc.`level`
AND cc.wagon = tc.wagon
AND cc.trainFk = c.trainFk
JOIN vn.sale s ON s.ticketFk = t.id
LEFT JOIN vn.sale s ON s.ticketFk = t.id
LEFT JOIN vn.saleVolume sv ON sv.saleFk = s.id
JOIN vn.item i ON i.id = s.itemFk
JOIN vn.itemType it ON it.id = i.typeFk
JOIN vn.itemCategory ic ON ic.id = it.categoryFk
LEFT JOIN vn.item i ON i.id = s.itemFk
LEFT JOIN vn.itemType it ON it.id = i.typeFk
LEFT JOIN vn.itemCategory ic ON ic.id = it.categoryFk
LEFT JOIN vn.worker w ON w.id = c.workerFk
JOIN vn.agencyMode am ON am.id = t.agencyModeFk
LEFT JOIN vn.agencyMode am ON am.id = t.agencyModeFk
LEFT JOIN vn.ticketTrolley tt ON tt.ticket = t.id
LEFT JOIN vn.`zone` zo ON t.zoneFk = zo.id
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk