feat(production): 界面表格优化

This commit is contained in:
lidg
2026-11-05 14:14:29 +08:00
parent 5f4649832e
commit 6da5622181
10 changed files with 183 additions and 18 deletions
+19
View File
@@ -297,6 +297,12 @@ void QualityPage::setupInspectionTab()
QStringList() << "时间" << "订单号" << "工件条码" << "托盘" << "位置"
<< "模式" << "检测面" << "结果" << "原始结果"
<< "来源" << "耗时" << "次数");
const int dateTimeWidth = UiHelpers::textColumnWidth(
inspectionTable, "2026-10-30 23:59:59");
UiHelpers::configureTableColumns(
inspectionTable,
QList<int>() << dateTimeWidth << 110 << 150 << 85 << 65 << 90
<< 75 << 75 << 85 << 90 << 90 << 65);
inspectionMessageLabel = new QLabel;
}
@@ -314,6 +320,8 @@ void QualityPage::setupStatisticsTab()
statisticsMessageLabel = new QLabel;
sideStatisticsTable = UiHelpers::makeTable(
QStringList() << "检测面" << "合格" << "不合格" << "记录数");
UiHelpers::configureTableColumns(
sideStatisticsTable, QList<int>() << 120 << 100 << 100 << 110);
addTableRow(sideStatisticsTable, QStringList() << "正面" << "-" << "-" << "-");
addTableRow(sideStatisticsTable, QStringList() << "反面" << "-" << "-" << "-");
}
@@ -328,12 +336,23 @@ void QualityPage::setupTraceTab()
traceInspectionTable = UiHelpers::makeTable(
QStringList() << "时间" << "模式" << "检测面" << "结果" << "原始结果"
<< "来源" << "耗时" << "次数");
const int dateTimeWidth = UiHelpers::textColumnWidth(
traceInspectionTable, "2026-10-30 23:59:59");
UiHelpers::configureTableColumns(
traceInspectionTable,
QList<int>() << dateTimeWidth << 90 << 75 << 75 << 85 << 90 << 90 << 65);
traceProcessTable = UiHelpers::makeTable(
QStringList() << "开始时间" << "工序" << "状态" << "结果" << "来源"
<< "PLC步骤" << "耗时" << "次数");
UiHelpers::configureTableColumns(
traceProcessTable,
QList<int>() << dateTimeWidth << 130 << 100 << 80 << 90 << 80 << 90 << 65);
traceHistoryTable = UiHelpers::makeTable(
QStringList() << "时间" << "状态变化" << "工序" << "来源"
<< "原因" << "耗时" << "说明");
UiHelpers::configureTableColumns(
traceHistoryTable,
QList<int>() << dateTimeWidth << 150 << 120 << 90 << 160 << 90 << 200);
}
void QualityPage::loadInspectionRecords()