Merge pull request 'CambiosSolicitadosEntries' (!201) from hyervoni/salix-front-mindshore:CambiosSolicitadosEntries into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #201 Reviewed-by: Javier Segarra <jsegarra@verdnatura.es> Reviewed-by: Javi Gallego <jgallego@verdnatura.es> Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
ab8e1fdc04
|
@ -59,6 +59,9 @@ const toggleForm = () => {
|
|||
:name="actionIcon"
|
||||
:size="actionIcon === 'add' ? 'xs' : 'sm'"
|
||||
:class="['default-icon', { '--add-icon': actionIcon === 'add' }]"
|
||||
:style="{
|
||||
'font-variation-settings': `'FILL' ${1}`,
|
||||
}"
|
||||
>
|
||||
<QTooltip v-if="tooltip">{{ tooltip }}</QTooltip>
|
||||
</QIcon>
|
||||
|
|
|
@ -97,6 +97,11 @@ select:-webkit-autofill {
|
|||
background-color: var(--vn-light-gray);
|
||||
}
|
||||
|
||||
.vn-table-separation-row {
|
||||
height: 16px !important;
|
||||
background-color: var(--vn-gray) !important;
|
||||
}
|
||||
|
||||
/* Estilo para el asterisco en campos requeridos */
|
||||
.q-field.required .q-field__label:after {
|
||||
content: ' *';
|
||||
|
|
|
@ -310,8 +310,8 @@ export default {
|
|||
reference: 'Referencia',
|
||||
invoiceNumber: 'Núm. factura',
|
||||
ordered: 'Pedida',
|
||||
confirmed: 'Confirmado',
|
||||
booked: 'Asentado',
|
||||
confirmed: 'Confirmada',
|
||||
booked: 'Contabilizada',
|
||||
raid: 'Redada',
|
||||
excludedFromAvailable: 'Inventario',
|
||||
travelReference: 'Referencia',
|
||||
|
|
|
@ -61,6 +61,7 @@ const onFilterTravelSelected = (formData, id) => {
|
|||
:url-update="`Entries/${route.params.id}`"
|
||||
model="entry"
|
||||
auto-load
|
||||
:clear-store-on-unmount="false"
|
||||
>
|
||||
<template #form="{ data }">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
|
|
|
@ -43,7 +43,7 @@ const tableColumnComponents = computed(() => ({
|
|||
item: {
|
||||
component: QBtn,
|
||||
props: {
|
||||
color: 'blue',
|
||||
color: 'primary',
|
||||
flat: true,
|
||||
},
|
||||
event: () => ({}),
|
||||
|
@ -54,6 +54,7 @@ const tableColumnComponents = computed(() => ({
|
|||
type: 'number',
|
||||
min: 0,
|
||||
class: 'input-number',
|
||||
dense: true,
|
||||
},
|
||||
event: getInputEvents,
|
||||
},
|
||||
|
@ -67,6 +68,7 @@ const tableColumnComponents = computed(() => ({
|
|||
'use-input': true,
|
||||
'hide-selected': true,
|
||||
options: packagingsOptions.value,
|
||||
dense: true,
|
||||
},
|
||||
event: getInputEvents,
|
||||
},
|
||||
|
@ -76,6 +78,7 @@ const tableColumnComponents = computed(() => ({
|
|||
type: 'number',
|
||||
min: 0,
|
||||
class: 'input-number',
|
||||
dense: true,
|
||||
},
|
||||
event: getInputEvents,
|
||||
},
|
||||
|
@ -84,6 +87,7 @@ const tableColumnComponents = computed(() => ({
|
|||
props: {
|
||||
type: 'number',
|
||||
min: 0,
|
||||
dense: true,
|
||||
},
|
||||
event: getInputEvents,
|
||||
},
|
||||
|
@ -92,6 +96,7 @@ const tableColumnComponents = computed(() => ({
|
|||
props: {
|
||||
type: 'number',
|
||||
min: 0,
|
||||
dense: true,
|
||||
},
|
||||
event: getInputEvents,
|
||||
},
|
||||
|
@ -100,6 +105,7 @@ const tableColumnComponents = computed(() => ({
|
|||
props: {
|
||||
type: 'number',
|
||||
min: 0,
|
||||
dense: true,
|
||||
},
|
||||
event: getInputEvents,
|
||||
},
|
||||
|
@ -108,6 +114,7 @@ const tableColumnComponents = computed(() => ({
|
|||
props: {
|
||||
type: 'number',
|
||||
min: 0,
|
||||
dense: true,
|
||||
},
|
||||
event: getInputEvents,
|
||||
},
|
||||
|
@ -116,6 +123,7 @@ const tableColumnComponents = computed(() => ({
|
|||
props: {
|
||||
type: 'number',
|
||||
min: 0,
|
||||
dense: true,
|
||||
},
|
||||
event: getInputEvents,
|
||||
},
|
||||
|
@ -124,6 +132,7 @@ const tableColumnComponents = computed(() => ({
|
|||
props: {
|
||||
type: 'number',
|
||||
min: 0,
|
||||
dense: true,
|
||||
},
|
||||
event: getInputEvents,
|
||||
},
|
||||
|
@ -276,7 +285,7 @@ const toggleGroupingMode = async (buy, mode) => {
|
|||
}
|
||||
};
|
||||
|
||||
const showLockIcon = (groupingMode, mode) => {
|
||||
const lockIconType = (groupingMode, mode) => {
|
||||
if (mode === 'packing') {
|
||||
return groupingMode === 2 ? 'lock' : 'lock_open';
|
||||
} else {
|
||||
|
@ -320,17 +329,21 @@ const showLockIcon = (groupingMode, mode) => {
|
|||
:columns="entriesTableColumns"
|
||||
selection="multiple"
|
||||
row-key="id"
|
||||
hide-bottom
|
||||
class="full-width q-mt-md"
|
||||
:grid="$q.screen.lt.md"
|
||||
v-model:selected="rowsSelected"
|
||||
:no-data-label="t('globals.noResults')"
|
||||
>
|
||||
<template #body="props">
|
||||
<QTr>
|
||||
<QTd>
|
||||
<QCheckbox v-model="props.selected" />
|
||||
</QTd>
|
||||
<QTd v-for="col in props.cols" :key="col.name">
|
||||
<QTd
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
style="max-width: 100px"
|
||||
>
|
||||
<component
|
||||
:is="tableColumnComponents[col.name].component"
|
||||
v-bind="tableColumnComponents[col.name].props"
|
||||
|
@ -350,7 +363,7 @@ const showLockIcon = (groupingMode, mode) => {
|
|||
>
|
||||
<QBtn
|
||||
:icon="
|
||||
showLockIcon(props.row.groupingMode, col.name)
|
||||
lockIconType(props.row.groupingMode, col.name)
|
||||
"
|
||||
@click="toggleGroupingMode(props.row, col.name)"
|
||||
class="cursor-pointer"
|
||||
|
@ -359,6 +372,16 @@ const showLockIcon = (groupingMode, mode) => {
|
|||
dense
|
||||
unelevated
|
||||
push
|
||||
:style="{
|
||||
'font-variation-settings': `'FILL' ${
|
||||
lockIconType(
|
||||
props.row.groupingMode,
|
||||
col.name
|
||||
) === 'lock'
|
||||
? 1
|
||||
: 0
|
||||
}`,
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
<template
|
||||
|
@ -397,7 +420,7 @@ const showLockIcon = (groupingMode, mode) => {
|
|||
</QTr>
|
||||
<!-- Esta última row es utilizada para agregar un espaciado y así marcar una diferencia visual entre los diferentes buys -->
|
||||
<QTr v-if="props.rowIndex !== rows.length - 1" class="separation-row">
|
||||
<QTd colspan="12" style="height: 24px" />
|
||||
<QTd colspan="12" class="vn-table-separation-row" />
|
||||
</QTr>
|
||||
</template>
|
||||
<template #item="props">
|
||||
|
@ -448,9 +471,6 @@ const showLockIcon = (groupingMode, mode) => {
|
|||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.separation-row {
|
||||
background-color: var(--vn-gray) !important;
|
||||
}
|
||||
.grid-style-transition {
|
||||
transition: transform 0.28s, background-color 0.28s;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
|
@ -7,6 +7,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
|||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import useCardDescription from 'src/composables/useCardDescription';
|
||||
|
||||
import { useState } from 'src/composables/useState';
|
||||
import { toDate } from 'src/filters';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
|
||||
|
@ -25,6 +26,8 @@ const $props = defineProps({
|
|||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
const { openReport } = usePrintService();
|
||||
const state = useState();
|
||||
const entryDescriptorRef = ref(null);
|
||||
|
||||
const entryFilter = {
|
||||
include: [
|
||||
|
@ -71,6 +74,8 @@ const data = ref(useCardDescription());
|
|||
const setData = (entity) =>
|
||||
(data.value = useCardDescription(entity.supplier.nickname, entity.id));
|
||||
|
||||
const currentEntry = computed(() => state.get('entry'));
|
||||
|
||||
const getEntryRedirectionFilter = (entry) => {
|
||||
let entryTravel = entry && entry.travel;
|
||||
|
||||
|
@ -95,17 +100,20 @@ const getEntryRedirectionFilter = (entry) => {
|
|||
const showEntryReport = () => {
|
||||
openReport(`Entries/${route.params.id}/entry-order-pdf`);
|
||||
};
|
||||
|
||||
watch;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CardDescriptor
|
||||
ref="entryDescriptorRef"
|
||||
module="Entry"
|
||||
:url="`Entries/${entityId}`"
|
||||
:filter="entryFilter"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
@on-fetch="setData"
|
||||
data-key="entryData"
|
||||
data-key="entry"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<QItem v-ripple clickable @click="showEntryReport(entity)">
|
||||
|
@ -126,17 +134,17 @@ const showEntryReport = () => {
|
|||
:value="entity.travel?.warehouseOut?.name"
|
||||
/>
|
||||
</template>
|
||||
<template #icons="{ entity }">
|
||||
<template #icons>
|
||||
<QCardActions class="q-gutter-x-md">
|
||||
<QIcon
|
||||
v-if="entity.isExcludedFromAvailable"
|
||||
v-if="currentEntry.isExcludedFromAvailable"
|
||||
name="vn:inventory"
|
||||
color="primary"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>{{ t('Inventory entry') }}</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon v-if="entity.isRaid" name="vn:web" color="primary" size="xs">
|
||||
<QIcon v-if="currentEntry.isRaid" name="vn:net" color="primary" size="xs">
|
||||
<QTooltip>{{ t('Virtual entry') }}</QTooltip>
|
||||
</QIcon>
|
||||
</QCardActions>
|
||||
|
|
|
@ -165,19 +165,27 @@ const fetchEntryBuys = async () => {
|
|||
@on-fetch="(data) => setEntryData(data)"
|
||||
>
|
||||
<template #header-left>
|
||||
<a class="header-link" :href="entryUrl">
|
||||
<router-link
|
||||
v-if="route.name !== 'EntrySummary'"
|
||||
:to="{ name: 'EntrySummary', params: { id: entityId } }"
|
||||
class="header link"
|
||||
:href="entryUrl"
|
||||
>
|
||||
<QIcon name="open_in_new" color="white" size="sm" />
|
||||
</a>
|
||||
</router-link>
|
||||
</template>
|
||||
<template #header>
|
||||
<span>{{ entry.id }} - {{ entry.supplier.nickname }}</span>
|
||||
</template>
|
||||
<template #body>
|
||||
<QCard class="vn-one">
|
||||
<a class="header header-link" :href="`#/entry/${entityId}/basic-data`">
|
||||
<router-link
|
||||
:to="{ name: 'EntryBasicData', params: { id: entityId } }"
|
||||
class="header header-link"
|
||||
>
|
||||
{{ t('globals.summary.basicData') }}
|
||||
<QIcon name="open_in_new" />
|
||||
</a>
|
||||
</router-link>
|
||||
|
||||
<VnLv :label="t('entry.summary.commission')" :value="entry.commission" />
|
||||
|
||||
|
@ -191,37 +199,15 @@ const fetchEntryBuys = async () => {
|
|||
:label="t('entry.summary.invoiceNumber')"
|
||||
:value="entry.invoiceNumber"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.ordered')"
|
||||
v-model="entry.isOrdered"
|
||||
:disable="true"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.confirmed')"
|
||||
v-model="entry.isConfirmed"
|
||||
:disable="true"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.booked')"
|
||||
v-model="entry.isBooked"
|
||||
:disable="true"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.raid')"
|
||||
v-model="entry.isRaid"
|
||||
:disable="true"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.excludedFromAvailable')"
|
||||
v-model="entry.isExcludedFromAvailable"
|
||||
:disable="true"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<a class="header header-link" :href="entryUrl">
|
||||
{{ t('Travel data') }}
|
||||
<router-link
|
||||
:to="{ name: 'EntryBasicData', params: { id: entityId } }"
|
||||
class="header header-link"
|
||||
>
|
||||
{{ t('globals.summary.basicData') }}
|
||||
<QIcon name="open_in_new" />
|
||||
</a>
|
||||
</router-link>
|
||||
|
||||
<VnLv :label="t('entry.summary.travelReference')">
|
||||
<template #value>
|
||||
|
@ -249,7 +235,7 @@ const fetchEntryBuys = async () => {
|
|||
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.travelDelivered')"
|
||||
v-model="entry.isDelivered"
|
||||
v-model="entry.travel.isDelivered"
|
||||
:disable="true"
|
||||
/>
|
||||
<VnLv
|
||||
|
@ -264,7 +250,41 @@ const fetchEntryBuys = async () => {
|
|||
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.travelReceived')"
|
||||
v-model="entry.isReceived"
|
||||
v-model="entry.travel.isReceived"
|
||||
:disable="true"
|
||||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<router-link
|
||||
:to="{ name: 'TravelSummary', params: { id: entry.travel.id } }"
|
||||
class="header header-link"
|
||||
>
|
||||
{{ t('Travel data') }}
|
||||
<QIcon name="open_in_new" />
|
||||
</router-link>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.ordered')"
|
||||
v-model="entry.isOrdered"
|
||||
:disable="true"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.confirmed')"
|
||||
v-model="entry.isConfirmed"
|
||||
:disable="true"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.booked')"
|
||||
v-model="entry.isBooked"
|
||||
:disable="true"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.raid')"
|
||||
v-model="entry.isRaid"
|
||||
:disable="true"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.excludedFromAvailable')"
|
||||
v-model="entry.isExcludedFromAvailable"
|
||||
:disable="true"
|
||||
/>
|
||||
</QCard>
|
||||
|
@ -276,9 +296,9 @@ const fetchEntryBuys = async () => {
|
|||
<QTable
|
||||
:rows="entryBuys"
|
||||
:columns="entriesTableColumns"
|
||||
hide-bottom
|
||||
row-key="index"
|
||||
class="full-width q-mt-md"
|
||||
:no-data-label="t('globals.noResults')"
|
||||
>
|
||||
<template #body="{ cols, row, rowIndex }">
|
||||
<QTr no-hover>
|
||||
|
@ -324,11 +344,8 @@ const fetchEntryBuys = async () => {
|
|||
</QTd>
|
||||
</QTr>
|
||||
<!-- Esta última row es utilizada para agregar un espaciado y así marcar una diferencia visual entre los diferentes buys -->
|
||||
<QTr
|
||||
v-if="rowIndex !== entryBuys.length - 1"
|
||||
class="separation-row"
|
||||
>
|
||||
<QTd colspan="10" style="height: 24px" />
|
||||
<QTr v-if="rowIndex !== entryBuys.length - 1">
|
||||
<QTd colspan="10" class="vn-table-separation-row" />
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
|
@ -337,13 +354,7 @@ const fetchEntryBuys = async () => {
|
|||
</CardSummary>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.separation-row {
|
||||
background-color: var(--vn-gray) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Travel data: 'Datos envío'
|
||||
Travel data: Datos envío
|
||||
</i18n>
|
||||
|
|
|
@ -74,7 +74,7 @@ onMounted(async () => {
|
|||
</QIcon>
|
||||
<QIcon
|
||||
v-if="row.isRaid"
|
||||
name="vn:web"
|
||||
name="vn:net"
|
||||
color="primary"
|
||||
size="xs"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue