forked from verdnatura/salix-front
fix: refs #7717 fix basic data form & minor errors
This commit is contained in:
parent
2cd696aeb9
commit
7e3bfce732
|
@ -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 }) {
|
||||
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