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>
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -61,6 +61,18 @@ module.exports = {
|
|||
|
||||
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: {
|
||||
'report-body': reportBody.build()
|
||||
|
|
|
@ -1,37 +1,38 @@
|
|||
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,
|
||||
cc.code color,
|
||||
t.clientFk,
|
||||
CAST(SUM(sv.volume) AS DECIMAL(5, 2)) volume,
|
||||
MAX(i.`size`) `size`,
|
||||
w.code workerCode,
|
||||
TIME_FORMAT(t.shipped, '%H:%i') shippedHour,
|
||||
TIME_FORMAT(zo.`hour`, '%H:%i') zoneHour,
|
||||
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
|
||||
tt.labelCount,
|
||||
t.nickName,
|
||||
COUNT(*) lineCount
|
||||
FROM vn.ticket t
|
||||
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
|
||||
JOIN vn.collection c ON c.id = 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.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
|
||||
JOIN vn.worker w ON w.id = c.workerFk
|
||||
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
|
||||
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk
|
||||
WHERE t.id IN (?)
|
||||
GROUP BY t.id
|
||||
ORDER BY cc.`code`;
|
||||
tc.collectionFk,
|
||||
SUBSTRING('ABCDEFGH', tc.wagon, 1) wagon,
|
||||
tc.`level`,
|
||||
t.id ticketFk,
|
||||
COALESCE(et.description, zo.name, am.name) agencyDescription,
|
||||
cc.code color,
|
||||
t.clientFk,
|
||||
CAST(SUM(sv.volume) AS DECIMAL(5, 2)) volume,
|
||||
MAX(i.`size`) `size`,
|
||||
w.code workerCode,
|
||||
TIME_FORMAT(t.shipped, '%H:%i') shippedHour,
|
||||
TIME_FORMAT(zo.`hour`, '%H:%i') zoneHour,
|
||||
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
|
||||
tt.labelCount,
|
||||
t.nickName,
|
||||
COUNT(*) lineCount,
|
||||
rm.routeFk
|
||||
FROM vn.ticket t
|
||||
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
|
||||
JOIN vn.collection c ON c.id = 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.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
|
||||
JOIN vn.worker w ON w.id = c.workerFk
|
||||
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
|
||||
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk
|
||||
WHERE t.id IN (?)
|
||||
GROUP BY t.id
|
||||
ORDER BY cc.`code`;
|
||||
|
|
Loading…
Reference in New Issue