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
|
payDay: Pay day
|
||||||
account: Account
|
account: Account
|
||||||
newSupplier: New supplier
|
newSupplier: New supplier
|
||||||
|
tableVisibleColumns:
|
||||||
|
id: Id
|
||||||
|
name: Name
|
||||||
|
nif: NIF/CIF
|
||||||
|
nickname: Alias
|
||||||
|
account: Account
|
||||||
|
payMethod: Pay Method
|
||||||
|
payDay: Pay Day
|
||||||
summary:
|
summary:
|
||||||
responsible: Responsible
|
responsible: Responsible
|
||||||
notes: Notes
|
notes: Notes
|
||||||
|
|
|
@ -1036,6 +1036,14 @@ supplier:
|
||||||
payDay: Día de pago
|
payDay: Día de pago
|
||||||
account: Cuenta
|
account: Cuenta
|
||||||
newSupplier: Nuevo proveedor
|
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:
|
summary:
|
||||||
responsible: Responsable
|
responsible: Responsable
|
||||||
notes: Notas
|
notes: Notas
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import OrderDescriptor from 'pages/Order/Card/OrderDescriptor.vue';
|
import OrderDescriptor from 'pages/Order/Card/OrderDescriptor.vue';
|
||||||
import OrderFilter from './OrderFilter.vue';
|
import OrderFilter from './OrderFilter.vue';
|
||||||
|
import OrderSearchbar from './OrderSearchbar.vue';
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCard
|
||||||
|
@ -10,7 +11,9 @@ import OrderFilter from './OrderFilter.vue';
|
||||||
:descriptor="OrderDescriptor"
|
:descriptor="OrderDescriptor"
|
||||||
:filter-panel="OrderFilter"
|
:filter-panel="OrderFilter"
|
||||||
search-data-key="OrderList"
|
search-data-key="OrderList"
|
||||||
searchbar-label="Search order"
|
>
|
||||||
searchbar-info="ypu can search by order id or name"
|
<template #searchbar>
|
||||||
/>
|
<OrderSearchbar />
|
||||||
|
</template>
|
||||||
|
</VnCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -9,8 +9,6 @@ import { dashIfEmpty } from 'src/filters';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
onUpdated(() => summaryRef.value.fetch());
|
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const roleState = useRole();
|
const roleState = useRole();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
|
@ -1,26 +1,81 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import RightMenu from 'components/common/RightMenu.vue';
|
||||||
import CardList from 'src/components/ui/CardList.vue';
|
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
|
||||||
import SupplierSummary from './Card/SupplierSummary.vue';
|
|
||||||
import SupplierListFilter from './SupplierListFilter.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 { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const tableRef = ref();
|
||||||
|
|
||||||
function navigate(id) {
|
const columns = computed(() => [
|
||||||
router.push({ path: `/supplier/${id}` });
|
{
|
||||||
}
|
align: 'left',
|
||||||
|
label: t('supplier.list.tableVisibleColumns.id'),
|
||||||
const redirectToCreateView = () => {
|
name: 'id',
|
||||||
router.push({ name: 'SupplierCreate' });
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -30,56 +85,25 @@ const redirectToCreateView = () => {
|
||||||
<SupplierListFilter data-key="SuppliersList" />
|
<SupplierListFilter data-key="SuppliersList" />
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightMenu>
|
||||||
<QPage class="column items-center q-pa-md">
|
<VnTable
|
||||||
<div class="vn-card-list">
|
ref="tableRef"
|
||||||
<VnPaginate data-key="SuppliersList" url="Suppliers/filter">
|
data-key="SuppliersList"
|
||||||
<template #body="{ rows }">
|
url="Suppliers/filter"
|
||||||
<CardList
|
save-url="Suppliers/crud"
|
||||||
v-for="row of rows"
|
redirect="supplier"
|
||||||
:key="row.id"
|
:create="{
|
||||||
:title="row.socialName"
|
urlCreate: 'Suppliers/newSupplier',
|
||||||
:id="row.id"
|
title: t('Create Supplier'),
|
||||||
@click="navigate(row.id)"
|
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||||
>
|
formInitialData: {},
|
||||||
<template #list-items>
|
}"
|
||||||
<VnLv label="NIF/CIF" :value="row.nif" />
|
order="id ASC"
|
||||||
<VnLv label="Alias" :value="row.alias" />
|
:columns="columns"
|
||||||
<VnLv
|
default-mode="table"
|
||||||
:label="t('supplier.list.payMethod')"
|
auto-load
|
||||||
:value="row.payMethod"
|
:right-search="false"
|
||||||
/>
|
:use-model="true"
|
||||||
<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>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -182,7 +182,7 @@ const columns = computed(() => [
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="TravelList"
|
data-key="TravelList"
|
||||||
url="Travels"
|
url="Travels/filter"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Travels',
|
urlCreate: 'Travels',
|
||||||
title: t('Create Travels'),
|
title: t('Create Travels'),
|
||||||
|
|
Loading…
Reference in New Issue