+
{{ t('Add ticket') }}
@@ -485,6 +420,20 @@ const markAsServed = () => {
>
{{ t('Preview') }}
+
+
+ {{ t('Summary') }}
+
+
@@ -505,8 +454,13 @@ const markAsServed = () => {
+
+es:
+ Search roadmaps: Buscar troncales
+ You can search by roadmap reference: Puedes buscar por referencia de la troncal
+ Delete roadmap(s): Eliminar troncal(es)
+ Selected roadmaps will be removed: Las troncales seleccionadas serán eliminadas
+ Are you sure you want to continue?: ¿Seguro que quieres continuar?
+ The date can't be empty: La fecha no puede estar vacía
+ Clone Selected Routes: Clonar rutas seleccionadas
+ Create roadmap: Crear troncal
+ Roadmap: Troncal
+ Carrier: Transportista
+ Plate: Matrícula
+ Price: Precio
+ Observations: Observaciones
+ Preview: Vista previa
+
diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue
new file mode 100644
index 000000000..8410232c5
--- /dev/null
+++ b/src/pages/Route/RouteTickets.vue
@@ -0,0 +1,453 @@
+
+
+
+
+
+
+
+
+ (routeEntity = data)"
+ auto-load
+ :url="`Routes/${route.params?.id}`"
+ :filter="{
+ fields: ['vehicleFk'],
+ }"
+ />
+
+
+
+ {{ t('Select the starting date') }}
+
+
+
+
+
+
+
+
+ {{ t('Clone') }}
+
+
+
+
+
+
+
+
+ {{ t('Sort routes') }}
+
+
+ {{ t('Open buscaman') }}
+
+
+ {{ t('Delete priority') }}
+
+
+ {{
+ t('Renumber all tickets in the order you see on the screen')
+ }}
+
+
+
+ {{ t('Send SMS to all clients') }}
+
+
+
+
+
(ticketList = data)"
+ >
+
+
+
+
+
+
+
+
+ {{ t('Assign highest priority') }}
+
+
+
+
+
+
+
+
+
+ {{ value }}
+ {{ t('Open buscaman') }}
+
+
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
+ {{ t('globals.remove') }}
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('Add ticket') }}
+
+
+
+
+
+
+
+
+es:
+ Order: Orden
+ Street: Dirección fiscal
+ City: Población
+ PC: CP
+ Client: Cliente
+ Warehouse: Almacén
+ Packages: Bultos
+ Packaging: Encajado
+ Confirm removal from route: Quitar de la ruta
+ Are you sure you want to remove this ticket from the route?: ¿Seguro que quieres quitar este ticket de la ruta?
+ Sort routes: Ordenar rutas
+ Open buscaman: Abrir buscaman
+ Delete priority: Borrar orden
+ Renumber all tickets in the order you see on the screen: Renumerar todos los tickets con el orden que ves por pantalla
+ Assign highest priority: Asignar máxima prioridad
+ Send SMS to all clients: Mandar sms a todos los clientes de las rutas
+ Send SMS to the selected tickets: Enviar SMS a los tickets seleccionados
+ Add ticket: Añadir ticket
+
diff --git a/src/router/modules/index.js b/src/router/modules/index.js
index 84a26798d..076605f24 100644
--- a/src/router/modules/index.js
+++ b/src/router/modules/index.js
@@ -13,6 +13,7 @@ import Travel from './travel';
import Order from './order';
import Department from './department';
import Entry from './entry';
+import roadmap from "./roadmap";
export default [
Item,
@@ -30,4 +31,5 @@ export default [
invoiceIn,
Department,
Entry,
+ roadmap
];
diff --git a/src/router/modules/roadmap.js b/src/router/modules/roadmap.js
new file mode 100644
index 000000000..02edf94be
--- /dev/null
+++ b/src/router/modules/roadmap.js
@@ -0,0 +1,52 @@
+import { RouterView } from 'vue-router';
+
+export default {
+ path: '/route/roadmap',
+ name: 'Roadmap',
+ meta: {
+ title: 'roadmap',
+ icon: 'vn:troncales',
+ },
+ component: RouterView,
+ redirect: { name: 'RouteMain' },
+ menus: {
+ card: ['RoadmapBasicData', 'RoadmapStops'],
+ },
+ children: [
+ {
+ name: 'RouteRoadmapCard',
+ path: ':id',
+ component: () => import('src/pages/Route/Roadmap/RoadmapCard.vue'),
+ redirect: { name: 'RoadmapSummary' },
+ children: [
+ {
+ name: 'RoadmapSummary',
+ path: 'summary',
+ meta: {
+ title: 'summary',
+ icon: 'open_in_new',
+ },
+ component: () => import('pages/Route/Roadmap/RoadmapSummary.vue'),
+ },
+ {
+ name: 'RoadmapBasicData',
+ path: 'basic-data',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('pages/Route/Roadmap/RoadmapBasicData.vue'),
+ },
+ {
+ name: 'RoadmapStops',
+ path: 'stops',
+ meta: {
+ title: 'stops',
+ icon: 'vn:lines',
+ },
+ component: () => import('pages/Route/Roadmap/RoadmapStops.vue'),
+ },
+ ],
+ },
+ ],
+};
diff --git a/src/router/modules/route.js b/src/router/modules/route.js
index fad991fc6..099492981 100644
--- a/src/router/modules/route.js
+++ b/src/router/modules/route.js
@@ -11,8 +11,8 @@ export default {
component: RouterView,
redirect: { name: 'RouteMain' },
menus: {
- main: ['RouteList', 'CmrList'],
- card: ['RouteBasicData'],
+ main: ['RouteList', 'RouteAutonomous', 'RouteRoadmap', 'CmrList'],
+ card: ['RouteBasicData', 'RouteTickets', 'RouteLog'],
},
children: [
{
@@ -21,15 +21,6 @@ export default {
component: () => import('src/pages/Route/RouteMain.vue'),
redirect: { name: 'RouteList' },
children: [
- {
- path: 'cmr',
- name: 'CmrList',
- meta: {
- title: 'cmrsList',
- icon: 'fact_check',
- },
- component: () => import('src/pages/Route/Cmr/CmrList.vue'),
- },
{
path: 'list',
name: 'RouteList',
@@ -47,6 +38,42 @@ export default {
},
component: () => import('src/pages/Route/Card/RouteForm.vue'),
},
+ {
+ path: 'agency-term',
+ name: 'RouteAutonomous',
+ meta: {
+ title: 'autonomous',
+ icon: 'vn:agency-term',
+ },
+ component: () => import('src/pages/Route/RouteAutonomous.vue'),
+ },
+ {
+ path: 'roadmap',
+ name: 'RouteRoadmap',
+ meta: {
+ title: 'RouteRoadmap',
+ icon: 'vn:troncales',
+ },
+ component: () => import('src/pages/Route/RouteRoadmap.vue'),
+ },
+ {
+ path: 'roadmap/create',
+ name: 'RouteRoadmapCreate',
+ meta: {
+ title: 'RouteRoadmapCreate',
+ icon: 'vn:troncales',
+ },
+ component: () => import('src/pages/Route/Roadmap/RoadmapCreate.vue'),
+ },
+ {
+ path: 'cmr',
+ name: 'CmrList',
+ meta: {
+ title: 'cmrsList',
+ icon: 'fact_check',
+ },
+ component: () => import('src/pages/Route/Cmr/CmrList.vue'),
+ },
],
},
{
@@ -73,6 +100,24 @@ export default {
},
component: () => import('pages/Route/Card/RouteSummary.vue'),
},
+ {
+ path: 'tickets',
+ name: 'RouteTickets',
+ meta: {
+ title: 'tickets',
+ icon: 'vn:ticket',
+ },
+ component: () => import('src/pages/Route/RouteTickets.vue'),
+ },
+ {
+ path: 'log',
+ name: 'RouteLog',
+ meta: {
+ title: 'log',
+ icon: 'vn:History',
+ },
+ component: () => import('src/pages/Route/RouteLog.vue'),
+ },
],
},
],
diff --git a/src/router/routes.js b/src/router/routes.js
index d1027955f..32f43965f 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -13,6 +13,7 @@ import department from './modules/department';
import shelving from 'src/router/modules/shelving';
import order from 'src/router/modules/order';
import entry from 'src/router/modules/entry';
+import roadmap from "src/router/modules/roadmap";
const routes = [
{
@@ -66,6 +67,7 @@ const routes = [
supplier,
travel,
department,
+ roadmap,
entry,
{
path: '/:catchAll(.*)*',
diff --git a/src/utils/buscaman.js b/src/utils/buscaman.js
new file mode 100644
index 000000000..0778a21e8
--- /dev/null
+++ b/src/utils/buscaman.js
@@ -0,0 +1,22 @@
+import axios from 'axios';
+
+const BUSCAMAN_URL = 'https://gps.buscalia.com/usuario/localizar.aspx?bmi=true&addr=';
+
+export async function openBuscaman(vehicleId, tickets) {
+ if (!vehicleId) throw new Error(`The route doesn't have a vehicle`);
+
+ const response = await axios.get(`Routes/${vehicleId}/getDeliveryPoint`);
+
+ if (!response.data) {
+ throw new Error(`The route's vehicle doesn't have a delivery point`);
+ }
+
+ let addresses = response.data;
+ tickets.forEach((ticket, index) => {
+ const previousLine = tickets[index - 1] ? tickets[index - 1].street : null;
+ if (previousLine !== tickets.street) {
+ addresses += `+to:${ticket.postalCode} ${ticket.city} ${ticket.street}`;
+ }
+ });
+ window.open(BUSCAMAN_URL + encodeURI(addresses), '_blank');
+}