This commit is contained in:
parent
cd36055ad1
commit
017d7a866d
|
@ -1,7 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, watch, onMounted } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import axios from 'axios';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.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 { toDate } from 'src/filters';
|
||||||
import { usePrintService } from 'composables/usePrintService';
|
import { usePrintService } from 'composables/usePrintService';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -20,12 +24,14 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const quasar = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { openReport } = usePrintService();
|
const { openReport } = usePrintService();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const entryDescriptorRef = ref(null);
|
const entryDescriptorRef = ref(null);
|
||||||
const url = ref();
|
const url = ref();
|
||||||
|
const { notify } = useNotify();
|
||||||
|
|
||||||
const entryFilter = {
|
const entryFilter = {
|
||||||
include: [
|
include: [
|
||||||
|
@ -102,7 +108,20 @@ const showEntryReport = () => {
|
||||||
openReport(`Entries/${route.params.id}/entry-order-pdf`);
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -117,10 +136,13 @@ watch;
|
||||||
data-key="entry"
|
data-key="entry"
|
||||||
:summary="$attrs"
|
:summary="$attrs"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu>
|
||||||
<QItem v-ripple clickable @click="showEntryReport(entity)">
|
<QItem v-ripple clickable @click="showEntryReport">
|
||||||
<QItemSection>{{ t('Show entry report') }}</QItemSection>
|
<QItemSection>{{ t('Show entry report') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
<QItem v-ripple clickable @click="openDialog">
|
||||||
|
<QItemSection>{{ t('Transfer Entry') }}</QItemSection>
|
||||||
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv
|
<VnLv
|
||||||
|
@ -205,4 +227,5 @@ es:
|
||||||
Go to module index: Ir al índice del modulo
|
Go to module index: Ir al índice del modulo
|
||||||
Inventory entry: Es inventario
|
Inventory entry: Es inventario
|
||||||
Virtual entry: Es una redada
|
Virtual entry: Es una redada
|
||||||
|
Transfer Entry: Transferir Entrada
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
Loading…
Reference in New Issue