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
756f75c9
Commit
756f75c9
authored
Apr 10, 2019
by
xiaoqing.gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、修改版本号 3.0.2.4 2、杯贴打印模板化改造 3、未登录退出阻塞bug修复 4、取消pos编号 5、posorderpool加入堂食订单的概念 6、悬浮窗提示展示bug修复
parent
1a997b69
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
462 additions
and
140 deletions
+462
-140
takeout/base/Print/newprintlib.cpp
+242
-0
takeout/base/Print/newprintlib.h
+13
-0
takeout/control/driverinfogetwork.cpp
+7
-3
takeout/control/driverinfogetwork.h
+2
-0
takeout/control/ordergetwork.h
+7
-6
takeout/control/orderprintwork.cpp
+19
-0
takeout/model/posorderpool.cpp
+11
-1
takeout/takeout.pro
+3
-3
takeout/takeout.rc
+4
-4
takeout/view/newfloatform.cpp
+14
-14
takeout/view/newfloatform.ui
+5
-2
takeout/view/newloginform.cpp
+2
-3
takeout/view/newloginform.ui
+90
-103
takeout/view/newmainform.cpp
+43
-1
No files found.
takeout/base/Print/newprintlib.cpp
View file @
756f75c9
...
...
@@ -784,6 +784,247 @@ bool NewPrintLib::DoLabelPrint(const QString &config, OrderObject *order)
return
PrintLabel
(
config
,
order
);
}
bool
NewPrintLib
::
DoLabelModelPrint
(
const
QString
&
config
,
const
QString
&
context
,
OrderObject
*
order
)
{
OrderObject
tmporder
=
*
order
;
QLOG_DEBUG
()
<<
"input1:"
<<
tmporder
.
_orderObject
;
if
(
!
_load_flag
&&
!
LoadFunction
())
{
QLOG_ERROR
()
<<
"NewPrintLib::DoPrint failed"
;
return
false
;
}
char
*
prtconfig
=
NULL
;
QByteArray
prtconfigdata
=
config
.
toLocal8Bit
();
CONSTCHARTOCHAR
(
prtconfigdata
,
prtconfig
);
char
*
xml
=
NULL
;
QByteArray
xmldata
=
context
.
toLocal8Bit
();
CONSTCHARTOCHAR
(
xmldata
,
xml
);
char
*
orderinfo
=
NULL
;
//根据订单号填写打印模板的表头
QJsonObject
orderObj
=
tmporder
.
_orderObject
;
int
type
=
-
100
;
if
(
orderObj
.
contains
(
"order_type"
))
{
type
=
orderObj
[
"order_type"
].
toInt
();
}
QLOG_DEBUG
()
<<
"NewPrintLib::type:"
<<
type
;
//表头设置
QString
channel
=
orderObj
[
"channel"
].
toString
();
QLOG_DEBUG
()
<<
"NewPrintLib::channel:"
<<
channel
;
if
(
QString
(
"saas"
).
compare
(
channel
,
Qt
::
CaseInsensitive
)
==
0
)
{
switch
(
type
)
{
case
TimelyTakeout
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
QString
::
fromLocal8Bit
(
ORDER_TYPE_TIMELYTAKEOUT
));
break
;
case
AppointmentTakeout
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
QString
::
fromLocal8Bit
(
ORDER_TYPE_APPOINTMENTTAKEOUT
));
break
;
case
TimelyDining
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
QString
::
fromLocal8Bit
(
ORDER_TYPE_TIMELYINVITE
));
break
;
case
AppointmentDining
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
QString
::
fromLocal8Bit
(
ORDER_TYPE_APPOINTMENTINVITE
));
break
;
case
TimelyInvite
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
QString
::
fromLocal8Bit
(
ORDER_TYPE_TIMELYINVITE
));
break
;
case
AppointmentInvite
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
QString
::
fromLocal8Bit
(
ORDER_TYPE_APPOINTMENTINVITE
));
break
;
default
:
break
;
}
}
else
{
switch
(
type
)
{
case
TimelyTakeout
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
channel
+
QString
::
fromLocal8Bit
(
ORDER_THIRD_TIMELYTAKEOUT
));
break
;
case
AppointmentTakeout
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
channel
+
QString
::
fromLocal8Bit
(
ORDER_THIRD_APPOINTMENTTAKEOUT
));
break
;
case
TimelyDining
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
channel
+
QString
::
fromLocal8Bit
(
ORDER_THIRD_TIMELYINVITE
));
break
;
case
AppointmentDining
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
channel
+
QString
::
fromLocal8Bit
(
ORDER_THIRD_APPOINTMENTINVITE
));
break
;
case
TimelyInvite
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
channel
+
QString
::
fromLocal8Bit
(
ORDER_THIRD_TIMELYINVITE
));
break
;
case
AppointmentInvite
:
tmporder
.
_orderObject
.
insert
(
"source_order_type"
,
channel
+
QString
::
fromLocal8Bit
(
ORDER_THIRD_APPOINTMENTINVITE
));
break
;
default
:
break
;
}
}
//将订单的预约时间拿过来转换成订单需要的QString类型
int
delivery_time
=
orderObj
[
"delivery_time"
].
toInt
();
QLOG_DEBUG
()
<<
"prt_type"
<<
type
;
QString
prt_delivery_time
;
if
(
type
==
1
)
{
prt_delivery_time
=
QString
::
fromLocal8Bit
(
PRT_DELIVERY_TIME_TAKEOUT
);
}
else
if
(
type
==
3
||
type
==
5
)
{
prt_delivery_time
=
QString
::
fromLocal8Bit
(
PRT_DELIVERY_TIME_INVITE
);
}
else
{
prt_delivery_time
=
QDateTime
::
fromTime_t
(
delivery_time
).
toString
(
"yyyy/MM/dd hh:mm:ss"
);
}
tmporder
.
_orderObject
.
insert
(
"prt_delivery_time"
,
prt_delivery_time
);
QLOG_DEBUG
()
<<
"NewNew tmporder._orderObject :"
<<
tmporder
.
_orderObject
;
QByteArray
orderdata
=
QString
(
QJsonDocument
(
tmporder
.
_orderObject
).
toJson
()).
toLocal8Bit
();
CONSTCHARTOCHAR
(
orderdata
,
orderinfo
);
//! TODO 解析遍历商品,杯贴打印单个商品,并且打印商品序列、商品名、单价、配料 下单时间 门店
//! 解析出来的数据重新组装orderinfo,再调f_DoLabPrintWithXml,一个一个商品打印
QString
deliveryTime
;
QString
datetime
;
int
tmpdelitime
=
order
->
srcdlv_time
;
if
(
order
->
delivery_time
==
0
)
{
deliveryTime
=
QDateTime
::
currentDateTime
().
toString
(
"hh:mm"
);
datetime
=
QDateTime
::
currentDateTime
().
toString
(
"MM/dd"
);
}
else
{
deliveryTime
=
QDateTime
::
fromTime_t
(
order
->
delivery_time
).
toString
(
"hh:mm"
);
datetime
=
QDateTime
::
currentDateTime
().
toString
(
"MM/dd"
);
}
int
allprod
=
0
;
foreach
(
ProductObject
*
dish
,
order
->
proList
)
{
allprod
+=
dish
->
product_amount
;
}
int
index
=
0
;
foreach
(
ProductObject
*
dish
,
order
->
proList
)
{
int
num
=
dish
->
product_amount
;
while
(
num
>
0
)
{
QString
title
=
QString
(
" %2 %4/%5"
).
arg
(
datetime
,
QString
::
number
(
++
index
),
QString
::
number
(
allprod
));
QString
tmptitle
;
if
(
QString
(
"saas"
).
compare
(
order
->
channel
)
==
0
)
{
if
(
order
->
order_type
==
3
||
order
->
order_type
==
4
||
order
->
order_type
==
5
)
{
// tmptitle = QString("\xE9\x9D\x9E\xE7\xA0\x81\xE8\x87\xAA\xE6\x8F\x90").append(order->code).append(" ").append(title);
tmptitle
=
QString
(
"
\xE8\x87\xAA\xE6\x8F\x90
"
).
append
(
order
->
code
).
append
(
" "
).
append
(
title
);
}
else
if
(
order
->
order_type
==
6
)
{
// tmptitle = QString("\xE9\x9D\x9E\xE7\xA0\x81\xE9\xA2\x84\xE7\xBA\xA6").append(order->code).append(" ").append(title);
tmptitle
=
QString
(
"
\xE9\xA2\x84\xE7\xBA\xA6
"
).
append
(
order
->
code
).
append
(
" "
).
append
(
title
);
}
else
{
// tmptitle = QString("\xE9\x9D\x9E\xE7\xA0\x81\xE5\xA4\x96\xE5\x8D\x96").append(QString::number(order->order_index)).append(" ").append(title);
tmptitle
=
QString
(
"
\xE5\xA4\x96\xE5\x8D\x96
"
).
append
(
QString
::
number
(
order
->
order_index
)).
append
(
" "
).
append
(
title
);
}
}
else
{
QString
tmpstr
=
order
->
channel_name
;
tmptitle
=
tmpstr
.
append
(
QString
::
number
(
order
->
order_index
)).
append
(
" "
).
append
(
title
);;
}
QString
prodname
=
dish
->
name
;
qDebug
()
<<
"input9:"
<<
prodname
;
QString
property_tags
;
if
(
!
dish
->
property_tags
.
isEmpty
())
{
property_tags
.
append
(
dish
->
property_tags
);
property_tags
.
append
(
","
);
}
if
(
!
dish
->
sub_products
.
isEmpty
())
{
foreach
(
ProductObject
*
sub_dish
,
dish
->
sub_products
)
{
property_tags
.
append
(
sub_dish
->
name
);
property_tags
.
append
(
","
);
}
}
property_tags
.
remove
(
property_tags
.
length
()
-
1
,
1
);
QString
sendtimes
=
QString
(
""
);
if
(
tmpdelitime
!=
0
/*&& (order->order_type == 1 || order->order_type == 2)*/
)
{
sendtimes
.
append
(
QDateTime
::
fromTime_t
(
order
->
delivery_time
).
toString
(
"yyyy-MM-dd hh:mm:ss"
));
}
QJsonObject
prdObj
;
prdObj
.
insert
(
"prt_title"
,
tmptitle
);
prdObj
.
insert
(
"prt_singleproduct"
,
prodname
.
append
(
QString
(
"
\x20\xC2\xA5
"
)).
append
(
QString
::
number
(
dish
->
price
/
100.0
,
'f'
,
2
)));
prdObj
.
insert
(
"prt_property"
,
property_tags
);
prdObj
.
insert
(
"prt_sendtimes"
,
sendtimes
);
prdObj
.
insert
(
"prt_store"
,
order
->
store_name
);
char
*
singlePrdPrt
=
NULL
;
QByteArray
singlePrd
=
QString
(
QJsonDocument
(
prdObj
).
toJson
()).
toLocal8Bit
();
CONSTCHARTOCHAR
(
singlePrd
,
singlePrdPrt
);
char
err
[
1024
]
=
{
0
};
qDebug
()
<<
"input singleprdprt:"
<<
singlePrdPrt
;
f_DoLabPrintWithXml
(
prtconfig
,
singlePrdPrt
,
xml
,
err
);
if
(
strlen
(
err
)
>
0
)
{
QLOG_ERROR
()
<<
"f_DoPrintWithXml failed error : "
<<
err
;
}
delete
[]
singlePrdPrt
;
--
num
;
}
}
delete
[]
prtconfig
;
delete
[]
xml
;
QLOG_DEBUG
()
<<
"f_DoPrintWithXml success"
;
return
true
;
}
bool
NewPrintLib
::
LoadFunction
()
{
QLibrary
lib
;
...
...
@@ -805,6 +1046,7 @@ bool NewPrintLib::LoadFunction()
f_printBarcode
=
(
PrintBarCode
)
lib
.
resolve
(
"PrintBarCode"
);
f_printqrcode
=
(
PrintQRCode
)
lib
.
resolve
(
"PrintQRCode"
);
f_DoPrintWithXml
=
(
DoPrintWithXml
)
lib
.
resolve
(
"DoPrintWithXml"
);
f_DoLabPrintWithXml
=
(
DoLabPrintWithXml
)
lib
.
resolve
(
"DoLabPrintWithXml"
);
if
(
!
(
f_unloaddll
&&
f_loadaddress
&&
f_labprtiopen
&&
f_labprtline
&&
f_labprtclose
&&
f_prtopen
&&
f_prtclose
&&
f_freeline
...
...
takeout/base/Print/newprintlib.h
View file @
756f75c9
...
...
@@ -29,6 +29,8 @@ typedef bool (*PrintQRCode)(char data[], int type, int leftMargin, int width);
typedef
void
(
*
DoPrintWithXml
)(
char
*
prtstr
,
char
*
orderStr
,
char
*
xmlStr
,
char
*
error
);
typedef
void
(
*
DoLabPrintWithXml
)(
char
*
prtstr
,
char
*
orderStr
,
char
*
xmlStr
,
char
*
error
);
class
NewPrintLib
{
public
:
...
...
@@ -68,6 +70,15 @@ public:
*/
bool
DoLabelPrint
(
const
QString
&
config
,
OrderObject
*
order
);
/*!
* \brief DoLabelModelPrint 杯贴打印
* \param connect 打印模板上下文
* \param config 打印配置
* \param order 订单对象
* \return true:成功 false:失败
*/
bool
DoLabelModelPrint
(
const
QString
&
config
,
const
QString
&
context
,
OrderObject
*
order
);
private
:
bool
LoadFunction
();
...
...
@@ -111,6 +122,8 @@ private:
DoPrintWithXml
f_DoPrintWithXml
;
DoLabPrintWithXml
f_DoLabPrintWithXml
;
bool
_load_flag
;
};
...
...
takeout/control/driverinfogetwork.cpp
View file @
756f75c9
...
...
@@ -8,7 +8,7 @@
DriverInfoGetWork
::
DriverInfoGetWork
(
WorkObject
*
parent
)
:
WorkObject
(
parent
)
{
_islogin
=
false
;
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_get_order_status
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_token_change
);
FMApplication
::
subscibeEvent
(
this
,
PosEvent
::
s_login_storeinfo
);
...
...
@@ -69,6 +69,8 @@ bool DriverInfoGetWork::event(QEvent *e)
_storeinfo
=
storeinfo
;
_islogin
=
true
;
return
true
;
}
...
...
@@ -96,11 +98,13 @@ void DriverInfoGetWork::workstart()
loop
.
exec
();
}
//加入登陆标志位,防止未登录线程启动后阻塞,导致未登录退出阻塞
if
(
_islogin
)
{
QEventLoop
loop
;
connect
(
this
,
&
DriverInfoGetWork
::
quitGetWork
,
&
loop
,
&
QEventLoop
::
quit
);
loop
.
exec
();
}
QLOG_DEBUG
()
<<
"DriverInfoGetWork::workstart loop start"
;
...
...
takeout/control/driverinfogetwork.h
View file @
756f75c9
...
...
@@ -45,6 +45,8 @@ private:
QString
_url
;
bool
_islogin
;
};
class
GetDriverInfoDataProcess
...
...
takeout/control/ordergetwork.h
View file @
756f75c9
...
...
@@ -131,7 +131,7 @@ private:
{
QString
partnerid
=
storeinfo
[
JSON_KEY_PARTNERID
].
toString
();
QString
storeid
=
storeinfo
[
JSON_STOREID
].
toString
();
QString
stationid
=
storeinfo
[
JSON_ST
ATION
ID
].
toString
();
QString
stationid
=
storeinfo
[
JSON_ST
ORE
ID
].
toString
();
QString
tmp
=
partnerid
+
storeid
+
stationid
;
QLOG_DEBUG
()
<<
"Store Info : "
<<
tmp
;
...
...
@@ -182,13 +182,13 @@ private:
static
bool
getLogingRequest
(
const
QVariantMap
&
json
,
QJsonObject
&
data
)
{
if
(
!
json
.
contains
(
JSON_STOREID
)
||
!
json
.
contains
(
JSON_STATIONID
)
||
if
(
!
json
.
contains
(
JSON_STOREID
)
||
/*!json.contains(JSON_STATIONID) ||*/
!
json
.
contains
(
JSON_KEY_USERID
)
||
!
json
.
contains
(
JSON_KEY_PWD
)
||
!
json
.
contains
(
JSON_KEY_PARTNERID
))
return
false
;
data
.
insert
(
JSON_STOREID
,
json
[
JSON_STOREID
].
toString
());
data
.
insert
(
JSON_DEVICEID
,
json
[
JSON_STATION
ID
].
toString
());
data
.
insert
(
JSON_DEVICEID
,
json
[
JSON_STORE
ID
].
toString
());
data
.
insert
(
JSON_KEY_USERID
,
json
[
JSON_KEY_USERID
].
toString
());
data
.
insert
(
JSON_KEY_PWD
,
json
[
JSON_KEY_PWD
].
toString
());
//data.insert(JSON_KEY_PARTNERID, json[JSON_KEY_PARTNERID].toInt());
...
...
@@ -199,7 +199,7 @@ private:
static
bool
getOrderRequest
(
const
QVariantMap
&
json
,
QJsonObject
&
data
,
QString
timestamp
,
QString
token
,
QString
autoconfirm
)
{
if
(
!
json
.
contains
(
JSON_STOREID
)
||
!
json
.
contains
(
JSON_STATIONID
)
||
if
(
!
json
.
contains
(
JSON_STOREID
)
||
/*!json.contains(JSON_STATIONID) ||*/
!
json
.
contains
(
JSON_KEY_USERID
)
||
!
json
.
contains
(
JSON_KEY_PWD
)
||
!
json
.
contains
(
JSON_KEY_PARTNERID
))
return
false
;
...
...
@@ -221,11 +221,12 @@ private:
static
bool
getBindRequest
(
const
QVariantMap
&
json
,
QJsonObject
&
data
)
{
if
(
!
json
.
contains
(
JSON_STOREID
)
||
!
json
.
contains
(
JSON_STATIONID
))
// if(!json.contains(JSON_STOREID) || !json.contains(JSON_STATIONID))
if
(
!
json
.
contains
(
JSON_STOREID
))
return
false
;
data
.
insert
(
JSON_STOREID
,
json
[
JSON_STOREID
].
toString
());
data
.
insert
(
JSON_DEVICEID
,
json
[
JSON_ST
ATION
ID
].
toString
());
data
.
insert
(
JSON_DEVICEID
,
json
[
JSON_ST
ORE
ID
].
toString
());
//data.insert(JSON_KEY_PARTNERID, json[JSON_KEY_PARTNERID].toInt());
data
.
insert
(
JSON_KEY_PARTNERID
,
json
[
JSON_KEY_PARTNERID
].
toString
());
data
.
insert
(
JSON_KEY_APPVER
,
DEFAULT_APP_VER
);
...
...
takeout/control/orderprintwork.cpp
View file @
756f75c9
...
...
@@ -184,6 +184,10 @@ bool orderprintwork::GetPrtTemplet(int prttype, int pagew, QString &context, con
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
XML_BACK_TEMPLATE
);
}
}
else
if
(
prttype
==
1
)
{
file
.
setFileName
(
qApp
->
applicationDirPath
()
+
"/"
+
XML_LABEL_TEMPLATE
);
}
QLOG_DEBUG
()
<<
"file : "
<<
file
.
fileName
();
...
...
@@ -247,6 +251,7 @@ void orderprintwork::DoLabelPrint(const QString &prtname, const QString &orderid
{
QString
strconfig
;
OrderObject
order
;
QString
context
;
if
(
!
PosOrderPool
::
GetOrderObject
(
orderid
,
order
))
{
...
...
@@ -258,7 +263,21 @@ void orderprintwork::DoLabelPrint(const QString &prtname, const QString &orderid
QLOG_DEBUG
()
<<
"strconfig:"
<<
strconfig
;
int
page
=
config
[
PRT_CONF_PAPERWIDTH
].
toString
().
toInt
();
if
(
page
==
0
)
page
=
56
;
if
(
!
GetPrtTemplet
(
0
,
page
,
context
,
order
))
{
QLOG_ERROR
()
<<
"orderprintwork::DoLabelPrint::GetPrtTemplet failed"
;
return
;
}
flag
=
NewPrintLib
::
GetInstance
().
DoLabelPrint
(
strconfig
,
&
order
);
// flag = NewPrintLib::GetInstance().DoLabelModelPrint(strconfig, context, &order);
QLOG_DEBUG
()
<<
"DoLabelPrint NewPrintLib::GetInstance flag : "
<<
flag
;
}
void
orderprintwork
::
ResultShow
(
const
QString
&
orderid
,
bool
flag
)
...
...
takeout/model/posorderpool.cpp
View file @
756f75c9
...
...
@@ -833,7 +833,12 @@ void PosOrderPool::UpdateOrderNum(const OrderObject *order, const OrderObject *o
}
else
if
(
orderold
->
order_type
==
TimelyInvite
||
orderold
->
order_type
==
AppointmentInvite
)
{
QLOG_DEBUG
()
<<
"OLD DECTAKEOUT UpdateOrderNum input 0 : "
<<
orderold
->
order_id
;
QLOG_DEBUG
()
<<
"OLD DECSELF UpdateOrderNum input 0 : "
<<
orderold
->
order_id
;
DECSELF
(
status
,
s_self_new
,
s_self_make
,
s_self_refund
);
}
else
if
(
orderold
->
order_type
==
TimelyDining
||
orderold
->
order_type
==
AppointmentDining
)
{
QLOG_DEBUG
()
<<
"OLD DECSELF UpdateOrderNum input 0 : "
<<
orderold
->
order_id
;
DECSELF
(
status
,
s_self_new
,
s_self_make
,
s_self_refund
);
}
...
...
@@ -859,6 +864,11 @@ void PosOrderPool::UpdateOrderNum(const OrderObject *order, const OrderObject *o
QLOG_DEBUG
()
<<
"NEW INCSELF UpdateOrderNum input 0 : "
<<
order
->
order_id
;
INCSELF
(
status
,
s_self_new
,
s_self_make
,
s_self_refund
);
}
else
if
(
order
->
order_type
==
TimelyDining
||
order
->
order_type
==
AppointmentDining
)
{
QLOG_DEBUG
()
<<
"NEW INCSELF UpdateOrderNum input 0 : "
<<
order
->
order_id
;
INCSELF
(
status
,
s_self_new
,
s_self_make
,
s_self_refund
);
}
}
}
takeout/takeout.pro
View file @
756f75c9
...
...
@@ -21,7 +21,7 @@ LIBS += -L$$PWD/lib -llibeay32 -lssleay32 -lwinspool
LIBS
+=
-
lWs2_32
LIBS
+=
-
lDbghelp
#
DEFINES += USE_QAACTION
DEFINES
+=
USE_QAACTION
DEFINES
+=
FM_NEW_UI
#DEFINES += FM_TEST
...
...
@@ -167,10 +167,10 @@ FORMS += \
view
/
mainbtn
.
ui
\
view
/
newdetailform
.
ui
\
view
/
prttypeform
.
ui
\
view
/
newloginform
.
ui
\
view
/
newpickupform
.
ui
\
view
/
newchangeshiftsform
.
ui
\
view
/
newfloatform
.
ui
view
/
newfloatform
.
ui
\
view
/
newloginform
.
ui
CONFIG
(
release
,
debug
|
release
){
QMAKE_LFLAGS
+=
/
DEBUG
...
...
takeout/takeout.rc
View file @
756f75c9
...
...
@@ -4,8 +4,8 @@
#include <winver.h>
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,0,2,
3
PRODUCTVERSION 3,0,2,
3
FILEVERSION 3,0,2,
4
PRODUCTVERSION 3,0,2,
4
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
...
...
@@ -22,12 +22,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
VALUE "CompanyName", "ShangHai Freemud Co., Ltd."
VALUE "FileDescription", "FREEMUD Manager System"
VALUE "FileVersion", "3.0.2.
3
"
VALUE "FileVersion", "3.0.2.
4
"
VALUE "InternalName", "FREEMUD"
VALUE "LegalCopyright", "Copyright (C)2017-2020"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "fmTakeout"
VALUE "ProductVersion", "3.0.2.
3
"
VALUE "ProductVersion", "3.0.2.
4
"
END
END
BLOCK "VarFileInfo"
...
...
takeout/view/newfloatform.cpp
View file @
756f75c9
...
...
@@ -137,8 +137,8 @@ bool NewFloatForm::event(QEvent *e)
refundstatus
!=
ApplicationRefundOrder
&&
refundstatus
!=
ApplicationPartialRefundOrder
&&
refundstatus
!=
RefusingRefundOrder
)
{
//m_play_flag = false;
if
(
ui
->
widget_back_synshow
->
isHidden
())
ui
->
widget_back_synshow
->
show
();
//
if(ui->widget_back_synshow->isHidden())
//
ui->widget_back_synshow->show();
onStartRemind
(
0
);
return
true
;
}
...
...
@@ -146,8 +146,8 @@ bool NewFloatForm::event(QEvent *e)
if
((
refundstatus
==
ApplicationRefundOrder
||
refundstatus
==
ApplicationPartialRefundOrder
))
{
//m_play_flag = false;
if
(
ui
->
widget_back_synshow
->
isHidden
())
ui
->
widget_back_synshow
->
show
();
//
if(ui->widget_back_synshow->isHidden())
//
ui->widget_back_synshow->show();
onStartRemind
(
1
);
return
true
;
}
...
...
@@ -254,8 +254,8 @@ bool NewFloatForm::event(QEvent *e)
QLOG_DEBUG
()
<<
"pickuporderremind : "
<<
orderid
;
//m_play_flag = false;
if
(
ui
->
widget_back_synshow
->
isHidden
())
ui
->
widget_back_synshow
->
show
();
//
if(ui->widget_back_synshow->isHidden())
//
ui->widget_back_synshow->show();
onStartRemind
(
0
);
return
true
;
}
...
...
@@ -560,10 +560,10 @@ void NewFloatForm::onStartRemind(int type)
if
(
pos
().
x
()
>
tmpdesktopSize
.
width
()
-
2
*
(
ui
->
widget_base
->
width
()))
{
ui
->
widget_front_synshow
->
show
();
ui
->
label_front_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"新订单"
));
ui
->
label_front_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"
新订单"
));
}
else
{
ui
->
widget_back_synshow
->
show
();
ui
->
label_back_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"新订单"
));
ui
->
label_back_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"
新订单"
));
}
if
(
!
ui
->
widget_base_frame
->
isHidden
())
ui
->
widget_base_frame
->
hide
();
...
...
@@ -571,12 +571,12 @@ void NewFloatForm::onStartRemind(int type)
else
if
(
!
ui
->
widget_back_synshow
->
isHidden
()
&&
m_is_login
)
{
// ui->widget_back_synshow->hide();
ui
->
label_back_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"新订单"
));
ui
->
label_back_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"
新订单"
));
if
(
ui
->
widget_base_frame
->
isHidden
())
ui
->
widget_base_frame
->
show
();
}
else
if
(
!
ui
->
widget_front_synshow
->
isHidden
()
&&
m_is_login
)
{
// ui->widget_front_synshow->hide();
ui
->
label_front_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"新订单"
));
ui
->
label_front_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"
新订单"
));
if
(
ui
->
widget_base_frame
->
isHidden
())
ui
->
widget_base_frame
->
show
();
}
...
...
@@ -590,10 +590,10 @@ void NewFloatForm::onStartRemind(int type)
if
(
pos
().
x
()
>
tmpdesktopSize
.
width
()
-
2
*
(
ui
->
widget_base
->
width
()))
{
ui
->
widget_front_synshow
->
show
();
ui
->
label_front_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"新退单"
));
ui
->
label_front_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"
新退单"
));
}
else
{
ui
->
widget_back_synshow
->
show
();
ui
->
label_back_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"新退单"
));
ui
->
label_back_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"
新退单"
));
}
if
(
!
ui
->
widget_base_frame
->
isHidden
())
ui
->
widget_base_frame
->
hide
();
...
...
@@ -601,12 +601,12 @@ void NewFloatForm::onStartRemind(int type)
else
if
(
!
ui
->
widget_back_synshow
->
isHidden
()
&&
m_is_login
)
{
// ui->widget_back_synshow->hide();
ui
->
label_back_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"新退单"
));
ui
->
label_back_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"
新退单"
));
if
(
ui
->
widget_base_frame
->
isHidden
())
ui
->
widget_base_frame
->
show
();
}
else
if
(
!
ui
->
widget_front_synshow
->
isHidden
()
&&
m_is_login
)
{
// ui->widget_front_synshow->hide();
ui
->
label_front_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"新退单"
));
ui
->
label_front_newmsg
->
setText
(
QString
::
fromLocal8Bit
(
"
新退单"
));
if
(
ui
->
widget_base_frame
->
isHidden
())
ui
->
widget_base_frame
->
show
();
}
...
...
takeout/view/newfloatform.ui
View file @
756f75c9
...
...
@@ -108,9 +108,12 @@
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Expanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
4
5
</width>
<width>
4
8
</width>
<height>
20
</height>
</size>
</property>
...
...
@@ -126,7 +129,7 @@
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
4
5
</width>
<width>
4
8
</width>
<height>
20
</height>
</size>
</property>
...
...
takeout/view/newloginform.cpp
View file @
756f75c9
...
...
@@ -105,16 +105,15 @@ void NewLoginForm::SetStoreInfo()
QString
partnerid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_PARNETID
).
toString
();
QString
userid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_USERID
).
toString
();
QString
pwd
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_PWD
).
toString
();
QString
stationid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_STATIONIID
).
toString
();
//
QString stationid = QSettings(configfile, QSettings::IniFormat).value(INI_BASE_STATIONIID).toString();
if
(
storeid
.
isEmpty
()
||
partnerid
.
isEmpty
()
||
userid
.
isEmpty
()
||
pwd
.
isEmpty
()
||
stationid
.
isEmpty
()
)
if
(
storeid
.
isEmpty
()
||
partnerid
.
isEmpty
()
||
userid
.
isEmpty
()
||
pwd
.
isEmpty
()
/*|| stationid.isEmpty()*/
)
return
;
ui
->
lineEdit_partnerid_2
->
setText
(
partnerid
);
ui
->
lineEdit_storeid_2
->
setText
(
storeid
);
// ui->lineEdit_posno_2->setText(stationid);
ui
->
lineEdit_account_2
->
setText
(
userid
);
ui
->
lineEdit_pwd_2
->
setText
(
pwd
);
if
(
ui
->
checkBox_rememberPwd
->
isChecked
())
ui
->
lineEdit_pwd_2
->
setText
(
pwd
);
...
...
takeout/view/newloginform.ui
View file @
756f75c9
...
...
@@ -58,7 +58,7 @@
background-color: rgb(255, 42, 42);
border-radius: 4px;
}
#pushButton_
19,#pushButton_12,#pushButton_17,#pushButton_16,#pushButton_13,#pushButton_14
#pushButton_
num1,#pushButton_num2,#pushButton_num4,#pushButton_num5,#pushButton_num7,#pushButton_num8
{
font: 17pt
"
微软雅黑
"
;
color: #000000;
...
...
@@ -67,7 +67,7 @@
border-right-style: 0px;
border-bottom-style: 0px;
}
#pushButton_del
_2
#pushButton_del
Btn
{
font: 14pt
"
微软雅黑
"
;
color: #000000;
...
...
@@ -75,7 +75,7 @@
border: 1px solid #D9D9D9;
border-right-style: 0px;
}
#pushButton_
11
#pushButton_
num0
{
font: 17pt
"
微软雅黑
"
;
color: #000000;
...
...
@@ -83,7 +83,7 @@
border: 1px solid #D9D9D9;
border-right-style: 0px;
}
#pushButton_
15,#pushButton_18,#pushButton_10
#pushButton_
num3,#pushButton_num6,#pushButton_num9
{
font: 17pt
"
微软雅黑
"
;
color: #000000;
...
...
@@ -91,7 +91,7 @@
border: 1px solid #D9D9D9;
border-bottom-style: 0px;
}
#pushButton_clear
_2
#pushButton_clear
Btn
{
font: 14pt
"
微软雅黑
"
;
color: #000000;
...
...
@@ -115,6 +115,25 @@
image:url(:login_save.png);
}
#checkBox_rememberPwd
{
font: 9pt
"
微软雅黑
"
;
}
#checkBox_rememberPwd::indicator:unchecked{
image:url(:login_unsave.png);
}
#checkBox_rememberPwd::indicator:checked{
image:url(:login_save.png);
}
#widget_3
{
border:1px solid #D9D9D9;
background-color:white;
}
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
...
...
@@ -247,7 +266,7 @@
<height>
550
</height>
</size>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_
4
"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_
2
"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
...
...
@@ -442,7 +461,7 @@
</spacer>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout
"
stretch=
"0,1,0,1,0
"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout
_2
"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
...
...
@@ -460,7 +479,26 @@
</spacer>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<property
name=
"spacing"
>
<number>
20
</number>
</property>
<item>
<spacer
name=
"verticalSpacer_4"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
13
</height>
</size>
</property>
</spacer>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_6"
>
<property
name=
"spacing"
>
...
...
@@ -494,13 +532,13 @@
<property
name=
"minimumSize"
>
<size>
<width>
200
</width>
<height>
4
0
</height>
<height>
3
0
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
200
</width>
<height>
4
0
</height>
<height>
3
0
</height>
</size>
</property>
<property
name=
"text"
>
...
...
@@ -540,53 +578,13 @@
<property
name=
"minimumSize"
>
<size>
<width>
200
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
200
</width>
<height>
40
</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_21"
>
<item>
<widget
class=
"QLabel"
name=
"label_posno_2"
>
<property
name=
"text"
>
<string>
POS编号
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_37"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"ClickedLineEdit"
name=
"lineEdit_posno_2"
>
<property
name=
"minimumSize"
>
<size>
<width>
200
</width>
<height>
40
</height>
<height>
30
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
200
</width>
<height>
4
0
</height>
<height>
3
0
</height>
</size>
</property>
</widget>
...
...
@@ -626,13 +624,13 @@
<property
name=
"minimumSize"
>
<size>
<width>
200
</width>
<height>
4
0
</height>
<height>
3
0
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
200
</width>
<height>
4
0
</height>
<height>
3
0
</height>
</size>
</property>
<property
name=
"text"
>
...
...
@@ -675,13 +673,13 @@
<property
name=
"minimumSize"
>
<size>
<width>
200
</width>
<height>
4
0
</height>
<height>
3
0
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
200
</width>
<height>
4
0
</height>
<height>
3
0
</height>
</size>
</property>
<property
name=
"text"
>
...
...
@@ -695,7 +693,10 @@
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_19"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<item>
<spacer
name=
"horizontalSpacer_28"
>
<property
name=
"orientation"
>
...
...
@@ -713,7 +714,7 @@
<widget
class=
"QCheckBox"
name=
"checkBox_2"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<width>
13
0
</width>
<height>
0
</height>
</size>
</property>
...
...
@@ -724,22 +725,28 @@
</size>
</property>
<property
name=
"text"
>
<string>
下次默认自动登陆
</string>
<string>
自动登录
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
<widget
class=
"QCheckBox"
name=
"checkBox_rememberPwd"
>
<property
name=
"minimumSize"
>
<size>
<width>
70
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"
sizeHint"
stdset=
"0
"
>
<property
name=
"
maximumSize
"
>
<size>
<width>
40
</width>
<height>
20
</height>
<width>
16777215
</width>
<height>
16777215
</height>
</size>
</property>
</spacer>
<property
name=
"text"
>
<string>
记住密码
</string>
</property>
</widget>
</item>
</layout>
</item>
...
...
@@ -762,31 +769,10 @@
</spacer>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<property
name=
"spacing"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<item>
<spacer
name=
"verticalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
11
</height>
</size>
</property>
</spacer>
</item>
<item>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<widget
class=
"QWidget"
name=
"widget_3"
native=
"true"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_6"
>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
...
...
@@ -794,7 +780,7 @@
<number>
0
</number>
</property>
<item
row=
"4"
column=
"2"
>
<widget
class=
"QPushButton"
name=
"pushButton_10
"
>
<widget
class=
"QPushButton"
name=
"pushButton_num9
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -819,7 +805,7 @@
</widget>
</item>
<item
row=
"5"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_11
"
>
<widget
class=
"QPushButton"
name=
"pushButton_num0
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -844,7 +830,7 @@
</widget>
</item>
<item
row=
"5"
column=
"2"
>
<widget
class=
"QPushButton"
name=
"pushButton_clear_2
"
>
<widget
class=
"QPushButton"
name=
"pushButton_clearBtn
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -866,7 +852,7 @@
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_13
"
>
<widget
class=
"QPushButton"
name=
"pushButton_num4
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -891,7 +877,7 @@
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_1
2"
>
<widget
class=
"QPushButton"
name=
"pushButton_num
2"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -916,7 +902,7 @@
</widget>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_14
"
>
<widget
class=
"QPushButton"
name=
"pushButton_num7
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -941,7 +927,7 @@
</widget>
</item>
<item
row=
"0"
column=
"2"
>
<widget
class=
"QPushButton"
name=
"pushButton_15
"
>
<widget
class=
"QPushButton"
name=
"pushButton_num3
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -966,7 +952,7 @@
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_16
"
>
<widget
class=
"QPushButton"
name=
"pushButton_num8
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -991,7 +977,7 @@
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"pushButton_17
"
>
<widget
class=
"QPushButton"
name=
"pushButton_num5
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -1016,7 +1002,7 @@
</widget>
</item>
<item
row=
"5"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_del_2
"
>
<widget
class=
"QPushButton"
name=
"pushButton_delBtn
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -1038,7 +1024,7 @@
</widget>
</item>
<item
row=
"3"
column=
"2"
>
<widget
class=
"QPushButton"
name=
"pushButton_18
"
>
<widget
class=
"QPushButton"
name=
"pushButton_num6
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -1063,7 +1049,7 @@
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QPushButton"
name=
"pushButton_19
"
>
<widget
class=
"QPushButton"
name=
"pushButton_num1
"
>
<property
name=
"minimumSize"
>
<size>
<width>
95
</width>
...
...
@@ -1093,6 +1079,7 @@
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_34"
>
...
...
takeout/view/newmainform.cpp
View file @
756f75c9
...
...
@@ -541,7 +541,7 @@ void NewMainForm::SetMainBtnCheck(MainBtn *wgt)
else
var
->
setChecked
(
false
);
//
qDebug() << "&&&&&&&&&&&&" << var->property("type").toString();
qDebug
()
<<
"&&&&&&&&&&&&"
<<
var
->
property
(
"type"
).
toString
();
}
}
...
...
@@ -616,6 +616,14 @@ bool NewMainForm::event(QEvent *e)
if
(
var
->
getMainBtnType
().
compare
(
"refund"
,
Qt
::
CaseInsensitive
)
==
0
)
{
var
->
SetText
((
QString
::
fromUtf8
(
"
\xE9\x80\x80\xE5\x8D\x95
"
)
+
QString
(
"(%1)"
).
arg
(
QString
::
number
(
tk_refund
+
self_refund
))),
MAIN_REFUND
);
if
(
_type
==
1
)
{
var
->
setChecked
(
true
);
}
else
{
var
->
setChecked
(
false
);
}
}
}
...
...
@@ -693,6 +701,14 @@ bool NewMainForm::event(QEvent *e)
if
(
var
->
getMainBtnType
().
compare
(
"refund"
,
Qt
::
CaseInsensitive
)
==
0
)
{
var
->
SetText
((
QString
::
fromUtf8
(
"
\xE9\x80\x80\xE5\x8D\x95
"
)
+
QString
(
"(%1)"
).
arg
(
QString
::
number
(
tk_refund
+
self_refund
))),
MAIN_REFUND
);
if
(
_type
==
1
)
{
var
->
setChecked
(
true
);
}
else
{
var
->
setChecked
(
false
);
}
}
}
...
...
@@ -1676,9 +1692,11 @@ bool NewMainForm::GetContext(QString &context)
QString
bakfilename
=
path
+
"/test_back.xml"
;
QString
filename
=
path
+
"/test_ticket.xml"
;
QString
labelname
=
path
+
"/test_label.xml"
;
QLOG_DEBUG
()
<<
"bakfilename"
<<
bakfilename
;
QLOG_DEBUG
()
<<
"filename"
<<
filename
;
QLOG_DEBUG
()
<<
"labelname"
<<
labelname
;
if
(
_prttype
==
0
)
{
...
...
@@ -1710,6 +1728,21 @@ bool NewMainForm::GetContext(QString &context)
return
true
;
}
}
// else if(_prttype == 1)
// {
// QFile file(labelname);
// if(file.open(QFile::ReadOnly))
// {
// QByteArray data = file.readAll();
// context = QString::fromUtf8(data);
// file.close();
// return true;
// }
// }
return
false
;
}
...
...
@@ -1798,6 +1831,14 @@ void NewMainForm::on_newmainbtn_prttest_clicked()
return
;
}
//增加杯贴打印模板
// if((GetContext(context) == false) || (context.isEmpty()))
// {
// QLOG_ERROR() << "context:" << context;
// ui->newmainlabel_errmsg->setText(QString::fromUtf8("\xE8\x8E\xB7\xE5\x8F\x96\xE6\x89\x93\xE5\x8D\xB0\xE6\xA8\xA1\xE6\x9D\xBF\xE5\xA4\xB1\xE8\xB4\xA5"));
// return ;
// }
bool
flag
=
false
;
qsrand
(
QTime
(
0
,
0
,
0
).
secsTo
(
QTime
::
currentTime
()));
...
...
@@ -1817,6 +1858,7 @@ void NewMainForm::on_newmainbtn_prttest_clicked()
flag
=
lib
.
DoPrint
(
prtconfig
,
context
,
&
order
);
else
if
(
_prttype
==
1
)
flag
=
lib
.
DoLabelPrint
(
prtconfig
,
&
order
);
// flag = lib.DoLabelModelPrint(prtconfig, context, &order);
else
if
(
_prttype
==
2
)
flag
=
lib
.
DoBackPrint
(
pagerepart
,
prodrepart
,
pagenum
,
list
,
prtconfig
,
context
,
&
order
);
...
...
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