From e51f3fad0f564ce2454c4f2bc7165f95d63f73eb Mon Sep 17 00:00:00 2001 From: Juan Felipe Zapata Moreno Date: Thu, 19 Feb 2026 21:45:23 -0600 Subject: [PATCH] =?UTF-8?q?feat:=20actualizar=20nombres=20de=20columnas=20?= =?UTF-8?q?y=20mejorar=20gesti=C3=B3n=20de=20seriales=20en=20componentes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/POS/Bundles/Index.vue | 2 +- src/pages/POS/Movements/Edit.vue | 24 ++++++++++++--- src/pages/POS/Movements/ExitModal.vue | 9 ++---- src/pages/POS/Movements/KardexModal.vue | 2 +- src/services/ticketService.js | 40 ++++++++++++++++++++----- 5 files changed, 57 insertions(+), 20 deletions(-) diff --git a/src/pages/POS/Bundles/Index.vue b/src/pages/POS/Bundles/Index.vue index 73de89e..aedc4bc 100644 --- a/src/pages/POS/Bundles/Index.vue +++ b/src/pages/POS/Bundles/Index.vue @@ -94,7 +94,7 @@ onMounted(() => { NOMBRE SKU COMPONENTES - STOCK + PAQ. ESTIMADO PRECIO ACCIONES diff --git a/src/pages/POS/Movements/Edit.vue b/src/pages/POS/Movements/Edit.vue index e645e1b..6faffe4 100644 --- a/src/pages/POS/Movements/Edit.vue +++ b/src/pages/POS/Movements/Edit.vue @@ -88,6 +88,11 @@ const serialsArray = computed(() => { .filter(s => s.length > 0); }); +// Si tiene seriales y no permite decimales, la cantidad se controla por seriales +const quantityLockedBySerials = computed(() => { + return hasSerials.value && !allowsDecimals.value; +}); + const serialsValidation = computed(() => { if (!hasSerials.value) return { valid: true, message: '' }; @@ -114,6 +119,13 @@ const serialsValidation = computed(() => { return { valid: true, message: '' }; }); +// Actualizar cantidad automáticamente cuando cambian los seriales +const updateQuantityFromSerials = () => { + if (!quantityLockedBySerials.value) return; + const count = serialsArray.value.length; + form.quantity = count > 0 ? count : 1; +}; + /** Métodos */ const loadWarehouses = () => { loading.value = true; @@ -305,11 +317,15 @@ watch(() => props.show, (isShown) => { +

+ Controlado por seriales +

@@ -321,7 +337,7 @@ watch(() => props.show, (isShown) => { NÚMEROS DE SERIE - +
diff --git a/src/pages/POS/Movements/ExitModal.vue b/src/pages/POS/Movements/ExitModal.vue index d0a4e35..0d5f87d 100644 --- a/src/pages/POS/Movements/ExitModal.vue +++ b/src/pages/POS/Movements/ExitModal.vue @@ -479,18 +479,15 @@ watch(() => form.warehouse_id, (newWarehouseId, oldWarehouseId) => {

Controlado por seriales

-

- Permite hasta 3 decimales (ej: 25.750 {{ item.unit_of_measure?.abbreviation }}) -

diff --git a/src/pages/POS/Movements/KardexModal.vue b/src/pages/POS/Movements/KardexModal.vue index 81252ac..7451aab 100644 --- a/src/pages/POS/Movements/KardexModal.vue +++ b/src/pages/POS/Movements/KardexModal.vue @@ -144,7 +144,7 @@ watch(() => props.show, (val) => {
-

Exportar Kardex

+

Exportar reporte