Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
This commit is contained in:
commit
4abb230180
|
@ -81,7 +81,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Podemos enviarle al form la estructura de data inicial sin necesidad de fetchearla
|
// Podemos enviarle al form la estructura de data inicial sin necesidad de fetchearla
|
||||||
state.set($props.model, $props.formInitialData ?? {});
|
state.set($props.model, $props.formInitialData);
|
||||||
if ($props.autoLoad && !$props.formInitialData) {
|
if ($props.autoLoad && !$props.formInitialData) {
|
||||||
await fetch();
|
await fetch();
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ function addDefaultData(data) {
|
||||||
<FormModelPopup
|
<FormModelPopup
|
||||||
:title="formInitialData ? t('globals.edit') : t('globals.create')"
|
:title="formInitialData ? t('globals.edit') : t('globals.create')"
|
||||||
model="dms"
|
model="dms"
|
||||||
:form-initial-data="formInitialData"
|
:form-initial-data="formInitialData ?? {}"
|
||||||
:save-fn="save"
|
:save-fn="save"
|
||||||
>
|
>
|
||||||
<template #form-inputs>
|
<template #form-inputs>
|
||||||
|
|
|
@ -39,30 +39,47 @@ onMounted(async () => {
|
||||||
const tableColumnComponents = {
|
const tableColumnComponents = {
|
||||||
quantity: {
|
quantity: {
|
||||||
component: () => 'span',
|
component: () => 'span',
|
||||||
|
props: () => {},
|
||||||
},
|
},
|
||||||
stickers: {
|
stickers: {
|
||||||
component: () => 'span',
|
component: () => 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
},
|
},
|
||||||
packagingFk: {
|
packagingFk: {
|
||||||
component: () => 'span',
|
component: () => 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
},
|
},
|
||||||
weight: {
|
weight: {
|
||||||
component: () => 'span',
|
component: () => 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
},
|
},
|
||||||
packing: {
|
packing: {
|
||||||
component: () => 'span',
|
component: () => 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
},
|
},
|
||||||
grouping: {
|
grouping: {
|
||||||
component: () => 'span',
|
component: () => 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
},
|
},
|
||||||
buyingValue: {
|
buyingValue: {
|
||||||
component: () => 'span',
|
component: () => 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
},
|
},
|
||||||
amount: {
|
amount: {
|
||||||
component: () => 'span',
|
component: () => 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
},
|
},
|
||||||
pvp: {
|
pvp: {
|
||||||
component: () => 'span',
|
component: () => 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -162,125 +179,82 @@ const fetchEntryBuys = async () => {
|
||||||
{{ t('globals.summary.basicData') }}
|
{{ t('globals.summary.basicData') }}
|
||||||
<QIcon name="open_in_new" color="primary" />
|
<QIcon name="open_in_new" color="primary" />
|
||||||
</a>
|
</a>
|
||||||
<VnRow>
|
|
||||||
<div class="col">
|
<VnLv :label="t('entry.summary.commission')" :value="entry.commission" />
|
||||||
<VnLv
|
|
||||||
:label="t('entry.summary.commission')"
|
<VnLv :label="t('entry.summary.currency')" :value="entry.currency.name" />
|
||||||
:value="entry.commission"
|
|
||||||
/>
|
<VnLv :label="t('entry.summary.company')" :value="entry.company.code" />
|
||||||
</div>
|
|
||||||
<div class="col">
|
<VnLv :label="t('entry.summary.reference')" :value="entry.reference" />
|
||||||
<VnLv
|
|
||||||
:label="t('entry.summary.currency')"
|
<VnLv
|
||||||
:value="entry.currency.name"
|
:label="t('entry.summary.invoiceNumber')"
|
||||||
/>
|
:value="entry.invoiceNumber"
|
||||||
</div>
|
/>
|
||||||
<div class="col">
|
|
||||||
<VnLv
|
<VnLv :label="t('entry.summary.ordered')" :value="entry.isOrdered" />
|
||||||
:label="t('entry.summary.company')"
|
|
||||||
:value="entry.company.code"
|
<VnLv :label="t('entry.summary.confirmed')" :value="entry.isConfirmed" />
|
||||||
/>
|
|
||||||
</div>
|
<VnLv :label="t('entry.summary.booked')" :value="entry.isBooked" />
|
||||||
<div class="col">
|
|
||||||
<VnLv
|
<VnLv :label="t('entry.summary.raid')" :value="entry.isRaid" />
|
||||||
:label="t('entry.summary.reference')"
|
|
||||||
:value="entry.reference"
|
<VnLv
|
||||||
/>
|
:label="t('entry.summary.excludedFromAvailable')"
|
||||||
</div>
|
:value="entry.isExcludedFromAvailable"
|
||||||
<div class="col">
|
/>
|
||||||
<VnLv
|
|
||||||
:label="t('entry.summary.invoiceNumber')"
|
|
||||||
:value="entry.invoiceNumber"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<VnLv
|
|
||||||
:label="t('entry.summary.ordered')"
|
|
||||||
:value="entry.isOrdered"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<VnLv
|
|
||||||
:label="t('entry.summary.confirmed')"
|
|
||||||
:value="entry.isConfirmed"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<VnLv
|
|
||||||
:label="t('entry.summary.booked')"
|
|
||||||
:value="entry.isBooked"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<VnLv :label="t('entry.summary.raid')" :value="entry.isRaid" />
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<VnLv
|
|
||||||
:label="t('entry.summary.excludedFromAvailable')"
|
|
||||||
:value="entry.isExcludedFromAvailable"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</VnRow>
|
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a class="header link" :href="entryUrl">
|
<a class="header link" :href="entryUrl">
|
||||||
{{ t('Travel data') }}
|
{{ t('Travel data') }}
|
||||||
<QIcon name="open_in_new" color="primary" />
|
<QIcon name="open_in_new" color="primary" />
|
||||||
</a>
|
</a>
|
||||||
<VnRow>
|
|
||||||
<div class="col">
|
<VnLv :label="t('entry.summary.travelReference')">
|
||||||
<VnLv :label="t('entry.summary.travelReference')">
|
<template #value>
|
||||||
<template #value>
|
<span class="link">
|
||||||
<span class="link">
|
{{ entry.travel.ref }}
|
||||||
{{ entry.travel.ref }}
|
<TravelDescriptorProxy :id="entry.travel.id" />
|
||||||
<TravelDescriptorProxy :id="entry.travel.id" />
|
</span>
|
||||||
</span>
|
</template>
|
||||||
</template>
|
</VnLv>
|
||||||
</VnLv>
|
|
||||||
</div>
|
<VnLv
|
||||||
<div class="col">
|
:label="t('entry.summary.travelAgency')"
|
||||||
<VnLv
|
:value="entry.travel.agency.name"
|
||||||
:label="t('entry.summary.travelAgency')"
|
/>
|
||||||
:value="entry.travel.agency.name"
|
|
||||||
/>
|
<VnLv
|
||||||
</div>
|
:label="t('entry.summary.travelShipped')"
|
||||||
<div class="col">
|
:value="toDate(entry.travel.shipped)"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('entry.summary.travelShipped')"
|
|
||||||
:value="toDate(entry.travel.shipped)"
|
<VnLv
|
||||||
/>
|
:label="t('entry.summary.travelWarehouseOut')"
|
||||||
</div>
|
:value="entry.travel.warehouseOut.name"
|
||||||
<div class="col">
|
/>
|
||||||
<VnLv
|
|
||||||
:label="t('entry.summary.travelWarehouseOut')"
|
<VnLv
|
||||||
:value="entry.travel.warehouseOut.name"
|
:label="t('entry.summary.travelDelivered')"
|
||||||
/>
|
:value="entry.travel.isDelivered"
|
||||||
</div>
|
/>
|
||||||
<div class="col">
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('entry.summary.travelDelivered')"
|
:label="t('entry.summary.travelLanded')"
|
||||||
:value="entry.travel.isDelivered"
|
:value="toDate(entry.travel.landed)"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<div class="col">
|
<VnLv
|
||||||
<VnLv
|
:label="t('entry.summary.travelWarehouseIn')"
|
||||||
:label="t('entry.summary.travelLanded')"
|
:value="entry.travel.warehouseIn.name"
|
||||||
:value="toDate(entry.travel.landed)"
|
/>
|
||||||
/>
|
|
||||||
</div>
|
<VnLv
|
||||||
<div class="col">
|
:label="t('entry.summary.travelReceived')"
|
||||||
<VnLv
|
:value="entry.travel.isReceived"
|
||||||
:label="t('entry.summary.travelWarehouseIn')"
|
/>
|
||||||
:value="entry.travel.warehouseIn.name"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<VnLv
|
|
||||||
:label="t('entry.summary.travelReceived')"
|
|
||||||
:value="entry.travel.isReceived"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</VnRow>
|
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-two" style="min-width: 100%">
|
<QCard class="vn-two" style="min-width: 100%">
|
||||||
<a class="header">
|
<a class="header">
|
||||||
|
@ -297,7 +271,10 @@ const fetchEntryBuys = async () => {
|
||||||
<QTr no-hover>
|
<QTr no-hover>
|
||||||
<QTd v-for="col in cols" :key="col.name">
|
<QTd v-for="col in cols" :key="col.name">
|
||||||
<component
|
<component
|
||||||
:is="tableColumnComponents[col.name].component()"
|
:is="tableColumnComponents[col.name].component(props)"
|
||||||
|
v-bind="tableColumnComponents[col.name].props(props)"
|
||||||
|
@click="tableColumnComponents[col.name].event(props)"
|
||||||
|
class="col-content"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
|
|
|
@ -78,7 +78,7 @@ const filter = {
|
||||||
<VnLv :label="t('worker.card.name')" :value="worker.user.nickname" />
|
<VnLv :label="t('worker.card.name')" :value="worker.user.nickname" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.list.department')"
|
:label="t('worker.list.department')"
|
||||||
:value="worker.department.department.name"
|
:value="worker.department?.department?.name"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('worker.list.email')" :value="worker.user.email" copy />
|
<VnLv :label="t('worker.list.email')" :value="worker.user.email" copy />
|
||||||
<VnLv :label="t('worker.summary.boss')" link>
|
<VnLv :label="t('worker.summary.boss')" link>
|
||||||
|
@ -102,10 +102,10 @@ const filter = {
|
||||||
<VnLinkPhone :phone-number="worker.phone" />
|
<VnLinkPhone :phone-number="worker.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :value="worker.client.phone">
|
<VnLv :value="worker.client?.phone">
|
||||||
<template #label>
|
<template #label>
|
||||||
{{ t('worker.summary.personalPhone') }}
|
{{ t('worker.summary.personalPhone') }}
|
||||||
<VnLinkPhone :phone-number="worker.client.phone" />
|
<VnLinkPhone :phone-number="worker.client?.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
||||||
|
|
Loading…
Reference in New Issue