forked from verdnatura/salix-front
feat: refs #8087 Traspasar redadas a travels
This commit is contained in:
parent
64f36c7d4b
commit
12c236276d
|
@ -106,7 +106,6 @@ globals:
|
||||||
weight: Weight
|
weight: Weight
|
||||||
error: Ups! Something went wrong
|
error: Ups! Something went wrong
|
||||||
recalc: Recalculate
|
recalc: Recalculate
|
||||||
daysInForward: Forward days
|
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Login
|
logIn: Login
|
||||||
addressEdit: Update address
|
addressEdit: Update address
|
||||||
|
@ -313,6 +312,7 @@ globals:
|
||||||
changePass: Change password
|
changePass: Change password
|
||||||
deleteConfirmTitle: Delete selected elements
|
deleteConfirmTitle: Delete selected elements
|
||||||
changeState: Change state
|
changeState: Change state
|
||||||
|
raid: 'Raid {daysInForward} days'
|
||||||
errors:
|
errors:
|
||||||
statusUnauthorized: Access denied
|
statusUnauthorized: Access denied
|
||||||
statusInternalServerError: An internal server error has ocurred
|
statusInternalServerError: An internal server error has ocurred
|
||||||
|
@ -1039,6 +1039,7 @@ travel:
|
||||||
warehouseIn: Warehouse In
|
warehouseIn: Warehouse In
|
||||||
delivered: Delivered
|
delivered: Delivered
|
||||||
received: Received
|
received: Received
|
||||||
|
daysInForward: Days in forward
|
||||||
thermographs:
|
thermographs:
|
||||||
code: Code
|
code: Code
|
||||||
temperature: Temperature
|
temperature: Temperature
|
||||||
|
|
|
@ -108,7 +108,6 @@ globals:
|
||||||
weight: Peso
|
weight: Peso
|
||||||
error: ¡Ups! Algo salió mal
|
error: ¡Ups! Algo salió mal
|
||||||
recalc: Recalcular
|
recalc: Recalcular
|
||||||
daysInForward: Días en el futuro
|
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Inicio de sesión
|
logIn: Inicio de sesión
|
||||||
addressEdit: Modificar consignatario
|
addressEdit: Modificar consignatario
|
||||||
|
@ -317,6 +316,7 @@ globals:
|
||||||
changePass: Cambiar contraseña
|
changePass: Cambiar contraseña
|
||||||
deleteConfirmTitle: Eliminar los elementos seleccionados
|
deleteConfirmTitle: Eliminar los elementos seleccionados
|
||||||
changeState: Cambiar estado
|
changeState: Cambiar estado
|
||||||
|
raid: 'Redada {daysInForward} días'
|
||||||
errors:
|
errors:
|
||||||
statusUnauthorized: Acceso denegado
|
statusUnauthorized: Acceso denegado
|
||||||
statusInternalServerError: Ha ocurrido un error interno del servidor
|
statusInternalServerError: Ha ocurrido un error interno del servidor
|
||||||
|
@ -1037,6 +1037,7 @@ travel:
|
||||||
warehouseIn: Alm. entrada
|
warehouseIn: Alm. entrada
|
||||||
delivered: Enviada
|
delivered: Enviada
|
||||||
received: Recibida
|
received: Recibida
|
||||||
|
daysInForward: Días redada
|
||||||
thermographs:
|
thermographs:
|
||||||
code: Código
|
code: Código
|
||||||
temperature: Temperatura
|
temperature: Temperatura
|
||||||
|
|
|
@ -7,7 +7,6 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import useCardDescription from 'src/composables/useCardDescription';
|
import useCardDescription from 'src/composables/useCardDescription';
|
||||||
|
|
||||||
import { useState } from 'src/composables/useState';
|
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import { usePrintService } from 'composables/usePrintService';
|
import { usePrintService } from 'composables/usePrintService';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
|
@ -23,7 +22,6 @@ const $props = defineProps({
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { openReport } = usePrintService();
|
const { openReport } = usePrintService();
|
||||||
const state = useState();
|
|
||||||
const entryDescriptorRef = ref(null);
|
const entryDescriptorRef = ref(null);
|
||||||
const url = ref();
|
const url = ref();
|
||||||
|
|
||||||
|
@ -74,8 +72,6 @@ const data = ref(useCardDescription());
|
||||||
const setData = (entity) =>
|
const setData = (entity) =>
|
||||||
(data.value = useCardDescription(entity.supplier?.nickname, entity.id));
|
(data.value = useCardDescription(entity.supplier?.nickname, entity.id));
|
||||||
|
|
||||||
const currentEntry = computed(() => state.get('entry'));
|
|
||||||
|
|
||||||
const getEntryRedirectionFilter = (entry) => {
|
const getEntryRedirectionFilter = (entry) => {
|
||||||
let entryTravel = entry && entry.travel;
|
let entryTravel = entry && entry.travel;
|
||||||
|
|
||||||
|
@ -132,24 +128,29 @@ watch;
|
||||||
:value="entity.travel?.warehouseOut?.name"
|
:value="entity.travel?.warehouseOut?.name"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #icons>
|
<template #icons="{ entity }">
|
||||||
<QCardActions class="q-gutter-x-md">
|
<QCardActions class="q-gutter-x-md">
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="currentEntry?.isExcludedFromAvailable"
|
v-if="entity?.isExcludedFromAvailable"
|
||||||
name="vn:inventory"
|
name="vn:inventory"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="xs"
|
size="xs"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Inventory entry') }}</QTooltip>
|
<QTooltip>{{ t('Inventory entry') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
{{ console.log('currentEntry', currentEntry) }}
|
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="currentEntry?.travel?.daysInForward"
|
v-if="entity?.travel?.daysInForward"
|
||||||
name="vn:net"
|
name="vn:net"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="xs"
|
size="xs"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Virtual entry') }}</QTooltip>
|
<QTooltip>
|
||||||
|
{{
|
||||||
|
t('globals.raid', {
|
||||||
|
daysInForward: entity?.travel?.daysInForward,
|
||||||
|
})
|
||||||
|
}}</QTooltip
|
||||||
|
>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</QCardActions>
|
</QCardActions>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -41,6 +41,10 @@ const entryFilter = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
name: 'status',
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('entry.list.tableVisibleColumns.id'),
|
label: t('entry.list.tableVisibleColumns.id'),
|
||||||
|
@ -154,27 +158,8 @@ const columns = computed(() => [
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
|
||||||
label: t('entry.list.tableVisibleColumns.isExcludedFromAvailable'),
|
label: t('entry.list.tableVisibleColumns.isExcludedFromAvailable'),
|
||||||
name: 'isExcludedFromAvailable',
|
name: 'isExcludedFromAvailable',
|
||||||
chip: {
|
|
||||||
color: null,
|
|
||||||
condition: (value) => value,
|
|
||||||
icon: 'vn:inventory',
|
|
||||||
},
|
|
||||||
columnFilter: {
|
|
||||||
inWhere: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: 'left',
|
|
||||||
label: t('entry.list.tableVisibleColumns.daysInForward'),
|
|
||||||
name: 'daysInForward',
|
|
||||||
chip: {
|
|
||||||
color: null,
|
|
||||||
condition: (value) => value,
|
|
||||||
icon: 'vn:net',
|
|
||||||
},
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
|
@ -225,6 +210,26 @@ onMounted(async () => {
|
||||||
auto-load
|
auto-load
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
>
|
>
|
||||||
|
<template #column-status="{ row }">
|
||||||
|
<div class="row q-gutter-xs">
|
||||||
|
<QIcon
|
||||||
|
v-if="!!row.isExcludedFromAvailable"
|
||||||
|
name="vn:inventory"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{
|
||||||
|
t('entry.list.tableVisibleColumns.isExcludedFromAvailable')
|
||||||
|
}}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
<QIcon v-if="!!row.daysInForward" name="vn:net" color="primary">
|
||||||
|
<QTooltip>
|
||||||
|
{{
|
||||||
|
t('globals.raid', { daysInForward: row.daysInForward })
|
||||||
|
}}</QTooltip
|
||||||
|
>
|
||||||
|
</QIcon>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template #column-supplierFk="{ row }">
|
<template #column-supplierFk="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
{{ row.supplierName }}
|
{{ row.supplierName }}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
entryList:
|
entryList:
|
||||||
list:
|
list:
|
||||||
inventoryEntry: Inventory entry
|
inventoryEntry: Inventory entry
|
||||||
virtualEntry: Virtual entry
|
|
||||||
entryFilter:
|
entryFilter:
|
||||||
filter:
|
filter:
|
||||||
search: General search
|
search: General search
|
||||||
|
|
|
@ -4,7 +4,6 @@ You can search by entry reference: Puedes buscar por referencia de la entrada
|
||||||
entryList:
|
entryList:
|
||||||
list:
|
list:
|
||||||
inventoryEntry: Es inventario
|
inventoryEntry: Es inventario
|
||||||
virtualEntry: Es una redada
|
|
||||||
entryFilter:
|
entryFilter:
|
||||||
filter:
|
filter:
|
||||||
search: Búsqueda general
|
search: Búsqueda general
|
||||||
|
|
|
@ -73,9 +73,15 @@ const agenciesOptions = ref([]);
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput v-model="data.m3" label="m3" />
|
<VnInput v-model="data.m3" label="m3" />
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('globals.daysInForward')"
|
:label="t('travel.basicData.daysInForward')"
|
||||||
v-model="data.daysInForward"
|
v-model="data.daysInForward"
|
||||||
/>
|
>
|
||||||
|
<template #append>
|
||||||
|
<QIcon name="info" class="cursor-info">
|
||||||
|
<QTooltip>{{ t('raidDays') }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
|
</VnInput>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
|
@ -90,3 +96,10 @@ const agenciesOptions = ref([]);
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
raidDays: Al rellenarlo, generamos una redada. Indica los días que un travel se moverá automáticamente en el tiempo
|
||||||
|
en:
|
||||||
|
raidDays: When filling, a raid is generated. Enter the number of days the travel will automatically forward in time
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -32,6 +32,7 @@ const filter = {
|
||||||
'warehouseOutFk',
|
'warehouseOutFk',
|
||||||
'cargoSupplierFk',
|
'cargoSupplierFk',
|
||||||
'agencyModeFk',
|
'agencyModeFk',
|
||||||
|
'daysInForward',
|
||||||
],
|
],
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
|
@ -77,6 +78,22 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
||||||
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
||||||
<VnLv :label="t('globals.totalEntries')" :value="entity.totalEntries" />
|
<VnLv :label="t('globals.totalEntries')" :value="entity.totalEntries" />
|
||||||
</template>
|
</template>
|
||||||
|
<template #icons="{ entity }">
|
||||||
|
<QCardActions class="q-gutter-x-md">
|
||||||
|
<QIcon
|
||||||
|
v-if="entity.daysInForward"
|
||||||
|
name="vn:net"
|
||||||
|
color="primary"
|
||||||
|
size="xs"
|
||||||
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{
|
||||||
|
t('globals.raid', { daysInForward: entity.daysInForward })
|
||||||
|
}}</QTooltip
|
||||||
|
>
|
||||||
|
</QIcon>
|
||||||
|
</QCardActions>
|
||||||
|
</template>
|
||||||
<template #actions="{ entity }">
|
<template #actions="{ entity }">
|
||||||
<QCardActions>
|
<QCardActions>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
|
|
@ -304,7 +304,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
||||||
<VnLv label="m³" :value="travel.m3" />
|
<VnLv label="m³" :value="travel.m3" />
|
||||||
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
|
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('globals.daysInForward')"
|
:label="t('travel.basicData.daysInForward')"
|
||||||
:value="travel?.daysInForward"
|
:value="travel?.daysInForward"
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
|
|
@ -45,6 +45,10 @@ const redirectCreateEntryView = (travelData) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
name: 'status',
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
|
@ -221,6 +225,17 @@ const columns = computed(() => [
|
||||||
:is-editable="false"
|
:is-editable="false"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
>
|
>
|
||||||
|
<template #column-status="{ row }">
|
||||||
|
<div class="row">
|
||||||
|
<QIcon v-if="!!row.daysInForward" name="vn:net" color="primary">
|
||||||
|
<QTooltip>
|
||||||
|
{{
|
||||||
|
t('globals.raid', { daysInForward: row.daysInForward })
|
||||||
|
}}</QTooltip
|
||||||
|
>
|
||||||
|
</QIcon>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template #column-shipped="{ row }">
|
<template #column-shipped="{ row }">
|
||||||
<QBadge
|
<QBadge
|
||||||
text-color="black"
|
text-color="black"
|
||||||
|
|
Loading…
Reference in New Issue