#6919 syncData #941
|
@ -84,7 +84,7 @@ const $props = defineProps({
|
|||
},
|
||||
reload: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: true,
|
||||
},
|
||||
defaultTrim: {
|
||||
type: Boolean,
|
||||
|
|
|
@ -28,7 +28,6 @@ const workersOptions = ref([]);
|
|||
model="Claim"
|
||||
:url-update="`Claims/updateClaim/${route.params.id}`"
|
||||
auto-load
|
||||
:reload="true"
|
||||
>
|
||||
<template #form="{ data, validate }">
|
||||
<VnRow>
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ref, computed, onMounted } from 'vue';
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { toDateHourMinSec, toPercentage } from 'src/filters';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||
|
@ -22,7 +21,6 @@ const $props = defineProps({
|
|||
});
|
||||
|
||||
const route = useRoute();
|
||||
const state = useState();
|
||||
const { t } = useI18n();
|
||||
const salixUrl = ref();
|
||||
const entityId = computed(() => {
|
||||
|
@ -38,10 +36,7 @@ const STATE_COLOR = {
|
|||
function stateColor(code) {
|
||||
return STATE_COLOR[code];
|
||||
}
|
||||
const setData = (entity) => {
|
||||
if (!entity) return;
|
||||
state.set('ClaimDescriptor', entity);
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
salixUrl.value = await getUrl('');
|
||||
});
|
||||
|
@ -53,7 +48,6 @@ onMounted(async () => {
|
|||
:filter="filter"
|
||||
module="Claim"
|
||||
title="client.name"
|
||||
@on-fetch="setData"
|
||||
data-key="Claim"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
|
|
|
@ -5,40 +5,7 @@ import InvoiceInFilter from '../InvoiceInFilter.vue';
|
|||
import InvoiceInSearchbar from '../InvoiceInSearchbar.vue';
|
||||
import { onBeforeRouteUpdate } from 'vue-router';
|
||||
import { setRectificative } from '../composables/setRectificative';
|
||||
|
||||
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',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
import filter from './InvoiceInFilter.js';
|
||||
|
||||
onBeforeRouteUpdate(async (to) => await setRectificative(to));
|
||||
</script>
|
||||
|
|
|
@ -17,6 +17,7 @@ import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
|||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||
import InvoiceInToBook from '../InvoiceInToBook.vue';
|
||||
import filter from './InvoiceInFilter.js';
|
||||
|
||||
const $props = defineProps({ id: { type: Number, default: null } });
|
||||
|
||||
|
@ -55,32 +56,7 @@ const actions = {
|
|||
sendPdf: { cb: sendPdfInvoiceConfirmation },
|
||||
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 routes = reactive({
|
||||
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