#7553 modified TicketExpedition & changes in ticket section #571
|
@ -28,7 +28,7 @@ const $props = defineProps({
|
|||
|
||||
const { t } = useI18n();
|
||||
const QPopupProxyRef = ref(null);
|
||||
|
||||
const transferFormRef = ref(null);
|
||||
const _transfer = ref();
|
||||
|
||||
const transferLinesColumns = computed(() => [
|
||||
|
@ -80,6 +80,14 @@ const destinationTicketColumns = computed(() => [
|
|||
},
|
||||
]);
|
||||
|
||||
const handleRowClick = (row) => {
|
||||
console.log('row: ', row);
|
||||
const ticketId = row.id;
|
||||
if (transferFormRef.value) {
|
||||
transferFormRef.value.transferSales(ticketId);
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => (_transfer.value = $props.transfer));
|
||||
</script>
|
||||
|
||||
|
@ -113,6 +121,7 @@ onMounted(() => (_transfer.value = $props.transfer));
|
|||
:title="t('Destination ticket')"
|
||||
row-key="id"
|
||||
class="full-width q-mt-md"
|
||||
@row-click="(_, row) => handleRowClick(row)"
|
||||
>
|
||||
<template #body-cell-address="{ row }">
|
||||
<QTd @click.stop>
|
||||
|
@ -134,10 +143,10 @@ onMounted(() => (_transfer.value = $props.transfer));
|
|||
</template>
|
||||
|
||||
<template #no-data>
|
||||
<TicketTransferForm v-bind="$props" />
|
||||
<TicketTransferForm ref="transferFormRef" v-bind="$props" />
|
||||
</template>
|
||||
<template #bottom>
|
||||
<TicketTransferForm v-bind="$props" />
|
||||
<TicketTransferForm ref="transferFormRef" v-bind="$props" />
|
||||
</template>
|
||||
</QTable>
|
||||
</QCard>
|
||||
|
|
|
@ -47,6 +47,8 @@ const transferSales = async (ticketId) => {
|
|||
if (data && data.id === $props.ticket.id) emit('refreshData');
|
||||
else router.push({ name: 'TicketSale', params: { id: data.id } });
|
||||
};
|
||||
|
||||
defineExpose({ transferSales });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
Loading…
Reference in New Issue