def make_sta(self): stime = self.dateBegin.date().toPyDate().timetuple() etime = self.dateOver.date().toPyDate().timetuple() HistData.make_statistic(stime, etime, self.data) QtWidgets.QMessageBox.information(None, '统计完成', '统计结果已保存于F:/sta.xls', QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Yes), QtWidgets.QMessageBox.Yes)
def menu_accept_slot(self): if self.listWidget.count() == 0: QtWidgets.QMessageBox.information(None, '下单失败', '当前菜单不能为空', QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Yes), QtWidgets.QMessageBox.Yes) return root = QtWidgets.QTreeWidgetItem(self.treeWidget) root.setText(0, time.strftime('%H:%M:%S')) for item in self.data.get_list(): tmp = QtWidgets.QTreeWidgetItem(root) tmp.setText(0, item) self.treeWidget.addTopLevelItem(root) HistData.make_hist(self.data.get_list(), self.data.get_used()) self.menu_flush_slot() QtWidgets.QMessageBox.information(None, '下单完成', '此单已保存', QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Yes), QtWidgets.QMessageBox.Yes)