├── .idea ├── .gitignore ├── .name └── vcs.xml ├── LICENSE ├── Main.py ├── README.md ├── hotelManagement.sql ├── references ├── E-R_diagram.jpg ├── Functional_structure_diagram.png ├── qtdesigner │ ├── .idea │ │ ├── .gitignore │ │ ├── inspectionProfiles │ │ │ └── profiles_settings.xml │ │ ├── misc.xml │ │ ├── modules.xml │ │ └── qtdesigner.iml │ ├── .vscode │ │ └── settings.json │ ├── QtInsert2.py │ ├── QtLogin.py │ ├── QtUi_MainWindow.py │ ├── QtUser.py │ ├── UILoader │ │ ├── Ui_myui.py │ │ ├── mysqltest.sql │ │ ├── myui.ui │ │ ├── myui2.ui │ │ └── uiload.py │ ├── __pycache__ │ │ ├── QtUser.cpython-38.pyc │ │ ├── QtUser.cpython-39.pyc │ │ ├── myMainWindow.cpython-38.pyc │ │ └── myMainWindow.cpython-39.pyc │ ├── demo │ │ ├── QtLogin.py │ │ ├── QtUser.py │ │ ├── __pycache__ │ │ │ ├── QtUser.cpython-35.pyc │ │ │ ├── QtUser.cpython-38.pyc │ │ │ ├── QtUser.cpython-39.pyc │ │ │ ├── myMainWindow.cpython-35.pyc │ │ │ ├── myMainWindow.cpython-38.pyc │ │ │ └── myMainWindow.cpython-39.pyc │ │ └── myMainWindow.py │ ├── exp1 │ │ └── QtUi_MainWindow.py │ ├── exp2 │ │ ├── QtDialogtest.py │ │ └── QtWidgetest.py │ ├── myMainWindow.py │ └── student.sql ├── 《数据库应用》系统设计报告.pdf └── 课程设计《数据库应用》内容要求.pdf └── ui ├── LoginUI.ui ├── MainUI.ui ├── ModifyPwd.py ├── ModifyPwd.ui ├── __pycache__ ├── ModifyPwd.cpython-37.pyc ├── ModifyPwd.cpython-39.pyc ├── report.cpython-39.pyc ├── room.cpython-37.pyc ├── room.cpython-39.pyc ├── staff.cpython-37.pyc └── staff.cpython-39.pyc ├── report.py ├── report.ui ├── room.py ├── room.ui ├── staff.py └── staff.ui /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | hotelManagement.sql -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 ranxi169 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hotel-information-management-system 2 | 数据库课程设计——酒店信息管理系统,一人四天的工作量,使用了PyQt5、Python3.9与MySQ8.0.29 3 | 4 | ## 功能设计 5 | 6 | 目前设计了4个功能【客房管理、员工管理、报表管理、修改密码】,是一个人做课设的正常工作量 7 | 8 | ## 运行方法 9 | 10 | 1、首先配置好MySQL(需要安装与python的连接器) 11 | 12 | [MySQL的详细安装教程 - 知乎 (zhihu.com)](https://zhuanlan.zhihu.com/p/188416607) 13 | 14 | [pycharm连接MySQL数据库 - 晴天看恒星 - 博客园 (cnblogs.com)](https://www.cnblogs.com/korol7/p/12836290.html) 15 | 16 | 到第18步就够了,不用配置环境变量 17 | 18 | 2、安装好PyQt5 19 | 20 | [(17条消息) Python+PyQt5+QtDesigner+PyUic+PyRcc(最全安装教程)_sever默默的博客-CSDN博客_pyrcc](https://blog.csdn.net/baidu_35145586/article/details/108110236) 21 | 22 | [PyCharm安装PyQt5及其工具(Qt Designer、PyUIC、PyRcc)详细教程 - 知乎 (zhihu.com)](https://zhuanlan.zhihu.com/p/469526603) 23 | 24 | [ PyQt入门教程 Qt Designer工具的使用 - 锅边糊 - 博客园 (cnblogs.com)](https://www.cnblogs.com/linyfeng/p/11223707.html) 25 | 26 | 3、在DBMS(如navicat)或MySQL中导入hotelManagement.sql,即可生成需要用的所有表,表内数据可自行修改,但是要注意参照完整性约束。 27 | 28 | 4、main.py中dbConfig这个变量中修改有关数据库配置(账号密码等) 29 | 30 | 5、将文档内/pictures文件夹移动至D:,这是因为前端Qt StyleSheet中许多图片采用的绝对地址--D:/pictures/xxx 31 | 32 | 6、运行Main.py即可 33 | 34 | ## 依赖库 35 | 36 | * pyqt5:可视化展示 37 | * pymysql:python3与mysql连接 38 | * matplotlib:用于生成报表 39 | * xlwt:用于将数据写入excel 40 | 以上使用pip安装即可 41 | 42 | ## 截图 43 | 44 | 功能结构图:![image](https://github.com/ranxi169/Hotel-information-management-system/blob/main/references/Functional_structure_diagram.png) 45 | 46 | E-R图:![image](https://github.com/ranxi169/Hotel-information-management-system/blob/main/references/E-R_diagram.jpg) 47 | -------------------------------------------------------------------------------- /hotelManagement.sql: -------------------------------------------------------------------------------- 1 | 2 | show databases; 3 | # drop database if exists dbdesign; 4 | # create database dbdesign; 5 | use dbdesign; 6 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 7 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 8 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 9 | /*!40101 SET NAMES utf8 */; 10 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 11 | /*!40103 SET TIME_ZONE='+00:00' */; 12 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 13 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 14 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 15 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 16 | 17 | 18 | DROP TABLE IF EXISTS `booking_client`; 19 | /*!40101 SET @saved_cs_client = @@character_set_client */; 20 | /*!40101 SET character_set_client = utf8 */; 21 | CREATE TABLE `booking_client` ( 22 | `cid` varchar(255) NOT NULL,-- client id 23 | `rid` varchar(255) NOT NULL,-- room id 24 | `start_time` date DEFAULT NULL, 25 | `end_time` date DEFAULT NULL, 26 | `booking_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 27 | `remark` varchar(255) DEFAULT NULL, 28 | PRIMARY KEY (`cid`,`rid`), 29 | KEY `rid` (`rid`), 30 | CONSTRAINT `booking_client_ibfk_1` FOREIGN KEY (`cid`) REFERENCES `client` (`cid`), 31 | CONSTRAINT `booking_client_ibfk_2` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`) 32 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 33 | /*!40101 SET character_set_client = @saved_cs_client */; 34 | 35 | 36 | -- 上写锁 37 | LOCK TABLES `booking_client` WRITE; 38 | /*!40000 ALTER TABLE `booking_client` DISABLE KEYS */; 39 | INSERT INTO `booking_client` VALUES ('131989238123991309','203','2020-01-06','2020-01-08','2020-01-06 00:49:02','不错'); 40 | /*!40000 ALTER TABLE `booking_client` ENABLE KEYS */; 41 | UNLOCK TABLES; 42 | 43 | 44 | DROP TABLE IF EXISTS `booking_team`; 45 | /*!40101 SET @saved_cs_client = @@character_set_client */; 46 | /*!40101 SET character_set_client = utf8 */; 47 | CREATE TABLE `booking_team` ( 48 | `tid` varchar(255) NOT NULL, 49 | `rid` varchar(255) NOT NULL, 50 | `start_time` date DEFAULT NULL, 51 | `end_time` date DEFAULT NULL, 52 | `booking_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 53 | `remark` varchar(255) DEFAULT NULL, 54 | PRIMARY KEY (`tid`,`rid`), 55 | KEY `rid` (`rid`), 56 | CONSTRAINT `booking_team_ibfk_1` FOREIGN KEY (`tid`) REFERENCES `team` (`tid`), 57 | CONSTRAINT `booking_team_ibfk_2` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`) 58 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 59 | /*!40101 SET character_set_client = @saved_cs_client */; 60 | 61 | 62 | LOCK TABLES `booking_team` WRITE; 63 | /*!40000 ALTER TABLE `booking_team` DISABLE KEYS */; 64 | INSERT INTO `booking_team` VALUES ('55','303','2020-01-06','2020-01-10','2020-01-06 00:52:27','新客户'),('55','305','2020-01-06','2020-01-10','2020-01-06 00:52:23','新客户'),('7','301','2020-01-10','2020-01-15','2020-01-04 09:19:22','可能晚一些'),('7','303','2020-01-10','2020-01-15','2020-01-04 09:19:36',NULL); 65 | /*!40000 ALTER TABLE `booking_team` ENABLE KEYS */; 66 | UNLOCK TABLES; 67 | 68 | 69 | 70 | DROP TABLE IF EXISTS `checkin_client`; 71 | /*!40101 SET @saved_cs_client = @@character_set_client */; 72 | /*!40101 SET character_set_client = utf8 */; 73 | CREATE TABLE `checkin_client` ( 74 | `rid` varchar(255) NOT NULL, 75 | `cid` varchar(255) NOT NULL, 76 | `start_time` date DEFAULT NULL, 77 | `end_time` date DEFAULT NULL, 78 | `total_price` varchar(255) DEFAULT NULL, 79 | `check_in_sid` varchar(255) DEFAULT NULL, 80 | `remark` varchar(255) DEFAULT NULL, 81 | PRIMARY KEY (`rid`,`cid`), 82 | KEY `cid` (`cid`), 83 | KEY `check_in_sid` (`check_in_sid`), 84 | CONSTRAINT `checkin_client_ibfk_1` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`), 85 | CONSTRAINT `checkin_client_ibfk_2` FOREIGN KEY (`cid`) REFERENCES `client` (`cid`), 86 | CONSTRAINT `checkin_client_ibfk_3` FOREIGN KEY (`check_in_sid`) REFERENCES `staff` (`sid`) 87 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 88 | /*!40101 SET character_set_client = @saved_cs_client */; 89 | 90 | 91 | 92 | LOCK TABLES `checkin_client` WRITE; 93 | /*!40000 ALTER TABLE `checkin_client` DISABLE KEYS */; 94 | INSERT INTO `checkin_client` VALUES ('201','189322199312262232','2020-01-06','2020-01-07','208','1','新客'); 95 | /*!40000 ALTER TABLE `checkin_client` ENABLE KEYS */; 96 | UNLOCK TABLES; 97 | /*!50003 SET @saved_cs_client = @@character_set_client */ ; 98 | /*!50003 SET @saved_cs_results = @@character_set_results */ ; 99 | /*!50003 SET @saved_col_connection = @@collation_connection */ ; 100 | /*!50003 SET character_set_client = utf8 */ ; 101 | /*!50003 SET character_set_results = utf8 */ ; 102 | /*!50003 SET collation_connection = utf8_general_ci */ ; 103 | /*!50003 SET @saved_sql_mode = @@sql_mode */ ; 104 | /*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ; 105 | DELIMITER ;; 106 | /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `update_individual_times` AFTER INSERT ON `checkin_client` 107 | 108 | FOR EACH ROW update client set accomodation_times=accomodation_times+1 where cid=new.cid */;; 109 | DELIMITER ; 110 | /*!50003 SET sql_mode = @saved_sql_mode */ ; 111 | /*!50003 SET character_set_client = @saved_cs_client */ ; 112 | /*!50003 SET character_set_results = @saved_cs_results */ ; 113 | /*!50003 SET collation_connection = @saved_col_connection */ ; 114 | 115 | 116 | 117 | DROP TABLE IF EXISTS `checkin_team`; 118 | /*!40101 SET @saved_cs_client = @@character_set_client */; 119 | /*!40101 SET character_set_client = utf8 */; 120 | CREATE TABLE `checkin_team` ( 121 | `rid` varchar(255) NOT NULL, 122 | `tid` varchar(255) NOT NULL, 123 | `start_time` date DEFAULT NULL, 124 | `end_time` date DEFAULT NULL, 125 | `total_price` varchar(255) DEFAULT NULL, 126 | `check_in_sid` varchar(255) DEFAULT NULL, 127 | `remark` varchar(255) DEFAULT NULL, 128 | PRIMARY KEY (`rid`,`tid`), 129 | KEY `teamsid` (`check_in_sid`), 130 | KEY `teamtid` (`tid`), 131 | CONSTRAINT `teamrid` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`), 132 | CONSTRAINT `teamsid` FOREIGN KEY (`check_in_sid`) REFERENCES `staff` (`sid`), 133 | CONSTRAINT `teamtid` FOREIGN KEY (`tid`) REFERENCES `team` (`tid`) 134 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 135 | /*!40101 SET character_set_client = @saved_cs_client */; 136 | 137 | 138 | 139 | LOCK TABLES `checkin_team` WRITE; 140 | /*!40000 ALTER TABLE `checkin_team` DISABLE KEYS */; 141 | INSERT INTO `checkin_team` VALUES ('404','30','2020-01-05','2020-01-06','2940','8',NULL),('406','30','2020-01-05','2020-01-06','2940','8','团队入住'); 142 | /*!40000 ALTER TABLE `checkin_team` ENABLE KEYS */; 143 | UNLOCK TABLES; 144 | /*!50003 SET @saved_cs_client = @@character_set_client */ ; 145 | /*!50003 SET @saved_cs_results = @@character_set_results */ ; 146 | /*!50003 SET @saved_col_connection = @@collation_connection */ ; 147 | /*!50003 SET character_set_client = utf8 */ ; 148 | /*!50003 SET character_set_results = utf8 */ ; 149 | /*!50003 SET collation_connection = utf8_general_ci */ ; 150 | /*!50003 SET @saved_sql_mode = @@sql_mode */ ; 151 | /*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ; 152 | DELIMITER ;; 153 | /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `update_team_times` AFTER INSERT ON `checkin_team` 154 | 155 | FOR EACH ROW update team set accomodation_times=accomodation_times+1 where tid=new.tid */;; 156 | DELIMITER ; 157 | /*!50003 SET sql_mode = @saved_sql_mode */ ; 158 | /*!50003 SET character_set_client = @saved_cs_client */ ; 159 | /*!50003 SET character_set_results = @saved_cs_results */ ; 160 | /*!50003 SET collation_connection = @saved_col_connection */ ; 161 | 162 | 163 | DROP TABLE IF EXISTS `client`; 164 | /*!40101 SET @saved_cs_client = @@character_set_client */; 165 | /*!40101 SET character_set_client = utf8 */; 166 | CREATE TABLE `client` ( 167 | `cname` varchar(255) NOT NULL, 168 | `cid` varchar(255) NOT NULL, 169 | `cphone` varchar(255) DEFAULT NULL, 170 | `cage` varchar(255) NOT NULL, 171 | `csex` varchar(255) DEFAULT NULL, 172 | `register_sid` varchar(255) DEFAULT NULL, 173 | `accomodation_times` int(11) DEFAULT NULL, 174 | `register_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 175 | PRIMARY KEY (`cid`), 176 | KEY `sid` (`register_sid`), 177 | KEY `cid` (`cid`,`register_sid`), 178 | CONSTRAINT `sid` FOREIGN KEY (`register_sid`) REFERENCES `staff` (`sid`) 179 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 180 | /*!40101 SET character_set_client = @saved_cs_client */; 181 | 182 | 183 | 184 | LOCK TABLES `client` WRITE; 185 | /*!40000 ALTER TABLE `client` DISABLE KEYS */; 186 | INSERT INTO `client` VALUES ('吴超梦','130898199212233434','13898322223','28','女','4',1,'2020-01-04 10:48:42'),('黄荣','131989238123991309','13123323212','52','男','7',1,'2020-01-04 09:24:48'),('王潇','189322199312262232','13098722343','27','男','4',1,'2020-01-06 00:17:20'),('柯镇恶','289193212393128999','13310913888','50','男','6',0,'2020-01-04 09:16:01'),('段深','290389199412280303','13898767890','26','男','5',0,'2020-01-04 09:15:32'),('黄晓让','320198199812243456','13789098789','21','女','5',3,'2020-01-04 10:06:33'),('赵超','320222199102036712','13821322312','23','男','8',2,'2020-01-04 09:24:42'),('赵重样','320678199012243333','13765434212','30','男','2',0,'2020-01-04 09:12:44'),('黄穰','320876196510200099','13876534543','55','女','1',0,'2020-01-04 09:12:26'),('黄晓让','320897189722334567','13987667890','30','男','2',1,'2020-01-04 10:09:29'),('西羊羊','320987199012234444','19876556789','30','女','3',3,'2020-01-04 09:24:50'); 187 | /*!40000 ALTER TABLE `client` ENABLE KEYS */; 188 | UNLOCK TABLES; 189 | 190 | 191 | DROP TABLE IF EXISTS `hotelorder`; 192 | /*!40101 SET @saved_cs_client = @@character_set_client */; 193 | /*!40101 SET character_set_client = utf8 */; 194 | CREATE TABLE `hotelorder` ( 195 | `id` varchar(255) NOT NULL, 196 | `ordertype` varchar(255) NOT NULL, 197 | `start_time` date NOT NULL, 198 | `end_time` date NOT NULL, 199 | `rid` varchar(255) NOT NULL, 200 | `pay_type` varchar(255) DEFAULT NULL, 201 | `money` varchar(255) DEFAULT NULL, 202 | `remark` varchar(255) DEFAULT NULL, 203 | `order_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 204 | `register_sid` varchar(255) DEFAULT NULL, 205 | PRIMARY KEY (`id`,`start_time`,`end_time`,`rid`,`ordertype`), 206 | KEY `rid` (`rid`), 207 | KEY `register_sid` (`register_sid`), 208 | CONSTRAINT `hotelorder_ibfk_1` FOREIGN KEY (`rid`) REFERENCES `room` (`rid`), 209 | CONSTRAINT `hotelorder_ibfk_2` FOREIGN KEY (`register_sid`) REFERENCES `staff` (`sid`) 210 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 211 | /*!40101 SET character_set_client = @saved_cs_client */; 212 | 213 | 214 | LOCK TABLES `hotelorder` WRITE; 215 | /*!40000 ALTER TABLE `hotelorder` DISABLE KEYS */; 216 | INSERT INTO `hotelorder` VALUES ('1','团队','2020-01-06','2020-01-09','307','微信','624','','2020-01-08 14:15:32','2'),('1','团队','2020-01-06','2020-01-09','308','微信','2064','','2020-01-08 14:15:33','2'),('130898199212233434','个人','2020-01-04','2020-01-07','201','微信','624','垃圾','2020-01-04 11:57:54','1'),('30','团队','2019-12-21','2019-12-31','406','支付宝','5555','好评','2020-01-04 09:23:38','2'),('30','团队','2019-12-30','2020-01-01','203','支付宝','221','好评','2020-01-04 09:23:44','2'),('30','团队','2020-01-03','2020-01-03','201','支付宝','231','好评','2020-01-04 09:23:42','1'),('320222199102036712','个人','2020-01-02','2020-01-03','406','微信','1176','好评','2020-01-04 09:23:34','4'),('320222199102036788','个人','2020-01-03','2020-01-03','201','微信','5616','好评','2020-01-04 09:23:01','3'),('320897189722334567','个人','2020-01-04','2020-01-05','404','微信','1764','打赏','2020-01-06 00:52:11','1'),('330987126376589900','个人','2020-01-05','2020-01-06','301','微信','208','好评','2020-01-05 06:44:44','2'),('43','团队','2020-01-04','2020-01-06','307','微信','624','垃圾','2020-01-06 00:52:02','1'),('43','团队','2020-01-04','2020-01-06','402','微信','804','垃圾','2020-01-06 00:51:59','1'),('7','团队','2020-01-01','2020-01-02','201','微信','258','中评','2020-01-04 09:23:54','5'); 217 | /*!40000 ALTER TABLE `hotelorder` ENABLE KEYS */; 218 | UNLOCK TABLES; 219 | 220 | 221 | 222 | DROP TABLE IF EXISTS `room`; 223 | /*!40101 SET @saved_cs_client = @@character_set_client */; 224 | /*!40101 SET character_set_client = utf8 */; 225 | CREATE TABLE `room` ( 226 | `rid` varchar(255) NOT NULL, 227 | `rtype` varchar(255) NOT NULL, 228 | `rstorey` varchar(255) NOT NULL, 229 | `rprice` varchar(255) NOT NULL, 230 | `rdesc` varchar(255) DEFAULT NULL, 231 | `rpic` varchar(255) DEFAULT NULL, 232 | PRIMARY KEY (`rid`), 233 | KEY `rid` (`rid`,`rprice`), 234 | KEY `rid_2` (`rid`,`rprice`,`rtype`), 235 | KEY `rid_3` (`rid`,`rtype`,`rprice`) 236 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 237 | /*!40101 SET character_set_client = @saved_cs_client */; 238 | 239 | 240 | 241 | LOCK TABLES `room` WRITE; 242 | /*!40000 ALTER TABLE `room` DISABLE KEYS */; 243 | INSERT INTO `room` VALUES ('201','标准间(单人)','2','208','电视故障','D:/pictures/ss.jpg'),('203','标准间(单人)','2','208','无','D:/pictures/ss.jpg'),('205','标准间(双人)','2','268','没事','D:/pictures/sd.jpg'),('207','标准间(双人)','2','268','采光好','D:/pictures/sd.jpg'),('301','标准间(单人)','3','208','采光好','D:/pictures/ss.jpg'),('303','大床房','3','258','无','D:/pictures/b.jpg'),('305','大床房','3','258','设施新','D:/pictures/b.jpg'),('307','标准间(单人)','3','208','设施新','D:/pictures/ss.jpg'),('308','总统套房','3','688','古典','D:/pictures/pr1.jpg'),('402','标准间(双人)','4','268','空调故障','D:/pictures/sd.jpg'),('404','总统套房','4','588','好评率高','D:/pictures/pr1.jpg'),('406','总统套房','4','588','好评率高','D:/pictures/pr2.jpg'),('410','标准间(单人)','4','232','新房','D:/pictures/ss.jpg'); 244 | /*!40000 ALTER TABLE `room` ENABLE KEYS */; 245 | UNLOCK TABLES; 246 | 247 | 248 | 249 | DROP TABLE IF EXISTS `staff`; 250 | /*!40101 SET @saved_cs_client = @@character_set_client */; 251 | /*!40101 SET character_set_client = utf8 */; 252 | CREATE TABLE `staff` ( 253 | `sid` varchar(255) NOT NULL, 254 | `sname` varchar(255) NOT NULL, 255 | `ssex` varchar(255) DEFAULT NULL, 256 | `stime` date DEFAULT NULL, 257 | `susername` varchar(255) NOT NULL, 258 | `spassword` varchar(255) NOT NULL, 259 | `srole` varchar(255) NOT NULL, 260 | `sidcard` varchar(255) NOT NULL, 261 | `sphone` varchar(255) DEFAULT NULL, 262 | PRIMARY KEY (`sid`), 263 | UNIQUE KEY `susername` (`susername`) 264 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 265 | /*!40101 SET character_set_client = @saved_cs_client */; 266 | 267 | 268 | 269 | LOCK TABLES `staff` WRITE; 270 | /*!40000 ALTER TABLE `staff` DISABLE KEYS */; 271 | INSERT INTO `staff` VALUES ('1','冉冉','男','2021-06-18','ranxi','123456','2','422802200108132036','19144336913'),('2','张三','女','2003-12-06','zs123','123456','1','329123199102021234','13823209876'),('3','李四','男','1981-12-26','ls123','123456','1','332987199812262512','13782765657'),('4','赵六','女','1999-01-01','zl123','123456','1','332987199811164512','13888909890'),('5','王五','男','1997-01-01','wang123','123456','1','332987199812264512','13988767890'),('6','黄七','男','2002-01-01','hq123','123456','1','332987199811263333','13962334343'),('7','欧阳毅','男','1975-10-4','oyy123','123456','2','332987199811262222','13962334222'),('8','Jack','男','1990-12-02','jack123','123456','1','332987199810102222','13962334333'); 272 | /*!40000 ALTER TABLE `staff` ENABLE KEYS */; 273 | UNLOCK TABLES; 274 | 275 | 276 | 277 | DROP TABLE IF EXISTS `team`; 278 | /*!40101 SET @saved_cs_client = @@character_set_client */; 279 | /*!40101 SET character_set_client = utf8 */; 280 | CREATE TABLE `team` ( 281 | `tname` varchar(255) NOT NULL, 282 | `tid` varchar(255) NOT NULL, 283 | `tphone` varchar(255) DEFAULT NULL, 284 | `check_in_sid` varchar(255) DEFAULT NULL, 285 | `accomodation_times` int(11) DEFAULT NULL, 286 | `register_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 287 | PRIMARY KEY (`tid`), 288 | KEY `team_sid` (`check_in_sid`), 289 | CONSTRAINT `team_sid` FOREIGN KEY (`check_in_sid`) REFERENCES `staff` (`sid`) 290 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 291 | /*!40101 SET character_set_client = @saved_cs_client */; 292 | 293 | 294 | 295 | LOCK TABLES `team` WRITE; 296 | /*!40000 ALTER TABLE `team` DISABLE KEYS */; 297 | INSERT INTO `team` VALUES ('管工学院','1','13896534534','1',2,'2020-01-06 00:50:46'),('越岚数聚团队','11','13976523423','6',0,'2020-01-04 09:10:02'),('浙商大','16','13987667890','3',0,'2020-01-04 09:06:55'),('浙商大','30','13898700998','1',5,'2020-01-05 11:09:25'),('就业与创业服务协会','32','13962463676','2',0,'2020-01-04 09:06:37'),('腾讯','43','13829833333','1',3,'2020-01-04 11:55:01'),('管工科导','55','13678998789','2',0,'2020-01-05 06:41:05'),('管乐团','7','17878989098','6',1,'2020-01-04 09:25:37'),('alibaba','8','18978978909','4',0,'2020-01-04 09:07:48'); 298 | /*!40000 ALTER TABLE `team` ENABLE KEYS */; 299 | UNLOCK TABLES; 300 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 301 | 302 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 303 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 304 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 305 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 306 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 307 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 308 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 309 | 310 | DROP VIEW IF EXISTS `Customers`; 311 | Create VIEW Customers as select Cid,Cname,Csex,Cphone From Client; 312 | DROP VIEW IF EXISTS `Rooms`; 313 | Create view Rooms As select Rid,Rtype,Rprice,Rstorey From Room; 314 | DROP VIEW IF EXISTS `Living`; 315 | Create view Living As select Cid,Rid, start_time, end_time, total_price From checkin_client; 316 | DROP VIEW IF EXISTS `Administrators`; 317 | Create view Administrators As select Sid,Sname, Susername From Staff Where Srole>1 318 | 319 | -------------------------------------------------------------------------------- /references/E-R_diagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/E-R_diagram.jpg -------------------------------------------------------------------------------- /references/Functional_structure_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/Functional_structure_diagram.png -------------------------------------------------------------------------------- /references/qtdesigner/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /references/qtdesigner/.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /references/qtdesigner/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /references/qtdesigner/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /references/qtdesigner/.idea/qtdesigner.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /references/qtdesigner/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "/usr/bin/python3" 3 | } -------------------------------------------------------------------------------- /references/qtdesigner/QtInsert2.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'designerLSZaKN.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 5.15.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | 12 | 13 | import pymysql 14 | import sys 15 | from PySide6.QtCore import * 16 | from PySide6.QtGui import * 17 | from PySide6.QtWidgets import * 18 | 19 | db=pymysql.connect(host="localhost",user="root",passwd="123456",db="test", charset="utf8") 20 | cursor=db.cursor() 21 | 22 | 23 | class Ui_Dialog(object): 24 | def setupUi(self, Dialog): 25 | if not Dialog.objectName(): 26 | Dialog.setObjectName(u"Dialog") 27 | Dialog.resize(340, 234) 28 | self.insertBtn = QPushButton(Dialog) 29 | self.insertBtn.setObjectName(u"insertBtn") 30 | self.insertBtn.setGeometry(QRect(40, 180, 80, 22)) 31 | self.pushButton_2 = QPushButton(Dialog) 32 | self.pushButton_2.setObjectName(u"pushButton_2") 33 | self.pushButton_2.setGeometry(QRect(170, 180, 80, 22)) 34 | self.label = QLabel(Dialog) 35 | self.label.setObjectName(u"label") 36 | self.label.setGeometry(QRect(40, 30, 65, 14)) 37 | self.label_2 = QLabel(Dialog) 38 | self.label_2.setObjectName(u"label_2") 39 | self.label_2.setGeometry(QRect(40, 60, 65, 14)) 40 | self.label_3 = QLabel(Dialog) 41 | self.label_3.setObjectName(u"label_3") 42 | self.label_3.setGeometry(QRect(30, 100, 65, 14)) 43 | self.txtSNO = QLineEdit(Dialog) 44 | self.txtSNO.setObjectName(u"txtSNO") 45 | self.txtSNO.setGeometry(QRect(130, 30, 113, 22)) 46 | self.txtSNAME = QLineEdit(Dialog) 47 | self.txtSNAME.setObjectName(u"txtSNAME") 48 | self.txtSNAME.setGeometry(QRect(130, 60, 113, 22)) 49 | self.txtAGE = QLineEdit(Dialog) 50 | self.txtAGE.setObjectName(u"txtAGE") 51 | self.txtAGE.setGeometry(QRect(130, 90, 113, 22)) 52 | 53 | self.retranslateUi(Dialog) 54 | self.insertBtn.clicked.connect(self.insertBtn_Clicked) 55 | 56 | QMetaObject.connectSlotsByName(Dialog) 57 | # setupUi 58 | 59 | def retranslateUi(self, Dialog): 60 | Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None)) 61 | self.insertBtn.setText(QCoreApplication.translate("Dialog", u"\u6dfb\u52a0", None)) 62 | self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u53d6\u6d88", None)) 63 | self.label.setText(QCoreApplication.translate("Dialog", u"\u5b66\u53f7\uff1a", None)) 64 | self.label_2.setText(QCoreApplication.translate("Dialog", u"\u59d3\u540d\uff1a", None)) 65 | self.label_3.setText(QCoreApplication.translate("Dialog", u"\u5e74\u9f84\uff1a", None)) 66 | # retranslateUi 67 | 68 | def insertBtn_Clicked(self): 69 | m_sno=self.txtSNO.text() 70 | m_sname=self.txtSNAME.text() 71 | m_age=self.txtAGE.text() 72 | sql = "insert into student(sno,sname,sage) values('"+m_sno+"','"+m_sname+"',"+m_age+")" 73 | print(sql) 74 | try: 75 | # 执行SQL语句 76 | cursor.execute(sql) 77 | db.commit() 78 | except Exception as e: 79 | # 发生错误时回滚 80 | print("Error: unable to fecth data",e) 81 | 82 | 83 | app=QApplication(sys.argv) 84 | Form=QWidget() 85 | dlg=Ui_Dialog() 86 | dlg.setupUi(Form) 87 | Form.show() 88 | app.exec() 89 | -------------------------------------------------------------------------------- /references/qtdesigner/QtLogin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## pip install MySQL 5 | 6 | ################################################################################ 7 | 8 | import pymysql 9 | import sys 10 | from PySide6.QtCore import * 11 | from PySide6.QtGui import * 12 | from PySide6.QtWidgets import * 13 | import PySide6 14 | import sys,os 15 | 16 | 17 | dirname = os.path.dirname(PySide6.__file__) 18 | plugin_path = os.path.join(dirname, 'plugins', 'platforms') 19 | os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path 20 | #把主窗口引入 21 | from myMainWindow import Ui_MainWindow 22 | 23 | 24 | db=pymysql.connect(host="localhost",user="root",passwd="123456",db="test", charset="utf8") 25 | cursor=db.cursor() 26 | 27 | 28 | class Ui_Dialog(object): 29 | def setupUi(self, Dialog): 30 | if not Dialog.objectName(): 31 | Dialog.setObjectName(u"Dialog") 32 | Dialog.resize(340, 234) 33 | self.loginBtn = QPushButton(Dialog) 34 | self.loginBtn.setObjectName(u"Login") 35 | self.loginBtn.setGeometry(QRect(40, 180, 80, 22)) 36 | self.pushButton_2 = QPushButton(Dialog) 37 | self.pushButton_2.setObjectName(u"pushButton_2") 38 | self.pushButton_2.setGeometry(QRect(170, 180, 80, 22)) 39 | self.label = QLabel(Dialog) 40 | self.label.setObjectName(u"label") 41 | self.label.setGeometry(QRect(40, 30, 65, 14)) 42 | self.label_2 = QLabel(Dialog) 43 | self.label_2.setObjectName(u"label_2") 44 | self.label_2.setGeometry(QRect(40, 60, 65, 14)) 45 | self.label_3 = QLabel(Dialog) 46 | self.label_3.setObjectName(u"label_3") 47 | self.label_3.setGeometry(QRect(30, 100, 65, 14)) 48 | self.txtSNO = QLineEdit(Dialog) 49 | self.txtSNO.setObjectName(u"txtSNO") 50 | self.txtSNO.setGeometry(QRect(130, 30, 113, 22)) 51 | self.txtPASS = QLineEdit(Dialog) 52 | self.txtPASS.setObjectName(u"txtPASS") 53 | self.txtPASS.setGeometry(QRect(130, 60, 113, 22)) 54 | 55 | 56 | self.retranslateUi(Dialog) 57 | self.loginBtn.clicked.connect(self.loginBtn_Clicked) 58 | self.pushButton_2.clicked.connect(self.exit_Clicked) 59 | self.logindlg=Dialog 60 | 61 | QMetaObject.connectSlotsByName(Dialog) 62 | # setupUi 63 | 64 | def retranslateUi(self, Dialog): 65 | Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"登录窗口", None)) 66 | self.loginBtn.setText(QCoreApplication.translate("Dialog", u"登录", None)) 67 | self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u53d6\u6d88", None)) 68 | self.label.setText(QCoreApplication.translate("Dialog", u"\u5b66\u53f7\uff1a", None)) 69 | self.label_2.setText(QCoreApplication.translate("Dialog", u"密码:", None)) 70 | # retranslateUi 71 | 72 | def loginBtn_Clicked(self): 73 | self.MainWin=QMainWindow() 74 | self.dlg2=Ui_MainWindow() 75 | self.dlg2.setupUi(self.MainWin) 76 | self.MainWin.show() 77 | self.logindlg.setVisible(False) 78 | def exit_Clicked(self): 79 | self.logindlg.close() 80 | 81 | 82 | 83 | app=QApplication(sys.argv) 84 | Form=QWidget() 85 | dlg=Ui_Dialog() 86 | dlg.setupUi(Form) 87 | Form.show() 88 | 89 | 90 | app.exec() 91 | -------------------------------------------------------------------------------- /references/qtdesigner/QtUi_MainWindow.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'designerLSZaKN.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 5.15.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | 12 | 13 | from PyQt5 import QtWidgets # 导入PyQt5部件 14 | import pymysql 15 | import sys 16 | from PyQt5.QtGui import * 17 | from PyQt5.QtCore import * 18 | from PyQt5.QtWidgets import * 19 | 20 | db=pymysql.connect(host="localhost",user="root",passwd="123456",db="test", charset="utf8") 21 | cursor=db.cursor() 22 | 23 | 24 | 25 | class Ui_MainWindow(object): 26 | def setupUi(self, MainWindow): 27 | if not MainWindow.objectName(): 28 | MainWindow.setObjectName(u"MainWindow") 29 | MainWindow.resize(640, 480) 30 | self.action = QAction(MainWindow) 31 | self.action.setObjectName(u"action") 32 | self.action_2 = QAction(MainWindow) 33 | self.action_2.setObjectName(u"action_2") 34 | self.action_3 = QAction(MainWindow) 35 | self.action_3.setObjectName(u"action_3") 36 | self.action_4 = QAction(MainWindow) 37 | self.action_4.setObjectName(u"action_4") 38 | self.action_5 = QAction(MainWindow) 39 | self.action_5.setObjectName(u"action_5") 40 | self.centralwidget = QWidget(MainWindow) 41 | self.centralwidget.setObjectName(u"centralwidget") 42 | self.OKBtn = QPushButton(self.centralwidget) 43 | self.OKBtn.setObjectName(u"OKBtn") 44 | self.OKBtn.setGeometry(QRect(300, 400, 80, 22)) 45 | self.lab1 = QLabel(self.centralwidget) 46 | self.lab1.setObjectName(u"lab1") 47 | self.lab1.setGeometry(QRect(30, 20, 65, 14)) 48 | self.Edit1 = QLineEdit(self.centralwidget) 49 | self.Edit1.setObjectName(u"Edit1") 50 | self.Edit1.setGeometry(QRect(120, 20, 113, 22)) 51 | self.cancelBtn = QPushButton(self.centralwidget) 52 | self.cancelBtn.setObjectName(u"cancelBtn") 53 | self.cancelBtn.setGeometry(QRect(400, 400, 80, 22)) 54 | MainWindow.setCentralWidget(self.centralwidget) 55 | self.menubar = QMenuBar(MainWindow) 56 | self.menubar.setObjectName(u"menubar") 57 | self.menubar.setGeometry(QRect(0, 0, 513, 19)) 58 | self.menu = QMenu(self.menubar) 59 | self.menu.setObjectName(u"menu") 60 | self.menu_2 = QMenu(self.menubar) 61 | self.menu_2.setObjectName(u"menu_2") 62 | 63 | self.tbw = QTableWidget(self.centralwidget) 64 | self.tbw.setObjectName(u"tbw") 65 | self.tbw.setGeometry(QRect(20, 50, 600, 300)) 66 | 67 | MainWindow.setMenuBar(self.menubar) 68 | self.statusbar = QStatusBar(MainWindow) 69 | self.statusbar.setObjectName(u"statusbar") 70 | MainWindow.setStatusBar(self.statusbar) 71 | 72 | self.menubar.addAction(self.menu.menuAction()) 73 | self.menubar.addAction(self.menu_2.menuAction()) 74 | self.menu.addAction(self.action) 75 | #此处代码是关联菜单项和响应函数 76 | self.action.triggered.connect(self.user_search) 77 | 78 | self.menu.addAction(self.action_2) 79 | #此处代码是关联菜单项和响应函数 80 | self.action_2.triggered.connect(self.goods_search) 81 | 82 | self.menu.addAction(self.action_3) 83 | self.menu_2.addAction(self.action_4) 84 | self.menu_2.addAction(self.action_5) 85 | #此处代码与事件相应函数进行关联 86 | self.OKBtn.clicked.connect(self.OKBtn_click) 87 | self.cancelBtn.clicked.connect(self.cancelBtn_Clicked) 88 | self.Win=MainWindow 89 | 90 | self.retranslateUi(MainWindow) 91 | 92 | QMetaObject.connectSlotsByName(MainWindow) 93 | # setupUi 94 | 95 | def retranslateUi(self, MainWindow): 96 | MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None)) 97 | self.action.setText(QCoreApplication.translate("MainWindow", u"\u7528\u6237\u4fe1\u606f\u67e5\u8be2", None)) 98 | self.action_2.setText(QCoreApplication.translate("MainWindow", u"\u5546\u54c1\u4fe1\u606f\u67e5\u8be2", None)) 99 | self.action_3.setText(QCoreApplication.translate("MainWindow", u"\u4f9b\u5e94\u5546\u4fe1\u606f\u67e5\u8be2", None)) 100 | self.action_4.setText(QCoreApplication.translate("MainWindow", u"\u5546\u54c1\u4fe1\u606f\u5f55\u5165", None)) 101 | self.action_5.setText(QCoreApplication.translate("MainWindow", u"\u4f9b\u5e94\u5546\u4fe1\u606f\u5f55\u5165", None)) 102 | self.OKBtn.setText(QCoreApplication.translate("MainWindow", u"\u786e\u5b9a", None)) 103 | self.lab1.setText(QCoreApplication.translate("MainWindow", u" ", None)) 104 | self.cancelBtn.setText(QCoreApplication.translate("MainWindow", u"\u53d6\u6d88", None)) 105 | self.menu.setTitle(QCoreApplication.translate("MainWindow", u"\u67e5\u8be2", None)) 106 | self.menu_2.setTitle(QCoreApplication.translate("MainWindow", u"\u4fe1\u606f\u5f55\u5165", None)) 107 | 108 | # retranslateUi 109 | def user_search(self): 110 | print("用户信息查询") 111 | self.lab1.setText("用户信息查询") 112 | def goods_search(self): 113 | print("商品信息查询") 114 | self.lab1.setText("商品信息查询") 115 | def OKBtn_click(self): 116 | sql = "SELECT * FROM student" 117 | print(sql) 118 | try: 119 | # 执行SQL语句 120 | cursor.execute(sql) 121 | db.commit() 122 | results = cursor.fetchall() 123 | i=0 124 | self.tbw.setColumnCount(5) 125 | self.tbw.setRowCount(len(results)) 126 | for row in results: 127 | item =QTableWidgetItem(str(row[0])) 128 | self.tbw.setItem(i,0,item) 129 | item =QTableWidgetItem(str(row[1])) 130 | self.tbw.setItem(i,1,item) 131 | item =QTableWidgetItem(str(row[2])) 132 | self.tbw.setItem(i,2,item) 133 | item =QTableWidgetItem(str(row[3])) 134 | self.tbw.setItem(i,3,item) 135 | item =QTableWidgetItem(str(row[4])) 136 | self.tbw.setItem(i,4,item) 137 | i=i+1 138 | except Exception as e: 139 | # 发生错误时回滚 140 | print("Error: unable to fecth data",e) 141 | def cancelBtn_Clicked(self): 142 | self.Win.close() 143 | 144 | app=QtWidgets.QApplication(sys.argv) 145 | Form=QtWidgets.QMainWindow() 146 | dlg=Ui_MainWindow() 147 | dlg.setupUi(Form) 148 | Form.show() 149 | app.exec() 150 | -------------------------------------------------------------------------------- /references/qtdesigner/QtUser.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'designerLSZaKN.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 5.15.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | 12 | 13 | 14 | import pymysql 15 | import sys 16 | 17 | from PySide6.QtCore import * 18 | from PySide6.QtGui import * 19 | from PySide6.QtWidgets import * 20 | 21 | class User_Dialog(object): 22 | def setupUi(self, Dialog): 23 | if not Dialog.objectName(): 24 | Dialog.setObjectName(u"Dialog") 25 | Dialog.resize(340, 234) 26 | self.insertBtn = QPushButton(Dialog) 27 | self.insertBtn.setObjectName(u"insertBtn") 28 | self.insertBtn.setGeometry(QRect(40, 180, 80, 22)) 29 | self.pushButton_2 = QPushButton(Dialog) 30 | self.pushButton_2.setObjectName(u"pushButton_2") 31 | self.pushButton_2.setGeometry(QRect(170, 180, 80, 22)) 32 | self.label = QLabel(Dialog) 33 | self.label.setObjectName(u"label") 34 | self.label.setGeometry(QRect(40, 30, 65, 14)) 35 | self.label_2 = QLabel(Dialog) 36 | self.label_2.setObjectName(u"label_2") 37 | self.label_2.setGeometry(QRect(40, 60, 65, 14)) 38 | self.label_3 = QLabel(Dialog) 39 | self.label_3.setObjectName(u"label_3") 40 | self.label_3.setGeometry(QRect(30, 100, 65, 14)) 41 | self.txtSNO = QLineEdit(Dialog) 42 | self.txtSNO.setObjectName(u"txtSNO") 43 | self.txtSNO.setGeometry(QRect(130, 30, 113, 22)) 44 | self.txtSNAME = QLineEdit(Dialog) 45 | self.txtSNAME.setObjectName(u"txtSNAME") 46 | self.txtSNAME.setGeometry(QRect(130, 60, 113, 22)) 47 | self.txtAGE = QLineEdit(Dialog) 48 | self.txtAGE.setObjectName(u"txtAGE") 49 | self.txtAGE.setGeometry(QRect(130, 90, 113, 22)) 50 | 51 | self.retranslateUi(Dialog) 52 | self.insertBtn.clicked.connect(self.insertBtn_Clicked) 53 | self.pushButton_2.clicked.connect(self.exit_Clicked) 54 | 55 | QMetaObject.connectSlotsByName(Dialog) 56 | self.cursor=None 57 | self.db=None 58 | self.dlg=Dialog 59 | # setupUi 60 | 61 | def retranslateUi(self, Dialog): 62 | Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None)) 63 | self.insertBtn.setText(QCoreApplication.translate("Dialog", u"\u6dfb\u52a0", None)) 64 | self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u53d6\u6d88", None)) 65 | self.label.setText(QCoreApplication.translate("Dialog", u"\u5b66\u53f7\uff1a", None)) 66 | self.label_2.setText(QCoreApplication.translate("Dialog", u"\u59d3\u540d\uff1a", None)) 67 | self.label_3.setText(QCoreApplication.translate("Dialog", u"\u5e74\u9f84\uff1a", None)) 68 | # retranslateUi 69 | 70 | def insertBtn_Clicked(self): 71 | m_sno=self.txtSNO.text() 72 | m_sname=self.txtSNAME.text() 73 | m_age=self.txtAGE.text() 74 | sql = "insert into student(sno,sname,sage) values('"+m_sno+"','"+m_sname+"',"+m_age+")" 75 | print(sql) 76 | try: 77 | # 执行SQL语句 78 | self.cursor.execute(sql) 79 | self.db.commit() 80 | except Exception as e: 81 | # 发生错误时回滚 82 | print("Error: unable to fecth data",e) 83 | 84 | def exit_Clicked(self): 85 | self.dlg.close() -------------------------------------------------------------------------------- /references/qtdesigner/UILoader/Ui_myui.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'myui.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 6.2.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, 12 | QMetaObject, QObject, QPoint, QRect, 13 | QSize, QTime, QUrl, Qt) 14 | from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, 15 | QFont, QFontDatabase, QGradient, QIcon, 16 | QImage, QKeySequence, QLinearGradient, QPainter, 17 | QPalette, QPixmap, QRadialGradient, QTransform) 18 | from PySide6.QtWidgets import (QApplication, QDialog, QLabel, QLineEdit, 19 | QPushButton, QSizePolicy, QWidget) 20 | 21 | class Ui_Dialog(object): 22 | def setupUi(self, Dialog): 23 | if not Dialog.objectName(): 24 | Dialog.setObjectName(u"Dialog") 25 | Dialog.resize(400, 232) 26 | self.txtName = QLineEdit(Dialog) 27 | self.txtName.setObjectName(u"txtName") 28 | self.txtName.setGeometry(QRect(160, 50, 171, 31)) 29 | self.label = QLabel(Dialog) 30 | self.label.setObjectName(u"label") 31 | self.label.setGeometry(QRect(70, 60, 65, 14)) 32 | font = QFont() 33 | font.setPointSize(12) 34 | self.label.setFont(font) 35 | self.label_2 = QLabel(Dialog) 36 | self.label_2.setObjectName(u"label_2") 37 | self.label_2.setGeometry(QRect(80, 110, 65, 14)) 38 | self.label_2.setFont(font) 39 | self.txtPass = QLineEdit(Dialog) 40 | self.txtPass.setObjectName(u"txtPass") 41 | self.txtPass.setGeometry(QRect(160, 100, 171, 31)) 42 | self.OKBtn = QPushButton(Dialog) 43 | self.OKBtn.setObjectName(u"OKBtn") 44 | self.OKBtn.setGeometry(QRect(160, 180, 80, 22)) 45 | self.QuitBtn = QPushButton(Dialog) 46 | self.QuitBtn.setObjectName(u"QuitBtn") 47 | self.QuitBtn.setGeometry(QRect(270, 180, 80, 22)) 48 | 49 | self.retranslateUi(Dialog) 50 | 51 | QMetaObject.connectSlotsByName(Dialog) 52 | # setupUi 53 | 54 | def retranslateUi(self, Dialog): 55 | Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"\u7528\u6237\u767b\u5f55\u7a97\u53e3", None)) 56 | self.label.setText(QCoreApplication.translate("Dialog", u"\u7528\u6237\u540d\uff1a", None)) 57 | self.label_2.setText(QCoreApplication.translate("Dialog", u"\u5bc6\u7801\uff1a", None)) 58 | self.OKBtn.setText(QCoreApplication.translate("Dialog", u"\u786e\u5b9a", None)) 59 | self.QuitBtn.setText(QCoreApplication.translate("Dialog", u"\u9000\u51fa", None)) 60 | # retranslateUi 61 | 62 | -------------------------------------------------------------------------------- /references/qtdesigner/UILoader/mysqltest.sql: -------------------------------------------------------------------------------- 1 | use test; 2 | select * from student; -------------------------------------------------------------------------------- /references/qtdesigner/UILoader/myui.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 232 11 | 12 | 13 | 14 | 用户登录窗口 15 | 16 | 17 | 18 | 19 | 160 20 | 50 21 | 171 22 | 31 23 | 24 | 25 | 26 | 27 | 28 | 29 | 70 30 | 60 31 | 65 32 | 14 33 | 34 | 35 | 36 | 37 | 12 38 | 39 | 40 | 41 | 用户名: 42 | 43 | 44 | 45 | 46 | 47 | 80 48 | 110 49 | 65 50 | 14 51 | 52 | 53 | 54 | 55 | 12 56 | 57 | 58 | 59 | 密码: 60 | 61 | 62 | 63 | 64 | 65 | 160 66 | 100 67 | 171 68 | 31 69 | 70 | 71 | 72 | 73 | 74 | 75 | 160 76 | 180 77 | 80 78 | 22 79 | 80 | 81 | 82 | 确定 83 | 84 | 85 | 86 | 87 | 88 | 270 89 | 180 90 | 80 91 | 22 92 | 93 | 94 | 95 | 退出 96 | 97 | 98 | 99 | 100 | 101 | 20 102 | 170 103 | 97 104 | 30 105 | 106 | 107 | 108 | PushButton 109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /references/qtdesigner/UILoader/myui2.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 232 11 | 12 | 13 | 14 | 用户登录窗口 15 | 16 | 17 | 18 | 19 | 160 20 | 50 21 | 171 22 | 31 23 | 24 | 25 | 26 | 27 | 28 | 29 | 70 30 | 60 31 | 65 32 | 14 33 | 34 | 35 | 36 | 37 | 12 38 | 39 | 40 | 41 | 用户名: 42 | 43 | 44 | 45 | 46 | 47 | 80 48 | 110 49 | 65 50 | 14 51 | 52 | 53 | 54 | 55 | 12 56 | 57 | 58 | 59 | 密码: 60 | 61 | 62 | 63 | 64 | 65 | 160 66 | 100 67 | 171 68 | 31 69 | 70 | 71 | 72 | 73 | 74 | 75 | 160 76 | 180 77 | 80 78 | 22 79 | 80 | 81 | 82 | 确定 83 | 84 | 85 | 86 | 87 | 88 | 270 89 | 180 90 | 80 91 | 22 92 | 93 | 94 | 95 | 退出 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /references/qtdesigner/UILoader/uiload.py: -------------------------------------------------------------------------------- 1 | 2 | import pymysql 3 | 4 | from PySide6.QtCore import * 5 | from PySide6.QtGui import * 6 | from PySide6.QtWidgets import * 7 | from PySide6.QtUiTools import QUiLoader 8 | 9 | 10 | class WinUI: 11 | def __init__(self): 12 | self.ui = QUiLoader().load("/home/oyy/qtdesigner/UILoader/myui.ui") 13 | self.ui.OKBtn.clicked.connect(self.OKfun) 14 | self.ui.QuitBtn.clicked.connect(self.Quitfun) 15 | def OKfun(self): 16 | mName=self.ui.txtName.text() 17 | mPass=self.ui.txtPass.text() 18 | print(mName+mPass) 19 | def Quitfun(self): 20 | self.ui.close() 21 | app = QApplication([]) 22 | win = WinUI() 23 | win.ui.show() 24 | app.exec() 25 | -------------------------------------------------------------------------------- /references/qtdesigner/__pycache__/QtUser.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/__pycache__/QtUser.cpython-38.pyc -------------------------------------------------------------------------------- /references/qtdesigner/__pycache__/QtUser.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/__pycache__/QtUser.cpython-39.pyc -------------------------------------------------------------------------------- /references/qtdesigner/__pycache__/myMainWindow.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/__pycache__/myMainWindow.cpython-38.pyc -------------------------------------------------------------------------------- /references/qtdesigner/__pycache__/myMainWindow.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/__pycache__/myMainWindow.cpython-39.pyc -------------------------------------------------------------------------------- /references/qtdesigner/demo/QtLogin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## pip install MySQL 5 | 6 | ################################################################################ 7 | 8 | import pymysql 9 | from PySide6.QtCore import * 10 | from PySide6.QtGui import * 11 | from PySide6.QtWidgets import * 12 | 13 | 14 | #把主窗口引入 15 | from myMainWindow import Ui_MainWindow 16 | 17 | 18 | db=pymysql.connect(host="localhost",user="root",passwd="123456",db="test", charset="utf8") 19 | cursor=db.cursor() 20 | 21 | 22 | class Ui_Dialog(object): 23 | def setupUi(self, Dialog): 24 | if not Dialog.objectName(): 25 | Dialog.setObjectName(u"Dialog") 26 | Dialog.resize(340, 234) 27 | self.loginBtn = QPushButton(Dialog) 28 | self.loginBtn.setObjectName(u"Login") 29 | self.loginBtn.setGeometry(QRect(40, 180, 80, 22)) 30 | self.pushButton_2 = QPushButton(Dialog) 31 | self.pushButton_2.setObjectName(u"pushButton_2") 32 | self.pushButton_2.setGeometry(QRect(170, 180, 80, 22)) 33 | self.label = QLabel(Dialog) 34 | self.label.setObjectName(u"label") 35 | self.label.setGeometry(QRect(40, 30, 65, 14)) 36 | self.label_2 = QLabel(Dialog) 37 | self.label_2.setObjectName(u"label_2") 38 | self.label_2.setGeometry(QRect(40, 60, 65, 14)) 39 | self.label_3 = QLabel(Dialog) 40 | self.label_3.setObjectName(u"label_3") 41 | self.label_3.setGeometry(QRect(30, 100, 65, 14)) 42 | self.txtSNO = QLineEdit(Dialog) 43 | self.txtSNO.setObjectName(u"txtSNO") 44 | self.txtSNO.setGeometry(QRect(130, 30, 113, 22)) 45 | self.txtPASS = QLineEdit(Dialog) 46 | self.txtPASS.setObjectName(u"txtPASS") 47 | self.txtPASS.setGeometry(QRect(130, 60, 113, 22)) 48 | 49 | 50 | self.retranslateUi(Dialog) 51 | self.loginBtn.clicked.connect(self.loginBtn_Clicked) 52 | self.pushButton_2.clicked.connect(self.exit_Clicked) 53 | self.logindlg=Dialog 54 | 55 | QMetaObject.connectSlotsByName(Dialog) 56 | # setupUi 57 | 58 | def retranslateUi(self, Dialog): 59 | Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None)) 60 | self.loginBtn.setText(QCoreApplication.translate("Dialog", u"登录", None)) 61 | self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u53d6\u6d88", None)) 62 | self.label.setText(QCoreApplication.translate("Dialog", u"\u5b66\u53f7\uff1a", None)) 63 | self.label_2.setText(QCoreApplication.translate("Dialog", u"密码:", None)) 64 | # retranslateUi 65 | 66 | def loginBtn_Clicked(self): 67 | self.MainWin=QMainWindow() 68 | self.dlg2=Ui_MainWindow() 69 | self.dlg2.setupUi(self.MainWin) 70 | self.MainWin.show() 71 | self.logindlg.setVisible(False) 72 | def exit_Clicked(self): 73 | self.logindlg.close() 74 | 75 | 76 | 77 | app=QApplication([]) 78 | Form=QWidget() 79 | dlg=Ui_Dialog() 80 | dlg.setupUi(Form) 81 | Form.show() 82 | 83 | 84 | app.exec() 85 | -------------------------------------------------------------------------------- /references/qtdesigner/demo/QtUser.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'designerLSZaKN.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 5.15.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | 12 | 13 | 14 | import pymysql 15 | 16 | 17 | from PySide6.QtCore import * 18 | from PySide6.QtGui import * 19 | from PySide6.QtWidgets import * 20 | 21 | class User_Dialog(object): 22 | def setupUi(self, Dialog): 23 | if not Dialog.objectName(): 24 | Dialog.setObjectName(u"Dialog") 25 | Dialog.resize(340, 234) 26 | self.insertBtn = QPushButton(Dialog) 27 | self.insertBtn.setObjectName(u"insertBtn") 28 | self.insertBtn.setGeometry(QRect(40, 180, 80, 22)) 29 | self.pushButton_2 = QPushButton(Dialog) 30 | self.pushButton_2.setObjectName(u"pushButton_2") 31 | self.pushButton_2.setGeometry(QRect(170, 180, 80, 22)) 32 | self.label = QLabel(Dialog) 33 | self.label.setObjectName(u"label") 34 | self.label.setGeometry(QRect(40, 30, 65, 14)) 35 | self.label_2 = QLabel(Dialog) 36 | self.label_2.setObjectName(u"label_2") 37 | self.label_2.setGeometry(QRect(40, 60, 65, 14)) 38 | self.label_3 = QLabel(Dialog) 39 | self.label_3.setObjectName(u"label_3") 40 | self.label_3.setGeometry(QRect(30, 100, 65, 14)) 41 | self.txtSNO = QLineEdit(Dialog) 42 | self.txtSNO.setObjectName(u"txtSNO") 43 | self.txtSNO.setGeometry(QRect(130, 30, 113, 22)) 44 | self.txtSNAME = QLineEdit(Dialog) 45 | self.txtSNAME.setObjectName(u"txtSNAME") 46 | self.txtSNAME.setGeometry(QRect(130, 60, 113, 22)) 47 | self.txtAGE = QLineEdit(Dialog) 48 | self.txtAGE.setObjectName(u"txtAGE") 49 | self.txtAGE.setGeometry(QRect(130, 90, 113, 22)) 50 | 51 | self.retranslateUi(Dialog) 52 | self.insertBtn.clicked.connect(self.insertBtn_Clicked) 53 | self.pushButton_2.clicked.connect(self.exit_Clicked) 54 | 55 | QMetaObject.connectSlotsByName(Dialog) 56 | self.cursor=None 57 | self.db=None 58 | self.dlg=Dialog 59 | # setupUi 60 | 61 | def retranslateUi(self, Dialog): 62 | Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None)) 63 | self.insertBtn.setText(QCoreApplication.translate("Dialog", u"\u6dfb\u52a0", None)) 64 | self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u53d6\u6d88", None)) 65 | self.label.setText(QCoreApplication.translate("Dialog", u"\u5b66\u53f7\uff1a", None)) 66 | self.label_2.setText(QCoreApplication.translate("Dialog", u"\u59d3\u540d\uff1a", None)) 67 | self.label_3.setText(QCoreApplication.translate("Dialog", u"\u5e74\u9f84\uff1a", None)) 68 | # retranslateUi 69 | 70 | def insertBtn_Clicked(self): 71 | m_sno=self.txtSNO.text() 72 | m_sname=self.txtSNAME.text() 73 | m_age=self.txtAGE.text() 74 | sql = "insert into student(sno,sname,sage) values('"+m_sno+"','"+m_sname+"',"+m_age+")" 75 | print(sql) 76 | try: 77 | # 执行SQL语句 78 | self.cursor.execute(sql) 79 | self.db.commit() 80 | except Exception as e: 81 | # 发生错误时回滚 82 | print("Error: unable to fecth data",e) 83 | 84 | def exit_Clicked(self): 85 | self.dlg.close() -------------------------------------------------------------------------------- /references/qtdesigner/demo/__pycache__/QtUser.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/demo/__pycache__/QtUser.cpython-35.pyc -------------------------------------------------------------------------------- /references/qtdesigner/demo/__pycache__/QtUser.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/demo/__pycache__/QtUser.cpython-38.pyc -------------------------------------------------------------------------------- /references/qtdesigner/demo/__pycache__/QtUser.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/demo/__pycache__/QtUser.cpython-39.pyc -------------------------------------------------------------------------------- /references/qtdesigner/demo/__pycache__/myMainWindow.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/demo/__pycache__/myMainWindow.cpython-35.pyc -------------------------------------------------------------------------------- /references/qtdesigner/demo/__pycache__/myMainWindow.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/demo/__pycache__/myMainWindow.cpython-38.pyc -------------------------------------------------------------------------------- /references/qtdesigner/demo/__pycache__/myMainWindow.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/qtdesigner/demo/__pycache__/myMainWindow.cpython-39.pyc -------------------------------------------------------------------------------- /references/qtdesigner/demo/myMainWindow.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'designerLSZaKN.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 5.15.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | 12 | 13 | import pymysql 14 | from PySide6.QtCore import * 15 | from PySide6.QtGui import * 16 | from PySide6.QtWidgets import * 17 | 18 | from QtUser import User_Dialog 19 | db=pymysql.connect(host="localhost",user="root",passwd="123456",db="test", charset="utf8") 20 | cursor=db.cursor() 21 | 22 | 23 | 24 | class Ui_MainWindow(object): 25 | def setupUi(self, MainWindow): 26 | if not MainWindow.objectName(): 27 | MainWindow.setObjectName(u"MainWindow") 28 | MainWindow.resize(640, 480) 29 | self.action = QAction(MainWindow) 30 | self.action.setObjectName(u"action") 31 | self.action_2 = QAction(MainWindow) 32 | self.action_2.setObjectName(u"action_2") 33 | self.action_3 = QAction(MainWindow) 34 | self.action_3.setObjectName(u"action_3") 35 | self.action_4 = QAction(MainWindow) 36 | self.action_4.setObjectName(u"action_4") 37 | self.action_5 = QAction(MainWindow) 38 | self.action_5.setObjectName(u"action_5") 39 | self.centralwidget = QWidget(MainWindow) 40 | self.centralwidget.setObjectName(u"centralwidget") 41 | self.OKBtn = QPushButton(self.centralwidget) 42 | self.OKBtn.setObjectName(u"OKBtn") 43 | self.OKBtn.setGeometry(QRect(300, 400, 80, 22)) 44 | self.lab1 = QLabel(self.centralwidget) 45 | self.lab1.setObjectName(u"lab1") 46 | self.lab1.setGeometry(QRect(30, 20, 65, 14)) 47 | self.Edit1 = QLineEdit(self.centralwidget) 48 | self.Edit1.setObjectName(u"Edit1") 49 | self.Edit1.setGeometry(QRect(120, 20, 113, 22)) 50 | self.cancelBtn = QPushButton(self.centralwidget) 51 | self.cancelBtn.setObjectName(u"cancelBtn") 52 | self.cancelBtn.setGeometry(QRect(400, 400, 80, 22)) 53 | MainWindow.setCentralWidget(self.centralwidget) 54 | self.menubar = QMenuBar(MainWindow) 55 | self.menubar.setObjectName(u"menubar") 56 | self.menubar.setGeometry(QRect(0, 0, 513, 19)) 57 | self.menu = QMenu(self.menubar) 58 | self.menu.setObjectName(u"menu") 59 | self.menu_2 = QMenu(self.menubar) 60 | self.menu_2.setObjectName(u"menu_2") 61 | 62 | self.tbw = QTableWidget(self.centralwidget) 63 | self.tbw.setObjectName(u"tbw") 64 | self.tbw.setGeometry(QRect(20, 50, 600, 300)) 65 | 66 | MainWindow.setMenuBar(self.menubar) 67 | self.statusbar = QStatusBar(MainWindow) 68 | self.statusbar.setObjectName(u"statusbar") 69 | MainWindow.setStatusBar(self.statusbar) 70 | 71 | self.menubar.addAction(self.menu.menuAction()) 72 | self.menubar.addAction(self.menu_2.menuAction()) 73 | self.menu.addAction(self.action) 74 | #此处代码是关联菜单项和响应函数 75 | self.action.triggered.connect(self.user_search) 76 | 77 | self.menu.addAction(self.action_2) 78 | #此处代码是关联菜单项和响应函数 79 | self.action_2.triggered.connect(self.goods_search) 80 | self.action_5.triggered.connect(self.user_input) 81 | 82 | self.menu.addAction(self.action_3) 83 | self.menu_2.addAction(self.action_4) 84 | self.menu_2.addAction(self.action_5) 85 | #此处代码与按钮点击事件响应函数进行关联 86 | self.OKBtn.clicked.connect(self.OKBtn_click) 87 | self.cancelBtn.clicked.connect(self.cancelBtn_Clicked) 88 | self.Win=MainWindow 89 | 90 | self.retranslateUi(MainWindow) 91 | 92 | QMetaObject.connectSlotsByName(MainWindow) 93 | # setupUi 94 | 95 | def retranslateUi(self, MainWindow): 96 | MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None)) 97 | self.action.setText(QCoreApplication.translate("MainWindow", u"\u7528\u6237\u4fe1\u606f\u67e5\u8be2", None)) 98 | self.action_2.setText(QCoreApplication.translate("MainWindow", u"\u5546\u54c1\u4fe1\u606f\u67e5\u8be2", None)) 99 | self.action_3.setText(QCoreApplication.translate("MainWindow", u"\u4f9b\u5e94\u5546\u4fe1\u606f\u67e5\u8be2", None)) 100 | self.action_4.setText(QCoreApplication.translate("MainWindow", u"\u5546\u54c1\u4fe1\u606f\u5f55\u5165", None)) 101 | self.action_5.setText(QCoreApplication.translate("MainWindow", u"用户信息录入", None)) 102 | self.OKBtn.setText(QCoreApplication.translate("MainWindow", u"\u786e\u5b9a", None)) 103 | self.lab1.setText(QCoreApplication.translate("MainWindow", u" ", None)) 104 | self.cancelBtn.setText(QCoreApplication.translate("MainWindow", u"\u53d6\u6d88", None)) 105 | self.menu.setTitle(QCoreApplication.translate("MainWindow", u"\u67e5\u8be2", None)) 106 | self.menu_2.setTitle(QCoreApplication.translate("MainWindow", u"\u4fe1\u606f\u5f55\u5165", None)) 107 | 108 | # retranslateUi 109 | def user_search(self): 110 | print("用户信息查询") 111 | self.lab1.setText("用户信息查询") 112 | def user_input(self): 113 | print("用户信息查询") 114 | self.UserWin=QMainWindow() 115 | self.userdlg=User_Dialog() 116 | self.userdlg.setupUi(self.UserWin) 117 | self.userdlg.cursor=cursor 118 | self.userdlg.db=db 119 | self.UserWin.show() 120 | 121 | def goods_search(self): 122 | print("商品信息查询") 123 | self.lab1.setText("商品信息查询") 124 | def OKBtn_click(self): 125 | sql = "SELECT * FROM student" 126 | print(sql) 127 | try: 128 | # 执行SQL语句 129 | cursor.execute(sql) 130 | db.commit() 131 | results = cursor.fetchall() 132 | i=0 133 | self.tbw.setColumnCount(5) 134 | self.tbw.setRowCount(len(results)) 135 | for row in results: 136 | item =QTableWidgetItem(str(row[0])) 137 | self.tbw.setItem(i,0,item) 138 | item =QTableWidgetItem(str(row[1])) 139 | self.tbw.setItem(i,1,item) 140 | item =QTableWidgetItem(str(row[2])) 141 | self.tbw.setItem(i,2,item) 142 | item =QTableWidgetItem(str(row[3])) 143 | self.tbw.setItem(i,3,item) 144 | item =QTableWidgetItem(str(row[4])) 145 | self.tbw.setItem(i,4,item) 146 | i=i+1 147 | except Exception as e: 148 | # 发生错误时回滚 149 | print("Error: unable to fecth data",e) 150 | def cancelBtn_Clicked(self): 151 | self.Win.close() 152 | # app=QApplication([]) 153 | # Form=QMainWindow() 154 | # dlg=Ui_MainWindow() 155 | # dlg.setupUi(Form) 156 | # Form.show() 157 | # app.exec() 158 | -------------------------------------------------------------------------------- /references/qtdesigner/exp1/QtUi_MainWindow.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'designerLSZaKN.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 5.15.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | 12 | 13 | import pymysql 14 | 15 | from PySide6.QtCore import * 16 | from PySide6.QtGui import * 17 | from PySide6.QtWidgets import * 18 | 19 | db=pymysql.connect(host="localhost",user="root",passwd="123456",db="test", charset="utf8") 20 | cursor=db.cursor() 21 | 22 | 23 | 24 | class Ui_MainWindow(object): 25 | def setupUi(self, MainWindow): 26 | if not MainWindow.objectName(): 27 | MainWindow.setObjectName(u"MainWindow") 28 | MainWindow.resize(640, 480) 29 | self.action = QAction(MainWindow) 30 | self.action.setObjectName(u"action") 31 | self.action_2 = QAction(MainWindow) 32 | self.action_2.setObjectName(u"action_2") 33 | self.action_3 = QAction(MainWindow) 34 | self.action_3.setObjectName(u"action_3") 35 | self.action_4 = QAction(MainWindow) 36 | self.action_4.setObjectName(u"action_4") 37 | self.action_5 = QAction(MainWindow) 38 | self.action_5.setObjectName(u"action_5") 39 | self.centralwidget = QWidget(MainWindow) 40 | self.centralwidget.setObjectName(u"centralwidget") 41 | self.OKBtn = QPushButton(self.centralwidget) 42 | self.OKBtn.setObjectName(u"OKBtn") 43 | self.OKBtn.setGeometry(QRect(300, 400, 80, 22)) 44 | self.lab1 = QLabel(self.centralwidget) 45 | self.lab1.setObjectName(u"lab1") 46 | self.lab1.setGeometry(QRect(30, 20, 65, 14)) 47 | self.Edit1 = QLineEdit(self.centralwidget) 48 | self.Edit1.setObjectName(u"Edit1") 49 | self.Edit1.setGeometry(QRect(120, 20, 113, 22)) 50 | self.cancelBtn = QPushButton(self.centralwidget) 51 | self.cancelBtn.setObjectName(u"cancelBtn") 52 | self.cancelBtn.setGeometry(QRect(400, 400, 80, 22)) 53 | MainWindow.setCentralWidget(self.centralwidget) 54 | self.menubar = QMenuBar(MainWindow) 55 | self.menubar.setObjectName(u"menubar") 56 | self.menubar.setGeometry(QRect(0, 0, 513, 19)) 57 | self.menu = QMenu(self.menubar) 58 | self.menu.setObjectName(u"menu") 59 | self.menu_2 = QMenu(self.menubar) 60 | self.menu_2.setObjectName(u"menu_2") 61 | 62 | self.tbw = QTableWidget(self.centralwidget) 63 | self.tbw.setObjectName(u"tbw") 64 | self.tbw.setGeometry(QRect(20, 50, 600, 300)) 65 | 66 | MainWindow.setMenuBar(self.menubar) 67 | self.statusbar = QStatusBar(MainWindow) 68 | self.statusbar.setObjectName(u"statusbar") 69 | MainWindow.setStatusBar(self.statusbar) 70 | 71 | self.menubar.addAction(self.menu.menuAction()) 72 | self.menubar.addAction(self.menu_2.menuAction()) 73 | self.menu.addAction(self.action) 74 | #此处代码是关联菜单项和响应函数 75 | self.action.triggered.connect(self.user_search) 76 | 77 | self.menu.addAction(self.action_2) 78 | #此处代码是关联菜单项和响应函数 79 | self.action_2.triggered.connect(self.goods_search) 80 | 81 | self.menu.addAction(self.action_3) 82 | self.menu_2.addAction(self.action_4) 83 | self.menu_2.addAction(self.action_5) 84 | #此处代码与事件相应函数进行关联 85 | self.OKBtn.clicked.connect(self.OKBtn_click) 86 | self.cancelBtn.clicked.connect(self.cancelBtn_Clicked) 87 | self.Win=MainWindow 88 | 89 | self.retranslateUi(MainWindow) 90 | 91 | QMetaObject.connectSlotsByName(MainWindow) 92 | # setupUi 93 | 94 | def retranslateUi(self, MainWindow): 95 | MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None)) 96 | self.action.setText(QCoreApplication.translate("MainWindow", u"\u7528\u6237\u4fe1\u606f\u67e5\u8be2", None)) 97 | self.action_2.setText(QCoreApplication.translate("MainWindow", u"商品信息查询", None)) 98 | self.action_3.setText(QCoreApplication.translate("MainWindow", u"\u4f9b\u5e94\u5546\u4fe1\u606f\u67e5\u8be2", None)) 99 | self.action_4.setText(QCoreApplication.translate("MainWindow", u"\u5546\u54c1\u4fe1\u606f\u5f55\u5165", None)) 100 | self.action_5.setText(QCoreApplication.translate("MainWindow", u"\u4f9b\u5e94\u5546\u4fe1\u606f\u5f55\u5165", None)) 101 | self.OKBtn.setText(QCoreApplication.translate("MainWindow", u"\u786e\u5b9a", None)) 102 | self.lab1.setText(QCoreApplication.translate("MainWindow", u" ", None)) 103 | self.cancelBtn.setText(QCoreApplication.translate("MainWindow", u"\u53d6\u6d88", None)) 104 | self.menu.setTitle(QCoreApplication.translate("MainWindow", u"\u67e5\u8be2", None)) 105 | self.menu_2.setTitle(QCoreApplication.translate("MainWindow", u"\u4fe1\u606f\u5f55\u5165", None)) 106 | 107 | # retranslateUi 108 | def user_search(self): 109 | print("用户信息查询") 110 | self.lab1.setText("用户信息查询") 111 | def goods_search(self): 112 | print("商品信息查询") 113 | self.lab1.setText("商品信息查询") 114 | def OKBtn_click(self): 115 | sql = "SELECT * FROM student" 116 | print(sql) 117 | try: 118 | # 执行SQL语句 119 | cursor.execute(sql) 120 | db.commit() 121 | results = cursor.fetchall() 122 | i=0 123 | self.tbw.setColumnCount(5) 124 | self.tbw.setRowCount(len(results)) 125 | for row in results: 126 | item =QTableWidgetItem(str(row[0])) 127 | self.tbw.setItem(i,0,item) 128 | item =QTableWidgetItem(str(row[1])) 129 | self.tbw.setItem(i,1,item) 130 | item =QTableWidgetItem(str(row[2])) 131 | self.tbw.setItem(i,2,item) 132 | item =QTableWidgetItem(str(row[3])) 133 | self.tbw.setItem(i,3,item) 134 | item =QTableWidgetItem(str(row[4])) 135 | self.tbw.setItem(i,4,item) 136 | i=i+1 137 | except Exception as e: 138 | # 发生错误时回滚 139 | print("Error: unable to fecth data",e) 140 | def cancelBtn_Clicked(self): 141 | self.Win.close() 142 | 143 | app=QApplication([]) 144 | Form=QMainWindow() 145 | dlg=Ui_MainWindow() 146 | dlg.setupUi(Form) 147 | Form.show() 148 | app.exec() 149 | -------------------------------------------------------------------------------- /references/qtdesigner/exp2/QtDialogtest.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'designerLSZaKN.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 5.15.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | 12 | 13 | import pymysql 14 | 15 | from PySide6.QtCore import * 16 | from PySide6.QtGui import * 17 | from PySide6.QtWidgets import * 18 | 19 | db=pymysql.connect(host="localhost",user="root",passwd="123456",db="test", charset="utf8") 20 | cursor=db.cursor() 21 | 22 | 23 | class Ui_Dialog(object): 24 | def setupUi(self, Dialog): 25 | if not Dialog.objectName(): 26 | Dialog.setObjectName(u"Dialog") 27 | Dialog.resize(340, 234) 28 | self.insertBtn = QPushButton(Dialog) 29 | self.insertBtn.setObjectName(u"insertBtn") 30 | self.insertBtn.setGeometry(QRect(40, 180, 80, 22)) 31 | self.pushButton_2 = QPushButton(Dialog) 32 | self.pushButton_2.setObjectName(u"pushButton_2") 33 | self.pushButton_2.setGeometry(QRect(170, 180, 80, 22)) 34 | self.label = QLabel(Dialog) 35 | self.label.setObjectName(u"label") 36 | self.label.setGeometry(QRect(40, 30, 65, 14)) 37 | self.label_2 = QLabel(Dialog) 38 | self.label_2.setObjectName(u"label_2") 39 | self.label_2.setGeometry(QRect(40, 60, 65, 14)) 40 | self.label_3 = QLabel(Dialog) 41 | self.label_3.setObjectName(u"label_3") 42 | self.label_3.setGeometry(QRect(30, 100, 65, 14)) 43 | self.txtSNO = QLineEdit(Dialog) 44 | self.txtSNO.setObjectName(u"txtSNO") 45 | self.txtSNO.setGeometry(QRect(130, 30, 113, 22)) 46 | self.txtSNAME = QLineEdit(Dialog) 47 | self.txtSNAME.setObjectName(u"txtSNAME") 48 | self.txtSNAME.setGeometry(QRect(130, 60, 113, 22)) 49 | self.txtAGE = QLineEdit(Dialog) 50 | self.txtAGE.setObjectName(u"txtAGE") 51 | self.txtAGE.setGeometry(QRect(130, 90, 113, 22)) 52 | 53 | self.retranslateUi(Dialog) 54 | self.insertBtn.clicked.connect(self.insertBtn_Clicked) 55 | 56 | QMetaObject.connectSlotsByName(Dialog) 57 | # setupUi 58 | 59 | def retranslateUi(self, Dialog): 60 | Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None)) 61 | self.insertBtn.setText(QCoreApplication.translate("Dialog", u"\u6dfb\u52a0", None)) 62 | self.pushButton_2.setText(QCoreApplication.translate("Dialog", u"\u53d6\u6d88", None)) 63 | self.label.setText(QCoreApplication.translate("Dialog", u"\u5b66\u53f7\uff1a", None)) 64 | self.label_2.setText(QCoreApplication.translate("Dialog", u"\u59d3\u540d\uff1a", None)) 65 | self.label_3.setText(QCoreApplication.translate("Dialog", u"\u5e74\u9f84\uff1a", None)) 66 | # retranslateUi 67 | 68 | def insertBtn_Clicked(self): 69 | m_sno=self.txtSNO.text() 70 | m_sname=self.txtSNAME.text() 71 | m_age=self.txtAGE.text() 72 | sql = "insert into student(sno,sname,sage) values('"+m_sno+"','"+m_sname+"',"+m_age+")" 73 | print(sql) 74 | try: 75 | # 执行SQL语句 76 | cursor.execute(sql) 77 | db.commit() 78 | except Exception as e: 79 | # 发生错误时回滚 80 | print("Error: unable to fecth data",e) 81 | 82 | 83 | app=QApplication([]) 84 | Form=QDialog() 85 | dlg=Ui_Dialog() 86 | dlg.setupUi(Form) 87 | Form.show() 88 | app.exec() 89 | -------------------------------------------------------------------------------- /references/qtdesigner/exp2/QtWidgetest.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'designerLSZaKN.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 5.15.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | 12 | 13 | import pymysql 14 | 15 | 16 | 17 | from PySide6.QtCore import * 18 | from PySide6.QtGui import * 19 | from PySide6.QtWidgets import * 20 | 21 | 22 | class Ui_Form(object): 23 | def setupUi(self, Form): 24 | if not Form.objectName(): 25 | Form.setObjectName(u"Form") 26 | Form.resize(400, 300) 27 | self.pushButton = QPushButton(Form) 28 | self.pushButton.setObjectName(u"pushButton") 29 | self.pushButton.setGeometry(QRect(180, 170, 80, 22)) 30 | 31 | self.retranslateUi(Form) 32 | 33 | QMetaObject.connectSlotsByName(Form) 34 | # setupUi 35 | 36 | def retranslateUi(self, Form): 37 | Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None)) 38 | self.pushButton.setText(QCoreApplication.translate("Form", u"PushButton", None)) 39 | # retranslateUi 40 | 41 | 42 | 43 | app=QApplication([]) 44 | Form=QWidget() 45 | dlg=Ui_Form() 46 | dlg.setupUi(Form) 47 | Form.show() 48 | app.exec() 49 | -------------------------------------------------------------------------------- /references/qtdesigner/myMainWindow.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | ################################################################################ 4 | ## Form generated from reading UI file 'designerLSZaKN.ui' 5 | ## 6 | ## Created by: Qt User Interface Compiler version 5.15.2 7 | ## 8 | ## WARNING! All changes made in this file will be lost when recompiling UI file! 9 | ################################################################################ 10 | 11 | 12 | 13 | import pymysql 14 | import sys 15 | from PySide6.QtCore import * 16 | from PySide6.QtGui import * 17 | from PySide6.QtWidgets import * 18 | 19 | from QtUser import User_Dialog 20 | db=pymysql.connect(host="localhost",user="root",passwd="123456",db="test", charset="utf8") 21 | cursor=db.cursor() 22 | 23 | 24 | 25 | class Ui_MainWindow(object): 26 | def setupUi(self, MainWindow): 27 | if not MainWindow.objectName(): 28 | MainWindow.setObjectName(u"MainWindow") 29 | MainWindow.resize(640, 480) 30 | self.action = QAction(MainWindow) 31 | self.action.setObjectName(u"action") 32 | self.action_2 = QAction(MainWindow) 33 | self.action_2.setObjectName(u"action_2") 34 | self.action_3 = QAction(MainWindow) 35 | self.action_3.setObjectName(u"action_3") 36 | self.action_4 = QAction(MainWindow) 37 | self.action_4.setObjectName(u"action_4") 38 | self.action_5 = QAction(MainWindow) 39 | self.action_5.setObjectName(u"action_5") 40 | self.centralwidget = QWidget(MainWindow) 41 | self.centralwidget.setObjectName(u"centralwidget") 42 | self.OKBtn = QPushButton(self.centralwidget) 43 | self.OKBtn.setObjectName(u"OKBtn") 44 | self.OKBtn.setGeometry(QRect(300, 400, 80, 22)) 45 | self.lab1 = QLabel(self.centralwidget) 46 | self.lab1.setObjectName(u"lab1") 47 | self.lab1.setGeometry(QRect(30, 20, 65, 14)) 48 | self.Edit1 = QLineEdit(self.centralwidget) 49 | self.Edit1.setObjectName(u"Edit1") 50 | self.Edit1.setGeometry(QRect(120, 20, 113, 22)) 51 | self.cancelBtn = QPushButton(self.centralwidget) 52 | self.cancelBtn.setObjectName(u"cancelBtn") 53 | self.cancelBtn.setGeometry(QRect(400, 400, 80, 22)) 54 | MainWindow.setCentralWidget(self.centralwidget) 55 | self.menubar = QMenuBar(MainWindow) 56 | self.menubar.setObjectName(u"menubar") 57 | self.menubar.setGeometry(QRect(0, 0, 513, 19)) 58 | self.menu = QMenu(self.menubar) 59 | self.menu.setObjectName(u"menu") 60 | self.menu_2 = QMenu(self.menubar) 61 | self.menu_2.setObjectName(u"menu_2") 62 | 63 | self.tbw = QTableWidget(self.centralwidget) 64 | self.tbw.setObjectName(u"tbw") 65 | self.tbw.setGeometry(QRect(20, 50, 600, 300)) 66 | 67 | MainWindow.setMenuBar(self.menubar) 68 | self.statusbar = QStatusBar(MainWindow) 69 | self.statusbar.setObjectName(u"statusbar") 70 | MainWindow.setStatusBar(self.statusbar) 71 | 72 | self.menubar.addAction(self.menu.menuAction()) 73 | self.menubar.addAction(self.menu_2.menuAction()) 74 | self.menu.addAction(self.action) 75 | #此处代码是关联菜单项和响应函数 76 | self.action.triggered.connect(self.user_search) 77 | 78 | self.menu.addAction(self.action_2) 79 | #此处代码是关联菜单项和响应函数 80 | self.action_2.triggered.connect(self.goods_search) 81 | self.action_5.triggered.connect(self.user_input) 82 | 83 | self.menu.addAction(self.action_3) 84 | self.menu_2.addAction(self.action_4) 85 | self.menu_2.addAction(self.action_5) 86 | #此处代码与按钮点击事件响应函数进行关联 87 | self.OKBtn.clicked.connect(self.OKBtn_click) 88 | self.cancelBtn.clicked.connect(self.cancelBtn_Clicked) 89 | self.Win=MainWindow 90 | 91 | self.retranslateUi(MainWindow) 92 | 93 | QMetaObject.connectSlotsByName(MainWindow) 94 | # setupUi 95 | 96 | def retranslateUi(self, MainWindow): 97 | MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None)) 98 | self.action.setText(QCoreApplication.translate("MainWindow", u"\u7528\u6237\u4fe1\u606f\u67e5\u8be2", None)) 99 | self.action_2.setText(QCoreApplication.translate("MainWindow", u"\u5546\u54c1\u4fe1\u606f\u67e5\u8be2", None)) 100 | self.action_3.setText(QCoreApplication.translate("MainWindow", u"\u4f9b\u5e94\u5546\u4fe1\u606f\u67e5\u8be2", None)) 101 | self.action_4.setText(QCoreApplication.translate("MainWindow", u"\u5546\u54c1\u4fe1\u606f\u5f55\u5165", None)) 102 | self.action_5.setText(QCoreApplication.translate("MainWindow", u"用户信息录入", None)) 103 | self.OKBtn.setText(QCoreApplication.translate("MainWindow", u"\u786e\u5b9a", None)) 104 | self.lab1.setText(QCoreApplication.translate("MainWindow", u" ", None)) 105 | self.cancelBtn.setText(QCoreApplication.translate("MainWindow", u"\u53d6\u6d88", None)) 106 | self.menu.setTitle(QCoreApplication.translate("MainWindow", u"\u67e5\u8be2", None)) 107 | self.menu_2.setTitle(QCoreApplication.translate("MainWindow", u"\u4fe1\u606f\u5f55\u5165", None)) 108 | 109 | # retranslateUi 110 | def user_search(self): 111 | print("用户信息查询") 112 | self.lab1.setText("用户信息查询") 113 | def user_input(self): 114 | print("用户信息查询") 115 | self.UserWin=QMainWindow() 116 | self.userdlg=User_Dialog() 117 | self.userdlg.setupUi(self.UserWin) 118 | self.userdlg.cursor=cursor 119 | self.userdlg.db=db 120 | self.UserWin.show() 121 | 122 | def goods_search(self): 123 | print("商品信息查询") 124 | self.lab1.setText("商品信息查询") 125 | def OKBtn_click(self): 126 | sql = "SELECT * FROM student" 127 | print(sql) 128 | try: 129 | # 执行SQL语句 130 | cursor.execute(sql) 131 | db.commit() 132 | results = cursor.fetchall() 133 | i=0 134 | self.tbw.setColumnCount(5) 135 | self.tbw.setRowCount(len(results)) 136 | for row in results: 137 | item =QTableWidgetItem(str(row[0])) 138 | self.tbw.setItem(i,0,item) 139 | item =QTableWidgetItem(str(row[1])) 140 | self.tbw.setItem(i,1,item) 141 | item =QTableWidgetItem(str(row[2])) 142 | self.tbw.setItem(i,2,item) 143 | item =QTableWidgetItem(str(row[3])) 144 | self.tbw.setItem(i,3,item) 145 | item =QTableWidgetItem(str(row[4])) 146 | self.tbw.setItem(i,4,item) 147 | i=i+1 148 | except Exception as e: 149 | # 发生错误时回滚 150 | print("Error: unable to fecth data",e) 151 | def cancelBtn_Clicked(self): 152 | self.Win.close() 153 | # app=QApplication(sys.argv) 154 | # Form=QMainWindow() 155 | # dlg=Ui_MainWindow() 156 | # dlg.setupUi(Form) 157 | # Form.show() 158 | # app.exec() 159 | -------------------------------------------------------------------------------- /references/qtdesigner/student.sql: -------------------------------------------------------------------------------- 1 | show databases; 2 | create database test; 3 | use test; 4 | drop table student; 5 | CREATE TABLE `student` ( 6 | `SNo` char(10) NOT NULL, 7 | `SName` char(20) NOT NULL, 8 | `Sage` int(11) , 9 | `SGender` char(2) , 10 | `depart` char(20) , 11 | PRIMARY KEY (`SNo`) 12 | )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 13 | 14 | insert into student values('001','张三',19,'M','计算机'); 15 | insert into student values('002','李四',19,'M','计算机'); 16 | insert into student values('003','王二',20,'M','信息管理'); 17 | insert into student values('004','Jason',19,'M','物流工程'); 18 | 19 | select * from student; -------------------------------------------------------------------------------- /references/《数据库应用》系统设计报告.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/《数据库应用》系统设计报告.pdf -------------------------------------------------------------------------------- /references/课程设计《数据库应用》内容要求.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/references/课程设计《数据库应用》内容要求.pdf -------------------------------------------------------------------------------- /ui/LoginUI.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | 15 | Century Gothic 16 | -1 17 | 18 | 19 | 20 | 浙商大招待所 21 | 22 | 23 | 24 | ../../../../../../pictures/酒店.png../../../../../../pictures/酒店.png 25 | 26 | 27 | 28 | *{ 29 | font-size:24px; 30 | font-family:Century Gothic; 31 | } 32 | QFrame{ 33 | background:rgba(0,0,0,0.8); 34 | border-radius:15px; 35 | } 36 | #centralwidget{ 37 | border-image:url(D:/pictures/login4.jpg) strectch; 38 | } 39 | 40 | #toolButton{ 41 | background:red; 42 | border-radius:60px; 43 | } 44 | QLabel{ 45 | color:white; 46 | background:transparent; 47 | } 48 | QPushButton{ 49 | background:red;; 50 | border-radius:15px; 51 | } 52 | QPushButton:hover{ 53 | background:#333; 54 | border-radius:15px; 55 | background:#49ebff; 56 | } 57 | QLineEdit{ 58 | background:transparent; 59 | border:none; 60 | color:#717072; 61 | border-bottom:1px solid #717072; 62 | } 63 | 64 | 65 | 66 | 67 | Century Gothic 68 | -1 69 | 70 | 71 | 72 | Qt::WheelFocus 73 | 74 | 75 | Qt::DefaultContextMenu 76 | 77 | 78 | 79 | 80 | 140 81 | 80 82 | 491 83 | 461 84 | 85 | 86 | 87 | 88 | Century Gothic 89 | -1 90 | 91 | 92 | 93 | QFrame::StyledPanel 94 | 95 | 96 | QFrame::Raised 97 | 98 | 99 | 100 | 101 | 180 102 | 70 103 | 151 104 | 41 105 | 106 | 107 | 108 | 109 | Century Gothic 110 | -1 111 | 112 | 113 | 114 | Now Login! 115 | 116 | 117 | 118 | 119 | 120 | 70 121 | 160 122 | 361 123 | 31 124 | 125 | 126 | 127 | 128 | 129 | 130 | username 131 | 132 | 133 | 134 | 135 | 136 | 70 137 | 260 138 | 361 139 | 31 140 | 141 | 142 | 143 | 144 | Century Gothic 145 | -1 146 | 147 | 148 | 149 | Qt::DefaultContextMenu 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | QLineEdit::Password 159 | 160 | 161 | password 162 | 163 | 164 | 165 | 166 | 167 | 30 168 | 370 169 | 421 170 | 51 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 81 180 | 182 181 | 255 182 | 183 | 184 | 185 | 186 | 187 | 188 | 81 189 | 182 190 | 255 191 | 192 | 193 | 194 | 195 | 196 | 197 | 81 198 | 182 199 | 255 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 81 209 | 182 210 | 255 211 | 212 | 213 | 214 | 215 | 216 | 217 | 81 218 | 182 219 | 255 220 | 221 | 222 | 223 | 224 | 225 | 226 | 81 227 | 182 228 | 255 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 81 238 | 182 239 | 255 240 | 241 | 242 | 243 | 244 | 245 | 246 | 81 247 | 182 248 | 255 249 | 250 | 251 | 252 | 253 | 254 | 255 | 81 256 | 182 257 | 255 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | background-color: rgb(81, 182, 255); 266 | QPalette pal = startBtn.palette(); 267 | pal.setColor(QPalette::ButtonText, Qt::red); 268 | startBtn.setPalette(pal); 269 | startBtn.setStyleSheet("background-color:green"); 270 | 271 | 272 | 登 录 273 | 274 | 275 | 276 | 277 | 278 | 70 279 | 120 280 | 121 281 | 31 282 | 283 | 284 | 285 | 286 | Century Gothic 287 | -1 288 | 289 | 290 | 291 | 账户名 292 | 293 | 294 | 295 | 296 | 297 | 70 298 | 220 299 | 121 300 | 31 301 | 302 | 303 | 304 | 密码 305 | 306 | 307 | 308 | 309 | 310 | 311 | 330 312 | 20 313 | 121 314 | 121 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 116 324 | 197 325 | 255 326 | 327 | 328 | 329 | 330 | 331 | 332 | 116 333 | 197 334 | 255 335 | 336 | 337 | 338 | 339 | 340 | 341 | 116 342 | 197 343 | 255 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 116 353 | 197 354 | 255 355 | 356 | 357 | 358 | 359 | 360 | 361 | 116 362 | 197 363 | 255 364 | 365 | 366 | 367 | 368 | 369 | 370 | 116 371 | 197 372 | 255 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 116 382 | 197 383 | 255 384 | 385 | 386 | 387 | 388 | 389 | 390 | 116 391 | 197 392 | 255 393 | 394 | 395 | 396 | 397 | 398 | 399 | 116 400 | 197 401 | 255 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | background-color: rgb(116, 197, 255); 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | ../../../../../../pictures/院徽.png../../../../../../pictures/院徽.png 420 | 421 | 422 | 423 | 150 424 | 150 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | -------------------------------------------------------------------------------- /ui/MainUI.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | Qt::DefaultContextMenu 15 | 16 | 17 | 浙商大招待所 18 | 19 | 20 | 21 | ../../../../../../pictures/酒店.png../../../../../../pictures/酒店.png 22 | 23 | 24 | QMainWindow{ 25 | border-radius:15px 26 | } 27 | QWidget{ 28 | border-radius:15px; 29 | } 30 | #frame{ 31 | background: #e1e9ed;} 32 | QToolButton{ 33 | background:#EAF7FF; 34 | border-radius:15px; 35 | } 36 | QToolButton:hover{ 37 | background:#EAF7FF; 38 | border-radius:15px; 39 | background:#49ebff; 40 | } 41 | #label{ 42 | text-align:center; 43 | } 44 | #welcome{ 45 | text-align:center; 46 | } 47 | #toolButton_7 48 | { 49 | background:#e1e9ed; 50 | } 51 | 52 | 53 | QTabWidget::Rounded 54 | 55 | 56 | 57 | 58 | 59 | 530 60 | 340 61 | 200 62 | 120 63 | 64 | 65 | 66 | 67 | 200 68 | 120 69 | 70 | 71 | 72 | 73 | 幼圆 74 | 75 75 | true 76 | 77 | 78 | 79 | 维护与报表 80 | 81 | 82 | 83 | ../../../../../pictures/chart.png../../../../../pictures/chart.png 84 | 85 | 86 | 87 | 70 88 | 70 89 | 90 | 91 | 92 | Qt::ToolButtonTextUnderIcon 93 | 94 | 95 | 96 | 97 | 98 | 40 99 | 340 100 | 200 101 | 120 102 | 103 | 104 | 105 | 106 | 幼圆 107 | 75 108 | true 109 | 110 | 111 | 112 | 客房管理 113 | 114 | 115 | 116 | ../../../../../pictures/coffee.png../../../../../pictures/coffee.png 117 | 118 | 119 | 120 | 80 121 | 80 122 | 123 | 124 | 125 | QToolButton::InstantPopup 126 | 127 | 128 | Qt::ToolButtonTextUnderIcon 129 | 130 | 131 | 132 | 133 | 134 | 290 135 | 340 136 | 200 137 | 120 138 | 139 | 140 | 141 | 142 | 幼圆 143 | 75 144 | true 145 | 146 | 147 | 148 | 员工管理 149 | 150 | 151 | 152 | ../../../../../pictures/staff.png../../../../../pictures/staff.png 153 | 154 | 155 | 156 | 80 157 | 80 158 | 159 | 160 | 161 | Qt::ToolButtonTextUnderIcon 162 | 163 | 164 | 165 | 166 | 167 | 0 168 | 0 169 | 800 170 | 180 171 | 172 | 173 | 174 | QFrame::StyledPanel 175 | 176 | 177 | QFrame::Raised 178 | 179 | 180 | 181 | 182 | 40 183 | 10 184 | 751 185 | 51 186 | 187 | 188 | 189 | 190 | 幼圆 191 | 12 192 | 193 | 194 | 195 | 196 | 197 | 198 | Qt::AlignCenter 199 | 200 | 201 | 202 | 203 | 204 | 370 205 | 70 206 | 71 207 | 71 208 | 209 | 210 | 211 | 212 | 9 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | ../../../../../pictures/hotel.png../../../../../pictures/hotel.png 221 | 222 | 223 | 224 | 100 225 | 100 226 | 227 | 228 | 229 | 230 | 231 | 232 | 710 233 | 150 234 | 81 235 | 21 236 | 237 | 238 | 239 | background:#e1e9ed 240 | 241 | 242 | 修改密码 243 | 244 | 245 | 246 | 247 | 248 | 249 | 310 250 | 540 251 | 181 252 | 41 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 195 262 | 210 263 | 217 264 | 265 | 266 | 267 | 268 | 269 | 270 | 255 271 | 255 272 | 255 273 | 274 | 275 | 276 | 277 | 278 | 279 | 255 280 | 255 281 | 255 282 | 283 | 284 | 285 | 286 | 287 | 288 | 225 289 | 232 290 | 236 291 | 292 | 293 | 294 | 295 | 296 | 297 | 97 298 | 105 299 | 108 300 | 301 | 302 | 303 | 304 | 305 | 306 | 130 307 | 140 308 | 145 309 | 310 | 311 | 312 | 313 | 314 | 315 | 0 316 | 0 317 | 0 318 | 319 | 320 | 321 | 322 | 323 | 324 | 255 325 | 255 326 | 255 327 | 328 | 329 | 330 | 331 | 332 | 333 | 0 334 | 0 335 | 0 336 | 337 | 338 | 339 | 340 | 341 | 342 | 255 343 | 255 344 | 255 345 | 346 | 347 | 348 | 349 | 350 | 351 | 255 352 | 255 353 | 255 354 | 355 | 356 | 357 | 358 | 359 | 360 | 0 361 | 0 362 | 0 363 | 364 | 365 | 366 | 367 | 368 | 369 | 225 370 | 232 371 | 236 372 | 373 | 374 | 375 | 376 | 377 | 378 | 255 379 | 255 380 | 220 381 | 382 | 383 | 384 | 385 | 386 | 387 | 0 388 | 0 389 | 0 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 195 399 | 210 400 | 217 401 | 402 | 403 | 404 | 405 | 406 | 407 | 255 408 | 255 409 | 255 410 | 411 | 412 | 413 | 414 | 415 | 416 | 255 417 | 255 418 | 255 419 | 420 | 421 | 422 | 423 | 424 | 425 | 225 426 | 232 427 | 236 428 | 429 | 430 | 431 | 432 | 433 | 434 | 97 435 | 105 436 | 108 437 | 438 | 439 | 440 | 441 | 442 | 443 | 130 444 | 140 445 | 145 446 | 447 | 448 | 449 | 450 | 451 | 452 | 0 453 | 0 454 | 0 455 | 456 | 457 | 458 | 459 | 460 | 461 | 255 462 | 255 463 | 255 464 | 465 | 466 | 467 | 468 | 469 | 470 | 0 471 | 0 472 | 0 473 | 474 | 475 | 476 | 477 | 478 | 479 | 255 480 | 255 481 | 255 482 | 483 | 484 | 485 | 486 | 487 | 488 | 255 489 | 255 490 | 255 491 | 492 | 493 | 494 | 495 | 496 | 497 | 0 498 | 0 499 | 0 500 | 501 | 502 | 503 | 504 | 505 | 506 | 225 507 | 232 508 | 236 509 | 510 | 511 | 512 | 513 | 514 | 515 | 255 516 | 255 517 | 220 518 | 519 | 520 | 521 | 522 | 523 | 524 | 0 525 | 0 526 | 0 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 97 536 | 105 537 | 108 538 | 539 | 540 | 541 | 542 | 543 | 544 | 255 545 | 255 546 | 255 547 | 548 | 549 | 550 | 551 | 552 | 553 | 255 554 | 255 555 | 255 556 | 557 | 558 | 559 | 560 | 561 | 562 | 225 563 | 232 564 | 236 565 | 566 | 567 | 568 | 569 | 570 | 571 | 97 572 | 105 573 | 108 574 | 575 | 576 | 577 | 578 | 579 | 580 | 130 581 | 140 582 | 145 583 | 584 | 585 | 586 | 587 | 588 | 589 | 97 590 | 105 591 | 108 592 | 593 | 594 | 595 | 596 | 597 | 598 | 255 599 | 255 600 | 255 601 | 602 | 603 | 604 | 605 | 606 | 607 | 97 608 | 105 609 | 108 610 | 611 | 612 | 613 | 614 | 615 | 616 | 255 617 | 255 618 | 255 619 | 620 | 621 | 622 | 623 | 624 | 625 | 255 626 | 255 627 | 255 628 | 629 | 630 | 631 | 632 | 633 | 634 | 0 635 | 0 636 | 0 637 | 638 | 639 | 640 | 641 | 642 | 643 | 195 644 | 210 645 | 217 646 | 647 | 648 | 649 | 650 | 651 | 652 | 255 653 | 255 654 | 220 655 | 656 | 657 | 658 | 659 | 660 | 661 | 0 662 | 0 663 | 0 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 幼圆 673 | 674 | 675 | 676 | 酒店管理系统--冉熙 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | -------------------------------------------------------------------------------- /ui/ModifyPwd.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'ModifyPwd.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.7 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_MpwdWindow(object): 15 | def setupUi(self, MainWindow): 16 | MainWindow.setObjectName("MainWindow") 17 | MainWindow.resize(800, 600) 18 | MainWindow.setStyleSheet("\n" 19 | "*{\n" 20 | "font-size:24px;\n" 21 | "font-family:Century Gothic;\n" 22 | "}\n" 23 | "QFrame{\n" 24 | "background:rgba(0,0,0,0.8);\n" 25 | "border-radius:15px;\n" 26 | "}\n" 27 | "#centralwidget{\n" 28 | "border-image:url(D:/pictures/login4.jpg) strectch;\n" 29 | "}\n" 30 | "\n" 31 | "QToolButton{\n" 32 | "background:red;\n" 33 | "border-radius:60px;\n" 34 | "}\n" 35 | "QLabel{\n" 36 | "color:white;\n" 37 | "background:transparent;\n" 38 | "}\n" 39 | "QPushButton{\n" 40 | "background:red;;\n" 41 | "border-radius:15px;\n" 42 | "}\n" 43 | "QPushButton:hover{\n" 44 | "background:#333;\n" 45 | "border-radius:15px;\n" 46 | "background:#49ebff;\n" 47 | "}\n" 48 | "QLineEdit{\n" 49 | "background:transparent;\n" 50 | "border:none;\n" 51 | "color:#717072;\n" 52 | "border-bottom:1px solid #717072;\n" 53 | "}") 54 | self.centralwidget = QtWidgets.QWidget(MainWindow) 55 | self.centralwidget.setObjectName("centralwidget") 56 | self.frame = QtWidgets.QFrame(self.centralwidget) 57 | self.frame.setGeometry(QtCore.QRect(150, 60, 491, 511)) 58 | font = QtGui.QFont() 59 | font.setFamily("Century Gothic") 60 | font.setPointSize(-1) 61 | self.frame.setFont(font) 62 | self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) 63 | self.frame.setFrameShadow(QtWidgets.QFrame.Raised) 64 | self.frame.setObjectName("frame") 65 | self.label = QtWidgets.QLabel(self.frame) 66 | self.label.setGeometry(QtCore.QRect(210, 70, 111, 41)) 67 | font = QtGui.QFont() 68 | font.setFamily("Century Gothic") 69 | font.setPointSize(-1) 70 | self.label.setFont(font) 71 | self.label.setObjectName("label") 72 | self.lineEdit_oldpasswd = QtWidgets.QLineEdit(self.frame) 73 | self.lineEdit_oldpasswd.setGeometry(QtCore.QRect(70, 250, 361, 31)) 74 | self.lineEdit_oldpasswd.setText("") 75 | self.lineEdit_oldpasswd.setEchoMode(QtWidgets.QLineEdit.Password) 76 | self.lineEdit_oldpasswd.setObjectName("lineEdit_oldpasswd") 77 | self.commitButton = QtWidgets.QPushButton(self.frame) 78 | self.commitButton.setGeometry(QtCore.QRect(40, 430, 421, 51)) 79 | self.commitButton.setStyleSheet("background-color: rgb(117, 200, 255);") 80 | self.commitButton.setObjectName("commitButton") 81 | self.label_2 = QtWidgets.QLabel(self.frame) 82 | self.label_2.setGeometry(QtCore.QRect(70, 210, 121, 31)) 83 | font = QtGui.QFont() 84 | font.setFamily("Century Gothic") 85 | font.setPointSize(-1) 86 | self.label_2.setFont(font) 87 | self.label_2.setObjectName("label_2") 88 | self.label_4 = QtWidgets.QLabel(self.frame) 89 | self.label_4.setGeometry(QtCore.QRect(70, 300, 121, 31)) 90 | self.label_4.setObjectName("label_4") 91 | self.lineEdit_newpwd = QtWidgets.QLineEdit(self.frame) 92 | self.lineEdit_newpwd.setGeometry(QtCore.QRect(70, 340, 361, 31)) 93 | font = QtGui.QFont() 94 | font.setFamily("Century Gothic") 95 | font.setPointSize(-1) 96 | self.lineEdit_newpwd.setFont(font) 97 | self.lineEdit_newpwd.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu) 98 | self.lineEdit_newpwd.setLocale(QtCore.QLocale(QtCore.QLocale.Chinese, QtCore.QLocale.China)) 99 | self.lineEdit_newpwd.setText("") 100 | self.lineEdit_newpwd.setEchoMode(QtWidgets.QLineEdit.Password) 101 | self.lineEdit_newpwd.setObjectName("lineEdit_newpwd") 102 | self.lineEdit_sid = QtWidgets.QLineEdit(self.frame) 103 | self.lineEdit_sid.setGeometry(QtCore.QRect(70, 160, 361, 31)) 104 | self.lineEdit_sid.setText("") 105 | self.lineEdit_sid.setObjectName("lineEdit_sid") 106 | self.label_3 = QtWidgets.QLabel(self.frame) 107 | self.label_3.setGeometry(QtCore.QRect(70, 120, 121, 31)) 108 | font = QtGui.QFont() 109 | font.setFamily("Century Gothic") 110 | font.setPointSize(-1) 111 | self.label_3.setFont(font) 112 | self.label_3.setObjectName("label_3") 113 | self.toolButton = QtWidgets.QToolButton(self.centralwidget) 114 | self.toolButton.setGeometry(QtCore.QRect(350, 0, 121, 121)) 115 | self.toolButton.setStyleSheet("background-color: rgb(2, 222, 255);") 116 | self.toolButton.setLocale(QtCore.QLocale(QtCore.QLocale.Chinese, QtCore.QLocale.China)) 117 | self.toolButton.setText("") 118 | icon = QtGui.QIcon() 119 | icon.addPixmap(QtGui.QPixmap("../../../../../../pictures/院徽.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 120 | self.toolButton.setIcon(icon) 121 | self.toolButton.setIconSize(QtCore.QSize(150, 150)) 122 | self.toolButton.setObjectName("toolButton") 123 | MainWindow.setCentralWidget(self.centralwidget) 124 | 125 | self.retranslateUi(MainWindow) 126 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 127 | 128 | def retranslateUi(self, MainWindow): 129 | _translate = QtCore.QCoreApplication.translate 130 | MainWindow.setWindowTitle(_translate("MainWindow", "员工修改密码")) 131 | self.label.setText(_translate("MainWindow", "修改密码")) 132 | self.lineEdit_oldpasswd.setPlaceholderText(_translate("MainWindow", "old password")) 133 | self.commitButton.setText(_translate("MainWindow", "确认修改")) 134 | self.label_2.setText(_translate("MainWindow", "旧密码")) 135 | self.label_4.setText(_translate("MainWindow", "新密码")) 136 | self.lineEdit_newpwd.setPlaceholderText(_translate("MainWindow", "new password")) 137 | self.lineEdit_sid.setPlaceholderText(_translate("MainWindow", "编号")) 138 | self.label_3.setText(_translate("MainWindow", "员工编号")) 139 | -------------------------------------------------------------------------------- /ui/ModifyPwd.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | 员工修改密码 15 | 16 | 17 | 18 | *{ 19 | font-size:24px; 20 | font-family:Century Gothic; 21 | } 22 | QFrame{ 23 | background:rgba(0,0,0,0.8); 24 | border-radius:15px; 25 | } 26 | #centralwidget{ 27 | border-image:url(D:/pictures/login4.jpg) strectch; 28 | } 29 | 30 | QToolButton{ 31 | background:red; 32 | border-radius:60px; 33 | } 34 | QLabel{ 35 | color:white; 36 | background:transparent; 37 | } 38 | QPushButton{ 39 | background:red;; 40 | border-radius:15px; 41 | } 42 | QPushButton:hover{ 43 | background:#333; 44 | border-radius:15px; 45 | background:#49ebff; 46 | } 47 | QLineEdit{ 48 | background:transparent; 49 | border:none; 50 | color:#717072; 51 | border-bottom:1px solid #717072; 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 150 59 | 60 60 | 491 61 | 511 62 | 63 | 64 | 65 | 66 | Century Gothic 67 | -1 68 | 69 | 70 | 71 | QFrame::StyledPanel 72 | 73 | 74 | QFrame::Raised 75 | 76 | 77 | 78 | 79 | 210 80 | 70 81 | 111 82 | 41 83 | 84 | 85 | 86 | 87 | Century Gothic 88 | -1 89 | 90 | 91 | 92 | 修改密码 93 | 94 | 95 | 96 | 97 | 98 | 70 99 | 250 100 | 361 101 | 31 102 | 103 | 104 | 105 | 106 | 107 | 108 | QLineEdit::Password 109 | 110 | 111 | old password 112 | 113 | 114 | 115 | 116 | 117 | 40 118 | 430 119 | 421 120 | 51 121 | 122 | 123 | 124 | background-color: rgb(117, 200, 255); 125 | 126 | 127 | 确认修改 128 | 129 | 130 | 131 | 132 | 133 | 70 134 | 210 135 | 121 136 | 31 137 | 138 | 139 | 140 | 141 | Century Gothic 142 | -1 143 | 144 | 145 | 146 | 旧密码 147 | 148 | 149 | 150 | 151 | 152 | 70 153 | 300 154 | 121 155 | 31 156 | 157 | 158 | 159 | 新密码 160 | 161 | 162 | 163 | 164 | 165 | 70 166 | 340 167 | 361 168 | 31 169 | 170 | 171 | 172 | 173 | Century Gothic 174 | -1 175 | 176 | 177 | 178 | Qt::DefaultContextMenu 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | QLineEdit::Password 188 | 189 | 190 | new password 191 | 192 | 193 | 194 | 195 | 196 | 70 197 | 160 198 | 361 199 | 31 200 | 201 | 202 | 203 | 204 | 205 | 206 | 编号 207 | 208 | 209 | 210 | 211 | 212 | 70 213 | 120 214 | 121 215 | 31 216 | 217 | 218 | 219 | 220 | Century Gothic 221 | -1 222 | 223 | 224 | 225 | 员工编号 226 | 227 | 228 | 229 | 230 | 231 | 232 | 350 233 | 0 234 | 121 235 | 121 236 | 237 | 238 | 239 | background-color: rgb(2, 222, 255); 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | ../../../../../../pictures/酒店.png../../../../../../pictures/酒店.png 250 | 251 | 252 | 253 | 150 254 | 150 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | -------------------------------------------------------------------------------- /ui/__pycache__/ModifyPwd.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/ui/__pycache__/ModifyPwd.cpython-37.pyc -------------------------------------------------------------------------------- /ui/__pycache__/ModifyPwd.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/ui/__pycache__/ModifyPwd.cpython-39.pyc -------------------------------------------------------------------------------- /ui/__pycache__/report.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/ui/__pycache__/report.cpython-39.pyc -------------------------------------------------------------------------------- /ui/__pycache__/room.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/ui/__pycache__/room.cpython-37.pyc -------------------------------------------------------------------------------- /ui/__pycache__/room.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/ui/__pycache__/room.cpython-39.pyc -------------------------------------------------------------------------------- /ui/__pycache__/staff.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/ui/__pycache__/staff.cpython-37.pyc -------------------------------------------------------------------------------- /ui/__pycache__/staff.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ranxi2001/Hotel-information-management-system/41e3eba9ac9dda6d564d703642764b4d1dc91592/ui/__pycache__/staff.cpython-39.pyc -------------------------------------------------------------------------------- /ui/report.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'report.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.7 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_ReportWindow(object): 15 | def setupUi(self, MainWindow): 16 | MainWindow.setObjectName("MainWindow") 17 | MainWindow.resize(805, 599) 18 | MainWindow.setStyleSheet("QListWidget, QListView, QTreeWidget, QTreeView,QFrame {\n" 19 | " outline: 0px;\n" 20 | "}\n" 21 | "/*设置左侧选项的最小最大宽度,文字颜色和背景颜色*/\n" 22 | "#listWidget {\n" 23 | " min-width: 200px;\n" 24 | " max-width: 200px;\n" 25 | " color: white;\n" 26 | " background-color:#2f4050\n" 27 | "}\n" 28 | "#head\n" 29 | "{\n" 30 | "background:white;\n" 31 | "border-radius:30px;\n" 32 | "}\n" 33 | "#head_2\n" 34 | "{\n" 35 | "background:#CCFFCC;\n" 36 | "border:1px solid;\n" 37 | "border-color:#CCFFCC;\n" 38 | "border-radius:60px;\n" 39 | "}\n" 40 | "#Search\n" 41 | "{\n" 42 | "border-radius:5px;\n" 43 | "background:#293846;\n" 44 | "border:0.5px solid;\n" 45 | "border-color:white;\n" 46 | "\n" 47 | "}\n" 48 | "#listWidget::item\n" 49 | "{\n" 50 | "height:60;\n" 51 | "background-color:#293846;\n" 52 | "}\n" 53 | "#frame\n" 54 | "{\n" 55 | "background-color:#2f4050\n" 56 | "\n" 57 | "}\n" 58 | "/*被选中时的背景颜色和左边框颜色*/\n" 59 | "#listWidget::item:selected {\n" 60 | " background: rgb(52, 52, 52);\n" 61 | " border-left: 2px solid rgb(9, 187, 7);\n" 62 | "}\n" 63 | "/*鼠标悬停颜色*/\n" 64 | "HistoryPanel::item:hover {\n" 65 | " background: rgb(52, 52, 52);\n" 66 | "}\n" 67 | "/*右侧的层叠窗口的背景颜色*/\n" 68 | "QStackedWidget {\n" 69 | " background: white;\n" 70 | "}\n" 71 | "/*模拟的页面*/\n" 72 | "#frame > QLabel\n" 73 | "{\n" 74 | "color:white;\n" 75 | "}\n" 76 | "#frame_2\n" 77 | "{\n" 78 | "background-color:#CCFFCC;\n" 79 | "}\n" 80 | "#page_2 > QLineEdit\n" 81 | "{\n" 82 | "border-radius:5px;\n" 83 | "background:#FFFFFF;\n" 84 | "border:1px solid;\n" 85 | "border-color:#6699CC;\n" 86 | "}\n" 87 | "QLineEdit\n" 88 | "{\n" 89 | "border-radius:5px;\n" 90 | "background:#FFFFFF;\n" 91 | "border:1px solid;\n" 92 | "border-color:#6699CC;\n" 93 | "}\n" 94 | "QComboBox,QDateEdit\n" 95 | "{\n" 96 | "border-radius:5px;\n" 97 | "background:#FFFFFF;\n" 98 | "border:1px solid;\n" 99 | "border-color:#6699CC;\n" 100 | "}\n" 101 | "#listWidget_2,#listWidget_3,#listWidget_4\n" 102 | "{\n" 103 | "background-color:#CCFFFF;\n" 104 | "border:1px solid black\n" 105 | "}\n" 106 | "\n" 107 | "\n" 108 | "\n" 109 | "") 110 | self.centralwidget = QtWidgets.QWidget(MainWindow) 111 | self.centralwidget.setObjectName("centralwidget") 112 | self.listWidget = QtWidgets.QListWidget(self.centralwidget) 113 | self.listWidget.setGeometry(QtCore.QRect(0, 200, 204, 400)) 114 | self.listWidget.setObjectName("listWidget") 115 | item = QtWidgets.QListWidgetItem() 116 | font = QtGui.QFont() 117 | font.setFamily("FontAwesome") 118 | font.setPointSize(12) 119 | font.setBold(True) 120 | font.setWeight(75) 121 | item.setFont(font) 122 | icon = QtGui.QIcon() 123 | icon.addPixmap(QtGui.QPixmap("../../../../../pictures/customer2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 124 | item.setIcon(icon) 125 | self.listWidget.addItem(item) 126 | item = QtWidgets.QListWidgetItem() 127 | font = QtGui.QFont() 128 | font.setFamily("FontAwesome") 129 | font.setPointSize(12) 130 | font.setBold(True) 131 | font.setWeight(75) 132 | item.setFont(font) 133 | icon1 = QtGui.QIcon() 134 | icon1.addPixmap(QtGui.QPixmap("../../../../../pictures/customer1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 135 | item.setIcon(icon1) 136 | self.listWidget.addItem(item) 137 | self.frame = QtWidgets.QFrame(self.centralwidget) 138 | self.frame.setGeometry(QtCore.QRect(0, 0, 204, 211)) 139 | self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) 140 | self.frame.setFrameShadow(QtWidgets.QFrame.Raised) 141 | self.frame.setObjectName("frame") 142 | self.head = QtWidgets.QToolButton(self.frame) 143 | self.head.setGeometry(QtCore.QRect(60, 20, 60, 60)) 144 | self.head.setText("") 145 | icon2 = QtGui.QIcon() 146 | icon2.addPixmap(QtGui.QPixmap("../../../../../pictures/staff3.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 147 | self.head.setIcon(icon2) 148 | self.head.setIconSize(QtCore.QSize(60, 60)) 149 | self.head.setObjectName("head") 150 | self.welcome = QtWidgets.QLabel(self.frame) 151 | self.welcome.setGeometry(QtCore.QRect(30, 90, 110, 20)) 152 | self.welcome.setText("") 153 | self.welcome.setAlignment(QtCore.Qt.AlignCenter) 154 | self.welcome.setObjectName("welcome") 155 | self.label_2 = QtWidgets.QLabel(self.frame) 156 | self.label_2.setGeometry(QtCore.QRect(40, 140, 121, 16)) 157 | font = QtGui.QFont() 158 | font.setPointSize(8) 159 | self.label_2.setFont(font) 160 | self.label_2.setObjectName("label_2") 161 | self.Search = QtWidgets.QLineEdit(self.frame) 162 | self.Search.setGeometry(QtCore.QRect(20, 170, 145, 25)) 163 | palette = QtGui.QPalette() 164 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 165 | brush.setStyle(QtCore.Qt.SolidPattern) 166 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) 167 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 168 | brush.setStyle(QtCore.Qt.SolidPattern) 169 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) 170 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 171 | brush.setStyle(QtCore.Qt.SolidPattern) 172 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) 173 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 174 | brush.setStyle(QtCore.Qt.SolidPattern) 175 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) 176 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 177 | brush.setStyle(QtCore.Qt.SolidPattern) 178 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) 179 | brush = QtGui.QBrush(QtGui.QColor(170, 170, 170)) 180 | brush.setStyle(QtCore.Qt.SolidPattern) 181 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) 182 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 183 | brush.setStyle(QtCore.Qt.SolidPattern) 184 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) 185 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 186 | brush.setStyle(QtCore.Qt.SolidPattern) 187 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) 188 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 189 | brush.setStyle(QtCore.Qt.SolidPattern) 190 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) 191 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 192 | brush.setStyle(QtCore.Qt.SolidPattern) 193 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) 194 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 195 | brush.setStyle(QtCore.Qt.SolidPattern) 196 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) 197 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 198 | brush.setStyle(QtCore.Qt.SolidPattern) 199 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) 200 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 201 | brush.setStyle(QtCore.Qt.SolidPattern) 202 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) 203 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 204 | brush.setStyle(QtCore.Qt.SolidPattern) 205 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) 206 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 207 | brush.setStyle(QtCore.Qt.SolidPattern) 208 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) 209 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 210 | brush.setStyle(QtCore.Qt.SolidPattern) 211 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) 212 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 213 | brush.setStyle(QtCore.Qt.SolidPattern) 214 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) 215 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 216 | brush.setStyle(QtCore.Qt.SolidPattern) 217 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) 218 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 219 | brush.setStyle(QtCore.Qt.SolidPattern) 220 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) 221 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 222 | brush.setStyle(QtCore.Qt.SolidPattern) 223 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) 224 | brush = QtGui.QBrush(QtGui.QColor(170, 170, 170)) 225 | brush.setStyle(QtCore.Qt.SolidPattern) 226 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) 227 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 228 | brush.setStyle(QtCore.Qt.SolidPattern) 229 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) 230 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 231 | brush.setStyle(QtCore.Qt.SolidPattern) 232 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) 233 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 234 | brush.setStyle(QtCore.Qt.SolidPattern) 235 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) 236 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 237 | brush.setStyle(QtCore.Qt.SolidPattern) 238 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) 239 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 240 | brush.setStyle(QtCore.Qt.SolidPattern) 241 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) 242 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 243 | brush.setStyle(QtCore.Qt.SolidPattern) 244 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) 245 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 246 | brush.setStyle(QtCore.Qt.SolidPattern) 247 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) 248 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 249 | brush.setStyle(QtCore.Qt.SolidPattern) 250 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) 251 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 252 | brush.setStyle(QtCore.Qt.SolidPattern) 253 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) 254 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 255 | brush.setStyle(QtCore.Qt.SolidPattern) 256 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) 257 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 258 | brush.setStyle(QtCore.Qt.SolidPattern) 259 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) 260 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 261 | brush.setStyle(QtCore.Qt.SolidPattern) 262 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) 263 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 264 | brush.setStyle(QtCore.Qt.SolidPattern) 265 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) 266 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 267 | brush.setStyle(QtCore.Qt.SolidPattern) 268 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) 269 | brush = QtGui.QBrush(QtGui.QColor(170, 170, 170)) 270 | brush.setStyle(QtCore.Qt.SolidPattern) 271 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) 272 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 273 | brush.setStyle(QtCore.Qt.SolidPattern) 274 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) 275 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 276 | brush.setStyle(QtCore.Qt.SolidPattern) 277 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) 278 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 279 | brush.setStyle(QtCore.Qt.SolidPattern) 280 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) 281 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 282 | brush.setStyle(QtCore.Qt.SolidPattern) 283 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) 284 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 285 | brush.setStyle(QtCore.Qt.SolidPattern) 286 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) 287 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 288 | brush.setStyle(QtCore.Qt.SolidPattern) 289 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) 290 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 291 | brush.setStyle(QtCore.Qt.SolidPattern) 292 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) 293 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 294 | brush.setStyle(QtCore.Qt.SolidPattern) 295 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) 296 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 297 | brush.setStyle(QtCore.Qt.SolidPattern) 298 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) 299 | self.Search.setPalette(palette) 300 | font = QtGui.QFont() 301 | font.setFamily("微软雅黑") 302 | font.setPointSize(7) 303 | self.Search.setFont(font) 304 | self.Search.setStyleSheet("") 305 | self.Search.setObjectName("Search") 306 | self.toolButton = QtWidgets.QToolButton(self.frame) 307 | self.toolButton.setGeometry(QtCore.QRect(170, 170, 21, 20)) 308 | self.toolButton.setStyleSheet("background-color:#2f4050;\n" 309 | "border:0px;\n" 310 | "\n" 311 | "border-radius:5px") 312 | self.toolButton.setText("") 313 | icon3 = QtGui.QIcon() 314 | icon3.addPixmap(QtGui.QPixmap("C:/pictures/search.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 315 | self.toolButton.setIcon(icon3) 316 | self.toolButton.setIconSize(QtCore.QSize(15, 15)) 317 | self.toolButton.setObjectName("toolButton") 318 | self.role = QtWidgets.QLabel(self.frame) 319 | self.role.setGeometry(QtCore.QRect(30, 120, 110, 15)) 320 | font = QtGui.QFont() 321 | font.setPointSize(7) 322 | self.role.setFont(font) 323 | self.role.setText("") 324 | self.role.setAlignment(QtCore.Qt.AlignCenter) 325 | self.role.setObjectName("role") 326 | self.label_3 = QtWidgets.QLabel(self.centralwidget) 327 | self.label_3.setGeometry(QtCore.QRect(450, 560, 241, 41)) 328 | palette = QtGui.QPalette() 329 | brush = QtGui.QBrush(QtGui.QColor(195, 210, 217)) 330 | brush.setStyle(QtCore.Qt.SolidPattern) 331 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) 332 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 333 | brush.setStyle(QtCore.Qt.SolidPattern) 334 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) 335 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 336 | brush.setStyle(QtCore.Qt.SolidPattern) 337 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) 338 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 339 | brush.setStyle(QtCore.Qt.SolidPattern) 340 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) 341 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 342 | brush.setStyle(QtCore.Qt.SolidPattern) 343 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) 344 | brush = QtGui.QBrush(QtGui.QColor(130, 140, 145)) 345 | brush.setStyle(QtCore.Qt.SolidPattern) 346 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) 347 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 348 | brush.setStyle(QtCore.Qt.SolidPattern) 349 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) 350 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 351 | brush.setStyle(QtCore.Qt.SolidPattern) 352 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) 353 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 354 | brush.setStyle(QtCore.Qt.SolidPattern) 355 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) 356 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 357 | brush.setStyle(QtCore.Qt.SolidPattern) 358 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) 359 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 360 | brush.setStyle(QtCore.Qt.SolidPattern) 361 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) 362 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 363 | brush.setStyle(QtCore.Qt.SolidPattern) 364 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) 365 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 366 | brush.setStyle(QtCore.Qt.SolidPattern) 367 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) 368 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 369 | brush.setStyle(QtCore.Qt.SolidPattern) 370 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) 371 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 372 | brush.setStyle(QtCore.Qt.SolidPattern) 373 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) 374 | brush = QtGui.QBrush(QtGui.QColor(195, 210, 217)) 375 | brush.setStyle(QtCore.Qt.SolidPattern) 376 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) 377 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 378 | brush.setStyle(QtCore.Qt.SolidPattern) 379 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) 380 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 381 | brush.setStyle(QtCore.Qt.SolidPattern) 382 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) 383 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 384 | brush.setStyle(QtCore.Qt.SolidPattern) 385 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) 386 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 387 | brush.setStyle(QtCore.Qt.SolidPattern) 388 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) 389 | brush = QtGui.QBrush(QtGui.QColor(130, 140, 145)) 390 | brush.setStyle(QtCore.Qt.SolidPattern) 391 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) 392 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 393 | brush.setStyle(QtCore.Qt.SolidPattern) 394 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) 395 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 396 | brush.setStyle(QtCore.Qt.SolidPattern) 397 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) 398 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 399 | brush.setStyle(QtCore.Qt.SolidPattern) 400 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) 401 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 402 | brush.setStyle(QtCore.Qt.SolidPattern) 403 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) 404 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 405 | brush.setStyle(QtCore.Qt.SolidPattern) 406 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) 407 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 408 | brush.setStyle(QtCore.Qt.SolidPattern) 409 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) 410 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 411 | brush.setStyle(QtCore.Qt.SolidPattern) 412 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) 413 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 414 | brush.setStyle(QtCore.Qt.SolidPattern) 415 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) 416 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 417 | brush.setStyle(QtCore.Qt.SolidPattern) 418 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) 419 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 420 | brush.setStyle(QtCore.Qt.SolidPattern) 421 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) 422 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 423 | brush.setStyle(QtCore.Qt.SolidPattern) 424 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) 425 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 426 | brush.setStyle(QtCore.Qt.SolidPattern) 427 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) 428 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 429 | brush.setStyle(QtCore.Qt.SolidPattern) 430 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) 431 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 432 | brush.setStyle(QtCore.Qt.SolidPattern) 433 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) 434 | brush = QtGui.QBrush(QtGui.QColor(130, 140, 145)) 435 | brush.setStyle(QtCore.Qt.SolidPattern) 436 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) 437 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 438 | brush.setStyle(QtCore.Qt.SolidPattern) 439 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) 440 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 441 | brush.setStyle(QtCore.Qt.SolidPattern) 442 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) 443 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 444 | brush.setStyle(QtCore.Qt.SolidPattern) 445 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) 446 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 447 | brush.setStyle(QtCore.Qt.SolidPattern) 448 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) 449 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 450 | brush.setStyle(QtCore.Qt.SolidPattern) 451 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) 452 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 453 | brush.setStyle(QtCore.Qt.SolidPattern) 454 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) 455 | brush = QtGui.QBrush(QtGui.QColor(195, 210, 217)) 456 | brush.setStyle(QtCore.Qt.SolidPattern) 457 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) 458 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 459 | brush.setStyle(QtCore.Qt.SolidPattern) 460 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) 461 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 462 | brush.setStyle(QtCore.Qt.SolidPattern) 463 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) 464 | self.label_3.setPalette(palette) 465 | font = QtGui.QFont() 466 | font.setFamily("幼圆") 467 | self.label_3.setFont(font) 468 | self.label_3.setObjectName("label_3") 469 | self.label = QtWidgets.QLabel(self.centralwidget) 470 | self.label.setGeometry(QtCore.QRect(380, 540, 241, 41)) 471 | palette = QtGui.QPalette() 472 | brush = QtGui.QBrush(QtGui.QColor(195, 210, 217)) 473 | brush.setStyle(QtCore.Qt.SolidPattern) 474 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) 475 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 476 | brush.setStyle(QtCore.Qt.SolidPattern) 477 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) 478 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 479 | brush.setStyle(QtCore.Qt.SolidPattern) 480 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) 481 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 482 | brush.setStyle(QtCore.Qt.SolidPattern) 483 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) 484 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 485 | brush.setStyle(QtCore.Qt.SolidPattern) 486 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) 487 | brush = QtGui.QBrush(QtGui.QColor(130, 140, 145)) 488 | brush.setStyle(QtCore.Qt.SolidPattern) 489 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) 490 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 491 | brush.setStyle(QtCore.Qt.SolidPattern) 492 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) 493 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 494 | brush.setStyle(QtCore.Qt.SolidPattern) 495 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) 496 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 497 | brush.setStyle(QtCore.Qt.SolidPattern) 498 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) 499 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 500 | brush.setStyle(QtCore.Qt.SolidPattern) 501 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) 502 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 503 | brush.setStyle(QtCore.Qt.SolidPattern) 504 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) 505 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 506 | brush.setStyle(QtCore.Qt.SolidPattern) 507 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) 508 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 509 | brush.setStyle(QtCore.Qt.SolidPattern) 510 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) 511 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 512 | brush.setStyle(QtCore.Qt.SolidPattern) 513 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) 514 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 515 | brush.setStyle(QtCore.Qt.SolidPattern) 516 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) 517 | brush = QtGui.QBrush(QtGui.QColor(195, 210, 217)) 518 | brush.setStyle(QtCore.Qt.SolidPattern) 519 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) 520 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 521 | brush.setStyle(QtCore.Qt.SolidPattern) 522 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) 523 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 524 | brush.setStyle(QtCore.Qt.SolidPattern) 525 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) 526 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 527 | brush.setStyle(QtCore.Qt.SolidPattern) 528 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) 529 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 530 | brush.setStyle(QtCore.Qt.SolidPattern) 531 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) 532 | brush = QtGui.QBrush(QtGui.QColor(130, 140, 145)) 533 | brush.setStyle(QtCore.Qt.SolidPattern) 534 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) 535 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 536 | brush.setStyle(QtCore.Qt.SolidPattern) 537 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) 538 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 539 | brush.setStyle(QtCore.Qt.SolidPattern) 540 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) 541 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 542 | brush.setStyle(QtCore.Qt.SolidPattern) 543 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) 544 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 545 | brush.setStyle(QtCore.Qt.SolidPattern) 546 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) 547 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 548 | brush.setStyle(QtCore.Qt.SolidPattern) 549 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) 550 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 551 | brush.setStyle(QtCore.Qt.SolidPattern) 552 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) 553 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 554 | brush.setStyle(QtCore.Qt.SolidPattern) 555 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) 556 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 557 | brush.setStyle(QtCore.Qt.SolidPattern) 558 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) 559 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 560 | brush.setStyle(QtCore.Qt.SolidPattern) 561 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) 562 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 563 | brush.setStyle(QtCore.Qt.SolidPattern) 564 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) 565 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 566 | brush.setStyle(QtCore.Qt.SolidPattern) 567 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) 568 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 569 | brush.setStyle(QtCore.Qt.SolidPattern) 570 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) 571 | brush = QtGui.QBrush(QtGui.QColor(225, 232, 236)) 572 | brush.setStyle(QtCore.Qt.SolidPattern) 573 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) 574 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 575 | brush.setStyle(QtCore.Qt.SolidPattern) 576 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) 577 | brush = QtGui.QBrush(QtGui.QColor(130, 140, 145)) 578 | brush.setStyle(QtCore.Qt.SolidPattern) 579 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) 580 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 581 | brush.setStyle(QtCore.Qt.SolidPattern) 582 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) 583 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 584 | brush.setStyle(QtCore.Qt.SolidPattern) 585 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) 586 | brush = QtGui.QBrush(QtGui.QColor(97, 105, 108)) 587 | brush.setStyle(QtCore.Qt.SolidPattern) 588 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) 589 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 590 | brush.setStyle(QtCore.Qt.SolidPattern) 591 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) 592 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 593 | brush.setStyle(QtCore.Qt.SolidPattern) 594 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) 595 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 596 | brush.setStyle(QtCore.Qt.SolidPattern) 597 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) 598 | brush = QtGui.QBrush(QtGui.QColor(195, 210, 217)) 599 | brush.setStyle(QtCore.Qt.SolidPattern) 600 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) 601 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 602 | brush.setStyle(QtCore.Qt.SolidPattern) 603 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) 604 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 605 | brush.setStyle(QtCore.Qt.SolidPattern) 606 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) 607 | self.label.setPalette(palette) 608 | font = QtGui.QFont() 609 | font.setFamily("幼圆") 610 | self.label.setFont(font) 611 | self.label.setObjectName("label") 612 | self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget) 613 | self.stackedWidget.setGeometry(QtCore.QRect(210, 0, 591, 591)) 614 | self.stackedWidget.setObjectName("stackedWidget") 615 | self.page = QtWidgets.QWidget() 616 | self.page.setObjectName("page") 617 | self.toolButton_2 = QtWidgets.QToolButton(self.page) 618 | self.toolButton_2.setGeometry(QtCore.QRect(10, 0, 121, 31)) 619 | font = QtGui.QFont() 620 | font.setFamily("FontAwesome") 621 | font.setPointSize(10) 622 | font.setBold(True) 623 | font.setWeight(75) 624 | self.toolButton_2.setFont(font) 625 | self.toolButton_2.setStyleSheet("border:none") 626 | icon4 = QtGui.QIcon() 627 | icon4.addPixmap(QtGui.QPixmap("C:/pictures/search1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 628 | self.toolButton_2.setIcon(icon4) 629 | self.toolButton_2.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) 630 | self.toolButton_2.setObjectName("toolButton_2") 631 | self.line_3 = QtWidgets.QFrame(self.page) 632 | self.line_3.setGeometry(QtCore.QRect(-10, 20, 591, 20)) 633 | self.line_3.setFrameShape(QtWidgets.QFrame.HLine) 634 | self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) 635 | self.line_3.setObjectName("line_3") 636 | self.stackedWidget.addWidget(self.page) 637 | self.page_2 = QtWidgets.QWidget() 638 | self.page_2.setObjectName("page_2") 639 | self.line_5 = QtWidgets.QFrame(self.page_2) 640 | self.line_5.setGeometry(QtCore.QRect(0, 20, 591, 20)) 641 | self.line_5.setFrameShape(QtWidgets.QFrame.HLine) 642 | self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken) 643 | self.line_5.setObjectName("line_5") 644 | self.toolButton_3 = QtWidgets.QToolButton(self.page_2) 645 | self.toolButton_3.setGeometry(QtCore.QRect(10, 0, 101, 31)) 646 | font = QtGui.QFont() 647 | font.setFamily("FontAwesome") 648 | font.setPointSize(10) 649 | font.setBold(True) 650 | font.setWeight(75) 651 | self.toolButton_3.setFont(font) 652 | self.toolButton_3.setStyleSheet("border:none") 653 | self.toolButton_3.setIcon(icon4) 654 | self.toolButton_3.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) 655 | self.toolButton_3.setObjectName("toolButton_3") 656 | self.listWidget_4 = QtWidgets.QListWidget(self.page_2) 657 | self.listWidget_4.setGeometry(QtCore.QRect(-10, 30, 641, 51)) 658 | self.listWidget_4.setFlow(QtWidgets.QListView.LeftToRight) 659 | self.listWidget_4.setObjectName("listWidget_4") 660 | item = QtWidgets.QListWidgetItem() 661 | self.listWidget_4.addItem(item) 662 | item = QtWidgets.QListWidgetItem() 663 | self.listWidget_4.addItem(item) 664 | self.stackedWidget_2 = QtWidgets.QStackedWidget(self.page_2) 665 | self.stackedWidget_2.setGeometry(QtCore.QRect(0, 80, 591, 511)) 666 | self.stackedWidget_2.setObjectName("stackedWidget_2") 667 | self.page_3 = QtWidgets.QWidget() 668 | self.page_3.setObjectName("page_3") 669 | self.showfigure1 = QtWidgets.QPushButton(self.page_3) 670 | self.showfigure1.setGeometry(QtCore.QRect(460, 10, 93, 28)) 671 | self.showfigure1.setStyleSheet("#showfigure1{background:white\n" 672 | ";\n" 673 | "border:1px solid black;\n" 674 | "border-radius:8px}\n" 675 | "#showfigure1:hover\n" 676 | "{\n" 677 | "background:#CCFF99\n" 678 | "}") 679 | self.showfigure1.setObjectName("showfigure1") 680 | self.groupBox = QtWidgets.QGroupBox(self.page_3) 681 | self.groupBox.setGeometry(QtCore.QRect(-10, 40, 600, 481)) 682 | self.groupBox.setObjectName("groupBox") 683 | self.stackedWidget_2.addWidget(self.page_3) 684 | self.page_4 = QtWidgets.QWidget() 685 | self.page_4.setObjectName("page_4") 686 | self.showfigure2 = QtWidgets.QPushButton(self.page_4) 687 | self.showfigure2.setGeometry(QtCore.QRect(460, 10, 93, 28)) 688 | self.showfigure2.setStyleSheet("#showfigure2{background:white\n" 689 | ";\n" 690 | "border:1px solid black;\n" 691 | "border-radius:8px}\n" 692 | "#showfigure2:hover\n" 693 | "{\n" 694 | "background:#CCFF99\n" 695 | "}") 696 | self.showfigure2.setObjectName("showfigure2") 697 | self.groupBox_2 = QtWidgets.QGroupBox(self.page_4) 698 | self.groupBox_2.setGeometry(QtCore.QRect(-10, 40, 600, 481)) 699 | self.groupBox_2.setObjectName("groupBox_2") 700 | self.revenue = QtWidgets.QLabel(self.groupBox_2) 701 | self.revenue.setGeometry(QtCore.QRect(230, 20, 121, 31)) 702 | self.revenue.setText("") 703 | self.revenue.setObjectName("revenue") 704 | self.occupy = QtWidgets.QLabel(self.groupBox_2) 705 | self.occupy.setGeometry(QtCore.QRect(230, 250, 121, 31)) 706 | self.occupy.setText("") 707 | self.occupy.setObjectName("occupy") 708 | self.stackedWidget_2.addWidget(self.page_4) 709 | self.line_6 = QtWidgets.QFrame(self.page_2) 710 | self.line_6.setGeometry(QtCore.QRect(120, 40, 20, 31)) 711 | self.line_6.setFrameShape(QtWidgets.QFrame.VLine) 712 | self.line_6.setFrameShadow(QtWidgets.QFrame.Sunken) 713 | self.line_6.setObjectName("line_6") 714 | self.stackedWidget.addWidget(self.page_2) 715 | MainWindow.setCentralWidget(self.centralwidget) 716 | 717 | self.retranslateUi(MainWindow) 718 | self.stackedWidget.setCurrentIndex(0) 719 | self.stackedWidget_2.setCurrentIndex(0) 720 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 721 | 722 | def retranslateUi(self, MainWindow): 723 | _translate = QtCore.QCoreApplication.translate 724 | MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) 725 | __sortingEnabled = self.listWidget.isSortingEnabled() 726 | self.listWidget.setSortingEnabled(False) 727 | item = self.listWidget.item(0) 728 | item.setText(_translate("MainWindow", " 数据库备份")) 729 | item = self.listWidget.item(1) 730 | item.setText(_translate("MainWindow", " 报表查看")) 731 | self.listWidget.setSortingEnabled(__sortingEnabled) 732 | self.label_2.setText(_translate("MainWindow", "*表示需要最高权限")) 733 | self.Search.setPlaceholderText(_translate("MainWindow", "搜索")) 734 | self.label_3.setText(_translate("MainWindow", "version 1.0")) 735 | self.label.setText(_translate("MainWindow", "酒店管理系统--Designed by ranxi")) 736 | self.toolButton_2.setText(_translate("MainWindow", "数据库备份")) 737 | self.toolButton_3.setText(_translate("MainWindow", "报表查看")) 738 | __sortingEnabled = self.listWidget_4.isSortingEnabled() 739 | self.listWidget_4.setSortingEnabled(False) 740 | item = self.listWidget_4.item(0) 741 | item.setText(_translate("MainWindow", " 查看出租率和订单 ")) 742 | item = self.listWidget_4.item(1) 743 | item.setText(_translate("MainWindow", "查看客户和员工相关 ")) 744 | self.listWidget_4.setSortingEnabled(__sortingEnabled) 745 | self.showfigure1.setText(_translate("MainWindow", "查看报表")) 746 | self.groupBox.setTitle(_translate("MainWindow", "报表")) 747 | self.showfigure2.setText(_translate("MainWindow", "查看报表")) 748 | self.groupBox_2.setTitle(_translate("MainWindow", "报表")) 749 | -------------------------------------------------------------------------------- /ui/staff.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'staff.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.13.0 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | 10 | from PyQt5 import QtCore, QtGui, QtWidgets 11 | 12 | 13 | class Ui_StaffWindow(object): 14 | def setupUi(self, MainWindow): 15 | MainWindow.setObjectName("MainWindow") 16 | MainWindow.resize(800, 600) 17 | MainWindow.setStyleSheet("QListWidget, QListView, QTreeWidget, QTreeView,QFrame {\n" 18 | " outline: 0px;\n" 19 | "}\n" 20 | "/*设置左侧选项的最小最大宽度,文字颜色和背景颜色*/\n" 21 | "QListWidget {\n" 22 | " min-width: 200px;\n" 23 | " max-width: 200px;\n" 24 | " color: white;\n" 25 | " background-color:#2f4050\n" 26 | "}\n" 27 | "#head\n" 28 | "{\n" 29 | "background:white;\n" 30 | "border-radius:30px;\n" 31 | "}\n" 32 | "#head_2\n" 33 | "{\n" 34 | "background:#CCFFCC;\n" 35 | "border:1px solid;\n" 36 | "border-color:#CCFFCC;\n" 37 | "border-radius:60px;\n" 38 | "}\n" 39 | "#Search\n" 40 | "{\n" 41 | "border-radius:5px;\n" 42 | "background:#293846;\n" 43 | "border:0.5px solid;\n" 44 | "border-color:white;\n" 45 | "\n" 46 | "}\n" 47 | "QListWidget::item\n" 48 | "{\n" 49 | "height:60;\n" 50 | "background-color:#293846;\n" 51 | "}\n" 52 | "#frame\n" 53 | "{\n" 54 | "background-color:#2f4050\n" 55 | "\n" 56 | "}\n" 57 | "/*被选中时的背景颜色和左边框颜色*/\n" 58 | "QListWidget::item:selected {\n" 59 | " background: rgb(52, 52, 52);\n" 60 | " border-left: 2px solid rgb(9, 187, 7);\n" 61 | "}\n" 62 | "/*鼠标悬停颜色*/\n" 63 | "HistoryPanel::item:hover {\n" 64 | " background: rgb(52, 52, 52);\n" 65 | "}\n" 66 | "/*右侧的层叠窗口的背景颜色*/\n" 67 | "QStackedWidget {\n" 68 | " background: white;\n" 69 | "}\n" 70 | "/*模拟的页面*/\n" 71 | "#frame > QLabel\n" 72 | "{\n" 73 | "color:white;\n" 74 | "}\n" 75 | "#frame_2\n" 76 | "{\n" 77 | "background-color:#CCFFCC;\n" 78 | "}\n" 79 | "#page_2 > QLineEdit,QDateEdit\n" 80 | "{\n" 81 | "border-radius:5px;\n" 82 | "background:#FFFFFF;\n" 83 | "border:1px solid;\n" 84 | "border-color:#6699CC;\n" 85 | "}\n" 86 | "#page_4 > QLineEdit\n" 87 | "{\n" 88 | "border-radius:5px;\n" 89 | "background:#FFFFFF;\n" 90 | "border:1px solid;\n" 91 | "border-color:#6699CC;\n" 92 | "}\n" 93 | "QLineEdit\n" 94 | "{\n" 95 | "border-radius:5px;\n" 96 | "background:#FFFFFF;\n" 97 | "border:1px solid;\n" 98 | "border-color:#6699CC;\n" 99 | "}\n" 100 | "\n" 101 | "\n" 102 | "") 103 | self.centralwidget = QtWidgets.QWidget(MainWindow) 104 | self.centralwidget.setObjectName("centralwidget") 105 | self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget) 106 | self.stackedWidget.setGeometry(QtCore.QRect(190, 0, 611, 601)) 107 | self.stackedWidget.setStyleSheet("background-color:#FFFFFF\n" 108 | "") 109 | self.stackedWidget.setObjectName("stackedWidget") 110 | self.page = QtWidgets.QWidget() 111 | self.page.setObjectName("page") 112 | self.split = QtWidgets.QFrame(self.page) 113 | self.split.setGeometry(QtCore.QRect(10, 210, 600, 2)) 114 | self.split.setStyleSheet("color:#CCFFCC;\n" 115 | "border-color:#CCFFCC;\n" 116 | "background-color:#CCFFCC") 117 | self.split.setFrameShape(QtWidgets.QFrame.HLine) 118 | self.split.setFrameShadow(QtWidgets.QFrame.Raised) 119 | self.split.setObjectName("split") 120 | self.head_2 = QtWidgets.QToolButton(self.page) 121 | self.head_2.setGeometry(QtCore.QRect(260, 30, 121, 121)) 122 | self.head_2.setText("") 123 | icon = QtGui.QIcon() 124 | icon.addPixmap(QtGui.QPixmap("../../../../../pictures/staff3.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 125 | self.head_2.setIcon(icon) 126 | self.head_2.setIconSize(QtCore.QSize(100, 100)) 127 | self.head_2.setObjectName("head_2") 128 | self.name = QtWidgets.QLabel(self.page) 129 | self.name.setGeometry(QtCore.QRect(260, 160, 131, 31)) 130 | palette = QtGui.QPalette() 131 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 132 | brush.setStyle(QtCore.Qt.SolidPattern) 133 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) 134 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 135 | brush.setStyle(QtCore.Qt.SolidPattern) 136 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) 137 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 138 | brush.setStyle(QtCore.Qt.SolidPattern) 139 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) 140 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 141 | brush.setStyle(QtCore.Qt.SolidPattern) 142 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) 143 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 144 | brush.setStyle(QtCore.Qt.SolidPattern) 145 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) 146 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 147 | brush.setStyle(QtCore.Qt.SolidPattern) 148 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) 149 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128)) 150 | brush.setStyle(QtCore.Qt.SolidPattern) 151 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.PlaceholderText, brush) 152 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 153 | brush.setStyle(QtCore.Qt.SolidPattern) 154 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) 155 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 156 | brush.setStyle(QtCore.Qt.SolidPattern) 157 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) 158 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 159 | brush.setStyle(QtCore.Qt.SolidPattern) 160 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) 161 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 162 | brush.setStyle(QtCore.Qt.SolidPattern) 163 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) 164 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 165 | brush.setStyle(QtCore.Qt.SolidPattern) 166 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) 167 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 168 | brush.setStyle(QtCore.Qt.SolidPattern) 169 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) 170 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128)) 171 | brush.setStyle(QtCore.Qt.SolidPattern) 172 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.PlaceholderText, brush) 173 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 174 | brush.setStyle(QtCore.Qt.SolidPattern) 175 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) 176 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 177 | brush.setStyle(QtCore.Qt.SolidPattern) 178 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) 179 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 180 | brush.setStyle(QtCore.Qt.SolidPattern) 181 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) 182 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 183 | brush.setStyle(QtCore.Qt.SolidPattern) 184 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) 185 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 186 | brush.setStyle(QtCore.Qt.SolidPattern) 187 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) 188 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 189 | brush.setStyle(QtCore.Qt.SolidPattern) 190 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) 191 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 128)) 192 | brush.setStyle(QtCore.Qt.SolidPattern) 193 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.PlaceholderText, brush) 194 | self.name.setPalette(palette) 195 | self.name.setAlignment(QtCore.Qt.AlignCenter) 196 | self.name.setObjectName("name") 197 | self.label = QtWidgets.QLabel(self.page) 198 | self.label.setGeometry(QtCore.QRect(190, 240, 61, 51)) 199 | font = QtGui.QFont() 200 | font.setFamily("幼圆") 201 | font.setPointSize(10) 202 | self.label.setFont(font) 203 | self.label.setObjectName("label") 204 | self.label_3 = QtWidgets.QLabel(self.page) 205 | self.label_3.setGeometry(QtCore.QRect(190, 290, 51, 51)) 206 | font = QtGui.QFont() 207 | font.setFamily("幼圆") 208 | font.setPointSize(10) 209 | self.label_3.setFont(font) 210 | self.label_3.setObjectName("label_3") 211 | self.label_4 = QtWidgets.QLabel(self.page) 212 | self.label_4.setGeometry(QtCore.QRect(190, 340, 71, 51)) 213 | font = QtGui.QFont() 214 | font.setFamily("幼圆") 215 | font.setPointSize(10) 216 | self.label_4.setFont(font) 217 | self.label_4.setObjectName("label_4") 218 | self.label_5 = QtWidgets.QLabel(self.page) 219 | self.label_5.setGeometry(QtCore.QRect(190, 390, 61, 51)) 220 | font = QtGui.QFont() 221 | font.setFamily("幼圆") 222 | font.setPointSize(10) 223 | self.label_5.setFont(font) 224 | self.label_5.setObjectName("label_5") 225 | self.label_6 = QtWidgets.QLabel(self.page) 226 | self.label_6.setGeometry(QtCore.QRect(190, 440, 71, 51)) 227 | font = QtGui.QFont() 228 | font.setFamily("幼圆") 229 | font.setPointSize(10) 230 | self.label_6.setFont(font) 231 | self.label_6.setObjectName("label_6") 232 | self.label_7 = QtWidgets.QLabel(self.page) 233 | self.label_7.setGeometry(QtCore.QRect(190, 490, 81, 51)) 234 | font = QtGui.QFont() 235 | font.setFamily("幼圆") 236 | font.setPointSize(10) 237 | self.label_7.setFont(font) 238 | self.label_7.setObjectName("label_7") 239 | self.sname = QtWidgets.QLabel(self.page) 240 | self.sname.setGeometry(QtCore.QRect(300, 250, 131, 31)) 241 | font = QtGui.QFont() 242 | font.setFamily("幼圆") 243 | font.setPointSize(10) 244 | self.sname.setFont(font) 245 | self.sname.setObjectName("sname") 246 | self.ssex = QtWidgets.QLabel(self.page) 247 | self.ssex.setGeometry(QtCore.QRect(300, 300, 81, 31)) 248 | font = QtGui.QFont() 249 | font.setFamily("幼圆") 250 | font.setPointSize(10) 251 | self.ssex.setFont(font) 252 | self.ssex.setObjectName("ssex") 253 | self.stime = QtWidgets.QLabel(self.page) 254 | self.stime.setGeometry(QtCore.QRect(300, 350, 91, 31)) 255 | font = QtGui.QFont() 256 | font.setFamily("幼圆") 257 | font.setPointSize(10) 258 | self.stime.setFont(font) 259 | self.stime.setObjectName("stime") 260 | self.srole = QtWidgets.QLabel(self.page) 261 | self.srole.setGeometry(QtCore.QRect(300, 400, 81, 31)) 262 | font = QtGui.QFont() 263 | font.setFamily("幼圆") 264 | font.setPointSize(10) 265 | self.srole.setFont(font) 266 | self.srole.setObjectName("srole") 267 | self.sphone = QtWidgets.QLabel(self.page) 268 | self.sphone.setGeometry(QtCore.QRect(300, 450, 141, 31)) 269 | font = QtGui.QFont() 270 | font.setFamily("幼圆") 271 | font.setPointSize(10) 272 | self.sphone.setFont(font) 273 | self.sphone.setObjectName("sphone") 274 | self.sidcard = QtWidgets.QLabel(self.page) 275 | self.sidcard.setGeometry(QtCore.QRect(300, 500, 181, 31)) 276 | font = QtGui.QFont() 277 | font.setFamily("幼圆") 278 | font.setPointSize(10) 279 | self.sidcard.setFont(font) 280 | self.sidcard.setObjectName("sidcard") 281 | self.label_8 = QtWidgets.QLabel(self.page) 282 | self.label_8.setGeometry(QtCore.QRect(190, 540, 81, 51)) 283 | font = QtGui.QFont() 284 | font.setFamily("幼圆") 285 | font.setPointSize(10) 286 | self.label_8.setFont(font) 287 | self.label_8.setObjectName("label_8") 288 | self.sidcard_2 = QtWidgets.QLabel(self.page) 289 | self.sidcard_2.setGeometry(QtCore.QRect(300, 550, 181, 31)) 290 | font = QtGui.QFont() 291 | font.setFamily("幼圆") 292 | font.setPointSize(10) 293 | self.sidcard_2.setFont(font) 294 | self.sidcard_2.setObjectName("sidcard_2") 295 | self.stackedWidget.addWidget(self.page) 296 | self.page_3 = QtWidgets.QWidget() 297 | self.page_3.setObjectName("page_3") 298 | self.searchTable = QtWidgets.QTableWidget(self.page_3) 299 | self.searchTable.setGeometry(QtCore.QRect(0, 240, 611, 361)) 300 | self.searchTable.setStyleSheet("") 301 | self.searchTable.setObjectName("searchTable") 302 | self.searchTable.setColumnCount(9) 303 | self.searchTable.setRowCount(0) 304 | item = QtWidgets.QTableWidgetItem() 305 | self.searchTable.setHorizontalHeaderItem(0, item) 306 | item = QtWidgets.QTableWidgetItem() 307 | self.searchTable.setHorizontalHeaderItem(1, item) 308 | item = QtWidgets.QTableWidgetItem() 309 | self.searchTable.setHorizontalHeaderItem(2, item) 310 | item = QtWidgets.QTableWidgetItem() 311 | self.searchTable.setHorizontalHeaderItem(3, item) 312 | item = QtWidgets.QTableWidgetItem() 313 | self.searchTable.setHorizontalHeaderItem(4, item) 314 | item = QtWidgets.QTableWidgetItem() 315 | self.searchTable.setHorizontalHeaderItem(5, item) 316 | item = QtWidgets.QTableWidgetItem() 317 | self.searchTable.setHorizontalHeaderItem(6, item) 318 | item = QtWidgets.QTableWidgetItem() 319 | self.searchTable.setHorizontalHeaderItem(7, item) 320 | item = QtWidgets.QTableWidgetItem() 321 | self.searchTable.setHorizontalHeaderItem(8, item) 322 | self.frame_2 = QtWidgets.QFrame(self.page_3) 323 | self.frame_2.setGeometry(QtCore.QRect(10, 30, 611, 211)) 324 | self.frame_2.setStyleSheet("background-color:rgb(255, 249, 246)") 325 | self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) 326 | self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) 327 | self.frame_2.setObjectName("frame_2") 328 | self.searchName = QtWidgets.QLineEdit(self.frame_2) 329 | self.searchName.setGeometry(QtCore.QRect(170, 40, 181, 41)) 330 | self.searchName.setStyleSheet("border-radius:10px;\n" 331 | "background:#FFFFFF;\n" 332 | "border:1px solid;\n" 333 | "border-color:#CCCCFF;\n" 334 | "") 335 | self.searchName.setObjectName("searchName") 336 | self.searchNB = QtWidgets.QToolButton(self.frame_2) 337 | self.searchNB.setGeometry(QtCore.QRect(370, 40, 101, 41)) 338 | self.searchNB.setStyleSheet("background-color:rgb(255, 249, 246);\n" 339 | "border:0px;\n" 340 | "\n" 341 | "border-radius:5px") 342 | self.searchNB.setText("") 343 | icon1 = QtGui.QIcon() 344 | icon1.addPixmap(QtGui.QPixmap("../../../../../pictures/search.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 345 | self.searchNB.setIcon(icon1) 346 | self.searchNB.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) 347 | self.searchNB.setObjectName("searchNB") 348 | self.label_74 = QtWidgets.QLabel(self.frame_2) 349 | self.label_74.setGeometry(QtCore.QRect(310, 149, 151, 40)) 350 | self.label_74.setStyleSheet("font: 9pt \"FontAwesome\";") 351 | self.label_74.setObjectName("label_74") 352 | self.modifyvalue = QtWidgets.QLineEdit(self.frame_2) 353 | self.modifyvalue.setGeometry(QtCore.QRect(430, 160, 111, 21)) 354 | self.modifyvalue.setStyleSheet("border-radius:5px") 355 | self.modifyvalue.setText("") 356 | self.modifyvalue.setObjectName("modifyvalue") 357 | self.commitTableModify = QtWidgets.QPushButton(self.frame_2) 358 | self.commitTableModify.setGeometry(QtCore.QRect(170, 155, 121, 31)) 359 | self.commitTableModify.setStyleSheet("#commitTableModify{background:#CCFFCC;\n" 360 | "border-radius:8px}\n" 361 | "#commitTableModify:hover\n" 362 | "{\n" 363 | "background:#CCFF99\n" 364 | "}") 365 | self.commitTableModify.setObjectName("commitTableModify") 366 | self.label_78 = QtWidgets.QLabel(self.frame_2) 367 | self.label_78.setGeometry(QtCore.QRect(360, 10, 231, 21)) 368 | font = QtGui.QFont() 369 | font.setPointSize(8) 370 | self.label_78.setFont(font) 371 | self.label_78.setObjectName("label_78") 372 | self.commitTableDel = QtWidgets.QPushButton(self.frame_2) 373 | self.commitTableDel.setGeometry(QtCore.QRect(170, 110, 121, 31)) 374 | self.commitTableDel.setStyleSheet("#commitTableDel{background:#CCFFCC;\n" 375 | "border-radius:8px}\n" 376 | "#commitTableDel:hover\n" 377 | "{\n" 378 | "background:#CCFF99\n" 379 | "}") 380 | self.commitTableDel.setObjectName("commitTableDel") 381 | self.split_3 = QtWidgets.QFrame(self.page_3) 382 | self.split_3.setGeometry(QtCore.QRect(10, 30, 600, 2)) 383 | self.split_3.setStyleSheet("color:#CCFFCC;\n" 384 | "border-color:#CCFFCC;\n" 385 | "background-color:#CCFFCC") 386 | self.split_3.setFrameShape(QtWidgets.QFrame.HLine) 387 | self.split_3.setFrameShadow(QtWidgets.QFrame.Raised) 388 | self.split_3.setObjectName("split_3") 389 | self.toolButton_2 = QtWidgets.QToolButton(self.page_3) 390 | self.toolButton_2.setGeometry(QtCore.QRect(20, 0, 101, 31)) 391 | font = QtGui.QFont() 392 | font.setFamily("FontAwesome") 393 | font.setPointSize(10) 394 | font.setBold(True) 395 | font.setWeight(75) 396 | self.toolButton_2.setFont(font) 397 | self.toolButton_2.setStyleSheet("border:none") 398 | icon2 = QtGui.QIcon() 399 | icon2.addPixmap(QtGui.QPixmap("../../../../../pictures/search1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 400 | self.toolButton_2.setIcon(icon2) 401 | self.toolButton_2.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) 402 | self.toolButton_2.setObjectName("toolButton_2") 403 | self.line = QtWidgets.QFrame(self.page_3) 404 | self.line.setGeometry(QtCore.QRect(10, 230, 601, 16)) 405 | self.line.setFrameShape(QtWidgets.QFrame.HLine) 406 | self.line.setFrameShadow(QtWidgets.QFrame.Sunken) 407 | self.line.setObjectName("line") 408 | self.stackedWidget.addWidget(self.page_3) 409 | self.page_2 = QtWidgets.QWidget() 410 | self.page_2.setObjectName("page_2") 411 | self.label_9 = QtWidgets.QLabel(self.page_2) 412 | self.label_9.setGeometry(QtCore.QRect(100, 60, 101, 40)) 413 | self.label_9.setStyleSheet("font: 9pt \"FontAwesome\";") 414 | self.label_9.setObjectName("label_9") 415 | self.split_2 = QtWidgets.QFrame(self.page_2) 416 | self.split_2.setGeometry(QtCore.QRect(10, 30, 600, 2)) 417 | self.split_2.setStyleSheet("color:#CCFFCC;\n" 418 | "border-color:#CCFFCC;\n" 419 | "background-color:#CCFFCC") 420 | self.split_2.setFrameShape(QtWidgets.QFrame.HLine) 421 | self.split_2.setFrameShadow(QtWidgets.QFrame.Raised) 422 | self.split_2.setObjectName("split_2") 423 | self.label_10 = QtWidgets.QLabel(self.page_2) 424 | self.label_10.setGeometry(QtCore.QRect(100, 260, 101, 41)) 425 | self.label_10.setStyleSheet("font: 9pt \"FontAwesome\";") 426 | self.label_10.setObjectName("label_10") 427 | self.label_11 = QtWidgets.QLabel(self.page_2) 428 | self.label_11.setGeometry(QtCore.QRect(100, 110, 101, 41)) 429 | self.label_11.setStyleSheet("font: 9pt \"FontAwesome\";") 430 | self.label_11.setObjectName("label_11") 431 | self.label_12 = QtWidgets.QLabel(self.page_2) 432 | self.label_12.setGeometry(QtCore.QRect(100, 310, 101, 41)) 433 | self.label_12.setStyleSheet("font: 9pt \"FontAwesome\";") 434 | self.label_12.setObjectName("label_12") 435 | self.label_13 = QtWidgets.QLabel(self.page_2) 436 | self.label_13.setGeometry(QtCore.QRect(100, 160, 101, 41)) 437 | self.label_13.setStyleSheet("font: 9pt \"FontAwesome\";") 438 | self.label_13.setObjectName("label_13") 439 | self.label_14 = QtWidgets.QLabel(self.page_2) 440 | self.label_14.setGeometry(QtCore.QRect(100, 360, 101, 41)) 441 | self.label_14.setStyleSheet("font: 9pt \"FontAwesome\";") 442 | self.label_14.setObjectName("label_14") 443 | self.label_15 = QtWidgets.QLabel(self.page_2) 444 | self.label_15.setGeometry(QtCore.QRect(100, 210, 101, 41)) 445 | self.label_15.setStyleSheet("font: 9pt \"FontAwesome\";") 446 | self.label_15.setObjectName("label_15") 447 | self.label_16 = QtWidgets.QLabel(self.page_2) 448 | self.label_16.setGeometry(QtCore.QRect(100, 410, 101, 41)) 449 | self.label_16.setStyleSheet("font: 9pt \"FontAwesome\";") 450 | self.label_16.setObjectName("label_16") 451 | self.label_17 = QtWidgets.QLabel(self.page_2) 452 | self.label_17.setGeometry(QtCore.QRect(100, 460, 101, 41)) 453 | self.label_17.setStyleSheet("font: 9pt \"FontAwesome\";") 454 | self.label_17.setObjectName("label_17") 455 | self.inputsid = QtWidgets.QLineEdit(self.page_2) 456 | self.inputsid.setGeometry(QtCore.QRect(220, 70, 221, 21)) 457 | self.inputsid.setObjectName("inputsid") 458 | self.inputname = QtWidgets.QLineEdit(self.page_2) 459 | self.inputname.setGeometry(QtCore.QRect(220, 120, 221, 21)) 460 | self.inputname.setObjectName("inputname") 461 | self.inputuser = QtWidgets.QLineEdit(self.page_2) 462 | self.inputuser.setGeometry(QtCore.QRect(220, 270, 221, 21)) 463 | self.inputuser.setObjectName("inputuser") 464 | self.inputpwd = QtWidgets.QLineEdit(self.page_2) 465 | self.inputpwd.setGeometry(QtCore.QRect(220, 320, 221, 21)) 466 | self.inputpwd.setObjectName("inputpwd") 467 | self.inputrole = QtWidgets.QLineEdit(self.page_2) 468 | self.inputrole.setGeometry(QtCore.QRect(220, 370, 221, 21)) 469 | self.inputrole.setObjectName("inputrole") 470 | self.inputidcard = QtWidgets.QLineEdit(self.page_2) 471 | self.inputidcard.setGeometry(QtCore.QRect(220, 420, 221, 21)) 472 | self.inputidcard.setObjectName("inputidcard") 473 | self.inputphone = QtWidgets.QLineEdit(self.page_2) 474 | self.inputphone.setGeometry(QtCore.QRect(220, 470, 221, 21)) 475 | self.inputphone.setObjectName("inputphone") 476 | self.toolButton_3 = QtWidgets.QToolButton(self.page_2) 477 | self.toolButton_3.setGeometry(QtCore.QRect(20, 0, 111, 31)) 478 | font = QtGui.QFont() 479 | font.setFamily("FontAwesome") 480 | font.setPointSize(10) 481 | font.setBold(True) 482 | font.setWeight(75) 483 | self.toolButton_3.setFont(font) 484 | self.toolButton_3.setStyleSheet("border:none\n" 485 | "") 486 | icon3 = QtGui.QIcon() 487 | icon3.addPixmap(QtGui.QPixmap("../../../../../pictures/insert.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 488 | self.toolButton_3.setIcon(icon3) 489 | self.toolButton_3.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) 490 | self.toolButton_3.setObjectName("toolButton_3") 491 | self.commitAdd = QtWidgets.QPushButton(self.page_2) 492 | self.commitAdd.setGeometry(QtCore.QRect(200, 530, 211, 31)) 493 | self.commitAdd.setStyleSheet("#commitAdd{background:#CCFFCC;\n" 494 | "border-radius:8px}\n" 495 | "#commitAdd:hover\n" 496 | "{\n" 497 | "background:#CCFF99\n" 498 | "}") 499 | self.commitAdd.setObjectName("commitAdd") 500 | self.inputdate = QtWidgets.QDateEdit(self.page_2) 501 | self.inputdate.setGeometry(QtCore.QRect(220, 220, 221, 22)) 502 | self.inputdate.setDateTime(QtCore.QDateTime(QtCore.QDate(2020, 1, 1), QtCore.QTime(0, 0, 0))) 503 | self.inputdate.setObjectName("inputdate") 504 | self.inputfemale = QtWidgets.QRadioButton(self.page_2) 505 | self.inputfemale.setGeometry(QtCore.QRect(320, 170, 115, 19)) 506 | self.inputfemale.setObjectName("inputfemale") 507 | self.inputmale = QtWidgets.QRadioButton(self.page_2) 508 | self.inputmale.setGeometry(QtCore.QRect(220, 170, 81, 19)) 509 | self.inputmale.setObjectName("inputmale") 510 | self.stackedWidget.addWidget(self.page_2) 511 | self.page_4 = QtWidgets.QWidget() 512 | self.page_4.setObjectName("page_4") 513 | self.split_4 = QtWidgets.QFrame(self.page_4) 514 | self.split_4.setGeometry(QtCore.QRect(10, 30, 600, 2)) 515 | self.split_4.setStyleSheet("color:#CCFFCC;\n" 516 | "border-color:#CCFFCC;\n" 517 | "background-color:#CCFFCC") 518 | self.split_4.setFrameShape(QtWidgets.QFrame.HLine) 519 | self.split_4.setFrameShadow(QtWidgets.QFrame.Raised) 520 | self.split_4.setObjectName("split_4") 521 | self.toolButton_4 = QtWidgets.QToolButton(self.page_4) 522 | self.toolButton_4.setGeometry(QtCore.QRect(20, 0, 111, 31)) 523 | font = QtGui.QFont() 524 | font.setFamily("FontAwesome") 525 | font.setPointSize(10) 526 | font.setBold(True) 527 | font.setWeight(75) 528 | self.toolButton_4.setFont(font) 529 | self.toolButton_4.setStyleSheet("border:none\n" 530 | "") 531 | icon4 = QtGui.QIcon() 532 | icon4.addPixmap(QtGui.QPixmap("../../../../../pictures/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 533 | self.toolButton_4.setIcon(icon4) 534 | self.toolButton_4.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) 535 | self.toolButton_4.setObjectName("toolButton_4") 536 | self.deleteTable = QtWidgets.QTableWidget(self.page_4) 537 | self.deleteTable.setGeometry(QtCore.QRect(10, 260, 601, 341)) 538 | self.deleteTable.setStyleSheet("") 539 | self.deleteTable.setObjectName("deleteTable") 540 | self.deleteTable.setColumnCount(9) 541 | self.deleteTable.setRowCount(0) 542 | item = QtWidgets.QTableWidgetItem() 543 | self.deleteTable.setHorizontalHeaderItem(0, item) 544 | item = QtWidgets.QTableWidgetItem() 545 | self.deleteTable.setHorizontalHeaderItem(1, item) 546 | item = QtWidgets.QTableWidgetItem() 547 | self.deleteTable.setHorizontalHeaderItem(2, item) 548 | item = QtWidgets.QTableWidgetItem() 549 | self.deleteTable.setHorizontalHeaderItem(3, item) 550 | item = QtWidgets.QTableWidgetItem() 551 | self.deleteTable.setHorizontalHeaderItem(4, item) 552 | item = QtWidgets.QTableWidgetItem() 553 | self.deleteTable.setHorizontalHeaderItem(5, item) 554 | item = QtWidgets.QTableWidgetItem() 555 | self.deleteTable.setHorizontalHeaderItem(6, item) 556 | item = QtWidgets.QTableWidgetItem() 557 | self.deleteTable.setHorizontalHeaderItem(7, item) 558 | item = QtWidgets.QTableWidgetItem() 559 | self.deleteTable.setHorizontalHeaderItem(8, item) 560 | self.desid = QtWidgets.QLineEdit(self.page_4) 561 | self.desid.setGeometry(QtCore.QRect(250, 90, 221, 21)) 562 | self.desid.setObjectName("desid") 563 | self.label_18 = QtWidgets.QLabel(self.page_4) 564 | self.label_18.setGeometry(QtCore.QRect(150, 80, 91, 40)) 565 | self.label_18.setStyleSheet("font: 9pt \"FontAwesome\";") 566 | self.label_18.setObjectName("label_18") 567 | self.dename = QtWidgets.QLineEdit(self.page_4) 568 | self.dename.setGeometry(QtCore.QRect(250, 130, 221, 21)) 569 | self.dename.setObjectName("dename") 570 | self.label_19 = QtWidgets.QLabel(self.page_4) 571 | self.label_19.setGeometry(QtCore.QRect(150, 120, 91, 41)) 572 | self.label_19.setStyleSheet("font: 9pt \"FontAwesome\";") 573 | self.label_19.setObjectName("label_19") 574 | self.deidcard = QtWidgets.QLineEdit(self.page_4) 575 | self.deidcard.setGeometry(QtCore.QRect(250, 170, 221, 21)) 576 | self.deidcard.setObjectName("deidcard") 577 | self.label_20 = QtWidgets.QLabel(self.page_4) 578 | self.label_20.setGeometry(QtCore.QRect(150, 160, 81, 41)) 579 | self.label_20.setStyleSheet("font: 9pt \"FontAwesome\";") 580 | self.label_20.setObjectName("label_20") 581 | self.commitDe = QtWidgets.QPushButton(self.page_4) 582 | self.commitDe.setGeometry(QtCore.QRect(240, 210, 93, 28)) 583 | self.commitDe.setStyleSheet("#commitDe{background:#CCFFCC;\n" 584 | "border-radius:8px}\n" 585 | "#commitDe:hover\n" 586 | "{\n" 587 | "background:#CCFF99\n" 588 | "}") 589 | self.commitDe.setObjectName("commitDe") 590 | self.label_21 = QtWidgets.QLabel(self.page_4) 591 | self.label_21.setGeometry(QtCore.QRect(210, 35, 211, 31)) 592 | font = QtGui.QFont() 593 | font.setFamily("FontAwesome") 594 | font.setPointSize(12) 595 | font.setBold(False) 596 | font.setWeight(50) 597 | self.label_21.setFont(font) 598 | self.label_21.setObjectName("label_21") 599 | self.stackedWidget.addWidget(self.page_4) 600 | self.listWidget = QtWidgets.QListWidget(self.centralwidget) 601 | self.listWidget.setGeometry(QtCore.QRect(0, 200, 204, 400)) 602 | self.listWidget.setItemAlignment(QtCore.Qt.AlignCenter) 603 | self.listWidget.setObjectName("listWidget") 604 | item = QtWidgets.QListWidgetItem() 605 | font = QtGui.QFont() 606 | font.setFamily("FontAwesome") 607 | font.setPointSize(12) 608 | font.setBold(True) 609 | font.setWeight(75) 610 | item.setFont(font) 611 | icon5 = QtGui.QIcon() 612 | icon5.addPixmap(QtGui.QPixmap("../../../../../pictures/staff5.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 613 | item.setIcon(icon5) 614 | self.listWidget.addItem(item) 615 | item = QtWidgets.QListWidgetItem() 616 | font = QtGui.QFont() 617 | font.setFamily("FontAwesome") 618 | font.setPointSize(12) 619 | font.setBold(True) 620 | font.setWeight(75) 621 | item.setFont(font) 622 | icon6 = QtGui.QIcon() 623 | icon6.addPixmap(QtGui.QPixmap("../../../../../pictures/staff2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 624 | item.setIcon(icon6) 625 | self.listWidget.addItem(item) 626 | item = QtWidgets.QListWidgetItem() 627 | font = QtGui.QFont() 628 | font.setFamily("FontAwesome") 629 | font.setPointSize(12) 630 | font.setBold(True) 631 | font.setWeight(75) 632 | item.setFont(font) 633 | icon7 = QtGui.QIcon() 634 | icon7.addPixmap(QtGui.QPixmap("../../../../../pictures/staff4.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 635 | item.setIcon(icon7) 636 | self.listWidget.addItem(item) 637 | item = QtWidgets.QListWidgetItem() 638 | font = QtGui.QFont() 639 | font.setFamily("FontAwesome") 640 | font.setPointSize(12) 641 | font.setBold(True) 642 | font.setWeight(75) 643 | item.setFont(font) 644 | item.setIcon(icon5) 645 | self.listWidget.addItem(item) 646 | self.frame = QtWidgets.QFrame(self.centralwidget) 647 | self.frame.setGeometry(QtCore.QRect(0, 0, 204, 211)) 648 | self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) 649 | self.frame.setFrameShadow(QtWidgets.QFrame.Raised) 650 | self.frame.setObjectName("frame") 651 | self.head = QtWidgets.QToolButton(self.frame) 652 | self.head.setGeometry(QtCore.QRect(60, 20, 60, 60)) 653 | self.head.setText("") 654 | self.head.setIcon(icon) 655 | self.head.setIconSize(QtCore.QSize(60, 60)) 656 | self.head.setObjectName("head") 657 | self.welcome = QtWidgets.QLabel(self.frame) 658 | self.welcome.setGeometry(QtCore.QRect(30, 90, 110, 20)) 659 | self.welcome.setText("") 660 | self.welcome.setAlignment(QtCore.Qt.AlignCenter) 661 | self.welcome.setObjectName("welcome") 662 | self.label_2 = QtWidgets.QLabel(self.frame) 663 | self.label_2.setGeometry(QtCore.QRect(40, 140, 121, 16)) 664 | font = QtGui.QFont() 665 | font.setPointSize(8) 666 | self.label_2.setFont(font) 667 | self.label_2.setObjectName("label_2") 668 | self.Search = QtWidgets.QLineEdit(self.frame) 669 | self.Search.setGeometry(QtCore.QRect(20, 170, 145, 25)) 670 | palette = QtGui.QPalette() 671 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 672 | brush.setStyle(QtCore.Qt.SolidPattern) 673 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) 674 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 675 | brush.setStyle(QtCore.Qt.SolidPattern) 676 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush) 677 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 678 | brush.setStyle(QtCore.Qt.SolidPattern) 679 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush) 680 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 681 | brush.setStyle(QtCore.Qt.SolidPattern) 682 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush) 683 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 684 | brush.setStyle(QtCore.Qt.SolidPattern) 685 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) 686 | brush = QtGui.QBrush(QtGui.QColor(170, 170, 170)) 687 | brush.setStyle(QtCore.Qt.SolidPattern) 688 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) 689 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 690 | brush.setStyle(QtCore.Qt.SolidPattern) 691 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush) 692 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 693 | brush.setStyle(QtCore.Qt.SolidPattern) 694 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush) 695 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 696 | brush.setStyle(QtCore.Qt.SolidPattern) 697 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) 698 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 699 | brush.setStyle(QtCore.Qt.SolidPattern) 700 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush) 701 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 702 | brush.setStyle(QtCore.Qt.SolidPattern) 703 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush) 704 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 705 | brush.setStyle(QtCore.Qt.SolidPattern) 706 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush) 707 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 708 | brush.setStyle(QtCore.Qt.SolidPattern) 709 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush) 710 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 711 | brush.setStyle(QtCore.Qt.SolidPattern) 712 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush) 713 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 714 | brush.setStyle(QtCore.Qt.SolidPattern) 715 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush) 716 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 128)) 717 | brush.setStyle(QtCore.Qt.SolidPattern) 718 | palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.PlaceholderText, brush) 719 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 720 | brush.setStyle(QtCore.Qt.SolidPattern) 721 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush) 722 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 723 | brush.setStyle(QtCore.Qt.SolidPattern) 724 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush) 725 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 726 | brush.setStyle(QtCore.Qt.SolidPattern) 727 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush) 728 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 729 | brush.setStyle(QtCore.Qt.SolidPattern) 730 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush) 731 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 732 | brush.setStyle(QtCore.Qt.SolidPattern) 733 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush) 734 | brush = QtGui.QBrush(QtGui.QColor(170, 170, 170)) 735 | brush.setStyle(QtCore.Qt.SolidPattern) 736 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush) 737 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 738 | brush.setStyle(QtCore.Qt.SolidPattern) 739 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush) 740 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 741 | brush.setStyle(QtCore.Qt.SolidPattern) 742 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) 743 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 744 | brush.setStyle(QtCore.Qt.SolidPattern) 745 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) 746 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 747 | brush.setStyle(QtCore.Qt.SolidPattern) 748 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush) 749 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 750 | brush.setStyle(QtCore.Qt.SolidPattern) 751 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush) 752 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 753 | brush.setStyle(QtCore.Qt.SolidPattern) 754 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush) 755 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 756 | brush.setStyle(QtCore.Qt.SolidPattern) 757 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush) 758 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 759 | brush.setStyle(QtCore.Qt.SolidPattern) 760 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush) 761 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 762 | brush.setStyle(QtCore.Qt.SolidPattern) 763 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush) 764 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 128)) 765 | brush.setStyle(QtCore.Qt.SolidPattern) 766 | palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.PlaceholderText, brush) 767 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 768 | brush.setStyle(QtCore.Qt.SolidPattern) 769 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush) 770 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 771 | brush.setStyle(QtCore.Qt.SolidPattern) 772 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush) 773 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 774 | brush.setStyle(QtCore.Qt.SolidPattern) 775 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush) 776 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 777 | brush.setStyle(QtCore.Qt.SolidPattern) 778 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush) 779 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 780 | brush.setStyle(QtCore.Qt.SolidPattern) 781 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush) 782 | brush = QtGui.QBrush(QtGui.QColor(170, 170, 170)) 783 | brush.setStyle(QtCore.Qt.SolidPattern) 784 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush) 785 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 786 | brush.setStyle(QtCore.Qt.SolidPattern) 787 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush) 788 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 789 | brush.setStyle(QtCore.Qt.SolidPattern) 790 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush) 791 | brush = QtGui.QBrush(QtGui.QColor(127, 127, 127)) 792 | brush.setStyle(QtCore.Qt.SolidPattern) 793 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) 794 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 795 | brush.setStyle(QtCore.Qt.SolidPattern) 796 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush) 797 | brush = QtGui.QBrush(QtGui.QColor(41, 56, 70)) 798 | brush.setStyle(QtCore.Qt.SolidPattern) 799 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush) 800 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 801 | brush.setStyle(QtCore.Qt.SolidPattern) 802 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush) 803 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) 804 | brush.setStyle(QtCore.Qt.SolidPattern) 805 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush) 806 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 220)) 807 | brush.setStyle(QtCore.Qt.SolidPattern) 808 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush) 809 | brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) 810 | brush.setStyle(QtCore.Qt.SolidPattern) 811 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush) 812 | brush = QtGui.QBrush(QtGui.QColor(255, 255, 255, 128)) 813 | brush.setStyle(QtCore.Qt.SolidPattern) 814 | palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.PlaceholderText, brush) 815 | self.Search.setPalette(palette) 816 | font = QtGui.QFont() 817 | font.setFamily("微软雅黑") 818 | font.setPointSize(7) 819 | self.Search.setFont(font) 820 | self.Search.setStyleSheet("") 821 | self.Search.setObjectName("Search") 822 | self.toolButton = QtWidgets.QToolButton(self.frame) 823 | self.toolButton.setGeometry(QtCore.QRect(170, 170, 21, 20)) 824 | self.toolButton.setStyleSheet("background-color:#2f4050;\n" 825 | "border:0px;\n" 826 | "\n" 827 | "border-radius:5px") 828 | self.toolButton.setText("") 829 | self.toolButton.setIcon(icon1) 830 | self.toolButton.setIconSize(QtCore.QSize(15, 15)) 831 | self.toolButton.setObjectName("toolButton") 832 | self.role = QtWidgets.QLabel(self.frame) 833 | self.role.setGeometry(QtCore.QRect(30, 120, 110, 15)) 834 | font = QtGui.QFont() 835 | font.setPointSize(7) 836 | self.role.setFont(font) 837 | self.role.setText("") 838 | self.role.setAlignment(QtCore.Qt.AlignCenter) 839 | self.role.setObjectName("role") 840 | MainWindow.setCentralWidget(self.centralwidget) 841 | 842 | self.retranslateUi(MainWindow) 843 | self.stackedWidget.setCurrentIndex(1) 844 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 845 | 846 | def retranslateUi(self, MainWindow): 847 | _translate = QtCore.QCoreApplication.translate 848 | MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) 849 | self.name.setText(_translate("MainWindow", "csa ")) 850 | self.label.setText(_translate("MainWindow", "姓名:")) 851 | self.label_3.setText(_translate("MainWindow", "性别:")) 852 | self.label_4.setText(_translate("MainWindow", "入职时间:")) 853 | self.label_5.setText(_translate("MainWindow", "权限:")) 854 | self.label_6.setText(_translate("MainWindow", "手机号:")) 855 | self.label_7.setText(_translate("MainWindow", "身份证号:")) 856 | self.sname.setText(_translate("MainWindow", "邵嘉毅")) 857 | self.ssex.setText(_translate("MainWindow", "男")) 858 | self.stime.setText(_translate("MainWindow", "2019-12-12")) 859 | self.srole.setText(_translate("MainWindow", "1")) 860 | self.sphone.setText(_translate("MainWindow", "2332121323")) 861 | self.sidcard.setText(_translate("MainWindow", "1111111111111111111")) 862 | self.label_8.setText(_translate("MainWindow", "员工号:")) 863 | self.sidcard_2.setText(_translate("MainWindow", "1")) 864 | item = self.searchTable.horizontalHeaderItem(0) 865 | item.setText(_translate("MainWindow", "员工编号")) 866 | item = self.searchTable.horizontalHeaderItem(1) 867 | item.setText(_translate("MainWindow", "姓名")) 868 | item = self.searchTable.horizontalHeaderItem(2) 869 | item.setText(_translate("MainWindow", "性别")) 870 | item = self.searchTable.horizontalHeaderItem(3) 871 | item.setText(_translate("MainWindow", "登记入职时间")) 872 | item = self.searchTable.horizontalHeaderItem(4) 873 | item.setText(_translate("MainWindow", "账户名")) 874 | item = self.searchTable.horizontalHeaderItem(5) 875 | item.setText(_translate("MainWindow", "密码")) 876 | item = self.searchTable.horizontalHeaderItem(6) 877 | item.setText(_translate("MainWindow", "权限")) 878 | item = self.searchTable.horizontalHeaderItem(7) 879 | item.setText(_translate("MainWindow", "身份证号")) 880 | item = self.searchTable.horizontalHeaderItem(8) 881 | item.setText(_translate("MainWindow", "手机号")) 882 | self.searchName.setPlaceholderText(_translate("MainWindow", "搜索员工姓名")) 883 | self.label_74.setText(_translate("MainWindow", "选中部分修改为:")) 884 | self.modifyvalue.setPlaceholderText(_translate("MainWindow", "修改值")) 885 | self.commitTableModify.setText(_translate("MainWindow", "确认修改")) 886 | self.label_78.setText(_translate("MainWindow", "*选中表格内可以进行修改和删除操作")) 887 | self.commitTableDel.setText(_translate("MainWindow", "确认删除")) 888 | self.toolButton_2.setText(_translate("MainWindow", "查询员工")) 889 | self.label_9.setText(_translate("MainWindow", "员工编号:")) 890 | self.label_10.setText(_translate("MainWindow", "账户名:")) 891 | self.label_11.setText(_translate("MainWindow", "员工姓名:")) 892 | self.label_12.setText(_translate("MainWindow", "密码:")) 893 | self.label_13.setText(_translate("MainWindow", "员工性别:")) 894 | self.label_14.setText(_translate("MainWindow", "权限:")) 895 | self.label_15.setText(_translate("MainWindow", "登记入职时间:")) 896 | self.label_16.setText(_translate("MainWindow", "身份证:")) 897 | self.label_17.setText(_translate("MainWindow", "手机号:")) 898 | self.inputsid.setPlaceholderText(_translate("MainWindow", "编号")) 899 | self.inputname.setPlaceholderText(_translate("MainWindow", "姓名")) 900 | self.inputuser.setPlaceholderText(_translate("MainWindow", "账号名")) 901 | self.inputpwd.setPlaceholderText(_translate("MainWindow", "密码")) 902 | self.inputrole.setPlaceholderText(_translate("MainWindow", "权限")) 903 | self.inputidcard.setPlaceholderText(_translate("MainWindow", "身份证")) 904 | self.inputphone.setPlaceholderText(_translate("MainWindow", "手机号")) 905 | self.toolButton_3.setText(_translate("MainWindow", "增添员工")) 906 | self.commitAdd.setText(_translate("MainWindow", "确认录入")) 907 | self.inputfemale.setText(_translate("MainWindow", "女")) 908 | self.inputmale.setText(_translate("MainWindow", "男")) 909 | self.toolButton_4.setText(_translate("MainWindow", "删除员工")) 910 | item = self.deleteTable.horizontalHeaderItem(0) 911 | item.setText(_translate("MainWindow", "员工编号")) 912 | item = self.deleteTable.horizontalHeaderItem(1) 913 | item.setText(_translate("MainWindow", "姓名")) 914 | item = self.deleteTable.horizontalHeaderItem(2) 915 | item.setText(_translate("MainWindow", "性别")) 916 | item = self.deleteTable.horizontalHeaderItem(3) 917 | item.setText(_translate("MainWindow", "登记入职时间")) 918 | item = self.deleteTable.horizontalHeaderItem(4) 919 | item.setText(_translate("MainWindow", "账户名")) 920 | item = self.deleteTable.horizontalHeaderItem(5) 921 | item.setText(_translate("MainWindow", "密码")) 922 | item = self.deleteTable.horizontalHeaderItem(6) 923 | item.setText(_translate("MainWindow", "权限")) 924 | item = self.deleteTable.horizontalHeaderItem(7) 925 | item.setText(_translate("MainWindow", "身份证号")) 926 | item = self.deleteTable.horizontalHeaderItem(8) 927 | item.setText(_translate("MainWindow", "手机号")) 928 | self.desid.setPlaceholderText(_translate("MainWindow", "编号")) 929 | self.label_18.setText(_translate("MainWindow", "员工编号:")) 930 | self.dename.setPlaceholderText(_translate("MainWindow", "姓名")) 931 | self.label_19.setText(_translate("MainWindow", "员工姓名:")) 932 | self.deidcard.setPlaceholderText(_translate("MainWindow", "身份证")) 933 | self.label_20.setText(_translate("MainWindow", "身份证:")) 934 | self.commitDe.setText(_translate("MainWindow", "确认删除")) 935 | self.label_21.setText(_translate("MainWindow", "选择要删除的员工:")) 936 | __sortingEnabled = self.listWidget.isSortingEnabled() 937 | self.listWidget.setSortingEnabled(False) 938 | item = self.listWidget.item(0) 939 | item.setText(_translate("MainWindow", " 个人信息")) 940 | item = self.listWidget.item(1) 941 | item.setText(_translate("MainWindow", " 查询员工*")) 942 | item = self.listWidget.item(2) 943 | item.setText(_translate("MainWindow", " 增添员工*")) 944 | item = self.listWidget.item(3) 945 | item.setText(_translate("MainWindow", " 删除员工*")) 946 | self.listWidget.setSortingEnabled(__sortingEnabled) 947 | self.label_2.setText(_translate("MainWindow", "*表示需要最高权限")) 948 | self.Search.setPlaceholderText(_translate("MainWindow", "搜索")) 949 | --------------------------------------------------------------------------------