#7717 fix OrderCatalog #558
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import axios from 'axios';
|
||||
|
@ -15,7 +15,6 @@ const route = useRoute();
|
|||
const state = useState();
|
||||
const ORDER_MODEL = 'order';
|
||||
|
||||
const router = useRouter();
|
||||
const isNew = Boolean(!route.params.id);
|
||||
const clientList = ref([]);
|
||||
const agencyList = ref([]);
|
||||
|
@ -106,10 +105,6 @@ const onClientChange = async (clientId) => {
|
|||
console.error('Error al cambiar el cliente:', error);
|
||||
}
|
||||
};
|
||||
|
||||
async function onDataSaved({ id }) {
|
||||
alexm marked this conversation as resolved
Outdated
|
||||
await router.push({ path: `/order/${id}/catalog` });
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -117,7 +112,7 @@ async function onDataSaved({ id }) {
|
|||
<div class="q-pa-md">
|
||||
<FormModel
|
||||
:url="`Orders/${route.params.id}`"
|
||||
@on-data-saved="onDataSaved"
|
||||
:url-update="`Orders/${route.params.id}/updateBasicData`"
|
||||
:model="ORDER_MODEL"
|
||||
:mapper="orderMapper"
|
||||
:filter="orderFilter"
|
||||
|
|
|
@ -106,6 +106,7 @@ const columns = computed(() => [
|
|||
component: null,
|
||||
},
|
||||
format: (row) => row?.item?.name,
|
||||
columnClass: 'expand',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -149,7 +150,6 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
name: 'amount',
|
||||
label: t('lines.amount'),
|
||||
format: (row) => toCurrency(row.amount),
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
|
@ -278,6 +278,9 @@ watch(
|
|||
</div>
|
||||
<FetchedTags :item="row?.item" :max-length="6" />
|
||||
</template>
|
||||
<template #column-amount="{ row }">
|
||||
{{ toCurrency(row.quantity * row.price) }}
|
||||
</template>
|
||||
</VnTable>
|
||||
</div>
|
||||
<QPageSticky :offset="[20, 20]" v-if="!order?.isConfirmed" style="z-index: 2">
|
||||
|
|
|
@ -166,7 +166,7 @@ es:
|
|||
total: Total
|
||||
boxes: Cajas
|
||||
item: Artículo
|
||||
subName: Subname
|
||||
subName: Subnombre
|
||||
quantity: Cantidad
|
||||
volume: m³ por cantidad
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue
Ya no se quiere?
Lo puse yo porque durante la migración no se tuvo en cuenta la validación del back. Tras acabarla he visto que no hacía falta y que poniendo :url-update funcionaba