feat: refs #8305 added summary, descriptor and dms
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
1675f912cd
commit
cbdfe7b25c
|
@ -18,12 +18,10 @@ const $props = defineProps({
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const descriptor = ref();
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
return $props.id || route.params.id;
|
return $props.id || route.params.id;
|
||||||
});
|
});
|
||||||
|
|
||||||
const descriptor = ref();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -34,58 +32,12 @@ const descriptor = ref();
|
||||||
title="ref"
|
title="ref"
|
||||||
data-key="DeliveryNote"
|
data-key="DeliveryNote"
|
||||||
>
|
>
|
||||||
<!-- width="lg-width" -->
|
|
||||||
<!-- <template #menu="{ entity, menuRef }">
|
|
||||||
<DeliveryNoteDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />
|
|
||||||
</template> -->
|
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
{{ entity }}
|
<VnLv :label="t('globals.id')" :value="entity.id" />
|
||||||
<!-- <VnLv
|
<VnLv :label="t('globals.reference')" :value="entity.ref" />
|
||||||
v-if="entity.externalRef"
|
<VnLv :label="t('globals.shipped')" :value="toDate(entity.shipped)" />
|
||||||
:label="t('invoiceOut.externalRef')"
|
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
||||||
:value="entity.externalRef"
|
|
||||||
/>
|
|
||||||
<VnLv :label="t('invoiceOut.card.issued')" :value="toDate(entity.issued)" />
|
|
||||||
<VnLv :label="t('globals.amount')" :value="toCurrency(entity.amount)" />
|
<VnLv :label="t('globals.amount')" :value="toCurrency(entity.amount)" />
|
||||||
<VnLv v-if="entity.client" :label="t('globals.client')">
|
|
||||||
<template #value>
|
|
||||||
<span class="link">
|
|
||||||
{{ entity.client.name }}
|
|
||||||
<CustomerDescriptorProxy :id="entity.client.id" />
|
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
|
||||||
<VnLv
|
|
||||||
v-if="entity.company"
|
|
||||||
:label="t('globals.company')"
|
|
||||||
:value="entity.company.code"
|
|
||||||
/> -->
|
|
||||||
</template>
|
|
||||||
<!-- <template #actions="{ entity }">
|
|
||||||
<QCardActions class="flex justify-center">
|
|
||||||
<QBtn
|
|
||||||
v-if="entity.client"
|
|
||||||
size="md"
|
|
||||||
icon="vn:client"
|
|
||||||
color="primary"
|
|
||||||
:to="{ name: 'CustomerCard', params: { id: entity.client.id } }"
|
|
||||||
data-cy="invoiceOutDescriptorCustomerCard"
|
|
||||||
>
|
|
||||||
<QTooltip>{{ t('invoiceOut.card.customerCard') }}</QTooltip>
|
|
||||||
</QBtn>
|
|
||||||
<QBtn
|
|
||||||
size="md"
|
|
||||||
icon="vn:ticket"
|
|
||||||
color="primary"
|
|
||||||
:to="{
|
|
||||||
name: 'TicketList',
|
|
||||||
query: { table: ticketFilter(entity) },
|
|
||||||
}"
|
|
||||||
data-cy="invoiceOutDescriptorTicketList"
|
|
||||||
>
|
|
||||||
<QTooltip>{{ t('invoiceOut.card.ticketList') }}</QTooltip>
|
|
||||||
</QBtn>
|
|
||||||
</QCardActions>
|
|
||||||
</template>-->
|
|
||||||
</EntityDescriptor>
|
</EntityDescriptor>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
<script setup>
|
||||||
|
import VnDmsList from 'src/components/common/VnDmsList.vue';
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<VnDmsList
|
||||||
|
model="DeliveryNoteDms"
|
||||||
|
update-model="DeliveryNoteDms"
|
||||||
|
default-dms-code="deliveryNote"
|
||||||
|
filter="deliveryNoteFk"
|
||||||
|
/>
|
||||||
|
</template>
|
|
@ -1,19 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import axios from 'axios';
|
import { toCurrency, toDate, dashIfEmpty } from 'src/filters';
|
||||||
import { toCurrency, toDate, toPercentage } from 'src/filters';
|
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
onMounted(async () => {
|
|
||||||
fetch();
|
|
||||||
salixUrl.value = await getUrl('');
|
|
||||||
invoiceOutUrl.value = salixUrl.value + `invoiceOut/${entityId.value}/`;
|
|
||||||
});
|
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -26,16 +19,6 @@ const $props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
const salixUrl = ref();
|
|
||||||
const invoiceOutUrl = ref();
|
|
||||||
const tickets = ref(null);
|
|
||||||
|
|
||||||
function fetch() {
|
|
||||||
axios.get(`InvoiceOuts/${entityId.value}/getTickets`).then(({ data }) => {
|
|
||||||
tickets.value = data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -46,29 +29,56 @@ function fetch() {
|
||||||
data-key="deliveryNoteSummary"
|
data-key="deliveryNoteSummary"
|
||||||
>
|
>
|
||||||
<template #header="{ entity: { deliveryNote } }">
|
<template #header="{ entity: { deliveryNote } }">
|
||||||
<div>{{ deliveryNote.ref }}</div>
|
<div>{{ deliveryNote.id }} - {{ deliveryNote.ref }}</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template #menu="{ entity }">
|
|
||||||
<InvoiceOutDescriptorMenu :invoice-out-data="entity.invoiceOut" />
|
|
||||||
</template> -->
|
|
||||||
<template #body="{ entity: { deliveryNote } }">
|
<template #body="{ entity: { deliveryNote } }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle :text="t('globals.pageTitles.basicData')" />
|
<VnTitle
|
||||||
{{ deliveryNote }}
|
:url="`#/delivery-note/${entityId}/basic-data`"
|
||||||
<!-- <VnLv
|
:text="t('globals.pageTitles.basicData')"
|
||||||
:label="t('invoiceOut.summary.issued')"
|
/>
|
||||||
:value="toDate(invoiceOut.issued)"
|
<div class="vn-card-group">
|
||||||
|
<div class="vn-card-content">
|
||||||
|
<VnLv :label="t('globals.id')" :value="deliveryNote.id" />
|
||||||
|
<VnLv :label="t('globals.reference')" :value="deliveryNote.ref" />
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.shipped')"
|
||||||
|
:value="toDate(deliveryNote.shipped)"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceOut.summary.expirationDate')"
|
:label="t('globals.landed')"
|
||||||
:value="toDate(invoiceOut.dued)"
|
:value="toDate(deliveryNote.landed)"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('globals.created')" :value="toDate(invoiceOut.created)" />
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceOut.summary.booked')"
|
:label="t('globals.amount')"
|
||||||
:value="toDate(invoiceOut.booked)"
|
:value="toCurrency(deliveryNote.amount)"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('globals.company')" :value="invoiceOut.company.code" /> -->
|
</div>
|
||||||
|
<div class="vn-card-content">
|
||||||
|
<VnLv :label="t('globals.supplier')">
|
||||||
|
<template #value>
|
||||||
|
<span class="link">
|
||||||
|
{{ deliveryNote.supplier.name }}
|
||||||
|
<SupplierDescriptorProxy
|
||||||
|
:id="deliveryNote.supplierFk"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.company')"
|
||||||
|
:value="deliveryNote.company.code"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.state')"
|
||||||
|
:value="deliveryNote.deliveryNoteState.state"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.invoiceIn')"
|
||||||
|
:value="dashIfEmpty(deliveryNote.invoiceInFk)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
|
|
|
@ -33,8 +33,8 @@ const deliveryNoteCard = {
|
||||||
path: 'dms',
|
path: 'dms',
|
||||||
name: 'DeliveryNoteDms',
|
name: 'DeliveryNoteDms',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'log',
|
title: 'dms',
|
||||||
icon: 'history',
|
icon: 'smb_share',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/DeliveryNote/Card/DeliveryNoteDms.vue'),
|
component: () => import('src/pages/DeliveryNote/Card/DeliveryNoteDms.vue'),
|
||||||
},
|
},
|
||||||
|
@ -46,7 +46,7 @@ export default {
|
||||||
path: '/delivery-note',
|
path: '/delivery-note',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'deliveryNotes',
|
title: 'deliveryNotes',
|
||||||
icon: 'vn:delivery-note',
|
icon: 'contact_support',
|
||||||
moduleName: 'DeliveryNote',
|
moduleName: 'DeliveryNote',
|
||||||
menu: ['DeliveryNoteList'],
|
menu: ['DeliveryNoteList'],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue