forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7197-fixInvoiceIn
This commit is contained in:
commit
076fbad20e
|
@ -1063,6 +1063,14 @@ supplier:
|
|||
payDay: Pay day
|
||||
account: Account
|
||||
newSupplier: New supplier
|
||||
tableVisibleColumns:
|
||||
id: Id
|
||||
name: Name
|
||||
nif: NIF/CIF
|
||||
nickname: Alias
|
||||
account: Account
|
||||
payMethod: Pay Method
|
||||
payDay: Pay Day
|
||||
summary:
|
||||
responsible: Responsible
|
||||
notes: Notes
|
||||
|
|
|
@ -1036,6 +1036,14 @@ supplier:
|
|||
payDay: Día de pago
|
||||
account: Cuenta
|
||||
newSupplier: Nuevo proveedor
|
||||
tableVisibleColumns:
|
||||
id: Id
|
||||
name: Nombre
|
||||
nif: NIF/CIF
|
||||
nickname: Alias
|
||||
account: Cuenta
|
||||
payMethod: Método de pago
|
||||
payDay: Dia de pago
|
||||
summary:
|
||||
responsible: Responsable
|
||||
notes: Notas
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import VnCard from 'components/common/VnCard.vue';
|
||||
import OrderDescriptor from 'pages/Order/Card/OrderDescriptor.vue';
|
||||
import OrderFilter from './OrderFilter.vue';
|
||||
import OrderSearchbar from './OrderSearchbar.vue';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
|
@ -10,7 +11,9 @@ import OrderFilter from './OrderFilter.vue';
|
|||
:descriptor="OrderDescriptor"
|
||||
:filter-panel="OrderFilter"
|
||||
search-data-key="OrderList"
|
||||
searchbar-label="Search order"
|
||||
searchbar-info="ypu can search by order id or name"
|
||||
/>
|
||||
>
|
||||
<template #searchbar>
|
||||
<OrderSearchbar />
|
||||
</template>
|
||||
</VnCard>
|
||||
</template>
|
||||
|
|
|
@ -9,8 +9,6 @@ import { dashIfEmpty } from 'src/filters';
|
|||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||
|
||||
onUpdated(() => summaryRef.value.fetch());
|
||||
|
||||
const route = useRoute();
|
||||
const roleState = useRole();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,26 +1,81 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
import CardList from 'src/components/ui/CardList.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import SupplierSummary from './Card/SupplierSummary.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import RightMenu from 'components/common/RightMenu.vue';
|
||||
import SupplierListFilter from './SupplierListFilter.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const tableRef = ref();
|
||||
|
||||
function navigate(id) {
|
||||
router.push({ path: `/supplier/${id}` });
|
||||
}
|
||||
|
||||
const redirectToCreateView = () => {
|
||||
router.push({ name: 'SupplierCreate' });
|
||||
};
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.id'),
|
||||
name: 'id',
|
||||
isTitle: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.name'),
|
||||
name: 'socialName',
|
||||
create: true,
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.nif'),
|
||||
name: 'nif',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.nickname'),
|
||||
name: 'alias',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.account'),
|
||||
name: 'account',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.payMethod'),
|
||||
name: 'payMethod',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'payMethods',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.payDay'),
|
||||
name: 'payDat',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -30,56 +85,25 @@ const redirectToCreateView = () => {
|
|||
<SupplierListFilter data-key="SuppliersList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate data-key="SuppliersList" url="Suppliers/filter">
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
:key="row.id"
|
||||
:title="row.socialName"
|
||||
:id="row.id"
|
||||
@click="navigate(row.id)"
|
||||
>
|
||||
<template #list-items>
|
||||
<VnLv label="NIF/CIF" :value="row.nif" />
|
||||
<VnLv label="Alias" :value="row.alias" />
|
||||
<VnLv
|
||||
:label="t('supplier.list.payMethod')"
|
||||
:value="row.payMethod"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('supplier.list.payDeadline')"
|
||||
:title-label="t('invoiceOut.list.created')"
|
||||
:value="row.payDem"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('supplier.list.payDay')"
|
||||
:value="row.payDay"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('supplier.list.account')"
|
||||
:value="row.account"
|
||||
/>
|
||||
</template>
|
||||
<template #actions>
|
||||
<QBtn
|
||||
:label="t('components.smartCard.openSummary')"
|
||||
@click.stop="viewSummary(row.id, SupplierSummary)"
|
||||
color="primary"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
<QPageSticky :offset="[20, 20]">
|
||||
<QBtn fab icon="add" color="primary" @click="redirectToCreateView()" />
|
||||
<QTooltip>
|
||||
{{ t('supplier.list.newSupplier') }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
</QPage>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="SuppliersList"
|
||||
url="Suppliers/filter"
|
||||
save-url="Suppliers/crud"
|
||||
redirect="supplier"
|
||||
:create="{
|
||||
urlCreate: 'Suppliers/newSupplier',
|
||||
title: t('Create Supplier'),
|
||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||
formInitialData: {},
|
||||
}"
|
||||
order="id ASC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
:use-model="true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -182,7 +182,7 @@ const columns = computed(() => [
|
|||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="TravelList"
|
||||
url="Travels"
|
||||
url="Travels/filter"
|
||||
:create="{
|
||||
urlCreate: 'Travels',
|
||||
title: t('Create Travels'),
|
||||
|
|
Loading…
Reference in New Issue