This commit is contained in:
parent
789dffe2e2
commit
a803250cb9
|
@ -1,11 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import SupplierListFilter from './SupplierListFilter.vue';
|
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
|
import SupplierListFilter from './SupplierListFilter.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const tableRef = ref();
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
|
@ -25,28 +26,24 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('supplier.list.tableVisibleColumns.nif'),
|
label: t('supplier.list.tableVisibleColumns.nif'),
|
||||||
name: 'nif',
|
name: 'nif',
|
||||||
create: true,
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('supplier.list.tableVisibleColumns.nickname'),
|
label: t('supplier.list.tableVisibleColumns.nickname'),
|
||||||
name: 'nickname',
|
name: 'nickname',
|
||||||
create: true,
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('supplier.list.tableVisibleColumns.account'),
|
label: t('supplier.list.tableVisibleColumns.account'),
|
||||||
name: 'account',
|
name: 'account',
|
||||||
create: true,
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('supplier.list.tableVisibleColumns.payMethod'),
|
label: t('supplier.list.tableVisibleColumns.payMethod'),
|
||||||
name: 'payMethodFk',
|
name: 'payMethodFk',
|
||||||
create: true,
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'payMethods',
|
url: 'payMethods',
|
||||||
|
@ -57,34 +54,34 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('supplier.list.tableVisibleColumns.payDay'),
|
label: t('supplier.list.tableVisibleColumns.payDay'),
|
||||||
name: 'payDat',
|
name: 'payDat',
|
||||||
create: true,
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<RightMenu>
|
<!-- <RightMenu>
|
||||||
<template #right-panel>
|
<template #right-panel>
|
||||||
<SupplierListFilter data-key="SuppliersList" />
|
<SupplierListFilter data-key="SuppliersList" />
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightMenu> -->
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="SuppliersRef"
|
ref="tableRef"
|
||||||
data-key="SuppliersList"
|
data-key="SuppliersList"
|
||||||
:url="`Suppliers`"
|
:url="`Suppliers`"
|
||||||
save-url="Suppliers/crud"
|
save-url="Suppliers/crud"
|
||||||
|
redirect="supplier"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'suppliers',
|
urlCreate: 'Suppliers/newSupplier',
|
||||||
title: t('Create Supplier'),
|
title: t('Create Supplier'),
|
||||||
onDataSaved: () => tableRef.reload(),
|
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||||
|
formInitialData: {},
|
||||||
}"
|
}"
|
||||||
order="id ASC"
|
order="id ASC"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
auto-load
|
auto-load
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:is-editable="true"
|
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue