diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 3c1a12f24..77ab2692d 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -1,5 +1,6 @@ + + + (ticketUpdateActions = data)" + auto-load + /> + + + + + + {{ t('basicData.total') }} + + + + + {{ t('basicData.price') }}: + {{ toCurrency(totalPrice) }} + + + + + {{ t('basicData.newPrice') }}: {{ toCurrency(totalNewPrice) }} + + + + + {{ t('basicData.difference') }}: {{ toCurrency(totalDifference) }} + + + + + + + {{ t('basicData.chargeDifference') }} + + + + + + + + + + + + {{ t('basicData.withoutNegativesInfo') }} + + + + + + + + + + + {{ row.itemFk }} + + + + + + + + {{ row.item.name }} + {{ row.item.subName }} + + + + + + + + + + + diff --git a/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue b/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue new file mode 100644 index 000000000..c8a8e85c9 --- /dev/null +++ b/src/pages/Ticket/Card/BasicData/TicketBasicDataForm.vue @@ -0,0 +1,468 @@ + + + (clientsOptions = data)" + auto-load + /> + (warehousesOptions = data)" + auto-load + /> + (companiesOptions = data)" + auto-load + /> + (agenciesOptions = data)" + auto-load + /> + (zonesOptions = data)" + auto-load + /> + + + + + + + #{{ scope.opt?.id }} {{ scope.opt?.name }} + + + + + + + + + + + + + {{ + `${ + !scope.opt?.isActive + ? t('basicData.inactive') + : '' + } ` + }} + {{ scope.opt?.nickname }} + , {{ scope.opt?.street }}, {{ scope.opt?.city }}, + {{ scope.opt?.province?.name }} - + {{ scope.opt?.agencyMode?.name }} + + + + + + + {{ t('basicData.editAddress') }} + + + + + + + + + + + + + {{ scope.opt?.name }} - Max. + {{ toTimeFormat(scope.opt?.hour) }} + h. + + + + + + + + + + + + diff --git a/src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue b/src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue new file mode 100644 index 000000000..af47761a2 --- /dev/null +++ b/src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue @@ -0,0 +1,195 @@ + + + + + (formData = $event)" + :form-data="formData" + /> + + + (formData = $event)" + /> + + + + + + + + + diff --git a/src/pages/Ticket/Card/TicketBasicData.vue b/src/pages/Ticket/Card/TicketBasicData.vue deleted file mode 100644 index 0c9a8b042..000000000 --- a/src/pages/Ticket/Card/TicketBasicData.vue +++ /dev/null @@ -1,3 +0,0 @@ - - Basic Data - diff --git a/src/pages/Ticket/Card/TicketCard.vue b/src/pages/Ticket/Card/TicketCard.vue index 0a0912703..689a717e6 100644 --- a/src/pages/Ticket/Card/TicketCard.vue +++ b/src/pages/Ticket/Card/TicketCard.vue @@ -14,6 +14,7 @@ const routeName = computed(() => route.name); const searchBarDataKeys = { TicketSummary: 'TicketSummary', TicketSale: 'TicketSale', + TicketPurchaseRequest: 'TicketPurchaseRequest', }; diff --git a/src/pages/Ticket/Card/TicketCreateRequest.vue b/src/pages/Ticket/Card/TicketCreateRequest.vue new file mode 100644 index 000000000..6b436621f --- /dev/null +++ b/src/pages/Ticket/Card/TicketCreateRequest.vue @@ -0,0 +1,69 @@ + + + (attendersOptions = data)" + /> + emit('onRequestCreated')" + > + + + + + + + + + + + + + + + es: + Create request: Crear petición de compra + diff --git a/src/pages/Ticket/Card/TicketPurchaseRequest.vue b/src/pages/Ticket/Card/TicketPurchaseRequest.vue new file mode 100644 index 000000000..281dc46a1 --- /dev/null +++ b/src/pages/Ticket/Card/TicketPurchaseRequest.vue @@ -0,0 +1,267 @@ + + + + + + + redirectToTicketSummary(row.ticketFk)" + > + + + + + + + + + {{ row.requester?.user?.nickname }} + + + + + + + + {{ row.atender?.user?.nickname }} + + + + + + + + + + + + + + + + + + {{ row.sale.itemFk }} + + + + + + + + + {{ t('globals.delete') }} + + + + + + + + + + + + + + {{ t('purchaseRequest.newRequest') }} + + + + + + es: + New: Nueva + Denied: Denegada + Accepted: Aceptada + diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml index 63fed58bc..2c648e7f2 100644 --- a/src/pages/Ticket/locale/en.yml +++ b/src/pages/Ticket/locale/en.yml @@ -22,9 +22,6 @@ ticketSale: shipped: Shipped agency: Agency address: Address -card: - search: Search tickets - searchInfo: You can search by ticket id or alias advanceTickets: origin: Origin destination: Destination @@ -80,6 +77,56 @@ futureTickets: moveTicketSuccess: Tickets moved successfully! searchInfo: Search future tickets by date futureTicket: Future tickets +basicData: + next: Next + back: Back + finalize: Finalize + client: Client + warehouse: Warehouse + address: Address + inactive: (Inactive) + noDeliveryZoneAvailable: No delivery zone available for this landing date + editAddress: Edit address + alias: Alias + company: Company + agency: Agency + zone: Zone + shipped: Shipped + landed: Landed + shippedHour: Shipped hour + priceDifference: Price difference + someFieldsAreInvalid: Some fields are invalid + item: Item + description: Description + movable: Movable + quantity: Quantity + pricePPU: Price (PPU) + newPricePPU: New (PPU) + difference: Difference + total: Total + price: Price + newPrice: New price + chargeDifference: Charge difference to + withoutNegatives: Create without negatives + withoutNegativesInfo: Clone this ticket with the changes and only sales availables + negativesConfirmTitle: Edit basic data + negativesConfirmMessage: Negatives are going to be generated, are you sure you want to advance all the lines? + chooseAnOption: Choose an option + unroutedTicket: The ticket has been unrouted +card: + search: Search tickets + searchInfo: You can search by ticket id or alias +purchaseRequest: + id: Id + description: Description + created: Created + requester: Requester + atender: Atender + quantity: Quantity + price: Price + saleFk: Item id + state: State + newRequest: New request weeklyTickets: id: Ticket ID client: Client diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml index be3d89f9d..3ce4c0545 100644 --- a/src/pages/Ticket/locale/es.yml +++ b/src/pages/Ticket/locale/es.yml @@ -1,3 +1,53 @@ +card: + search: Buscar tickets + searchInfo: Buscar tickets por identificador o alias +purchaseRequest: + Id: Id + description: Descripción + created: Fecha creación + requester: Solicitante + atender: Comprador + quantity: Cantidad + price: Precio + saleFk: Id artículo + state: Estado + newRequest: Crear petición +basicData: + next: Siguiente + back: Anterior + finalize: Finalizar + client: Cliente + warehouse: Almacén + address: Consignatario + inactive: (Inactivo) + noDeliveryZoneAvailable: No hay una zona de reparto disponible para la fecha de envío seleccionada + editAddress: Editar dirección + alias: Alias + company: Empresa + agency: Agencia + zone: Zona + shipped: F. Envío + landed: F. Entrega + shippedHour: Hora de envío + priceDifference: Diferencia de precio + someFieldsAreInvalid: Algunos campos no son válidos + item: Artículo + description: Descripción + movable: Movible + quantity: Cantidad + pricePPU: Precio (Ud.) + newPricePPU: Nuevo (Ud.) + difference: Diferencia + total: Total + price: Precio + newPrice: Nuevo precio + chargeDifference: Cargar diferencia a + withoutNegatives: Crear sin negativos + withoutNegativesInfo: Clonar este ticket con los cambios y solo ventas disponibles + negativesConfirmTitle: Editar datos básicos + negativesConfirmMessage: Se van a generar negativos, ¿seguro que quieres adelantar todas las líneas? + chooseAnOption: Elige una opción + unroutedTicket: El ticket ha sido desenrutado weeklyTickets: id: ID Ticket client: Cliente @@ -88,6 +138,3 @@ ticketSale: shipped: F. Envío agency: Agencia address: Consignatario -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 76a77f08b..81ca405ee 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -11,8 +11,15 @@ export default { component: RouterView, redirect: { name: 'TicketMain' }, menus: { - main: ['TicketList', 'TicketWeekly', 'TicketAdvance', 'TicketFuture'], - card: ['TicketBoxing', 'TicketSms', 'TicketSale', 'TicketLog'], + main: ['TicketList', 'TicketAdvance', 'TicketWeekly', 'TicketFuture'], + card: [ + 'TicketBasicData', + 'TicketBoxing', + 'TicketSms', + 'TicketSale', + 'TicketLog', + 'TicketPurchaseRequest', + ], }, children: [ { @@ -41,13 +48,13 @@ export default { component: () => import('src/pages/Ticket/TicketCreate.vue'), }, { - name: 'TicketAdvance', - path: 'advance', + name: 'TicketWeekly', + path: 'weekly', meta: { - title: 'ticketAdvance', - icon: 'keyboard_double_arrow_left', + title: 'weeklyTickets', + icon: 'access_time', }, - component: () => import('src/pages/Ticket/TicketAdvance.vue'), + component: () => import('src/pages/Ticket/TicketWeekly.vue'), }, { name: 'TicketFuture', @@ -58,6 +65,15 @@ export default { }, component: () => import('src/pages/Ticket/TicketFuture.vue'), }, + { + name: 'TicketAdvance', + path: 'advance', + meta: { + title: 'ticketAdvance', + icon: 'keyboard_double_arrow_left', + }, + component: () => import('src/pages/Ticket/TicketAdvance.vue'), + }, ], }, { @@ -82,7 +98,8 @@ export default { title: 'basicData', icon: 'vn:settings', }, - component: () => import('src/pages/Ticket/Card/TicketBasicData.vue'), + component: () => + import('src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue'), }, { name: 'TicketSale', @@ -93,6 +110,25 @@ export default { }, component: () => import('src/pages/Ticket/Card/TicketSale.vue'), }, + { + path: 'request', + name: 'TicketPurchaseRequest', + meta: { + title: 'purchaseRequest', + icon: 'vn:buyrequest', + }, + component: () => + import('src/pages/Ticket/Card/TicketPurchaseRequest.vue'), + }, + { + path: 'log', + name: 'TicketLog', + meta: { + title: 'log', + icon: 'history', + }, + component: () => import('src/pages/Ticket/Card/TicketLog.vue'), + }, { path: 'boxing', name: 'TicketBoxing', @@ -111,15 +147,6 @@ export default { }, component: () => import('src/pages/Ticket/Card/TicketSms.vue'), }, - { - path: 'log', - name: 'TicketLog', - meta: { - title: 'log', - icon: 'history', - }, - component: () => import('src/pages/Ticket/Card/TicketLog.vue'), - }, ], }, ],