Aggiungi salto UDC nel picking barcode

This commit is contained in:
2026-07-04 09:13:25 +02:00
parent f4e73bd5b9
commit d4cfe0be54
6 changed files with 191 additions and 7 deletions

View File

@@ -388,6 +388,10 @@ class BarcodeClientApp:
self.btn_submit.configure(text="[F3] Pausa PL")
else:
self.btn_submit.configure(text="[F3] Carica")
if state.mode in ("priority_high", "priority_low"):
self.btn_unload.configure(text="[F4] Salta UDC")
else:
self.btn_unload.configure(text="[F4] Scarica")
queue_buttons_state = "disabled" if str(state.queue_label or "") == "Pausa PL" else "normal"
self.btn_f1.configure(state=queue_buttons_state)
self.btn_f2.configure(state=queue_buttons_state)
@@ -502,9 +506,8 @@ class BarcodeClientApp:
pallet = str(self.scanned_var.get() or "").strip()
destination = str(self.destination_var.get() or "").strip()
mode = getattr(self.service.state, "mode", "")
if pallet and mode in ("priority_high", "priority_low") and destination == self.SHIPPED_BARCODE:
# Legacy barcode flow: F4/Scarica confirms the prepared unload destination.
self._submit()
if mode in ("priority_high", "priority_low"):
self._skip_current_picking_pallet()
return
if pallet:
self._submit_unload_with_source_check()
@@ -539,6 +542,12 @@ class BarcodeClientApp:
busy_message="In esecuzione...",
)
def _skip_current_picking_pallet(self) -> None:
self._run_async(
lambda: self.service.skip_current_picking_pallet(),
busy_message="Registro salto UDC...",
)
def _run_async(self, coro_factory: Callable[[], object], busy_message: str) -> None:
if self._pending is not None and not self._pending.done():
return