|
|
@@ -70,6 +70,7 @@ public class MesClient extends JFrame {
|
|
|
public static int scan_type = 0;
|
|
|
public static JButton finish_ok_bt;
|
|
|
public static JButton finish_ng_bt;
|
|
|
+ public static JButton finish_ng_without_leak_bt;
|
|
|
public static JButton manual_ng_bt; // 人工判定NG按钮
|
|
|
public static JTextField product_sn;
|
|
|
public static JButton f_scan_data_bt_1;
|
|
|
@@ -343,6 +344,7 @@ public class MesClient extends JFrame {
|
|
|
check_quality_result = false;
|
|
|
MesClient.finish_ok_bt.setEnabled(false);
|
|
|
MesClient.finish_ng_bt.setEnabled(false);
|
|
|
+ MesClient.finish_ng_without_leak_bt.setEnabled(false);
|
|
|
product_sn.setText("");
|
|
|
product_sn.setEditable(true);
|
|
|
tjFlag = 0;
|
|
|
@@ -1140,6 +1142,18 @@ public class MesClient extends JFrame {
|
|
|
finish_ng_bt.setPreferredSize(new Dimension(240, 80));
|
|
|
bottomPanel.add(finish_ng_bt);
|
|
|
|
|
|
+ finish_ng_without_leak_bt = new JButton("无漏点NG");
|
|
|
+ finish_ng_without_leak_bt.setEnabled(false);
|
|
|
+ finish_ng_without_leak_bt.addActionListener(new ActionListener() {
|
|
|
+ public void actionPerformed(ActionEvent e) {
|
|
|
+ handleNgWithoutLeakButton();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ finish_ng_without_leak_bt.setIcon(new ImageIcon(MesClient.class.getResource("/bg/ng_bg.png")));
|
|
|
+ finish_ng_without_leak_bt.setFont(new Font("微软雅黑", Font.PLAIN, 24));
|
|
|
+ finish_ng_without_leak_bt.setPreferredSize(new Dimension(240, 80));
|
|
|
+ bottomPanel.add(finish_ng_without_leak_bt);
|
|
|
+
|
|
|
indexPanelA.add(bottomPanel, BorderLayout.SOUTH);
|
|
|
|
|
|
// 移除固定尺寸限制,让面板自适应
|
|
|
@@ -1859,6 +1873,7 @@ public class MesClient extends JFrame {
|
|
|
|
|
|
// 设备判NG时的按钮互斥逻辑
|
|
|
if (deviceResult.equals("NG")) {
|
|
|
+ finish_ng_without_leak_bt.setEnabled(true);
|
|
|
if (hasSelected) {
|
|
|
// 选了漏点:NG可点,OK不可点
|
|
|
finish_ng_bt.setEnabled(true);
|
|
|
@@ -1873,6 +1888,7 @@ public class MesClient extends JFrame {
|
|
|
else if (deviceResult.equals("OK") && countdownTimer == null) {
|
|
|
// 人工判定NG后的状态:选了漏点才能点NG
|
|
|
finish_ng_bt.setEnabled(hasSelected);
|
|
|
+ finish_ng_without_leak_bt.setEnabled(true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1915,6 +1931,7 @@ public class MesClient extends JFrame {
|
|
|
// 禁用OK/NG按钮(倒计时期间不显示)
|
|
|
finish_ok_bt.setEnabled(false);
|
|
|
finish_ng_bt.setEnabled(false);
|
|
|
+ finish_ng_without_leak_bt.setEnabled(false);
|
|
|
|
|
|
// 启动定时器
|
|
|
if (countdownTimer != null) {
|
|
|
@@ -1994,6 +2011,7 @@ public class MesClient extends JFrame {
|
|
|
// OK按钮启用(允许人工改判OK),NG按钮初始禁用(需要选漏点)
|
|
|
finish_ok_bt.setEnabled(true);
|
|
|
finish_ng_bt.setEnabled(false);
|
|
|
+ finish_ng_without_leak_bt.setEnabled(true);
|
|
|
|
|
|
setMenuStatus("设备判定NG,可人工改判OK或选漏点提交NG", 1);
|
|
|
}
|
|
|
@@ -2015,6 +2033,7 @@ public class MesClient extends JFrame {
|
|
|
// OK按钮显示但禁用,NG按钮初始禁用(需要选漏点)
|
|
|
finish_ok_bt.setEnabled(false);
|
|
|
finish_ng_bt.setEnabled(false);
|
|
|
+ finish_ng_without_leak_bt.setEnabled(true);
|
|
|
|
|
|
setMenuStatus("请至少选择1个漏点,然后点击NG提交", 1);
|
|
|
}
|
|
|
@@ -2080,6 +2099,31 @@ public class MesClient extends JFrame {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 提交NG结果,不提交泄露点位。
|
|
|
+ */
|
|
|
+ private static void handleNgWithoutLeakButton() {
|
|
|
+ if (pendingTestParam == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ pendingTestParam.setResult("NG");
|
|
|
+ if (MesClient.mes_enable) {
|
|
|
+ JSONObject retObj = DataUtil.qmResultData(pendingTestParam);
|
|
|
+ if (retObj != null && retObj.get("result") != null && retObj.get("result").toString().equalsIgnoreCase("true")) {
|
|
|
+ boolean localRecordSaved = pendingTestParam.localRecordSaved;
|
|
|
+ printLabelIfEnabled();
|
|
|
+ resetScanA();
|
|
|
+ setMenuStatus(localRecordSaved ? "无漏点NG已提交,请扫下一件" : "服务器已上传,但本地记录保存失败,请联系管理员", localRecordSaved ? 0 : -1);
|
|
|
+ } else {
|
|
|
+ setMenuStatus("测试结果上传失败,请重试", -1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ printLabelIfEnabled();
|
|
|
+ resetScanA();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 提交NG结果 + 漏点记录
|
|
|
*/
|
|
|
private static void submitNgWithLeakPoints(String leakPoints, boolean isManualOverride) {
|