forked from Echoyy9/Personnel-Management-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alter_staff.py
277 lines (271 loc) · 14.4 KB
/
alter_staff.py
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'alter_staff.ui'
#
# Created by: PyQt5 UI code generator 5.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_alter_staff(object):
def setupUi(self, alter_staff):
alter_staff.setObjectName("alter_staff")
alter_staff.setEnabled(True)
alter_staff.resize(917, 571)
alter_staff.setStyleSheet("background-color:#f4f9f4;")
self.lineEdit = QtWidgets.QLineEdit(alter_staff)
self.lineEdit.setGeometry(QtCore.QRect(390, 40, 121, 21))
self.lineEdit.setStyleSheet("font: 14pt \"华文行楷\";\n"
"color:rgb(80, 126, 59);\n"
"background-color:transparent;\n"
"border:outset;")
self.lineEdit.setObjectName("lineEdit")
self.label = QtWidgets.QLabel(alter_staff)
self.label.setGeometry(QtCore.QRect(440, 100, 61, 21))
self.label.setStyleSheet("font: 10pt \"幼圆\";")
self.label.setObjectName("label")
self.name = QtWidgets.QLineEdit(alter_staff)
self.name.setGeometry(QtCore.QRect(510, 100, 101, 21))
self.name.setObjectName("name")
self.label_2 = QtWidgets.QLabel(alter_staff)
self.label_2.setGeometry(QtCore.QRect(230, 220, 61, 21))
self.label_2.setStyleSheet("font: 10pt \"幼圆\";")
self.label_2.setObjectName("label_2")
self.label_3 = QtWidgets.QLabel(alter_staff)
self.label_3.setGeometry(QtCore.QRect(440, 220, 61, 21))
self.label_3.setStyleSheet("font: 10pt \"幼圆\";")
self.label_3.setObjectName("label_3")
self.identity = QtWidgets.QLineEdit(alter_staff)
self.identity.setGeometry(QtCore.QRect(300, 140, 101, 21))
self.identity.setObjectName("identity")
self.label_4 = QtWidgets.QLabel(alter_staff)
self.label_4.setGeometry(QtCore.QRect(230, 140, 61, 21))
self.label_4.setStyleSheet("font: 10pt \"幼圆\";")
self.label_4.setObjectName("label_4")
self.tel = QtWidgets.QLineEdit(alter_staff)
self.tel.setGeometry(QtCore.QRect(510, 140, 101, 21))
self.tel.setObjectName("tel")
self.label_5 = QtWidgets.QLabel(alter_staff)
self.label_5.setGeometry(QtCore.QRect(440, 140, 61, 21))
self.label_5.setStyleSheet("font: 10pt \"幼圆\";")
self.label_5.setObjectName("label_5")
self.email = QtWidgets.QLineEdit(alter_staff)
self.email.setGeometry(QtCore.QRect(510, 180, 101, 21))
self.email.setText("")
self.email.setObjectName("email")
self.label_6 = QtWidgets.QLabel(alter_staff)
self.label_6.setGeometry(QtCore.QRect(440, 180, 61, 21))
self.label_6.setStyleSheet("font: 10pt \"幼圆\";")
self.label_6.setObjectName("label_6")
self.label_7 = QtWidgets.QLabel(alter_staff)
self.label_7.setGeometry(QtCore.QRect(230, 260, 61, 21))
self.label_7.setStyleSheet("font: 10pt \"幼圆\";")
self.label_7.setObjectName("label_7")
self.address = QtWidgets.QLineEdit(alter_staff)
self.address.setGeometry(QtCore.QRect(300, 180, 101, 21))
self.address.setText("")
self.address.setObjectName("address")
self.label_8 = QtWidgets.QLabel(alter_staff)
self.label_8.setGeometry(QtCore.QRect(230, 180, 61, 21))
self.label_8.setStyleSheet("font: 10pt \"幼圆\";")
self.label_8.setObjectName("label_8")
self.huifu = QtWidgets.QPushButton(alter_staff)
self.huifu.setGeometry(QtCore.QRect(500, 470, 75, 23))
self.huifu.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.huifu.setStyleSheet("font:75 10pt \"黑体\";\n"
"color:white;\n"
"background-color:rgb(85,170,127);\n"
"border-radius:3px;")
self.huifu.setObjectName("huifu")
self.save = QtWidgets.QPushButton(alter_staff)
self.save.setGeometry(QtCore.QRect(300, 470, 75, 23))
self.save.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.save.setStyleSheet("font:75 10pt \"黑体\";\n"
"color:white;\n"
"background-color:rgb(85,170,127);\n"
"border-radius:3px;")
self.save.setObjectName("save")
self.birth = QtWidgets.QDateEdit(alter_staff)
self.birth.setGeometry(QtCore.QRect(510, 220, 101, 21))
self.birth.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
self.birth.setInputMethodHints(QtCore.Qt.ImhPreferNumbers)
self.birth.setWrapping(False)
self.birth.setFrame(True)
self.birth.setDateTime(QtCore.QDateTime(QtCore.QDate(2018, 1, 1), QtCore.QTime(0, 0, 0)))
self.birth.setCurrentSection(QtWidgets.QDateTimeEdit.YearSection)
self.birth.setCalendarPopup(True)
self.birth.setDate(QtCore.QDate(2018, 1, 1))
self.birth.setObjectName("birth")
self.label_9 = QtWidgets.QLabel(alter_staff)
self.label_9.setGeometry(QtCore.QRect(230, 100, 61, 21))
self.label_9.setStyleSheet("font: 10pt \"幼圆\";")
self.label_9.setObjectName("label_9")
self.no = QtWidgets.QLineEdit(alter_staff)
self.no.setEnabled(False)
self.no.setGeometry(QtCore.QRect(300, 100, 101, 21))
self.no.setStyleSheet("border:outset;\n"
"background:transparent;\n"
"")
self.no.setText("")
self.no.setObjectName("no")
self.pushButton_3 = QtWidgets.QPushButton(alter_staff)
self.pushButton_3.setGeometry(QtCore.QRect(40, 30, 31, 31))
self.pushButton_3.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.pushButton_3.setStyleSheet("border-image: url(:/newPrefix/images/back.png);")
self.pushButton_3.setText("")
self.pushButton_3.setObjectName("pushButton_3")
self.sex = QtWidgets.QComboBox(alter_staff)
self.sex.setGeometry(QtCore.QRect(300, 220, 101, 21))
self.sex.setEditable(False)
self.sex.setObjectName("sex")
self.sex.addItem("")
self.sex.addItem("")
self.isMarried = QtWidgets.QComboBox(alter_staff)
self.isMarried.setGeometry(QtCore.QRect(300, 260, 101, 22))
self.isMarried.setEditable(False)
self.isMarried.setObjectName("isMarried")
self.isMarried.addItem("")
self.isMarried.addItem("")
self.label_school = QtWidgets.QLabel(alter_staff)
self.label_school.setGeometry(QtCore.QRect(440, 380, 61, 21))
self.label_school.setStyleSheet("font: 10pt \"幼圆\";")
self.label_school.setObjectName("label_school")
self.label_11 = QtWidgets.QLabel(alter_staff)
self.label_11.setGeometry(QtCore.QRect(440, 340, 61, 21))
self.label_11.setStyleSheet("font: 10pt \"幼圆\";")
self.label_11.setObjectName("label_11")
self.school = QtWidgets.QLineEdit(alter_staff)
self.school.setGeometry(QtCore.QRect(510, 380, 101, 21))
self.school.setObjectName("school")
self.xl = QtWidgets.QComboBox(alter_staff)
self.xl.setGeometry(QtCore.QRect(510, 340, 101, 22))
self.xl.setEditable(False)
self.xl.setObjectName("xl")
self.xl.addItem("")
self.xl.addItem("")
self.xl.addItem("")
self.xl.addItem("")
self.xl.addItem("")
self.xl.addItem("")
self.xl.addItem("")
self.entry_time = QtWidgets.QDateEdit(alter_staff)
self.entry_time.setGeometry(QtCore.QRect(510, 260, 101, 21))
self.entry_time.setWrapping(False)
self.entry_time.setDateTime(QtCore.QDateTime(QtCore.QDate(2018, 1, 1), QtCore.QTime(0, 0, 0)))
self.entry_time.setMinimumDateTime(QtCore.QDateTime(QtCore.QDate(1754, 9, 14), QtCore.QTime(0, 0, 0)))
self.entry_time.setCalendarPopup(True)
self.entry_time.setDate(QtCore.QDate(2018, 1, 1))
self.entry_time.setObjectName("entry_time")
self.label_12 = QtWidgets.QLabel(alter_staff)
self.label_12.setGeometry(QtCore.QRect(440, 260, 61, 21))
self.label_12.setStyleSheet("font: 10pt \"幼圆\";")
self.label_12.setObjectName("label_12")
self.label_13 = QtWidgets.QLabel(alter_staff)
self.label_13.setGeometry(QtCore.QRect(230, 300, 61, 21))
self.label_13.setStyleSheet("font: 10pt \"幼圆\";")
self.label_13.setObjectName("label_13")
self.label_14 = QtWidgets.QLabel(alter_staff)
self.label_14.setGeometry(QtCore.QRect(440, 300, 61, 21))
self.label_14.setStyleSheet("font: 10pt \"幼圆\";")
self.label_14.setObjectName("label_14")
self.major = QtWidgets.QLineEdit(alter_staff)
self.major.setGeometry(QtCore.QRect(300, 420, 101, 21))
self.major.setText("")
self.major.setObjectName("major")
self.label_major = QtWidgets.QLabel(alter_staff)
self.label_major.setGeometry(QtCore.QRect(230, 420, 61, 21))
self.label_major.setStyleSheet("font: 10pt \"幼圆\";")
self.label_major.setObjectName("label_major")
self.label_time = QtWidgets.QLabel(alter_staff)
self.label_time.setGeometry(QtCore.QRect(230, 380, 61, 21))
self.label_time.setStyleSheet("font: 10pt \"幼圆\";")
self.label_time.setObjectName("label_time")
self.professional = QtWidgets.QComboBox(alter_staff)
self.professional.setGeometry(QtCore.QRect(510, 300, 101, 22))
self.professional.setEditable(False)
self.professional.setCurrentText("")
self.professional.setObjectName("professional")
self.department = QtWidgets.QComboBox(alter_staff)
self.department.setGeometry(QtCore.QRect(300, 300, 101, 22))
self.department.setEditable(False)
self.department.setCurrentText("")
self.department.setObjectName("department")
self.label_17 = QtWidgets.QLabel(alter_staff)
self.label_17.setGeometry(QtCore.QRect(230, 340, 61, 21))
self.label_17.setStyleSheet("font: 10pt \"幼圆\";")
self.label_17.setObjectName("label_17")
self.salary = QtWidgets.QSpinBox(alter_staff)
self.salary.setGeometry(QtCore.QRect(300, 340, 101, 21))
self.salary.setMaximum(100000)
self.salary.setProperty("value", 0)
self.salary.setObjectName("salary")
self.graduate_time = QtWidgets.QDateEdit(alter_staff)
self.graduate_time.setGeometry(QtCore.QRect(300, 380, 101, 21))
self.graduate_time.setWrapping(False)
self.graduate_time.setDateTime(QtCore.QDateTime(QtCore.QDate(2018, 1, 1), QtCore.QTime(0, 0, 0)))
self.graduate_time.setMinimumDateTime(QtCore.QDateTime(QtCore.QDate(1754, 9, 14), QtCore.QTime(0, 0, 0)))
self.graduate_time.setCalendarPopup(True)
self.graduate_time.setDate(QtCore.QDate(2018, 1, 1))
self.graduate_time.setObjectName("graduate_time")
self.label.setBuddy(self.name)
self.label_2.setBuddy(self.sex)
self.label_3.setBuddy(self.birth)
self.label_4.setBuddy(self.identity)
self.label_5.setBuddy(self.tel)
self.label_6.setBuddy(self.email)
self.label_7.setBuddy(self.isMarried)
self.label_8.setBuddy(self.address)
self.label_9.setBuddy(self.no)
self.label_school.setBuddy(self.school)
self.label_11.setBuddy(self.xl)
self.label_12.setBuddy(self.entry_time)
self.label_13.setBuddy(self.department)
self.label_14.setBuddy(self.professional)
self.label_major.setBuddy(self.major)
self.label_time.setBuddy(self.graduate_time)
self.label_17.setBuddy(self.salary)
self.retranslateUi(alter_staff)
self.save.clicked.connect(alter_staff.saveInfo)
self.huifu.clicked.connect(alter_staff.restore)
self.pushButton_3.clicked.connect(alter_staff.goback)
self.xl.currentTextChanged['QString'].connect(alter_staff.showDetail)
QtCore.QMetaObject.connectSlotsByName(alter_staff)
def retranslateUi(self, alter_staff):
_translate = QtCore.QCoreApplication.translate
alter_staff.setWindowTitle(_translate("alter_staff", "Form"))
self.lineEdit.setText(_translate("alter_staff", "修改员工信息"))
self.label.setText(_translate("alter_staff", "员工姓名:"))
self.label_2.setText(_translate("alter_staff", "性别:"))
self.label_3.setText(_translate("alter_staff", "出生日期:"))
self.label_4.setText(_translate("alter_staff", "身份证号:"))
self.label_5.setText(_translate("alter_staff", "电话:"))
self.label_6.setText(_translate("alter_staff", "邮箱:"))
self.label_7.setText(_translate("alter_staff", "婚否:"))
self.label_8.setText(_translate("alter_staff", "住址:"))
self.huifu.setText(_translate("alter_staff", "恢复"))
self.save.setText(_translate("alter_staff", "保存"))
self.birth.setDisplayFormat(_translate("alter_staff", "yyyy-MM-dd"))
self.label_9.setText(_translate("alter_staff", "员工编号:"))
self.sex.setCurrentText(_translate("alter_staff", "男"))
self.sex.setItemText(0, _translate("alter_staff", "男"))
self.sex.setItemText(1, _translate("alter_staff", "女"))
self.isMarried.setCurrentText(_translate("alter_staff", "是"))
self.isMarried.setItemText(0, _translate("alter_staff", "是"))
self.isMarried.setItemText(1, _translate("alter_staff", "否"))
self.label_school.setText(_translate("alter_staff", "毕业院校:"))
self.label_11.setText(_translate("alter_staff", "学历:"))
self.xl.setCurrentText(_translate("alter_staff", "小学"))
self.xl.setItemText(0, _translate("alter_staff", "小学"))
self.xl.setItemText(1, _translate("alter_staff", "初中"))
self.xl.setItemText(2, _translate("alter_staff", "高中"))
self.xl.setItemText(3, _translate("alter_staff", "中专"))
self.xl.setItemText(4, _translate("alter_staff", "大专"))
self.xl.setItemText(5, _translate("alter_staff", "本科"))
self.xl.setItemText(6, _translate("alter_staff", "研究生"))
self.entry_time.setDisplayFormat(_translate("alter_staff", "yyyy-MM-dd"))
self.label_12.setText(_translate("alter_staff", "入职时间:"))
self.label_13.setText(_translate("alter_staff", "所在部门:"))
self.label_14.setText(_translate("alter_staff", "职位:"))
self.label_major.setText(_translate("alter_staff", "专业:"))
self.label_time.setText(_translate("alter_staff", "毕业时间:"))
self.label_17.setText(_translate("alter_staff", "薪资:"))
self.graduate_time.setDisplayFormat(_translate("alter_staff", "yyyy-MM-dd"))
import img_rc