forked from verdnatura/salix-front
This commit is contained in:
parent
5f63a9b058
commit
79a26d7b94
src/pages/Ticket/Card
|
@ -137,11 +137,14 @@ async function changeState(value) {
|
||||||
:url="ticketUrl + 'basic-data/step-one'"
|
:url="ticketUrl + 'basic-data/step-one'"
|
||||||
:text="t('globals.summary.basicData')"
|
:text="t('globals.summary.basicData')"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('ticket.summary.state')">
|
<VnLv v-if="ticket.ticketState" :label="t('ticket.summary.state')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QChip :color="ticket.ticketState?.state?.classColor ?? 'dark'">
|
<QBadge
|
||||||
{{ ticket.ticketState?.state?.name }}
|
text-color="black"
|
||||||
</QChip>
|
:color="ticket.ticketState.state.classColor"
|
||||||
|
>
|
||||||
|
{{ ticket.ticketState.state.name }}
|
||||||
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('ticket.summary.salesPerson')">
|
<VnLv :label="t('ticket.summary.salesPerson')">
|
||||||
|
|
|
@ -11,11 +11,13 @@ import FetchData from 'components/FetchData.vue';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
import { dashIfEmpty } from 'src/filters';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const salesRef = ref(null);
|
const salesRef = ref(null);
|
||||||
|
const tableRef = ref();
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
|
@ -34,37 +36,34 @@ const salesFilter = computed(() => ({
|
||||||
|
|
||||||
const sales = ref([]);
|
const sales = ref([]);
|
||||||
const packingTypeVolume = ref([]);
|
const packingTypeVolume = ref([]);
|
||||||
const rows = computed(() => sales.value);
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
|
align: 'left',
|
||||||
label: t('volume.item'),
|
label: t('volume.item'),
|
||||||
name: 'item',
|
name: 'itemFk',
|
||||||
align: 'left',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
align: 'left',
|
||||||
label: t('volume.description'),
|
label: t('volume.description'),
|
||||||
name: 'description',
|
name: 'concept',
|
||||||
align: 'left',
|
columnClass: 'expand',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
align: 'left',
|
||||||
label: t('volume.packingType'),
|
label: t('volume.packingType'),
|
||||||
name: 'quantity',
|
name: 'itemPackingTypeFk',
|
||||||
field: (row) => row.item.itemPackingTypeFk,
|
format: (row, dashIfEmpty) => dashIfEmpty(row.item.itemPackingTypeFk),
|
||||||
align: 'left',
|
|
||||||
format: (val) => dashIfEmpty(val),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
align: 'left',
|
||||||
label: t('volume.quantity'),
|
label: t('volume.quantity'),
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
field: 'quantity',
|
|
||||||
align: 'left',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('volume.volumeQuantity'),
|
|
||||||
name: 'quantity',
|
|
||||||
field: (row) => row.saleVolume?.volume,
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
label: t('volume.volumeQuantity'),
|
||||||
|
name: 'volume',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -124,30 +123,28 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightMenu>
|
||||||
<QTable
|
<VnTable
|
||||||
:rows="rows"
|
ref="tableRef"
|
||||||
|
data-key="TicketVolume"
|
||||||
|
:url="`Tickets/${route.params.id}/getSales`"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
row-key="id"
|
:right-search="false"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
:column-search="false"
|
||||||
class="full-width q-mt-md"
|
auto-load
|
||||||
:no-data-label="t('globals.noResults')"
|
|
||||||
>
|
>
|
||||||
<template #body-cell-item="{ row }">
|
<template #column-itemFk="{ row }">
|
||||||
<QTd>
|
<span class="link">
|
||||||
<QBtn flat class="link" @click.stop>
|
{{ row.itemFk }}
|
||||||
{{ row.itemFk }}
|
<ItemDescriptorProxy :id="row.itemFk" />
|
||||||
<ItemDescriptorProxy :id="row.itemFk" />
|
</span>
|
||||||
</QBtn>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-description="{ row }">
|
<template #column-concept="{ row }">
|
||||||
<QTd>
|
<span>{{ row.item.name }}</span>
|
||||||
<div class="column">
|
<span class="color-vn-label q-pl-md">{{ row.item.subName }}</span>
|
||||||
<span>{{ row.item.name }}</span>
|
<FetchedTags :item="row.item" :max-length="6" />
|
||||||
<span class="color-vn-label">{{ row.item.subName }}</span>
|
|
||||||
<FetchedTags :item="row.item" :max-length="6" />
|
|
||||||
</div>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
<template #column-volume="{ rowIndex }">
|
||||||
|
<span>{{ packingTypeVolume?.[rowIndex]?.volume }}</span>
|
||||||
|
</template>
|
||||||
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue