Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmtakeout
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
李定达
fmtakeout
Commits
7078eb4e
Commit
7078eb4e
authored
Nov 26, 2018
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.调整标签打印大小;2.调整网络异常错误提示;
parent
191a20ff
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
10 deletions
+45
-10
takeout/base/Print/printlib.cpp
+11
-3
takeout/control/ordergetwork.cpp
+2
-1
takeout/control/ordergetwork.h
+2
-2
takeout/view/floatForm.cpp
+28
-4
takeout/view/floatForm.h
+2
-0
No files found.
takeout/base/Print/printlib.cpp
View file @
7078eb4e
...
...
@@ -97,6 +97,8 @@ void PrintLib::_PrintLab( OrderObject* order)
f_TSCInit
();
//qDebug() << "f_TSCInit";
QString
title
=
QString
(
" %2 %4/%5"
).
arg
(
datetime
,
QString
::
number
(
++
index
),
QString
::
number
(
allprod
));
QString
tmptitle
;
...
...
@@ -123,9 +125,13 @@ void PrintLib::_PrintLab( OrderObject* order)
QString
prodname
=
dish
->
name
;
qDebug
()
<<
"input9:"
<<
prodname
;
//prodname= "dklahsdkjadhaksjdhkasjdhkajsd11231222222222222222312312312312";
f_TSCWinPrintln
(
0
,
0
,
22
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
tmptitle
.
toLocal8Bit
().
data
(),
0
);
f_TSCWinPrintln
(
0
,
0
,
22
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
"-----------------------------------"
,
0.0266666
);
f_TSCWinPrintln
(
10
,
0
,
30
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
prodname
.
f_TSCWinPrintln
(
10
,
0
,
24
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
prodname
.
append
(
" ¥"
).
append
(
QString
::
number
(
dish
->
price
/
100.0
,
'f'
,
2
)).
toLocal8Bit
().
data
(),
0.0666665
);
QString
property_tags
;
...
...
@@ -146,9 +152,11 @@ void PrintLib::_PrintLab( OrderObject* order)
f_TSCWinPrintln
(
10
,
0
,
24
,
0
,
2
,
2
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
property_tags
.
toLocal8Bit
().
data
(),
0.0666665
);
//预约送达
QString
sendtimes
=
QString
(
"
\xE9\xA2\x84\xE7\xBA\xA6\xE9\x80\x81\xE8\xBE\xBE\x3A
"
);
//QString sendtimes = QString("\xE9\xA2\x84\xE7\xBA\xA6\xE9\x80\x81\xE8\xBE\xBE\x3A");
QString
sendtimes
=
QString
(
""
);
QLOG_DEBUG
()
<<
"tmpdelitime : "
<<
tmpdelitime
<<
order
->
srcdlv_time
;
//
QLOG_DEBUG() << "tmpdelitime : " << tmpdelitime << order->srcdlv_time;
if
(
tmpdelitime
!=
0
/*&& (order->order_type == 1 || order->order_type == 2)*/
)
{
...
...
takeout/control/ordergetwork.cpp
View file @
7078eb4e
...
...
@@ -100,6 +100,7 @@ void OrderGetWork::workstart()
QTimer
::
singleShot
(
tmptime
*
1000
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
this
,
&
OrderGetWork
::
quit
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
this
,
&
OrderGetWork
::
quitwork
,
&
loop
,
&
QEventLoop
::
quit
);
loop
.
exec
();
}
...
...
@@ -589,7 +590,7 @@ bool OrderGetWork::event(QEvent *e)
if
(
e
->
type
()
==
PosEvent
::
s_need_get_order
)
{
QLOG_INFO
()
<<
QThread
::
currentThreadId
()
<<
"OrderGetWork PosEvent::s_need_get_order"
;
emit
quit
();
emit
quit
work
();
return
true
;
}
...
...
takeout/control/ordergetwork.h
View file @
7078eb4e
...
...
@@ -73,8 +73,8 @@ public:
public
slots
:
void
workstart
();
//
signals:
// void quit
();
signals
:
void
quitwork
();
private
:
//设置门店信息
...
...
takeout/view/floatForm.cpp
View file @
7078eb4e
...
...
@@ -33,6 +33,7 @@ FloatForm::FloatForm(QWidget *parent) :
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_show_float
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_delete_order
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_login_status
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_network_outtime
);
m_bReminding
=
false
;
...
...
@@ -115,12 +116,14 @@ bool FloatForm::event(QEvent *e)
if
(
!
oldorder
&&
((
orderstatus
==
NewOrder
&&
autoconf
.
toInt
()
==
0
)
||
(
orderstatus
==
FirmOrder
&&
autoconf
.
toInt
()
==
1
))
&&
refundstatus
!=
ApplicationRefundOrder
&&
refundstatus
!=
ApplicationPartialRefundOrder
&&
refundstatus
!=
RefusingRefundOrder
)
{
m_play_flag
=
false
;
onStartRemind
(
0
);
return
true
;
}
if
((
refundstatus
==
ApplicationRefundOrder
||
refundstatus
==
ApplicationPartialRefundOrder
))
{
m_play_flag
=
false
;
onStartRemind
(
1
);
return
true
;
}
...
...
@@ -134,6 +137,26 @@ bool FloatForm::event(QEvent *e)
return
true
;
}
if
(
e
->
type
()
==
PosEvent
::
s_network_outtime
)
{
if
(
!
this
->
isHidden
())
{
QVariantMap
value
;
GETEVENTINFO
(
value
,
e
,
QVariantMap
);
if
(
value
.
contains
(
EVENT_KEY_NETWORKSTATUS
)
&&
value
[
EVENT_KEY_NETWORKSTATUS
].
toBool
()
==
true
)
{
this
->
onStopRemind
();
}
else
{
m_play_flag
=
true
;
onStartRemind
(
2
);
}
}
return
true
;
}
if
(
e
->
type
()
==
PosEvent
::
s_delete_order
)
{
int
tk_new
=
0
,
tk_make
=
0
,
tk_send
=
0
,
tk_refund
=
0
;
...
...
@@ -301,6 +324,7 @@ void FloatForm::_Blink()
void
FloatForm
::
_PlayWav
()
{
if
(
m_play_flag
==
false
&&
m_bReminding
==
true
)
QSound
::
play
(
m_remindWav
);
if
(
m_bReminding
)
{
...
...
@@ -352,7 +376,10 @@ void FloatForm::onStartRemind(int type)
m_wavPlayInterval
=
ConfigManger
::
GetInstance
().
GetSoundInterval
()
+
VALUE_REFUNDORDERTIME
;
ui
->
label_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"您有新的退单了!
\r\n
点击打开查看订单!"
));
break
;
case
2
:
ui
->
label_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"网络异常!"
));
}
if
(
m_bReminding
)
{
return
;
...
...
@@ -375,11 +402,8 @@ void FloatForm::onStartRemind(int type)
void
FloatForm
::
onStopRemind
()
{
// if(m_bReminding)
// {
// _UdpRadio("msg1.wav",0,m_wavPlayInterval);
// }
m_bReminding
=
false
;
m_play_flag
=
false
;
}
void
FloatForm
::
onShow
()
...
...
takeout/view/floatForm.h
View file @
7078eb4e
...
...
@@ -54,6 +54,8 @@ private:
QTimer
m_remindTimer
;
// 是否登录成功
bool
m_is_login
;
//停止标识
bool
m_play_flag
;
/* 功能:初始化
* 参数:NULL
* 返回:NULL
...
...
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