Ticket basic data #474
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import isValidDate from 'filters/isValidDate';
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -24,6 +25,9 @@ const hover = ref(false);
|
|||
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => !!val || t('globals.fieldRequired');
|
||||
|
||||
const joinDateAndTime = (date, time) => {
|
||||
if (!date) {
|
||||
return null;
|
||||
|
@ -91,6 +95,8 @@ const styleAttrs = computed(() => {
|
|||
readonly
|
||||
:model-value="displayDate(value)"
|
||||
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||
:class="{ required: $attrs.required }"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
@click="isPopupOpen = true"
|
||||
>
|
||||
<template #append>
|
||||
|
|
|
@ -17,8 +17,9 @@ const props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => !!val || t('globals.fieldRequired');
|
||||
|
||||
const value = computed({
|
||||
get() {
|
||||
|
@ -71,6 +72,8 @@ const styleAttrs = computed(() => {
|
|||
readonly
|
||||
:model-value="formatTime(value)"
|
||||
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||
:class="{ required: $attrs.required }"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
@click="isPopupOpen = true"
|
||||
>
|
||||
<template #append>
|
||||
|
|
|
@ -116,12 +116,12 @@ const totalDifference = computed(() => {
|
|||
return rows.value.reduce((acc, item) => acc + item.component?.difference || 0, 0);
|
||||
});
|
||||
const showMovablecolumn = computed(() => (haveDifferences.value > 0 ? ['movable'] : []));
|
||||
const haveDifferences = computed(() => _ticketData.value.sale.haveDifferences);
|
||||
const haveDifferences = computed(() => _ticketData.value.sale?.haveDifferences);
|
||||
const ticketHaveNegatives = () => {
|
||||
let _haveNegatives = false;
|
||||
let haveNotNegatives = false;
|
||||
_ticketData.value.withoutNegatives = false;
|
||||
_ticketData.value.sale.items.forEach((item) => {
|
||||
_ticketData.value?.sale?.items.forEach((item) => {
|
||||
if (item.quantity > item.movable) _haveNegatives = true;
|
||||
else haveNotNegatives = true;
|
||||
});
|
||||
|
|
|
@ -396,7 +396,11 @@ onMounted(() => onFormModelInit());
|
|||
</QIcon>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<VnInput :label="t('basicData.alias')" v-model="formData.nickname" />
|
||||
<VnInput
|
||||
|
||||
:label="t('basicData.alias')"
|
||||
v-model="formData.nickname"
|
||||
:required="true"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow class="row q-gutter-md q-mb-md no-wrap">
|
||||
<VnSelect
|
||||
|
@ -417,7 +421,6 @@ onMounted(() => onFormModelInit());
|
|||
:options="agenciesOptions"
|
||||
hide-selected
|
||||
map-options
|
||||
jsegarra
commented
No se ve el texto, sino el id del registro No se ve el texto, sino el id del registro
wbuezas
commented
No se ve el name ya que no hay no existen No se ve el name ya que no hay no existen `zoneOptions` para los registros cargados, es algo medio raro la verdad como esta planteado, ya que en salix si desplegas el input de zonas te va a aparecer que no hay resultados.
Y en lilium esto es un problema porque el `QSelect` utiliza las options para mapear el resultado en base al value.
|
||||
:required="true"
|
||||
@focus="agencyFetchRef.fetch()"
|
||||
/>
|
||||
<VnSelect
|
||||
|
@ -450,7 +453,11 @@ onMounted(() => onFormModelInit());
|
|||
v-model="formData.shipped"
|
||||
:required="true"
|
||||
/>
|
||||
<VnInputTime :label="t('basicData.shippedHour')" v-model="formData.shipped" />
|
||||
<VnInputTime
|
||||
:label="t('basicData.shippedHour')"
|
||||
v-model="formData.shipped"
|
||||
:required="true"
|
||||
/>
|
||||
<VnInputDate
|
||||
:label="t('basicData.landed')"
|
||||
v-model="formData.landed"
|
||||
|
|
|
@ -156,7 +156,6 @@ onBeforeMount(async () => await getTicketData());
|
|||
v-model="step"
|
||||
ref="stepperRef"
|
||||
color="primary"
|
||||
header-nav
|
||||
animated
|
||||
keep-alive
|
||||
style="max-width: 800px; margin: auto"
|
||||
|
@ -176,19 +175,19 @@ onBeforeMount(async () => await getTicketData());
|
|||
/>
|
||||
</QStep>
|
||||
<template #navigation>
|
||||
<QStepperNavigation>
|
||||
<QStepperNavigation class="flex justify-between">
|
||||
<QBtn
|
||||
@click="onNextStep()"
|
||||
color="primary"
|
||||
:label="step === 2 ? t('basicData.finalize') : t('basicData.next')"
|
||||
/>
|
||||
<QBtn
|
||||
v-if="step > 1"
|
||||
flat
|
||||
color="primary"
|
||||
@click="stepperRef.previous()"
|
||||
:label="t('basicData.back')"
|
||||
class="q-ml-sm"
|
||||
:class="{ invisible: step === 1 }"
|
||||
/>
|
||||
<QBtn
|
||||
@click="onNextStep()"
|
||||
color="primary"
|
||||
:label="step === 2 ? t('basicData.finalize') : t('basicData.next')"
|
||||
/>
|
||||
</QStepperNavigation>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue
deberia ser requerido no? Quiero decir, le falta el *
Revisar el resto de campos
Añadido.
Commit:
54e3eb6f0d