예제 #1
0
 def __init__(self, parent=None):
     super(StaffOP, self).__init__(parent)
     self.setupUi(self)
     self.inputdate.setCalendarPopup(True)
     self.stackedWidget.setCurrentIndex(0)
     self.staff = globalValue.get_staff()
     self.welcome.setText(self.staff.sname)
     self.role.setText('权限:' + self.staff.srole)
     self.name.setText(self.staff.sname)
     self.sname.setText(self.staff.sname)
     self.ssex.setText(self.staff.ssex)
     self.srole.setText(self.staff.srole)
     self.stime.setText(str(self.staff.stime))
     self.sphone.setText(self.staff.sphone)
     self.sidcard.setText(self.staff.sidcard)
     self.sidcard_2.setText(self.staff.sid)
     self.listWidget.currentRowChanged.connect(
         self.stackedWidget.setCurrentIndex)
     self.listWidget.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     # 绑定事件
     self.searchNB.clicked.connect(self.searchStaff)
     self.commitAdd.clicked.connect(self.addStaff)
     self.commitDe.clicked.connect(self.deleteStaff)
     self.commitTableDel.clicked.connect(self.tableDel)
     self.commitTableModify.clicked.connect(self.tableModify)
예제 #2
0
 def __init__(self,parent=None):
     super(ChartOp, self).__init__(parent)
     self.setupUi(self)
     self.staff = globalValue.get_staff()
     self.welcome.setText(self.staff.sname)
     self.role.setText('权限:'+ self.staff.srole)
     self.listWidget.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget_4.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget_4.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget.currentRowChanged.connect(self.stackedWidget.setCurrentIndex)
     self.listWidget_4.currentRowChanged.connect(self.stackedWidget_2.setCurrentIndex)
     self.stackedWidget.setCurrentIndex(0)
     self.stackedWidget_2.setCurrentIndex(0)
     self.gridlayout = QGridLayout(self.groupBox)  # 继承容器groupBox
     self.gridlayout2 = QGridLayout(self.groupBox_2) # 同上
     lineedit1 = self.path1
     lineedit2 = self.path2
     lineedit3 = self.path3
     self.scan.clicked.connect(lambda: self.setBrowerPath(lineedit1))
     self.scan_2.clicked.connect(lambda: self.setBrowerPath(lineedit2))
     self.scan_3.clicked.connect(lambda: self.setBrowerPath(lineedit3))
     self.tosql1.clicked.connect(self.toSQLDB)
     self.tosql2.clicked.connect(self.toSQLTable)
     self.toexcel.clicked.connect(self.toExcel)
     self.ask.clicked.connect(self.help)
     self.showfigure1.clicked.connect(self.figureOrder)
     self.showfigure2.clicked.connect(self.figureCS)
예제 #3
0
 def __init__(self,config=localConfig):
     self.db = pymysql.connect(host=config['host'],port=config['port'],user=config['user'],
                                   passwd=config['passwd'],db=config['db'],charset=config['charset'],
                                   cursorclass=config['cursorclass'])
     self.cursor = self.db.cursor()
     self.cursor.execute("SELECT VERSION()")
     data = self.cursor.fetchone()
     print("Database version : %s " % data['VERSION()'])
     self.staff = globalValue.get_staff()
예제 #4
0
 def __init__(self,parent=None):
     super(ClientOp, self).__init__(parent)
     self.setupUi(self)
     self.staff = globalValue.get_staff()
     self.welcome.setText(self.staff.sname)
     self.role.setText('权限:'+ self.staff.srole)
     self.listWidget.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget.currentRowChanged.connect(self.stackedWidget.setCurrentIndex)
     self.searchNB.clicked.connect(self.searchClient)
     self.commitAdd.clicked.connect(self.addClient)
     self.commitAddT.clicked.connect(self.addTeam)
     self.tableDelB.clicked.connect(self.tableDel)
예제 #5
0
 def __init__(self,parent=None):
     super(OrderOp, self).__init__(parent)
     self.setupUi(self)
     self.staff = globalValue.get_staff()
     self.welcome.setText(self.staff.sname)
     self.role.setText('权限:'+ self.staff.srole)
     self.listWidget.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget.currentRowChanged.connect(self.stackedWidget.setCurrentIndex)
     self.stackedWidget.setCurrentIndex(0)
     self.searchNB.clicked.connect(self.searchBooking)
     self.searchorderB.clicked.connect(self.searchOrder)
     self.searchCheckinB.clicked.connect(self.searchCheckin)
예제 #6
0
 def __init__(self, parent=None):
     """
     传入staff全局变量
     :param parent:
     """
     super(MainWindow, self).__init__(parent)
     self.setupUi(self)
     self.staff = globalValue.get_staff()
     print(self.staff.sname[0])
     self.welcome.setText(self.staff.sname + ',你好。你的权限为:' +
                          self.staff.srole + '。今天是' +
                          time.strftime("%Y-%m-%d", time.localtime()))
     self.staffbutton.clicked.connect(self.gotoStaff)
     self.roombutton.clicked.connect(self.gotoRoom)
     self.clientbutton.clicked.connect(self.gotoClient)
     self.orderbutton.clicked.connect(self.gotoOrder)
     self.chartbutton.clicked.connect(self.gotoChart)
     self.modifyPwd.clicked.connect(self.modifyPasswd)
예제 #7
0
 def __init__(self,parent=None):
     super(RoomOp, self).__init__(parent)
     self.setupUi(self)
     self.staff = globalValue.get_staff()
     self.welcome.setText(self.staff.sname)
     self.role.setText('权限:'+ self.staff.srole)
     self.listWidget.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.listWidget.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     self.inputStartTime.setCalendarPopup(True)
     self.inputEndTime.setCalendarPopup(True)
     self.endtime.setCalendarPopup(True)
     self.tendtime.setCalendarPopup(True)
     self.starttime_booking.setCalendarPopup(True)
     self.endtime_booking.setCalendarPopup(True)
     self.tstarttime_booking.setCalendarPopup(True)
     self.tendtime_booking.setCalendarPopup(True)
     self.starttime_checkout.setCalendarPopup(True)
     self.endtime_checkout.setCalendarPopup(True)
     self.stackedWidget.setCurrentIndex(0)
     self.stackedWidget_sub.setCurrentIndex(0)
     self.stackedWidget_sub_2.setCurrentIndex(0)
     self.stackedWidget_sub_3.setCurrentIndex(0)
     self.listWidget.currentRowChanged.connect(self.stackedWidget.setCurrentIndex)
     self.listWidget_2.currentRowChanged.connect(self.stackedWidget_sub.setCurrentIndex)
     self.listWidget_3.currentRowChanged.connect(self.stackedWidget_sub_2.setCurrentIndex)
     self.listWidget_4.currentRowChanged.connect(self.stackedWidget_sub_3.setCurrentIndex)
     self.commitCheckin.clicked.connect(self.singleCheckin)
     self.commitCheckinTeam.clicked.connect(self.teamCheckin)
     self.commitBookingClient.clicked.connect(self.reserveClient)
     self.commitBookingTeam.clicked.connect(self.reserveTeam)
     self.commitDeBookC.clicked.connect(self.cancelReserveC)
     self.commitDeBookT.clicked.connect(self.cancelReserveT)
     self.commitCheckout.clicked.connect(self.checkout)
     self.searchNB.clicked.connect(self.showRoomInfo)
     self.commitTableDel.clicked.connect(self.tableDel)
     self.commitTableModify.clicked.connect(self.tableModify)
     self.commitAddRoom.clicked.connect(self.addRoom)
     self.commitrtcC.clicked.connect(self.reverseToCheckC)
     self.commitrtcT.clicked.connect(self.reverseToCheckT)
     self.commitSearch.clicked.connect(self.findRoom)
     self.scan.clicked.connect(self.setBrowerPath)
     self.reset.clicked.connect(self.reOpen)