improve single-code boxing UX: preserve state, fix work order display, add double-vibrate alert

- Keep UI state after boxing completion for operator review instead of auto-reset
- Show real work order number instead of hardcoded "本次扫码" in assigned list
- Add double-vibration feedback when re-scanning already completed zongpai
- Change completed status banner and dot from green to red for clearer warning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-05-19 17:05:26 +08:00
parent 7a95f49acc
commit a6ee6a718b
2 changed files with 29 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ enum FeedbackEvent {
duplicateError, // Duplicate (shelf) → alert loop + continuous vibrate
networkError, // Network error → failure sound + short vibrate
duplicateBoxNo, // Duplicate box no → failure sound + short vibrate
alreadyCompleted, // Zongpai already boxed → beep + double vibrate
modeSwitch, // Mode toggle → beep only
paichanSwitch, // Paichan changed → beep + short vibrate
}
@@ -55,6 +56,10 @@ class FeedbackService {
_soundService.playFailure();
_vibrateShort();
case FeedbackEvent.alreadyCompleted:
_soundService.playBeep();
_vibrateDouble();
case FeedbackEvent.modeSwitch:
_soundService.playBeep();
@@ -82,6 +87,11 @@ class FeedbackService {
Vibration.vibrate(pattern: [0, 300, 100, 300, 100, 300]);
}
/// Two short bursts to signal an already-completed item.
void _vibrateDouble() {
Vibration.vibrate(pattern: [0, 200, 100, 200]);
}
Future<void> dispose() async {
await _soundService.dispose();
}