This commit is contained in:
parent
bca8a324d8
commit
52026376a6
|
@ -21,7 +21,7 @@
|
||||||
<td id="outline" class="ellipsize">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td>
|
<td id="outline" class="ellipsize">{{labelData.code == 'V' ? (labelData.size || 0) + 'cm' : (labelData.volume || 0) + 'm³'}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><div id="agencyDescripton" class="ellipsize">{{labelData.agencyDescription ? labelData.agencyDescription.toUpperCase() : '---'}}</div></td>
|
<td><div id="agencyDescripton" class="ellipsize">{{getAgencyDescripton(labelData)}}</div></td>
|
||||||
<td id="bold">{{labelData.lineCount || 0}}</td>
|
<td id="bold">{{labelData.lineCount || 0}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -61,6 +61,18 @@ module.exports = {
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
getAgencyDescripton(labelData) {
|
||||||
|
let value;
|
||||||
|
if (labelData.agencyDescription)
|
||||||
|
value = labelData.agencyDescription.toUpperCase().substring(0, 11);
|
||||||
|
else
|
||||||
|
value = '---';
|
||||||
|
|
||||||
|
if (labelData.routeFk)
|
||||||
|
value = `${value} [${labelData.routeFk.toString().substring(0, 3)}]`;
|
||||||
|
|
||||||
|
return value;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'report-body': reportBody.build()
|
'report-body': reportBody.build()
|
||||||
|
|
|
@ -1,37 +1,38 @@
|
||||||
SELECT c.itemPackingTypeFk code,
|
SELECT c.itemPackingTypeFk code,
|
||||||
tc.collectionFk,
|
tc.collectionFk,
|
||||||
SUBSTRING('ABCDEFGH', tc.wagon, 1) wagon,
|
SUBSTRING('ABCDEFGH', tc.wagon, 1) wagon,
|
||||||
tc.`level`,
|
tc.`level`,
|
||||||
t.id ticketFk,
|
t.id ticketFk,
|
||||||
COALESCE(et.description, zo.name, am.name) agencyDescription,
|
COALESCE(et.description, zo.name, am.name) agencyDescription,
|
||||||
cc.code color,
|
cc.code color,
|
||||||
t.clientFk,
|
t.clientFk,
|
||||||
CAST(SUM(sv.volume) AS DECIMAL(5, 2)) volume,
|
CAST(SUM(sv.volume) AS DECIMAL(5, 2)) volume,
|
||||||
MAX(i.`size`) `size`,
|
MAX(i.`size`) `size`,
|
||||||
w.code workerCode,
|
w.code workerCode,
|
||||||
TIME_FORMAT(t.shipped, '%H:%i') shippedHour,
|
TIME_FORMAT(t.shipped, '%H:%i') shippedHour,
|
||||||
TIME_FORMAT(zo.`hour`, '%H:%i') zoneHour,
|
TIME_FORMAT(zo.`hour`, '%H:%i') zoneHour,
|
||||||
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
|
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
|
||||||
tt.labelCount,
|
tt.labelCount,
|
||||||
t.nickName,
|
t.nickName,
|
||||||
COUNT(*) lineCount
|
COUNT(*) lineCount,
|
||||||
FROM vn.ticket t
|
rm.routeFk
|
||||||
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
|
FROM vn.ticket t
|
||||||
JOIN vn.collection c ON c.id = tc.collectionFk
|
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
|
||||||
LEFT JOIN vn.collectionColors cc ON cc.shelve = tc.`level`
|
JOIN vn.collection c ON c.id = tc.collectionFk
|
||||||
AND cc.wagon = tc.wagon
|
LEFT JOIN vn.collectionColors cc ON cc.shelve = tc.`level`
|
||||||
AND cc.trainFk = c.trainFk
|
AND cc.wagon = tc.wagon
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
AND cc.trainFk = c.trainFk
|
||||||
LEFT JOIN vn.saleVolume sv ON sv.saleFk = s.id
|
JOIN vn.sale s ON s.ticketFk = t.id
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
LEFT JOIN vn.saleVolume sv ON sv.saleFk = s.id
|
||||||
JOIN vn.itemType it ON it.id = i.typeFk
|
JOIN vn.item i ON i.id = s.itemFk
|
||||||
JOIN vn.itemCategory ic ON ic.id = it.categoryFk
|
JOIN vn.itemType it ON it.id = i.typeFk
|
||||||
JOIN vn.worker w ON w.id = c.workerFk
|
JOIN vn.itemCategory ic ON ic.id = it.categoryFk
|
||||||
JOIN vn.agencyMode am ON am.id = t.agencyModeFk
|
JOIN vn.worker w ON w.id = c.workerFk
|
||||||
LEFT JOIN vn.ticketTrolley tt ON tt.ticket = t.id
|
JOIN vn.agencyMode am ON am.id = t.agencyModeFk
|
||||||
LEFT JOIN vn.`zone` zo ON t.zoneFk = zo.id
|
LEFT JOIN vn.ticketTrolley tt ON tt.ticket = t.id
|
||||||
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk
|
LEFT JOIN vn.`zone` zo ON t.zoneFk = zo.id
|
||||||
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk
|
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk
|
||||||
WHERE t.id IN (?)
|
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk
|
||||||
GROUP BY t.id
|
WHERE t.id IN (?)
|
||||||
ORDER BY cc.`code`;
|
GROUP BY t.id
|
||||||
|
ORDER BY cc.`code`;
|
||||||
|
|
Loading…
Reference in New Issue