订单流程添加修改

This commit is contained in:
lidg
2026-08-20 11:22:55 +08:00
parent 0c4fd6844c
commit 4e99071ce1
31 changed files with 1359 additions and 241 deletions
+16
View File
@@ -144,6 +144,7 @@ void RackPage::updateTrayButtons()
SquareTrayButton *button = rackTrayButtons.at(index);
if (index >= trays.size()) {
button->setTrayInfo(0, QString(), 0, "无数据", false);
button->setPlanned(false);
button->setChecked(false);
continue;
}
@@ -151,6 +152,21 @@ void RackPage::updateTrayButtons()
const Tray &tray = trays.at(index);
button->setTrayInfo(tray.id, tray.code, tray.loadedCount,
tray.status, tray.present);
bool planned = false;
QString error;
const QList<TraySlot> traySlots =
TrayService::instance().listSlots(tray.id, &error);
if (error.isEmpty()) {
for (const TraySlot &slot : traySlots) {
if (slot.state == "PENDING" || slot.state == "PROCESSING"
|| slot.state == "FRONT_CHECKING"
|| slot.state == "BACK_CHECKING") {
planned = true;
break;
}
}
}
button->setPlanned(planned);
button->setChecked(index == selectedTrayIndex);
}
}