Browse Source

展示拉力,行程

zhanghe 4 ngày trước cách đây
mục cha
commit
7c56809045
2 tập tin đã thay đổi với 44 bổ sung5 xóa
  1. 42 5
      src/com/mes/ui/MesClient.java
  2. 2 0
      src/com/mes/ui/ModbusUtil.java

+ 42 - 5
src/com/mes/ui/MesClient.java

@@ -103,6 +103,11 @@ public class MesClient extends JFrame {
     public static Short sortA = 0;
     public static Short aMax = 0;
     public static Short aFinish = 0; //合格数量
+    //A拉力
+    public static JTextField lm_fout_A;
+    //A行程
+    public static JTextField lm_sout_A;
+
     public static List<Map> alist = new ArrayList<>();
     public static Short bSetNum = 10;
     public static Short sortB = 0;
@@ -417,7 +422,8 @@ public class MesClient extends JFrame {
 
         MesClient.param3.setVisible(false);
         MesClient.param4.setVisible(false);
-
+        lm_fout_A.setText("");
+        lm_sout_A.setText("");
         ModbusUtil.setPowerOff(MesClient.plcA); // 远程关机
 //        ModbusUtil.setMesUnAllow(MesClient.plcA, MesClient.deviceHeartTimer);
         ModbusUtil.setTask(MesClient.plcA,aSetNum);
@@ -769,7 +775,7 @@ public class MesClient extends JFrame {
         JLabel lblNewLabel_1 = new JLabel("\u9884\u8BBE\u6570\u91CF");
         lblNewLabel_1.setFont(new Font("微软雅黑", Font.PLAIN, 18));
 //        lblNewLabel_1.setBounds(204, 241, 83, 34);
-        lblNewLabel_1.setBounds(304, 241, 83, 34);
+        lblNewLabel_1.setBounds(254, 241, 83, 34);
         indexPanelA.add(lblNewLabel_1);
 
         param1 = new JTextField();
@@ -778,14 +784,14 @@ public class MesClient extends JFrame {
         param1.setText("0");
         param1.setEditable(false);
 //        param1.setBounds(288, 241, 83, 34);
-        param1.setBounds(388, 241, 83, 34);
+        param1.setBounds(348, 241, 83, 34);
         indexPanelA.add(param1);
         param1.setColumns(10);
 
         JLabel lblNewLabel_1_1 = new JLabel("\u5B8C\u6210\u6570\u91CF");
         lblNewLabel_1_1.setFont(new Font("微软雅黑", Font.PLAIN, 18));
 //        lblNewLabel_1_1.setBounds(204, 285, 83, 34);
-        lblNewLabel_1_1.setBounds(304, 285, 83, 34);
+        lblNewLabel_1_1.setBounds(254, 285, 83, 34);
         indexPanelA.add(lblNewLabel_1_1);
 
         param2 = new JTextField();
@@ -795,7 +801,7 @@ public class MesClient extends JFrame {
         param2.setEditable(false);
         param2.setColumns(10);
 //        param2.setBounds(288, 285, 83, 34);
-        param2.setBounds(388, 285, 83, 34);
+        param2.setBounds(348, 285, 83, 34);
         indexPanelA.add(param2);
 
         JLabel lblB = new JLabel("B\u67AA");
@@ -835,6 +841,37 @@ public class MesClient extends JFrame {
         indexPanelA.add(param4);
         MesClient.param4.setVisible(false);
 
+
+        JLabel lm_fout_label = new JLabel("拉力");
+        lm_fout_label.setFont(new Font("微软雅黑", Font.PLAIN, 18));
+        lm_fout_label.setBounds(500, 241, 83, 34);
+        indexPanelA.add(lm_fout_label);
+
+        lm_fout_A = new JTextField();
+        lm_fout_A.setHorizontalAlignment(SwingConstants.CENTER);
+        lm_fout_A.setFont(new Font("微软雅黑", Font.PLAIN, 18));
+        lm_fout_A.setEditable(false);
+        lm_fout_A.setColumns(10);
+        lm_fout_A.setBounds(570, 241, 83, 34);
+        indexPanelA.add(lm_fout_A);
+
+        JLabel lm_sout_label = new JLabel("行程");
+        lm_sout_label.setFont(new Font("微软雅黑", Font.PLAIN, 18));
+        lm_sout_label.setBounds(500, 285, 83, 34);
+        indexPanelA.add(lm_sout_label);
+
+        lm_sout_A = new JTextField();
+        lm_sout_A.setHorizontalAlignment(SwingConstants.CENTER);
+        lm_sout_A.setFont(new Font("微软雅黑", Font.PLAIN, 18));
+        lm_sout_A.setEditable(false);
+        lm_sout_A.setColumns(10);
+        lm_sout_A.setBounds(570, 285, 83, 34);
+        indexPanelA.add(lm_sout_A);
+
+
+
+
+
         tabbedPane.addTab("工作面板", new ImageIcon(MesClient.class.getResource("/bg/a_side.png")), indexScrollPaneA, null);
         tabbedPane.setEnabledAt(0, true);
 

+ 2 - 0
src/com/mes/ui/ModbusUtil.java

@@ -42,6 +42,8 @@ public class ModbusUtil {
             String fmax = plc.readInt16(1069)+"";
             String smax = (float)plc.readInt16(1071)/1000+"";
 
+            MesClient.lm_fout_A.setText(fout);
+            MesClient.lm_sout_A.setText(sout);
             MesClient.param2.setText(cur+"");
             System.out.println("cur:"+cur);
             if(!MesClient.product_sn.getText().isEmpty()){