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
Hide whitespace changes
Inline
Side-by-side
Showing
79 changed files
with
250 additions
and
184 deletions
+250
-184
fmTakeaway/Control/flowControl.cpp
+86
-86
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
...
...
@@ -97,7 +97,7 @@ FlowControl::FlowControl():semaphore(0)
}
else
{
QLOG_INFO
()
<<
QString
(
"链接已断开"
);
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"链接已断开"
);
}
}
);
int
port
=
ConfigManger
::
GetInstance
().
GetHttpServerPort
();
...
...
@@ -156,7 +156,7 @@ void FlowControl::_ClickOMSAssignArea()
SetCursorPos
(
point
.
x
(),
point
.
y
());
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
0
,
0
,
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
0
,
0
,
0
,
0
);
QLOG_INFO
()
<<
QString
(
"点击目标坐标x%1:,y:%2"
).
arg
(
point
.
x
()).
arg
(
point
.
y
());
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"点击目标坐标x%1:,y:%2"
).
arg
(
point
.
x
()).
arg
(
point
.
y
());
}
void
FlowControl
::
_ClickToLogin
()
...
...
@@ -193,7 +193,7 @@ bool FlowControl::_GetStoreInfo()
{
bool
result
=
true
;
emit
showAlert
(
AlertForm
::
LOADING
,
"正在获取门店信息......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在获取门店信息......"
)
);
QLOG_INFO
()
<<
QString
(
"[---get storeInfo---]"
);
QString
tmp
;
ConfigManger
::
GetInstance
().
GetStoreInfo
(
tmp
/*, m_posId, m_cashierId*/
,
m_password
);
...
...
@@ -209,7 +209,7 @@ bool FlowControl::_Login()
sendJson
=
DataManger
::
GetInstance
().
GetLoginData
(
ConfigManger
::
GetInstance
().
GetPartnerId
(),
m_storeId
,
m_password
,
m_posId
,
m_cashierId
,
_GetIpAddress
());
emit
showAlert
(
AlertForm
::
LOADING
,
"正在登录......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在登录......"
)
);
QLOG_INFO
()
<<
QString
(
"[---login---][requestData:%1]"
)
<<
sendJson
;
if
(
ConfigManger
::
GetInstance
().
GetLoginSslConfig
())
{
...
...
@@ -222,13 +222,13 @@ bool FlowControl::_Login()
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"登录失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"登录失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"登录失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"登录失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
m_storeName
=
recvJson
[
JSON_STORENAME
].
toString
();
...
...
@@ -285,16 +285,16 @@ bool FlowControl::_PullOrder()
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
setNetStatus
(
"<font color='#ff0000'>异常</font>"
);
emit
setNetStatus
(
QString
::
fromLocal8Bit
(
"<font color='#ff0000'>异常</font>"
)
);
}
else
{
qDebug
()
<<
recvJson
;
emit
setNetStatus
(
"正常"
);
emit
setNetStatus
(
QString
::
fromLocal8Bit
(
"正常"
)
);
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_ERRCODE
].
toInt
())
{
QString
error
=
recvJson
[
JSON_ERRMSG
].
toString
();
QLOG_ERROR
()
<<
QString
(
"pull orders error.[msg->%1]"
).
arg
(
error
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"获取订单失败![%1]"
).
arg
(
error
));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"获取订单失败![%1]"
).
arg
(
error
));
result
=
false
;
}
else
{
...
...
@@ -454,13 +454,13 @@ bool FlowControl::_SendHeart()
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"发送心跳失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"发送心跳失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"发送心跳失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"发送心跳失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
}
return
result
;
...
...
@@ -475,7 +475,7 @@ bool FlowControl::_ConfirmOrder(const QString &orderId)
sendJson
=
DataManger
::
GetInstance
().
GetConfirmOrderData
(
orderId
,
m_ordersMap
[
orderId
]
->
channel
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在通信......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在通信......"
)
);
QLOG_INFO
()
<<
QString
(
"[---confirm order---]. [requestData:%1]"
)
<<
sendJson
;
if
(
ConfigManger
::
GetInstance
().
GetOrderSslConfig
())
{
...
...
@@ -492,13 +492,13 @@ bool FlowControl::_ConfirmOrder(const QString &orderId)
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"接单失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"接单失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_ERRCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"接单失败![%1]"
).
arg
(
recvJson
[
JSON_ERRMSG
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"接单失败![%1]"
).
arg
(
recvJson
[
JSON_ERRMSG
].
toString
()));
}
else
{
m_orderOperatePair
.
insert
(
orderId
,
1
);
...
...
@@ -516,23 +516,23 @@ bool FlowControl::_RefuseOrder(const QString &orderId, int refuseCode,const QStr
sendJson
=
DataManger
::
GetInstance
().
GetRefuseOrderData
(
refuseCode
,
orderId
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在通信......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在通信......"
)
);
QLOG_INFO
()
<<
QString
(
"[---refuse order---]. [requestData:%1]"
)
<<
sendJson
;
result
=
m_procOrderSocket
->
Request
(
sendJson
,
recvJson
,
error
);
QLOG_INFO
()
<<
QString
(
"refuse order finsh. [result:%1][msg:%2][recvData:%3]"
)
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"拒单失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"拒单失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"拒单失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"拒单失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
emit
showAlert
(
AlertForm
::
SUCCESS
,
"拒单成功!"
);
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
::
fromLocal8Bit
(
"拒单成功!"
)
);
// 通知主界面移动订单
OrderObject
*
orderObject
=
m_ordersMap
.
value
(
orderId
);
int
oldStatus
=
orderObject
->
status
;
...
...
@@ -548,7 +548,7 @@ bool FlowControl::_SendOrder(const QString& orderId)
{
if
(
m_ordersMap
.
value
(
orderId
)
->
courier_name
.
isEmpty
()
&&
m_ordersMap
.
value
(
orderId
)
->
delivery_type
==
1
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"配送员暂未接单,请等待"
));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"配送员暂未接单,请等待"
));
return
true
;
}
QString
error
;
...
...
@@ -558,23 +558,23 @@ bool FlowControl::_SendOrder(const QString& orderId)
sendJson
=
DataManger
::
GetInstance
().
GetSendOrderData
(
orderId
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在通信......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在通信......"
)
);
QLOG_INFO
()
<<
QString
(
"[---sendout order---]. [requestData:%1]"
)
<<
sendJson
;
result
=
m_procOrderSocket
->
Request
(
sendJson
,
recvJson
,
error
);
QLOG_INFO
()
<<
QString
(
"sendout order finsh. [result:%1][msg:%2][recvData:%3]"
)
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"送出失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"送出失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"送出失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"送出失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
emit
showAlert
(
AlertForm
::
SUCCESS
,
"送出成功!"
);
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
::
fromLocal8Bit
(
"送出成功!"
)
);
// 通知主界面移动订单
OrderObject
*
orderObject
=
m_ordersMap
.
value
(
orderId
);
...
...
@@ -598,23 +598,23 @@ bool FlowControl::_CompleteOrder(const QString& orderId)
sendJson
=
DataManger
::
GetInstance
().
GetCompleteOrderData
(
orderId
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在通信......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在通信......"
)
);
QLOG_INFO
()
<<
QString
(
"[---complete order---]. [requestData:%1]"
)
<<
sendJson
;
result
=
m_procOrderSocket
->
Request
(
sendJson
,
recvJson
,
error
);
QLOG_INFO
()
<<
QString
(
"complete order finsh. [result:%1][msg:%2][recvData:%3]"
)
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"完成失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"完成失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"完成失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"完成失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
emit
showAlert
(
AlertForm
::
SUCCESS
,
"完成成功!"
);
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
::
fromLocal8Bit
(
"完成成功!"
)
);
// 通知主界面移动订单
OrderObject
*
orderObject
=
m_ordersMap
.
value
(
orderId
);
...
...
@@ -636,7 +636,7 @@ bool FlowControl::_RefuseRefund(const QString& orderId)
sendJson
=
DataManger
::
GetInstance
().
GetRefuseRefundData
(
VALUE_REFUSEREFUND_REASON
,
orderId
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在通信......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在通信......"
)
);
QLOG_INFO
()
<<
QString
(
"[---refuseRefund order---]. [requestData:%1]"
)
<<
sendJson
;
result
=
m_procOrderSocket
->
Request
(
sendJson
,
recvJson
,
error
);
...
...
@@ -644,16 +644,16 @@ bool FlowControl::_RefuseRefund(const QString& orderId)
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"拒绝退单失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"拒绝退单失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"拒绝退单失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"拒绝退单失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
emit
showAlert
(
AlertForm
::
SUCCESS
,
"拒绝退单成功!"
);
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
::
fromLocal8Bit
(
"拒绝退单成功!"
)
);
// 通知主界面移动订单
OrderObject
*
orderObject
=
m_ordersMap
.
value
(
orderId
);
...
...
@@ -677,7 +677,7 @@ bool FlowControl::_RefundOrder(const QString &orderId,int reasonCode,const QStri
sendJson
=
DataManger
::
GetInstance
().
GetRefundOrderData
(
reasonCode
,
reason
,
orderId
,
m_ordersMap
.
value
(
orderId
)
->
channel
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在通信......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在通信......"
)
);
QLOG_INFO
()
<<
QString
(
"[---Refund order---]. [requestData:%1]"
)
<<
sendJson
;
if
(
ConfigManger
::
GetInstance
().
GetOrderSslConfig
())
...
...
@@ -695,13 +695,13 @@ bool FlowControl::_RefundOrder(const QString &orderId,int reasonCode,const QStri
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"退单失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"退单失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_ERRCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"退单失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"退单失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
m_orderOperatePair
.
insert
(
orderId
,
0
);
...
...
@@ -732,7 +732,7 @@ void FlowControl::onPullDishes()
{
if
(
!
m_bLoginResult
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"门店还未登录"
));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"门店还未登录"
));
return
;
}
QString
error
;
...
...
@@ -743,14 +743,14 @@ void FlowControl::onPullDishes()
m_dishesMap
.
clear
();
sendJson
=
DataManger
::
GetInstance
().
GetStoreChannelInfoData
();
emit
showAlert
(
AlertForm
::
LOADING
,
"正在获取平台列表......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在获取平台列表......"
)
);
QLOG_INFO
()
<<
QString
(
"[---GetStoreChannelInfo---]. [requestData:%1]"
)
<<
sendJson
;
result
=
m_pullDishesSocket
->
Request
(
sendJson
,
recvJson
,
error
);
QLOG_INFO
()
<<
QString
(
"GetStoreChannelInfo finsh. [result:%1][msg:%2][recvData:%3]"
)
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"获取平台列表失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"获取平台列表失败![网络错误]"
)
);
}
else
{
//recvJson = QJsonDocument::fromJson("{\"statusCode\":100,\"msg\":\"s\",\"channels\":[ {\"code\":\"bdwm\",\"name\":\"百度外卖\",\"status\":1},{\"code\":\"mtwm\",\"name\":\"美团外卖\",\"status\":0},{\"code\":\"eleme2\",\"name\":\"饿了么\",\"status\":1}]}").object();
...
...
@@ -758,7 +758,7 @@ void FlowControl::onPullDishes()
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"获取平台列表失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"获取平台列表失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
// 分别获取每个平台的菜品信息
...
...
@@ -770,14 +770,14 @@ void FlowControl::onPullDishes()
QString
channelCode
=
channel
[
"code"
].
toString
();
sendJson
=
DataManger
::
GetInstance
().
GetPullDishesData
(
channelCode
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
(
"正在获取[%1]菜品信息......"
).
arg
(
channelName
));
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在获取[%1]菜品信息......"
).
arg
(
channelName
));
QLOG_INFO
()
<<
QString
(
"[---pullDishes %1---]. [requestData:%2]"
).
arg
(
channelName
)
<<
sendJson
;
result
=
m_pullDishesSocket
->
Request
(
sendJson
,
recvJson
,
error
);
QLOG_INFO
()
<<
QString
(
"pullDishes finsh. [result:%1][msg:%2][recvData:%3]"
)
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"获取[%1]菜品信息失败![网络超时]"
).
arg
(
channelName
));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"获取[%1]菜品信息失败![网络超时]"
).
arg
(
channelName
));
break
;
}
else
{
...
...
@@ -814,7 +814,7 @@ void FlowControl::onPullDishes()
emit
iniDishesData
(
m_dishesMap
);
}
else
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"未获取到菜品信息!"
));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"未获取到菜品信息!"
));
}
}
}
...
...
@@ -829,7 +829,7 @@ void FlowControl::onUpdDishes(QString channelCode, QMap<QString, int> dishes)
sendJson
=
DataManger
::
GetInstance
().
GetUpdDishesData
(
channelCode
,
dishes
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在同步菜品销售状态......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在同步菜品销售状态......"
)
);
QLOG_INFO
()
<<
QString
(
"[---update dishes---]. [requestData:%1]"
)
<<
sendJson
;
result
=
m_pullDishesSocket
->
Request
(
sendJson
,
recvJson
,
error
);
...
...
@@ -837,13 +837,13 @@ void FlowControl::onUpdDishes(QString channelCode, QMap<QString, int> dishes)
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"同步菜品销售状态失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"同步菜品销售状态失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"同步菜品销售状态失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"同步菜品销售状态失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
emit
hideAlert
();
...
...
@@ -877,7 +877,7 @@ void FlowControl::onSetStoreOperatingStatus(const QString &channelCode, const QS
QJsonObject
recvJson
;
sendJson
=
DataManger
::
GetInstance
().
GetOperatingStatusData
(
channelCode
,
business_status
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在设置门店营业状态......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在设置门店营业状态......"
)
);
QLOG_INFO
()
<<
QString
(
"[---SetStoreOperatingStatus---]. [requestData:%1]"
)
<<
sendJson
;
m_pullDishesSocket
->
SetUrl
(
QUrl
(
ConfigManger
::
GetInstance
().
GetStoreServerUrl
()
+
ConfigManger
::
GetInstance
().
GetInterfaceName
(
INI_INTERFACE_UPDATESTATE
)));
...
...
@@ -888,12 +888,12 @@ void FlowControl::onSetStoreOperatingStatus(const QString &channelCode, const QS
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"设置门店营业状态失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"设置门店营业状态失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"设置门店营业状态失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"设置门店营业状态失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
emit
hideAlert
();
...
...
@@ -906,7 +906,7 @@ void FlowControl::onDailyReport()
{
if
(
!
m_bLoginResult
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"门店未登录"
));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"门店未登录"
));
return
;
}
QString
error
;
...
...
@@ -917,7 +917,7 @@ void FlowControl::onDailyReport()
sendJson
=
DataManger
::
GetInstance
().
GetDayReportData
(
m_business
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在通信......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在通信......"
)
);
QLOG_INFO
()
<<
QString
(
"[---Get daily report---]. [requestData:%1]"
)
<<
sendJson
;
result
=
m_procOrderSocket
->
Request
(
sendJson
,
recvJson
,
error
);
...
...
@@ -925,13 +925,13 @@ void FlowControl::onDailyReport()
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"获取入账日结失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"获取入账日结失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
result
=
false
;
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"获取入账日结失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"获取入账日结失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
recvJson
.
insert
(
JSON_STORENAME
,
m_storeName
);
...
...
@@ -973,7 +973,7 @@ bool FlowControl::_GetReplyJson(const QJsonObject &content,QJsonObject &data, QS
bool
result
=
true
;
if
(
!
content
.
contains
(
"actionId"
))
{
error
=
QString
(
"未知的请求"
);
error
=
QString
::
fromLocal8Bit
(
"未知的请求"
);
result
=
false
;
}
else
{
...
...
@@ -1005,7 +1005,7 @@ bool FlowControl::_GetReplyJson(const QJsonObject &content,QJsonObject &data, QS
result
=
_Get12ReplyJson
(
content
,
data
,
error
);
break
;
default
:
error
=
QString
(
"未知的请求"
);
error
=
QString
::
fromLocal8Bit
(
"未知的请求"
);
result
=
false
;
break
;
}
...
...
@@ -1028,7 +1028,7 @@ bool FlowControl::_Get01ReplyJson(const QJsonObject &content, QJsonObject &data,
result
=
false
;
if
(
error
.
isEmpty
())
{
error
=
QString
(
"请求参数错误"
);
error
=
QString
::
fromLocal8Bit
(
"请求参数错误"
);
}
}
return
result
;
...
...
@@ -1048,22 +1048,22 @@ bool FlowControl::_Get02ReplyJson(const QJsonObject &content, QJsonObject &data,
semaphore
.
acquire
(
1
);
if
(
m_bOperateResult
)
{
error
=
QString
(
"接单成功"
);
error
=
QString
::
fromLocal8Bit
(
"接单成功"
);
}
else
{
error
=
QString
(
"响应超时"
);
error
=
QString
::
fromLocal8Bit
(
"响应超时"
);
}
result
=
m_bOperateResult
;
semaphore
.
release
(
1
);
}
else
{
result
=
false
;
error
=
QString
(
"订单不存在"
);
error
=
QString
::
fromLocal8Bit
(
"订单不存在"
);
}
}
else
{
result
=
false
;
error
=
QString
(
"请求参数错误"
);
error
=
QString
::
fromLocal8Bit
(
"请求参数错误"
);
}
return
result
;
}
...
...
@@ -1076,16 +1076,16 @@ bool FlowControl::_Get03ReplyJson(const QJsonObject &content, QJsonObject &data,
if
(
m_ordersMap
.
contains
(
orderId
))
{
emit
doStartOperateTimer
();
emit
doRefundOrder
(
orderId
,
-
1
,
QString
(
"同意退款"
));
emit
doRefundOrder
(
orderId
,
-
1
,
QString
::
fromLocal8Bit
(
"同意退款"
));
orderOperation
.
orderId
=
orderId
;
orderOperation
.
operation
=
0
;
semaphore
.
acquire
(
1
);
if
(
m_bOperateResult
)
{
error
=
QString
(
"取消成功"
);
error
=
QString
::
fromLocal8Bit
(
"取消成功"
);
}
else
{
error
=
QString
(
"响应超时"
);
error
=
QString
::
fromLocal8Bit
(
"响应超时"
);
}
result
=
m_bOperateResult
;
memset
(
&
orderOperation
,
0
,
sizeof
(
orderOperation
));
...
...
@@ -1094,12 +1094,12 @@ bool FlowControl::_Get03ReplyJson(const QJsonObject &content, QJsonObject &data,
}
else
{
result
=
false
;
error
=
QString
(
"订单不存在"
);
error
=
QString
::
fromLocal8Bit
(
"订单不存在"
);
}
}
else
{
result
=
false
;
error
=
QString
(
"请求参数错误"
);
error
=
QString
::
fromLocal8Bit
(
"请求参数错误"
);
}
return
result
;
}
...
...
@@ -1118,7 +1118,7 @@ bool FlowControl::_Get04ReplyJson(const QJsonObject &content, QJsonObject &data,
{
if
(
!
m_orderIdToPosSalesIdMap
.
contains
(
orderId
))
{
QLOG_INFO
()
<<
QString
(
"%1订单已经成功推送给simphony"
).
arg
(
orderId
);
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"%1订单已经成功推送给simphony"
).
arg
(
orderId
);
m_orderIdToPosSalesIdMap
.
insert
(
orderId
,
posSaleId
);
}
OrderObject
*
order_p
=
m_ordersMap
.
value
(
orderId
);
...
...
@@ -1153,12 +1153,12 @@ bool FlowControl::_Get04ReplyJson(const QJsonObject &content, QJsonObject &data,
}
else
{
result
=
false
;
error
=
QString
(
"订单号或者短号不能为空"
);
error
=
QString
::
fromLocal8Bit
(
"订单号或者短号不能为空"
);
}
}
else
{
result
=
false
;
error
=
QString
(
"请求参数错误"
);
error
=
QString
::
fromLocal8Bit
(
"请求参数错误"
);
}
return
result
;
}
...
...
@@ -1173,7 +1173,7 @@ bool FlowControl::_Get11ReplyJson(const QJsonObject &content, QJsonObject &data,
else
{
if
(
content
[
JSON_ORDERID
].
toString
().
isEmpty
())
{
error
=
QString
(
"订单号不能为空"
);
error
=
QString
::
fromLocal8Bit
(
"订单号不能为空"
);
return
false
;
}
emit
doPullOrder
(
content
[
JSON_ORDERID
].
toString
(),
content
[
JSON_CHANNEL
].
toString
());
...
...
@@ -1192,7 +1192,7 @@ bool FlowControl::_Get12ReplyJson(const QJsonObject &content, QJsonObject &data,
return
true
;
}
else
{
error
=
QString
(
"门店信息不匹配"
);
error
=
QString
::
fromLocal8Bit
(
"门店信息不匹配"
);
}
return
false
;
}
...
...
@@ -1205,7 +1205,7 @@ bool FlowControl::_GetLoginReplyJson(const QJsonObject &content,QString &error)
m_cashierId
=
content
[
"operatorId"
].
toString
();
if
(
m_bFirstRecvInfo
)
{
error
=
QString
(
"FMOMS正在登录"
);
error
=
QString
::
fromLocal8Bit
(
"FMOMS正在登录"
);
emit
doLogin
();
}
return
true
;
...
...
@@ -1217,12 +1217,12 @@ bool FlowControl::_GetQueryReplyJson(QJsonObject &data, QString &error, const QS
bool
result
=
true
;
if
(
!
m_bLoginResult
)
{
error
=
QString
(
"FMOMS 未登录"
);
error
=
QString
::
fromLocal8Bit
(
"FMOMS 未登录"
);
return
false
;
}
if
(
m_ordersEntryList
.
isEmpty
())
{
error
=
QString
(
"没有新订单待拉取"
);
error
=
QString
::
fromLocal8Bit
(
"没有新订单待拉取"
);
result
=
true
;
}
else
...
...
@@ -1253,7 +1253,7 @@ bool FlowControl::_GetQueryReplyJson(QJsonObject &data, QString &error, const QS
}
rObj
.
insert
(
"fm_ver"
,
"1.0"
);
cObj
.
insert
(
"pay_id"
,
"002"
);
cObj
.
insert
(
"pay_str"
,
"非码外卖"
);
cObj
.
insert
(
"pay_str"
,
QString
::
fromLocal8Bit
(
"非码外卖"
)
);
cObj
.
insert
(
"pos_sale_id"
,
orderObject
->
possale_id
);
cObj
.
insert
(
"order_status"
,
orderObject
->
status
);
//订单的状态
cObj
.
insert
(
"pay_ebcode"
,
orderObject
->
channel
);
...
...
@@ -1325,18 +1325,18 @@ void FlowControl::_HandleOrderOperation(const QString &orderId)
case
100
:
if
(
0
==
operation
)
{
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
(
"%1%2号单取消成功!"
).
arg
(
channel
).
arg
(
index
));
QLOG_INFO
()
<<
orderId
<<
QString
(
"取消订单成功!"
);
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
::
fromLocal8Bit
(
"%1%2号单取消成功!"
).
arg
(
channel
).
arg
(
index
));
QLOG_INFO
()
<<
orderId
<<
QString
::
fromLocal8Bit
(
"取消订单成功!"
);
}
break
;
default
:
if
(
1
==
operation
)
{
QString
remark
(
orderObject
->
remark
),
deliveryTime
;
remark
=
remark
.
isEmpty
()
?
""
:
QString
(
"
\r\n
[备注: %1]"
).
arg
(
remark
);
deliveryTime
=
QString
(
"
\r\n
[期望送达时间: %1]"
).
arg
(
QDateTime
::
fromTime_t
(
orderObject
->
delivery_time
).
toString
(
"MM/dd hh:mm"
));
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
(
"%1%2号单接单成功!%3%4"
).
arg
(
channel
).
arg
(
index
).
arg
(
remark
).
arg
(
deliveryTime
));
QLOG_INFO
()
<<
orderId
<<
QString
(
"接单成功!%1%2"
).
arg
(
remark
).
arg
(
deliveryTime
);
remark
=
remark
.
isEmpty
()
?
""
:
QString
::
fromLocal8Bit
(
"
\r\n
[备注: %1]"
).
arg
(
remark
);
deliveryTime
=
QString
::
fromLocal8Bit
(
"
\r\n
[期望送达时间: %1]"
).
arg
(
QDateTime
::
fromTime_t
(
orderObject
->
delivery_time
).
toString
(
"MM/dd hh:mm"
));
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
::
fromLocal8Bit
(
"%1%2号单接单成功!%3%4"
).
arg
(
channel
).
arg
(
index
).
arg
(
remark
).
arg
(
deliveryTime
));
QLOG_INFO
()
<<
orderId
<<
QString
::
fromLocal8Bit
(
"接单成功!%1%2"
).
arg
(
remark
).
arg
(
deliveryTime
);
}
break
;
}
...
...
@@ -1379,7 +1379,7 @@ void FlowControl::onGetBusinessStatus()
QLOG_INFO
()
<<
__FUNCTION__
;
if
(
!
m_bLoginResult
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"门店还未登录"
));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"门店还未登录"
));
return
;
}
QString
error
;
...
...
@@ -1391,19 +1391,19 @@ void FlowControl::onGetBusinessStatus()
m_pullDishesSocket
->
SetUrl
(
QUrl
(
ConfigManger
::
GetInstance
().
GetStoreServerUrl
()
+
ConfigManger
::
GetInstance
().
GetInterfaceName
(
INI_INTERFACE_GETSTORESTATE
)));
qDebug
()
<<
ConfigManger
::
GetInstance
().
GetStoreServerUrl
()
+
ConfigManger
::
GetInstance
().
GetInterfaceName
(
INI_INTERFACE_GETSTORESTATE
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在获取平台营业状态......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
QString
::
fromLocal8Bit
(
"正在获取平台营业状态......"
)
);
QLOG_INFO
()
<<
QString
(
"[---GetStoreChannelInfo---]. [requestData:%1]"
)
<<
sendJson
;
result
=
m_pullDishesSocket
->
Request
(
sendJson
,
recvJson
,
error
);
QLOG_INFO
()
<<
QString
(
"GetStoreChannelInfo finsh. [result:%1][msg:%2][recvData:%3]"
)
.
arg
(
result
).
arg
(
error
)
<<
recvJson
;
if
(
!
result
)
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
"获取平台营业状态失败![网络错误]"
);
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"获取平台营业状态失败![网络错误]"
)
);
}
else
{
if
(
JSON_STATUSCODE_OK
!=
recvJson
[
JSON_STATUSCODE
].
toInt
())
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"获取平台营业状态失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"获取平台营业状态失败![%1]"
).
arg
(
recvJson
[
JSON_MESSAGE
].
toString
()));
}
else
{
QJsonArray
array
=
recvJson
[
JSON_DATA
].
toArray
();
...
...
@@ -1425,7 +1425,7 @@ void FlowControl::onGetBusinessStatus()
emit
initChannelsData
(
strListChannels
);
}
else
{
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
(
"未获取到平台信息!"
));
emit
showAlert
(
AlertForm
::
MSGERROR
,
QString
::
fromLocal8Bit
(
"未获取到平台信息!"
));
}
}
}
...
...
@@ -1452,7 +1452,7 @@ void FlowControl::onProcessOrder(const QString &operation, const QString &orderI
_RefuseRefund
(
orderId
);
}
else
if
(
!
operation
.
compare
(
OPERATION_REFUNDORDER
))
{
_RefundOrder
(
orderId
,
-
1
,
"同意退款"
);
_RefundOrder
(
orderId
,
-
1
,
QString
::
fromLocal8Bit
(
"同意退款"
)
);
}
}
...
...
@@ -1479,11 +1479,11 @@ void FlowControl::onSerachOrder(const QString &text)
}
if
(
orderId
.
startsWith
(
text
))
{
orderMap
.
insert
(
"订单号:"
+
orderId
,
"手机号:"
+
phoneId
);
orderMap
.
insert
(
QString
::
fromLocal8Bit
(
"订单号:"
)
+
orderId
,
QString
::
fromLocal8Bit
(
"手机号:"
)
+
phoneId
);
}
if
(
phoneId
.
startsWith
(
text
))
{
orderMap
.
insert
(
"订单号:"
+
orderId
,
"手机号:"
+
phoneId
);
orderMap
.
insert
(
QString
::
fromLocal8Bit
(
"订单号:"
)
+
orderId
,
QString
::
fromLocal8Bit
(
"手机号:"
)
+
phoneId
);
}
}
}
...
...
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