Fix order descriptor total
This commit is contained in:
parent
3ea1fc775d
commit
1166a79669
|
@ -10,6 +10,7 @@ import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.v
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import OrderDescriptorMenu from "pages/Order/Card/OrderDescriptorMenu.vue";
|
import OrderDescriptorMenu from "pages/Order/Card/OrderDescriptorMenu.vue";
|
||||||
|
import FetchData from "components/FetchData.vue";
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -60,9 +61,15 @@ const setData = (entity) => {
|
||||||
data.value = useCardDescription(entity.client.name, entity.id);
|
data.value = useCardDescription(entity.client.name, entity.id);
|
||||||
state.set('ClaimDescriptor', entity);
|
state.set('ClaimDescriptor', entity);
|
||||||
};
|
};
|
||||||
|
const total = ref(null);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<FetchData
|
||||||
|
:url="`Orders/${entityId}/getTotal`"
|
||||||
|
@on-fetch="(response) => (total = response)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
ref="descriptor"
|
ref="descriptor"
|
||||||
:url="`Orders/${entityId}`"
|
:url="`Orders/${entityId}`"
|
||||||
|
@ -99,7 +106,7 @@ const setData = (entity) => {
|
||||||
<VnLv :label="t('order.field.agency')" :value="entity?.agencyMode?.name" />
|
<VnLv :label="t('order.field.agency')" :value="entity?.agencyMode?.name" />
|
||||||
<VnLv :label="t('order.summary.alias')" :value="entity?.address?.nickname" />
|
<VnLv :label="t('order.summary.alias')" :value="entity?.address?.nickname" />
|
||||||
<VnLv :label="t('order.summary.items')" :value="(entity?.rows?.length || 0).toString()" />
|
<VnLv :label="t('order.summary.items')" :value="(entity?.rows?.length || 0).toString()" />
|
||||||
<VnLv :label="t('order.summary.total')" :value="toCurrency(entity?.total)" />
|
<VnLv :label="t('order.summary.total')" :value="toCurrency(total)" />
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{ entity }">
|
<template #actions="{ entity }">
|
||||||
<QCardActions>
|
<QCardActions>
|
||||||
|
|
Loading…
Reference in New Issue