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 { t } = useI18n();
|
||||
|
||||
const descriptor = ref();
|
||||
const entityId = computed(() => {
|
||||
return $props.id || route.params.id;
|
||||
});
|
||||
|
||||
const descriptor = ref();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -34,58 +32,12 @@ const descriptor = ref();
|
|||
title="ref"
|
||||
data-key="DeliveryNote"
|
||||
>
|
||||
<!-- width="lg-width" -->
|
||||
<!-- <template #menu="{ entity, menuRef }">
|
||||
<DeliveryNoteDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />
|
||||
</template> -->
|
||||
<template #body="{ entity }">
|
||||
{{ entity }}
|
||||
<!-- <VnLv
|
||||
v-if="entity.externalRef"
|
||||
:label="t('invoiceOut.externalRef')"
|
||||
:value="entity.externalRef"
|
||||
/>
|
||||
<VnLv :label="t('invoiceOut.card.issued')" :value="toDate(entity.issued)" />
|
||||
<VnLv :label="t('globals.id')" :value="entity.id" />
|
||||
<VnLv :label="t('globals.reference')" :value="entity.ref" />
|
||||
<VnLv :label="t('globals.shipped')" :value="toDate(entity.shipped)" />
|
||||
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
import { onMounted, ref, computed } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import axios from 'axios';
|
||||
import { toCurrency, toDate, toPercentage } from 'src/filters';
|
||||
import { toCurrency, toDate, dashIfEmpty } from 'src/filters';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||
|
||||
onMounted(async () => {
|
||||
fetch();
|
||||
salixUrl.value = await getUrl('');
|
||||
invoiceOutUrl.value = salixUrl.value + `invoiceOut/${entityId.value}/`;
|
||||
});
|
||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
@ -26,16 +19,6 @@ const $props = defineProps({
|
|||
});
|
||||
|
||||
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>
|
||||
|
||||
<template>
|
||||
|
@ -46,29 +29,56 @@ function fetch() {
|
|||
data-key="deliveryNoteSummary"
|
||||
>
|
||||
<template #header="{ entity: { deliveryNote } }">
|
||||
<div>{{ deliveryNote.ref }}</div>
|
||||
<div>{{ deliveryNote.id }} - {{ deliveryNote.ref }}</div>
|
||||
</template>
|
||||
<!-- <template #menu="{ entity }">
|
||||
<InvoiceOutDescriptorMenu :invoice-out-data="entity.invoiceOut" />
|
||||
</template> -->
|
||||
<template #body="{ entity: { deliveryNote } }">
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :text="t('globals.pageTitles.basicData')" />
|
||||
{{ deliveryNote }}
|
||||
<!-- <VnLv
|
||||
:label="t('invoiceOut.summary.issued')"
|
||||
:value="toDate(invoiceOut.issued)"
|
||||
<VnTitle
|
||||
:url="`#/delivery-note/${entityId}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<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
|
||||
:label="t('invoiceOut.summary.expirationDate')"
|
||||
:value="toDate(invoiceOut.dued)"
|
||||
:label="t('globals.landed')"
|
||||
:value="toDate(deliveryNote.landed)"
|
||||
/>
|
||||
<VnLv :label="t('globals.created')" :value="toDate(invoiceOut.created)" />
|
||||
<VnLv
|
||||
:label="t('invoiceOut.summary.booked')"
|
||||
:value="toDate(invoiceOut.booked)"
|
||||
:label="t('globals.amount')"
|
||||
: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>
|
||||
</template>
|
||||
</CardSummary>
|
||||
|
|
|
@ -33,8 +33,8 @@ const deliveryNoteCard = {
|
|||
path: 'dms',
|
||||
name: 'DeliveryNoteDms',
|
||||
meta: {
|
||||
title: 'log',
|
||||
icon: 'history',
|
||||
title: 'dms',
|
||||
icon: 'smb_share',
|
||||
},
|
||||
component: () => import('src/pages/DeliveryNote/Card/DeliveryNoteDms.vue'),
|
||||
},
|
||||
|
@ -46,7 +46,7 @@ export default {
|
|||
path: '/delivery-note',
|
||||
meta: {
|
||||
title: 'deliveryNotes',
|
||||
icon: 'vn:delivery-note',
|
||||
icon: 'contact_support',
|
||||
moduleName: 'DeliveryNote',
|
||||
menu: ['DeliveryNoteList'],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue