fix: refs #4466 remove console log
This commit is contained in:
parent
173049049a
commit
21dc1b4eea
|
@ -202,12 +202,10 @@ function getChanges() {
|
|||
|
||||
const pk = $props.primaryKey;
|
||||
for (const [i, row] of formData.value.entries()) {
|
||||
console.log(pk, row);
|
||||
if (!row[pk]) {
|
||||
creates.push(row);
|
||||
} else if (originalData.value) {
|
||||
const data = getDifferences(originalData.value[i], row);
|
||||
console.log(data);
|
||||
if (!isEmpty(data)) {
|
||||
updates.push({
|
||||
data,
|
||||
|
@ -217,7 +215,6 @@ function getChanges() {
|
|||
}
|
||||
}
|
||||
const changes = { updates, creates };
|
||||
console.log('ddd', changes);
|
||||
for (let prop in changes) {
|
||||
if (changes[prop].length === 0) changes[prop] = undefined;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ onBeforeMount(async () => {
|
|||
},
|
||||
0
|
||||
);
|
||||
console.log(balanceDueTotal.value);
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
|
||||
|
|
|
@ -485,7 +485,6 @@ const selectCustomerId = (id) => {
|
|||
};
|
||||
|
||||
const selectSalesPersonId = (id) => {
|
||||
console.log('selectedSalesPersonId:: ', selectedSalesPersonId.value);
|
||||
selectedSalesPersonId.value = id;
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -44,7 +44,6 @@ const setData = (entity) => {
|
|||
};
|
||||
|
||||
const removeDepartment = () => {
|
||||
console.log('entityId: ', entityId.value);
|
||||
quasar
|
||||
.dialog({
|
||||
title: 'Are you sure you want to delete it?',
|
||||
|
|
|
@ -25,6 +25,7 @@ const columns = computed(() => [
|
|||
name: 'origin',
|
||||
label: t('Original invoice'),
|
||||
field: (row) => row.correctedFk,
|
||||
model: 'correctedFk',
|
||||
sortable: true,
|
||||
tabIndex: 1,
|
||||
align: 'left',
|
||||
|
@ -48,7 +49,7 @@ const columns = computed(() => [
|
|||
options: siiTypeInvoiceOuts.value,
|
||||
model: 'siiTypeInvoiceOutFk',
|
||||
optionValue: 'id',
|
||||
optionLabel: 'id',
|
||||
optionLabel: 'code',
|
||||
sortable: true,
|
||||
tabIndex: 1,
|
||||
align: 'left',
|
||||
|
@ -73,7 +74,7 @@ const rowsSelected = ref([]);
|
|||
|
||||
const requiredFieldRule = (val) => val || t('globals.requiredField');
|
||||
|
||||
const onSave = (data) => data.deletes && router.push(`/invoice-in/${invoiceId}/summary`);
|
||||
const onSave = (data) => data?.deletes && router.push(`/invoice-in/${invoiceId}/summary`);
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -114,6 +115,11 @@ const onSave = (data) => data.deletes && router.push(`/invoice-in/${invoiceId}/s
|
|||
:grid="$q.screen.lt.sm"
|
||||
:pagination="{ rowsPerPage: 0 }"
|
||||
>
|
||||
<template #body-cell-origin="{ row, col }">
|
||||
<QTd>
|
||||
<QInput v-model="row[col.model]" readonly />
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-type="{ row, col }">
|
||||
<QTd>
|
||||
<VnSelectFilter
|
||||
|
@ -149,6 +155,91 @@ const onSave = (data) => data.deletes && router.push(`/invoice-in/${invoiceId}/s
|
|||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #item="props">
|
||||
<div class="q-pa-xs col-xs-12 col-sm-6 grid-style-transition">
|
||||
<QCard bordered flat class="q-my-xs">
|
||||
<QCardSection>
|
||||
<QCheckbox v-model="props.selected" dense />
|
||||
</QCardSection>
|
||||
<QSeparator />
|
||||
<QList>
|
||||
<QItem>
|
||||
<QInput
|
||||
:label="t('Original invoice')"
|
||||
v-model="props.row['correctedFk']"
|
||||
readonly
|
||||
/>
|
||||
</QItem>
|
||||
<!-- <QItem>
|
||||
<QInput
|
||||
:label="t('Taxable base')"
|
||||
:class="{
|
||||
'no-pointer-events': isNotEuro(
|
||||
invoiceIn.currency.code
|
||||
),
|
||||
}"
|
||||
class="full-width"
|
||||
:disable="isNotEuro(invoiceIn.currency.code)"
|
||||
clear-icon="close"
|
||||
v-model="props.row.taxableBase"
|
||||
clearable
|
||||
>
|
||||
<template #append>
|
||||
<QIcon name="euro" size="xs" flat />
|
||||
</template>
|
||||
</QInput>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<VnSelectFilter
|
||||
:label="t('Sage iva')"
|
||||
class="full-width"
|
||||
v-model="props.row['taxTypeSageFk']"
|
||||
:options="sageTaxTypes"
|
||||
option-value="id"
|
||||
option-label="vat"
|
||||
:filter-options="['id', 'vat']"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{
|
||||
scope.opt.vat
|
||||
}}</QItemLabel>
|
||||
<QItemLabel>
|
||||
{{ `#${scope.opt.id}` }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelectFilter>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<VnSelectFilter
|
||||
class="full-width"
|
||||
v-model="props.row['transactionTypeSageFk']"
|
||||
:options="sageTransactionTypes"
|
||||
option-value="id"
|
||||
option-label="transaction"
|
||||
:filter-options="['id', 'transaction']"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{
|
||||
scope.opt.transaction
|
||||
}}</QItemLabel>
|
||||
<QItemLabel>
|
||||
{{ `#${scope.opt.id}` }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelectFilter>
|
||||
</QItem> -->
|
||||
</QList>
|
||||
</QCard>
|
||||
</div>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
</CrudModel>
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import VnSelectFilter from 'components/common/VnSelectFilter.vue';
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import { useFirstUpper } from 'src/composables/useFirstUpper';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
|
@ -36,32 +34,40 @@ const suppliersRef = ref();
|
|||
</div>
|
||||
</template>
|
||||
<template #body="{ params, searchFn }">
|
||||
<QList dense class="list q-gutter-y-sm q-mt-sm">
|
||||
<QList dense>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('Id or Supplier')"
|
||||
v-model="params.search"
|
||||
is-outlined
|
||||
>
|
||||
<QInput :label="t('Id or Supplier')" v-model="params.search">
|
||||
<template #prepend>
|
||||
<QIcon name="badge" size="sm"></QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
<QInput
|
||||
:label="t('params.supplierRef')"
|
||||
v-model="params.supplierRef"
|
||||
is-outlined
|
||||
@input.
|
||||
lazy-rules
|
||||
>
|
||||
<template #prepend>
|
||||
<QIcon name="vn:client" size="sm"></QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<QInput
|
||||
:label="useFirstUpper(t('params.correctives'))"
|
||||
v-model="params.correctedFk"
|
||||
>
|
||||
<template #prepend>
|
||||
<QIcon name="attachment" size="sm" />
|
||||
</template>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
|
@ -73,67 +79,52 @@ const suppliersRef = ref();
|
|||
option-value="id"
|
||||
option-label="nickname"
|
||||
@input-value="suppliersRef.fetch()"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
>
|
||||
</VnSelectFilter>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('params.fi')"
|
||||
v-model="params.fi"
|
||||
is-outlined
|
||||
lazy-rules
|
||||
>
|
||||
<QInput :label="t('params.fi')" v-model="params.fi" lazy-rules>
|
||||
<template #prepend>
|
||||
<QIcon name="badge" size="sm"></QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
<QInput
|
||||
:label="t('params.serialNumber')"
|
||||
v-model="params.serialNumber"
|
||||
is-outlined
|
||||
lazy-rules
|
||||
>
|
||||
<template #prepend>
|
||||
<QIcon name="badge" size="sm"></QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
<QInput
|
||||
:label="t('params.serial')"
|
||||
v-model="params.serial"
|
||||
is-outlined
|
||||
lazy-rules
|
||||
>
|
||||
<template #prepend>
|
||||
<QIcon name="badge" size="sm"></QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('Amount')"
|
||||
v-model="params.amount"
|
||||
is-outlined
|
||||
lazy-rules
|
||||
>
|
||||
<QInput :label="t('Amount')" v-model="params.amount" lazy-rules>
|
||||
<template #prepend>
|
||||
<QIcon name="euro" size="sm"></QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem class="q-mb-md">
|
||||
|
@ -149,57 +140,137 @@ const suppliersRef = ref();
|
|||
<QExpansionItem :label="t('More options')" expand-separator>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
<QInput
|
||||
:label="t('params.awb')"
|
||||
v-model="params.awbCode"
|
||||
is-outlined
|
||||
lazy-rules
|
||||
>
|
||||
<template #prepend>
|
||||
<QIcon name="badge" size="sm"></QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
<QInput
|
||||
:label="t('params.account')"
|
||||
v-model="params.account"
|
||||
is-outlined
|
||||
lazy-rules
|
||||
>
|
||||
<template #prepend>
|
||||
<QIcon name="person" size="sm" />
|
||||
</template>
|
||||
</VnInput>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('From')"
|
||||
v-model="params.from"
|
||||
is-outlined
|
||||
/>
|
||||
<QInput :label="t('From')" v-model="params.from" mask="date">
|
||||
<template #append>
|
||||
<QIcon name="event" class="cursor-pointer">
|
||||
<QPopupProxy
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<QDate v-model="params.from" landscape>
|
||||
<div
|
||||
class="row items-center justify-end q-gutter-sm"
|
||||
>
|
||||
<QBtn
|
||||
:label="t('globals.cancel')"
|
||||
color="primary"
|
||||
flat
|
||||
v-close-popup
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('globals.confirm')"
|
||||
color="primary"
|
||||
flat
|
||||
@click="save"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
</QDate>
|
||||
</QPopupProxy>
|
||||
</QIcon>
|
||||
</template>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('To')"
|
||||
v-model="params.to"
|
||||
is-outlined
|
||||
/>
|
||||
<QInput :label="t('To')" v-model="params.to" mask="date">
|
||||
<template #append>
|
||||
<QIcon name="event" class="cursor-pointer">
|
||||
<QPopupProxy
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<QDate v-model="params.to" landscape>
|
||||
<div
|
||||
class="row items-center justify-end q-gutter-sm"
|
||||
>
|
||||
<QBtn
|
||||
:label="t('globals.cancel')"
|
||||
color="primary"
|
||||
flat
|
||||
v-close-popup
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('globals.confirm')"
|
||||
color="primary"
|
||||
flat
|
||||
@click="save"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
</QDate>
|
||||
</QPopupProxy>
|
||||
</QIcon>
|
||||
</template>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
<QInput
|
||||
:label="t('Issued')"
|
||||
v-model="params.issued"
|
||||
is-outlined
|
||||
/>
|
||||
mask="date"
|
||||
>
|
||||
<template #append>
|
||||
<QIcon name="event" class="cursor-pointer">
|
||||
<QPopupProxy
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<QDate v-model="params.issued" landscape>
|
||||
<div
|
||||
class="row items-center justify-end q-gutter-sm"
|
||||
>
|
||||
<QBtn
|
||||
:label="t('globals.cancel')"
|
||||
color="primary"
|
||||
flat
|
||||
v-close-popup
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('globals.confirm')"
|
||||
color="primary"
|
||||
flat
|
||||
@click="save"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
</QDate>
|
||||
</QPopupProxy>
|
||||
</QIcon>
|
||||
</template>
|
||||
</QInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</QExpansionItem>
|
||||
|
@ -208,15 +279,6 @@ const suppliersRef = ref();
|
|||
</VnFilterPanel>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.list {
|
||||
width: 256px;
|
||||
}
|
||||
.list * {
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
|
@ -233,6 +295,7 @@ en:
|
|||
serial: Serial
|
||||
account: Account
|
||||
isBooked: is booked
|
||||
correctives: correctives
|
||||
es:
|
||||
params:
|
||||
search: Contiene
|
||||
|
@ -249,6 +312,7 @@ es:
|
|||
account: Cuenta
|
||||
created: Creada
|
||||
dued: Vencida
|
||||
correctives: rectificativas
|
||||
From: Desde
|
||||
To: Hasta
|
||||
Amount: Importe
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
path: '/invoice-in',
|
||||
|
|
Loading…
Reference in New Issue