0
0
Fork 0

feat: refs #6900 add InvoiceInSerial

This commit is contained in:
Jorge Penadés 2024-08-12 13:46:56 +02:00
parent 65a80e006b
commit c4de1beabf
5 changed files with 125 additions and 1 deletions

View File

@ -251,6 +251,7 @@ globals:
privileges: Privileges privileges: Privileges
ldap: LDAP ldap: LDAP
samba: Samba samba: Samba
serial: Serial
created: Created created: Created
worker: Worker worker: Worker
now: Now now: Now

View File

@ -253,6 +253,7 @@ globals:
packages: Bultos packages: Bultos
ldap: LDAP ldap: LDAP
samba: Samba samba: Samba
serial: Facturas por serie
created: Fecha creación created: Fecha creación
worker: Trabajador worker: Trabajador
now: Ahora now: Ahora

View File

@ -0,0 +1,63 @@
<script setup>
import { ref, computed, onBeforeMount } from 'vue';
import { useI18n } from 'vue-i18n';
import axios from 'axios';
import VnTable from 'src/components/VnTable/VnTable.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
import InvoiceInSerialFilter from './InvoiceInSerialFilter.vue';
import { useArrayData } from 'src/composables/useArrayData';
const { t } = useI18n();
const cols = computed(() => [
{
align: 'left',
name: 'serial',
label: t('Serial'),
columnFilter: false,
},
{
align: 'left',
name: 'pending',
label: t('Pending'),
columnFilter: false,
},
{
align: 'left',
name: 'total',
label: 'Total',
columnFilter: false,
},
]);
const arrayData = useArrayData('InvoiceInSerial');
const table = ref();
onBeforeMount(async () => {
const { data } = await axios.get('InvoiceInConfigs/findOne', {
params: { filter: { fields: ['daysAgo'] } },
});
arrayData.store.userParams.daysAgo = data.daysAgo;
await table.value.reload();
});
</script>
<template>
<RightMenu>
<template #right-panel>
<InvoiceInSerialFilter data-key="InvoiceInSerial" />
</template>
</RightMenu>
<VnTable
ref="table"
data-key="InvoiceInSerial"
url="InvoiceIns/getSerial"
:columns="cols"
:right-search="false"
:disable-option="{ card: true }"
/>
</template>
<i18n>
es:
Serial: Serie
Pending: Pendiente
</i18n>

View File

@ -0,0 +1,49 @@
<script setup>
import { useI18n } from 'vue-i18n';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
defineProps({ dataKey: { type: String, required: true } });
const { t } = useI18n();
</script>
<template>
<VnFilterPanel :data-key="dataKey" :search-button="true">
<template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong>
<span>{{ formatFn(tag.value) }}</span>
</div>
</template>
<template #body="{ params }">
<QItem>
<QItemSection>
<VnInputNumber
v-model="params.daysAgo"
:label="t('params.daysAgo')"
outlined
rounded
dense
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnInput
v-model="params.serial"
:label="t('params.serial')"
outlined
rounded
dense
/>
</QItemSection>
</QItem>
</template>
</VnFilterPanel>
</template>
<i18n>
es:
params:
daysAgo: 'Últimos días'
serial: 'serie'
</i18n>

View File

@ -11,7 +11,7 @@ export default {
component: RouterView, component: RouterView,
redirect: { name: 'InvoiceInMain' }, redirect: { name: 'InvoiceInMain' },
menus: { menus: {
main: ['InvoiceInList'], main: ['InvoiceInList', 'InvoiceInSerial'],
card: [ card: [
'InvoiceInBasicData', 'InvoiceInBasicData',
'InvoiceInVat', 'InvoiceInVat',
@ -37,6 +37,16 @@ export default {
}, },
component: () => import('src/pages/InvoiceIn/InvoiceInList.vue'), component: () => import('src/pages/InvoiceIn/InvoiceInList.vue'),
}, },
{
path: 'serial',
name: 'InvoiceInSerial',
meta: {
title: 'serial',
icon: 'view_list',
},
component: () =>
import('src/pages/InvoiceIn/Serial/InvoiceInSerial.vue'),
},
{ {
path: 'create', path: 'create',
name: 'InvoiceInCreare', name: 'InvoiceInCreare',