96 lines
3.4 KiB
Vue
96 lines
3.4 KiB
Vue
<script setup>
|
|
import { ref } from 'vue';
|
|
import { useRoute } from 'vue-router';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
|
import FetchData from 'components/FetchData.vue';
|
|
import FormModel from 'components/FormModel.vue';
|
|
import VnRow from 'components/ui/VnRow.vue';
|
|
import VnInput from 'src/components/common/VnInput.vue';
|
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
|
|
|
const route = useRoute();
|
|
const { t } = useI18n();
|
|
|
|
const agenciesOptions = ref([]);
|
|
</script>
|
|
<template>
|
|
<FetchData
|
|
url="AgencyModes"
|
|
@on-fetch="(data) => (agenciesOptions = data)"
|
|
auto-load
|
|
/>
|
|
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
|
|
<template #form="{ data }">
|
|
<VnRow>
|
|
<VnInput v-model="data.ref" :label="t('globals.reference')" />
|
|
<VnSelect
|
|
:label="t('globals.agency')"
|
|
v-model="data.agencyModeFk"
|
|
:options="agenciesOptions"
|
|
option-value="id"
|
|
option-label="name"
|
|
map-options
|
|
hide-selected
|
|
/>
|
|
</VnRow>
|
|
<VnRow>
|
|
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
|
|
<VnInputDate v-model="data.landed" :label="t('globals.landed')" />
|
|
</VnRow>
|
|
<VnRow>
|
|
<VnSelect
|
|
:label="t('globals.warehouseOut')"
|
|
v-model="data.warehouseOutFk"
|
|
:options="agenciesOptions"
|
|
option-value="id"
|
|
option-label="name"
|
|
map-options
|
|
hide-selected
|
|
/>
|
|
<VnSelect
|
|
:label="t('globals.warehouseIn')"
|
|
v-model="data.warehouseInFk"
|
|
:options="agenciesOptions"
|
|
option-value="id"
|
|
option-label="name"
|
|
map-options
|
|
hide-selected
|
|
/>
|
|
</VnRow>
|
|
<VnRow>
|
|
<VnInput v-model="data.m3" label="m3" />
|
|
<VnInput
|
|
:label="t('travel.basicData.daysInForward')"
|
|
v-model="data.daysInForward"
|
|
>
|
|
<template #append>
|
|
<QIcon name="info" class="cursor-info">
|
|
<QTooltip>{{ t('raidDays') }}</QTooltip>
|
|
</QIcon>
|
|
</template>
|
|
</VnInput>
|
|
</VnRow>
|
|
<VnRow>
|
|
<QCheckbox v-model="data.isRaid" :label="t('travel.basicData.isRaid')" />
|
|
<QCheckbox
|
|
:label="t('travel.summary.delivered')"
|
|
v-model="data.isDelivered"
|
|
/>
|
|
<QCheckbox
|
|
:label="t('travel.summary.received')"
|
|
v-model="data.isReceived"
|
|
/>
|
|
</VnRow>
|
|
</template>
|
|
</FormModel>
|
|
</template>
|
|
|
|
<i18n>
|
|
es:
|
|
raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados (incluido 0). Si se deja vacio, la fecha no cambiará
|
|
en:
|
|
raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days (including 0). If left empty, the date will stay the same.
|
|
</i18n>
|