PR-CUSTOMER #186
|
@ -1,15 +1,16 @@
|
|||
<script setup>
|
||||
|
||||
import { computed, onBeforeMount, ref } from 'vue';
|
||||
import { computed, onBeforeMount, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import axios from 'axios';
|
||||
import { QCheckbox, QBtn, useQuasar } from 'quasar';
|
||||
|
||||
import { toCurrency, toDate, toDateHourMinSec } from 'src/filters';
|
||||
import { toCurrency, toDate, toDateHourMin } from 'src/filters';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
import { usePrintService } from 'src/composables/usePrintService';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||
|
@ -18,6 +19,7 @@ import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment
|
|||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||
|
||||
const { sendEmail } = usePrintService();
|
||||
const { t } = useI18n();
|
||||
const { validate } = useValidator();
|
||||
const quasar = useQuasar();
|
||||
|
@ -28,14 +30,16 @@ const user = state.getUser();
|
|||
|
||||
const clientRisks = ref(null);
|
||||
const clientRisksRef = ref(null);
|
||||
const closeButton = ref(null);
|
||||
const companiesOptions = ref([]);
|
||||
const companyId = ref(null);
|
||||
const receiptsRef = ref(null);
|
||||
const rows = ref([]);
|
||||
const showDialog = ref(false);
|
||||
|
||||
const filterCompanies = { order: ['code'] };
|
||||
const params = {
|
||||
clientId: `${route.params.id}`,
|
||||
clientId: route.params.id,
|
||||
companyId: user.value.companyFk,
|
||||
filter: { limit: 20 },
|
||||
};
|
||||
|
@ -93,6 +97,11 @@ const tableColumnComponents = {
|
|||
}),
|
||||
event: () => {},
|
||||
},
|
||||
actions: {
|
||||
jsegarra marked this conversation as resolved
Outdated
jgallego
commented
todos los campos de euros deben de ir alineados a la derecha como en salix. todos los campos de euros deben de ir alineados a la derecha como en salix.
jsegarra
commented
Así se ve para el cliente 1101. Ver imagen adjunta Así se ve para el cliente 1101. Ver imagen adjunta
Sin embargo, el cursor cambia a "la mano", induciendo a que se puede cambiar, cuando debería aparecer el prohibido o cambiar el color del checkbox a gris
cfonseca
commented
Corregido, campos de tipo moneda alineados a la derecha y el checkbox deshabilitado: Corregido, campos de tipo moneda alineados a la derecha y el checkbox deshabilitado: 0aa5a051fb
jsegarra
commented
Yo lo he visto OK Yo lo he visto OK
El checkbox es de color naranja pero se ve que está deshabilitado y tiene el cursor en prohibido
|
||||
component: 'div',
|
||||
props: () => {},
|
||||
event: () => {},
|
||||
},
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
|
@ -106,7 +115,7 @@ const columns = computed(() => [
|
|||
{
|
||||
jgallego
commented
El usuario en minusculas igual que salix (cambiar para todos los sitios que se muestre) El usuario en minusculas igual que salix (cambiar para todos los sitios que se muestre)
cfonseca
commented
Corregido: Corregido: 663010a0d4
jsegarra
commented
Yo lo he visto OK Yo lo he visto OK
|
||||
align: 'left',
|
||||
field: 'created',
|
||||
format: (value) => toDateHourMinSec(value),
|
||||
format: (value) => toDateHourMin(value),
|
||||
label: t('Creation date'),
|
||||
name: 'creationDate',
|
||||
},
|
||||
|
@ -131,6 +140,7 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
field: 'debit',
|
||||
format: (value) => toCurrency(value),
|
||||
label: t('Debit'),
|
||||
name: 'debit',
|
||||
},
|
||||
|
@ -154,6 +164,12 @@ const columns = computed(() => [
|
|||
label: t('Conciliated'),
|
||||
name: 'conciliated',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
field: 'totalWithVat',
|
||||
label: '',
|
||||
name: 'actions',
|
||||
},
|
||||
]);
|
||||
|
||||
onBeforeMount(() => {
|
||||
|
@ -161,6 +177,15 @@ onBeforeMount(() => {
|
|||
companyId.value = user.value.companyFk;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => route.params.id,
|
||||
(newValue) => {
|
||||
params.clientId = newValue;
|
||||
filter.where.clientFk = newValue;
|
||||
getData();
|
||||
}
|
||||
);
|
||||
|
||||
const getData = () => {
|
||||
receiptsRef.value?.fetch();
|
||||
clientRisksRef.value?.fetch();
|
||||
|
@ -194,6 +219,10 @@ const saveFieldValue = async (event) => {
|
|||
return err;
|
||||
}
|
||||
};
|
||||
|
||||
const sendEmailAction = () => {
|
||||
sendEmail(`Suppliers/${route.params.id}/campaign-metrics-email`);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -266,6 +295,64 @@ const saveFieldValue = async (event) => {
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<template
|
||||
v-if="
|
||||
props.col.name === 'actions' && props.row.isCompensation
|
||||
"
|
||||
>
|
||||
<QIcon
|
||||
@click.stop="showDialog = true"
|
||||
class="q-ml-md"
|
||||
color="primary"
|
||||
name="add"
|
||||
size="sm"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Send compensation') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
|
||||
<QDialog v-model="showDialog">
|
||||
<QCard class="q-pa-sm">
|
||||
<QCardSection>
|
||||
<span
|
||||
ref="closeButton"
|
||||
class="flex justify-end color-vn-label"
|
||||
v-close-popup
|
||||
>
|
||||
<QIcon name="close" size="sm" />
|
||||
</span>
|
||||
<div class="text-h6">
|
||||
{{ t('Send compensation') }}
|
||||
</div>
|
||||
</QCardSection>
|
||||
<QCardSection>
|
||||
<div>
|
||||
{{
|
||||
t(
|
||||
'Do you want to report compensation to the client by mail?'
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</QCardSection>
|
||||
<QCardActions class="flex justify-end q-mb-sm">
|
||||
<QBtn
|
||||
:label="t('globals.cancel')"
|
||||
color="primary"
|
||||
flat
|
||||
v-close-popup
|
||||
/>
|
||||
<QBtn
|
||||
jgallego
commented
esta seccion va con scroll infinito como en salix esta seccion va con scroll infinito como en salix
cfonseca
commented
Corregido: Corregido: 09a2af4124
|
||||
:label="t('globals.save')"
|
||||
@click="sendEmailAction"
|
||||
class="q-ml-sm"
|
||||
color="primary"
|
||||
/>
|
||||
</QCardActions>
|
||||
</QCard>
|
||||
</QDialog>
|
||||
</template>
|
||||
|
||||
<WorkerDescriptorProxy
|
||||
:id="props.row.workerFk"
|
||||
v-if="props.col.name === 'employee'"
|
||||
|
@ -345,4 +432,6 @@ es:
|
|||
Havings: Haber
|
||||
Balance: Balance
|
||||
Conciliated: Conciliado
|
||||
Send compensation: Enviar compensación
|
||||
Do you want to report compensation to the client by mail?: ¿Desea informar de la compensación al cliente por correo?
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue
Errores:
Corregido:
3cf3687b84
Revisamos porque la columna referencia no tiene el mismo formato. El campo, debería ser descriptor, si procede
Corregido:
17a0afda73
Revisar porque lago raro pasa
@wbuezas y yo hemos visto que las filas no siempre aparecen ordenadas con los customer 1102 y 1103.
He eliminado el "order:id DESC" y parece que va mejor, pero alguna vez aparece en otro orden
Pasaban 2 cosas:
Ambas cosas quedaron fixeadas en este commit:
1cff622898
Aquí también hay un error en los datos que vienen del back porque el campo payed y created, tiene la misma fecha y hora para los registros con id 1