feat: refs #8277 update EntryControl component with new column definitions and filters
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
0c8e13db8f
commit
1facb04d7a
|
@ -2,6 +2,7 @@
|
|||
import { ref, computed, markRaw } from 'vue';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { toDate, toCurrency } from 'src/filters';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue';
|
||||
|
||||
|
@ -10,7 +11,7 @@ const companies = ref([]);
|
|||
const countries = ref([]);
|
||||
const columns = computed(() => [
|
||||
{
|
||||
name: 'companyFk',
|
||||
name: 'company',
|
||||
label: t('globals.company'),
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
|
@ -26,7 +27,13 @@ const columns = computed(() => [
|
|||
{
|
||||
name: 'dmsType',
|
||||
label: t('entry.control.dmsType'),
|
||||
format: (row) => row.dmsType,
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
label: null,
|
||||
name: 'dmsType',
|
||||
url: 'DmsTypes',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'invoiceNumber',
|
||||
|
@ -39,10 +46,20 @@ const columns = computed(() => [
|
|||
{
|
||||
name: 'shipped',
|
||||
label: t('entry.control.shipped'),
|
||||
format: ({ shipped }, dashIfEmpty) => dashIfEmpty(toDate(shipped)),
|
||||
columnFilter: {
|
||||
component: 'date',
|
||||
name: 'shipped',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'dated',
|
||||
label: t('entry.control.dated'),
|
||||
name: 'landed',
|
||||
label: t('entry.control.landed'),
|
||||
format: ({ landed }, dashIfEmpty) => dashIfEmpty(toDate(landed)),
|
||||
columnFilter: {
|
||||
component: 'date',
|
||||
name: 'landed',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'id',
|
||||
|
@ -57,9 +74,9 @@ const columns = computed(() => [
|
|||
label: t('entry.control.invoiceInFk'),
|
||||
},
|
||||
{
|
||||
name: 'supplierFk',
|
||||
name: 'supplier',
|
||||
label: t('globals.supplier'),
|
||||
format: (row) => row.supplierFk,
|
||||
format: (row) => row.supplier,
|
||||
columnFilter: {
|
||||
component: markRaw(VnSelectSupplier),
|
||||
label: null,
|
||||
|
@ -70,7 +87,6 @@ const columns = computed(() => [
|
|||
{
|
||||
name: 'country',
|
||||
label: t('globals.country'),
|
||||
format: (row) => row.country,
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'country',
|
||||
|
@ -87,16 +103,18 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
name: 'amount',
|
||||
label: t('amount'),
|
||||
label: t('globals.amount'),
|
||||
format: ({ amount }) => toCurrency(amount),
|
||||
},
|
||||
{
|
||||
name: 'isBooked',
|
||||
label: t('entry.control.isBooked'),
|
||||
component: 'checkbox',
|
||||
},
|
||||
{
|
||||
name: 'received',
|
||||
label: t('entry.control.received'),
|
||||
component: 'checkbox'
|
||||
component: 'checkbox',
|
||||
},
|
||||
// {
|
||||
// name: 'travelFk',
|
||||
|
@ -144,9 +162,9 @@ const columns = computed(() => [
|
|||
:columns
|
||||
auto-load
|
||||
:right-search="false"
|
||||
:disable-option="{ card: true }"
|
||||
redirect="Entry"
|
||||
:order="['landed DESC']"
|
||||
>
|
||||
<template #column-companyFk="{ row }">
|
||||
{{ row.companyFk }}
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
|
|
|
@ -136,15 +136,14 @@ entry:
|
|||
dmsType: Gestdoc type
|
||||
invoiceNumber: Entry ref.
|
||||
reference: Gestdoc ref.
|
||||
shipped: Shipped
|
||||
dated: Landed
|
||||
shipped: Shipped
|
||||
landed: Landed
|
||||
id: Entry
|
||||
invoiceInFk: Invoice in
|
||||
supplierFk: Supplier
|
||||
country: Country
|
||||
description: Entry type
|
||||
payDem: Payment term
|
||||
amount: Amount
|
||||
isBooked: B
|
||||
received: R
|
||||
entryFilter:
|
||||
|
|
|
@ -92,16 +92,15 @@ entry:
|
|||
gestDocFk: Gestdoc
|
||||
dmsType: Tipo gestdoc
|
||||
invoiceNumber: Ref. Entrada
|
||||
reference: Ref. gestdoc
|
||||
reference: Ref. GestDoc
|
||||
shipped: F. envío
|
||||
dated: F. llegada
|
||||
landed: F. llegada
|
||||
id: Entrada
|
||||
invoiceInFk: Recibida
|
||||
supplierFk: Proveedor
|
||||
country: País
|
||||
description: Tipo de Entrada
|
||||
payDem: Plazo de pago
|
||||
amount: Importe
|
||||
isBooked: C
|
||||
received: R
|
||||
params:
|
||||
|
|
Loading…
Reference in New Issue