From 334b16b4abb4cbe3d1d4e4f211efd6f4468ae09f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 19 九月 2025 15:12:52 +0800
Subject: [PATCH] 1.ControlJob和ProcessJob的中断操作,强制结批增加字符串描述原因,方便生产跟踪。
---
SourceCode/Bond/Servo/ServoDlg.cpp | 44 +++++++++++++++++++++++++++-----------------
1 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index 646641d..10cecb9 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -28,6 +28,7 @@
#include "CPageCollectionEvent.h"
#include "CControlJobDlg.h"
#include "InputDialog.h"
+#include "CControlJobManagerDlg.h"
#ifdef _DEBUG
@@ -217,6 +218,22 @@
m_pMyStatusbar->setBackgroundColor(STATUSBAR_BK_ALARM);
m_pMyStatusbar->setForegroundColor(RGB(0, 0, 0));
m_pMyStatusbar->setRunTimeText("启动失败.");
+ m_pTopToolbar->GetBtn(IDC_BUTTON_ALARM)->EnableWindow(TRUE);
+ KillTimer(TIMER_ID_UPDATE_RUMTIME);
+ }
+ else if (state == SERVO::MASTERSTATE::ATHERERROR) {
+ m_pTopToolbar->GetBtn(IDC_BUTTON_RUN)->EnableWindow(TRUE);
+ m_pTopToolbar->GetBtn(IDC_BUTTON_RUN_BATCH)->EnableWindow(TRUE);
+ m_pTopToolbar->GetBtn(IDC_BUTTON_RUN_CT)->EnableWindow(TRUE);
+ m_pTopToolbar->GetBtn(IDC_BUTTON_STOP)->EnableWindow(FALSE);
+ m_pMyStatusbar->setBackgroundColor(STATUSBAR_BK_ALARM);
+ m_pMyStatusbar->setForegroundColor(RGB(0, 0, 0));
+ m_pMyStatusbar->setRunTimeText(theApp.m_model.getMaster().getLastErrorText().c_str());
+ if (theApp.m_model.getMaster().getLastError() == ER_CODE_AOI_NG) {
+ AfxMessageBox(_T("AOI检测失败,请操作员介入解决问题!"));
+ }
+ m_pTopToolbar->GetBtn(IDC_BUTTON_ALARM)->EnableWindow(TRUE);
+ KillTimer(TIMER_ID_UPDATE_RUMTIME);
}
else if (state == SERVO::MASTERSTATE::RUNNING || state == SERVO::MASTERSTATE::RUNNING_CONTINUOUS_TRANSFER
|| state == SERVO::MASTERSTATE::RUNNING_BATCH) {
@@ -645,6 +662,7 @@
void CServoDlg::OnMenuHelpAbout()
{
+ theApp.m_model.getMaster().test();
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
@@ -972,20 +990,6 @@
{
int id = (int)lParam;
if (id == IDC_BUTTON_RUN || id == IDC_BUTTON_STOP) {
- //CInputDialog inputDialog(_T("验证用户"), _T("请输入用户密码:"));
- //if (inputDialog.DoModal() != IDOK) {
- // AfxMessageBox(_T("取消验证!"));
- // return 0;
- //}
-
- //CString inputText = inputDialog.GetInputText();
- //std::string strPass = UserManager::getInstance().getCurrentPass();
- //if (inputText.Compare(strPass.c_str()) != 0) {
- // AfxMessageBox(_T("密码错误!"));
- // SystemLogManager::getInstance().log(SystemLogManager::LogType::Info, _T("验证时,密码错误!"));
- // return 0;
- //}
-
UserRole emRole = UserManager::getInstance().getCurrentUserRole();
if (emRole != UserRole::SuperAdmin) {
AfxMessageBox(_T("当前用户并非管理员!!!"));
@@ -1035,9 +1039,15 @@
}
}
else if (id == IDC_BUTTON_JOBS) {
- CControlJobDlg dlg;
- dlg.SetControlJob(theApp.m_model.m_master.getControlJob());
- dlg.DoModal();
+ static int i = 0; i++;
+ if (i % 2 == 0) {
+ CControlJobManagerDlg dlg;
+ dlg.DoModal();
+ }
+ else {
+ CControlJobDlg dlg;
+ dlg.DoModal();
+ }
}
else if (id == IDC_BUTTON_PORT_CONFIG) {
CPortConfigurationDlg dlg;
--
Gitblit v1.9.3