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
840b9052
Commit
840b9052
authored
Apr 16, 2019
by
xiaoqing.gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、后厨打印添加属性字段 2、优化未登录退出不干净的bug 3、优化交接班打印(点击打印按钮后时间更新,下次打印开始时间缓存更新)
parent
756f75c9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
178 additions
and
148 deletions
+178
-148
takeout/base/Print/newprintlib.cpp
+18
-0
takeout/control/driverinfogetwork.cpp
+14
-9
takeout/control/driverinfogetwork.h
+0
-2
takeout/preDefine.h
+1
-0
takeout/takeout.pro
+137
-136
takeout/view/newchangeshiftsform.cpp
+8
-1
No files found.
takeout/base/Print/newprintlib.cpp
View file @
840b9052
...
@@ -187,6 +187,9 @@ void NewPrintLib::AddProdJson(OrderObject &des_order, ProductObject* prod)
...
@@ -187,6 +187,9 @@ void NewPrintLib::AddProdJson(OrderObject &des_order, ProductObject* prod)
object
[
"price"
]
=
prod
->
price
;
object
[
"price"
]
=
prod
->
price
;
object
[
"name"
]
=
prod
->
name
;
object
[
"name"
]
=
prod
->
name
;
object
[
"product_amount"
]
=
prod
->
product_amount
;
object
[
"product_amount"
]
=
prod
->
product_amount
;
//加入属性字段
object
[
"property_tags"
]
=
prod
->
property_tags
;
array
.
append
(
object
);
array
.
append
(
object
);
des_order
.
_orderObject
[
"products"
]
=
array
;
des_order
.
_orderObject
[
"products"
]
=
array
;
...
@@ -306,6 +309,13 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
...
@@ -306,6 +309,13 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
QLOG_DEBUG
()
<<
"NewPrintLib::type:"
<<
type
;
QLOG_DEBUG
()
<<
"NewPrintLib::type:"
<<
type
;
//桌号设置
if
(
orderObj
.
contains
(
"table_number"
)
&&
orderObj
[
"table_number"
].
toString
()
!=
""
)
{
QLOG_DEBUG
()
<<
"NewPrintLib::table_number:"
<<
orderObj
[
"table_number"
].
toString
();
tmporder
.
_orderObject
[
"table_number"
]
=
QString
(
orderObj
[
"table_number"
].
toString
()
+
QString
::
fromLocal8Bit
(
TABLE_NUMBER
));
QLOG_DEBUG
()
<<
"NewPrintLib::new_table_number:"
<<
tmporder
.
_orderObject
[
"table_number"
].
toString
();
}
//表头设置
//表头设置
QString
channel
=
orderObj
[
"channel"
].
toString
();
QString
channel
=
orderObj
[
"channel"
].
toString
();
...
@@ -674,6 +684,14 @@ bool NewPrintLib::DoBackPrint(int page_depart, int prod_depart, int page_num, co
...
@@ -674,6 +684,14 @@ bool NewPrintLib::DoBackPrint(int page_depart, int prod_depart, int page_num, co
QLOG_DEBUG
()
<<
"NewPrintLib::type:"
<<
type
;
QLOG_DEBUG
()
<<
"NewPrintLib::type:"
<<
type
;
//桌号设置
if
(
orderObj
.
contains
(
"table_number"
)
&&
orderObj
[
"table_number"
].
toString
()
!=
""
)
{
QLOG_DEBUG
()
<<
"NewPrintLib::table_number:"
<<
orderObj
[
"table_number"
].
toString
();
tmporder
.
_orderObject
[
"table_number"
]
=
QString
(
orderObj
[
"table_number"
].
toString
()
+
QString
::
fromLocal8Bit
(
TABLE_NUMBER
));
QLOG_DEBUG
()
<<
"NewPrintLib::new_table_number:"
<<
tmporder
.
_orderObject
[
"table_number"
].
toString
();
}
QString
channel
=
orderObj
[
"channel"
].
toString
();
QString
channel
=
orderObj
[
"channel"
].
toString
();
QLOG_DEBUG
()
<<
"NewPrintLib::channel:"
<<
channel
;
QLOG_DEBUG
()
<<
"NewPrintLib::channel:"
<<
channel
;
...
...
takeout/control/driverinfogetwork.cpp
View file @
840b9052
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
DriverInfoGetWork
::
DriverInfoGetWork
(
WorkObject
*
parent
)
:
WorkObject
(
parent
)
DriverInfoGetWork
::
DriverInfoGetWork
(
WorkObject
*
parent
)
:
WorkObject
(
parent
)
{
{
_islogin
=
false
;
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_get_order_status
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_get_order_status
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_token_change
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_token_change
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_login_storeinfo
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_login_storeinfo
);
...
@@ -69,8 +68,6 @@ bool DriverInfoGetWork::event(QEvent *e)
...
@@ -69,8 +68,6 @@ bool DriverInfoGetWork::event(QEvent *e)
_storeinfo
=
storeinfo
;
_storeinfo
=
storeinfo
;
_islogin
=
true
;
return
true
;
return
true
;
}
}
...
@@ -99,12 +96,20 @@ void DriverInfoGetWork::workstart()
...
@@ -99,12 +96,20 @@ void DriverInfoGetWork::workstart()
}
}
//加入登陆标志位,防止未登录线程启动后阻塞,导致未登录退出阻塞
//加入登陆标志位,防止未登录线程启动后阻塞,导致未登录退出阻塞
if
(
_islogin
)
// if(_islogin)
{
// {
QEventLoop
loop
;
// QEventLoop loop;
connect
(
this
,
&
DriverInfoGetWork
::
quitGetWork
,
&
loop
,
&
QEventLoop
::
quit
);
// connect(this, &DriverInfoGetWork::quitGetWork, &loop, &QEventLoop::quit);
loop
.
exec
();
// connect(this, &DriverInfoGetWork::quit, &loop, &QEventLoop::quit);
}
// loop.exec();
// }
QEventLoop
loop
;
connect
(
this
,
&
DriverInfoGetWork
::
quitGetWork
,
&
loop
,
&
QEventLoop
::
quit
);
connect
(
this
,
&
DriverInfoGetWork
::
quit
,
&
loop
,
&
QEventLoop
::
quit
);
loop
.
exec
();
QLOG_DEBUG
()
<<
"DriverInfoGetWork::workstart loop start"
;
QLOG_DEBUG
()
<<
"DriverInfoGetWork::workstart loop start"
;
...
...
takeout/control/driverinfogetwork.h
View file @
840b9052
...
@@ -45,8 +45,6 @@ private:
...
@@ -45,8 +45,6 @@ private:
QString
_url
;
QString
_url
;
bool
_islogin
;
};
};
class
GetDriverInfoDataProcess
class
GetDriverInfoDataProcess
...
...
takeout/preDefine.h
View file @
840b9052
...
@@ -272,6 +272,7 @@
...
@@ -272,6 +272,7 @@
#define ORDER_TYPE_TIMELYINVITE "小程序自提"
#define ORDER_TYPE_TIMELYINVITE "小程序自提"
#define ORDER_TYPE_APPOINTMENTTAKEOUT "小程序外卖预约"
#define ORDER_TYPE_APPOINTMENTTAKEOUT "小程序外卖预约"
#define ORDER_TYPE_APPOINTMENTINVITE "小程序自提预约"
#define ORDER_TYPE_APPOINTMENTINVITE "小程序自提预约"
#define TABLE_NUMBER "桌"
#define ORDER_THIRD_TIMELYTAKEOUT "外卖"
#define ORDER_THIRD_TIMELYTAKEOUT "外卖"
#define ORDER_THIRD_TIMELYINVITE "自提"
#define ORDER_THIRD_TIMELYINVITE "自提"
...
...
takeout/takeout.pro
View file @
840b9052
...
@@ -27,150 +27,151 @@ DEFINES += FM_NEW_UI
...
@@ -27,150 +27,151 @@ DEFINES += FM_NEW_UI
#DEFINES += FM_TEST
#DEFINES += FM_TEST
#DEFINES += FM_MAIN_TEST
#DEFINES += FM_MAIN_TEST
#DEFINES += FM_ORDER_TEST
#DEFINES += FM_ORDER_TEST
RC_FILE
+=
takeout
.
rc
RC_FILE
+=
$$
PWD
/
takeout
.
rc
CONFIG
+=
c
++
11
CONFIG
+=
c
++
11
SOURCES
+=
main
.
cpp
\
SOURCES
+=
event
/
fmapplication
.
cpp
\
$$
PWD
/
main
.
cpp
\
event
/
posevent
.
cpp
\
$$
PWD
/
event
/
fmapplication
.
cpp
\
model
/
baseObject
.
cpp
\
$$
PWD
/
event
/
posevent
.
cpp
\
model
/
cashierObject
.
cpp
\
$$
PWD
/
model
/
baseObject
.
cpp
\
model
/
deliverObject
.
cpp
\
$$
PWD
/
model
/
cashierObject
.
cpp
\
model
/
orderObject
.
cpp
\
$$
PWD
/
model
/
deliverObject
.
cpp
\
model
/
posorderpool
.
cpp
\
$$
PWD
/
model
/
orderObject
.
cpp
\
model
/
productObject
.
cpp
\
$$
PWD
/
model
/
posorderpool
.
cpp
\
base
/
Network
/
billSocket
.
cpp
\
$$
PWD
/
model
/
productObject
.
cpp
\
control
/
orderpushwork
.
cpp
\
$$
PWD
/
base
/
Network
/
billSocket
.
cpp
\
base
/
Config
/
configManger
.
cpp
\
$$
PWD
/
control
/
orderpushwork
.
cpp
\
view
/
alertForm
.
cpp
\
$$
PWD
/
base
/
Config
/
configManger
.
cpp
\
view
/
floatForm
.
cpp
\
$$
PWD
/
view
/
alertForm
.
cpp
\
view
/
mainForm
.
cpp
\
$$
PWD
/
view
/
floatForm
.
cpp
\
view
/
padForm
.
cpp
\
$$
PWD
/
view
/
mainForm
.
cpp
\
view
/
pickForm
.
cpp
\
$$
PWD
/
view
/
padForm
.
cpp
\
view
/
RejectForm
.
cpp
\
$$
PWD
/
view
/
pickForm
.
cpp
\
view
/
settingForm
.
cpp
\
$$
PWD
/
view
/
RejectForm
.
cpp
\
control
/
ordergetwork
.
cpp
\
$$
PWD
/
view
/
settingForm
.
cpp
\
view
/
sysTray
.
cpp
\
$$
PWD
/
control
/
ordergetwork
.
cpp
\
view
/
clickedLineEdit
.
cpp
\
$$
PWD
/
view
/
sysTray
.
cpp
\
view
/
headframe
.
cpp
\
$$
PWD
/
view
/
clickedLineEdit
.
cpp
\
view
/
detailForm
.
cpp
\
$$
PWD
/
view
/
headframe
.
cpp
\
base
/
Arithmetic
/
util
.
cpp
\
$$
PWD
/
view
/
detailForm
.
cpp
\
base
/
DB
/
fm_database
.
cpp
\
$$
PWD
/
base
/
Arithmetic
/
util
.
cpp
\
control
/
orderlocalizework
.
cpp
\
$$
PWD
/
base
/
DB
/
fm_database
.
cpp
\
control
/
orderprintwork
.
cpp
\
$$
PWD
/
control
/
orderlocalizework
.
cpp
\
view
/
loginform
.
cpp
\
$$
PWD
/
control
/
orderprintwork
.
cpp
\
model
/
discountObject
.
cpp
\
$$
PWD
/
view
/
loginform
.
cpp
\
view
/
prtsettingform
.
cpp
\
$$
PWD
/
model
/
discountObject
.
cpp
\
control
/
workobject
.
cpp
\
$$
PWD
/
view
/
prtsettingform
.
cpp
\
view
/
pickupform
.
cpp
\
$$
PWD
/
control
/
workobject
.
cpp
\
control
/
pickuporderwork
.
cpp
\
$$
PWD
/
view
/
pickupform
.
cpp
\
view
/
newmainform
.
cpp
\
$$
PWD
/
control
/
pickuporderwork
.
cpp
\
view
/
ordertypeform
.
cpp
\
$$
PWD
/
view
/
newmainform
.
cpp
\
view
/
orderoptform
.
cpp
\
$$
PWD
/
view
/
ordertypeform
.
cpp
\
view
/
mainbtn
.
cpp
\
$$
PWD
/
view
/
orderoptform
.
cpp
\
view
/
newdetailform
.
cpp
\
$$
PWD
/
view
/
mainbtn
.
cpp
\
control
/
prtlocalizework
.
cpp
\
$$
PWD
/
view
/
newdetailform
.
cpp
\
model
/
posprtpool
.
cpp
\
$$
PWD
/
control
/
prtlocalizework
.
cpp
\
control
/
stallsgetwork
.
cpp
\
$$
PWD
/
model
/
posprtpool
.
cpp
\
model
/
posstallspool
.
cpp
\
$$
PWD
/
control
/
stallsgetwork
.
cpp
\
view
/
prttypeform
.
cpp
\
$$
PWD
/
model
/
posstallspool
.
cpp
\
view
/
newloginform
.
cpp
\
$$
PWD
/
view
/
prttypeform
.
cpp
\
view
/
newpickupform
.
cpp
\
$$
PWD
/
view
/
newloginform
.
cpp
\
base
/
Network
/
ping
.
cpp
\
$$
PWD
/
view
/
newpickupform
.
cpp
\
control
/
networkcheckwork
.
cpp
\
$$
PWD
/
base
/
Network
/
ping
.
cpp
\
base
/
System
/
downloader
.
cpp
\
$$
PWD
/
control
/
networkcheckwork
.
cpp
\
control
/
prtmodelgetwork
.
cpp
\
$$
PWD
/
base
/
System
/
downloader
.
cpp
\
model
/
prtmodelpool
.
cpp
\
$$
PWD
/
control
/
prtmodelgetwork
.
cpp
\
view
/
newchangeshiftsform
.
cpp
\
$$
PWD
/
model
/
prtmodelpool
.
cpp
\
base
/
Arithmetic
/
cretopt
.
cpp
\
$$
PWD
/
view
/
newchangeshiftsform
.
cpp
\
control
/
driverinfogetwork
.
cpp
\
$$
PWD
/
base
/
Arithmetic
/
cretopt
.
cpp
\
view
/
newfloatform
.
cpp
$$
PWD
/
control
/
driverinfogetwork
.
cpp
\
$$
PWD
/
view
/
newfloatform
.
cpp
HEADERS
+=
\
HEADERS
+=
\
event
/
fmapplication
.
h
\
$$
PWD
/
event
/
fmapplication
.
h
\
event
/
posevent
.
h
\
$$
PWD
/
event
/
posevent
.
h
\
model
/
baseObject
.
h
\
$$
PWD
/
model
/
baseObject
.
h
\
model
/
cashierObject
.
h
\
$$
PWD
/
model
/
cashierObject
.
h
\
model
/
deliverObject
.
h
\
$$
PWD
/
model
/
deliverObject
.
h
\
model
/
orderObject
.
h
\
$$
PWD
/
model
/
orderObject
.
h
\
model
/
posorderpool
.
h
\
$$
PWD
/
model
/
posorderpool
.
h
\
model
/
productObject
.
h
\
$$
PWD
/
model
/
productObject
.
h
\
base
/
Network
/
billSocket
.
h
\
$$
PWD
/
base
/
Network
/
billSocket
.
h
\
base
/
Dump
/
dump
.
h
\
$$
PWD
/
base
/
Dump
/
dump
.
h
\
preDefine
.
h
\
$$
PWD
/
preDefine
.
h
\
control
/
orderpushwork
.
h
\
$$
PWD
/
control
/
orderpushwork
.
h
\
base
/
Config
/
configManger
.
h
\
$$
PWD
/
base
/
Config
/
configManger
.
h
\
view
/
alertForm
.
h
\
$$
PWD
/
view
/
alertForm
.
h
\
view
/
floatForm
.
h
\
$$
PWD
/
view
/
floatForm
.
h
\
view
/
mainForm
.
h
\
$$
PWD
/
view
/
mainForm
.
h
\
view
/
padForm
.
h
\
$$
PWD
/
view
/
padForm
.
h
\
view
/
pickForm
.
h
\
$$
PWD
/
view
/
pickForm
.
h
\
view
/
RejectForm
.
h
\
$$
PWD
/
view
/
RejectForm
.
h
\
view
/
settingForm
.
h
\
$$
PWD
/
view
/
settingForm
.
h
\
control
/
ordergetwork
.
h
\
$$
PWD
/
control
/
ordergetwork
.
h
\
base
/
Arithmetic
/
cretopt
.
h
\
$$
PWD
/
base
/
Arithmetic
/
cretopt
.
h
\
base
/
Arithmetic
/
dataprocess
.
h
\
$$
PWD
/
base
/
Arithmetic
/
dataprocess
.
h
\
view
/
sysTray
.
h
\
$$
PWD
/
view
/
sysTray
.
h
\
view
/
clickedLineEdit
.
h
\
$$
PWD
/
view
/
clickedLineEdit
.
h
\
view
/
headframe
.
h
\
$$
PWD
/
view
/
headframe
.
h
\
view
/
detailForm
.
h
\
$$
PWD
/
view
/
detailForm
.
h
\
base
/
Arithmetic
/
util
.
h
\
$$
PWD
/
base
/
Arithmetic
/
util
.
h
\
base
/
DB
/
fm_database
.
h
\
$$
PWD
/
base
/
DB
/
fm_database
.
h
\
control
/
orderlocalizework
.
h
\
$$
PWD
/
control
/
orderlocalizework
.
h
\
control
/
orderprintwork
.
h
\
$$
PWD
/
control
/
orderprintwork
.
h
\
view
/
loginform
.
h
\
$$
PWD
/
view
/
loginform
.
h
\
model
/
discountObject
.
h
\
$$
PWD
/
model
/
discountObject
.
h
\
view
/
prtsettingform
.
h
\
$$
PWD
/
view
/
prtsettingform
.
h
\
base
/
System
/
GetPrinters
.
h
\
$$
PWD
/
base
/
System
/
GetPrinters
.
h
\
control
/
workobject
.
h
\
$$
PWD
/
control
/
workobject
.
h
\
view
/
pickupform
.
h
\
$$
PWD
/
view
/
pickupform
.
h
\
control
/
pickuporderwork
.
h
\
$$
PWD
/
control
/
pickuporderwork
.
h
\
view
/
newmainform
.
h
\
$$
PWD
/
view
/
newmainform
.
h
\
view
/
ordertypeform
.
h
\
$$
PWD
/
view
/
ordertypeform
.
h
\
view
/
orderoptform
.
h
\
$$
PWD
/
view
/
orderoptform
.
h
\
view
/
mainbtn
.
h
\
$$
PWD
/
view
/
mainbtn
.
h
\
view
/
newdetailform
.
h
\
$$
PWD
/
view
/
newdetailform
.
h
\
control
/
prtlocalizework
.
h
\
$$
PWD
/
control
/
prtlocalizework
.
h
\
model
/
posprtpool
.
h
\
$$
PWD
/
model
/
posprtpool
.
h
\
control
/
stallsgetwork
.
h
\
$$
PWD
/
control
/
stallsgetwork
.
h
\
model
/
posstallspool
.
h
\
$$
PWD
/
model
/
posstallspool
.
h
\
view
/
prttypeform
.
h
\
$$
PWD
/
view
/
prttypeform
.
h
\
view
/
newloginform
.
h
\
$$
PWD
/
view
/
newloginform
.
h
\
view
/
newpickupform
.
h
\
$$
PWD
/
view
/
newpickupform
.
h
\
base
/
Network
/
ping
.
h
\
$$
PWD
/
base
/
Network
/
ping
.
h
\
control
/
networkcheckwork
.
h
\
$$
PWD
/
control
/
networkcheckwork
.
h
\
base
/
System
/
downloader
.
h
\
$$
PWD
/
base
/
System
/
downloader
.
h
\
control
/
prtmodelgetwork
.
h
\
$$
PWD
/
control
/
prtmodelgetwork
.
h
\
model
/
prtmodelpool
.
h
\
$$
PWD
/
model
/
prtmodelpool
.
h
\
view
/
newchangeshiftsform
.
h
\
$$
PWD
/
view
/
newchangeshiftsform
.
h
\
control
/
driverinfogetwork
.
h
\
$$
PWD
/
control
/
driverinfogetwork
.
h
\
view
/
newfloatform
.
h
$$
PWD
/
view
/
newfloatform
.
h
DISTFILES
+=
takeout
.
rc
DISTFILES
+=
$$
PWD
/
takeout
.
rc
FORMS
+=
\
FORMS
+=
\
view
/
alertForm
.
ui
\
$$
PWD
/
view
/
alertForm
.
ui
\
view
/
floatForm
.
ui
\
$$
PWD
/
view
/
floatForm
.
ui
\
view
/
mainForm
.
ui
\
$$
PWD
/
view
/
mainForm
.
ui
\
view
/
padForm
.
ui
\
$$
PWD
/
view
/
padForm
.
ui
\
view
/
pickForm
.
ui
\
$$
PWD
/
view
/
pickForm
.
ui
\
view
/
RejectForm
.
ui
\
$$
PWD
/
view
/
RejectForm
.
ui
\
view
/
settingForm
.
ui
\
$$
PWD
/
view
/
settingForm
.
ui
\
view
/
detailForm
.
ui
\
$$
PWD
/
view
/
detailForm
.
ui
\
view
/
loginform
.
ui
\
$$
PWD
/
view
/
loginform
.
ui
\
view
/
prtsettingform
.
ui
\
$$
PWD
/
view
/
prtsettingform
.
ui
\
view
/
pickupform
.
ui
\
$$
PWD
/
view
/
pickupform
.
ui
\
view
/
newmainform
.
ui
\
$$
PWD
/
view
/
newmainform
.
ui
\
view
/
ordertypeform
.
ui
\
$$
PWD
/
view
/
ordertypeform
.
ui
\
view
/
orderoptform
.
ui
\
$$
PWD
/
view
/
orderoptform
.
ui
\
view
/
mainbtn
.
ui
\
$$
PWD
/
view
/
mainbtn
.
ui
\
view
/
newdetailform
.
ui
\
$$
PWD
/
view
/
newdetailform
.
ui
\
view
/
prttypeform
.
ui
\
$$
PWD
/
view
/
prttypeform
.
ui
\
view
/
newpickupform
.
ui
\
$$
PWD
/
view
/
newpickupform
.
ui
\
view
/
newchangeshiftsform
.
ui
\
$$
PWD
/
view
/
newchangeshiftsform
.
ui
\
view
/
newfloatform
.
ui
\
$$
PWD
/
view
/
newfloatform
.
ui
\
view
/
newloginform
.
ui
$$
PWD
/
view
/
newloginform
.
ui
CONFIG
(
release
,
debug
|
release
){
CONFIG
(
release
,
debug
|
release
){
QMAKE_LFLAGS
+=
/
DEBUG
QMAKE_LFLAGS
+=
/
DEBUG
...
...
takeout/view/newchangeshiftsform.cpp
View file @
840b9052
...
@@ -76,7 +76,7 @@ void NewChangeShiftsForm::Initshow()
...
@@ -76,7 +76,7 @@ void NewChangeShiftsForm::Initshow()
QString
date
=
loginTime
.
section
(
" "
,
0
,
0
);
QString
date
=
loginTime
.
section
(
" "
,
0
,
0
);
if
(
date
!=
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd"
))
{
if
(
date
!=
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd"
))
{
configIni
->
setValue
(
"base/loginTime"
,
Q
DateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd hh:mm"
));
configIni
->
setValue
(
"base/loginTime"
,
Q
String
(
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd"
)
+
QString
(
" 00:00"
)
));
ui
->
label_shiftTime_str
->
setText
(
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd"
)
+
QString
(
" 00:00"
));
ui
->
label_shiftTime_str
->
setText
(
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd"
)
+
QString
(
" 00:00"
));
m_storeinfo
[
JSON_KEY_TIMESTAMP
]
=
QString
(
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd"
)
+
QString
(
" 00:00"
));
m_storeinfo
[
JSON_KEY_TIMESTAMP
]
=
QString
(
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd"
)
+
QString
(
" 00:00"
));
}
else
{
}
else
{
...
@@ -321,6 +321,13 @@ void NewChangeShiftsForm::on_prtBtn_clicked()
...
@@ -321,6 +321,13 @@ void NewChangeShiftsForm::on_prtBtn_clicked()
QSettings
*
configIni
=
new
QSettings
(
configfile
,
QSettings
::
IniFormat
);
QSettings
*
configIni
=
new
QSettings
(
configfile
,
QSettings
::
IniFormat
);
configIni
->
setValue
(
"base/loginTime"
,
dateTime
);
configIni
->
setValue
(
"base/loginTime"
,
dateTime
);
//优化交接班打印,打印按钮点击之后,将下次打印开始时间置为当前时间
m_storeinfo
[
JSON_KEY_TIMESTAMP
]
=
dateTime
;
ui
->
label_shiftTime_str
->
setText
(
dateTime
);
ui
->
label_timeTo_str
->
setText
(
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd hh:mm"
));
}
}
return
;
return
;
...
...
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