forked from verdnatura/salix-front
fix: refs #7986 front fixed
This commit is contained in:
parent
dfceb9403c
commit
af830591b3
|
@ -851,7 +851,7 @@ worker:
|
||||||
volumeLimit: Volume limit
|
volumeLimit: Volume limit
|
||||||
sizeLimit: Size limit
|
sizeLimit: Size limit
|
||||||
isOnReservationMode: Reservation mode
|
isOnReservationMode: Reservation mode
|
||||||
Machine: Machine
|
machine: Machine
|
||||||
wagon:
|
wagon:
|
||||||
pageTitles:
|
pageTitles:
|
||||||
wagons: Wagons
|
wagons: Wagons
|
||||||
|
|
|
@ -849,7 +849,7 @@ worker:
|
||||||
volumeLimit: Volumen límite
|
volumeLimit: Volumen límite
|
||||||
sizeLimit: Tamaño límite
|
sizeLimit: Tamaño límite
|
||||||
isOnReservationMode: Modo de reserva
|
isOnReservationMode: Modo de reserva
|
||||||
Machine: Máquina
|
machine: Máquina
|
||||||
|
|
||||||
wagon:
|
wagon:
|
||||||
pageTitles:
|
pageTitles:
|
||||||
|
|
|
@ -1,16 +1,19 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed, watch } from 'vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModelPopup from 'src/components/FormModelPopup.vue';
|
import FormModelPopup from 'src/components/FormModelPopup.vue';
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const paginate = ref();
|
|
||||||
|
const formModelRef = ref();
|
||||||
const dialog = ref();
|
const dialog = ref();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const routeId = computed(() => route.params.id);
|
const routeId = computed(() => route.params.id);
|
||||||
|
@ -31,17 +34,17 @@ const initialData = computed(() => {
|
||||||
machineFk: null,
|
machineFk: null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
() => formModelRef.value.reset()
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QPage class="column items-center q-pa-md centerCard">
|
<QPage class="column items-center q-pa-md centerCard">
|
||||||
|
<FetchData url="Trains" @on-fetch="(data) => (trainsData = data)" auto-load />
|
||||||
<FetchData
|
<FetchData
|
||||||
url="Shelvings/Train"
|
url="ItemPackingTypes"
|
||||||
@on-fetch="(data) => (trainsData = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
url="Items/ItemPackingType"
|
|
||||||
@on-fetch="(data) => (ItemPackingTypesData = data)"
|
@on-fetch="(data) => (ItemPackingTypesData = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
|
@ -50,18 +53,14 @@ const initialData = computed(() => {
|
||||||
@on-fetch="(data) => (warehousesData = data)"
|
@on-fetch="(data) => (warehousesData = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData url="Sectors" @on-fetch="(data) => (shelvingsData = data)" auto-load />
|
||||||
url="Shelvings/Sector"
|
|
||||||
@on-fetch="(data) => (shelvingsData = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData url="Machines" @on-fetch="(data) => (machinesData = data)" auto-load />
|
<FetchData url="Machines" @on-fetch="(data) => (machinesData = data)" auto-load />
|
||||||
<VnPaginate
|
|
||||||
ref="paginate"
|
<FormModel
|
||||||
data-key="WorkerOperator"
|
ref="formModelRef"
|
||||||
|
:form-initial-data="initialData"
|
||||||
url="Operators"
|
url="Operators"
|
||||||
:filter="{ where: { workerFk: routeId } }"
|
:filter="{ where: { workerFk: routeId } }"
|
||||||
order="id"
|
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
|
@ -75,8 +74,7 @@ const initialData = computed(() => {
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.numberOfWagons')"
|
:label="t('worker.operator.numberOfWagons')"
|
||||||
:model-value="data?.numberOfWagons"
|
:model-value="row?.numberOfWagons"
|
||||||
disable
|
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('worker.operator.train')"
|
:label="t('worker.operator.train')"
|
||||||
|
@ -84,7 +82,7 @@ const initialData = computed(() => {
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.trainFk"
|
v-model="row.trainFk"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -94,7 +92,7 @@ const initialData = computed(() => {
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="code"
|
option-label="code"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
v-model="data.itemPackingTypeFk"
|
v-model="row.itemPackingTypeFk"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('worker.operator.warehouse')"
|
:label="t('worker.operator.warehouse')"
|
||||||
|
@ -102,7 +100,7 @@ const initialData = computed(() => {
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.warehouseFk"
|
v-model="row.warehouseFk"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -112,31 +110,36 @@ const initialData = computed(() => {
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="description"
|
option-label="description"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.sectorFk"
|
v-model="row.sectorFk"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.labeler')"
|
:label="t('worker.operator.labeler')"
|
||||||
:model-value="data?.labelerFk"
|
:model-value="row.labelerFk"
|
||||||
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.linesLimit')"
|
:label="t('worker.operator.linesLimit')"
|
||||||
:model-value="data?.linesLimit"
|
:model-value="row.linesLimit"
|
||||||
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.volumeLimit')"
|
:label="t('worker.operator.volumeLimit')"
|
||||||
:model-value="data?.volumeLimit"
|
:model-value="row.volumeLimit"
|
||||||
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.sizeLimit')"
|
:label="t('worker.operator.sizeLimit')"
|
||||||
:model-value="data?.sizeLimit"
|
:model-value="row.sizeLimit"
|
||||||
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.isOnReservationMode')"
|
:label="t('worker.operator.isOnReservationMode')"
|
||||||
:model-value="data?.isOnReservationMode"
|
:model-value="row.isOnReservationMode"
|
||||||
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -146,7 +149,7 @@ const initialData = computed(() => {
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="plate"
|
option-label="plate"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.machineFk"
|
v-model="row.machineFk"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<!-- <QBtn
|
<!-- <QBtn
|
||||||
|
@ -168,7 +171,7 @@ const initialData = computed(() => {
|
||||||
</QBtn>-->
|
</QBtn>-->
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</VnPaginate>
|
</FormModel>
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="dialog.show()" color="primary" fab icon="add" shortcut="+">
|
<QBtn @click.stop="dialog.show()" color="primary" fab icon="add" shortcut="+">
|
||||||
<QDialog ref="dialog">
|
<QDialog ref="dialog">
|
||||||
|
@ -183,8 +186,7 @@ const initialData = computed(() => {
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('worker.operator.numberOfWagons')"
|
:label="t('worker.operator.numberOfWagons')"
|
||||||
:model-value="row?.numberOfWagons"
|
:model-value="data.numberOfWagons"
|
||||||
disable
|
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('worker.operator.train')"
|
:label="t('worker.operator.train')"
|
||||||
|
|
Loading…
Reference in New Issue