|
|
@@ -74,6 +74,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 JTextField product_sn;
|
|
|
public static JButton f_scan_data_bt_1;
|
|
|
|
|
|
@@ -218,6 +219,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("000020015308-0100101425022500085");
|
|
|
product_sn.setText("");
|
|
|
MesClient.fxlabel.setVisible(false);
|
|
|
@@ -360,6 +362,7 @@ public class MesClient extends JFrame {
|
|
|
work_status = 1;
|
|
|
finish_ok_bt.setEnabled(true);
|
|
|
finish_ng_bt.setEnabled(true);
|
|
|
+ finish_ng_without_leak_bt.setEnabled(true);
|
|
|
startWeldButton();
|
|
|
closeRepairButton();
|
|
|
setMenuStatus("该工件可以加工", 0);
|
|
|
@@ -702,6 +705,37 @@ public class MesClient extends JFrame {
|
|
|
});
|
|
|
bottomPanel1.add(finish_ng_bt);
|
|
|
|
|
|
+ // 无漏点 NG:保留 NG 结果,但不记录泄漏点位。
|
|
|
+ finish_ng_without_leak_bt = new JButton("无漏点NG");
|
|
|
+ finish_ng_without_leak_bt.setEnabled(false);
|
|
|
+ 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, 28));
|
|
|
+ finish_ng_without_leak_bt.setPreferredSize(new Dimension(240, 80));
|
|
|
+ finish_ng_without_leak_bt.addActionListener(new ActionListener() {
|
|
|
+ public void actionPerformed(ActionEvent e) {
|
|
|
+ if(work_status == 1 && check_quality_result){
|
|
|
+ String sn = product_sn.getText();
|
|
|
+ if(sn == null || sn.trim().isEmpty()){
|
|
|
+ MesClient.setMenuStatus("工件码为空,请重试",-1);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ getUser();
|
|
|
+
|
|
|
+ // 与普通 NG 使用同一记录/上传接口,ldFlag 为空表示无泄漏点位。
|
|
|
+ JSONObject retObj = DataUtil.pcResult(sn, user20, "", "NG", isRepair);
|
|
|
+ if (retObj != null && retObj.get("result") != null && retObj.get("result").toString().equalsIgnoreCase("true")) {
|
|
|
+ MesClient.resetScanA();
|
|
|
+ MesClient.setMenuStatus("无漏点NG上传成功,请扫下一件", 0);
|
|
|
+ MesClient.scan_type = 1;
|
|
|
+ MesClient.scanBarcode();
|
|
|
+ } else {
|
|
|
+ MesClient.setMenuStatus("无漏点NG上传失败,请重试", -1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ bottomPanel1.add(finish_ng_without_leak_bt);
|
|
|
+
|
|
|
tabbedPane.setEnabledAt(0, true);
|
|
|
|
|
|
// searchScrollPane = new JScrollPane((Component) null);
|