merge with dev
This commit is contained in:
commit
3ba4e56204
|
@ -63,7 +63,7 @@ const toggleForm = () => {
|
||||||
<QIcon
|
<QIcon
|
||||||
@click.stop.prevent="toggleForm()"
|
@click.stop.prevent="toggleForm()"
|
||||||
name="add"
|
name="add"
|
||||||
size="19px"
|
size="xs"
|
||||||
class="add-icon"
|
class="add-icon"
|
||||||
/>
|
/>
|
||||||
<QDialog v-model="showForm" transition-show="scale" transition-hide="scale">
|
<QDialog v-model="showForm" transition-show="scale" transition-hide="scale">
|
||||||
|
|
|
@ -102,7 +102,7 @@ const value = computed({
|
||||||
name="close"
|
name="close"
|
||||||
@click.stop="value = null"
|
@click.stop="value = null"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
size="18px"
|
size="xs"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
|
<template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
|
||||||
|
|
|
@ -62,6 +62,7 @@ export default {
|
||||||
selectRows: 'Select all { numberRows } row(s)',
|
selectRows: 'Select all { numberRows } row(s)',
|
||||||
allRows: 'All { numberRows } row(s)',
|
allRows: 'All { numberRows } row(s)',
|
||||||
markAll: 'Mark all',
|
markAll: 'Mark all',
|
||||||
|
noResults: 'No results'
|
||||||
},
|
},
|
||||||
errors: {
|
errors: {
|
||||||
statusUnauthorized: 'Access denied',
|
statusUnauthorized: 'Access denied',
|
||||||
|
@ -115,7 +116,20 @@ export default {
|
||||||
defaulter: 'Defaulter',
|
defaulter: 'Defaulter',
|
||||||
createCustomer: 'Create customer',
|
createCustomer: 'Create customer',
|
||||||
summary: 'Summary',
|
summary: 'Summary',
|
||||||
basicData: 'Basic Data',
|
basicData: 'Basic data',
|
||||||
|
fiscalData: 'Fiscal data',
|
||||||
|
billingData: 'Billing data',
|
||||||
|
consignees: 'Consignees',
|
||||||
|
notes: 'Notes',
|
||||||
|
credits: 'Credits',
|
||||||
|
greuges: 'Greuges',
|
||||||
|
balance: 'Balance',
|
||||||
|
recoveries: 'Recoveries',
|
||||||
|
webAccess: 'Web access',
|
||||||
|
log: 'Log',
|
||||||
|
sms: 'Sms',
|
||||||
|
creditManagement: 'Credit management',
|
||||||
|
others: 'Others',
|
||||||
},
|
},
|
||||||
list: {
|
list: {
|
||||||
phone: 'Phone',
|
phone: 'Phone',
|
||||||
|
@ -605,6 +619,7 @@ export default {
|
||||||
basicData: 'Basic Data',
|
basicData: 'Basic Data',
|
||||||
catalog: 'Catalog',
|
catalog: 'Catalog',
|
||||||
volume: 'Volume',
|
volume: 'Volume',
|
||||||
|
lines: 'Lines',
|
||||||
},
|
},
|
||||||
field: {
|
field: {
|
||||||
salesPersonFk: 'Sales Person',
|
salesPersonFk: 'Sales Person',
|
||||||
|
|
|
@ -62,6 +62,7 @@ export default {
|
||||||
selectRows: 'Seleccionar las { numberRows } filas(s)',
|
selectRows: 'Seleccionar las { numberRows } filas(s)',
|
||||||
allRows: 'Todo { numberRows } filas(s)',
|
allRows: 'Todo { numberRows } filas(s)',
|
||||||
markAll: 'Marcar todo',
|
markAll: 'Marcar todo',
|
||||||
|
noResults: 'Sin resultados'
|
||||||
},
|
},
|
||||||
errors: {
|
errors: {
|
||||||
statusUnauthorized: 'Acceso denegado',
|
statusUnauthorized: 'Acceso denegado',
|
||||||
|
@ -114,8 +115,21 @@ export default {
|
||||||
notifications: 'Notificaciones',
|
notifications: 'Notificaciones',
|
||||||
defaulter: 'Morosos',
|
defaulter: 'Morosos',
|
||||||
createCustomer: 'Crear cliente',
|
createCustomer: 'Crear cliente',
|
||||||
basicData: 'Datos básicos',
|
|
||||||
summary: 'Resumen',
|
summary: 'Resumen',
|
||||||
|
basicData: 'Datos básicos',
|
||||||
|
fiscalData: 'Datos fiscales',
|
||||||
|
billingData: 'Forma de pago',
|
||||||
|
consignees: 'Consignatarios',
|
||||||
|
notes: 'Notas',
|
||||||
|
credits: 'Créditos',
|
||||||
|
greuges: 'Greuges',
|
||||||
|
balance: 'Balance',
|
||||||
|
recoveries: 'Recobros',
|
||||||
|
webAccess: 'Acceso web',
|
||||||
|
log: 'Historial',
|
||||||
|
sms: 'Sms',
|
||||||
|
creditManagement: 'Gestión de crédito',
|
||||||
|
others: 'Otros',
|
||||||
},
|
},
|
||||||
list: {
|
list: {
|
||||||
phone: 'Teléfono',
|
phone: 'Teléfono',
|
||||||
|
@ -513,6 +527,7 @@ export default {
|
||||||
basicData: 'Datos básicos',
|
basicData: 'Datos básicos',
|
||||||
catalog: 'Catálogo',
|
catalog: 'Catálogo',
|
||||||
volume: 'Volumen',
|
volume: 'Volumen',
|
||||||
|
lines: 'Líneas',
|
||||||
},
|
},
|
||||||
field: {
|
field: {
|
||||||
salesPersonFk: 'Comercial',
|
salesPersonFk: 'Comercial',
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Balance</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Billing data</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Consignees</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Credit management</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Credits</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Fiscal data</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Greuges</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Log</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Notes</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Others</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Recoveries</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Sms</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
<div class="flex justify-center">Web access</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,54 @@
|
||||||
|
<script setup>
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
import { toCurrency } from 'filters/index';
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
amount: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="card_balance">
|
||||||
|
<h6 class="title_balance">{{ t('Total') }}</h6>
|
||||||
|
<div class="row">
|
||||||
|
<p class="key_balance">{{ t('Balance due') }}: </p>
|
||||||
|
<b class="value_balance">
|
||||||
|
{{ toCurrency($props.amount) }}
|
||||||
|
</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.card_balance {
|
||||||
|
border: 1px solid black;
|
||||||
|
margin: 7px;
|
||||||
|
padding: 5px 7px;
|
||||||
|
}
|
||||||
|
.title_balance {
|
||||||
|
color: white;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.key_balance {
|
||||||
|
color: grey;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.value_balance {
|
||||||
|
color: white;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Total: Total
|
||||||
|
Balance due: Saldo vencido
|
||||||
|
</i18n>
|
|
@ -4,11 +4,12 @@ import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import { QBtn, QCheckbox } from 'quasar';
|
import { QBtn, QCheckbox } from 'quasar';
|
||||||
|
|
||||||
|
import { toCurrency, toDate } from 'filters/index';
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
import { toCurrency, toDate } from 'filters/index';
|
|
||||||
import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue';
|
import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue';
|
||||||
|
import CustomerBalanceDueTotal from './CustomerBalanceDueTotal.vue';
|
||||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
|
@ -16,6 +17,7 @@ const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
|
||||||
const arrayData = ref(null);
|
const arrayData = ref(null);
|
||||||
|
const balanceDueTotal = ref(0);
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
arrayData.value = useArrayData('CustomerDefaulter', {
|
arrayData.value = useArrayData('CustomerDefaulter', {
|
||||||
|
@ -23,6 +25,13 @@ onBeforeMount(async () => {
|
||||||
limit: 0,
|
limit: 0,
|
||||||
});
|
});
|
||||||
await arrayData.value.fetch({ append: false });
|
await arrayData.value.fetch({ append: false });
|
||||||
|
balanceDueTotal.value = arrayData.value.store.data.reduce(
|
||||||
|
(accumulator, currentValue) => {
|
||||||
|
return accumulator + (currentValue['amount'] || 0);
|
||||||
|
},
|
||||||
|
0
|
||||||
|
);
|
||||||
|
console.log(balanceDueTotal.value);
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -188,7 +197,9 @@ const selectAuthorId = (id) => {
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
|
|
||||||
<QToolbar class="bg-vn-dark">
|
<QToolbar class="bg-vn-dark">
|
||||||
<div id="st-data"></div>
|
<div id="st-data">
|
||||||
|
<CustomerBalanceDueTotal :amount="balanceDueTotal" />
|
||||||
|
</div>
|
||||||
<QSpace />
|
<QSpace />
|
||||||
<div id="st-actions"></div>
|
<div id="st-actions"></div>
|
||||||
</QToolbar>
|
</QToolbar>
|
||||||
|
@ -204,11 +215,6 @@ const selectAuthorId = (id) => {
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
<template #top>
|
|
||||||
<div v-if="rows" class="full-width flex justify-end">
|
|
||||||
{{ `${rows.length} ${t('route.cmr.list.results')}` }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #body-cell="props">
|
<template #body-cell="props">
|
||||||
<QTd :props="props">
|
<QTd :props="props">
|
||||||
<QTr :props="props" class="cursor-pointer">
|
<QTr :props="props" class="cursor-pointer">
|
||||||
|
|
|
@ -121,11 +121,6 @@ const selectCustomerId = (id) => {
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
<template #top>
|
|
||||||
<div v-if="rows" class="full-width flex justify-end">
|
|
||||||
{{ `${rows.length} ${t('route.cmr.list.results')}` }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #body-cell="props">
|
<template #body-cell="props">
|
||||||
<QTd :props="props">
|
<QTd :props="props">
|
||||||
<QTr :props="props" class="cursor-pointer">
|
<QTr :props="props" class="cursor-pointer">
|
||||||
|
|
|
@ -10,6 +10,7 @@ import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.v
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import OrderDescriptorMenu from 'pages/Order/Card/OrderDescriptorMenu.vue';
|
import OrderDescriptorMenu from 'pages/Order/Card/OrderDescriptorMenu.vue';
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
|
||||||
const DEFAULT_ITEMS = 0;
|
const DEFAULT_ITEMS = 0;
|
||||||
|
|
||||||
|
@ -66,9 +67,16 @@ const setData = (entity) => {
|
||||||
const getConfirmationValue = (isConfirmed) => {
|
const getConfirmationValue = (isConfirmed) => {
|
||||||
return t(isConfirmed ? 'order.summary.confirmed' : 'order.summary.notConfirmed');
|
return t(isConfirmed ? 'order.summary.confirmed' : 'order.summary.notConfirmed');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const total = ref(null);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<FetchData
|
||||||
|
:url="`Orders/${entityId}/getTotal`"
|
||||||
|
@on-fetch="(response) => (total = response)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
ref="descriptor"
|
ref="descriptor"
|
||||||
:url="`Orders/${entityId}`"
|
:url="`Orders/${entityId}`"
|
||||||
|
@ -102,7 +110,7 @@ const getConfirmationValue = (isConfirmed) => {
|
||||||
:label="t('order.summary.items')"
|
:label="t('order.summary.items')"
|
||||||
:value="(entity?.rows?.length || DEFAULT_ITEMS).toString()"
|
:value="(entity?.rows?.length || DEFAULT_ITEMS).toString()"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('order.summary.total')" :value="toCurrency(entity?.total)" />
|
<VnLv :label="t('order.summary.total')" :value="toCurrency(total)" />
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{ entity }">
|
<template #actions="{ entity }">
|
||||||
<QCardActions>
|
<QCardActions>
|
||||||
|
|
|
@ -64,6 +64,9 @@ const catalogParams = {
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<div class="catalog-list">
|
<div class="catalog-list">
|
||||||
|
<div v-if="rows && !rows?.length" class="no-result">
|
||||||
|
{{ t('globals.noResults') }}
|
||||||
|
</div>
|
||||||
<OrderCatalogItem v-for="row in rows" :key="row.id" :item="row" />
|
<OrderCatalogItem v-for="row in rows" :key="row.id" :item="row" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -72,7 +75,7 @@ const catalogParams = {
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.card-list {
|
.card-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -84,4 +87,11 @@ const catalogParams = {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-result {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--vn-label);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -0,0 +1,288 @@
|
||||||
|
<script setup>
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
import VnLv from 'components/ui/VnLv.vue';
|
||||||
|
import CardList from 'components/ui/CardList.vue';
|
||||||
|
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||||
|
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
|
|
||||||
|
import { toCurrency, toDate } from 'src/filters';
|
||||||
|
import { useSession } from 'composables/useSession';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const session = useSession();
|
||||||
|
const quasar = useQuasar();
|
||||||
|
const token = session.getToken();
|
||||||
|
const orderSummary = ref({
|
||||||
|
total: null,
|
||||||
|
vat: null,
|
||||||
|
});
|
||||||
|
const componentKey = ref(0);
|
||||||
|
|
||||||
|
const refresh = () => {
|
||||||
|
componentKey.value += 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
function confirmRemove(item) {
|
||||||
|
quasar.dialog({
|
||||||
|
component: VnConfirm,
|
||||||
|
componentProps: {
|
||||||
|
title: t('confirmDeletion'),
|
||||||
|
message: t('confirmDeletionMessage'),
|
||||||
|
promise: async () => remove(item),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function remove(item) {
|
||||||
|
await axios.post('OrderRows/removes', {
|
||||||
|
actualOrderId: route.params.id,
|
||||||
|
rows: [item.id],
|
||||||
|
});
|
||||||
|
quasar.notify({
|
||||||
|
message: t('globals.dataDeleted'),
|
||||||
|
type: 'positive',
|
||||||
|
});
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function confirmOrder() {
|
||||||
|
await axios.post(`Orders/${route.params.id}/confirm`);
|
||||||
|
quasar.notify({
|
||||||
|
message: t('globals.confirm'),
|
||||||
|
type: 'positive',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<FetchData
|
||||||
|
:key="componentKey"
|
||||||
|
:url="`Orders/${route.params.id}/getTotal`"
|
||||||
|
@on-fetch="(data) => (orderSummary.total = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
:key="componentKey"
|
||||||
|
:url="`Orders/${route.params.id}/getVAT`"
|
||||||
|
@on-fetch="(data) => (orderSummary.vat = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<QPage :key="componentKey" class="column items-center q-pa-md">
|
||||||
|
<div class="card-list">
|
||||||
|
<div v-if="!orderSummary.total" class="no-result">
|
||||||
|
{{ t('globals.noResults') }}
|
||||||
|
</div>
|
||||||
|
<QCard v-else class="order-lines-summary q-pa-lg">
|
||||||
|
<p class="header text-right block">
|
||||||
|
{{ t('summary') }}
|
||||||
|
</p>
|
||||||
|
<VnLv
|
||||||
|
v-if="orderSummary.vat && orderSummary.total"
|
||||||
|
:label="t('subtotal')"
|
||||||
|
:value="toCurrency(orderSummary.total - orderSummary.vat)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
v-if="orderSummary.vat"
|
||||||
|
:label="t('VAT')"
|
||||||
|
:value="toCurrency(orderSummary?.vat)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
v-if="orderSummary.total"
|
||||||
|
:label="t('total')"
|
||||||
|
:value="toCurrency(orderSummary?.total)"
|
||||||
|
/>
|
||||||
|
</QCard>
|
||||||
|
<VnPaginate
|
||||||
|
data-key="OrderLines"
|
||||||
|
url="OrderRows"
|
||||||
|
:limit="20"
|
||||||
|
auto-load
|
||||||
|
:filter="{
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'item',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'warehouse',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
where: { orderFk: route.params.id },
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template #body="{ rows }">
|
||||||
|
<div class="catalog-list q-mt-xl">
|
||||||
|
<CardList
|
||||||
|
v-for="row in rows"
|
||||||
|
:key="row.id"
|
||||||
|
:id="row.id"
|
||||||
|
:title="row?.item?.name"
|
||||||
|
class="cursor-inherit"
|
||||||
|
>
|
||||||
|
<template #title>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="image-wrapper q-mr-md">
|
||||||
|
<QImg
|
||||||
|
:src="`/api/Images/catalog/50x50/${row?.item?.id}/download?access_token=${token}`"
|
||||||
|
spinner-color="primary"
|
||||||
|
:ratio="1"
|
||||||
|
height="50"
|
||||||
|
width="50"
|
||||||
|
class="image"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="title text-primary text-weight-bold text-h5"
|
||||||
|
>
|
||||||
|
{{ row?.item?.name }}
|
||||||
|
</div>
|
||||||
|
<QChip class="q-chip-color" outline size="sm">
|
||||||
|
{{ t('ID') }}: {{ row.id }}
|
||||||
|
</QChip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #list-items>
|
||||||
|
<div class="q-mb-sm">
|
||||||
|
<span class="text-uppercase subname">
|
||||||
|
{{ row.item.subName }}
|
||||||
|
</span>
|
||||||
|
<fetched-tags :item="row.item" :max-length="5" />
|
||||||
|
</div>
|
||||||
|
<VnLv :label="t('item')" :value="String(row.item.id)" />
|
||||||
|
<VnLv
|
||||||
|
:label="t('warehouse')"
|
||||||
|
:value="row.warehouse.name"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('shipped')"
|
||||||
|
:value="toDate(row.shipped)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('quantity')"
|
||||||
|
:value="String(row.quantity)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('price')"
|
||||||
|
:value="toCurrency(row.price)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('amount')"
|
||||||
|
:value="toCurrency(row.price * row.quantity)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #actions>
|
||||||
|
<QBtn
|
||||||
|
:label="t('remove')"
|
||||||
|
@click.stop="confirmRemove(row)"
|
||||||
|
color="primary"
|
||||||
|
style="margin-top: 15px"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</CardList>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</VnPaginate>
|
||||||
|
</div>
|
||||||
|
<QPageSticky :offset="[20, 20]">
|
||||||
|
<QBtn fab icon="check" color="primary" @click="confirmOrder()" />
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('confirm') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QPageSticky>
|
||||||
|
</QPage>
|
||||||
|
</template>
|
||||||
|
<style lang="scss">
|
||||||
|
.order-lines-summary {
|
||||||
|
.vn-label-value {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 2%;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
color: var(--vn-label);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.card-list {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 60em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
color: $primary;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
font-size: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-wrapper {
|
||||||
|
height: 50px;
|
||||||
|
width: 50px;
|
||||||
|
|
||||||
|
.image {
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.subname {
|
||||||
|
color: var(--vn-label);
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-result {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--vn-label);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<i18n>
|
||||||
|
en:
|
||||||
|
summary: Summary
|
||||||
|
subtotal: Subtotal
|
||||||
|
VAT: VAT
|
||||||
|
total: Total
|
||||||
|
item: Item
|
||||||
|
warehouse: Warehouse
|
||||||
|
shipped: Shipped
|
||||||
|
quantity: Quantity
|
||||||
|
price: Price
|
||||||
|
amount: Amount
|
||||||
|
remove: Remove
|
||||||
|
confirmDeletion: Confirm deletion,
|
||||||
|
confirmDeletionMessage: Are you sure you want to delete this item?
|
||||||
|
confirm: Confirm
|
||||||
|
es:
|
||||||
|
summary: Resumen
|
||||||
|
subtotal: Subtotal
|
||||||
|
VAT: IVA
|
||||||
|
total: Total
|
||||||
|
item: Artículo
|
||||||
|
warehouse: Almacén
|
||||||
|
shipped: F. envío
|
||||||
|
quantity: Cantidad
|
||||||
|
price: Precio
|
||||||
|
amount: Importe
|
||||||
|
remove: Eliminar
|
||||||
|
confirmDeletion: Confirmar eliminación,
|
||||||
|
confirmDeletionMessage: Seguro que quieres eliminar este artículo?
|
||||||
|
confirm: Confirmar
|
||||||
|
</i18n>
|
|
@ -1,15 +1,17 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
import VnLv from 'components/ui/VnLv.vue';
|
||||||
import { ref } from 'vue';
|
|
||||||
import { dashIfEmpty } from 'src/filters';
|
|
||||||
import CardList from 'components/ui/CardList.vue';
|
import CardList from 'components/ui/CardList.vue';
|
||||||
import axios from 'axios';
|
|
||||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||||
|
|
||||||
|
import { dashIfEmpty } from 'src/filters';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const volumeSummary = ref(null);
|
const volumeSummary = ref(null);
|
||||||
|
@ -34,14 +36,17 @@ const loadVolumes = async (rows) => {
|
||||||
/>
|
/>
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center q-pa-md">
|
||||||
<div class="card-list">
|
<div class="card-list">
|
||||||
<QCard class="order-volume-summary q-pa-lg">
|
<div
|
||||||
|
v-if="!volumeSummary?.totalVolume && !volumeSummary?.totalBoxes"
|
||||||
|
class="no-result"
|
||||||
|
>
|
||||||
|
{{ t('globals.noResults') }}
|
||||||
|
</div>
|
||||||
|
<QCard v-else class="order-volume-summary q-pa-lg">
|
||||||
<p class="header text-right block">
|
<p class="header text-right block">
|
||||||
{{ t('summary') }}
|
{{ t('summary') }}
|
||||||
</p>
|
</p>
|
||||||
<VnLv
|
<VnLv :label="t('total')" :value="`${volumeSummary?.totalVolume} m³`" />
|
||||||
:label="t('total')"
|
|
||||||
:value="`${volumeSummary?.totalVolume} m³`"
|
|
||||||
/>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('boxes')"
|
:label="t('boxes')"
|
||||||
:value="`${dashIfEmpty(volumeSummary?.totalBoxes)} U`"
|
:value="`${dashIfEmpty(volumeSummary?.totalBoxes)} U`"
|
||||||
|
@ -128,6 +133,13 @@ const loadVolumes = async (rows) => {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-result {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--vn-label);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
|
|
|
@ -150,7 +150,7 @@ function downloadPdfs() {
|
||||||
<QIcon
|
<QIcon
|
||||||
name="visibility"
|
name="visibility"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="2em"
|
size="md"
|
||||||
class="q-mr-sm q-ml-sm"
|
class="q-mr-sm q-ml-sm"
|
||||||
/>
|
/>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
|
|
|
@ -53,7 +53,7 @@ const isAdministrative = computed(() => {
|
||||||
>
|
>
|
||||||
<template #header-left>
|
<template #header-left>
|
||||||
<a v-if="isAdministrative" class="header link" :href="supplierUrl">
|
<a v-if="isAdministrative" class="header link" :href="supplierUrl">
|
||||||
<QIcon name="open_in_new" color="white" size="25px" />
|
<QIcon name="open_in_new" color="white" size="sm" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<template #header>
|
<template #header>
|
||||||
|
|
|
@ -195,7 +195,7 @@ const openEntryDescriptor = () => {};
|
||||||
>
|
>
|
||||||
<template #header-left>
|
<template #header-left>
|
||||||
<a class="header link" :href="travelUrl">
|
<a class="header link" :href="travelUrl">
|
||||||
<QIcon name="open_in_new" color="white" size="25px" />
|
<QIcon name="open_in_new" color="white" size="sm" />
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<template #header>
|
<template #header>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
|
|
@ -309,8 +309,8 @@ function exceedMaxHeight(pos) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-mb-sm wheels">
|
<div class="q-mb-sm wheels">
|
||||||
<QIcon color="grey-6" name="trip_origin" size="3rem" />
|
<QIcon color="grey-6" name="trip_origin" size="xl" />
|
||||||
<QIcon color="grey-6" name="trip_origin" size="3rem" />
|
<QIcon color="grey-6" name="trip_origin" size="xl" />
|
||||||
</div>
|
</div>
|
||||||
<QDialog
|
<QDialog
|
||||||
v-model="colorPickerActive"
|
v-model="colorPickerActive"
|
||||||
|
|
|
@ -17,7 +17,22 @@ export default {
|
||||||
'CustomerNotifications',
|
'CustomerNotifications',
|
||||||
'CustomerDefaulter',
|
'CustomerDefaulter',
|
||||||
],
|
],
|
||||||
card: ['CustomerBasicData'],
|
card: [
|
||||||
|
'CustomerBasicData',
|
||||||
|
'CustomerFiscalData',
|
||||||
|
'CustomerBillingData',
|
||||||
|
'CustomerConsignees',
|
||||||
|
'CustomerNotes',
|
||||||
|
'CustomerCredits',
|
||||||
|
'CustomerGreuges',
|
||||||
|
'CustomerBalance',
|
||||||
|
'CustomerRecoveries',
|
||||||
|
'CustomerWebAccess',
|
||||||
|
'CustomerLog',
|
||||||
|
'CustomerSms',
|
||||||
|
'CustomerCreditManagement',
|
||||||
|
'CustomerOthers',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
@ -115,6 +130,132 @@ export default {
|
||||||
component: () =>
|
component: () =>
|
||||||
import('src/pages/Customer/Card/CustomerBasicData.vue'),
|
import('src/pages/Customer/Card/CustomerBasicData.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'fiscal-data',
|
||||||
|
name: 'CustomerFiscalData',
|
||||||
|
meta: {
|
||||||
|
title: 'fiscalData',
|
||||||
|
icon: 'vn:dfiscales',
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Customer/Card/CustomerFiscalData.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'billing-data',
|
||||||
|
name: 'CustomerBillingData',
|
||||||
|
meta: {
|
||||||
|
title: 'billingData',
|
||||||
|
icon: 'vn:payment',
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Customer/Card/CustomerBillingData.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'consignees',
|
||||||
|
name: 'CustomerConsignees',
|
||||||
|
meta: {
|
||||||
|
title: 'consignees',
|
||||||
|
icon: 'vn:delivery',
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Customer/Card/CustomerConsignees.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'notes',
|
||||||
|
name: 'CustomerNotes',
|
||||||
|
meta: {
|
||||||
|
title: 'notes',
|
||||||
|
icon: 'vn:notes',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Customer/Card/CustomerNotes.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'credits',
|
||||||
|
name: 'CustomerCredits',
|
||||||
|
meta: {
|
||||||
|
title: 'credits',
|
||||||
|
icon: 'vn:credit',
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Customer/Card/CustomerCredits.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'greuges',
|
||||||
|
name: 'CustomerGreuges',
|
||||||
|
meta: {
|
||||||
|
title: 'greuges',
|
||||||
|
icon: 'vn:greuge',
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Customer/Card/CustomerGreuges.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'balance',
|
||||||
|
name: 'CustomerBalance',
|
||||||
|
meta: {
|
||||||
|
title: 'balance',
|
||||||
|
icon: 'vn:invoice',
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Customer/Card/CustomerBalance.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'recoveries',
|
||||||
|
name: 'CustomerRecoveries',
|
||||||
|
meta: {
|
||||||
|
title: 'recoveries',
|
||||||
|
icon: 'vn:recovery',
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Customer/Card/CustomerRecoveries.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'web-access',
|
||||||
|
name: 'CustomerWebAccess',
|
||||||
|
meta: {
|
||||||
|
title: 'webAccess',
|
||||||
|
icon: 'vn:web',
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Customer/Card/CustomerWebAccess.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'log',
|
||||||
|
name: 'CustomerLog',
|
||||||
|
meta: {
|
||||||
|
title: 'log',
|
||||||
|
icon: 'vn:History',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Customer/Card/CustomerLog.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'sms',
|
||||||
|
name: 'CustomerSms',
|
||||||
|
meta: {
|
||||||
|
title: 'sms',
|
||||||
|
icon: 'sms',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Customer/Card/CustomerSms.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'credit-management',
|
||||||
|
name: 'CustomerCreditManagement',
|
||||||
|
meta: {
|
||||||
|
title: 'creditManagement',
|
||||||
|
icon: 'paid',
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import('src/pages/Customer/Card/CustomerCreditManagement.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'others',
|
||||||
|
name: 'CustomerOthers',
|
||||||
|
meta: {
|
||||||
|
title: 'others',
|
||||||
|
icon: 'pending',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Customer/Card/CustomerOthers.vue'),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default {
|
||||||
redirect: { name: 'OrderMain' },
|
redirect: { name: 'OrderMain' },
|
||||||
menus: {
|
menus: {
|
||||||
main: ['OrderList'],
|
main: ['OrderList'],
|
||||||
card: ['OrderBasicData', 'OrderCatalog', 'OrderVolume'],
|
card: ['OrderBasicData', 'OrderCatalog', 'OrderVolume', 'OrderLines'],
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
@ -81,6 +81,15 @@ export default {
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Order/OrderVolume.vue'),
|
component: () => import('src/pages/Order/OrderVolume.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'OrderLines',
|
||||||
|
path: 'line',
|
||||||
|
meta: {
|
||||||
|
title: 'lines',
|
||||||
|
icon: 'vn:lines',
|
||||||
|
},
|
||||||
|
component: () => import('src/pages/Order/OrderLines.vue'),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue