feat: refs #6822 #517
|
@ -1,7 +1,9 @@
|
|||
<script setup>
|
||||
import { ref, computed, watch, onMounted } from 'vue';
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import axios from 'axios';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
|
@ -11,6 +13,8 @@ import { useState } from 'src/composables/useState';
|
|||
import { toDate } from 'src/filters';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -20,12 +24,14 @@ const $props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const quasar = useQuasar();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
const { openReport } = usePrintService();
|
||||
const state = useState();
|
||||
const entryDescriptorRef = ref(null);
|
||||
const url = ref();
|
||||
const { notify } = useNotify();
|
||||
|
||||
const entryFilter = {
|
||||
include: [
|
||||
|
@ -102,7 +108,20 @@ const showEntryReport = () => {
|
|||
openReport(`Entries/${route.params.id}/entry-order-pdf`);
|
||||
};
|
||||
|
||||
watch;
|
||||
const transferEntry = async () => {
|
||||
await axios.post(`Entries/${route.params.id}/transfer`);
|
||||
notify('globals.dataSaved', 'positive');
|
||||
}
|
||||
|
||||
const openDialog = () => {
|
||||
quasar.dialog({
|
||||
component: VnConfirm,
|
||||
componentProps: {
|
||||
title: t('Se van a transferir las compra al dia siguiente'),
|
||||
promise: transferEntry,
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -117,10 +136,13 @@ watch;
|
|||
data-key="entry"
|
||||
:summary="$attrs"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<QItem v-ripple clickable @click="showEntryReport(entity)">
|
||||
<template #menu>
|
||||
<QItem v-ripple clickable @click="showEntryReport">
|
||||
<QItemSection>{{ t('Show entry report') }}</QItemSection>
|
||||
</QItem>
|
||||
<QItem v-ripple clickable @click="openDialog">
|
||||
<QItemSection>{{ t('Transfer Entry') }}</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<VnLv
|
||||
|
@ -205,4 +227,5 @@ es:
|
|||
Go to module index: Ir al índice del modulo
|
||||
Inventory entry: Es inventario
|
||||
Virtual entry: Es una redada
|
||||
Transfer Entry: Transferir Entrada
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue