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