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