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
97c2a3db
Commit
97c2a3db
authored
Dec 02, 2021
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
POS-Plugin 悬浮框新增 美团-MOD 营业状态展示
parent
e9e6bcf5
Pipeline
#38354
failed with stage
in 0 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
124 additions
and
93 deletions
+124
-93
fmTakeout/Control/SocketCommunicate.cpp
+13
-42
fmTakeout/Control/flowControl.cpp
+34
-11
fmTakeout/Control/flowControl.h
+4
-1
fmTakeout/floatForm.cpp
+43
-37
fmTakeout/floatForm.h
+2
-2
fmTakeout/floatForm.ui
+26
-0
fmTakeout/preDefine.h
+1
-0
run/skin/MtTitle.png
+0
-0
run/skin/deaufult.qrc
+1
-0
run/skin/deaufult.rcc
+0
-0
No files found.
fmTakeout/Control/SocketCommunicate.cpp
View file @
97c2a3db
...
...
@@ -377,7 +377,7 @@ void SocketCommunicate::acceptTcpSvrSendMsg()
data
.
clear
();
QJsonObject
inputJsonObj
;
//<1.1> Case: Recv
HeartBea
t Msg;
//<1.1> Case: Recv
PosAgent Service HeartBeat Reques
t Msg;
if
(
outDataHead
.
type
==
CMD_RECV_HEARTBEAT_REQ
)
{
(
_sslSocket
&&
(
QAbstractSocket
::
ConnectedState
==
_sslSocket
->
state
()
)
)
?
_sslSocket
->
read
(
outDataHead
.
length
)
:
""
;
...
...
@@ -411,7 +411,15 @@ void SocketCommunicate::acceptTcpSvrSendMsg()
<<
(
_isTimeout
?
" TimeOut"
:
" Success"
)
<<
" syncHeartBeatStamp: "
<<
_socketHeartBeatDateTime
.
toString
(
"yyyy-MM-dd hh:mm:ss"
);
continue
;
}
//<1.2> Case: Recv Push OrderStatus Msg;
//<1.2> Case: Recv PosAgent Service Response Plugin'self heartbeat Msg;
else
if
(
outDataHead
.
type
==
CMD_RECV_HEARTBEAT_RESP
)
{
QByteArray
msgData
=
(
_sslSocket
&&
(
QAbstractSocket
::
ConnectedState
==
_sslSocket
->
state
()
)
)
?
_sslSocket
->
read
(
outDataHead
.
length
)
:
""
;
QLOG_INFO
()
<<
"acceptTcpSvrSendMsg:: Recv HeartBeat Response From PosAgnet Success, Sequence: "
<<
outDataHead
.
sequence
<<
" Msg: "
<<
msgData
.
data
();
_socketHeartBeatDateTime
=
QDateTime
::
currentDateTime
();
continue
;
}
//<1.3> Case: Recv Push OrderStatus Msg;
else
if
(
outDataHead
.
type
==
CMD_RECV_MSG_REQ
)
{
// Recv Server Push OrderStatus Msg;
...
...
@@ -456,7 +464,7 @@ void SocketCommunicate::acceptTcpSvrSendMsg()
continue
;
}
//<1.
3
> Case: Recv Auth Login Resp Msg [ impossible];
//<1.
4
> Case: Recv Auth Login Resp Msg [ impossible];
else
if
(
outDataHead
.
type
==
CMD_AUTH_LOGIN_RESP
)
{
// Recv Server Response Msg Of Self Login Request ;
...
...
@@ -502,7 +510,7 @@ void SocketCommunicate::acceptTcpSvrSendMsg()
continue
;
}
//<1.
4
> Case: Recv Socket Msg Type No Process , DataHead.type Havn't Match Success [ Maybe ]; Need Response, Or POS Agent Will Still Push;
//<1.
5
> Case: Recv Socket Msg Type No Process , DataHead.type Havn't Match Success [ Maybe ]; Need Response, Or POS Agent Will Still Push;
else
{
// Recv Pos Agent Pushed Undefine Action Id Msg;
QByteArray
msgData
=
(
_sslSocket
&&
(
QAbstractSocket
::
ConnectedState
==
_sslSocket
->
state
()
)
)
?
_sslSocket
->
read
(
outDataHead
.
length
)
:
""
;
...
...
@@ -697,46 +705,9 @@ bool SocketCommunicate::sendSocketHeart()
return
false
;
}
else
{
QLOG_INFO
()
<<
"sendSocketHeart:: Send HeartBeat To PosAgnet Success , len: "
<<
len
;
_socketHeartBeatDateTime
=
QDateTime
::
currentDateTime
();
}
_isTimeout
=
true
;
{
QEventLoop
loop
;
QTimer
timer
;
connect
(
this
,
&
SocketCommunicate
::
quit
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
&
timer
,
&
QTimer
::
timeout
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
this
,
&
SocketCommunicate
::
readReady
,
&
loop
,
&
QEventLoop
::
quit
);
timer
.
start
(
30
*
1000
);
loop
.
exec
();
}
// <2.1> Read HeartBeat Response Faild;
if
(
_isTimeout
)
{
QLOG_ERROR
()
<<
"sendSocketHeart:: Receive HeartBeat Response From PosAgnet Failed, TimeOut: "
<<
(
_sslSocket
?
_sslSocket
->
errorString
()
:
" _sslSocket Is Null "
);
_sslSocket
?
_sslSocket
->
disconnectFromHost
()
:
0
;
_needTcpLogin
=
1
;
return
false
;
}
// <2.2> Read HeartBeat Response Success;
QByteArray
headByteData
=
(
_sslSocket
&&
(
QAbstractSocket
::
ConnectedState
==
_sslSocket
->
state
()
)
)
?
_sslSocket
->
read
(
sizeof
(
Data_Head
)
)
:
""
;
Data_Head
outDataHead
=
{
0
};
if
(
!
SocketCommuProcess
::
getHeadAllData
(
headByteData
,
outDataHead
)
)
{
QLOG_ERROR
()
<<
"sendSocketHeart:: Receive HeartBeat Head Failed / Msg Too Short Or Msg Type Not Match"
;
(
_sslSocket
&&
(
QAbstractSocket
::
ConnectedState
==
_sslSocket
->
state
()
)
)
?
_sslSocket
->
readAll
()
:
0
;
_sslSocket
?
_sslSocket
->
disconnectFromHost
()
:
0
;
_needTcpLogin
=
1
;
return
false
;
}
// <2.3> Compare Recv HeartBeat Response Body, Maybe Recv Other Normal Type Msg, Will Miss Msg;
QByteArray
body
=
(
_sslSocket
&&
(
QAbstractSocket
::
ConnectedState
==
_sslSocket
->
state
()
)
)
?
_sslSocket
->
read
(
outDataHead
.
length
)
:
""
;
QLOG_INFO
()
<<
"sendSocketHeart:: Receive HeartBeat Response From PosAgnet: "
<<
body
;
// <3> To be confirmed Something;
_socketHeartBeatDateTime
=
QDateTime
::
currentDateTime
();
return
true
;
}
...
...
fmTakeout/Control/flowControl.cpp
View file @
97c2a3db
...
...
@@ -32,6 +32,23 @@ FlowControl &FlowControl::GetInstance()
return
fc
;
}
FlowControl
::~
FlowControl
()
{
QLOG_INFO
()
<<
"FlowControl::~FlowControl()........"
;
m_clearTimer
->
deleteLater
();
m_heartTimer
->
deleteLater
();
m_pullTimer
->
deleteLater
();
m_reportOMSReocrdOrderTimer
->
deleteLater
();
m_loginTimer
->
deleteLater
();
m_notifySimPullTimer
->
deleteLater
();
m_storageOrderTimer
->
deleteLater
();
m_delayGetRefundDetailTimer
->
deleteLater
();
m_remindCasherBlinkFloatTimer
->
deleteLater
();
loaclHttpServer
->
deleteLater
();
}
FlowControl
::
FlowControl
()
{
m_bLoginResult
=
false
;
...
...
@@ -50,6 +67,7 @@ FlowControl::FlowControl()
m_eleStoreStatus
=
UNKNOWNSTORE
;
m_mopStoreStatus
=
UNKNOWNSTORE
;
m_modStoreStatus
=
UNKNOWNSTORE
;
m_mtModStoreStatus
=
UNKNOWNSTORE
;
//初始化上次心跳状态是否异常(false:代表心跳正常 | true:代表心跳异常);
m_bLastHeartIsError
=
false
;
...
...
@@ -1133,9 +1151,10 @@ bool FlowControl::_Login()
m_eleStoreStatus
=
recvJson
[
JSON_ELESTORESTS
].
toInt
();
m_modStoreStatus
=
recvJson
[
JSON_MODSTORESTS
].
toInt
();
m_mopStoreStatus
=
recvJson
[
JSON_MOPSTORESTS
].
toInt
();
QLOG_INFO
()
<<
QString
(
"[<<<<---FlowControl::_Login eleStoreStatus:%1; modStoreStatus:%2; mopStoreStatus:%3; --->>>>]"
)
.
arg
(
m_eleStoreStatus
).
arg
(
m_modStoreStatus
).
arg
(
m_mopStoreStatus
);
emit
doUpdateStoreStatus
(
m_eleStoreStatus
,
m_modStoreStatus
,
m_mopStoreStatus
);
m_mtModStoreStatus
=
recvJson
[
JSON_MTMODSTORESTS
].
toInt
();
QLOG_INFO
()
<<
QString
(
"[<<<<---FlowControl::_Login eleStoreStatus: %1, modStoreStatus: %2, mopStoreStatus: %3, mtModStoreStatus: %4 --->>>>]"
)
.
arg
(
m_eleStoreStatus
).
arg
(
m_modStoreStatus
).
arg
(
m_mopStoreStatus
).
arg
(
m_mtModStoreStatus
);
emit
doUpdateStoreStatus
(
m_eleStoreStatus
,
m_modStoreStatus
,
m_mopStoreStatus
,
m_mtModStoreStatus
);
//***********************登陆时获取门店的营业状态 end ************************//
m_bLoginResult
=
true
;
...
...
@@ -1383,7 +1402,7 @@ bool FlowControl::_SendHeart()
{
m_bLastHeartIsError
=
true
;
emit
setNetStatus
(
QString
::
fromLocal8Bit
(
"<font color='#ff0000'>网络不稳定,正在重试</font>"
));
emit
doUpdateStoreStatus
(
0
,
0
,
0
);
//NetWork Is Error , Refresh Store Default Status;
emit
doUpdateStoreStatus
(
0
,
0
,
0
,
0
);
//NetWork Is Error , Refresh Store Default Status;
}
else
{
QLOG_INFO
()
<<
QString
(
"[<<<<---Send Heart Finish: code:%1--->>>>]"
).
arg
(
recvJson
[
JSON_LOGINCODE
].
toInt
());
...
...
@@ -1392,7 +1411,7 @@ bool FlowControl::_SendHeart()
result
=
false
;
m_bLastHeartIsError
=
true
;
emit
setNetStatus
(
QString
::
fromLocal8Bit
(
"<font color='#ff0000'>网络不稳定,正在重试</font>"
));
emit
doUpdateStoreStatus
(
0
,
0
,
0
);
//Interface Return Error , Refresh Store Default Status;
emit
doUpdateStoreStatus
(
0
,
0
,
0
,
0
);
//Interface Return Error , Refresh Store Default Status;
}
else
{
result
=
true
;
emit
setNetStatus
(
QString
::
fromLocal8Bit
(
"<font color='#f5f5f5'>正常</font>"
));
...
...
@@ -1407,9 +1426,12 @@ bool FlowControl::_SendHeart()
if
(
recvJson
.
contains
(
JSON_MOPSTORESTS
)
)
{
m_mopStoreStatus
=
recvJson
[
JSON_MOPSTORESTS
].
toInt
();
}
QLOG_INFO
()
<<
QString
(
"[<<<<---FlowControl::_SendHeart eleStoreStatus:%1;modStoreStatus:%2;mopStoreStatus:%3 --->>>>]"
).
arg
(
m_eleStoreStatus
).
arg
(
m_modStoreStatus
).
arg
(
m_mopStoreStatus
);
emit
doUpdateStoreStatus
(
m_eleStoreStatus
,
m_modStoreStatus
,
m_mopStoreStatus
);
if
(
recvJson
.
contains
(
JSON_MTMODSTORESTS
)
)
{
m_mtModStoreStatus
=
recvJson
[
JSON_MTMODSTORESTS
].
toInt
();
}
QLOG_INFO
()
<<
QString
(
"[<<<<---FlowControl::_SendHeart eleStoreStatus: %1, modStoreStatus: %2 , mopStoreStatus: %3 , mtModStoreStatus: %4 --->>>>]"
).
arg
(
m_eleStoreStatus
).
arg
(
m_modStoreStatus
).
arg
(
m_mopStoreStatus
).
arg
(
m_mtModStoreStatus
);
emit
doUpdateStoreStatus
(
m_eleStoreStatus
,
m_modStoreStatus
,
m_mopStoreStatus
,
m_mtModStoreStatus
);
//还原并标记上一次心跳为正常状态;
m_bLastHeartIsError
=
false
;
}
...
...
@@ -2513,10 +2535,11 @@ bool FlowControl::_ResponseOMS12Request(const QJsonObject &content, QJsonObject
m_eleStoreStatus
=
content
[
JSON_ELESTORESTS
].
toInt
();
m_modStoreStatus
=
content
[
JSON_MODSTORESTS
].
toInt
();
m_mopStoreStatus
=
content
[
JSON_MOPSTORESTS
].
toInt
();
QLOG_INFO
()
<<
QString
(
"[<<<<---FlowControl::_ResponseOMS12Request eleStoreStatus:%1;modStoreStatus:%2;mopStoreStatus:%3 --->>>>]"
).
arg
(
m_eleStoreStatus
).
arg
(
m_modStoreStatus
).
arg
(
m_mopStoreStatus
);
m_mtModStoreStatus
=
content
[
JSON_MTMODSTORESTS
].
toInt
();
QLOG_INFO
()
<<
QString
(
"[<<<<---FlowControl::_ResponseOMS12Request eleStoreStatus: %1, modStoreStatus: %2 , mopStoreStatus: %3 , mtModStoreStatus: %4 --->>>>]"
).
arg
(
m_eleStoreStatus
).
arg
(
m_modStoreStatus
).
arg
(
m_mopStoreStatus
).
arg
(
m_mtModStoreStatus
);
emit
doUpdateStoreStatus
(
m_eleStoreStatus
,
m_modStoreStatus
,
m_mop
StoreStatus
);
emit
doUpdateStoreStatus
(
m_eleStoreStatus
,
m_modStoreStatus
,
m_mopStoreStatus
,
m_mtMod
StoreStatus
);
error
=
QString
(
"success"
);
result
=
true
;
...
...
fmTakeout/Control/flowControl.h
View file @
97c2a3db
...
...
@@ -26,6 +26,8 @@ class FlowControl : public QObject
public
:
static
FlowControl
&
GetInstance
();
~
FlowControl
();
/* 功能:获取目前插件FC 核心数据;
* 参数: 1. 是否登录成功; 2.门店号; 3.PosPluginIp; 4.PosPlugin Port;
* 返回: Void;
...
...
@@ -121,6 +123,7 @@ private:
int
m_eleStoreStatus
;
int
m_mopStoreStatus
;
int
m_modStoreStatus
;
int
m_mtModStoreStatus
;
bool
m_bLastHeartIsError
;
int
m_orderCount
;
int
m_clickPosCount
;
...
...
@@ -239,7 +242,7 @@ signals:
* 参数:1 [ele开关店状态] 2[MOD开关店状态] 3[MOP开关店状态]
* 返回:Null
* */
void
doUpdateStoreStatus
(
int
eleStoreStatus
,
int
modStoreStatus
,
int
mop
StoreStatus
);
void
doUpdateStoreStatus
(
int
eleStoreStatus
,
int
modStoreStatus
,
int
mopStoreStatus
,
int
mt
StoreStatus
);
/* 功能:设置主界面门店信息
...
...
fmTakeout/floatForm.cpp
View file @
97c2a3db
...
...
@@ -234,71 +234,77 @@ void FloatForm::onUnLockFloatForm(){
}
}
void
FloatForm
::
onUpdateStoreStatus
(
int
eleStoreStatus
,
int
modStoreStatus
,
int
mopStoreStatus
){
QLOG_INFO
()
<<
QString
(
"[<<<----FloatForm::onUpdateStoreStatus:eleStoreStatus, modStoreStatus, mopStoreStatus: --->>>>]"
)
<<
eleStoreStatus
<<
modStoreStatus
<<
mopStoreStatus
;
RefreshStoreStatus
(
eleStoreStatus
,
modStoreStatus
,
mopStoreStatus
);
void
FloatForm
::
onUpdateStoreStatus
(
int
eleStoreStatus
,
int
modStoreStatus
,
int
mopStoreStatus
,
int
mtStoreStatus
){
QLOG_INFO
()
<<
QString
(
"[<<<----FloatForm::onUpdateStoreStatus: eleStoreStatus: %1, modStoreStatus: %2, mopStoreStatus: %3, mtStoreStatus: %4 --->>>>]"
)
.
arg
(
eleStoreStatus
).
arg
(
modStoreStatus
).
arg
(
mopStoreStatus
).
arg
(
mtStoreStatus
);
RefreshStoreStatus
(
eleStoreStatus
,
modStoreStatus
,
mopStoreStatus
,
mtStoreStatus
);
}
void
FloatForm
::
RefreshStoreStatus
(
int
eleStoreStatus
,
int
modStoreStatus
,
int
mop
StoreStatus
){
void
FloatForm
::
RefreshStoreStatus
(
int
eleStoreStatus
,
int
modStoreStatus
,
int
mopStoreStatus
,
int
mt
StoreStatus
){
QLOG_INFO
()
<<
QString
(
"[<<<----FloatForm::RefreshStoreStatus:--->>>>]"
);
int
titleLab_w
=
35
,
titleLab_h
=
14
,
statusLab_w
=
30
,
statusLab_h
=
14
;
int
first_x
=
15
,
first_y
=
35
,
col_interval
=
15
,
row_interval
=
10
;
//准备MOD门店营业状态Label;
this
->
ui
->
Mod1Lable
->
resize
(
56
,
14
);
//图片源文件大小
this
->
ui
->
Mod1Lable
->
move
(
10
,
40
);
//左边距10像素;
this
->
ui
->
Mod1Lable
->
setPixmap
(
QPixmap
(
":ModTitle.png"
));
this
->
ui
->
Mod2Lable
->
resize
(
44
,
20
);
//图片源文件大小
this
->
ui
->
Mod2Lable
->
move
(
70
,
36
);
// 在 Mod1Lable 基础上 x+4; y-4;
this
->
ui
->
Mod1Lable
->
move
(
first_x
,
first_y
);
//左边距 first_x 像素; 上边距: first_y 像素;
this
->
ui
->
Mod1Lable
->
setPixmap
(
QPixmap
(
":ModTitle.png"
).
scaled
(
titleLab_w
,
titleLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
this
->
ui
->
Mod2Lable
->
move
(
first_x
+
titleLab_w
+
col_interval
,
first_y
);
if
(
1
==
modStoreStatus
){
this
->
ui
->
Mod2Lable
->
setPixmap
(
QPixmap
(
":StoreOn.png"
)
);
this
->
ui
->
Mod2Lable
->
setPixmap
(
QPixmap
(
":StoreOn.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
else
if
(
2
==
modStoreStatus
){
this
->
ui
->
Mod2Lable
->
setPixmap
(
QPixmap
(
":StoreOff.png"
)
);
this
->
ui
->
Mod2Lable
->
setPixmap
(
QPixmap
(
":StoreOff.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
else
{
this
->
ui
->
Mod2Lable
->
setPixmap
(
QPixmap
(
":StoreDef.png"
)
);
this
->
ui
->
Mod2Lable
->
setPixmap
(
QPixmap
(
":StoreDef.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
//准备Eleme门店营业状态Label;
this
->
ui
->
Eleme1Lable
->
resize
(
43
,
14
);
//图片源文件大小
this
->
ui
->
Eleme1Lable
->
move
(
10
,
66
);
//左边距10像素;高度距离上面一个标签 高度 + 10 像素间隔;
this
->
ui
->
Eleme1Lable
->
setPixmap
(
QPixmap
(
":ElemeTitle.png"
));
this
->
ui
->
Eleme2Lable
->
resize
(
44
,
20
);
//图片源文件大小
this
->
ui
->
Eleme2Lable
->
move
(
70
,
62
);
// x 与 Mod1Lable 对齐; y-4;
this
->
ui
->
Eleme1Lable
->
move
(
first_x
,
first_y
+
1
*
(
titleLab_h
+
row_interval
)
);
this
->
ui
->
Eleme1Lable
->
setPixmap
(
QPixmap
(
":ElemeTitle.png"
).
scaled
(
titleLab_w
,
titleLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
this
->
ui
->
Eleme2Lable
->
move
(
first_x
+
titleLab_w
+
col_interval
,
first_y
+
1
*
(
statusLab_h
+
row_interval
)
);
if
(
1
==
eleStoreStatus
){
this
->
ui
->
Eleme2Lable
->
setPixmap
(
QPixmap
(
":StoreOn.png"
)
);
this
->
ui
->
Eleme2Lable
->
setPixmap
(
QPixmap
(
":StoreOn.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
else
if
(
2
==
eleStoreStatus
){
this
->
ui
->
Eleme2Lable
->
setPixmap
(
QPixmap
(
":StoreOff.png"
)
);
this
->
ui
->
Eleme2Lable
->
setPixmap
(
QPixmap
(
":StoreOff.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
else
{
this
->
ui
->
Eleme2Lable
->
setPixmap
(
QPixmap
(
":StoreDef.png"
)
);
this
->
ui
->
Eleme2Lable
->
setPixmap
(
QPixmap
(
":StoreDef.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
//准备Mop门店营业状态Label;
this
->
ui
->
Mop1Lable
->
resize
(
56
,
14
);
//图片源文件大小
this
->
ui
->
Mop1Lable
->
move
(
10
,
92
);
//左边距10像素;高度距离上面一个标签 高度 + 10 像素间隔;
this
->
ui
->
Mop1Lable
->
setPixmap
(
QPixmap
(
":MopTitle.png"
));
this
->
ui
->
Mop2Lable
->
resize
(
44
,
20
);
//图片源文件大小
this
->
ui
->
Mop2Lable
->
move
(
70
,
88
);
// x 与 Mod1Lable 对齐; y-4;
this
->
ui
->
Mop1Lable
->
move
(
first_x
,
first_y
+
2
*
(
titleLab_h
+
row_interval
)
);
this
->
ui
->
Mop1Lable
->
setPixmap
(
QPixmap
(
":MopTitle.png"
).
scaled
(
titleLab_w
,
titleLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
this
->
ui
->
Mop2Lable
->
move
(
first_x
+
titleLab_w
+
col_interval
,
first_y
+
2
*
(
statusLab_h
+
row_interval
)
);
if
(
1
==
mopStoreStatus
){
this
->
ui
->
Mop2Lable
->
setPixmap
(
QPixmap
(
":StoreOn.png"
)
);
this
->
ui
->
Mop2Lable
->
setPixmap
(
QPixmap
(
":StoreOn.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
else
if
(
2
==
mopStoreStatus
)
{
this
->
ui
->
Mop2Lable
->
setPixmap
(
QPixmap
(
":StoreOff.png"
)
);
this
->
ui
->
Mop2Lable
->
setPixmap
(
QPixmap
(
":StoreOff.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
else
{
this
->
ui
->
Mop2Lable
->
setPixmap
(
QPixmap
(
":StoreDef.png"
));
this
->
ui
->
Mop2Lable
->
setPixmap
(
QPixmap
(
":StoreDef.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
//准备美团 门店营业状态Label;
this
->
ui
->
Mt1Lable
->
move
(
first_x
,
first_y
+
3
*
(
titleLab_h
+
row_interval
)
);
this
->
ui
->
Mt1Lable
->
setPixmap
(
QPixmap
(
":MtTitle.png"
).
scaled
(
titleLab_w
,
titleLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
this
->
ui
->
Mt2Lable
->
move
(
first_x
+
titleLab_w
+
col_interval
,
first_y
+
3
*
(
titleLab_h
+
row_interval
)
);
if
(
1
==
mtStoreStatus
){
this
->
ui
->
Mt2Lable
->
setPixmap
(
QPixmap
(
":StoreOn.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
else
if
(
2
==
mtStoreStatus
)
{
this
->
ui
->
Mt2Lable
->
setPixmap
(
QPixmap
(
":StoreOff.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
else
{
this
->
ui
->
Mt2Lable
->
setPixmap
(
QPixmap
(
":StoreDef.png"
).
scaled
(
statusLab_w
,
statusLab_h
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
//准备订单管理状态Label;
this
->
ui
->
OrderManagerLable
->
resize
(
120
,
36
);
//图片源文件大小; x缩小10像素;
this
->
ui
->
OrderManagerLable
->
move
(
2
,
118
);
//左边距0像素;高度距离上面一个标签 高度 + 10 像素间隔;
this
->
ui
->
OrderManagerLable
->
setPixmap
(
QPixmap
(
":NomalOrderManager.png"
));
this
->
ui
->
OrderManagerLable
->
move
(
3
,
122
);
this
->
ui
->
OrderManagerLable
->
setPixmap
(
QPixmap
(
":NomalOrderManager.png"
).
scaled
(
110
,
30
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
void
FloatForm
::
RefreshOrderManagerStatus
(
int
existNewOrder
){
QLOG_INFO
()
<<
QString
(
"[<<<----FloatForm::RefreshOrderManagerStatus:%1--->>>>]"
).
arg
(
existNewOrder
);
if
(
existNewOrder
){
//有新订单;
this
->
ui
->
OrderManagerLable
->
resize
(
120
,
36
);
//图片源文件大小; x缩小10像素;
this
->
ui
->
OrderManagerLable
->
move
(
2
,
118
);
//左边距0像素;高度距离上面一个标签 高度 + 10 像素间隔;
this
->
ui
->
OrderManagerLable
->
setPixmap
(
QPixmap
(
":ComeNewOrder.png"
));
this
->
ui
->
OrderManagerLable
->
move
(
3
,
122
);
this
->
ui
->
OrderManagerLable
->
setPixmap
(
QPixmap
(
":ComeNewOrder.png"
).
scaled
(
110
,
30
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
else
{
//无新订单;
this
->
ui
->
OrderManagerLable
->
resize
(
120
,
36
);
//图片源文件大小; x缩小10像素;
this
->
ui
->
OrderManagerLable
->
move
(
2
,
118
);
//左边距0像素;高度距离上面一个标签 高度 + 10 像素间隔;
this
->
ui
->
OrderManagerLable
->
setPixmap
(
QPixmap
(
":NomalOrderManager.png"
));
this
->
ui
->
OrderManagerLable
->
move
(
3
,
122
);
this
->
ui
->
OrderManagerLable
->
setPixmap
(
QPixmap
(
":NomalOrderManager.png"
).
scaled
(
110
,
30
,
Qt
::
IgnoreAspectRatio
,
Qt
::
SmoothTransformation
)
);
}
}
fmTakeout/floatForm.h
View file @
97c2a3db
...
...
@@ -119,13 +119,13 @@ public slots:
* 参数:1 [ele开关店状态] 2[MOD开关店状态] 3[MOP开关店状态]
* 返回:NULL
* */
void
onUpdateStoreStatus
(
int
eleStoreStatus
,
int
modStoreStatus
,
int
mop
StoreStatus
);
void
onUpdateStoreStatus
(
int
eleStoreStatus
,
int
modStoreStatus
,
int
mopStoreStatus
,
int
mt
StoreStatus
);
/* 功能:更新多渠道门店营业状态显示;
* 参数:1 [ele开关店状态] 2[MOD开关店状态] 3[MOP开关店状态]
* 返回:NULL
* */
void
RefreshStoreStatus
(
int
eleStoreStatus
=
0
,
int
modStoreStatus
=
0
,
int
mop
StoreStatus
=
0
);
void
RefreshStoreStatus
(
int
eleStoreStatus
=
0
,
int
modStoreStatus
=
0
,
int
mopStoreStatus
=
0
,
int
mt
StoreStatus
=
0
);
/* 功能:新订单到POS更新悬浮框显示;
* 参数:1 [是否存在新订单]
...
...
fmTakeout/floatForm.ui
View file @
97c2a3db
...
...
@@ -119,6 +119,32 @@
<string/>
</property>
</widget>
<widget class="QLabel" name="Mt1Lable">
<property name="geometry">
<rect>
<x>0</x>
<y>100</y>
<width>51</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="Mt2Lable">
<property name="geometry">
<rect>
<x>60</x>
<y>90</y>
<width>51</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
</item>
</layout>
...
...
fmTakeout/preDefine.h
View file @
97c2a3db
...
...
@@ -95,6 +95,7 @@
#define JSON_ELESTORESTS "eleStoreStatus"
#define JSON_MODSTORESTS "modStoreStatus"
#define JSON_MOPSTORESTS "mopStoreStatus"
#define JSON_MTMODSTORESTS "mtModStoreStatus"
#define JSON_SKIPRECORDPOS "skipRecord"
#define JSON_PASSWORD "password"
#define JSON_IPADDRESS "iPAddress"
...
...
run/skin/MtTitle.png
0 → 100644
View file @
97c2a3db
2.21 KB
run/skin/deaufult.qrc
View file @
97c2a3db
...
...
@@ -40,6 +40,7 @@
<file>ComeNewOrder.png</file>
<file>NomalOrderManager.png</file>
<file>ElemeTitle.png</file>
<file>MtTitle.png</file>
<file>ModTitle.png</file>
<file>MopTitle.png</file>
<file>StoreOff.png</file>
...
...
run/skin/deaufult.rcc
View file @
97c2a3db
No preview for this file type
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