Suppliers corrections
This commit is contained in:
parent
41605db454
commit
899633171d
|
@ -48,6 +48,13 @@ const workersOptions = ref([]);
|
||||||
map-options
|
map-options
|
||||||
:rules="validate('supplier.workerFk')"
|
:rules="validate('supplier.workerFk')"
|
||||||
>
|
>
|
||||||
|
<template #append>
|
||||||
|
<QIcon name="info" class="cursor-pointer">
|
||||||
|
<QTooltip>{{
|
||||||
|
t('Responsible for approving invoices')
|
||||||
|
}}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
|
@ -95,3 +102,8 @@ const workersOptions = ref([]);
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Responsible for approving invoices: Responsable de aprobar las facturas
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -13,6 +13,13 @@ const { t } = useI18n();
|
||||||
|
|
||||||
const paymethodsOptions = ref([]);
|
const paymethodsOptions = ref([]);
|
||||||
const payDemsOptions = ref([]);
|
const payDemsOptions = ref([]);
|
||||||
|
|
||||||
|
const formatPayDems = (data) => {
|
||||||
|
payDemsOptions.value = data.map(({ id, payDem }) => ({
|
||||||
|
id: id,
|
||||||
|
payDem: payDem || '0',
|
||||||
|
}));
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -20,7 +27,7 @@ const payDemsOptions = ref([]);
|
||||||
@on-fetch="(data) => (paymethodsOptions = data)"
|
@on-fetch="(data) => (paymethodsOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData url="PayDems" @on-fetch="(data) => (payDemsOptions = data)" auto-load />
|
<FetchData url="PayDems" @on-fetch="(data) => formatPayDems(data)" auto-load />
|
||||||
<FormModel
|
<FormModel
|
||||||
:url="`Suppliers/${route.params.id}`"
|
:url="`Suppliers/${route.params.id}`"
|
||||||
:url-update="`Suppliers/${route.params.id}`"
|
:url-update="`Suppliers/${route.params.id}`"
|
||||||
|
@ -37,7 +44,6 @@ const payDemsOptions = ref([]);
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
hide-selected
|
hide-selected
|
||||||
map-options
|
|
||||||
:rules="validate('supplier.payMethodFk')"
|
:rules="validate('supplier.payMethodFk')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -49,7 +55,6 @@ const payDemsOptions = ref([]);
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="payDem"
|
option-label="payDem"
|
||||||
hide-selected
|
hide-selected
|
||||||
map-options
|
|
||||||
:rules="validate('supplier.payDemFk')"
|
:rules="validate('supplier.payDemFk')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,7 +8,7 @@ import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||||
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
|
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
|
||||||
import SupplierConsumptionFilter from './SupplierConsumptionFilter.vue';
|
import SupplierConsumptionFilter from './SupplierConsumptionFilter.vue';
|
||||||
|
|
||||||
import { toDate, toDateString } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
import { dashIfEmpty } from 'src/filters';
|
||||||
import { usePrintService } from 'composables/usePrintService';
|
import { usePrintService } from 'composables/usePrintService';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
@ -31,23 +31,26 @@ const arrayData = useArrayData('SupplierConsumption', {
|
||||||
|
|
||||||
const store = arrayData.store;
|
const store = arrayData.store;
|
||||||
|
|
||||||
const userParams = computed(() => {
|
const dateRanges = computed(() => {
|
||||||
const minDate = Date.vnNew();
|
const ranges = {
|
||||||
minDate.setHours(0, 0, 0, 0);
|
from: null,
|
||||||
minDate.setMonth(minDate.getMonth() - 2);
|
to: null,
|
||||||
|
|
||||||
const maxDate = Date.vnNew();
|
|
||||||
maxDate.setHours(23, 59, 59, 59);
|
|
||||||
|
|
||||||
return {
|
|
||||||
from: toDateString(minDate),
|
|
||||||
to: toDateString(maxDate),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (route.query && route.query.params) {
|
||||||
|
const params = JSON.parse(route.query.params);
|
||||||
|
if (params.from && params.to) {
|
||||||
|
ranges.from = params.from;
|
||||||
|
ranges.to = params.to;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ranges;
|
||||||
});
|
});
|
||||||
|
|
||||||
const reportParams = computed(() => ({
|
const reportParams = computed(() => ({
|
||||||
recipientId: Number(route.params.id),
|
recipientId: Number(route.params.id),
|
||||||
...userParams.value,
|
...dateRanges.value,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
async function getSupplierConsumptionData() {
|
async function getSupplierConsumptionData() {
|
||||||
|
@ -113,10 +116,10 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QToolbar class="bg-vn-dark justify-end">
|
<QToolbar v-if="rows && rows.length > 0" class="bg-vn-dark justify-end">
|
||||||
<div id="st-data">
|
<div id="st-data">
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="userParams.from && userParams.to"
|
:disabled="!dateRanges.from && !dateRanges.to"
|
||||||
color="primary"
|
color="primary"
|
||||||
icon-right="picture_as_pdf"
|
icon-right="picture_as_pdf"
|
||||||
no-caps
|
no-caps
|
||||||
|
@ -128,7 +131,7 @@ onMounted(async () => {
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="userParams.from && userParams.to"
|
:disabled="!dateRanges.from && !dateRanges.to"
|
||||||
color="primary"
|
color="primary"
|
||||||
icon-right="email"
|
icon-right="email"
|
||||||
no-caps
|
no-caps
|
||||||
|
|
|
@ -50,18 +50,14 @@ const itemCategoriesOptions = ref([]);
|
||||||
@on-fetch="(data) => (itemCategoriesOptions = data)"
|
@on-fetch="(data) => (itemCategoriesOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<VnFilterPanel
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||||
:data-key="props.dataKey"
|
|
||||||
:search-button="true"
|
|
||||||
:unremovable-params="['supplierFk']"
|
|
||||||
>
|
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ params }">
|
<template #body="{ params, searchFn }">
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
|
@ -85,6 +81,7 @@ const itemCategoriesOptions = ref([]);
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('params.buyerId')"
|
:label="t('params.buyerId')"
|
||||||
v-model="params.buyerId"
|
v-model="params.buyerId"
|
||||||
|
@update:model-value="searchFn()"
|
||||||
:options="buyersOptions"
|
:options="buyersOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
|
@ -100,6 +97,7 @@ const itemCategoriesOptions = ref([]);
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('params.typeId')"
|
:label="t('params.typeId')"
|
||||||
v-model="params.typeId"
|
v-model="params.typeId"
|
||||||
|
@update:model-value="searchFn()"
|
||||||
:options="itemTypesOptions"
|
:options="itemTypesOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -126,6 +124,7 @@ const itemCategoriesOptions = ref([]);
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('params.categoryId')"
|
:label="t('params.categoryId')"
|
||||||
v-model="params.categoryId"
|
v-model="params.categoryId"
|
||||||
|
@update:model-value="searchFn()"
|
||||||
:options="itemCategoriesOptions"
|
:options="itemCategoriesOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -140,8 +139,9 @@ const itemCategoriesOptions = ref([]);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('params.from')"
|
:label="t('params.from')"
|
||||||
is-outlined
|
|
||||||
v-model="params.from"
|
v-model="params.from"
|
||||||
|
@update:model-value="searchFn()"
|
||||||
|
is-outlined
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -149,8 +149,9 @@ const itemCategoriesOptions = ref([]);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('params.to')"
|
:label="t('params.to')"
|
||||||
is-outlined
|
|
||||||
v-model="params.to"
|
v-model="params.to"
|
||||||
|
@update:model-value="searchFn()"
|
||||||
|
is-outlined
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } 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 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';
|
||||||
|
|
||||||
|
import { toDateString } from 'src/filters';
|
||||||
import useCardDescription from 'src/composables/useCardDescription';
|
import useCardDescription from 'src/composables/useCardDescription';
|
||||||
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -16,6 +20,7 @@ const $props = defineProps({
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const url = ref();
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: [
|
fields: [
|
||||||
|
@ -53,6 +58,10 @@ const filter = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
url.value = await getUrl('');
|
||||||
|
});
|
||||||
|
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
return $props.id || route.params.id;
|
return $props.id || route.params.id;
|
||||||
});
|
});
|
||||||
|
@ -61,6 +70,27 @@ const data = ref(useCardDescription());
|
||||||
const setData = (entity) => {
|
const setData = (entity) => {
|
||||||
data.value = useCardDescription(entity.ref, entity.id);
|
data.value = useCardDescription(entity.ref, entity.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getEntryQueryParams = (supplier) => {
|
||||||
|
if (!supplier) return null;
|
||||||
|
|
||||||
|
const date = Date.vnNew();
|
||||||
|
date.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
const from = new Date(date.getTime());
|
||||||
|
from.setDate(from.getDate() - 10);
|
||||||
|
|
||||||
|
const to = new Date(date.getTime());
|
||||||
|
to.setDate(to.getDate() + 10);
|
||||||
|
|
||||||
|
const params = {
|
||||||
|
supplierFk: supplier.id,
|
||||||
|
from: toDateString(from),
|
||||||
|
to: toDateString(to),
|
||||||
|
};
|
||||||
|
|
||||||
|
return params;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -87,8 +117,46 @@ const setData = (entity) => {
|
||||||
<VnLv :label="t('supplier.summary.payDay')" :value="entity.payDay" />
|
<VnLv :label="t('supplier.summary.payDay')" :value="entity.payDay" />
|
||||||
<VnLv :label="t('supplier.summary.account')" :value="entity.account" />
|
<VnLv :label="t('supplier.summary.account')" :value="entity.account" />
|
||||||
</template>
|
</template>
|
||||||
|
<template #actions="{ entity }">
|
||||||
|
<QCardActions>
|
||||||
|
<QBtn
|
||||||
|
:to="{
|
||||||
|
name: 'EntryList',
|
||||||
|
query: { params: JSON.stringify(getEntryQueryParams(entity)) },
|
||||||
|
}"
|
||||||
|
size="md"
|
||||||
|
icon="vn:entry"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('All entries with current supplier') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
<QBtn
|
||||||
|
:to="{
|
||||||
|
name: 'CustomerCard',
|
||||||
|
params: { id: entity.client?.id },
|
||||||
|
}"
|
||||||
|
size="md"
|
||||||
|
icon="vn:Person"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Go to client') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
<QBtn
|
||||||
|
:href="`${url}invoice-in/create`"
|
||||||
|
size="md"
|
||||||
|
icon="vn:invoice-in-create"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Create invoiceIn') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
</QCardActions>
|
||||||
|
</template>
|
||||||
</CardDescriptor>
|
</CardDescriptor>
|
||||||
</template>
|
</template>
|
||||||
<i18n>
|
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
All entries with current supplier: Todas las entradas con proveedor actual
|
||||||
|
Go to client: Ir a cliente
|
||||||
|
Create invoiceIn: Crear factura recibida
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
@ -9,12 +11,17 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
|
||||||
const newSupplierForm = reactive({
|
const newSupplierForm = reactive({
|
||||||
name: null,
|
name: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const redirectToSupplierFiscalData = (_, responseData) => {
|
||||||
|
router.push({ name: 'SupplierFiscalData', params: { id: responseData.id } });
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -34,6 +41,7 @@ const newSupplierForm = reactive({
|
||||||
url-create="Suppliers/newSupplier"
|
url-create="Suppliers/newSupplier"
|
||||||
model="supplier"
|
model="supplier"
|
||||||
:form-initial-data="newSupplierForm"
|
:form-initial-data="newSupplierForm"
|
||||||
|
@on-data-saved="redirectToSupplierFiscalData"
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useQuasar } from 'quasar';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
import CardList from 'src/components/ui/CardList.vue';
|
import CardList from 'src/components/ui/CardList.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import { useQuasar } from 'quasar';
|
|
||||||
import SupplierSummaryDialog from './Card/SupplierSummaryDialog.vue';
|
import SupplierSummaryDialog from './Card/SupplierSummaryDialog.vue';
|
||||||
|
import SupplierListFilter from './SupplierListFilter.vue';
|
||||||
|
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -44,6 +47,11 @@ const viewSummary = (id) => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center q-pa-md">
|
||||||
|
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
|
||||||
|
<QScrollArea class="fit text-grey-8">
|
||||||
|
<SupplierListFilter data-key="SuppliersList" />
|
||||||
|
</QScrollArea>
|
||||||
|
</QDrawer>
|
||||||
<div class="vn-card-list">
|
<div class="vn-card-list">
|
||||||
<VnPaginate data-key="SuppliersList" url="Suppliers/filter" auto-load>
|
<VnPaginate data-key="SuppliersList" url="Suppliers/filter" auto-load>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
|
@ -56,7 +64,7 @@ const viewSummary = (id) => {
|
||||||
>
|
>
|
||||||
<template #list-items>
|
<template #list-items>
|
||||||
<VnLv label="NIF/CIF" :value="row.nif" />
|
<VnLv label="NIF/CIF" :value="row.nif" />
|
||||||
<VnLv label="Alias" :value="row.nickname" />
|
<VnLv label="Alias" :value="row.alias" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('supplier.list.payMethod')"
|
:label="t('supplier.list.payMethod')"
|
||||||
:value="row.payMethod"
|
:value="row.payMethod"
|
||||||
|
|
|
@ -0,0 +1,122 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
dataKey: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const provincesOptions = ref([]);
|
||||||
|
const countriesOptions = ref([]);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<FetchData
|
||||||
|
url="Provinces"
|
||||||
|
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
|
||||||
|
@on-fetch="(data) => (provincesOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="countries"
|
||||||
|
:filter="{ fields: ['id', 'country'], order: 'country ASC', limit: 30 }"
|
||||||
|
@on-fetch="(data) => (countriesOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<VnFilterPanel
|
||||||
|
:data-key="props.dataKey"
|
||||||
|
:search-button="true"
|
||||||
|
:unremovable-params="['supplierFk']"
|
||||||
|
>
|
||||||
|
<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, searchFn }">
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnInput
|
||||||
|
v-model="params.search"
|
||||||
|
:label="t('params.search')"
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnInput
|
||||||
|
v-model="params.nickname"
|
||||||
|
:label="t('params.nickname')"
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnInput v-model="params.nif" :label="t('params.nif')" is-outlined />
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('params.provinceFk')"
|
||||||
|
v-model="params.provinceFk"
|
||||||
|
@update:model-value="searchFn()"
|
||||||
|
:options="provincesOptions"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
hide-selected
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
rounded
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('params.countryFk')"
|
||||||
|
v-model="params.countryFk"
|
||||||
|
@update:model-value="searchFn()"
|
||||||
|
:options="countriesOptions"
|
||||||
|
option-value="id"
|
||||||
|
option-label="country"
|
||||||
|
hide-selected
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
rounded
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnFilterPanel>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
en:
|
||||||
|
params:
|
||||||
|
search: General search
|
||||||
|
nickname: Alias
|
||||||
|
nif: Tax number
|
||||||
|
provinceFk: Province
|
||||||
|
countryFk: Country
|
||||||
|
es:
|
||||||
|
params:
|
||||||
|
search: Búsqueda general
|
||||||
|
nickname: Alias
|
||||||
|
nif: NIF/CIF
|
||||||
|
provinceFk: Provincia
|
||||||
|
countryFk: País
|
||||||
|
</i18n>
|
Loading…
Reference in New Issue