perf: TicketLackLit
This commit is contained in:
parent
4226c52fc5
commit
f816cb9240
|
@ -12,6 +12,7 @@ import TotalNegativeOriginDialog from 'pages/Ticket/Negative/TotalNegativeOrigin
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
import { onBeforeMount } from 'vue';
|
import { onBeforeMount } from 'vue';
|
||||||
|
import { dashIfEmpty, toDate, toHour } from 'src/filters';
|
||||||
const DEFAULT_WAREHOUSE = 'Algemesi';
|
const DEFAULT_WAREHOUSE = 'Algemesi';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -32,9 +33,18 @@ const originDialogRef = ref();
|
||||||
const totalNegativeDialogRef = ref();
|
const totalNegativeDialogRef = ref();
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
name: 'minTimed',
|
name: 'Date',
|
||||||
label: t('negative.minTimed'),
|
label: t('negative.minTimed'),
|
||||||
field: ({ minTimed }) => minTimed,
|
field: 'timed',
|
||||||
|
format: (val) => toDate(val),
|
||||||
|
|
||||||
|
sortable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'timed',
|
||||||
|
label: t('negative.timed'),
|
||||||
|
field: 'timed',
|
||||||
|
format: (val) => toHour(val),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -54,7 +64,8 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
name: 'producer',
|
name: 'producer',
|
||||||
label: t('negative.supplier'),
|
label: t('negative.supplier'),
|
||||||
field: ({ producer }) => producer,
|
field: ({ producer }) => dashIfEmpty(producer),
|
||||||
|
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -72,8 +83,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
name: 'category',
|
name: 'category',
|
||||||
label: t('negative.origen'),
|
label: t('negative.origen'),
|
||||||
field: ({ category }) => category,
|
field: ({ category }) => dashIfEmpty(category),
|
||||||
align: 'left',
|
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -197,8 +207,16 @@ const handleWarehouses = async (data) => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #body-cell-producer="{ value }">
|
<template #body-cell-producer="{ value }">
|
||||||
<QTd align="right" class="text-primary">
|
<QTd align="right">
|
||||||
<QBtn flat color="blue" dense>{{ value }}</QBtn>
|
<QBtn
|
||||||
|
v-if="value !== '-'"
|
||||||
|
flat
|
||||||
|
class="text-primary"
|
||||||
|
color="blue"
|
||||||
|
dense
|
||||||
|
>{{ value }}</QBtn
|
||||||
|
>
|
||||||
|
<span v-else>{{ value }}</span>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue