├── myapp.rc ├── help.txt ├── images ├── Scaner.jpg ├── Serial.JPG ├── sqlite.png ├── LexinSQicon.png └── LexinSmartQRSQL.ico ├── LexinSmartQRSQL.ico ├── help.cpp ├── firstuse.cpp ├── main.cpp ├── help.h ├── icontopleft.qrc ├── firstuse.h ├── inputarg.cpp ├── serial.h ├── .gitattributes ├── inputarg.h ├── sqlsetup.h ├── inputpwd.h ├── duplicate.h ├── numbererror.h ├── formaterror.h ├── serialsetup.h ├── inputpwd.cpp ├── duplicate.cpp ├── README.md ├── formaterror.cpp ├── numbererror.cpp ├── serial.cpp ├── .gitignore ├── serialsetup.cpp ├── QRcodeSql.pro ├── sqlui.h ├── mainwindow.h ├── sqlsetup.cpp ├── inputarg.ui ├── inputpwd.ui ├── serialsetup.ui ├── firstuse.ui ├── duplicate.ui ├── formaterror.ui ├── numbererror.ui ├── sqlsetup.ui ├── sqlui.ui ├── help.ui ├── mainwindow.cpp ├── sqlui.cpp └── mainwindow.ui /myapp.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "LexinSmartQRSQL.ico" -------------------------------------------------------------------------------- /help.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/damoyelang1992/Qt-QRcodeSQLite/HEAD/help.txt -------------------------------------------------------------------------------- /images/Scaner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/damoyelang1992/Qt-QRcodeSQLite/HEAD/images/Scaner.jpg -------------------------------------------------------------------------------- /images/Serial.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/damoyelang1992/Qt-QRcodeSQLite/HEAD/images/Serial.JPG -------------------------------------------------------------------------------- /images/sqlite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/damoyelang1992/Qt-QRcodeSQLite/HEAD/images/sqlite.png -------------------------------------------------------------------------------- /LexinSmartQRSQL.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/damoyelang1992/Qt-QRcodeSQLite/HEAD/LexinSmartQRSQL.ico -------------------------------------------------------------------------------- /images/LexinSQicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/damoyelang1992/Qt-QRcodeSQLite/HEAD/images/LexinSQicon.png -------------------------------------------------------------------------------- /images/LexinSmartQRSQL.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/damoyelang1992/Qt-QRcodeSQLite/HEAD/images/LexinSmartQRSQL.ico -------------------------------------------------------------------------------- /help.cpp: -------------------------------------------------------------------------------- 1 | #include "help.h" 2 | #include "ui_help.h" 3 | 4 | Help::Help(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::Help) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | Help::~Help() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /firstuse.cpp: -------------------------------------------------------------------------------- 1 | #include "firstuse.h" 2 | #include "ui_firstuse.h" 3 | 4 | FirstUSE::FirstUSE(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::FirstUSE) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | FirstUSE::~FirstUSE() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | a.setWindowIcon(QIcon(":/new/prefix1/images/LexinSmartQRSQL.icon")); 8 | MainWindow w; 9 | w.show(); 10 | 11 | return a.exec(); 12 | } 13 | -------------------------------------------------------------------------------- /help.h: -------------------------------------------------------------------------------- 1 | #ifndef HELP_H 2 | #define HELP_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class Help; 8 | } 9 | 10 | class Help : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit Help(QWidget *parent = 0); 16 | ~Help(); 17 | 18 | private: 19 | Ui::Help *ui; 20 | }; 21 | 22 | #endif // HELP_H 23 | -------------------------------------------------------------------------------- /icontopleft.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/LexinSQicon.png 4 | images/Scaner.jpg 5 | images/Serial.JPG 6 | images/sqlite.png 7 | help.txt 8 | images/LexinSmartQRSQL.ico 9 | 10 | 11 | -------------------------------------------------------------------------------- /firstuse.h: -------------------------------------------------------------------------------- 1 | #ifndef FIRSTUSE_H 2 | #define FIRSTUSE_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class FirstUSE; 8 | } 9 | 10 | class FirstUSE : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit FirstUSE(QWidget *parent = 0); 16 | ~FirstUSE(); 17 | 18 | private: 19 | Ui::FirstUSE *ui; 20 | }; 21 | 22 | #endif // FIRSTUSE_H 23 | -------------------------------------------------------------------------------- /inputarg.cpp: -------------------------------------------------------------------------------- 1 | #include "inputarg.h" 2 | #include "ui_inputarg.h" 3 | 4 | InputArg::InputArg(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::InputArg) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | InputArg::~InputArg() 12 | { 13 | delete ui; 14 | } 15 | 16 | void InputArg::on_OK_clicked() 17 | { 18 | emit PWDPassed(); 19 | this->close(); 20 | } 21 | -------------------------------------------------------------------------------- /serial.h: -------------------------------------------------------------------------------- 1 | #ifndef SERIAL_H 2 | #define SERIAL_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class Serial:public QObject 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | Serial(); 14 | bool OpenSerial(QString SerialName,int Baudrate); 15 | 16 | private slots: 17 | void readData(); 18 | 19 | signals: 20 | void SerialData(QString); 21 | }; 22 | 23 | #endif // SERIAL_H 24 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /inputarg.h: -------------------------------------------------------------------------------- 1 | #ifndef INPUTARG_H 2 | #define INPUTARG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class InputArg; 8 | } 9 | 10 | class InputArg : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit InputArg(QWidget *parent = 0); 16 | ~InputArg(); 17 | 18 | private slots: 19 | void on_OK_clicked(); 20 | 21 | private: 22 | Ui::InputArg *ui; 23 | 24 | signals: 25 | void PWDPassed(); 26 | }; 27 | 28 | #endif // INPUTARG_H 29 | -------------------------------------------------------------------------------- /sqlsetup.h: -------------------------------------------------------------------------------- 1 | #ifndef SQLSETUP_H 2 | #define SQLSETUP_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class SqlSetup; 9 | } 10 | 11 | class SqlSetup : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit SqlSetup(QWidget *parent = 0); 17 | ~SqlSetup(); 18 | 19 | private slots: 20 | void on_OK_clicked(); 21 | 22 | void on_Cancel_clicked(); 23 | 24 | private: 25 | Ui::SqlSetup *ui; 26 | SQLUI sqlui; 27 | }; 28 | 29 | #endif // SQLSETUP_H 30 | -------------------------------------------------------------------------------- /inputpwd.h: -------------------------------------------------------------------------------- 1 | #ifndef INPUTPWD_H 2 | #define INPUTPWD_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class InputPWD; 9 | } 10 | 11 | class InputPWD : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit InputPWD(QWidget *parent = 0); 17 | ~InputPWD(); 18 | 19 | signals: 20 | void PWDPassed(); 21 | 22 | private slots: 23 | void on_OK_clicked(); 24 | void on_Cancel_clicked(); 25 | 26 | private: 27 | Ui::InputPWD *ui; 28 | SQLUI sqlui; 29 | }; 30 | 31 | #endif // INPUTPWD_H 32 | -------------------------------------------------------------------------------- /duplicate.h: -------------------------------------------------------------------------------- 1 | #ifndef DUPLICATE_H 2 | #define DUPLICATE_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class Duplicate; 9 | } 10 | 11 | class Duplicate : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit Duplicate(QWidget *parent = 0); 17 | ~Duplicate(); 18 | 19 | private slots: 20 | void on_OK_clicked(); 21 | 22 | void on_Cancel_clicked(); 23 | 24 | private: 25 | Ui::Duplicate *ui; 26 | SQLUI sqlui; 27 | 28 | signals: 29 | void PWDPassed(); 30 | }; 31 | 32 | #endif // DUPLICATE_H 33 | -------------------------------------------------------------------------------- /numbererror.h: -------------------------------------------------------------------------------- 1 | #ifndef NUMBERERROR_H 2 | #define NUMBERERROR_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class NumberError; 9 | } 10 | 11 | class NumberError : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit NumberError(QWidget *parent = 0); 17 | ~NumberError(); 18 | 19 | private slots: 20 | void on_OK_clicked(); 21 | 22 | void on_Cancel_clicked(); 23 | 24 | private: 25 | Ui::NumberError *ui; 26 | SQLUI sqlui; 27 | 28 | signals: 29 | void PWDPassed(); 30 | }; 31 | 32 | #endif // NUMBERERROR_H 33 | -------------------------------------------------------------------------------- /formaterror.h: -------------------------------------------------------------------------------- 1 | #ifndef FORMATERROR_H 2 | #define FORMATERROR_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class FormatError; 9 | } 10 | 11 | class FormatError : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit FormatError(QWidget *parent = 0); 17 | ~FormatError(); 18 | 19 | private slots: 20 | void on_OK_clicked(); 21 | 22 | void on_Cancel_clicked(); 23 | 24 | private: 25 | Ui::FormatError *ui; 26 | SQLUI sqlui; 27 | 28 | 29 | signals: 30 | void PWDPassed(); 31 | }; 32 | 33 | #endif // FORMATERROR_H 34 | -------------------------------------------------------------------------------- /serialsetup.h: -------------------------------------------------------------------------------- 1 | #ifndef SERIALSETUP_H 2 | #define SERIALSETUP_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Ui { 9 | class SerialSetup; 10 | } 11 | 12 | class SerialSetup : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit SerialSetup(QWidget *parent = 0); 18 | ~SerialSetup(); 19 | 20 | private slots: 21 | void GetSerialport(); 22 | void on_OK_clicked(); 23 | 24 | void on_Cancel_clicked(); 25 | 26 | private: 27 | Ui::SerialSetup *ui; 28 | Serial serialport; 29 | }; 30 | 31 | #endif // SERIALSETUP_H 32 | -------------------------------------------------------------------------------- /inputpwd.cpp: -------------------------------------------------------------------------------- 1 | #include "inputpwd.h" 2 | #include "ui_inputpwd.h" 3 | 4 | InputPWD::InputPWD(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::InputPWD) 7 | { 8 | ui->setupUi(this); 9 | ui->PWD->setFocus(); 10 | } 11 | 12 | InputPWD::~InputPWD() 13 | { 14 | delete ui; 15 | } 16 | 17 | void InputPWD::on_OK_clicked() 18 | { 19 | if(sqlui.CheckPWD(ui->PWD->text())) 20 | { 21 | ui->PWD->clear(); 22 | ui->PWDStatus->clear(); 23 | emit PWDPassed(); 24 | this->close(); 25 | }else 26 | { 27 | ui->PWDStatus->setText(tr("密码错误!")); 28 | } 29 | } 30 | 31 | void InputPWD::on_Cancel_clicked() 32 | { 33 | ui->PWD->clear(); 34 | ui->PWDStatus->clear(); 35 | // this->close(); 36 | } 37 | -------------------------------------------------------------------------------- /duplicate.cpp: -------------------------------------------------------------------------------- 1 | #include "duplicate.h" 2 | #include "ui_duplicate.h" 3 | 4 | Duplicate::Duplicate(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::Duplicate) 7 | { 8 | ui->setupUi(this); 9 | ui->PWD->setFocus(); 10 | } 11 | 12 | Duplicate::~Duplicate() 13 | { 14 | delete ui; 15 | } 16 | 17 | void Duplicate::on_OK_clicked() 18 | { 19 | if(sqlui.CheckPWD(ui->PWD->text())) 20 | { 21 | ui->PWD->clear(); 22 | ui->PWDStatus->clear(); 23 | emit PWDPassed(); 24 | this->close(); 25 | }else 26 | { 27 | ui->PWDStatus->setText(tr("密码错误!")); 28 | } 29 | } 30 | 31 | void Duplicate::on_Cancel_clicked() 32 | { 33 | ui->PWD->clear(); 34 | ui->PWDStatus->clear(); 35 | // this->close(); 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Qt-QRcodeSQLite 2 | 上位机接收串口扫描枪数据,然后存储在SQLite数据库中并使用EXcel导出 3 | 4 | Excel 插件使用 http://qtxlsx.debao.me/ 请先安装再使用本源代码 5 | 6 | 概述: 7 | 本软件为串口扫描枪设计,扫描枪通过串口发送条形码或者二维码数据到电脑,上位机接收到数据之后存储到SQLite数据库中并可以通过按钮将显示数据导出为Excel文档,支持数据库查询。 8 | 9 | 扫描枪规格要求: 10 | 串口扫描枪,串口速率限制为9600、57600/115200,但是需要自行安装串口驱动,如果串口速率不能达到要求请联系软件作者修改。 11 | 12 | 运行环境: 13 | WindowsXP~Windows10 的版本。 14 | 15 | 16 | 首次使用: 17 | 请首先插入扫描枪,然后才能打开本软件。 18 | 首次使用请在菜单栏->数据库栏目下初始化数据库才能使用,初始化后管理员用户名Admin,密码123456。 19 | 20 | 注意事项: 21 | 每次使用请首先设置产品名称、前格式、后格式等参数。 22 | 每个错误页面请输入密码关闭,如果强行使用右上角关闭按钮进行强制关闭会出现不接受扫描数据的情况(正常)。 23 | 软件运行中请不要拔出串口连接线,否则会出现串口不能正常接收数据。 24 | 如果串口参数设置里面串口号选项为空,请检查电脑设备管理器,是否有串口设备。 25 | 如果设备管理器中存在串口号,但是通信失败,请检查有没有其他软件占用了串口。 26 | 27 | 软件作者: 28 | Atlas SuChou 29 | -------------------------------------------------------------------------------- /formaterror.cpp: -------------------------------------------------------------------------------- 1 | #include "formaterror.h" 2 | #include "ui_formaterror.h" 3 | 4 | FormatError::FormatError(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::FormatError) 7 | { 8 | ui->setupUi(this); 9 | ui->PWD->setFocus(); 10 | } 11 | 12 | FormatError::~FormatError() 13 | { 14 | delete ui; 15 | } 16 | 17 | void FormatError::on_OK_clicked() 18 | { 19 | if(sqlui.CheckPWD(ui->PWD->text())) 20 | { 21 | ui->PWD->clear(); 22 | ui->PWDStatus->clear(); 23 | emit PWDPassed(); 24 | this->close(); 25 | }else 26 | { 27 | ui->PWDStatus->setText(tr("密码错误!")); 28 | } 29 | } 30 | 31 | void FormatError::on_Cancel_clicked() 32 | { 33 | ui->PWD->clear(); 34 | ui->PWDStatus->clear(); 35 | // this->close(); 36 | } 37 | -------------------------------------------------------------------------------- /numbererror.cpp: -------------------------------------------------------------------------------- 1 | #include "numbererror.h" 2 | #include "ui_numbererror.h" 3 | 4 | NumberError::NumberError(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::NumberError) 7 | { 8 | ui->setupUi(this); 9 | ui->PWD->setFocus(); 10 | } 11 | 12 | NumberError::~NumberError() 13 | { 14 | delete ui; 15 | } 16 | 17 | void NumberError::on_OK_clicked() 18 | { 19 | if(sqlui.CheckPWD(ui->PWD->text())) 20 | { 21 | ui->PWD->clear(); 22 | ui->PWDStatus->clear(); 23 | emit PWDPassed(); 24 | this->close(); 25 | }else 26 | { 27 | ui->PWDStatus->setText(tr("密码错误!")); 28 | } 29 | } 30 | 31 | void NumberError::on_Cancel_clicked() 32 | { 33 | ui->PWD->clear(); 34 | ui->PWDStatus->clear(); 35 | // this->close(); 36 | } 37 | -------------------------------------------------------------------------------- /serial.cpp: -------------------------------------------------------------------------------- 1 | #include "serial.h" 2 | 3 | QSerialPort serial; 4 | int Connum = 0; 5 | Serial::Serial() 6 | { 7 | connect(&serial, SIGNAL(readyRead()), this, SLOT(readData())); 8 | } 9 | 10 | bool Serial::OpenSerial(QString SerialName,int Baudrate) 11 | { 12 | serial.setPortName(SerialName); 13 | serial.setBaudRate(Baudrate); 14 | if(serial.open(QIODevice::ReadWrite)) 15 | { 16 | qDebug() <setupUi(this); 9 | GetSerialport(); 10 | } 11 | 12 | SerialSetup::~SerialSetup() 13 | { 14 | delete ui; 15 | } 16 | 17 | void SerialSetup::GetSerialport() 18 | { 19 | foreach (const QSerialPortInfo &info, QSerialPortInfo::availablePorts()) { 20 | qDebug() << "Name : " << info.portName(); 21 | QSerialPort serial; 22 | serial.setPort(info); 23 | if (serial.open(QIODevice::ReadWrite)) 24 | { 25 | serial.close(); 26 | ui->SerialPort->addItem(info.portName()); 27 | } 28 | } 29 | } 30 | 31 | void SerialSetup::on_OK_clicked() 32 | { 33 | int baud = ui->BaudRate->currentText().toInt(); 34 | bool SerialResault = serialport.OpenSerial(ui->SerialPort->currentText(),baud); 35 | if(SerialResault) 36 | { 37 | this->close(); 38 | }else 39 | { 40 | ui->SerialStatus->setText(tr("串口打开失败,或已经打开!")); 41 | } 42 | } 43 | 44 | void SerialSetup::on_Cancel_clicked() 45 | { 46 | this->close(); 47 | } 48 | -------------------------------------------------------------------------------- /QRcodeSql.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2016-02-28T11:16:14 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui sql axcontainer serialport xlsx 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = QRcodeSql 12 | TEMPLATE = app 13 | 14 | 15 | SOURCES += main.cpp\ 16 | mainwindow.cpp \ 17 | sqlui.cpp \ 18 | duplicate.cpp \ 19 | formaterror.cpp \ 20 | numbererror.cpp \ 21 | sqlsetup.cpp \ 22 | inputpwd.cpp \ 23 | serial.cpp \ 24 | serialsetup.cpp \ 25 | firstuse.cpp \ 26 | help.cpp \ 27 | inputarg.cpp 28 | 29 | HEADERS += mainwindow.h \ 30 | sqlui.h \ 31 | duplicate.h \ 32 | formaterror.h \ 33 | numbererror.h \ 34 | sqlsetup.h \ 35 | inputpwd.h \ 36 | serial.h \ 37 | serialsetup.h \ 38 | firstuse.h \ 39 | help.h \ 40 | inputarg.h 41 | 42 | FORMS += mainwindow.ui \ 43 | sqlui.ui \ 44 | duplicate.ui \ 45 | formaterror.ui \ 46 | numbererror.ui \ 47 | sqlsetup.ui \ 48 | inputpwd.ui \ 49 | serialsetup.ui \ 50 | firstuse.ui \ 51 | help.ui \ 52 | inputarg.ui 53 | 54 | RESOURCES += \ 55 | icontopleft.qrc 56 | 57 | DISTFILES += 58 | 59 | RC_FILE = myapp.rc 60 | -------------------------------------------------------------------------------- /sqlui.h: -------------------------------------------------------------------------------- 1 | #ifndef SQLUI_H 2 | #define SQLUI_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | namespace Ui { 14 | class SQLUI; 15 | } 16 | 17 | class SQLUI : public QWidget 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | explicit SQLUI(QWidget *parent = 0); 23 | ~SQLUI(); 24 | 25 | private: 26 | void SetDBName(QString table); 27 | bool opendatabase(); 28 | 29 | public slots: 30 | bool CreatTable(QString &TableName,QStringList &value); 31 | bool insert(QString &table, QStringList &names,QStringList &values); 32 | bool Updata(QString &table, QStringList &names,QStringList &values, QString &expression); 33 | bool del(QString &table, QString &expression); 34 | void GetValues(QString &table, QStringList &values); 35 | void InitDB(); 36 | bool CheckPWD(QString PWD); 37 | bool CheckRepeat(QString &TableName,QString &column,QString &value); 38 | void QueryAllDataFromOne(QString column,QString &value,QString &value1); 39 | 40 | private slots: 41 | void on_OKPushButton_clicked(); 42 | 43 | private: 44 | Ui::SQLUI *ui; 45 | QSqlTableModel *model; 46 | QSqlDatabase _db; 47 | QString _tableName; 48 | FirstUSE firstuse; 49 | }; 50 | 51 | #endif // SQLUI_H 52 | -------------------------------------------------------------------------------- /mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | namespace Ui { 20 | class MainWindow; 21 | } 22 | 23 | class MainWindow : public QMainWindow 24 | { 25 | Q_OBJECT 26 | 27 | public: 28 | explicit MainWindow(QWidget *parent = 0); 29 | ~MainWindow(); 30 | 31 | private: 32 | Ui::MainWindow *ui; 33 | SQLUI sqlui; 34 | InputPWD inputPWD; 35 | Serial serialPort; 36 | SerialSetup serialsetup; 37 | FormatError formatError; 38 | Duplicate duplicate; 39 | NumberError numberError; 40 | SqlSetup sqlsetup; 41 | Help help; 42 | InputArg inputarg; 43 | 44 | private slots: 45 | void uiToData(); 46 | void PWDPassed_Index(); 47 | void PWDPassed(); 48 | void DisableWidget(); 49 | void on_ChangeButton_clicked(); 50 | void on_Query_clicked(); 51 | void on_Save_clicked(); 52 | void GetSerialData(QString); 53 | void SaveDataToEXL(); 54 | void clearUI(); 55 | void InitStatus(); 56 | void SetStatus(int number,bool status); 57 | void OpenPath(); 58 | }; 59 | 60 | #endif // MAINWINDOW_H 61 | -------------------------------------------------------------------------------- /sqlsetup.cpp: -------------------------------------------------------------------------------- 1 | #include "sqlsetup.h" 2 | #include "ui_sqlsetup.h" 3 | 4 | SqlSetup::SqlSetup(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::SqlSetup) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | SqlSetup::~SqlSetup() 12 | { 13 | delete ui; 14 | } 15 | 16 | void SqlSetup::on_OK_clicked() 17 | { 18 | if(sqlui.CheckPWD(ui->PWD->text())) 19 | { 20 | QString PWD,PWD1; 21 | PWD = ui->NewPWD->text(); 22 | PWD1 = ui->NewPWD1->text(); 23 | if(PWD == PWD1) 24 | { 25 | qDebug() << "ChangePWD"; 26 | QString Table = "USER"; 27 | QString expression = "USER = 'Admin'"; 28 | QStringList name,value; 29 | name<<"PASSWD"; 30 | value<NewPWD->text(); 31 | sqlui.Updata(Table,name,value,expression); 32 | ui->PWD->clear(); 33 | ui->NewPWD->clear(); 34 | ui->NewPWD1->clear(); 35 | ui->PWDStatus->clear(); 36 | this->close(); 37 | }else 38 | { 39 | ui->PWD->clear(); 40 | ui->NewPWD->clear(); 41 | ui->NewPWD1->clear(); 42 | ui->PWDStatus->setText(tr("两次密码不一致!")); 43 | } 44 | }else 45 | { 46 | ui->PWD->clear(); 47 | ui->NewPWD->clear(); 48 | ui->NewPWD1->clear(); 49 | ui->PWDStatus->setText(tr("密码错误!")); 50 | } 51 | } 52 | 53 | void SqlSetup::on_Cancel_clicked() 54 | { 55 | ui->PWD->clear(); 56 | ui->NewPWD->clear(); 57 | ui->NewPWD1->clear(); 58 | ui->PWDStatus->clear(); 59 | } 60 | -------------------------------------------------------------------------------- /inputarg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | InputArg 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | 参数错误 15 | 16 | 17 | 18 | :/new/prefix1/images/LexinSQicon.png:/new/prefix1/images/LexinSQicon.png 19 | 20 | 21 | 22 | 23 | 70 24 | 120 25 | 271 26 | 61 27 | 28 | 29 | 30 | 31 | Adobe Arabic 32 | 20 33 | 75 34 | true 35 | 36 | 37 | 38 | 请输入产品名等参数! 39 | 40 | 41 | 42 | 43 | 44 | 40 45 | 20 46 | 101 47 | 61 48 | 49 | 50 | 51 | 52 | Adobe Arabic 53 | 28 54 | 75 55 | true 56 | 57 | 58 | 59 | 警告: 60 | 61 | 62 | 63 | 64 | 65 | 270 66 | 240 67 | 75 68 | 23 69 | 70 | 71 | 72 | 确定 73 | 74 | 75 | 76 | 77 | 78 | 170 79 | 210 80 | 131 81 | 16 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /inputpwd.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | InputPWD 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | 请输入密码! 15 | 16 | 17 | 18 | :/new/prefix1/images/sqlite.png:/new/prefix1/images/sqlite.png 19 | 20 | 21 | 22 | 23 | 190 24 | 140 25 | 113 26 | 20 27 | 28 | 29 | 30 | QLineEdit::Password 31 | 32 | 33 | 34 | 35 | 36 | 80 37 | 130 38 | 111 39 | 41 40 | 41 | 42 | 43 | 44 | Adobe Arabic 45 | 10 46 | 47 | 48 | 49 | 请输入管理员密码: 50 | 51 | 52 | 53 | 54 | 55 | 30 56 | 30 57 | 171 58 | 61 59 | 60 | 61 | 62 | 63 | Adobe Arabic 64 | 28 65 | 75 66 | true 67 | 68 | 69 | 70 | 输入密码: 71 | 72 | 73 | 74 | 75 | 76 | 170 77 | 250 78 | 75 79 | 23 80 | 81 | 82 | 83 | 确定 84 | 85 | 86 | 87 | 88 | 89 | 270 90 | 250 91 | 75 92 | 23 93 | 94 | 95 | 96 | 清空 97 | 98 | 99 | 100 | 101 | 102 | 170 103 | 210 104 | 131 105 | 16 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 180 116 | 0 117 | 221 118 | 20 119 | 120 | 121 | 122 | 请勿擅自关闭此窗口,否则会出现问题! 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /serialsetup.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | SerialSetup 4 | 5 | 6 | 7 | 0 8 | 0 9 | 303 10 | 300 11 | 12 | 13 | 14 | 串口设置 15 | 16 | 17 | 18 | :/new/prefix1/images/Serial.JPG:/new/prefix1/images/Serial.JPG 19 | 20 | 21 | 22 | 23 | 90 24 | 100 25 | 54 26 | 21 27 | 28 | 29 | 30 | 串口号: 31 | 32 | 33 | 34 | 35 | 36 | 90 37 | 140 38 | 54 39 | 21 40 | 41 | 42 | 43 | 波特率: 44 | 45 | 46 | 47 | 48 | 49 | 140 50 | 100 51 | 69 52 | 22 53 | 54 | 55 | 56 | 57 | 58 | 59 | 140 60 | 140 61 | 69 62 | 22 63 | 64 | 65 | 66 | 67 | 9600 68 | 69 | 70 | 71 | 72 | 57600 73 | 74 | 75 | 76 | 77 | 115200 78 | 79 | 80 | 81 | 82 | 83 | 84 | 10 85 | 20 86 | 191 87 | 31 88 | 89 | 90 | 91 | 92 | Adobe Arabic 93 | 20 94 | 95 | 96 | 97 | 串口参数设置: 98 | 99 | 100 | 101 | 102 | 103 | 90 104 | 170 105 | 201 106 | 16 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 200 117 | 250 118 | 75 119 | 23 120 | 121 | 122 | 123 | 取消 124 | 125 | 126 | 127 | 128 | 129 | 100 130 | 250 131 | 75 132 | 23 133 | 134 | 135 | 136 | 确定 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /firstuse.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | FirstUSE 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | 欢迎使用! 15 | 16 | 17 | 18 | :/Desktop/LexinSQicon.png:/Desktop/LexinSQicon.png 19 | 20 | 21 | 22 | 23 | 30 24 | 240 25 | 341 26 | 32 27 | 28 | 29 | 30 | Qt::Horizontal 31 | 32 | 33 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 34 | 35 | 36 | 37 | 38 | 39 | 20 40 | 10 41 | 91 42 | 51 43 | 44 | 45 | 46 | 47 | Adobe Arabic 48 | 20 49 | 75 50 | true 51 | 52 | 53 | 54 | 提示: 55 | 56 | 57 | 58 | 59 | 60 | 60 61 | 80 62 | 256 63 | 131 64 | 65 | 66 | 67 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 68 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 69 | p, li { white-space: pre-wrap; } 70 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 71 | <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:18pt;">欢迎使用本软件!</span></p> 72 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">这是您第一次使用本软件,请首先在菜单栏数据库中初始化数据库,然后设修改管理员密码,默认原始密码为123456.</span></p></body></html> 73 | 74 | 75 | 76 | 77 | 78 | 79 | buttonBox 80 | accepted() 81 | FirstUSE 82 | accept() 83 | 84 | 85 | 248 86 | 254 87 | 88 | 89 | 157 90 | 274 91 | 92 | 93 | 94 | 95 | buttonBox 96 | rejected() 97 | FirstUSE 98 | reject() 99 | 100 | 101 | 316 102 | 260 103 | 104 | 105 | 286 106 | 274 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /duplicate.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Duplicate 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | 二维码重复! 15 | 16 | 17 | 18 | :/new/prefix1/images/LexinSQicon.png:/new/prefix1/images/LexinSQicon.png 19 | 20 | 21 | 22 | 23 | 120 24 | 100 25 | 161 26 | 61 27 | 28 | 29 | 30 | 31 | Adobe Arabic 32 | 20 33 | 75 34 | true 35 | 36 | 37 | 38 | 二维码重复! 39 | 40 | 41 | 42 | 43 | 44 | 40 45 | 40 46 | 101 47 | 61 48 | 49 | 50 | 51 | 52 | Adobe Arabic 53 | 28 54 | 75 55 | true 56 | 57 | 58 | 59 | 警告: 60 | 61 | 62 | 63 | 64 | 65 | 90 66 | 160 67 | 111 68 | 41 69 | 70 | 71 | 72 | 73 | Adobe Arabic 74 | 10 75 | 76 | 77 | 78 | 请输入管理员密码: 79 | 80 | 81 | 82 | 83 | 84 | 200 85 | 170 86 | 113 87 | 20 88 | 89 | 90 | 91 | QLineEdit::Password 92 | 93 | 94 | 95 | 96 | 97 | 170 98 | 250 99 | 75 100 | 23 101 | 102 | 103 | 104 | 确定 105 | 106 | 107 | 108 | 109 | 110 | 170 111 | 210 112 | 131 113 | 16 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 270 124 | 250 125 | 75 126 | 23 127 | 128 | 129 | 130 | 清空 131 | 132 | 133 | 134 | 135 | 136 | 180 137 | 0 138 | 221 139 | 20 140 | 141 | 142 | 143 | 请勿擅自关闭此窗口,否则会出现问题! 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /formaterror.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | FormatError 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | 二维码格式错误! 15 | 16 | 17 | 18 | :/new/prefix1/images/sqlite.png:/new/prefix1/images/sqlite.png 19 | 20 | 21 | 22 | 23 | 90 24 | 100 25 | 231 26 | 61 27 | 28 | 29 | 30 | 31 | Adobe Arabic 32 | 20 33 | 75 34 | true 35 | 36 | 37 | 38 | 二维码格式错误! 39 | 40 | 41 | 42 | 43 | 44 | 40 45 | 40 46 | 101 47 | 61 48 | 49 | 50 | 51 | 52 | Adobe Arabic 53 | 28 54 | 75 55 | true 56 | 57 | 58 | 59 | 警告: 60 | 61 | 62 | 63 | 64 | 65 | 90 66 | 160 67 | 111 68 | 41 69 | 70 | 71 | 72 | 73 | Adobe Arabic 74 | 10 75 | 76 | 77 | 78 | 请输入管理员密码: 79 | 80 | 81 | 82 | 83 | 84 | 200 85 | 170 86 | 113 87 | 20 88 | 89 | 90 | 91 | QLineEdit::Password 92 | 93 | 94 | 95 | 96 | 97 | 170 98 | 210 99 | 131 100 | 16 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 270 111 | 250 112 | 75 113 | 23 114 | 115 | 116 | 117 | 清空 118 | 119 | 120 | 121 | 122 | 123 | 170 124 | 250 125 | 75 126 | 23 127 | 128 | 129 | 130 | 确定 131 | 132 | 133 | 134 | 135 | 136 | 180 137 | 0 138 | 221 139 | 20 140 | 141 | 142 | 143 | 请勿擅自关闭此窗口,否则会出现问题! 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /numbererror.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | NumberError 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | 二维码位数错误 15 | 16 | 17 | 18 | :/new/prefix1/images/sqlite.png:/new/prefix1/images/sqlite.png 19 | 20 | 21 | 22 | 23 | 90 24 | 100 25 | 231 26 | 61 27 | 28 | 29 | 30 | 31 | Adobe Arabic 32 | 20 33 | 75 34 | true 35 | 36 | 37 | 38 | 二维码位数错误! 39 | 40 | 41 | 42 | 43 | 44 | 40 45 | 40 46 | 101 47 | 61 48 | 49 | 50 | 51 | 52 | Adobe Arabic 53 | 28 54 | 75 55 | true 56 | 57 | 58 | 59 | 警告: 60 | 61 | 62 | 63 | 64 | 65 | 90 66 | 160 67 | 111 68 | 41 69 | 70 | 71 | 72 | 73 | Adobe Arabic 74 | 10 75 | 76 | 77 | 78 | 请输入管理员密码: 79 | 80 | 81 | 82 | 83 | 84 | 200 85 | 170 86 | 113 87 | 20 88 | 89 | 90 | 91 | QLineEdit::Password 92 | 93 | 94 | 95 | 96 | 97 | 270 98 | 250 99 | 75 100 | 23 101 | 102 | 103 | 104 | 清空 105 | 106 | 107 | 108 | 109 | 110 | 170 111 | 210 112 | 131 113 | 16 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 170 124 | 250 125 | 75 126 | 23 127 | 128 | 129 | 130 | 确定 131 | 132 | 133 | 134 | 135 | 136 | 180 137 | 0 138 | 221 139 | 20 140 | 141 | 142 | 143 | 请勿擅自关闭此窗口,否则会出现问题! 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /sqlsetup.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | SqlSetup 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | 更改管理员密码 15 | 16 | 17 | 18 | :/new/prefix1/images/sqlite.png:/new/prefix1/images/sqlite.png 19 | 20 | 21 | 22 | 23 | 10 24 | 20 25 | 211 26 | 41 27 | 28 | 29 | 30 | 31 | Adobe Arabic 32 | 20 33 | 75 34 | true 35 | 36 | 37 | 38 | 更改管理员密码: 39 | 40 | 41 | 42 | 43 | 44 | 90 45 | 90 46 | 61 47 | 21 48 | 49 | 50 | 51 | 原始密码: 52 | 53 | 54 | 55 | 56 | 57 | 90 58 | 120 59 | 61 60 | 21 61 | 62 | 63 | 64 | 新密码: 65 | 66 | 67 | 68 | 69 | 70 | 90 71 | 150 72 | 61 73 | 21 74 | 75 | 76 | 77 | 再次输入: 78 | 79 | 80 | 81 | 82 | 83 | 150 84 | 90 85 | 141 86 | 20 87 | 88 | 89 | 90 | QLineEdit::Password 91 | 92 | 93 | 94 | 95 | 96 | 150 97 | 120 98 | 141 99 | 20 100 | 101 | 102 | 103 | QLineEdit::Password 104 | 105 | 106 | 107 | 108 | 109 | 150 110 | 150 111 | 141 112 | 20 113 | 114 | 115 | 116 | QLineEdit::Password 117 | 118 | 119 | 120 | 121 | 122 | 170 123 | 250 124 | 75 125 | 23 126 | 127 | 128 | 129 | 确定 130 | 131 | 132 | 133 | 134 | 135 | 270 136 | 250 137 | 75 138 | 23 139 | 140 | 141 | 142 | 取消 143 | 144 | 145 | 146 | 147 | 148 | 170 149 | 210 150 | 131 151 | 16 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /sqlui.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | SQLUI 4 | 5 | 6 | 7 | 0 8 | 0 9 | 798 10 | 660 11 | 12 | 13 | 14 | 数据查询 15 | 16 | 17 | 18 | :/new/prefix1/images/sqlite.png:/new/prefix1/images/sqlite.png 19 | 20 | 21 | 22 | 23 | 10 24 | 10 25 | 261 26 | 51 27 | 28 | 29 | 30 | 31 | Adobe Arabic 32 | 28 33 | 75 34 | true 35 | 36 | 37 | 38 | 历史数据查询: 39 | 40 | 41 | 42 | 43 | 44 | 0 45 | 50 46 | 791 47 | 61 48 | 49 | 50 | 51 | 52 | 53 | 10 54 | 20 55 | 81 56 | 31 57 | 58 | 59 | 60 | 61 | Adobe Arabic 62 | 16 63 | 64 | 65 | 66 | 二维码 67 | 68 | 69 | 70 | 71 | 72 | 260 73 | 20 74 | 61 75 | 31 76 | 77 | 78 | 79 | 80 | Adobe Arabic 81 | 16 82 | 83 | 84 | 85 | 框号 86 | 87 | 88 | 89 | 90 | 91 | 410 92 | 20 93 | 51 94 | 31 95 | 96 | 97 | 98 | 时间 99 | 100 | 101 | 102 | 103 | 104 | 680 105 | 20 106 | 111 107 | 31 108 | 109 | 110 | 111 | 112 | Adobe Arabic 113 | 16 114 | 115 | 116 | 117 | 确定 118 | 119 | 120 | 121 | 122 | 123 | 460 124 | 20 125 | 91 126 | 31 127 | 128 | 129 | 130 | 131 | 132 | 133 | 580 134 | 20 135 | 91 136 | 31 137 | 138 | 139 | 140 | 141 | 142 | 143 | 560 144 | 20 145 | 21 146 | 31 147 | 148 | 149 | 150 | 151 | Adobe Arabic 152 | 20 153 | 75 154 | true 155 | 156 | 157 | 158 | ~ 159 | 160 | 161 | 162 | 163 | 164 | 100 165 | 20 166 | 151 167 | 31 168 | 169 | 170 | 171 | 172 | 173 | 174 | 320 175 | 20 176 | 81 177 | 31 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 10 186 | 110 187 | 780 188 | 540 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /help.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Help 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 603 11 | 12 | 13 | 14 | 帮助 15 | 16 | 17 | 18 | :/new/prefix1/images/LexinSQicon.png:/new/prefix1/images/LexinSQicon.png 19 | 20 | 21 | 22 | 23 | 230 24 | 560 25 | 161 26 | 32 27 | 28 | 29 | 30 | Qt::Horizontal 31 | 32 | 33 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 34 | 35 | 36 | 37 | 38 | 39 | 10 40 | 40 41 | 371 42 | 511 43 | 44 | 45 | 46 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 47 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 48 | p, li { white-space: pre-wrap; } 49 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 50 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">概述:</span></p> 51 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 本软件为串口扫描枪设计,扫描枪通过串口发送条形码或者二维码数据到电脑,上位机接收到数据之后存储到SQLite数据库中并可以通过按钮将显示数据导出为Excel文档,支持数据库查询。</p> 52 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p> 53 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">扫描枪规格要求:</span></p> 54 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 串口扫描枪,串口速率限制为9600、57600/115200,但是需要自行安装串口驱动,如果串口速率不能达到要求请联系软件作者修改。</p> 55 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 56 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">运行环境:</span></p> 57 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> WindowsXP~Windows10 的版本。</p> 58 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 59 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 60 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">首次使用:</span></p> 61 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 首次使用请在菜单栏-&gt;数据库栏目下初始化数据库才能使用,初始化后管理员用户名Admin,密码123456。</p> 62 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> 63 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">注意事项:</span></p> 64 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 每次使用请首先设置产品名称、前格式、后格式等参数。</p> 65 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 每个错误页面请输入密码关闭,如果强行使用右上角关闭按钮进行强制关闭会出现不接受扫描数据的情况(正常)。</p> 66 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 软件运行中请不要拔出串口连接线,否则会出现串口不能正常接收数据。</p> 67 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 如果串口参数设置里面串口号选项为空,请检查电脑设备管理器,是否有串口设备。</p> 68 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 如果设备管理器中存在串口号,但是通信失败,请检查有没有其他软件占用了串口。</p> 69 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p> 70 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">软件作者:</span></p> 71 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 南通乐芯智能设备 秦飞</p> 72 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 地址:江苏省南通市南通大学科技园3#204</p> 73 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 电话:15262755701</p> 74 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> QQ:496341272</p> 75 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 邮箱:iqinfei@163.com</p></body></html> 76 | 77 | 78 | 79 | 80 | 81 | 10 82 | 5 83 | 131 84 | 41 85 | 86 | 87 | 88 | 89 | Adobe Arabic 90 | 20 91 | 92 | 93 | 94 | 帮助信息: 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | buttonBox 104 | accepted() 105 | Help 106 | accept() 107 | 108 | 109 | 248 110 | 254 111 | 112 | 113 | 157 114 | 274 115 | 116 | 117 | 118 | 119 | buttonBox 120 | rejected() 121 | Help 122 | reject() 123 | 124 | 125 | 316 126 | 260 127 | 128 | 129 | 286 130 | 274 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | #include 4 | #include 5 | 6 | QList ProductNumber; 7 | QList QRcode; 8 | QList Status; 9 | bool changeInfoFlag = false; 10 | QXlsx::Document xlsx; 11 | QString ProductTime[32]; 12 | QString FilePath = "C:/Users/Administrator/Documents/QREXLFile/"; 13 | bool StopFlag = false; 14 | 15 | MainWindow::MainWindow(QWidget *parent) : 16 | QMainWindow(parent), 17 | ui(new Ui::MainWindow) 18 | { 19 | ui->setupUi(this); 20 | QDir dir; 21 | bool exist = dir.exists(FilePath); 22 | if(!exist) 23 | { 24 | dir.mkpath(FilePath); 25 | } 26 | connect(&inputPWD,SIGNAL(PWDPassed()),this,SLOT(PWDPassed_Index())); 27 | connect(&duplicate,SIGNAL(PWDPassed()),this,SLOT(PWDPassed())); 28 | connect(&formatError,SIGNAL(PWDPassed()),this,SLOT(PWDPassed())); 29 | connect(&numberError,SIGNAL(PWDPassed()),this,SLOT(PWDPassed())); 30 | connect(ui->action,SIGNAL(triggered()),&sqlsetup,SLOT(show())); 31 | connect(ui->action_5,SIGNAL(triggered()),&serialsetup,SLOT(show())); 32 | connect(ui->action_excel,SIGNAL(triggered()),this,SLOT(OpenPath())); 33 | connect(ui->action_2,SIGNAL(triggered()),&sqlui,SLOT(InitDB())); 34 | connect(ui->action_7,SIGNAL(triggered()),&sqlui,SLOT(show())); 35 | connect(ui->action_10,SIGNAL(triggered()),&help,SLOT(show())); 36 | connect(&serialPort,SIGNAL(SerialData(QString)),this,SLOT(GetSerialData(QString))); 37 | uiToData(); 38 | DisableWidget(); 39 | InitStatus(); 40 | ui->ProductName->setPlaceholderText(tr("请设置产品名称")); 41 | } 42 | 43 | MainWindow::~MainWindow() 44 | { 45 | delete ui; 46 | } 47 | 48 | void MainWindow::PWDPassed_Index() 49 | { 50 | ui->ProductName->setDisabled(false); 51 | ui->HeadData->setDisabled(false); 52 | ui->TailData->setDisabled(false); 53 | ui->ChangeButton->setText(tr("确定")); 54 | ui->ChangeButton->setFont(QFont("Adobe Arabic",20)); 55 | StopFlag = true; 56 | } 57 | 58 | void MainWindow::PWDPassed() 59 | { 60 | StopFlag = true; 61 | } 62 | 63 | void MainWindow::DisableWidget() 64 | { 65 | ui->ProductName->setDisabled(true); 66 | ui->HeadData->setDisabled(true); 67 | ui->TailData->setDisabled(true); 68 | ui->ChangeButton->setText(tr("修改")); 69 | ui->ChangeButton->setFont(QFont("Adobe Arabic",20)); 70 | } 71 | 72 | void MainWindow::on_ChangeButton_clicked() 73 | { 74 | if(changeInfoFlag) 75 | { 76 | DisableWidget(); 77 | changeInfoFlag = false; 78 | } 79 | else 80 | { 81 | StopFlag = true; 82 | inputPWD.show(); 83 | changeInfoFlag = true; 84 | } 85 | } 86 | 87 | void MainWindow::on_Query_clicked() 88 | { 89 | sqlui.show(); 90 | } 91 | 92 | void MainWindow::on_Save_clicked() 93 | { 94 | SaveDataToEXL(); 95 | clearUI(); 96 | } 97 | 98 | void MainWindow::GetSerialData(QString data) 99 | { 100 | QString Arg1,Arg2,Arg3,Arg4; 101 | bool Arg; 102 | Arg1 = ui->ProductName->text(); 103 | Arg2 = ui->BoxNumber->text(); 104 | Arg3 = ui->HeadData->text(); 105 | Arg4 = ui->TailData->text(); 106 | if(Arg1 != NULL) 107 | { 108 | if(Arg2 != NULL) 109 | { 110 | if(Arg3 != NULL) 111 | { 112 | if(Arg4 != NULL) 113 | { 114 | Arg = true; 115 | } 116 | else Arg = false; 117 | } 118 | else Arg = false; 119 | } 120 | else Arg = false; 121 | } 122 | else Arg = false; 123 | data = data.trimmed(); 124 | //去除字符串最后\r\n如果出问题请更改 125 | 126 | QString TableName = "QRCODE"; 127 | QString column = "QRCode"; 128 | QDateTime current_date_time = QDateTime::currentDateTime(); 129 | QString current_date = current_date_time.toString("yyyyMMddhhmmss"); 130 | QStringList DataToSQL,QRKEY; 131 | QRKEY<<"time"<<"ProductName"<<"BoxNumber"<<"QRCode"<<"Status"; 132 | 133 | //正则表达式,验证data的合法性 134 | QRegExp rx("^"+ui->HeadData->text()+".*"+ui->TailData->text()+"$"); 135 | //Check Data format 136 | rx.setPatternSyntax(QRegExp::RegExp); 137 | bool match = rx.exactMatch(data); 138 | 139 | //这里开始验证重码,如果有重复返回true 140 | bool repeat = sqlui.CheckRepeat(TableName,column,data); 141 | 142 | if(Arg) 143 | { 144 | if(StopFlag) 145 | { 146 | if(!repeat) 147 | { 148 | if(match) 149 | { 150 | for(int i = 0;i<32;i++) 151 | { 152 | if(QRcode[i]->text() == NULL) 153 | { 154 | QRcode[i]->setText(data); 155 | ProductTime[i] = current_date; 156 | QRcode[i]->setFont(QFont("Adobe Arabic",20)); 157 | SetStatus(i,true); 158 | QRcode[i]->setDisabled(true); 159 | DataToSQL<ProductName->text()<BoxNumber->text()<BoxNumber->text()+".xlsx"; 188 | 189 | for(int i = 0;i<33;i++) 190 | { 191 | if(i == 0) 192 | { 193 | xlsx.write(1,1,tr("时间")); 194 | xlsx.write(1,2,tr("产品名称")); 195 | xlsx.write(1,3,tr("产品箱号")); 196 | xlsx.write(1,4,tr("产品二维码")); 197 | xlsx.write(1,5,tr("产品状态")); 198 | }else 199 | { 200 | if(QRcode[i-1]->text() != NULL) 201 | { 202 | xlsx.write(i+1,1,ProductTime[i-1]); 203 | xlsx.write(i+1,2,ui->ProductName->text()); 204 | xlsx.write(i+1,3,ui->BoxNumber->text()); 205 | xlsx.write(i+1,4,QRcode[i-1]->text()); 206 | xlsx.write(i+1,5,Status[i-1]->text()); 207 | } 208 | else 209 | { 210 | xlsx.saveAs(FileName); 211 | break; 212 | } 213 | } 214 | } 215 | xlsx.saveAs(FileName); 216 | } 217 | 218 | void MainWindow::clearUI() 219 | { 220 | for(int i = 0;i<32;i++) 221 | { 222 | SetStatus(i,false); 223 | ProductTime[i] = ""; 224 | QRcode[i]->setDisabled(false); 225 | QRcode[i]->clear(); 226 | } 227 | } 228 | 229 | void MainWindow::uiToData() 230 | { 231 | ProductNumber<Number_1<Number_2<Number_3<Number_4<Number_5\ 232 | <Number_6<Number_7<Number_8<Number_9<Number_10\ 233 | <Number_11<Number_12<Number_13<Number_14<Number_15\ 234 | <Number_16<Number_17<Number_18<Number_19<Number_20\ 235 | <Number_21<Number_22<Number_23<Number_24<Number_25\ 236 | <Number_26<Number_27<Number_28<Number_29<Number_30\ 237 | <Number_31<Number_32; 238 | QRcode<QRcode_1<QRcode_2<QRcode_3<QRcode_4<QRcode_5<QRcode_6\ 239 | <QRcode_7<QRcode_8<QRcode_9<QRcode_10<QRcode_11<QRcode_12\ 240 | <QRcode_13<QRcode_14<QRcode_15<QRcode_16<QRcode_17<QRcode_18\ 241 | <QRcode_19<QRcode_20<QRcode_21<QRcode_22<QRcode_23<QRcode_24\ 242 | <QRcode_25<QRcode_26<QRcode_27<QRcode_28<QRcode_29<QRcode_30\ 243 | <QRcode_31<QRcode_32; 244 | Status<Status_1<Status_2<Status_3<Status_4<Status_5<Status_6<Status_7\ 245 | <Status_8<Status_9<Status_10<Status_11<Status_12<Status_13<Status_14\ 246 | <Status_15<Status_16<Status_17<Status_18<Status_19<Status_20\ 247 | <Status_21<Status_22<Status_23<Status_24<Status_25<Status_26\ 248 | <Status_27<Status_28<Status_29<Status_30<Status_31<Status_32; 249 | } 250 | 251 | void MainWindow::InitStatus() 252 | { 253 | for(int i = 0;i<32;i++) 254 | { 255 | SetStatus(i,false); 256 | } 257 | } 258 | 259 | void MainWindow::SetStatus(int number,bool status) 260 | { 261 | QPalette pe; 262 | if(status) 263 | { 264 | pe.setColor(QPalette::WindowText,Qt::green); 265 | Status[number]->setText("OK"); 266 | Status[number]->setFont(QFont("Adobe Arabic",20)); 267 | Status[number]->setPalette(pe); 268 | }else 269 | { 270 | pe.setColor(QPalette::WindowText,Qt::red); 271 | Status[number]->setText("NG"); 272 | Status[number]->setFont(QFont("Adobe Arabic",20)); 273 | Status[number]->setPalette(pe); 274 | } 275 | } 276 | 277 | void MainWindow::OpenPath() 278 | { 279 | QDesktopServices::openUrl(QUrl(FilePath, QUrl::TolerantMode)); 280 | } 281 | -------------------------------------------------------------------------------- /sqlui.cpp: -------------------------------------------------------------------------------- 1 | #include "sqlui.h" 2 | #include "ui_sqlui.h" 3 | 4 | SQLUI::SQLUI(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::SQLUI) 7 | { 8 | ui->setupUi(this); 9 | ui->tableWidget->setColumnWidth(2,200); 10 | ui->tableWidget->setColumnWidth(4,270); 11 | ui->QRcodeButton->setChecked(true); 12 | ui->OKPushButton->setFocus(); 13 | 14 | QDateTime current_date_time = QDateTime::currentDateTime(); 15 | ui->StartTime->setDateTime(current_date_time); 16 | ui->EndTime->setDateTime(current_date_time); 17 | SetDBName("LexinSmart"); 18 | opendatabase(); 19 | } 20 | 21 | SQLUI::~SQLUI() 22 | { 23 | _db.close(); 24 | delete ui; 25 | } 26 | 27 | void SQLUI::SetDBName(QString table) 28 | { 29 | _tableName = table + ".db"; 30 | } 31 | 32 | /* 33 | 打开数据库. 34 | */ 35 | bool SQLUI::opendatabase() 36 | { 37 | if(QSqlDatabase::contains("qt_sql_default_connection")) 38 | _db = QSqlDatabase::database("qt_sql_default_connection"); 39 | else 40 | _db = QSqlDatabase::addDatabase("QSQLITE"); 41 | 42 | _db.setDatabaseName(_tableName); 43 | return _db.open(); 44 | } 45 | 46 | bool SQLUI::CreatTable(QString &TableName,QStringList &value) 47 | { 48 | QSqlQuery query(QSqlDatabase::database()); 49 | QString sql = QString("create table ") + TableName + QString("("); 50 | int i; 51 | for (i=0; i < value.size(); i++) 52 | { 53 | if(i == 0) 54 | { 55 | sql = sql + value.value(i)+" varchar PRIMARY KEY"; 56 | if (i != value.size() - 1) 57 | { 58 | sql+=QString(","); 59 | } 60 | else 61 | { 62 | sql = sql + QString(")"); 63 | } 64 | }else 65 | { 66 | sql = sql + value.value(i); 67 | if (i != value.size() - 1) 68 | { 69 | sql+=QString(","); 70 | } 71 | else 72 | { 73 | sql = sql + QString(")"); 74 | } 75 | } 76 | } 77 | if (query.exec(sql)) 78 | { 79 | return true; 80 | } 81 | else 82 | { 83 | firstuse.show(); 84 | return false; 85 | } 86 | } 87 | 88 | /* 89 | 插入函数. 90 | 构造SQL插入语句. 91 | */ 92 | bool SQLUI::insert(QString &table, QStringList &names, QStringList &values) 93 | { 94 | if (names.size() != values.size()) 95 | { 96 | return false; 97 | } 98 | 99 | QSqlQuery query(QSqlDatabase::database()); 100 | QString sql = QString("insert into ") + table + QString("("); 101 | 102 | int i; 103 | 104 | for (i=0; i < names.size(); i++) 105 | { 106 | sql = sql + names.value(i); 107 | if (i != names.size() - 1) 108 | { 109 | sql+=QString(","); 110 | } 111 | else 112 | { 113 | sql = sql + QString(")"); 114 | } 115 | } 116 | 117 | sql = sql + QString(" values("); 118 | 119 | for (i = 0; i < values.size(); i++) 120 | { 121 | sql = sql + QString("'") + values.value(i) + QString("'"); 122 | if (i != values.size()-1) 123 | { 124 | sql = sql + QString(","); 125 | } 126 | } 127 | 128 | sql = sql + QString(")"); 129 | 130 | if (query.exec(sql)) 131 | { 132 | return true; 133 | } 134 | else 135 | { 136 | firstuse.show(); 137 | return false; 138 | } 139 | } 140 | 141 | /* 142 | 修改函数. 143 | 构造SQL修改语句. 144 | */ 145 | bool SQLUI::Updata(QString &table, QStringList &names, QStringList &values, QString &expression) 146 | { 147 | if (names.size() != values.size()) 148 | { 149 | return false; 150 | } 151 | 152 | //UPDATE 表名称 SET 列名称 = 新值 WHERE 列名称 = 某值 153 | QSqlQuery query(QSqlDatabase::database()); 154 | QString sql = QString("update ")+table+QString(" set "); 155 | for (int i = 0; i < names.size(); i++) 156 | { 157 | sql = sql + names.value(i); 158 | sql = sql + QString(" = '"); 159 | sql = sql + values.value(i); 160 | sql = sql + QString("'"); 161 | if (i != names.size()-1) 162 | { 163 | sql = sql + QString(" ,"); 164 | } 165 | } 166 | 167 | sql = sql + QString(" where ") + expression; 168 | if (query.exec(sql)) 169 | { 170 | return true; 171 | } 172 | else 173 | { 174 | return false; 175 | } 176 | } 177 | 178 | /* 179 | 删除函数. 180 | 构造SQL删除语句. 181 | */ 182 | bool SQLUI::del(QString &table, QString &expression) 183 | { 184 | //DELETE FROM 表名称 WHERE 列名称 = 值 185 | QSqlQuery query(QSqlDatabase::database()); 186 | QString sql = QString("delete from ") + table + QString(" where ") + expression; 187 | 188 | if (query.exec(sql)) 189 | { 190 | return true; 191 | } 192 | else 193 | { 194 | return false; 195 | } 196 | } 197 | 198 | void SQLUI::QueryAllDataFromOne(QString column,QString &value,QString &value1) 199 | { 200 | QString sql; 201 | QSqlQuery query(QSqlDatabase::database()); 202 | if(value1 == NULL) 203 | { 204 | sql = QString("select ProductName,BoxNumber,QRCode,Status,time from QRCODE where "\ 205 | +column+" = '"+value+"'"); 206 | }else 207 | { 208 | sql = QString("select ProductName,BoxNumber,QRCode,Status,time from QRCODE where "\ 209 | +column+" > '"+value+"' and "+column+" < '"+value1+"'"); 210 | } 211 | 212 | //清空上次表格残留内容 213 | ui->tableWidget->setRowCount(0); 214 | ui->tableWidget->clearContents(); 215 | 216 | //开始查询 217 | bool queryResult = query.exec(sql); 218 | //设置5列 219 | ui->tableWidget->setColumnCount(5); 220 | 221 | if(queryResult) 222 | { 223 | int row = 0; 224 | while (query.next()) 225 | { 226 | ui->tableWidget->insertRow(row);//添加新行 227 | ui->tableWidget->setItem( row, 0, new QTableWidgetItem( query.value(0).toString())); 228 | ui->tableWidget->setItem( row, 1, new QTableWidgetItem( query.value(1).toString())); 229 | ui->tableWidget->setItem( row, 2, new QTableWidgetItem( query.value(2).toString())); 230 | ui->tableWidget->setItem( row, 3, new QTableWidgetItem( query.value(3).toString())); 231 | ui->tableWidget->setItem( row, 4, new QTableWidgetItem( query.value(4).toString())); 232 | row++; 233 | } 234 | row = 0; 235 | QStringList Headers; 236 | //自动适应宽度不太好看,通过设置标题宽度间接设置最小宽度 237 | Headers<tableWidget->setHorizontalHeaderLabels(Headers); 241 | 242 | //设置表头背景色 243 | ui->tableWidget->horizontalHeader()\ 244 | ->setStyleSheet("QHeaderView::section{background:skyblue;}"); 245 | 246 | //设置每次选择为选定一行 247 | ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); 248 | 249 | //设置充满表宽度 250 | ui->tableWidget->horizontalHeader()->setStretchLastSection(true); 251 | 252 | ui->tableWidget->resizeColumnsToContents(); 253 | 254 | //设置表头字体加粗 255 | QFont font = ui->tableWidget->horizontalHeader()->font(); 256 | font.setBold(true); 257 | ui->tableWidget->horizontalHeader()->setFont(font); 258 | } 259 | else 260 | { 261 | firstuse.show(); 262 | } 263 | } 264 | 265 | void SQLUI::GetValues(QString &table, QStringList &values) 266 | { 267 | QSqlQuery query(QSqlDatabase::database()); 268 | QString sql = QString("select * from ") + table; 269 | if(query.exec(sql)) 270 | { 271 | while (query.next()) 272 | { 273 | values << query.value(0).toString(); 274 | } 275 | }else 276 | { 277 | firstuse.show(); 278 | } 279 | } 280 | 281 | bool SQLUI::CheckRepeat(QString &TableName,QString &column,QString &value) 282 | { 283 | QSqlQuery query(QSqlDatabase::database()); 284 | QString sql = QString("select "+column+" from "+TableName+" where "+column+" = '"+value+"'"); 285 | qDebug() << sql; 286 | if(query.exec(sql)) 287 | { 288 | if(query.next()) 289 | { 290 | return true; 291 | } 292 | } 293 | return false; 294 | } 295 | 296 | bool SQLUI::CheckPWD(QString PWD) 297 | { 298 | QString pwd; 299 | QSqlQuery query(QSqlDatabase::database()); 300 | if(query.exec("select PASSWD from USER where USER='Admin'")) 301 | { 302 | while(query.next()) 303 | { 304 | pwd = query.value(0).toString(); 305 | qDebug() << pwd; 306 | } 307 | if(pwd == PWD) 308 | { 309 | qDebug() << "OK"; 310 | return true; 311 | }else 312 | { 313 | qDebug() << "Fail"; 314 | return false; 315 | } 316 | }else 317 | { 318 | firstuse.show(); 319 | return false; 320 | } 321 | } 322 | 323 | void SQLUI::InitDB() 324 | { 325 | QStringList QRKEY,ADKEY,ADVALUE; 326 | QString QRTable = "QRCODE"; 327 | QString AdminTable = "USER"; 328 | 329 | QRKEY<<"time"<<"ProductName"<<"BoxNumber"<<"QRCode"<<"Status"; 330 | ADKEY<<"USER"<<"PASSWD"; 331 | ADVALUE<<"Admin"<<"123456"; 332 | 333 | QString username = "Admin"; 334 | bool repeat = CheckRepeat(AdminTable,AdminTable,username); 335 | if(!repeat) 336 | { 337 | SetDBName("LexinSmart"); 338 | opendatabase(); 339 | 340 | CreatTable(QRTable,QRKEY); 341 | CreatTable(AdminTable,ADKEY); 342 | 343 | insert(AdminTable,ADKEY,ADVALUE); 344 | qDebug() << "InitSQL"; 345 | }else 346 | qDebug() << "DB Already Initialed..."; 347 | } 348 | 349 | void SQLUI::on_OKPushButton_clicked() 350 | { 351 | QString column,value,StartTime,EndTime,null; 352 | null = ""; 353 | if(ui->QRcodeButton->isChecked()) 354 | { 355 | column = "QRCode"; 356 | value = ui->QRText->text(); 357 | QueryAllDataFromOne(column,value,null); 358 | }else if(ui->BoxNumButton->isChecked()) 359 | { 360 | column = "BoxNumber"; 361 | value = ui->Boxtext->text(); 362 | QueryAllDataFromOne(column,value,null); 363 | }else if(ui->TimeButton->isChecked()) 364 | { 365 | column = "time"; 366 | 367 | QDate Start = ui->StartTime->date(); 368 | QDate End = ui->EndTime->date(); 369 | StartTime = Start.toString("yyyyMMdd"); 370 | EndTime = End.toString("yyyyMMdd"); 371 | 372 | StartTime = StartTime+"000000"; 373 | EndTime = EndTime+"000000"; 374 | 375 | if(EndTime >= StartTime) 376 | { 377 | QueryAllDataFromOne(column,StartTime,EndTime); 378 | } 379 | } 380 | } 381 | -------------------------------------------------------------------------------- /mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1200 10 | 660 11 | 12 | 13 | 14 | 二维码记录器-LexinSmart 15 | 16 | 17 | 18 | :/new/prefix1/images/LexinSQicon.png:/new/prefix1/images/LexinSQicon.png 19 | 20 | 21 | 22 | 23 | 24 | 0 25 | 0 26 | 1191 27 | 51 28 | 29 | 30 | 31 | 32 | 33 | 10 34 | 5 35 | 121 36 | 51 37 | 38 | 39 | 40 | 41 | Adobe Arabic 42 | 20 43 | 44 | 45 | 46 | 产品名称: 47 | 48 | 49 | 50 | 51 | 52 | 340 53 | 10 54 | 71 55 | 41 56 | 57 | 58 | 59 | 60 | Adobe Arabic 61 | 20 62 | 63 | 64 | 65 | 箱号: 66 | 67 | 68 | 69 | 70 | 71 | 540 72 | 10 73 | 101 74 | 41 75 | 76 | 77 | 78 | 79 | Adobe Arabic 80 | 20 81 | 82 | 83 | 84 | 前格式: 85 | 86 | 87 | 88 | 89 | 90 | 760 91 | 10 92 | 101 93 | 41 94 | 95 | 96 | 97 | 98 | Adobe Arabic 99 | 20 100 | 101 | 102 | 103 | 后格式: 104 | 105 | 106 | 107 | 108 | 109 | 980 110 | 10 111 | 151 112 | 41 113 | 114 | 115 | 116 | 117 | Adobe Arabic 118 | 20 119 | 120 | 121 | 122 | 修改 123 | 124 | 125 | 126 | 127 | 128 | 130 129 | 10 130 | 201 131 | 41 132 | 133 | 134 | 135 | 136 | 137 | 138 | 410 139 | 10 140 | 121 141 | 41 142 | 143 | 144 | 145 | 146 | 147 | 148 | 640 149 | 10 150 | 113 151 | 41 152 | 153 | 154 | 155 | 156 | 157 | 158 | 860 159 | 10 160 | 113 161 | 41 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 0 170 | 60 171 | 1191 172 | 571 173 | 174 | 175 | 176 | 177 | 178 | 10 179 | 20 180 | 41 181 | 41 182 | 183 | 184 | 185 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 186 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 187 | p, li { white-space: pre-wrap; } 188 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 189 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">1</span></p></body></html> 190 | 191 | 192 | 193 | 194 | 195 | 350 196 | 20 197 | 41 198 | 41 199 | 200 | 201 | 202 | 203 | Adobe Arabic 204 | 20 205 | 75 206 | true 207 | 208 | 209 | 210 | NG 211 | 212 | 213 | 214 | 215 | 216 | 10 217 | 70 218 | 41 219 | 41 220 | 221 | 222 | 223 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 224 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 225 | p, li { white-space: pre-wrap; } 226 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 227 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">2</span></p></body></html> 228 | 229 | 230 | 231 | 232 | 233 | 10 234 | 120 235 | 41 236 | 41 237 | 238 | 239 | 240 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 241 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 242 | p, li { white-space: pre-wrap; } 243 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 244 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">3</span></p></body></html> 245 | 246 | 247 | 248 | 249 | 250 | 10 251 | 270 252 | 41 253 | 41 254 | 255 | 256 | 257 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 258 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 259 | p, li { white-space: pre-wrap; } 260 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 261 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">6</span></p></body></html> 262 | 263 | 264 | 265 | 266 | 267 | 10 268 | 220 269 | 41 270 | 41 271 | 272 | 273 | 274 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 275 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 276 | p, li { white-space: pre-wrap; } 277 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 278 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">5</span></p></body></html> 279 | 280 | 281 | 282 | 283 | 284 | 10 285 | 170 286 | 41 287 | 41 288 | 289 | 290 | 291 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 292 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 293 | p, li { white-space: pre-wrap; } 294 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 295 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">4</span></p></body></html> 296 | 297 | 298 | 299 | 300 | 301 | 10 302 | 420 303 | 41 304 | 41 305 | 306 | 307 | 308 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 309 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 310 | p, li { white-space: pre-wrap; } 311 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 312 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">9</span></p></body></html> 313 | 314 | 315 | 316 | 317 | 318 | 10 319 | 370 320 | 41 321 | 41 322 | 323 | 324 | 325 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 326 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 327 | p, li { white-space: pre-wrap; } 328 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 329 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">8</span></p></body></html> 330 | 331 | 332 | 333 | 334 | 335 | 10 336 | 320 337 | 41 338 | 41 339 | 340 | 341 | 342 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 343 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 344 | p, li { white-space: pre-wrap; } 345 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 346 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">7</span></p></body></html> 347 | 348 | 349 | 350 | 351 | 352 | 10 353 | 520 354 | 41 355 | 41 356 | 357 | 358 | 359 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 360 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 361 | p, li { white-space: pre-wrap; } 362 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 363 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">11</span></p></body></html> 364 | 365 | 366 | 367 | 368 | 369 | 10 370 | 470 371 | 41 372 | 41 373 | 374 | 375 | 376 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 377 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 378 | p, li { white-space: pre-wrap; } 379 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 380 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">10</span></p></body></html> 381 | 382 | 383 | 384 | 385 | 386 | 350 387 | 70 388 | 41 389 | 41 390 | 391 | 392 | 393 | 394 | Adobe Arabic 395 | 20 396 | 75 397 | true 398 | 399 | 400 | 401 | NG 402 | 403 | 404 | 405 | 406 | 407 | 350 408 | 120 409 | 41 410 | 41 411 | 412 | 413 | 414 | 415 | Adobe Arabic 416 | 20 417 | 75 418 | true 419 | 420 | 421 | 422 | NG 423 | 424 | 425 | 426 | 427 | 428 | 350 429 | 270 430 | 41 431 | 41 432 | 433 | 434 | 435 | 436 | Adobe Arabic 437 | 20 438 | 75 439 | true 440 | 441 | 442 | 443 | NG 444 | 445 | 446 | 447 | 448 | 449 | 350 450 | 170 451 | 41 452 | 41 453 | 454 | 455 | 456 | 457 | Adobe Arabic 458 | 20 459 | 75 460 | true 461 | 462 | 463 | 464 | NG 465 | 466 | 467 | 468 | 469 | 470 | 350 471 | 220 472 | 41 473 | 41 474 | 475 | 476 | 477 | 478 | Adobe Arabic 479 | 20 480 | 75 481 | true 482 | 483 | 484 | 485 | NG 486 | 487 | 488 | 489 | 490 | 491 | 350 492 | 420 493 | 41 494 | 41 495 | 496 | 497 | 498 | 499 | Adobe Arabic 500 | 20 501 | 75 502 | true 503 | 504 | 505 | 506 | NG 507 | 508 | 509 | 510 | 511 | 512 | 350 513 | 320 514 | 41 515 | 41 516 | 517 | 518 | 519 | 520 | Adobe Arabic 521 | 20 522 | 75 523 | true 524 | 525 | 526 | 527 | NG 528 | 529 | 530 | 531 | 532 | 533 | 350 534 | 370 535 | 41 536 | 41 537 | 538 | 539 | 540 | 541 | Adobe Arabic 542 | 20 543 | 75 544 | true 545 | 546 | 547 | 548 | NG 549 | 550 | 551 | 552 | 553 | 554 | 350 555 | 470 556 | 41 557 | 41 558 | 559 | 560 | 561 | 562 | Adobe Arabic 563 | 20 564 | 75 565 | true 566 | 567 | 568 | 569 | NG 570 | 571 | 572 | 573 | 574 | 575 | 350 576 | 520 577 | 41 578 | 41 579 | 580 | 581 | 582 | 583 | Adobe Arabic 584 | 20 585 | 75 586 | true 587 | 588 | 589 | 590 | NG 591 | 592 | 593 | 594 | 595 | 596 | 400 597 | 170 598 | 41 599 | 41 600 | 601 | 602 | 603 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 604 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 605 | p, li { white-space: pre-wrap; } 606 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 607 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">15</span></p></body></html> 608 | 609 | 610 | 611 | 612 | 613 | 400 614 | 320 615 | 41 616 | 41 617 | 618 | 619 | 620 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 621 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 622 | p, li { white-space: pre-wrap; } 623 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 624 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">18</span></p></body></html> 625 | 626 | 627 | 628 | 629 | 630 | 400 631 | 220 632 | 41 633 | 41 634 | 635 | 636 | 637 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 638 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 639 | p, li { white-space: pre-wrap; } 640 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 641 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">16</span></p></body></html> 642 | 643 | 644 | 645 | 646 | 647 | 740 648 | 220 649 | 41 650 | 41 651 | 652 | 653 | 654 | 655 | Adobe Arabic 656 | 20 657 | 75 658 | true 659 | 660 | 661 | 662 | NG 663 | 664 | 665 | 666 | 667 | 668 | 400 669 | 520 670 | 41 671 | 41 672 | 673 | 674 | 675 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 676 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 677 | p, li { white-space: pre-wrap; } 678 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 679 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">22</span></p></body></html> 680 | 681 | 682 | 683 | 684 | 685 | 740 686 | 120 687 | 41 688 | 41 689 | 690 | 691 | 692 | 693 | Adobe Arabic 694 | 20 695 | 75 696 | true 697 | 698 | 699 | 700 | NG 701 | 702 | 703 | 704 | 705 | 706 | 740 707 | 320 708 | 41 709 | 41 710 | 711 | 712 | 713 | 714 | Adobe Arabic 715 | 20 716 | 75 717 | true 718 | 719 | 720 | 721 | NG 722 | 723 | 724 | 725 | 726 | 727 | 740 728 | 370 729 | 41 730 | 41 731 | 732 | 733 | 734 | 735 | Adobe Arabic 736 | 20 737 | 75 738 | true 739 | 740 | 741 | 742 | NG 743 | 744 | 745 | 746 | 747 | 748 | 740 749 | 420 750 | 41 751 | 41 752 | 753 | 754 | 755 | 756 | Adobe Arabic 757 | 20 758 | 75 759 | true 760 | 761 | 762 | 763 | NG 764 | 765 | 766 | 767 | 768 | 769 | 400 770 | 20 771 | 41 772 | 41 773 | 774 | 775 | 776 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 777 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 778 | p, li { white-space: pre-wrap; } 779 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 780 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">12</span></p></body></html> 781 | 782 | 783 | 784 | 785 | 786 | 400 787 | 370 788 | 41 789 | 41 790 | 791 | 792 | 793 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 794 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 795 | p, li { white-space: pre-wrap; } 796 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 797 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">19</span></p></body></html> 798 | 799 | 800 | 801 | 802 | 803 | 400 804 | 120 805 | 41 806 | 41 807 | 808 | 809 | 810 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 811 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 812 | p, li { white-space: pre-wrap; } 813 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 814 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">14</span></p></body></html> 815 | 816 | 817 | 818 | 819 | 820 | 400 821 | 270 822 | 41 823 | 41 824 | 825 | 826 | 827 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 828 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 829 | p, li { white-space: pre-wrap; } 830 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 831 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">17</span></p></body></html> 832 | 833 | 834 | 835 | 836 | 837 | 400 838 | 420 839 | 41 840 | 41 841 | 842 | 843 | 844 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 845 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 846 | p, li { white-space: pre-wrap; } 847 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 848 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">20</span></p></body></html> 849 | 850 | 851 | 852 | 853 | 854 | 740 855 | 520 856 | 41 857 | 41 858 | 859 | 860 | 861 | 862 | Adobe Arabic 863 | 20 864 | 75 865 | true 866 | 867 | 868 | 869 | NG 870 | 871 | 872 | 873 | 874 | 875 | 400 876 | 470 877 | 41 878 | 41 879 | 880 | 881 | 882 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 883 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 884 | p, li { white-space: pre-wrap; } 885 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 886 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">21</span></p></body></html> 887 | 888 | 889 | 890 | 891 | 892 | 740 893 | 170 894 | 41 895 | 41 896 | 897 | 898 | 899 | 900 | Adobe Arabic 901 | 20 902 | 75 903 | true 904 | 905 | 906 | 907 | NG 908 | 909 | 910 | 911 | 912 | 913 | 740 914 | 270 915 | 41 916 | 41 917 | 918 | 919 | 920 | 921 | Adobe Arabic 922 | 20 923 | 75 924 | true 925 | 926 | 927 | 928 | NG 929 | 930 | 931 | 932 | 933 | 934 | 740 935 | 470 936 | 41 937 | 41 938 | 939 | 940 | 941 | 942 | Adobe Arabic 943 | 20 944 | 75 945 | true 946 | 947 | 948 | 949 | NG 950 | 951 | 952 | 953 | 954 | 955 | 740 956 | 70 957 | 41 958 | 41 959 | 960 | 961 | 962 | 963 | Adobe Arabic 964 | 20 965 | 75 966 | true 967 | 968 | 969 | 970 | NG 971 | 972 | 973 | 974 | 975 | 976 | 400 977 | 70 978 | 41 979 | 41 980 | 981 | 982 | 983 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 984 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 985 | p, li { white-space: pre-wrap; } 986 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 987 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">13</span></p></body></html> 988 | 989 | 990 | 991 | 992 | 993 | 740 994 | 20 995 | 41 996 | 41 997 | 998 | 999 | 1000 | 1001 | Adobe Arabic 1002 | 20 1003 | 75 1004 | true 1005 | 1006 | 1007 | 1008 | NG 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 800 1015 | 170 1016 | 41 1017 | 41 1018 | 1019 | 1020 | 1021 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1022 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1023 | p, li { white-space: pre-wrap; } 1024 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1025 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">26</span></p></body></html> 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 800 1032 | 320 1033 | 41 1034 | 41 1035 | 1036 | 1037 | 1038 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1039 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1040 | p, li { white-space: pre-wrap; } 1041 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1042 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">29</span></p></body></html> 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 800 1049 | 220 1050 | 41 1051 | 41 1052 | 1053 | 1054 | 1055 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1056 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1057 | p, li { white-space: pre-wrap; } 1058 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1059 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">27</span></p></body></html> 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1140 1066 | 220 1067 | 41 1068 | 41 1069 | 1070 | 1071 | 1072 | 1073 | Adobe Arabic 1074 | 20 1075 | 75 1076 | true 1077 | 1078 | 1079 | 1080 | NG 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1140 1087 | 120 1088 | 41 1089 | 41 1090 | 1091 | 1092 | 1093 | 1094 | Adobe Arabic 1095 | 20 1096 | 75 1097 | true 1098 | 1099 | 1100 | 1101 | NG 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1140 1108 | 320 1109 | 41 1110 | 41 1111 | 1112 | 1113 | 1114 | 1115 | Adobe Arabic 1116 | 20 1117 | 75 1118 | true 1119 | 1120 | 1121 | 1122 | NG 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1140 1129 | 370 1130 | 41 1131 | 41 1132 | 1133 | 1134 | 1135 | 1136 | Adobe Arabic 1137 | 20 1138 | 75 1139 | true 1140 | 1141 | 1142 | 1143 | NG 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1140 1150 | 420 1151 | 41 1152 | 41 1153 | 1154 | 1155 | 1156 | 1157 | Adobe Arabic 1158 | 20 1159 | 75 1160 | true 1161 | 1162 | 1163 | 1164 | NG 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 800 1171 | 20 1172 | 41 1173 | 41 1174 | 1175 | 1176 | 1177 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1178 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1179 | p, li { white-space: pre-wrap; } 1180 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1181 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">23</span></p></body></html> 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 800 1188 | 370 1189 | 41 1190 | 41 1191 | 1192 | 1193 | 1194 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1195 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1196 | p, li { white-space: pre-wrap; } 1197 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1198 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">30</span></p></body></html> 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 800 1205 | 120 1206 | 41 1207 | 41 1208 | 1209 | 1210 | 1211 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1212 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1213 | p, li { white-space: pre-wrap; } 1214 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1215 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">25</span></p></body></html> 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 800 1222 | 270 1223 | 41 1224 | 41 1225 | 1226 | 1227 | 1228 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1229 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1230 | p, li { white-space: pre-wrap; } 1231 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1232 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">28</span></p></body></html> 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 800 1239 | 420 1240 | 41 1241 | 41 1242 | 1243 | 1244 | 1245 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1246 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1247 | p, li { white-space: pre-wrap; } 1248 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1249 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">31</span></p></body></html> 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 800 1256 | 470 1257 | 41 1258 | 41 1259 | 1260 | 1261 | 1262 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1263 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1264 | p, li { white-space: pre-wrap; } 1265 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1266 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">32</span></p></body></html> 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1140 1273 | 170 1274 | 41 1275 | 41 1276 | 1277 | 1278 | 1279 | 1280 | Adobe Arabic 1281 | 20 1282 | 75 1283 | true 1284 | 1285 | 1286 | 1287 | NG 1288 | 1289 | 1290 | 1291 | 1292 | 1293 | 1140 1294 | 270 1295 | 41 1296 | 41 1297 | 1298 | 1299 | 1300 | 1301 | Adobe Arabic 1302 | 20 1303 | 75 1304 | true 1305 | 1306 | 1307 | 1308 | NG 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1140 1315 | 470 1316 | 41 1317 | 41 1318 | 1319 | 1320 | 1321 | 1322 | Adobe Arabic 1323 | 20 1324 | 75 1325 | true 1326 | 1327 | 1328 | 1329 | NG 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1140 1336 | 70 1337 | 41 1338 | 41 1339 | 1340 | 1341 | 1342 | 1343 | Adobe Arabic 1344 | 20 1345 | 75 1346 | true 1347 | 1348 | 1349 | 1350 | NG 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 800 1357 | 70 1358 | 41 1359 | 41 1360 | 1361 | 1362 | 1363 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1364 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1365 | p, li { white-space: pre-wrap; } 1366 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 1367 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">24</span></p></body></html> 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1140 1374 | 20 1375 | 41 1376 | 41 1377 | 1378 | 1379 | 1380 | 1381 | Adobe Arabic 1382 | 20 1383 | 75 1384 | true 1385 | 1386 | 1387 | 1388 | NG 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1000 1395 | 520 1396 | 171 1397 | 51 1398 | 1399 | 1400 | 1401 | 1402 | Adobe Arabic 1403 | 20 1404 | 1405 | 1406 | 1407 | 打包保存 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 800 1414 | 520 1415 | 171 1416 | 51 1417 | 1418 | 1419 | 1420 | 1421 | Adobe Arabic 1422 | 20 1423 | 1424 | 1425 | 1426 | 数据查询 1427 | 1428 | 1429 | 1430 | 1431 | 1432 | 60 1433 | 20 1434 | 281 1435 | 41 1436 | 1437 | 1438 | 1439 | 1440 | 1441 | 1442 | 60 1443 | 70 1444 | 281 1445 | 41 1446 | 1447 | 1448 | 1449 | 1450 | 1451 | 1452 | 60 1453 | 120 1454 | 281 1455 | 41 1456 | 1457 | 1458 | 1459 | 1460 | 1461 | 1462 | 60 1463 | 170 1464 | 281 1465 | 41 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 60 1473 | 220 1474 | 281 1475 | 41 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 60 1483 | 270 1484 | 281 1485 | 41 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 60 1493 | 320 1494 | 281 1495 | 41 1496 | 1497 | 1498 | 1499 | 1500 | 1501 | 1502 | 60 1503 | 370 1504 | 281 1505 | 41 1506 | 1507 | 1508 | 1509 | 1510 | 1511 | 1512 | 60 1513 | 420 1514 | 281 1515 | 41 1516 | 1517 | 1518 | 1519 | 1520 | 1521 | 1522 | 60 1523 | 470 1524 | 281 1525 | 41 1526 | 1527 | 1528 | 1529 | 1530 | 1531 | 1532 | 60 1533 | 520 1534 | 281 1535 | 41 1536 | 1537 | 1538 | 1539 | 1540 | 1541 | 1542 | 450 1543 | 20 1544 | 281 1545 | 41 1546 | 1547 | 1548 | 1549 | 1550 | 1551 | 1552 | 450 1553 | 70 1554 | 281 1555 | 41 1556 | 1557 | 1558 | 1559 | 1560 | 1561 | 1562 | 450 1563 | 120 1564 | 281 1565 | 41 1566 | 1567 | 1568 | 1569 | 1570 | 1571 | 1572 | 450 1573 | 170 1574 | 281 1575 | 41 1576 | 1577 | 1578 | 1579 | 1580 | 1581 | 1582 | 450 1583 | 220 1584 | 281 1585 | 41 1586 | 1587 | 1588 | 1589 | 1590 | 1591 | 1592 | 450 1593 | 270 1594 | 281 1595 | 41 1596 | 1597 | 1598 | 1599 | 1600 | 1601 | 1602 | 450 1603 | 320 1604 | 281 1605 | 41 1606 | 1607 | 1608 | 1609 | 1610 | 1611 | 1612 | 450 1613 | 370 1614 | 281 1615 | 41 1616 | 1617 | 1618 | 1619 | 1620 | 1621 | 1622 | 450 1623 | 420 1624 | 281 1625 | 41 1626 | 1627 | 1628 | 1629 | 1630 | 1631 | 1632 | 450 1633 | 470 1634 | 281 1635 | 41 1636 | 1637 | 1638 | 1639 | 1640 | 1641 | 1642 | 450 1643 | 520 1644 | 281 1645 | 41 1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 850 1653 | 20 1654 | 281 1655 | 41 1656 | 1657 | 1658 | 1659 | 1660 | 1661 | 1662 | 850 1663 | 70 1664 | 281 1665 | 41 1666 | 1667 | 1668 | 1669 | 1670 | 1671 | 1672 | 850 1673 | 120 1674 | 281 1675 | 41 1676 | 1677 | 1678 | 1679 | 1680 | 1681 | 1682 | 850 1683 | 170 1684 | 281 1685 | 41 1686 | 1687 | 1688 | 1689 | 1690 | 1691 | 1692 | 850 1693 | 220 1694 | 281 1695 | 41 1696 | 1697 | 1698 | 1699 | 1700 | 1701 | 1702 | 850 1703 | 270 1704 | 281 1705 | 41 1706 | 1707 | 1708 | 1709 | 1710 | 1711 | 1712 | 850 1713 | 320 1714 | 281 1715 | 41 1716 | 1717 | 1718 | 1719 | 1720 | 1721 | 1722 | 850 1723 | 370 1724 | 281 1725 | 41 1726 | 1727 | 1728 | 1729 | 1730 | 1731 | 1732 | 850 1733 | 420 1734 | 281 1735 | 41 1736 | 1737 | 1738 | 1739 | 1740 | 1741 | 1742 | 850 1743 | 470 1744 | 281 1745 | 41 1746 | 1747 | 1748 | 1749 | 1750 | 1751 | 1752 | 1753 | 1754 | 0 1755 | 0 1756 | 1200 1757 | 23 1758 | 1759 | 1760 | 1761 | 1762 | 文件 1763 | 1764 | 1765 | 1766 | 1767 | 1768 | 数据库 1769 | 1770 | 1771 | 1772 | 1773 | 1774 | 1775 | 1776 | 帮助 1777 | 1778 | 1779 | 1780 | 1781 | 1782 | 串口 1783 | 1784 | 1785 | 1786 | 1787 | 1788 | 1789 | 1790 | 1791 | 1792 | 1793 | 串口号 1794 | 1795 | 1796 | 1797 | 1798 | 波特率 1799 | 1800 | 1801 | 1802 | 1803 | 串口参数设置 1804 | 1805 | 1806 | 1807 | 1808 | 关闭串口 1809 | 1810 | 1811 | 1812 | 1813 | 打开excel目录 1814 | 1815 | 1816 | 1817 | 1818 | 退出 1819 | 1820 | 1821 | 1822 | 1823 | 数据库初始化 1824 | 1825 | 1826 | 1827 | 1828 | 数据查询 1829 | 1830 | 1831 | 1832 | 1833 | 备份数据库 1834 | 1835 | 1836 | 1837 | 1838 | 清空数据库 1839 | 1840 | 1841 | 1842 | 1843 | 帮助文档 1844 | 1845 | 1846 | 1847 | 1848 | 关于 1849 | 1850 | 1851 | 1852 | 1853 | 更改管理员密码 1854 | 1855 | 1856 | 1857 | 1858 | 1859 | 1860 | 1861 | 1862 | 1863 | --------------------------------------------------------------------------------