From ad950f33c68fb6e18c65a974e482e80c771f3089 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 26 Jun 2024 08:27:36 -0300 Subject: [PATCH 01/17] WIP --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Ticket/Card/TicketExpedition.vue | 244 +++++++++++++++++++++ src/pages/Ticket/locale/en.yml | 10 + src/pages/Ticket/locale/es.yml | 10 + src/router/modules/ticket.js | 25 ++- 6 files changed, 286 insertions(+), 5 deletions(-) create mode 100644 src/pages/Ticket/Card/TicketExpedition.vue diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index d121dfb66..849f00c88 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -446,6 +446,7 @@ ticket: sale: Sale ticketAdvance: Advance tickets futureTickets: Future tickets + expedition: Expedition list: nickname: Nickname state: State diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 3654f4a72..6c722e43d 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -445,6 +445,7 @@ ticket: sale: Lineas del pedido ticketAdvance: Adelantar tickets futureTickets: Tickets a futuro + expedition: Expedición list: nickname: Alias state: Estado diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue new file mode 100644 index 000000000..280e82b8a --- /dev/null +++ b/src/pages/Ticket/Card/TicketExpedition.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml index a89671a0c..04822df3e 100644 --- a/src/pages/Ticket/locale/en.yml +++ b/src/pages/Ticket/locale/en.yml @@ -80,3 +80,13 @@ futureTickets: moveTicketSuccess: Tickets moved successfully! searchInfo: Search future tickets by date futureTicket: Future tickets +expedition: + id: Expedition + item: Item + name: Name + packageType: Package type + counter: Counter + externalId: externalId + created: Created + state: State + historyAction: Status log diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml index ce52e18ba..7cbbd02bd 100644 --- a/src/pages/Ticket/locale/es.yml +++ b/src/pages/Ticket/locale/es.yml @@ -79,6 +79,16 @@ ticketSale: shipped: F. Envío agency: Agencia address: Consignatario +expedition: + id: Expedición + item: Artículo + name: Nombre + packageType: Package type + counter: Contador + externalId: externalId + created: Fecha creación + state: Estado + historyAction: Historial de estados card: search: Buscar tickets searchInfo: Buscar tickets por identificador o alias diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index 9c105be32..878396604 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -12,7 +12,13 @@ export default { redirect: { name: 'TicketMain' }, menus: { main: ['TicketList', 'TicketAdvance', 'TicketFuture'], - card: ['TicketBoxing', 'TicketSms', 'TicketSale', 'TicketLog'], + card: [ + 'TicketBoxing', + 'TicketSms', + 'TicketSale', + 'TicketLog', + 'TicketExpedition', + ], }, children: [ { @@ -94,13 +100,13 @@ export default { component: () => import('src/pages/Ticket/Card/TicketSale.vue'), }, { - path: 'boxing', - name: 'TicketBoxing', + path: 'expedition', + name: 'TicketExpedition', meta: { - title: 'boxing', + title: 'expedition', icon: 'vn:package', }, - component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'), + component: () => import('src/pages/Ticket/Card/TicketExpedition.vue'), }, { path: 'sms', @@ -120,6 +126,15 @@ export default { }, component: () => import('src/pages/Ticket/Card/TicketLog.vue'), }, + { + path: 'boxing', + name: 'TicketBoxing', + meta: { + title: 'boxing', + icon: 'vn:science', + }, + component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'), + }, ], }, ], From 053059997adb9ab687d9c55dc523fea5ae5912b8 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Thu, 27 Jun 2024 08:37:48 -0300 Subject: [PATCH 02/17] WIP --- src/pages/Ticket/Card/ExpeditionNewTicket.vue | 78 +++++ src/pages/Ticket/Card/TicketExpedition.vue | 284 +++++++++++++++--- src/pages/Ticket/locale/en.yml | 8 + src/pages/Ticket/locale/es.yml | 8 + 4 files changed, 344 insertions(+), 34 deletions(-) create mode 100644 src/pages/Ticket/Card/ExpeditionNewTicket.vue diff --git a/src/pages/Ticket/Card/ExpeditionNewTicket.vue b/src/pages/Ticket/Card/ExpeditionNewTicket.vue new file mode 100644 index 000000000..da775a368 --- /dev/null +++ b/src/pages/Ticket/Card/ExpeditionNewTicket.vue @@ -0,0 +1,78 @@ + + + diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue index 280e82b8a..002dc9b22 100644 --- a/src/pages/Ticket/Card/TicketExpedition.vue +++ b/src/pages/Ticket/Card/TicketExpedition.vue @@ -1,16 +1,17 @@ + + diff --git a/src/pages/Ticket/Card/TicketDescriptor.vue b/src/pages/Ticket/Card/TicketDescriptor.vue index 5fb312b28..100e24058 100644 --- a/src/pages/Ticket/Card/TicketDescriptor.vue +++ b/src/pages/Ticket/Card/TicketDescriptor.vue @@ -66,6 +66,23 @@ const filter = { fields: ['id', 'name'], }, }, + { + relation: 'zone', + scope: { + fields: [ + 'agencyModeFk', + 'bonus', + 'hour', + 'id', + 'isVolumetric', + 'itemMaxSize', + 'm3Max', + 'name', + 'price', + 'travelingDays', + ], + }, + }, ], }; diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml index 39aed4af7..90a3e67b7 100644 --- a/src/pages/Ticket/locale/en.yml +++ b/src/pages/Ticket/locale/en.yml @@ -159,6 +159,24 @@ service: addService: Add service quantityInfo: To create services with negative amounts mark the service on the source ticket and press the pay button. createRefundSuccess: 'The following refund ticket have been created: { ticketId }' +components: + item: Item + description: Description + quantity: Quantity + serie: Serie + components: Components + import: Import + total: Total + baseToCommission: Base to commission + totalWithoutVat: Total without VAT + zoneBreakdown: Zone breakdown + price: Price + bonus: Bonus + zone: Zone + volume: Volume + theoricalCost: Theorical cost + totalPrice: Total price + packages: Packages tracking: state: State worker: Worker diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml index d5b50efc5..370d3433d 100644 --- a/src/pages/Ticket/locale/es.yml +++ b/src/pages/Ticket/locale/es.yml @@ -164,5 +164,23 @@ ticketSale: shipped: F. Envío agency: Agencia address: Consignatario +components: + item: Artículo + description: Descripción + quantity: Cantidad + serie: Serie + components: Componentes + import: Importe + total: Total + baseToCommission: Base comisionable + totalWithoutVat: Total sin IVA + zoneBreakdown: Desglose zona + price: Precio + bonus: Bonificación + zone: Zona + volume: Volúmen + theoricalCost: Porte teórico + totalPrice: Precio total + packages: Bultos Search ticket: Buscar tickets You can search by ticket id or alias: Puedes buscar por id o alias del ticket diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index 1e635470b..1a9a7d557 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -23,6 +23,7 @@ export default { 'TicketTracking', 'TicketVolume', 'TicketNotes', + 'TicketComponents', ], }, children: [ @@ -179,6 +180,15 @@ export default { }, component: () => import('src/pages/Ticket/Card/TicketVolume.vue'), }, + { + path: 'components', + name: 'TicketComponents', + meta: { + title: 'components', + icon: 'vn:components', + }, + component: () => import('src/pages/Ticket/Card/TicketComponents.vue'), + }, { path: 'observation', name: 'TicketNotes', From 91eb966586d318d4bfabe5c7a51dda2f2b3fef07 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 3 Jul 2024 14:44:36 -0300 Subject: [PATCH 09/17] Ticket photos --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Order/Card/OrderCatalogItem.vue | 13 +++-- src/pages/Order/OrderCatalog.vue | 7 ++- src/pages/Ticket/Card/TicketPicture.vue | 60 +++++++++++++++++++++++ src/router/modules/ticket.js | 10 ++++ 6 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 src/pages/Ticket/Card/TicketPicture.vue diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 75b07801a..3a1d619c0 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -554,6 +554,7 @@ ticket: weeklyTickets: Weekly tickets services: Service tracking: Tracking + pictures: Pictures list: nickname: Nickname state: State diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 452e387c9..42b887c21 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -552,6 +552,7 @@ ticket: weeklyTickets: Tickets programados services: Servicios tracking: Estados + pictures: Fotos list: nickname: Alias state: Estado diff --git a/src/pages/Order/Card/OrderCatalogItem.vue b/src/pages/Order/Card/OrderCatalogItem.vue index 8fa0bb5b9..2b4724e35 100644 --- a/src/pages/Order/Card/OrderCatalogItem.vue +++ b/src/pages/Order/Card/OrderCatalogItem.vue @@ -7,7 +7,7 @@ import VnImg from 'src/components/ui/VnImg.vue'; import OrderCatalogItemDialog from 'pages/Order/Card/OrderCatalogItemDialog.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; -import toCurrency from '../../../filters/toCurrency'; +import { toCurrency } from 'filters/index'; const DEFAULT_PRICE_KG = 0; @@ -18,6 +18,10 @@ defineProps({ type: Object, required: true, }, + isCatalog: { + type: Boolean, + default: false, + }, }); const dialog = ref(null); @@ -28,7 +32,7 @@ const dialog = ref(null);
-
+
diff --git a/src/pages/Ticket/Card/TicketPicture.vue b/src/pages/Ticket/Card/TicketPicture.vue new file mode 100644 index 000000000..e319ef963 --- /dev/null +++ b/src/pages/Ticket/Card/TicketPicture.vue @@ -0,0 +1,60 @@ + + + + + + + +es: + by: por + diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index 1e635470b..db61cd405 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -23,6 +23,7 @@ export default { 'TicketTracking', 'TicketVolume', 'TicketNotes', + 'TicketPicture', ], }, children: [ @@ -142,6 +143,15 @@ export default { }, component: () => import('src/pages/Ticket/Card/TicketLog.vue'), }, + { + path: 'picture', + name: 'TicketPicture', + meta: { + title: 'pictures', + icon: 'vn:photo', + }, + component: () => import('src/pages/Ticket/Card/TicketPicture.vue'), + }, { path: 'boxing', name: 'TicketBoxing', From 02ce4f2658d586e98a265c43cc9e0cfdbbc6f8da Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 3 Jul 2024 15:12:20 -0300 Subject: [PATCH 10/17] Small change --- src/pages/Ticket/Card/TicketComponents.vue | 13 ++++++++----- src/pages/Ticket/Card/TicketService.vue | 1 - 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/pages/Ticket/Card/TicketComponents.vue b/src/pages/Ticket/Card/TicketComponents.vue index 85d2179a2..5aeb6b0a5 100644 --- a/src/pages/Ticket/Card/TicketComponents.vue +++ b/src/pages/Ticket/Card/TicketComponents.vue @@ -37,7 +37,8 @@ watch( getTheoricalCost(); if (ticketData.value?.zone && ticketData.value?.zone?.isVolumetric) getTicketVolume(); - } + }, + { immediate: true } ); const salesFilter = computed(() => ({ @@ -134,7 +135,6 @@ const getComponentsSum = async () => { try { const { data } = await axios.get(`Tickets/${route.params.id}/getComponentsSum`); componentsList.value = data; - console.log('componentsList', componentsList.value); } catch (error) { console.error(error); } @@ -153,7 +153,6 @@ const getTicketVolume = async () => { try { if (!ticketData.value) return; const { data } = await axios.get(`Tickets/${ticketData.value.id}/getVolume`); - console.log('data volume: ', data); ticketVolume.value = data[0].volume; } catch (error) { console.error(error); @@ -218,8 +217,12 @@ onUnmounted(() => (stateStore.rightDrawer = false)); class="justify-center" horizontal > - {{ component.name }}: - {{ toCurrency(component.value, 'EUR', 3) }} + + {{ component.name }}: + + {{ + toCurrency(component.value, 'EUR', 3) + }} { params: { filter: JSON.stringify(filter) }, }); defaultTaxClass.value = data; - console.log('defaultTaxClass', defaultTaxClass.value); } catch (error) { console.error(error); } From 8baf5b14890741a5a1ec5e8b89292f499e35f237 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 3 Jul 2024 16:14:47 -0300 Subject: [PATCH 11/17] Apply right alignment to total and import columns --- src/pages/Ticket/Card/TicketComponents.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Ticket/Card/TicketComponents.vue b/src/pages/Ticket/Card/TicketComponents.vue index 5aeb6b0a5..b99da3f9b 100644 --- a/src/pages/Ticket/Card/TicketComponents.vue +++ b/src/pages/Ticket/Card/TicketComponents.vue @@ -339,7 +339,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));