| | |
| | | |
| | | columnDto = new ArrayList<>(); |
| | | //columnDto.add(new ColumnDto("ID", "id", -1, null,false)); |
| | | columnDto.add(new ColumnDto("序号", "", (width - 10) / 8, "autoCreate", false, null,null)); |
| | | columnDto.add(new ColumnDto("工程", "ProjectName", (width - 10) / 8, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("交方艇队", "currentTeam", (width - 10) / 8, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("接方艇队", "handoverTeam", (width - 10) / 8, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("交接时间", "handoverTime", (width - 10) / 8, "selectDate", false, null,null)); |
| | | columnDto.add(new ColumnDto("交接情况说明", "handoverSituation", (width - 10) / 8, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("附件", "fileName", (width - 10) / 8, "", false, null,null)); |
| | | columnDto.add(new ColumnDto("操作", "", (width - 10) / 8, "", true, buttonList,null)); |
| | | columnDto.add(new ColumnDto("序号", "", (width - 10) / 7, "autoCreate", false, null,null)); |
| | | columnDto.add(new ColumnDto("工程", "ProjectName", (width - 10) / 7, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("交方T队", "currentTeam", (width - 10) / 7, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("接方T队", "handoverTeam", (width - 10) / 7, null, false, null,null)); |
| | | columnDto.add(new ColumnDto("交接时间", "handoverTime", (width - 10) / 7, "selectDate", false, null,null)); |
| | | /* columnDto.add(new ColumnDto("交接情况说明", "handoverSituation", (width - 10) / 8, null, false, null,null)); |
| | | */ columnDto.add(new ColumnDto("附件", "fileName", (width - 10) / 7, "", false, null,null)); |
| | | columnDto.add(new ColumnDto("操作", "", (width - 10) / 7, "", true, buttonList,null)); |
| | | |
| | | table = CommonTable.createCommonTable(list[0], columnDto); |
| | | table.setRowHeight(25); |
| | |
| | | btnInsert.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | DjJdgzHandover data = new DjJdgzHandover(); |
| | | addOrUpdate.openDialog(data,jFrame, columnDto,table); |
| | | jFrame.setEnabled(false); |
| | | } |
| | | }); |
| | | |
| | |
| | | Object newValue = table.getModel().getValueAt(row, column); |
| | | // 输出变化信息 |
| | | if (newValue.equals("edit")){ |
| | | jFrame.setEnabled(false); |
| | | DjJdgzHandover data = list.get(row); |
| | | addOrUpdate.openDialog(data,jFrame,columnDto,table); |
| | | jFrame.setEnabled(false); |
| | | }else if(newValue.equals("del")) { |
| | | int n = JOptionPane.showConfirmDialog(null, "是否删除?", "提示", JOptionPane.YES_NO_OPTION); |
| | | if (n == 0) { |