1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174package GUI;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Font;
import java.time.LocalDate;
import javax.swing.JComboBox;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.table.DefaultTableModel;
import java.awt.Color;
public class LuongThuongPage_LuongThuong extends JPanel {
private static final long serialVersionUID = 1L;
private JTable table;
private JTextField textField;
/**
* Create the panel.
*/
public LuongThuongPage_LuongThuong() {
setLayout(null);
JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(0, 115, 675, 495);
add(scrollPane);
table = new JTable();
table.setModel(new DefaultTableModel(
new Object[][] {
},
new String[] {
"STT", "Nhân Viên", "Thời Gian",
"Lương cơ bản", "% lương thưởng", "Lương Thưởng"
}
));
table.setFont(new Font("Tahoma", Font.PLAIN, 12));
scrollPane.setViewportView(table);
JPanel panel = new JPanel();
panel.setBackground(new Color(255, 255, 255));
panel.setBounds(0, 0, 675, 110);
add(panel);
panel.setLayout(null);
JLabel label_tieuDe = new JLabel("Tên Thưởng Theo Tháng");
label_tieuDe.setBounds(10, 10, 221, 20);
panel.add(label_tieuDe);
label_tieuDe.setFont(new Font("Tahoma", Font.PLAIN, 18));
JComboBox comboBox_nam = new JComboBox();
comboBox_nam.setBounds(10, 65, 65, 21);
panel.add(comboBox_nam);
int currentYear = LocalDate.now().getYear();
for (int year = currentYear; year >= currentYear - 10; year--) {
comboBox_nam.addItem(year);
}
comboBox_nam.setSelectedItem(currentYear);
JComboBox comboBox_thang = new JComboBox();
comboBox_thang.setBounds(85, 65, 65, 21);
panel.add(comboBox_thang);
// them dư lieu 12 tháng vào
for (int month = 1; month <= 12; month++) {
comboBox_thang.addItem(month);
}
// thiet lap mac dinh
comboBox_thang.setSelectedItem(LocalDate.now().getMonthValue()); // chọn tháng hiện tại
JComboBox comboBox_phongBan = new JComboBox();
comboBox_phongBan.setBounds(160, 65, 147, 21);
panel.add(comboBox_phongBan);
comboBox_phongBan.addItem("Phòng A");
comboBox_phongBan.addItem("Phòng B");
comboBox_phongBan.addItem("Phòng C");
JComboBox comboBox_thoiGian = new JComboBox();
comboBox_thoiGian.setBounds(317, 65, 147, 21);
panel.add(comboBox_thoiGian);
comboBox_thoiGian.addItem("Thời gian");
comboBox_thoiGian.addItem("Lương thưởng");
comboBox_thoiGian.addItem("Thực lãnh");
JComboBox comboBox_tangGiam = new JComboBox();
comboBox_tangGiam.setBounds(474, 65, 65, 21);
panel.add(comboBox_tangGiam);
comboBox_tangGiam.addItem("Tăng dần");
comboBox_tangGiam.addItem("Giảm dần");
JPanel panel_1 = new JPanel();
panel_1.setBackground(new Color(255, 255, 255));
panel_1.setBounds(679, 0, 306, 610);
add(panel_1);
panel_1.setLayout(null);
JLabel lblNewLabel = new JLabel("Tạo mức Tiền Thưởng");
lblNewLabel.setBounds(10, 10, 174, 30);
panel_1.add(lblNewLabel);
lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
JLabel label_thoiGian = new JLabel("Thời Gian");
label_thoiGian.setBounds(10, 50, 93, 30);
panel_1.add(label_thoiGian);
JComboBox comboBox_5 = new JComboBox();
comboBox_5.setBounds(10, 90, 105, 21);
panel_1.add(comboBox_5);
int currentYear2 = LocalDate.now().getYear();
for (int year = currentYear2; year >= currentYear2 - 10; year--) {
comboBox_5.addItem(year);
}
comboBox_nam.setSelectedItem(currentYear2);
JComboBox comboBox_5_1 = new JComboBox();
comboBox_5_1.setBounds(125, 90, 105, 21);
panel_1.add(comboBox_5_1);
// them dư lieu 12 tháng vào
for (int month = 1; month <= 12; month++) {
comboBox_5_1.addItem(month);
}
// thiet lap mac dinh
comboBox_5_1.setSelectedItem(LocalDate.now().getMonthValue()); // chọn tháng hiện tại
JLabel label_donViThuHuong = new JLabel("Đơn vị thụ hưởng");
label_donViThuHuong.setBounds(10, 134, 122, 30);
panel_1.add(label_donViThuHuong);
JLabel label_donViChiTiet = new JLabel("Đơn vị chi tiết");
label_donViChiTiet.setBounds(10, 219, 122, 21);
panel_1.add(label_donViChiTiet);
JComboBox comboBox_5_2 = new JComboBox();
comboBox_5_2.setBounds(10, 250, 201, 21);
panel_1.add(comboBox_5_2);
JLabel label_donViThuHuong_1_1 = new JLabel("Đơn vị thụ hưởng");
label_donViThuHuong_1_1.setBounds(10, 281, 122, 37);
panel_1.add(label_donViThuHuong_1_1);
JComboBox comboBox_5_2_1 = new JComboBox();
comboBox_5_2_1.setBounds(10, 171, 201, 21);
panel_1.add(comboBox_5_2_1);
comboBox_5_2_1.addItem("Tất cả nhân viên");
comboBox_5_2_1.addItem("Theo phòng");
comboBox_5_2_1.addItem("Theo nhân viên");
textField = new JTextField();
textField.setBounds(10, 328, 204, 19);
panel_1.add(textField);
textField.setColumns(10);
ImageIcon confirm = new ImageIcon(getClass().getResource("/assets/appIcon/icons8-confirm-30.png"));
JButton button_xacNhan = new JButton(confirm);
button_xacNhan.setBounds(166, 548, 50, 34);
panel_1.add(button_xacNhan);
}
}