Fix product performance grouped JSON build
This commit is contained in:
@@ -152,6 +152,23 @@
|
||||
</q-th>
|
||||
</template>
|
||||
|
||||
<template #top-row>
|
||||
<q-tr class="npc-total-row">
|
||||
<q-td
|
||||
v-for="col in columns"
|
||||
:key="`total-${col.name}`"
|
||||
:class="col.align === 'right' ? 'text-right' : 'text-left'"
|
||||
>
|
||||
<span v-if="col.name === 'UretimSekli'" class="text-weight-bold">
|
||||
DINAMIK TOPLAM ({{ dynamicTotals.rowCount }} SATIR)
|
||||
</span>
|
||||
<span v-else-if="isNumericColumn(col.name)" class="text-weight-bold">
|
||||
{{ formatQuantity(dynamicTotals[col.name]) }}
|
||||
</span>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
||||
<template #body-cell="props">
|
||||
<q-td v-if="props.col.name === 'open'" :props="props" class="text-center">
|
||||
<q-btn
|
||||
@@ -406,6 +423,23 @@ const missingCostRowCount = computed(() => {
|
||||
return Array.isArray(rows.value) ? rows.value.length : 0
|
||||
})
|
||||
|
||||
const dynamicTotals = computed(() => {
|
||||
const visibleRows = Array.isArray(rows.value) ? rows.value : []
|
||||
return visibleRows.reduce((totals, row) => {
|
||||
totals.lMMiktar_G += Number(row?.lMMiktar_G || 0)
|
||||
totals.ceketDepoGiris += Number(row?.ceketDepoGiris || 0)
|
||||
totals.pantolonDepoGiris += Number(row?.pantolonDepoGiris || 0)
|
||||
totals.yelekDepoGiris += Number(row?.yelekDepoGiris || 0)
|
||||
return totals
|
||||
}, {
|
||||
rowCount: visibleRows.length,
|
||||
lMMiktar_G: 0,
|
||||
ceketDepoGiris: 0,
|
||||
pantolonDepoGiris: 0,
|
||||
yelekDepoGiris: 0
|
||||
})
|
||||
})
|
||||
|
||||
function getColumnComparableValue (row, colName) {
|
||||
if (colName === 'dteIslemTarihi') {
|
||||
return formatDateTR(row?.dteIslemTarihi)
|
||||
@@ -650,6 +684,14 @@ onMounted(async () => {
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.npc-table :deep(.npc-total-row td) {
|
||||
background: #e8f5e9;
|
||||
color: #1b5e20;
|
||||
border-bottom: 2px solid #66bb6a;
|
||||
font-size: 11px;
|
||||
white-space: normal !important;
|
||||
}
|
||||
|
||||
.npc-table :deep(.q-table) {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
|
||||
Reference in New Issue
Block a user