|
|
@@ -3,6 +3,7 @@ package com.mes.ui;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType;
|
|
|
import com.github.xingshuangs.iot.protocol.s7.service.S7PLC;
|
|
|
+import com.mes.component.MesClientComponent;
|
|
|
import com.mes.component.MesRadio;
|
|
|
import com.mes.component.MesWebView;
|
|
|
import com.mes.netty.NettyClient;
|
|
|
@@ -69,7 +70,8 @@ public class MesClient extends JFrame {
|
|
|
public static JScrollPane indexScrollPaneA;
|
|
|
public static JScrollPane searchScrollPane;
|
|
|
public static JScrollPane searchScrollPaneDj;
|
|
|
-
|
|
|
+ // 存储工位号和对应的MesClientComponent组件的映射
|
|
|
+ public static Map<String, MesClientComponent> componentMap = new HashMap<>();
|
|
|
|
|
|
public static Boolean check_quality_result = false;
|
|
|
public static Integer work_status = 0;
|
|
|
@@ -112,26 +114,6 @@ public class MesClient extends JFrame {
|
|
|
private static final String[] SKIP_PROPERTIES = {"hgA_qr_code", "hgB_qr_code"};
|
|
|
// 新增:存储动态生成的工位输入框(key=工位号,value=输入框)
|
|
|
private static Map<String, JTextField> oprnoTextFieldMap = new HashMap<>();
|
|
|
- // 输入框相关配置(可调整)
|
|
|
- private static final int TEXT_FIELD_WIDTH = 602; // 输入框宽度
|
|
|
- private static final int TEXT_FIELD_HEIGHT = 50; // 输入框高度
|
|
|
- private static final int TEXT_FIELD_X = 81; // 输入框X坐标(与原有工件码输入框对齐)
|
|
|
- private static final int TEXT_FIELD_MARGIN = 20; // 输入框之间的间距
|
|
|
- private static final Font TEXT_FIELD_FONT = new Font("微软雅黑", Font.PLAIN, 22); // 输入框字体
|
|
|
-
|
|
|
- // 定时任务池
|
|
|
- private static ScheduledExecutorService schedulerPool;
|
|
|
- // 存储每个工位的定时任务,用于后续管理和取消
|
|
|
- private static Map<String, ScheduledFuture<?>> taskMap = new HashMap<>();
|
|
|
- // 定时任务执行间隔(毫秒)
|
|
|
- // 定时任务开关状态
|
|
|
- public static boolean scheduledTasksEnabled = false;
|
|
|
- private static final long TASK_INTERVAL = 1000;
|
|
|
- // 时间打印任务间隔(毫秒)
|
|
|
- private static final long TIME_PRINT_INTERVAL = 500; // 0.5秒
|
|
|
- // 时间打印任务的引用
|
|
|
- private static ScheduledFuture<?> timePrintTask = null;
|
|
|
-
|
|
|
//点检字段
|
|
|
public static Boolean check_info = false;
|
|
|
|
|
|
@@ -195,7 +177,7 @@ public class MesClient extends JFrame {
|
|
|
log.info("工位信息" + oprno.toString());
|
|
|
}
|
|
|
|
|
|
- DataUtil.getCheckInfo();
|
|
|
+ //DataUtil.getCheckInfo();
|
|
|
}
|
|
|
|
|
|
// 初始化TCP
|
|
|
@@ -218,167 +200,29 @@ public class MesClient extends JFrame {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 为指定工位创建定时任务
|
|
|
- * @param oprnoCode 工位号
|
|
|
- * @param textField 对应的输入框
|
|
|
+ * 创建工作面板
|
|
|
*/
|
|
|
- private void createScheduledTask(final String oprnoCode, final JTextField textField) {
|
|
|
- // 先取消可能存在的旧任务
|
|
|
- if (taskMap.containsKey(oprnoCode)) {
|
|
|
- ScheduledFuture<?> oldTask = taskMap.get(oprnoCode);
|
|
|
- if (!oldTask.isCancelled()) {
|
|
|
- oldTask.cancel(false);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 只有当定时任务开关开启时才创建任务
|
|
|
- if (scheduledTasksEnabled) {
|
|
|
- // 创建新的定时任务
|
|
|
- ScheduledFuture<?> task = schedulerPool.scheduleAtFixedRate(() -> {
|
|
|
- // 在每次执行前检查开关状态
|
|
|
- if (scheduledTasksEnabled) {
|
|
|
- try {
|
|
|
- // 从PLC读取数据(这里是示例,实际使用时需要根据工位号确定对应的PLC地址)
|
|
|
- String sn = S7PLCUtils.getSnInOprno(oprnoMap.get(oprnoCode), s7PLC).trim();
|
|
|
- // 使用SwingUtilities确保在事件调度线程中更新UI
|
|
|
- SwingUtilities.invokeLater(() -> {
|
|
|
- // 更新输入框内容
|
|
|
-// System.out.println(sn + "加工完成情况" + s7PLC.readBoolean(oprnoMap.get(oprnoCode).process_ok));
|
|
|
-
|
|
|
- textField.setText(sn);
|
|
|
- });
|
|
|
- // 当从对应plc中取到加工完成时执行
|
|
|
- if (s7PLC.readBoolean(oprnoMap.get(oprnoCode).process_ok)){
|
|
|
- textField.setText(oprnoCode+"加工完成");
|
|
|
- System.out.println("工位号:"+oprnoCode);
|
|
|
- System.out.println("工位dizhi:"+oprnoMap.get(oprnoCode).process_ok);
|
|
|
- System.out.println("sn:"+sn);
|
|
|
- System.out.println("加工完成:---------------"+sn);
|
|
|
- String qret = "OK";
|
|
|
- if (!S7PLCUtils.getResultInOprno(oprnoMap.get(oprnoCode),s7PLC)){
|
|
|
- qret = "NG";
|
|
|
- }
|
|
|
- System.out.println("加工结果:---------------"+qret);
|
|
|
- Boolean sendret = DataUtil.sendQualityByGW(nettyClient,sn,qret,user20,oprnoCode);
|
|
|
- if (!sendret){
|
|
|
- log.error("发送数据失败");
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("定时任务执行异常,工位号: " + oprnoCode, e);
|
|
|
- // 在异常情况下,也在事件调度线程中更新UI显示错误信息
|
|
|
- SwingUtilities.invokeLater(() -> {
|
|
|
- textField.setText("读取错误");
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }, 0, TASK_INTERVAL, TimeUnit.MILLISECONDS);
|
|
|
-
|
|
|
- // 保存任务引用以便后续管理
|
|
|
- taskMap.put(oprnoCode, task);
|
|
|
- } else {
|
|
|
- log.info("定时任务已关闭,未为工位 " + oprnoCode + " 创建定时任务");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ private void createOprnoPanel(JPanel parentPanel){
|
|
|
|
|
|
-
|
|
|
- /**
|
|
|
- * 新增:动态生成工位输入框(根据 oprnoMap 的 key 数量)
|
|
|
- * @param parentPanel 父面板(indexPanelA)
|
|
|
- */
|
|
|
- private void generateOprnoTextFields(JPanel parentPanel) {
|
|
|
- // 输入框起始Y坐标(在返修件提示标签下方,避免与OK/NG按钮重叠)
|
|
|
- int startY = 80; // 整体上移,减少顶部空白空间
|
|
|
- // 标签宽度设置
|
|
|
- int labelWidth = 120;
|
|
|
- // 按钮宽度
|
|
|
- int buttonWidth = 100;
|
|
|
- // 输入框和按钮之间的间距
|
|
|
- int gapBetweenFieldAndButton = 5;
|
|
|
- // 调整后的输入框宽度(为按钮腾出空间)
|
|
|
- int adjustedTextFieldWidth = TEXT_FIELD_WIDTH - labelWidth - buttonWidth - gapBetweenFieldAndButton;
|
|
|
-
|
|
|
- // 初始化定时任务池(如果尚未初始化)
|
|
|
- if (schedulerPool == null || schedulerPool.isShutdown()) {
|
|
|
- schedulerPool = Executors.newScheduledThreadPool(oprnoMap.size());
|
|
|
- }
|
|
|
-
|
|
|
- // 创建一个子面板来容纳所有输入框和标签,便于管理和滚动
|
|
|
- JPanel textFieldsPanel = new JPanel();
|
|
|
- textFieldsPanel.setLayout(null);
|
|
|
- textFieldsPanel.setBounds(TEXT_FIELD_X, startY, TEXT_FIELD_WIDTH, 100 + oprnoMap.size() * (TEXT_FIELD_HEIGHT + TEXT_FIELD_MARGIN));
|
|
|
- textFieldsPanel.setVisible(true); // 确保工位输入框和标签面板可见
|
|
|
-
|
|
|
- // 遍历 oprnoMap,生成输入框和标签(按工位号排序)
|
|
|
List<String> oprnoCodes = new ArrayList<>(oprnoMap.keySet());
|
|
|
Collections.sort(oprnoCodes); // 排序,确保输入框顺序固定
|
|
|
-
|
|
|
int fieldY = 0;
|
|
|
for (String oprnoCode : oprnoCodes) {
|
|
|
- // 1. 创建工位号标签
|
|
|
- JLabel label = new JLabel(oprnoCode + ":");
|
|
|
- label.setFont(TEXT_FIELD_FONT); // 使用与输入框相同的字体,保持一致性
|
|
|
- label.setHorizontalAlignment(SwingConstants.RIGHT); // 右对齐,便于与输入框对齐
|
|
|
- label.setVerticalAlignment(SwingConstants.CENTER);
|
|
|
- label.setBounds(0, fieldY, labelWidth, TEXT_FIELD_HEIGHT);
|
|
|
- label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); // 右侧添加一些边距
|
|
|
- textFieldsPanel.add(label);
|
|
|
-
|
|
|
- // 2. 创建输入框
|
|
|
- JTextField textField = new JTextField();
|
|
|
- textField.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
- textField.setEditable(false); // 设为不可编辑(与工件码输入框一致)
|
|
|
- textField.setFont(TEXT_FIELD_FONT);
|
|
|
- textField.setToolTipText("工位:" + oprnoCode); // 鼠标悬浮提示工位号
|
|
|
- // 设置输入框位置和大小(调整宽度和X坐标,为按钮腾出空间)
|
|
|
- textField.setBounds(labelWidth, fieldY, adjustedTextFieldWidth, TEXT_FIELD_HEIGHT);
|
|
|
- // 设置输入框默认文本(只显示状态信息,不包含工位号)
|
|
|
- textField.setText("");
|
|
|
-
|
|
|
- // 3. 存储输入框到Map(后续可通过工位号获取/修改输入框内容)
|
|
|
- oprnoTextFieldMap.put(oprnoCode, textField);
|
|
|
-
|
|
|
- // 4. 创建刷新按钮
|
|
|
- JButton refreshButton = new JButton("手动上料");
|
|
|
- refreshButton.setFont(new Font("SimHei", Font.PLAIN, 12));
|
|
|
- refreshButton.setBounds(labelWidth + adjustedTextFieldWidth + gapBetweenFieldAndButton, fieldY, buttonWidth, TEXT_FIELD_HEIGHT);
|
|
|
- refreshButton.setToolTipText("刷新工位:" + oprnoCode);
|
|
|
-
|
|
|
- // 5. 为按钮添加点击事件监听器
|
|
|
- final String currentOprnoCode = oprnoCode; // 必须使用final变量在匿名内部类中访问
|
|
|
- refreshButton.addActionListener(new ActionListener() {
|
|
|
- @Override
|
|
|
- public void actionPerformed(ActionEvent e) {
|
|
|
- // 获取输入框内容
|
|
|
- String inputValue = textField.getText();
|
|
|
- // 打印工位号和输入框内容
|
|
|
- System.out.println("工位号:" + currentOprnoCode + ", 输入内容:" + inputValue);
|
|
|
- s7PLC.writeBoolean(oprnoMap.get(currentOprnoCode).getMes_in(),true);
|
|
|
- }
|
|
|
- });
|
|
|
+ // 按照一行四个的列进行布局
|
|
|
+ int columnIndex = fieldY % 5;
|
|
|
+ int rowIndex = fieldY / 5;
|
|
|
+ MesClientComponent mesClientComponent = new MesClientComponent(oprnoMap.get(oprnoCode));
|
|
|
+ mesClientComponent.setBounds(columnIndex * MesClientComponent.workWidth, rowIndex * MesClientComponent.workHeight, MesClientComponent.workWidth, MesClientComponent.workHeight);
|
|
|
+ parentPanel.add(mesClientComponent);
|
|
|
+ // 将组件添加到映射中,以便通过工位号找到对应的组件
|
|
|
+ componentMap.put(oprnoCode, mesClientComponent);
|
|
|
+ fieldY++;
|
|
|
|
|
|
- // 6. 添加到子面板
|
|
|
- textFieldsPanel.add(textField);
|
|
|
- textFieldsPanel.add(refreshButton);
|
|
|
+ }
|
|
|
|
|
|
- // 7. 为当前工位创建定时任务
|
|
|
- createScheduledTask(oprnoCode, textField);
|
|
|
|
|
|
- // 8. 计算下一个输入框的Y坐标
|
|
|
- fieldY += TEXT_FIELD_HEIGHT + TEXT_FIELD_MARGIN;
|
|
|
- }
|
|
|
-
|
|
|
- // 添加子面板到父面板
|
|
|
- parentPanel.add(textFieldsPanel);
|
|
|
-
|
|
|
- // 调整父面板的首选大小,确保滚动条正常工作
|
|
|
- parentPanel.setPreferredSize(new Dimension(parentPanel.getWidth(), Math.max(700, startY + textFieldsPanel.getHeight() + 100)));
|
|
|
-
|
|
|
- log.info("动态生成 {} 个工位输入框和标签", oprnoTextFieldMap.size());
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//启动心跳包程序
|
|
|
public static java.util.Timer heartBeatTimer;
|
|
|
public static java.util.Timer heartBeatIconTimer;
|
|
|
@@ -575,9 +419,6 @@ public class MesClient extends JFrame {
|
|
|
welcomeWin.setVisible(true);
|
|
|
mesClientFrame.setVisible(false);
|
|
|
|
|
|
- // 关闭定时任务池
|
|
|
- shutdownSchedulerPool();
|
|
|
-
|
|
|
nettyClient = null;
|
|
|
// if(heartBeatTimer!=null) {
|
|
|
// heartBeatTimer.cancel();
|
|
|
@@ -588,89 +429,6 @@ public class MesClient extends JFrame {
|
|
|
tcp_connect_flag = false;
|
|
|
connect_request_flag = false;
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 创建时间打印定时任务
|
|
|
- */
|
|
|
- private void createTimePrintTask() {
|
|
|
- // 先取消可能存在的旧任务
|
|
|
- if (timePrintTask != null && !timePrintTask.isCancelled()) {
|
|
|
- timePrintTask.cancel(false);
|
|
|
- }
|
|
|
-
|
|
|
- // 初始化定时任务池(如果尚未初始化)
|
|
|
- if (schedulerPool == null || schedulerPool.isShutdown()) {
|
|
|
- schedulerPool = Executors.newScheduledThreadPool(oprnoMap.size() + 1); // +1 为时间打印任务
|
|
|
- }
|
|
|
-
|
|
|
- // 创建时间打印定时任务
|
|
|
- timePrintTask = schedulerPool.scheduleAtFixedRate(() -> {
|
|
|
- // 在每次执行前检查开关状态
|
|
|
- if (scheduledTasksEnabled) {
|
|
|
- try {
|
|
|
- // 获取所有工位对象并转换为数组
|
|
|
- Oprno[] oprnos = oprnoMap.values().toArray(new Oprno[0]);
|
|
|
- // 调用S7PLCUtils.isStart方法检查工位上料状态
|
|
|
- Oprno startOprno = S7PLCUtils.isStart(s7PLC, oprnos);
|
|
|
- // 处理返回结果
|
|
|
- if (startOprno != null) {
|
|
|
- // 判断这个工件码的位置是A面还是B面
|
|
|
- System.out.println("上料的工位号码:"+ startOprno.getOprno());
|
|
|
- String sn = S7PLCUtils.getSnInJXB(startOprno, s7PLC);
|
|
|
- if (sn != null && !sn.isEmpty()) {
|
|
|
- // 检查质量
|
|
|
- Boolean checkQualityResult = DataUtil.checkQualityByGw(nettyClient, sn, user20,startOprno.getOprno());
|
|
|
- if (!checkQualityResult) {
|
|
|
- MesClient.setMenuStatus("消息发送失败,请重试",-1);
|
|
|
- }
|
|
|
- }else {
|
|
|
- MesClient.setMenuStatus(startOprno.getOprno()+"获取工件码为空",-1);
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("时间打印任务执行异常", e);
|
|
|
- }
|
|
|
- }
|
|
|
- }, 0, TIME_PRINT_INTERVAL, TimeUnit.MILLISECONDS);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 关闭定时任务池的方法
|
|
|
- */
|
|
|
- private static void shutdownSchedulerPool() {
|
|
|
- try {
|
|
|
- if (schedulerPool != null && !schedulerPool.isShutdown()) {
|
|
|
- // 取消时间打印任务
|
|
|
- if (timePrintTask != null && !timePrintTask.isCancelled()) {
|
|
|
- timePrintTask.cancel(false);
|
|
|
- timePrintTask = null;
|
|
|
- }
|
|
|
-
|
|
|
- // 取消所有工位定时任务
|
|
|
- for (ScheduledFuture<?> future : taskMap.values()) {
|
|
|
- if (future != null && !future.isCancelled()) {
|
|
|
- future.cancel(false);
|
|
|
- }
|
|
|
- }
|
|
|
- // 清空任务映射
|
|
|
- taskMap.clear();
|
|
|
- // 关闭调度器池
|
|
|
- schedulerPool.shutdown();
|
|
|
- // 等待任务池关闭,最多等待3秒
|
|
|
- if (!schedulerPool.awaitTermination(3, TimeUnit.SECONDS)) {
|
|
|
- // 如果超时,强制关闭
|
|
|
- schedulerPool.shutdownNow();
|
|
|
- }
|
|
|
- log.info("定时任务池已成功关闭");
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("关闭定时任务池时发生异常", e);
|
|
|
- // 发生异常时强制关闭
|
|
|
- if (schedulerPool != null && !schedulerPool.isTerminated()) {
|
|
|
- schedulerPool.shutdownNow();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
public MesClient() {
|
|
|
setIconImage(Toolkit.getDefaultToolkit().getImage(MesClient.class.getResource("/bg/logo.png")));
|
|
|
@@ -680,13 +438,12 @@ public class MesClient extends JFrame {
|
|
|
addWindowListener(new java.awt.event.WindowAdapter() {
|
|
|
@Override
|
|
|
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
|
|
|
- // 关闭定时任务池
|
|
|
- shutdownSchedulerPool();
|
|
|
// 退出程序
|
|
|
System.exit(0);
|
|
|
}
|
|
|
});
|
|
|
- setBounds(0, 0, 1024, 768);
|
|
|
+ setBounds(0, 0, 1024, 1500);
|
|
|
+ setLocationRelativeTo( null);
|
|
|
|
|
|
JMenuBar menuBar = new JMenuBar();
|
|
|
menuBar.setFont(new Font("Microsoft YaHei UI", Font.PLAIN, 26));
|
|
|
@@ -714,59 +471,7 @@ public class MesClient extends JFrame {
|
|
|
settingMenu.setIcon(new ImageIcon(MesClient.class.getResource("/bg/menu_setting.png")));
|
|
|
settingMenu.setFont(new Font("微软雅黑", Font.PLAIN, 20));
|
|
|
menuBar.add(settingMenu);
|
|
|
-
|
|
|
- JMenu mesMenu = new JMenu("MES");
|
|
|
- mesMenu.setIcon(new ImageIcon(MesClient.class.getResource("/bg/menu_data_analysis.png")));
|
|
|
- mesMenu.setFont(new Font("微软雅黑", Font.PLAIN, 20));
|
|
|
- menuBar.add(mesMenu);
|
|
|
-
|
|
|
- JMenuItem taskToggleMenuItem = new JMenuItem("启动 (关闭)");
|
|
|
- taskToggleMenuItem.setIcon(new ImageIcon(MesClient.class.getResource("/bg/grey_dot.png")));
|
|
|
- taskToggleMenuItem.setFont(new Font("微软雅黑", Font.PLAIN, 20));
|
|
|
- taskToggleMenuItem.addMouseListener(new MouseAdapter() {
|
|
|
- @Override
|
|
|
- public void mousePressed(MouseEvent e) {
|
|
|
|
|
|
- // 如果当前是关闭状态,用户点击想要开启
|
|
|
- if (!scheduledTasksEnabled) {
|
|
|
- DataUtil.getCheckInfo();
|
|
|
- // 先检查开班点检是否完成
|
|
|
- if (!check_info) {
|
|
|
- // 未完成点检,显示提示并阻止操作
|
|
|
- MesClient.setMenuStatus("请先完成开班点检", -1);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 切换定时任务状态
|
|
|
- scheduledTasksEnabled = !scheduledTasksEnabled;
|
|
|
-
|
|
|
- // 更新菜单项文本和图标
|
|
|
- if (scheduledTasksEnabled) {
|
|
|
- taskToggleMenuItem.setText("启动 (开启)");
|
|
|
- taskToggleMenuItem.setIcon(new ImageIcon(MesClient.class.getResource("/bg/green_dot.png")));
|
|
|
- // 启动定时任务逻辑将在定时任务执行时检查状态
|
|
|
- MesClient.setMenuStatus("定时任务已开启", 1);
|
|
|
- } else {
|
|
|
- taskToggleMenuItem.setText("启动 (关闭)");
|
|
|
- taskToggleMenuItem.setIcon(new ImageIcon(MesClient.class.getResource("/bg/grey_dot.png")));
|
|
|
- MesClient.setMenuStatus("定时任务已关闭", -1);
|
|
|
- }
|
|
|
-
|
|
|
- // 重新创建时间打印任务,确保其与定时任务开关状态同步
|
|
|
- createTimePrintTask();
|
|
|
-
|
|
|
- // 当定时任务开启时,为所有工位重新创建读码定时任务
|
|
|
- if (scheduledTasksEnabled) {
|
|
|
- for (Map.Entry<String, JTextField> entry : oprnoTextFieldMap.entrySet()) {
|
|
|
- String oprnoCode = entry.getKey();
|
|
|
- JTextField textField = entry.getValue();
|
|
|
- createScheduledTask(oprnoCode, textField);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- mesMenu.add(taskToggleMenuItem);
|
|
|
|
|
|
JMenuItem resetTcpMenu = new JMenuItem("\u91CD\u8FDEMES");
|
|
|
resetTcpMenu.setIcon(new ImageIcon(MesClient.class.getResource("/bg/reset_logo.png")));
|
|
|
@@ -873,7 +578,9 @@ public class MesClient extends JFrame {
|
|
|
JPanel indexPanelA = new JPanel();
|
|
|
indexScrollPaneA = new JScrollPane(indexPanelA);
|
|
|
indexPanelA.setLayout(null);
|
|
|
-
|
|
|
+ indexPanelA.setPreferredSize(new Dimension(5*MesClientComponent.workWidth, 3*MesClientComponent.workHeight)); // 根据实际内容调整高度
|
|
|
+ indexScrollPaneA.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
|
|
+ indexScrollPaneA.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
|
|
product_sn = new JTextField();
|
|
|
product_sn.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
product_sn.setEditable(false);
|
|
|
@@ -911,10 +618,8 @@ public class MesClient extends JFrame {
|
|
|
fxlabel.setVisible(false);
|
|
|
indexPanelA.add(fxlabel);
|
|
|
|
|
|
- generateOprnoTextFields(indexPanelA);
|
|
|
-
|
|
|
- // 创建时间打印定时任务
|
|
|
- createTimePrintTask();
|
|
|
+ // 创建工位面板
|
|
|
+ createOprnoPanel(indexPanelA);
|
|
|
|
|
|
finish_ok_bt = new JButton("OK");
|
|
|
finish_ok_bt.setEnabled(false);
|