forked from verdnatura/salix-front
Merge branch 'dev' into 6578-orderClaim
This commit is contained in:
commit
10a3a39b03
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, computed } from 'vue';
|
import { onMounted, ref, computed, watch } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { toDate, toCurrency } from 'src/filters';
|
import { toDate, toCurrency } from 'src/filters';
|
||||||
|
@ -26,12 +26,26 @@ const entityId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
const claimUrl = ref();
|
const claimUrl = ref();
|
||||||
const salixUrl = ref();
|
const salixUrl = ref();
|
||||||
|
const claimDmsRef = ref();
|
||||||
|
const claimDmsFilter = ref({
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'dms',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
where: { claimFk: entityId.value },
|
||||||
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
salixUrl.value = await getUrl('');
|
salixUrl.value = await getUrl('');
|
||||||
claimUrl.value = salixUrl.value + `claim/${entityId.value}/`;
|
claimUrl.value = salixUrl.value + `claim/${entityId.value}/`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(entityId, async (id) => {
|
||||||
|
claimDmsFilter.value.where = { claimFk: id };
|
||||||
|
await claimDmsRef.value.fetch();
|
||||||
|
});
|
||||||
|
|
||||||
const detailsColumns = ref([
|
const detailsColumns = ref([
|
||||||
{
|
{
|
||||||
name: 'item',
|
name: 'item',
|
||||||
|
@ -131,18 +145,9 @@ const developmentColumns = ref([
|
||||||
const claimDms = ref([]);
|
const claimDms = ref([]);
|
||||||
const multimediaDialog = ref();
|
const multimediaDialog = ref();
|
||||||
const multimediaSlide = ref();
|
const multimediaSlide = ref();
|
||||||
const claimDmsFilter = ref({
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'dms',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
where: { claimFk: entityId.value },
|
|
||||||
});
|
|
||||||
|
|
||||||
function setClaimDms(data) {
|
function setClaimDms(data) {
|
||||||
if (!data) return;
|
claimDms.value = [];
|
||||||
|
|
||||||
data.forEach((media) => {
|
data.forEach((media) => {
|
||||||
claimDms.value.push({
|
claimDms.value.push({
|
||||||
isVideo: media.dms.contentType == 'video/mp4',
|
isVideo: media.dms.contentType == 'video/mp4',
|
||||||
|
@ -165,6 +170,7 @@ function openDialog(dmsId) {
|
||||||
@on-fetch="(data) => setClaimDms(data)"
|
@on-fetch="(data) => setClaimDms(data)"
|
||||||
limit="20"
|
limit="20"
|
||||||
auto-load
|
auto-load
|
||||||
|
ref="claimDmsRef"
|
||||||
/>
|
/>
|
||||||
<CardSummary ref="summary" :url="`Claims/${entityId}/getSummary`">
|
<CardSummary ref="summary" :url="`Claims/${entityId}/getSummary`">
|
||||||
<template #header="{ entity: { claim } }">
|
<template #header="{ entity: { claim } }">
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<script setup>
|
||||||
|
import VnLog from 'src/components/common/VnLog.vue';
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<VnLog model="InvoiceIn" />
|
||||||
|
</template>
|
|
@ -16,6 +16,7 @@ export default {
|
||||||
'InvoiceInVat',
|
'InvoiceInVat',
|
||||||
'InvoiceInDueDay',
|
'InvoiceInDueDay',
|
||||||
'InvoiceInIntrastat',
|
'InvoiceInIntrastat',
|
||||||
|
'InvoiceInLog',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
@ -92,6 +93,15 @@ export default {
|
||||||
component: () =>
|
component: () =>
|
||||||
import('src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue'),
|
import('src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'InvoiceInLog',
|
||||||
|
path: 'log',
|
||||||
|
meta: {
|
||||||
|
title: 'log',
|
||||||
|
icon: 'history',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/InvoiceIn/Card/InvoiceInLog.vue'),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue