dkk 2 тижнів тому
батько
коміт
d2ec351a98

+ 1 - 1
src/com/mes/ui/DataUtil.java

@@ -23,7 +23,7 @@ public class DataUtil {
             String url = "http://"+serverIp+":8980/js/a/mes/mesProductRecord/getCurSn";
             String params = "__ajax=json&oprno="+oprno+"&lineSn="+lineSn+"&__sid="+MesClient.sessionid;
             JSONObject result = JSONObject.parseObject(doPost(url, params));
-            System.out.println("请求参数:"+params);
+            log.info("请求参数:"+params);
             return result;
         } catch (Exception e) {
             log.info("e="+e.getMessage());

+ 1 - 1
src/com/mes/ui/LoginFarme.java

@@ -22,7 +22,7 @@ public class LoginFarme extends JFrame {
     static JButton scanLoginButton = new JButton("扫  码  登  录");
 
     public LoginFarme(){
-        setTitle("MES系统客户端:"+MesClient.mes_gw+" - "+MesClient.mes_gw_des);
+        setTitle("MES系统客户端:"+"工作站1");
 
         ImageIcon bg = new ImageIcon(MesClient.class.getResource("/background.png"));
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

+ 2 - 2
src/com/mes/ui/MultiStationClient.java

@@ -229,7 +229,7 @@ public class MultiStationClient extends JFrame {
         add(toolBar, BorderLayout.NORTH);
 
         JTabbedPane tabbedPane = new JTabbedPane();
-        tabbedPane.setFont(new Font("微软雅黑", Font.PLAIN, 30));
+        tabbedPane.setFont(new Font("微软雅黑", Font.PLAIN, 20));
 
         try {
             List<StationConfig> stations = StationConfig.loadAllStations();
@@ -238,7 +238,7 @@ public class MultiStationClient extends JFrame {
                 return;
             }
             
-            JPanel mainPanel = new JPanel(new GridLayout(2, 3, 10, 10));
+            JPanel mainPanel = new JPanel(new GridLayout(2, 3, 1, 1));
             mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
             mainPanel.setBackground(Color.WHITE);
 

+ 15 - 14
src/com/mes/ui/WorkStationPanel.java

@@ -51,7 +51,7 @@ public class WorkStationPanel extends JPanel {
             gw + " - " + gwDes, 
             TitledBorder.CENTER, 
             TitledBorder.TOP,
-            new Font("微软雅黑", Font.BOLD, 30),
+            new Font("微软雅黑", Font.BOLD, 20),
             Color.BLUE));
         
         setLayout(new BorderLayout(5, 5));
@@ -61,7 +61,7 @@ public class WorkStationPanel extends JPanel {
         topPanel.setBackground(Color.WHITE);
         
         statusLabel = new JLabel("等待扫码");
-        statusLabel.setFont(new Font("微软雅黑", Font.PLAIN, 24));
+        statusLabel.setFont(new Font("微软雅黑", Font.PLAIN, 20));
         statusLabel.setForeground(Color.RED);
         topPanel.add(statusLabel);
         
@@ -86,12 +86,12 @@ public class WorkStationPanel extends JPanel {
         productSnField.setEditable(false);
         productSnField.setFont(new Font("微软雅黑", Font.BOLD, 15));
         productSnField.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
-        productSnField.setColumns(18);
-        productSnField.setPreferredSize(new Dimension(150, 35));
+        productSnField.setColumns(15);
+        productSnField.setPreferredSize(new Dimension(100, 30));
         scanButton = new JButton("扫码");
-        scanButton.setIcon(new ImageIcon(getClass().getResource("/bg/scan_barcode.png")));
-        scanButton.setFont(new Font("微软雅黑", Font.BOLD, 15));
-        scanButton.setPreferredSize(new Dimension(110, 35));
+//        scanButton.setIcon(new ImageIcon(getClass().getResource("/bg/scan_barcode.png")));
+        scanButton.setFont(new Font("微软雅黑", Font.PLAIN, 15));
+        scanButton.setPreferredSize(new Dimension(70, 30));
         scanButton.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
@@ -132,7 +132,7 @@ public class WorkStationPanel extends JPanel {
             }
         });
 
-        JPanel linePanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 10, 0));
+        JPanel linePanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 1, 0));
         linePanel.add(productSnField);
         linePanel.add(scanButton);
         centerPanel.add(linePanel);
@@ -142,7 +142,7 @@ public class WorkStationPanel extends JPanel {
         finishOkButton = new JButton("OK");
         finishOkButton.setIcon(new ImageIcon(getClass().getResource("/bg/ok_bg.png")));
         finishOkButton.setFont(new Font("微软雅黑", Font.PLAIN, 25));
-        finishOkButton.setPreferredSize(new Dimension(150, 60));
+        finishOkButton.setPreferredSize(new Dimension(120, 30));
         finishOkButton.setEnabled(false);
         finishOkButton.addActionListener(new ActionListener() {
             @Override
@@ -156,7 +156,7 @@ public class WorkStationPanel extends JPanel {
         finishNgButton = new JButton("NG");
         finishNgButton.setFont(new Font("微软雅黑", Font.PLAIN, 25));
         finishNgButton.setIcon(new ImageIcon(MesClient.class.getResource("/bg/ng_bg.png")));
-        finishNgButton.setPreferredSize(new Dimension(150, 60));
+        finishNgButton.setPreferredSize(new Dimension(120, 30));
         finishNgButton.setEnabled(false);
         finishNgButton.addActionListener(new ActionListener() {
             @Override
@@ -175,8 +175,8 @@ public class WorkStationPanel extends JPanel {
         bottomPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         JButton checkRecordButton = new JButton("点检记录");
-        checkRecordButton.setFont(new Font("微软雅黑", Font.PLAIN, 18));
-        checkRecordButton.setPreferredSize(new Dimension(150, 40));
+        checkRecordButton.setFont(new Font("微软雅黑", Font.PLAIN, 15));
+        checkRecordButton.setPreferredSize(new Dimension(100, 30));
         checkRecordButton.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
@@ -185,8 +185,8 @@ public class WorkStationPanel extends JPanel {
         });
 
         JButton workRecordButton = new JButton("工作记录");
-        workRecordButton.setFont(new Font("微软雅黑", Font.PLAIN, 18));
-        workRecordButton.setPreferredSize(new Dimension(150, 40));
+        workRecordButton.setFont(new Font("微软雅黑", Font.PLAIN, 15));
+        workRecordButton.setPreferredSize(new Dimension(100, 30));
         workRecordButton.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
@@ -259,6 +259,7 @@ public class WorkStationPanel extends JPanel {
                 resetState();
                 statusLabel.setForeground(Color.GREEN);
                 statusLabel.setText("结果提交成功,请扫下一件");
+                finishNgButton.setEnabled(false);
             } else {
                 statusLabel.setForeground(Color.RED);
                 String msg = (retObj != null && retObj.containsKey("message")) ? retObj.getString("message") : "提交失败";