forked from verdnatura/salix-front
feat: refs #8083 insert
This commit is contained in:
parent
9673f7be1e
commit
126bb3f039
|
@ -26,6 +26,7 @@ const { openConfirmationModal } = useVnConfirm();
|
||||||
const newTicketDialogRef = ref(null);
|
const newTicketDialogRef = ref(null);
|
||||||
const logsTableDialogRef = ref(null);
|
const logsTableDialogRef = ref(null);
|
||||||
const vnTableRef = ref();
|
const vnTableRef = ref();
|
||||||
|
const btnSelectRef = ref();
|
||||||
const expeditionsLogsData = ref([]);
|
const expeditionsLogsData = ref([]);
|
||||||
const selectedExpeditions = ref([]);
|
const selectedExpeditions = ref([]);
|
||||||
const allColumnNames = ref([]);
|
const allColumnNames = ref([]);
|
||||||
|
@ -190,17 +191,11 @@ const getExpeditionState = async (expedition) => {
|
||||||
const { data: expeditionStates } = await axios.get(`ExpeditionStates/filter`, {
|
const { data: expeditionStates } = await axios.get(`ExpeditionStates/filter`, {
|
||||||
params: { filter: JSON.stringify(filter) },
|
params: { filter: JSON.stringify(filter) },
|
||||||
});
|
});
|
||||||
const { data: scannedStates } = await axios.get(`ExpeditionStates`, {
|
|
||||||
params: { filter: JSON.stringify(filter), fields: ['id', 'isScanned'] },
|
|
||||||
});
|
|
||||||
|
|
||||||
expeditionsLogsData.value = expeditionStates.map((state) => {
|
expeditionsLogsData.value = expeditionStates.map((state) => ({
|
||||||
const scannedState = scannedStates.find((s) => s.id === state.id);
|
...state,
|
||||||
return {
|
isScanned: !!state.isScanned,
|
||||||
...state,
|
}));
|
||||||
isScanned: scannedState ? scannedState.isScanned : false,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
@ -225,6 +220,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<QBtnGroup push class="q-gutter-x-sm" flat>
|
<QBtnGroup push class="q-gutter-x-sm" flat>
|
||||||
<VnBtnSelect
|
<VnBtnSelect
|
||||||
|
ref="btnSelectRef"
|
||||||
:disable="!hasSelectedRows"
|
:disable="!hasSelectedRows"
|
||||||
color="primary"
|
color="primary"
|
||||||
:label="t('globals.changeState')"
|
:label="t('globals.changeState')"
|
||||||
|
@ -241,6 +237,8 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
vnTableRef.tableRef.clearSelection();
|
vnTableRef.tableRef.clearSelection();
|
||||||
|
vnTableRef.reload();
|
||||||
|
btnSelectRef.hidePopup();
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
@ -355,11 +353,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-isScanned="{ row }">
|
<template #body-cell-isScanned="{ row }">
|
||||||
<QTd style="text-align: center">
|
<QTd style="text-align: center">
|
||||||
<QCheckbox disable v-model="row.isScanned">
|
<QCheckbox disable v-model="row.isScanned" />
|
||||||
{{
|
|
||||||
row.isScanned === 1 ? t('expedition.yes') : t('expedition.no')
|
|
||||||
}}
|
|
||||||
</QCheckbox>
|
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
|
|
|
@ -118,6 +118,7 @@ expedition:
|
||||||
removeExpeditionSubtitle: Are you sure you want to delete this expedition?
|
removeExpeditionSubtitle: Are you sure you want to delete this expedition?
|
||||||
worker: Worker
|
worker: Worker
|
||||||
move: Move
|
move: Move
|
||||||
|
isScanned: Scanned
|
||||||
basicData:
|
basicData:
|
||||||
next: Next
|
next: Next
|
||||||
back: Back
|
back: Back
|
||||||
|
|
|
@ -207,6 +207,7 @@ expedition:
|
||||||
removeExpeditionSubtitle: ¿Está seguro de eliminar esta expedición?
|
removeExpeditionSubtitle: ¿Está seguro de eliminar esta expedición?
|
||||||
worker: Trabajador
|
worker: Trabajador
|
||||||
move: Mover
|
move: Mover
|
||||||
|
isScanned: Escaneado
|
||||||
package:
|
package:
|
||||||
package: Embalaje
|
package: Embalaje
|
||||||
quantity: Cantidad
|
quantity: Cantidad
|
||||||
|
|
Loading…
Reference in New Issue