diff --git a/src/pages/Order/Card/OrderLines.vue b/src/pages/Order/Card/OrderLines.vue
index 6093addb5..9d802c557 100644
--- a/src/pages/Order/Card/OrderLines.vue
+++ b/src/pages/Order/Card/OrderLines.vue
@@ -208,6 +208,20 @@ async function remove(item) {
async function handleConfirm() {
const result = await confirm(route.params.id);
if (result) {
+ const sale = await axios.get(`OrderRows`, {
+ params: {
+ filter: JSON.stringify({
+ where: { orderFk: route.params.id },
+ }),
+ },
+ });
+ const ticket = await axios.get(`Sales`, {
+ params: {
+ filter: JSON.stringify({
+ where: { id: sale.data[0].saleFk },
+ }),
+ },
+ });
quasar.notify({
message: t('globals.dataSaved'),
type: 'positive',
@@ -215,7 +229,7 @@ async function handleConfirm() {
router.push({
name: 'TicketSale',
query: {
- table: JSON.stringify({ id: route.params.id }),
+ table: JSON.stringify({ id: ticket.data[0].ticketFk }),
},
});
}
diff --git a/src/pages/Order/Card/OrderSearchbar.vue b/src/pages/Order/Card/OrderSearchbar.vue
deleted file mode 100644
index fa30a097f..000000000
--- a/src/pages/Order/Card/OrderSearchbar.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-es:
- Search order: Buscar orden
- Search orders by ticket id: Buscar pedido por id ticket
-
diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue
index baa203541..ae1fe68bd 100644
--- a/src/pages/Order/OrderList.vue
+++ b/src/pages/Order/OrderList.vue
@@ -8,15 +8,14 @@ import { useRoute } from 'vue-router';
import axios from 'axios';
import OrderSummary from 'pages/Order/Card/OrderSummary.vue';
-import OrderSearchbar from './Card/OrderSearchbar.vue';
import OrderFilter from './Card/OrderFilter.vue';
-import RightMenu from 'src/components/common/RightMenu.vue';
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
import VnTable from 'src/components/VnTable/VnTable.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
+import VnSection from 'src/components/common/VnSection.vue';
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
@@ -24,6 +23,8 @@ const tableRef = ref();
const agencyList = ref([]);
const route = useRoute();
const addressOptions = ref([]);
+const dataKey = 'OrderList';
+
const columns = computed(() => [
{
align: 'left',
@@ -178,117 +179,126 @@ const getDateColor = (date) => {
if (difference < 0) return 'bg-success';
};
+
-
-
-
+
+
-
-
-
-
- {{ row?.clientName }}
-
-
-
-
-
- {{ row?.name }}
-
-
-
-
-
-
- {{ toDate(row?.landed) }}
-
-
-
-
- fetchClientAddress(id, data)"
+
+
-
-
-
-
- {{ scope.opt.name }}
-
-
- {{ `#${scope.opt.id}` }}
-
-
-
+
+
+ {{ row?.clientName }}
+
+
-
- fetchAgencies(data)"
- >
-
-
-
-
- {{
- `${
- !scope.opt?.isActive
- ? t('basicData.inactive')
- : ''
- } `
- }}
- {{ scope.opt?.nickname }}: {{ scope.opt?.street }},
- {{ scope.opt?.city }}
-
-
-
+
+
+ {{ row?.name }}
+
+
-
- fetchAgencies(data)"
- />
-
+
+
+
+ {{ toDate(row?.landed) }}
+
+
+
+
+ fetchClientAddress(id, data)"
+ >
+
+
+
+
+ {{ scope.opt.name }}
+
+
+ {{ `#${scope.opt.id}` }}
+
+
+
+
+
+ fetchAgencies(data)"
+ >
+
+
+
+
+ {{
+ `${
+ !scope.opt?.isActive
+ ? t('basicData.inactive')
+ : ''
+ } `
+ }}
+ {{ scope.opt?.nickname }}:
+ {{ scope.opt?.street }},
+ {{ scope.opt?.city }}
+
+
+
+
+
+ fetchAgencies(data)"
+ />
+
+
+
-
+
diff --git a/src/pages/Order/locale/en.yml b/src/pages/Order/locale/en.yml
index 4349bc76f..14e41c559 100644
--- a/src/pages/Order/locale/en.yml
+++ b/src/pages/Order/locale/en.yml
@@ -21,3 +21,26 @@ lines:
image: Image
params:
tagGroups: Tags
+order:
+ field:
+ salesPersonFk: Sales Person
+ form:
+ clientFk: Client
+ addressFk: Address
+ agencyModeFk: Agency
+ list:
+ newOrder: New Order
+ summary:
+ basket: Basket
+ notConfirmed: Not confirmed
+ created: Created
+ createdFrom: Created From
+ address: Address
+ total: Total
+ items: Items
+ orderTicketList: Order Ticket List
+ amount: Amount
+ confirm: Confirm
+ confirmLines: Confirm lines
+ search: Search orders
+ searchInfo: You can search orders by ticket id
diff --git a/src/pages/Order/locale/es.yml b/src/pages/Order/locale/es.yml
index cef06cb6d..44e243ad1 100644
--- a/src/pages/Order/locale/es.yml
+++ b/src/pages/Order/locale/es.yml
@@ -21,3 +21,29 @@ lines:
image: Imagen
params:
tagGroups: Tags
+order:
+ field:
+ salesPersonFk: Comercial
+ form:
+ clientFk: Cliente
+ addressFk: Dirección
+ agencyModeFk: Agencia
+ list:
+ newOrder: Nuevo Pedido
+ summary:
+ basket: Cesta
+ notConfirmed: No confirmada
+ created: Creado
+ createdFrom: Creado desde
+ address: Dirección
+ total: Total
+ vat: IVA
+ state: Estado
+ alias: Alias
+ items: Artículos
+ orderTicketList: Tickets del pedido
+ amount: Monto
+ confirm: Confirmar
+ confirmLines: Confirmar lineas
+ search: Buscar pedido
+ searchInfo: Buscar pedidos por el número de ticket
diff --git a/src/router/modules/order.js b/src/router/modules/order.js
index 77af812cf..bdd080e7f 100644
--- a/src/router/modules/order.js
+++ b/src/router/modules/order.js
@@ -1,35 +1,102 @@
import { RouterView } from 'vue-router';
+const orderCard = {
+ name: 'OrderCard',
+ path: ':id',
+ component: () => import('src/pages/Order/Card/OrderCard.vue'),
+ redirect: { name: 'OrderSummary' },
+ meta: {
+ menu: [
+ 'OrderBasicData',
+ 'OrderCatalog',
+ 'OrderVolume',
+ 'OrderLines',
+ ],
+ },
+ children: [
+ {
+ path: 'summary',
+ name: 'OrderSummary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () => import('src/pages/Order/Card/OrderSummary.vue'),
+ },
+ {
+ path: 'basic-data',
+ name: 'OrderBasicData',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('src/pages/Order/Card/OrderBasicData.vue'),
+ },
+ {
+ path: 'catalog',
+ name: 'OrderCatalog',
+ meta: {
+ title: 'catalog',
+ icon: 'vn:basket',
+ },
+ component: () => import('src/pages/Order/Card/OrderCatalog.vue'),
+ },
+ {
+ path: 'volume',
+ name: 'OrderVolume',
+ meta: {
+ title: 'volume',
+ icon: 'vn:volume',
+ },
+ component: () => import('src/pages/Order/Card/OrderVolume.vue'),
+ },
+ {
+ path: 'line',
+ name: 'OrderLines',
+ meta: {
+ title: 'lines',
+ icon: 'vn:lines',
+ },
+ component: () => import('src/pages/Order/Card/OrderLines.vue'),
+ },
+ ],
+};
+
export default {
- path: '/order',
name: 'Order',
+ path: '/order',
meta: {
title: 'order',
icon: 'vn:basket',
moduleName: 'Order',
keyBinding: 'o',
+ menu: ['OrderList'],
},
component: RouterView,
redirect: { name: 'OrderMain' },
- menus: {
- main: ['OrderList'],
- card: ['OrderBasicData', 'OrderCatalog', 'OrderVolume', 'OrderLines'],
- },
children: [
{
- path: '',
name: 'OrderMain',
+ path: '',
component: () => import('src/components/common/VnModule.vue'),
- redirect: { name: 'OrderList' },
+ redirect: { name: 'OrderIndexMain' },
children: [
{
- path: 'list',
- name: 'OrderList',
- meta: {
- title: 'orderList',
- icon: 'view_list',
- },
+ path: '',
+ name: 'OrderIndexMain',
+ redirect: { name: 'OrderList' },
component: () => import('src/pages/Order/OrderList.vue'),
+ children: [
+ {
+ name: 'OrderList',
+ path: 'list',
+ meta: {
+ title: 'orderList',
+ icon: 'view_list',
+ },
+ },
+ orderCard,
+ ],
},
{
path: 'create',
@@ -42,58 +109,5 @@ export default {
},
],
},
- {
- name: 'OrderCard',
- path: ':id',
- component: () => import('src/pages/Order/Card/OrderCard.vue'),
- redirect: { name: 'OrderSummary' },
- children: [
- {
- name: 'OrderSummary',
- path: 'summary',
- meta: {
- title: 'summary',
- icon: 'launch',
- },
- component: () => import('src/pages/Order/Card/OrderSummary.vue'),
- },
- {
- name: 'OrderBasicData',
- path: 'basic-data',
- meta: {
- title: 'basicData',
- icon: 'vn:settings',
- },
- component: () => import('src/pages/Order/Card/OrderBasicData.vue'),
- },
- {
- name: 'OrderCatalog',
- path: 'catalog',
- meta: {
- title: 'catalog',
- icon: 'vn:basket',
- },
- component: () => import('src/pages/Order/Card/OrderCatalog.vue'),
- },
- {
- name: 'OrderVolume',
- path: 'volume',
- meta: {
- title: 'volume',
- icon: 'vn:volume',
- },
- component: () => import('src/pages/Order/Card/OrderVolume.vue'),
- },
- {
- name: 'OrderLines',
- path: 'line',
- meta: {
- title: 'lines',
- icon: 'vn:lines',
- },
- component: () => import('src/pages/Order/Card/OrderLines.vue'),
- },
- ],
- },
],
-};
+};
\ No newline at end of file