final release

master
HOJI 2 years ago
parent 06700dff52
commit bdaeb06d87

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 9.0.2, 2023-09-12T00:30:34. --> <!-- Written by QtCreator 9.0.2, 2023-09-12T00:58:33. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
@ -243,7 +243,6 @@
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value> <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">F:/git/Hotel_Management/build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Debug</value>
</valuemap> </valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value> <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap> </valuemap>

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

@ -7,6 +7,14 @@ add_administration::add_administration(QWidget *parent) :
ui(new Ui::add_administration) ui(new Ui::add_administration)
{ {
ui->setupUi(this); ui->setupUi(this);
QIcon logo(":/image/icon/logo.png");
this->setWindowIcon(logo);
this->setWindowTitle("提示");
this->setFixedSize(400,300);
bg = new QLabel(this);
bg->setScaledContents(true);
bg->setPixmap(QPixmap(":/image/bg/add.jpg"));
bg->lower();
} }
@ -15,14 +23,20 @@ add_administration::~add_administration()
delete ui; delete ui;
} }
void add_administration::paintEvent(QPaintEvent*)
{
bg->resize(ui->widget->size());
}
void add_administration::on_pushButton_clicked() void add_administration::on_pushButton_clicked()
{ {
administration *ad = new administration; //administration *ad = new administration;
QSqlQuery query((db)); QSqlQuery query((db));
query.prepare("INSERT into room VALUES(:n,1,1,1,1,NULL,NULL);"); query.prepare("INSERT into room VALUES(:n,1,1,1,1,NULL,NULL);");
query.bindValue(":n",ui->lineEdit->text()); query.bindValue(":n",ui->lineEdit->text());
query.exec(); query.exec();
QMessageBox::information(this,tr("提示"),("添加成功,请刷新")); QMessageBox::information(this,tr("提示"),("添加成功,请刷新"));
this->hide();
} }

@ -4,6 +4,7 @@
#include <QDialog> #include <QDialog>
#include <qsqldatabase.h> #include <qsqldatabase.h>
#include <administration.h> #include <administration.h>
#include <QLabel>
namespace Ui { namespace Ui {
class add_administration; class add_administration;
@ -17,12 +18,16 @@ public:
explicit add_administration(QWidget *parent = nullptr); explicit add_administration(QWidget *parent = nullptr);
~add_administration(); ~add_administration();
protected:
void paintEvent(QPaintEvent*);
private slots: private slots:
void on_pushButton_clicked(); void on_pushButton_clicked();
private: private:
Ui::add_administration *ui; Ui::add_administration *ui;
QSqlDatabase db; QSqlDatabase db;
QLabel *bg;
}; };
#endif // ADD_ADMINISTRATION_H #endif // ADD_ADMINISTRATION_H

@ -13,40 +13,62 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Dialog</string>
</property> </property>
<widget class="QPushButton" name="pushButton"> <widget class="QWidget" name="widget" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>140</x> <x>0</x>
<y>240</y> <y>0</y>
<width>80</width> <width>400</width>
<height>19</height> <height>300</height>
</rect> </rect>
</property> </property>
<property name="text"> <widget class="QWidget" name="layoutWidget">
<string>确定</string> <property name="geometry">
</property> <rect>
</widget> <x>50</x>
<widget class="QWidget" name=""> <y>90</y>
<property name="geometry"> <width>301</width>
<rect> <height>81</height>
<x>90</x> </rect>
<y>90</y> </property>
<width>191</width> <layout class="QHBoxLayout" name="horizontalLayout">
<height>81</height> <item>
</rect> <widget class="QLabel" name="label">
</property> <property name="font">
<layout class="QHBoxLayout" name="horizontalLayout"> <font>
<item> <pointsize>12</pointsize>
<widget class="QLabel" name="label"> <bold>true</bold>
<property name="text"> </font>
<string>房间号:</string> </property>
</property> <property name="text">
</widget> <string>房间号:</string>
</item> </property>
<item> </widget>
<widget class="QLineEdit" name="lineEdit"/> </item>
</item> <item>
</layout> <widget class="QLineEdit" name="lineEdit">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>150</x>
<y>230</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
</widget> </widget>
</widget> </widget>
<resources/> <resources/>

@ -142,7 +142,7 @@ void administration::on_Del_clicked()
QTableWidgetItem *item = ui->AcounTable->currentItem(); QTableWidgetItem *item = ui->AcounTable->currentItem();
QString n = 0; QString n = 0;
n = ui->AcounTable->model()->index(item->row(),0).data().toString(); n = ui->AcounTable->model()->index(item->row(),0).data().toString();
int num = n.toInt(); //int num = n.toInt();
query.prepare("DELETE from customer where account = :num "); query.prepare("DELETE from customer where account = :num ");
query.bindValue(":num",n); query.bindValue(":num",n);
query.exec(); query.exec();

@ -58,6 +58,9 @@
<pointsize>24</pointsize> <pointsize>24</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255); <string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string> border-radius:15px;</string>
@ -80,6 +83,9 @@ border-radius:15px;</string>
<pointsize>24</pointsize> <pointsize>24</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255); <string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string> border-radius:15px;</string>
@ -146,6 +152,9 @@ color: rgb(255, 255, 255);</string>
<pointsize>24</pointsize> <pointsize>24</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255); <string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string> border-radius:15px;</string>
@ -189,6 +198,9 @@ border-radius:15px;</string>
<pointsize>24</pointsize> <pointsize>24</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255); <string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string> border-radius:15px;</string>
@ -211,6 +223,9 @@ border-radius:15px;</string>
<pointsize>24</pointsize> <pointsize>24</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255); <string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string> border-radius:15px;</string>

@ -45,6 +45,9 @@
<height>60</height> <height>60</height>
</rect> </rect>
</property> </property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="text"> <property name="text">
<string>退</string> <string>退</string>
</property> </property>
@ -213,6 +216,9 @@ color: rgb(255, 255, 255);</string>
<pointsize>25</pointsize> <pointsize>25</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">image:url(:/image/icon/resetcode.png); <string notr="true">image:url(:/image/icon/resetcode.png);
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

@ -50,31 +50,6 @@ void login::on_btn_info_clicked()
QMessageBox::about(this, tr("关于我们"), tr("《宾馆客房管理系统》\n\n开发团队Cyber Pigeon\n\n产品经理:雷张炜\n界面设计:雷张炜\n美术设计:雷张炜、周海康\n系统测试:余朴\n软件分析:曹坤\n程序总监:雷张炜、周海康\n程序设计:雷张炜、周海康、余朴、曹坤\n\nCopyright© 2023 Cyber Pigeon® All Right Reserved.")); QMessageBox::about(this, tr("关于我们"), tr("《宾馆客房管理系统》\n\n开发团队Cyber Pigeon\n\n产品经理:雷张炜\n界面设计:雷张炜\n美术设计:雷张炜、周海康\n系统测试:余朴\n软件分析:曹坤\n程序总监:雷张炜、周海康\n程序设计:雷张炜、周海康、余朴、曹坤\n\nCopyright© 2023 Cyber Pigeon® All Right Reserved."));
} }
void login::on_pushButton_2_clicked()
{
customer *cus = new customer;
this->hide();
cus->show();
}
void login::on_pushButton_3_clicked()
{
receptionist *rec = new receptionist;
this->hide();
rec->show();
}
void login::on_pushButton_4_clicked()
{
administration *admin = new administration;
this->hide();
admin->show();
}
void login::on_btn_login_clicked() void login::on_btn_login_clicked()
{ {
bool isfind = false; bool isfind = false;

@ -27,12 +27,6 @@ protected:
private slots: private slots:
void on_btn_info_clicked(); void on_btn_info_clicked();
void on_pushButton_2_clicked();
void on_pushButton_3_clicked();
void on_pushButton_4_clicked();
void on_btn_login_clicked(); void on_btn_login_clicked();
void on_btn_register_clicked(); void on_btn_register_clicked();

@ -86,6 +86,9 @@
<pointsize>16</pointsize> <pointsize>16</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">radius:15px;</string> <string notr="true">radius:15px;</string>
</property> </property>
@ -188,66 +191,6 @@ background-color: rgba(0, 0, 0, 0);</string>
<string/> <string/>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>40</x>
<y>290</y>
<width>501</width>
<height>271</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>50</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>测试用</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>130</x>
<y>570</y>
<width>151</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>客户</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_3">
<property name="geometry">
<rect>
<x>130</x>
<y>620</y>
<width>151</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>前台</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_4">
<property name="geometry">
<rect>
<x>130</x>
<y>670</y>
<width>151</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>管理</string>
</property>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar">

@ -101,6 +101,9 @@
<pointsize>12</pointsize> <pointsize>12</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text"> <property name="text">
<string>新建客户</string> <string>新建客户</string>
</property> </property>
@ -126,6 +129,9 @@
<pointsize>12</pointsize> <pointsize>12</pointsize>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text"> <property name="text">
<string>订房</string> <string>订房</string>
</property> </property>

@ -1,11 +1,10 @@
<RCC> <RCC>
<qresource prefix="/image/bg"> <qresource prefix="/image/bg">
<file>login.png</file> <file>login.png</file>
<file>customerbackground.webp</file>
<file>sea.jpg</file> <file>sea.jpg</file>
<file>stone.jpg</file>
<file>register.jpg</file> <file>register.jpg</file>
<file>order.png</file> <file>order.png</file>
<file>add.jpg</file>
</qresource> </qresource>
<qresource prefix="/image/icon"> <qresource prefix="/image/icon">
<file>info.png</file> <file>info.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

Loading…
Cancel
Save