Ticket basic data #474
|
@ -116,12 +116,12 @@ const totalDifference = computed(() => {
|
||||||
return rows.value.reduce((acc, item) => acc + item.component?.difference || 0, 0);
|
return rows.value.reduce((acc, item) => acc + item.component?.difference || 0, 0);
|
||||||
});
|
});
|
||||||
const showMovablecolumn = computed(() => (haveDifferences.value > 0 ? ['movable'] : []));
|
const showMovablecolumn = computed(() => (haveDifferences.value > 0 ? ['movable'] : []));
|
||||||
const haveDifferences = computed(() => _ticketData.value.sale.haveDifferences);
|
const haveDifferences = computed(() => _ticketData.value.sale?.haveDifferences);
|
||||||
const ticketHaveNegatives = () => {
|
const ticketHaveNegatives = () => {
|
||||||
let _haveNegatives = false;
|
let _haveNegatives = false;
|
||||||
let haveNotNegatives = false;
|
let haveNotNegatives = false;
|
||||||
_ticketData.value.withoutNegatives = false;
|
_ticketData.value.withoutNegatives = false;
|
||||||
_ticketData.value.sale.items.forEach((item) => {
|
_ticketData.value?.sale?.items.forEach((item) => {
|
||||||
if (item.quantity > item.movable) _haveNegatives = true;
|
if (item.quantity > item.movable) _haveNegatives = true;
|
||||||
else haveNotNegatives = true;
|
else haveNotNegatives = true;
|
||||||
});
|
});
|
||||||
|
|
|
@ -156,7 +156,6 @@ onBeforeMount(async () => await getTicketData());
|
||||||
v-model="step"
|
v-model="step"
|
||||||
ref="stepperRef"
|
ref="stepperRef"
|
||||||
color="primary"
|
color="primary"
|
||||||
header-nav
|
|
||||||
animated
|
animated
|
||||||
keep-alive
|
keep-alive
|
||||||
style="max-width: 800px; margin: auto"
|
style="max-width: 800px; margin: auto"
|
||||||
|
@ -176,19 +175,19 @@ onBeforeMount(async () => await getTicketData());
|
||||||
/>
|
/>
|
||||||
</QStep>
|
</QStep>
|
||||||
<template #navigation>
|
<template #navigation>
|
||||||
<QStepperNavigation>
|
<QStepperNavigation class="flex justify-between">
|
||||||
<QBtn
|
<QBtn
|
||||||
@click="onNextStep()"
|
|
||||||
color="primary"
|
|
||||||
:label="step === 2 ? t('basicData.finalize') : t('basicData.next')"
|
|
||||||
/>
|
|
||||||
<QBtn
|
|
||||||
v-if="step > 1"
|
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="stepperRef.previous()"
|
@click="stepperRef.previous()"
|
||||||
:label="t('basicData.back')"
|
:label="t('basicData.back')"
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
|
:class="{ invisible: step === 1 }"
|
||||||
|
/>
|
||||||
|
<QBtn
|
||||||
|
@click="onNextStep()"
|
||||||
|
color="primary"
|
||||||
|
:label="step === 2 ? t('basicData.finalize') : t('basicData.next')"
|
||||||
/>
|
/>
|
||||||
</QStepperNavigation>
|
</QStepperNavigation>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue