fix: refs #7717 fix basic data form & minor errors
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
2cd696aeb9
commit
7e3bfce732
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
@ -15,7 +15,6 @@ const route = useRoute();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const ORDER_MODEL = 'order';
|
const ORDER_MODEL = 'order';
|
||||||
|
|
||||||
const router = useRouter();
|
|
||||||
const isNew = Boolean(!route.params.id);
|
const isNew = Boolean(!route.params.id);
|
||||||
const clientList = ref([]);
|
const clientList = ref([]);
|
||||||
const agencyList = ref([]);
|
const agencyList = ref([]);
|
||||||
|
@ -106,10 +105,6 @@ const onClientChange = async (clientId) => {
|
||||||
console.error('Error al cambiar el cliente:', error);
|
console.error('Error al cambiar el cliente:', error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
async function onDataSaved({ id }) {
|
|
||||||
await router.push({ path: `/order/${id}/catalog` });
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -117,7 +112,7 @@ async function onDataSaved({ id }) {
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<FormModel
|
<FormModel
|
||||||
:url="`Orders/${route.params.id}`"
|
:url="`Orders/${route.params.id}`"
|
||||||
@on-data-saved="onDataSaved"
|
:url-update="`Orders/${route.params.id}/updateBasicData`"
|
||||||
:model="ORDER_MODEL"
|
:model="ORDER_MODEL"
|
||||||
:mapper="orderMapper"
|
:mapper="orderMapper"
|
||||||
:filter="orderFilter"
|
:filter="orderFilter"
|
||||||
|
|
|
@ -106,6 +106,7 @@ const columns = computed(() => [
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
format: (row) => row?.item?.name,
|
format: (row) => row?.item?.name,
|
||||||
|
columnClass: 'expand',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -149,7 +150,6 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'amount',
|
name: 'amount',
|
||||||
label: t('lines.amount'),
|
label: t('lines.amount'),
|
||||||
format: (row) => toCurrency(row.amount),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
@ -278,6 +278,9 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<FetchedTags :item="row?.item" :max-length="6" />
|
<FetchedTags :item="row?.item" :max-length="6" />
|
||||||
</template>
|
</template>
|
||||||
|
<template #column-amount="{ row }">
|
||||||
|
{{ toCurrency(row.quantity * row.price) }}
|
||||||
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky :offset="[20, 20]" v-if="!order?.isConfirmed" style="z-index: 2">
|
<QPageSticky :offset="[20, 20]" v-if="!order?.isConfirmed" style="z-index: 2">
|
||||||
|
|
|
@ -166,7 +166,7 @@ es:
|
||||||
total: Total
|
total: Total
|
||||||
boxes: Cajas
|
boxes: Cajas
|
||||||
item: Artículo
|
item: Artículo
|
||||||
subName: Subname
|
subName: Subnombre
|
||||||
quantity: Cantidad
|
quantity: Cantidad
|
||||||
volume: m³ por cantidad
|
volume: m³ por cantidad
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
Loading…
Reference in New Issue