#6919 syncData #941
|
@ -84,7 +84,7 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
reload: {
|
reload: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: true,
|
||||||
},
|
},
|
||||||
defaultTrim: {
|
defaultTrim: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
@ -28,7 +28,6 @@ const workersOptions = ref([]);
|
||||||
model="Claim"
|
model="Claim"
|
||||||
:url-update="`Claims/updateClaim/${route.params.id}`"
|
:url-update="`Claims/updateClaim/${route.params.id}`"
|
||||||
auto-load
|
auto-load
|
||||||
:reload="true"
|
|
||||||
>
|
>
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { ref, computed, onMounted } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { toDateHourMinSec, toPercentage } from 'src/filters';
|
import { toDateHourMinSec, toPercentage } from 'src/filters';
|
||||||
import { useState } from 'src/composables/useState';
|
|
||||||
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
|
@ -22,7 +21,6 @@ const $props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const state = useState();
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const salixUrl = ref();
|
const salixUrl = ref();
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
|
@ -38,10 +36,7 @@ const STATE_COLOR = {
|
||||||
function stateColor(code) {
|
function stateColor(code) {
|
||||||
return STATE_COLOR[code];
|
return STATE_COLOR[code];
|
||||||
}
|
}
|
||||||
const setData = (entity) => {
|
|
||||||
if (!entity) return;
|
|
||||||
state.set('ClaimDescriptor', entity);
|
|
||||||
};
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
salixUrl.value = await getUrl('');
|
salixUrl.value = await getUrl('');
|
||||||
});
|
});
|
||||||
|
@ -53,7 +48,6 @@ onMounted(async () => {
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
module="Claim"
|
module="Claim"
|
||||||
title="client.name"
|
title="client.name"
|
||||||
@on-fetch="setData"
|
|
||||||
data-key="Claim"
|
data-key="Claim"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
|
|
|
@ -5,40 +5,7 @@ import InvoiceInFilter from '../InvoiceInFilter.vue';
|
||||||
import InvoiceInSearchbar from '../InvoiceInSearchbar.vue';
|
import InvoiceInSearchbar from '../InvoiceInSearchbar.vue';
|
||||||
import { onBeforeRouteUpdate } from 'vue-router';
|
import { onBeforeRouteUpdate } from 'vue-router';
|
||||||
import { setRectificative } from '../composables/setRectificative';
|
import { setRectificative } from '../composables/setRectificative';
|
||||||
|
import filter from './InvoiceInFilter.js';
|
||||||
const filter = {
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'supplier',
|
|
||||||
scope: {
|
|
||||||
include: {
|
|
||||||
relation: 'contacts',
|
|
||||||
scope: { where: { email: { neq: null } } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ relation: 'invoiceInDueDay' },
|
|
||||||
{ relation: 'company' },
|
|
||||||
{ relation: 'currency' },
|
|
||||||
{
|
|
||||||
relation: 'dms',
|
|
||||||
scope: {
|
|
||||||
fields: [
|
|
||||||
'dmsTypeFk',
|
|
||||||
'reference',
|
|
||||||
'hardCopyNumber',
|
|
||||||
'workerFk',
|
|
||||||
'description',
|
|
||||||
'hasFile',
|
|
||||||
'file',
|
|
||||||
'created',
|
|
||||||
'companyFk',
|
|
||||||
'warehouseFk',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
onBeforeRouteUpdate(async (to) => await setRectificative(to));
|
onBeforeRouteUpdate(async (to) => await setRectificative(to));
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -17,6 +17,7 @@ import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
import InvoiceInToBook from '../InvoiceInToBook.vue';
|
import InvoiceInToBook from '../InvoiceInToBook.vue';
|
||||||
|
import filter from './InvoiceInFilter.js';
|
||||||
|
|
||||||
const $props = defineProps({ id: { type: Number, default: null } });
|
const $props = defineProps({ id: { type: Number, default: null } });
|
||||||
|
|
||||||
|
@ -55,32 +56,7 @@ const actions = {
|
||||||
sendPdf: { cb: sendPdfInvoiceConfirmation },
|
sendPdf: { cb: sendPdfInvoiceConfirmation },
|
||||||
correct: { cb: () => correctionDialogRef.value.show() },
|
correct: { cb: () => correctionDialogRef.value.show() },
|
||||||
};
|
};
|
||||||
const filter = {
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'supplier',
|
|
||||||
scope: {
|
|
||||||
include: {
|
|
||||||
relation: 'contacts',
|
|
||||||
scope: {
|
|
||||||
where: {
|
|
||||||
email: { neq: null },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'invoiceInDueDay',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'company',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'currency',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
const invoiceInCorrection = reactive({ correcting: [], corrected: null });
|
const invoiceInCorrection = reactive({ correcting: [], corrected: null });
|
||||||
const routes = reactive({
|
const routes = reactive({
|
||||||
getSupplier: (id) => {
|
getSupplier: (id) => {
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
export default {
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'supplier',
|
||||||
|
scope: {
|
||||||
|
include: {
|
||||||
|
relation: 'contacts',
|
||||||
|
scope: { where: { email: { neq: null } } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ relation: 'invoiceInDueDay' },
|
||||||
|
{ relation: 'company' },
|
||||||
|
{ relation: 'currency' },
|
||||||
|
{
|
||||||
|
relation: 'dms',
|
||||||
|
scope: {
|
||||||
|
fields: [
|
||||||
|
'dmsTypeFk',
|
||||||
|
'reference',
|
||||||
|
'hardCopyNumber',
|
||||||
|
'workerFk',
|
||||||
|
'description',
|
||||||
|
'hasFile',
|
||||||
|
'file',
|
||||||
|
'created',
|
||||||
|
'companyFk',
|
||||||
|
'warehouseFk',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
Loading…
Reference in New Issue