Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
takeout_sbk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yunpeng.song
takeout_sbk
Commits
5565ea3f
Commit
5565ea3f
authored
May 31, 2018
by
yunpeng.song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改成msvc版本
parent
c3ce0fa4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
79 changed files
with
164 additions
and
98 deletions
+164
-98
fmTakeaway/Control/flowControl.cpp
+0
-0
fmTakeaway/DTools/clickedLineEdit.cpp
+1
-1
fmTakeaway/DTools/clickedLineEdit.h
+1
-1
fmTakeaway/DTools/dataManger.cpp
+1
-1
fmTakeaway/DTools/dataManger.h
+1
-1
fmTakeaway/DTools/dump.h
+56
-0
fmTakeaway/DTools/headframe.cpp
+1
-1
fmTakeaway/DTools/headframe.h
+1
-1
fmTakeaway/DTools/sysTray.h
+1
-1
fmTakeaway/DTools/util.cpp
+1
-1
fmTakeaway/DTools/util.h
+1
-1
fmTakeaway/JQLibrary/JQLibrary.pri
+2
-2
fmTakeaway/JQLibrary/include/JQHttpServer.h
+3
-3
fmTakeaway/JQLibrary/src/JQHttpServer.cpp
+4
-1
fmTakeaway/JQLibrary/src/JQNet.cpp
+8
-8
fmTakeaway/Model/baseObject.cpp
+2
-2
fmTakeaway/Model/baseObject.h
+1
-1
fmTakeaway/Model/cashierObject.cpp
+1
-1
fmTakeaway/Model/cashierObject.h
+1
-1
fmTakeaway/Model/dailyObject.cpp
+1
-1
fmTakeaway/Model/dailyObject.h
+1
-1
fmTakeaway/Model/deliverObject.cpp
+1
-1
fmTakeaway/Model/deliverObject.h
+1
-1
fmTakeaway/Model/dishesObject.cpp
+1
-1
fmTakeaway/Model/dishesObject.h
+1
-1
fmTakeaway/Model/orderObject.cpp
+1
-1
fmTakeaway/Model/productObject.cpp
+1
-1
fmTakeaway/Model/productObject.h
+1
-1
fmTakeaway/Network/billSocket.cpp
+1
-1
fmTakeaway/Network/billSocket.h
+1
-1
fmTakeaway/QsLog/QsLog.pri
+1
-1
fmTakeaway/RejectForm.cpp
+1
-1
fmTakeaway/RejectForm.h
+1
-1
fmTakeaway/RejectForm.ui
+1
-1
fmTakeaway/alertForm.cpp
+1
-1
fmTakeaway/alertForm.h
+1
-1
fmTakeaway/alertForm.ui
+1
-1
fmTakeaway/bstatusForm.cpp
+1
-1
fmTakeaway/bstatusForm.h
+1
-1
fmTakeaway/bstatusForm.ui
+1
-1
fmTakeaway/bstatusItem.cpp
+1
-1
fmTakeaway/bstatusItem.h
+1
-1
fmTakeaway/bstatusItem.ui
+1
-1
fmTakeaway/dailyreportForm.cpp
+1
-1
fmTakeaway/dailyreportForm.h
+1
-1
fmTakeaway/dailyreportForm.ui
+1
-1
fmTakeaway/detailForm.cpp
+3
-3
fmTakeaway/detailForm.h
+1
-1
fmTakeaway/detailForm.ui
+1
-1
fmTakeaway/disTabWdg.cpp
+1
-1
fmTakeaway/disTabWdg.h
+1
-1
fmTakeaway/disTabWdg.ui
+1
-1
fmTakeaway/dishesForm.cpp
+1
-1
fmTakeaway/dishesForm.h
+1
-1
fmTakeaway/dishesForm.ui
+1
-1
fmTakeaway/dishesItem.cpp
+1
-1
fmTakeaway/dishesItem.h
+1
-1
fmTakeaway/dishesItem.ui
+1
-1
fmTakeaway/floatForm.h
+1
-1
fmTakeaway/floatForm.ui
+1
-1
fmTakeaway/fmTakeaway.pro
+5
-1
fmTakeaway/main.cpp
+5
-2
fmTakeaway/mainForm.cpp
+3
-3
fmTakeaway/mainForm.h
+1
-1
fmTakeaway/mainForm.ui
+1
-1
fmTakeaway/padForm.cpp
+1
-1
fmTakeaway/padForm.h
+1
-1
fmTakeaway/padForm.ui
+1
-1
fmTakeaway/pickForm.cpp
+1
-1
fmTakeaway/pickForm.h
+1
-1
fmTakeaway/pickForm.ui
+1
-1
fmTakeaway/refdishesForm.cpp
+1
-1
fmTakeaway/refdishesForm.h
+1
-1
fmTakeaway/refdishesForm.ui
+1
-1
fmTakeaway/refuseForm.cpp
+6
-6
fmTakeaway/refuseForm.h
+1
-1
fmTakeaway/refuseForm.ui
+1
-1
fmTakeaway/settingForm.h
+1
-1
fmTakeaway/settingForm.ui
+1
-1
No files found.
fmTakeaway/Control/flowControl.cpp
View file @
5565ea3f
This diff is collapsed.
Click to expand it.
fmTakeaway/DTools/clickedLineEdit.cpp
View file @
5565ea3f
#include "ClickedLineEdit.h"
#
include
"ClickedLineEdit.h"
fmTakeaway/DTools/clickedLineEdit.h
View file @
5565ea3f
#ifndef CLICKEDLINEEDIT_H
#
ifndef
CLICKEDLINEEDIT_H
#define CLICKEDLINEEDIT_H
#include <QMouseEvent>
...
...
fmTakeaway/DTools/dataManger.cpp
View file @
5565ea3f
#include "dataManger.h"
#
include
"dataManger.h"
#include "preDefine.h"
#include <QJsonArray>
...
...
fmTakeaway/DTools/dataManger.h
View file @
5565ea3f
#ifndef DATAMANGER_H
#
ifndef
DATAMANGER_H
#define DATAMANGER_H
#include <QJsonObject>
...
...
fmTakeaway/DTools/dump.h
0 → 100644
View file @
5565ea3f
#
ifndef
FM_DUMP_H
#define FM_DUMP_H
#include <windows.h>
#include <DbgHelp.h>
#include <schannel.h>
void
CreateMiniDump
(
char
*
file
,
EXCEPTION_POINTERS
*
pep
)
{
// Open the file
HANDLE
hFile
=
CreateFileA
(
file
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
(
hFile
!=
NULL
)
&&
(
hFile
!=
INVALID_HANDLE_VALUE
)
)
{
// Create the minidump
BOOL
rv
=
0
;
MINIDUMP_EXCEPTION_INFORMATION
mdei
;
MINIDUMP_TYPE
mdt
;
mdei
.
ThreadId
=
GetCurrentThreadId
();
mdei
.
ExceptionPointers
=
pep
;
mdei
.
ClientPointers
=
TRUE
;
mdt
=
MiniDumpWithFullMemory
;
rv
=
MiniDumpWriteDump
(
GetCurrentProcess
(),
GetCurrentProcessId
(),
hFile
,
mdt
,
(
pep
!=
0
)
?
&
mdei
:
0
,
0
,
0
);
// Close the file
CloseHandle
(
hFile
);
}
}
long
__stdcall
FMExcpHandler
(
PEXCEPTION_POINTERS
excp
)
{
char
mod
[
MAX_PATH
]
=
{
0
};
FILE
*
ferr
=
NULL
;
GetModuleFileNameA
(
NULL
,
mod
,
MAX_PATH
);
strcat
(
mod
,
".err"
);
ferr
=
fopen
(
mod
,
"w"
);
fprintf
(
ferr
,
"Error address %x
\n
"
,
excp
->
ExceptionRecord
->
ExceptionAddress
);
fprintf
(
ferr
,
"CPU register:
\n
"
);
fprintf
(
ferr
,
"eax %x ebx %x ecx %x edx %x
\n
"
,
excp
->
ContextRecord
->
Eax
,
excp
->
ContextRecord
->
Ebx
,
excp
->
ContextRecord
->
Ecx
,
excp
->
ContextRecord
->
Edx
);
fclose
(
ferr
);
strcat
(
mod
,
".dmp"
);
CreateMiniDump
(
mod
,
excp
);
return
EXCEPTION_EXECUTE_HANDLER
;
}
#endif // DUMP
fmTakeaway/DTools/headframe.cpp
View file @
5565ea3f
#include "headframe.h"
#
include
"headframe.h"
void
HeadFrame
::
mouseMoveEvent
(
QMouseEvent
*
event
)
{
...
...
fmTakeaway/DTools/headframe.h
View file @
5565ea3f
#ifndef HEADFRAME_H
#
ifndef
HEADFRAME_H
#define HEADFRAME_H
#include <QMouseEvent>
#include <QFrame>
...
...
fmTakeaway/DTools/sysTray.h
View file @
5565ea3f
#ifndef SYSTRAY_H
#
ifndef
SYSTRAY_H
#define SYSTRAY_H
#include <QSystemTrayIcon>
...
...
fmTakeaway/DTools/util.cpp
View file @
5565ea3f
#include "util.h"
#
include
"util.h"
#include "preDefine.h"
QString
Penny2Dollar
(
int
penny
)
...
...
fmTakeaway/DTools/util.h
View file @
5565ea3f
#ifndef UTIL_H
#
ifndef
UTIL_H
#define UTIL_H
#include <QString>
...
...
fmTakeaway/JQLibrary/JQLibrary.pri
View file @
5565ea3f
...
...
@@ -15,9 +15,9 @@
# http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
#
QT
*
= core gui
QT
+
= core gui
CONFIG
*
= c++11
CONFIG
+
= c++11
INCLUDEPATH *= \
$$PWD/include/
...
...
fmTakeaway/JQLibrary/include/JQHttpServer.h
View file @
5565ea3f
...
...
@@ -100,12 +100,12 @@ private:
QString
requestCrlf_
;
QMap
<
QString
,
QString
>
headersData_
;
bool
headerAcceptedFinish_
=
false
;
bool
alreadyReply_
=
false
;
bool
headerAcceptedFinish_
;
bool
alreadyReply_
;
QByteArray
requestRawData_
;
qint64
waitWrittenByteCount_
=
0
;
qint64
waitWrittenByteCount_
;
QSharedPointer
<
QIODevice
>
ioDeviceForReply_
;
};
...
...
fmTakeaway/JQLibrary/src/JQHttpServer.cpp
View file @
5565ea3f
...
...
@@ -67,7 +67,10 @@ static QString replyImageFormat(
// Session
Session
::
Session
(
const
QPointer
<
QIODevice
>
&
tcpSocket
)
:
ioDevice_
(
tcpSocket
),
timerForClose_
(
new
QTimer
)
timerForClose_
(
new
QTimer
),
headerAcceptedFinish_
(
false
),
alreadyReply_
(
false
),
waitWrittenByteCount_
(
0
)
{
qDebug
()
<<
__FUNCTION__
<<
QThread
::
currentThreadId
();
timerForClose_
->
setInterval
(
30
*
1000
);
...
...
fmTakeaway/JQLibrary/src/JQNet.cpp
View file @
5565ea3f
...
...
@@ -32,7 +32,7 @@ QNetworkAddressEntry JQNet::getNetworkAddressEntry()
QPair
<
QNetworkAddressEntry
,
QNetworkInterface
>
JQNet
::
getNetworkAddressEntryWithNetworkInterface
(
const
bool
&
ridVm
)
{
for
(
const
auto
&
interface
:
QNetworkInterface
::
allInterfaces
())
for
each
(
const
auto
&
interface
,
QNetworkInterface
::
allInterfaces
())
{
if
(
interface
.
flags
()
!=
(
QNetworkInterface
::
IsUp
|
QNetworkInterface
::
IsRunning
...
...
@@ -41,16 +41,16 @@ QPair< QNetworkAddressEntry, QNetworkInterface > JQNet::getNetworkAddressEntryWi
if
(
ridVm
&&
interface
.
humanReadableName
().
startsWith
(
"vm"
)
)
{
continue
;
}
for
(
const
auto
&
entry
:
interface
.
addressEntries
()
)
for
each
(
const
auto
&
entry
,
interface
.
addressEntries
()
)
{
if
(
entry
.
ip
().
toIPv4Address
()
)
{
return
{
entry
,
interface
}
;
return
QPair
<
QNetworkAddressEntry
,
QNetworkInterface
>
(
entry
,
interface
)
;
}
}
}
return
{
}
;
return
QPair
<
QNetworkAddressEntry
,
QNetworkInterface
>
()
;
}
QString
JQNet
::
getHostName
()
...
...
@@ -168,7 +168,7 @@ QPair< bool, QByteArray > HTTP::get(const QString &url, const int &timeout)
const
auto
&&
flag
=
HTTP
().
get
(
networkRequest
,
buf
,
timeout
);
return
{
flag
,
buf
}
;
return
QPair
<
bool
,
QByteArray
>
(
flag
,
buf
)
;
}
QPair
<
bool
,
QByteArray
>
HTTP
::
get
(
const
QNetworkRequest
&
request
,
const
int
&
timeout
)
...
...
@@ -178,7 +178,7 @@ QPair< bool, QByteArray > HTTP::get(const QNetworkRequest &request, const int &t
const
auto
&&
flag
=
http
.
get
(
request
,
buf
,
timeout
);
return
{
flag
,
buf
}
;
return
QPair
<
bool
,
QByteArray
>
(
flag
,
buf
)
;
}
QPair
<
bool
,
QByteArray
>
HTTP
::
post
(
const
QString
&
url
,
const
QByteArray
&
appendData
,
const
int
&
timeout
)
...
...
@@ -190,7 +190,7 @@ QPair< bool, QByteArray > HTTP::post(const QString &url, const QByteArray &appen
const
auto
&&
flag
=
HTTP
().
post
(
networkRequest
,
appendData
,
buf
,
timeout
);
return
{
flag
,
buf
}
;
return
QPair
<
bool
,
QByteArray
>
(
flag
,
buf
)
;
}
QPair
<
bool
,
QByteArray
>
HTTP
::
post
(
const
QNetworkRequest
&
request
,
const
QByteArray
&
appendData
,
const
int
&
timeout
)
...
...
@@ -200,7 +200,7 @@ QPair< bool, QByteArray > HTTP::post(const QNetworkRequest &request, const QByte
const
auto
&&
flag
=
http
.
post
(
request
,
appendData
,
buf
,
timeout
);
return
{
flag
,
buf
}
;
return
QPair
<
bool
,
QByteArray
>
(
flag
,
buf
)
;
}
void
HTTP
::
handle
(
QNetworkReply
*
reply
,
const
int
&
timeout
,
...
...
fmTakeaway/Model/baseObject.cpp
View file @
5565ea3f
#include "baseObject.h"
#
include
"baseObject.h"
#include <QStringList>
#include <QVariant>
#include "preDefine.h"
BaseObject
::
BaseObject
(
const
BaseObject
&
p
,
QObject
*
parent
)
:
QObject
{
parent
}
BaseObject
::
BaseObject
(
const
BaseObject
&
p
,
QObject
*
parent
)
{
const
QMetaObject
*
m
=
p
.
metaObject
();
for
(
int
i
=
m
->
propertyOffset
();
i
<
m
->
propertyCount
();
i
++
)
...
...
fmTakeaway/Model/baseObject.h
View file @
5565ea3f
#ifndef BASEOBJECT_H
#
ifndef
BASEOBJECT_H
#define BASEOBJECT_H
#include <QObject>
...
...
fmTakeaway/Model/cashierObject.cpp
View file @
5565ea3f
#include "cashierObject.h"
#
include
"cashierObject.h"
fmTakeaway/Model/cashierObject.h
View file @
5565ea3f
#ifndef CASHIEROBJECT_H
#
ifndef
CASHIEROBJECT_H
#define CASHIEROBJECT_H
#include <QString>
...
...
fmTakeaway/Model/dailyObject.cpp
View file @
5565ea3f
#include "dailyObject.h"
#
include
"dailyObject.h"
QString
DailyObject
::
getChannel
()
const
{
...
...
fmTakeaway/Model/dailyObject.h
View file @
5565ea3f
#ifndef DAILYOBJECT_H
#
ifndef
DAILYOBJECT_H
#define DAILYOBJECT_H
#include "baseObject.h"
...
...
fmTakeaway/Model/deliverObject.cpp
View file @
5565ea3f
#include "deliverObject.h"
#
include
"deliverObject.h"
QString
DeliverObject
::
getId
()
const
{
...
...
fmTakeaway/Model/deliverObject.h
View file @
5565ea3f
#ifndef DELIVEROBJECT_H
#
ifndef
DELIVEROBJECT_H
#define DELIVEROBJECT_H
#include "baseObject.h"
...
...
fmTakeaway/Model/dishesObject.cpp
View file @
5565ea3f
#include "dishesObject.h"
#
include
"dishesObject.h"
fmTakeaway/Model/dishesObject.h
View file @
5565ea3f
#ifndef DISHESOBJECT_H
#
ifndef
DISHESOBJECT_H
#define DISHESOBJECT_H
#include <QObject>
...
...
fmTakeaway/Model/orderObject.cpp
View file @
5565ea3f
#include "orderObject.h"
#
include
"orderObject.h"
#include "preDefine.h"
#include <QJsonArray>
...
...
fmTakeaway/Model/productObject.cpp
View file @
5565ea3f
#include "productObject.h"
#
include
"productObject.h"
#include <QJsonArray>
void
ProductObject
::
FromJson
(
const
QJsonObject
&
json
)
...
...
fmTakeaway/Model/productObject.h
View file @
5565ea3f
#ifndef PRODUCTOBJECT_H
#
ifndef
PRODUCTOBJECT_H
#define PRODUCTOBJECT_H
#include "baseObject.h"
...
...
fmTakeaway/Network/billSocket.cpp
View file @
5565ea3f
#include "billSocket.h"
#
include
"billSocket.h"
#include <QtNetwork/QNetworkReply>
#include "preDefine.h"
...
...
fmTakeaway/Network/billSocket.h
View file @
5565ea3f
#ifndef BILLSOCKET_H
#
ifndef
BILLSOCKET_H
#define BILLSOCKET_H
#include <QJsonObject>
...
...
fmTakeaway/QsLog/QsLog.pri
View file @
5565ea3f
INCLUDEPATH += $$PWD
#
DEFINES += QS_LOG_LINE_NUMBERS # automatically writes the file and line for each log message
DEFINES += QS_LOG_LINE_NUMBERS # automatically writes the file and line for each log message
#DEFINES += QS_LOG_DISABLE # logging code is replaced with a no-op
DEFINES += QS_LOG_SEPARATE_THREAD # messages are queued and written from a separate thread
#DEFINES += QS_LOG_WIN_PRINTF_CONSOLE # Use fprintf instead of OutputDebugString on Windows
...
...
fmTakeaway/RejectForm.cpp
View file @
5565ea3f
#include "RejectForm.h"
#
include
"RejectForm.h"
#include "ui_RejectForm.h"
RejectForm
::
RejectForm
(
QWidget
*
parent
)
:
...
...
fmTakeaway/RejectForm.h
View file @
5565ea3f
#ifndef REJECTFORM_H
#
ifndef
REJECTFORM_H
#define REJECTFORM_H
#include <QDialog>
...
...
fmTakeaway/RejectForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RejectForm</class>
<widget class="QDialog" name="RejectForm">
...
...
fmTakeaway/alertForm.cpp
View file @
5565ea3f
#include "alertForm.h"
#
include
"alertForm.h"
#include "ui_alertForm.h"
AlertForm
::
AlertForm
(
QWidget
*
parent
)
:
...
...
fmTakeaway/alertForm.h
View file @
5565ea3f
#ifndef ALERTFORM_H
#
ifndef
ALERTFORM_H
#define ALERTFORM_H
// 通知窗口
...
...
fmTakeaway/alertForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AlertForm</class>
<widget class="QDialog" name="AlertForm">
...
...
fmTakeaway/bstatusForm.cpp
View file @
5565ea3f
#include "bstatusForm.h"
#
include
"bstatusForm.h"
#include "ui_bstatusForm.h"
#include "Control/flowControl.h"
#include "bstatusItem.h"
...
...
fmTakeaway/bstatusForm.h
View file @
5565ea3f
#ifndef BSTATUSFORM_H
#
ifndef
BSTATUSFORM_H
#define BSTATUSFORM_H
#include <QDialog>
#include "bstatusItem.h"
...
...
fmTakeaway/bstatusForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>BStatusForm</class>
<widget class="QDialog" name="BStatusForm">
...
...
fmTakeaway/bstatusItem.cpp
View file @
5565ea3f
#include "bstatusItem.h"
#
include
"bstatusItem.h"
#include "ui_bstatusItem.h"
#include <QStringList>
#include "Control/flowControl.h"
...
...
fmTakeaway/bstatusItem.h
View file @
5565ea3f
#ifndef BSTATUSITEM_H
#
ifndef
BSTATUSITEM_H
#define BSTATUSITEM_H
#include <QDialog>
...
...
fmTakeaway/bstatusItem.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>BStatusItem</class>
<widget class="QDialog" name="BStatusItem">
...
...
fmTakeaway/dailyreportForm.cpp
View file @
5565ea3f
#include "dailyreportForm.h"
#
include
"dailyreportForm.h"
#include "ui_dailyreportForm.h"
#include <QPainter>
#include "preDefine.h"
...
...
fmTakeaway/dailyreportForm.h
View file @
5565ea3f
#ifndef DAYREPORTFORM_H
#
ifndef
DAYREPORTFORM_H
#define DAYREPORTFORM_H
#include <QDialog>
...
...
fmTakeaway/dailyreportForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DailyReportForm</class>
<widget class="QDialog" name="DailyReportForm">
...
...
fmTakeaway/detailForm.cpp
View file @
5565ea3f
...
...
@@ -41,8 +41,8 @@ void DetailForm::InitData(OrderObject *orderObject)
ui
->
detailLab1
->
setText
(
QString
(
"%1:%2"
).
arg
(
orderObject
->
customer
,
orderObject
->
phone
));
//ui->detailLab3->setText(orderObject->address);
//ui->detailLab4->setText(QString("[配送方式]%1 [配送费]%2").arg(orderObject->delivery_party,Penny2Dollar(orderObject->send_fee)));
ui
->
detailLab2
->
setText
(
orderObject
->
delivery_time
==
0
?
"立即送出"
:
QDateTime
::
fromTime_t
(
orderObject
->
delivery_time
).
toString
(
"MM/dd hh:mm"
));
ui
->
detailLab3
->
setText
(
orderObject
->
courier_name
.
isEmpty
()
?
"暂未指定"
:
QString
(
"[姓名]%1 [电话]%2"
)
ui
->
detailLab2
->
setText
(
orderObject
->
delivery_time
==
0
?
QString
::
fromLocal8Bit
(
"立即送出"
)
:
QDateTime
::
fromTime_t
(
orderObject
->
delivery_time
).
toString
(
"MM/dd hh:mm"
));
ui
->
detailLab3
->
setText
(
orderObject
->
courier_name
.
isEmpty
()
?
QString
::
fromLocal8Bit
(
"暂未指定"
)
:
QString
::
fromLocal8Bit
(
"[姓名]%1 [电话]%2"
)
.
arg
(
orderObject
->
courier_name
,
orderObject
->
courier_phone
));
ui
->
detailLab4
->
setText
(
Penny2Dollar
(
orderObject
->
product_fee
));
//ui->detailLab8->setText(orderObject->has_invoiced? QString("发票抬头:%1").arg(orderObject->invoice_title) : "不需要发票");
...
...
@@ -135,7 +135,7 @@ void DetailForm::onOperaBtnClicked()
{
hide
();
QPushButton
*
pBtn
=
(
QPushButton
*
)
sender
();
if
(
pBtn
->
text
()
==
"拒单"
||
pBtn
->
text
()
==
"退单"
)
if
(
pBtn
->
text
()
==
QString
::
fromLocal8Bit
(
"拒单"
)
||
pBtn
->
text
()
==
QString
::
fromLocal8Bit
(
"退单"
)
)
{
// m_rejectForm->show();
// if(m_rejectForm->exec()==QDialog::Accepted)
...
...
fmTakeaway/detailForm.h
View file @
5565ea3f
#ifndef DETAILFORM_H
#
ifndef
DETAILFORM_H
#define DETAILFORM_H
#include <QDialog>
...
...
fmTakeaway/detailForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DetailForm</class>
<widget class="QDialog" name="DetailForm">
...
...
fmTakeaway/disTabWdg.cpp
View file @
5565ea3f
#include "disTabWdg.h"
#
include
"disTabWdg.h"
#include "ui_disTabWdg.h"
#include "Control/flowControl.h"
#include <QScrollBar>
...
...
fmTakeaway/disTabWdg.h
View file @
5565ea3f
#ifndef DISTABWDG_H
#
ifndef
DISTABWDG_H
#define DISTABWDG_H
#include <QDialog>
...
...
fmTakeaway/disTabWdg.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>disTabWdg</class>
<widget class="QDialog" name="disTabWdg">
...
...
fmTakeaway/dishesForm.cpp
View file @
5565ea3f
#include "dishesForm.h"
#
include
"dishesForm.h"
#include "ui_dishesForm.h"
#include <QPushButton>
#include "Control/flowControl.h"
...
...
fmTakeaway/dishesForm.h
View file @
5565ea3f
#ifndef DISHESFORM_H
#
ifndef
DISHESFORM_H
#define DISHESFORM_H
#include <QDialog>
...
...
fmTakeaway/dishesForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>dishesForm</class>
<widget class="QDialog" name="dishesForm">
...
...
fmTakeaway/dishesItem.cpp
View file @
5565ea3f
#include "dishesItem.h"
#
include
"dishesItem.h"
#include "ui_dishesItem.h"
#include <QDebug>
#include "Control/flowControl.h"
...
...
fmTakeaway/dishesItem.h
View file @
5565ea3f
#ifndef DISHESITEM_H
#
ifndef
DISHESITEM_H
#define DISHESITEM_H
#include <QDialog>
...
...
fmTakeaway/dishesItem.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>dishesItem</class>
<widget class="QDialog" name="dishesItem">
...
...
fmTakeaway/floatForm.h
View file @
5565ea3f
#ifndef FLOATFORM_H
#
ifndef
FLOATFORM_H
#define FLOATFORM_H
#include <QDialog>
...
...
fmTakeaway/floatForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FloatForm</class>
<widget class="QDialog" name="FloatForm">
...
...
fmTakeaway/fmTakeaway.pro
View file @
5565ea3f
...
...
@@ -18,6 +18,9 @@ CONFIG +=c++11
INCLUDEPATH
+=
DTools
LIBS
+=
-
luser32
LIBS
+=
-
lUserenv
-
ldbghelp
DEFINES
+=
TEST
TODO
SOURCES
+=
main
.
cpp
\
...
...
@@ -81,7 +84,8 @@ HEADERS += \
refuseForm
.
h
\
Model
/
dishesObject
.
h
\
dailyreportForm
.
h
\
Model
/
dailyObject
.
h
Model
/
dailyObject
.
h
\
DTools
/
dump
.
h
FORMS
+=
mainForm
.
ui
\
alertForm
.
ui
\
...
...
fmTakeaway/main.cpp
View file @
5565ea3f
...
...
@@ -11,6 +11,7 @@
#include <windows.h>
#include <QProcess>
#include <QSqlDatabase>
#include "DTools/dump.h"
using
namespace
QsLogging
;
...
...
@@ -53,10 +54,12 @@ void LoadTheme(const QString& theme)
int
main
(
int
argc
,
char
*
argv
[])
{
#ifdef Q_OS_WIN
SetUnhandledExceptionFilter
(
FMExcpHandler
);
#endif
HANDLE
m_hMutex
=
CreateMutex
(
NULL
,
FALSE
,
L"Global
\\
fmTakeaway"
);
if
(
NULL
!=
m_hMutex
){
if
(
GetLastError
()
==
ERROR_ALREADY_EXISTS
)
{
if
(
GetLastError
()
==
ERROR_ALREADY_EXISTS
||
GetLastError
()
==
ERROR_ACCESS_DENIED
)
{
CloseHandle
(
m_hMutex
);
m_hMutex
=
NULL
;
return
-
1
;
...
...
fmTakeaway/mainForm.cpp
View file @
5565ea3f
...
...
@@ -126,14 +126,14 @@ void MainForm::_Init()
setWindowIcon
(
QIcon
(
":fm.ico"
));
// 初始化文字
ui
->
mainLabStoreid
->
setText
(
UI_STOREID
);
ui
->
mainLabStoreid
->
setText
(
QString
::
fromLocal8Bit
(
UI_STOREID
)
);
ui
->
mainLabVersion
->
setText
(
APP_VERSION
);
// 初始化表
int
scales6
[]
=
{
3
,
4
,
2
,
3
,
3
,
3
};
int
scales5
[]
=
{
3
,
6
,
2
,
3
,
3
};
int
tableWidth
=
this
->
width
()
-
75
;
qDebug
()
<<
"
宽度
"
<<
this
->
width
();
qDebug
()
<<
"
width
"
<<
this
->
width
();
foreach
(
QTableWidget
*
table
,
m_tableList
)
{
table
->
hide
();
...
...
@@ -172,7 +172,7 @@ void MainForm::onSetCurrentTime()
m_raiseIndex
=
0
;
raise
();
}
ui
->
mainSlabTime
->
setText
(
QDateTime
::
currentDateTime
().
toString
(
"yyyy年MM月dd日 hh:mm:ss"
));
ui
->
mainSlabTime
->
setText
(
QDateTime
::
currentDateTime
().
toString
(
QString
::
fromLocal8Bit
(
"yyyy年MM月dd日 hh:mm:ss"
)
));
}
void
MainForm
::
onMainTabBtnClicked
()
...
...
fmTakeaway/mainForm.h
View file @
5565ea3f
#ifndef MAINFORM_H
#
ifndef
MAINFORM_H
#define MAINFORM_H
#include <QDialog>
...
...
fmTakeaway/mainForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainForm</class>
<widget class="QWidget" name="MainForm">
...
...
fmTakeaway/padForm.cpp
View file @
5565ea3f
#include "padForm.h"
#
include
"padForm.h"
#include "ui_padForm.h"
PadForm
::
PadForm
(
QWidget
*
parent
)
:
...
...
fmTakeaway/padForm.h
View file @
5565ea3f
#ifndef PADFORM_H
#
ifndef
PADFORM_H
#define PADFORM_H
#include <QDialog>
...
...
fmTakeaway/padForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PadForm</class>
<widget class="QDialog" name="PadForm">
...
...
fmTakeaway/pickForm.cpp
View file @
5565ea3f
#include "pickForm.h"
#
include
"pickForm.h"
#include "ui_pickForm.h"
#include "preDefine.h"
#include "Control/flowControl.h"
...
...
fmTakeaway/pickForm.h
View file @
5565ea3f
#ifndef PICKFORM_H
#
ifndef
PICKFORM_H
#define PICKFORM_H
#include <QDialog>
...
...
fmTakeaway/pickForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PickForm</class>
<widget class="QDialog" name="PickForm">
...
...
fmTakeaway/refdishesForm.cpp
View file @
5565ea3f
#include "refdishesForm.h"
#
include
"refdishesForm.h"
#include "ui_refdishesForm.h"
#include "Control/flowControl.h"
...
...
fmTakeaway/refdishesForm.h
View file @
5565ea3f
#ifndef REFDISHESFORM_H
#
ifndef
REFDISHESFORM_H
#define REFDISHESFORM_H
#include <QDialog>
...
...
fmTakeaway/refdishesForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>refDishesForm</class>
<widget class="QDialog" name="refDishesForm">
...
...
fmTakeaway/refuseForm.cpp
View file @
5565ea3f
#include "refuseForm.h"
#
include
"refuseForm.h"
#include "ui_refuseForm.h"
#include <QDebug>
...
...
@@ -44,7 +44,7 @@ void RefuseForm::on_reason1_toggled(bool checked)
if
(
checked
)
{
ui
->
refuseBtnOk
->
setEnabled
(
true
);
m_reasonStr
=
"餐厅已打烊"
;
m_reasonStr
=
QString
::
fromLocal8Bit
(
"餐厅已打烊"
)
;
m_reasonCode
=
2
;
}
}
...
...
@@ -68,7 +68,7 @@ void RefuseForm::on_reason2_toggled(bool checked)
if
(
checked
)
{
ui
->
refuseBtnOk
->
setEnabled
(
true
);
m_reasonStr
=
"菜品已售完"
;
m_reasonStr
=
QString
::
fromLocal8Bit
(
"菜品已售完"
)
;
m_reasonCode
=
3
;
}
}
...
...
@@ -78,7 +78,7 @@ void RefuseForm::on_reason3_toggled(bool checked)
if
(
checked
)
{
ui
->
refuseBtnOk
->
setEnabled
(
true
);
m_reasonStr
=
"餐厅太忙"
;
m_reasonStr
=
QString
::
fromLocal8Bit
(
"餐厅太忙"
)
;
m_reasonCode
=
5
;
}
}
...
...
@@ -88,7 +88,7 @@ void RefuseForm::on_reason4_toggled(bool checked)
if
(
checked
)
{
ui
->
refuseBtnOk
->
setEnabled
(
true
);
m_reasonStr
=
"联系不上客户"
;
m_reasonStr
=
QString
::
fromLocal8Bit
(
"联系不上客户"
)
;
m_reasonCode
=
6
;
}
}
...
...
@@ -98,7 +98,7 @@ void RefuseForm::on_reason5_toggled(bool checked)
if
(
checked
)
{
ui
->
refuseBtnOk
->
setEnabled
(
true
);
m_reasonStr
=
"无人配送"
;
m_reasonStr
=
QString
::
fromLocal8Bit
(
"无人配送"
)
;
m_reasonCode
=-
1
;
}
}
...
...
fmTakeaway/refuseForm.h
View file @
5565ea3f
#ifndef REFUSEFORM_H
#
ifndef
REFUSEFORM_H
#define REFUSEFORM_H
#include <QDialog>
...
...
fmTakeaway/refuseForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RefuseForm</class>
<widget class="QDialog" name="RefuseForm">
...
...
fmTakeaway/settingForm.h
View file @
5565ea3f
#ifndef SETTINGFORM_H
#
ifndef
SETTINGFORM_H
#define SETTINGFORM_H
#include <QDialog>
...
...
fmTakeaway/settingForm.ui
View file @
5565ea3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SettingForm</class>
<widget class="QDialog" name="SettingForm">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment