订单流程添加修改
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user