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
c768bf9d
Commit
c768bf9d
authored
Mar 18, 2019
by
xiaoqing.gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、添加交接班打印的icon 2、修复打印内存泄漏的问题
parent
e5ca3f7d
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
6 deletions
+19
-6
Resources/skin/deaufult.qrc
+3
-0
Resources/skin/deaufult.rcc
+0
-0
Resources/skin/shift_off.png
+0
-0
Resources/skin/shift_on.png
+0
-0
takeout/base/Print/newprintlib.cpp
+13
-3
takeout/view/mainbtn.cpp
+2
-2
takeout/view/newchangeshiftsform.h
+1
-1
No files found.
Resources/skin/deaufult.qrc
View file @
c768bf9d
...
@@ -48,5 +48,7 @@
...
@@ -48,5 +48,7 @@
<file>login_save.png</file>
<file>login_save.png</file>
<file>login_unsave.png</file>
<file>login_unsave.png</file>
<file>icon_order_detail_close.png</file>
<file>icon_order_detail_close.png</file>
<file>shift_off.png</file>
<file>shift_on.png</file>
</qresource>
</qresource>
</RCC>
</RCC>
\ No newline at end of file
Resources/skin/deaufult.rcc
View file @
c768bf9d
No preview for this file type
Resources/skin/shift_off.png
0 → 100644
View file @
c768bf9d
1.28 KB
Resources/skin/shift_on.png
0 → 100644
View file @
c768bf9d
1.27 KB
takeout/base/Print/newprintlib.cpp
View file @
c768bf9d
...
@@ -284,12 +284,16 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
...
@@ -284,12 +284,16 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
CONSTCHARTOCHAR
(
prtconfigdata
,
prtconfig
);
CONSTCHARTOCHAR
(
prtconfigdata
,
prtconfig
);
char
*
xml
=
NULL
;
char
*
xml
=
NULL
;
// QByteArray xmldata = context.toUtf8();
// QByteArray xmldata = context.toUtf8();
QByteArray
xmldata
=
context
.
toLocal8Bit
();
QByteArray
xmldata
=
context
.
toLocal8Bit
();
CONSTCHARTOCHAR
(
xmldata
,
xml
);
CONSTCHARTOCHAR
(
xmldata
,
xml
);
char
*
orderinfo
=
NULL
;
char
*
orderinfo
=
NULL
;
// QByteArray orderdata = QString(QJsonDocument(tmporder._orderObject).toJson()).toUtf8();
// QByteArray orderdata = QString(QJsonDocument(tmporder._orderObject).toJson()).toUtf8();
...
@@ -356,7 +360,6 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
...
@@ -356,7 +360,6 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
}
}
}
}
QLOG_DEBUG
()
<<
"NewNew"
;
//将订单的预约时间拿过来转换成订单需要的QString类型
//将订单的预约时间拿过来转换成订单需要的QString类型
int
delivery_time
=
orderObj
[
"delivery_time"
].
toInt
();
int
delivery_time
=
orderObj
[
"delivery_time"
].
toInt
();
...
@@ -377,13 +380,12 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
...
@@ -377,13 +380,12 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
tmporder
.
_orderObject
.
insert
(
"prt_delivery_time"
,
prt_delivery_time
);
tmporder
.
_orderObject
.
insert
(
"prt_delivery_time"
,
prt_delivery_time
);
QLOG_DEBUG
()
<<
"prt_type"
<<
type
;
QLOG_DEBUG
()
<<
"NewNew tmporder._orderObject :"
<<
tmporder
.
_orderObject
;
QLOG_DEBUG
()
<<
"NewNew tmporder._orderObject :"
<<
tmporder
.
_orderObject
;
QByteArray
orderdata
=
QString
(
QJsonDocument
(
tmporder
.
_orderObject
).
toJson
()).
toLocal8Bit
();
QByteArray
orderdata
=
QString
(
QJsonDocument
(
tmporder
.
_orderObject
).
toJson
()).
toLocal8Bit
();
CONSTCHARTOCHAR
(
orderdata
,
orderinfo
);
CONSTCHARTOCHAR
(
orderdata
,
orderinfo
);
char
err
[
1024
]
=
{
0
};
char
err
[
1024
]
=
{
0
};
f_DoPrintWithXml
(
prtconfig
,
orderinfo
,
xml
,
err
);
f_DoPrintWithXml
(
prtconfig
,
orderinfo
,
xml
,
err
);
...
@@ -393,6 +395,10 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
...
@@ -393,6 +395,10 @@ bool NewPrintLib::DoPrint(const QString &config, const QString &context, OrderOb
QLOG_ERROR
()
<<
"f_DoPrintWithXml failed error : "
<<
err
;
QLOG_ERROR
()
<<
"f_DoPrintWithXml failed error : "
<<
err
;
}
}
delete
[]
prtconfig
;
delete
[]
xml
;
delete
[]
orderinfo
;
QLOG_DEBUG
()
<<
"f_DoPrintWithXml success"
;
QLOG_DEBUG
()
<<
"f_DoPrintWithXml success"
;
// char* configStr;
// char* configStr;
...
@@ -751,6 +757,10 @@ bool NewPrintLib::DoBackPrint(int page_depart, int prod_depart, int page_num, co
...
@@ -751,6 +757,10 @@ bool NewPrintLib::DoBackPrint(int page_depart, int prod_depart, int page_num, co
QLOG_ERROR
()
<<
"f_DoPrintWithXml failed error : "
<<
err
;
QLOG_ERROR
()
<<
"f_DoPrintWithXml failed error : "
<<
err
;
}
}
delete
[]
prtconfig
;
delete
[]
xml
;
delete
[]
orderinfo
;
QLOG_DEBUG
()
<<
"f_DoPrintWithXml success"
;
QLOG_DEBUG
()
<<
"f_DoPrintWithXml success"
;
...
...
takeout/view/mainbtn.cpp
View file @
c768bf9d
...
@@ -105,14 +105,14 @@ void MainBtn::setChecked(bool check)
...
@@ -105,14 +105,14 @@ void MainBtn::setChecked(bool check)
if
(
check
)
if
(
check
)
{
{
ui
->
mainbtnlabel_name
->
setStyleSheet
(
"#mainbtnlabel_name{color:rgba(255,255,255,1)}"
);
ui
->
mainbtnlabel_name
->
setStyleSheet
(
"#mainbtnlabel_name{color:rgba(255,255,255,1)}"
);
ui
->
mainbtnlabel_lg
->
setStyleSheet
(
"#mainbtnlabel_lg{ border-image: url(:s
can
_on.png)}"
);
ui
->
mainbtnlabel_lg
->
setStyleSheet
(
"#mainbtnlabel_lg{ border-image: url(:s
hift
_on.png)}"
);
_info
=
QString
::
fromUtf8
(
"
\xE4\xBA\xA4\xE6\x8E\xA5\xE7\x8F\xAD
"
);
_info
=
QString
::
fromUtf8
(
"
\xE4\xBA\xA4\xE6\x8E\xA5\xE7\x8F\xAD
"
);
QLOG_DEBUG
()
<<
"*shifts"
<<
_info
;
QLOG_DEBUG
()
<<
"*shifts"
<<
_info
;
}
}
else
else
{
{
ui
->
mainbtnlabel_name
->
setStyleSheet
(
"#mainbtnlabel_name{color:rgba(125,139,153,1)}"
);
ui
->
mainbtnlabel_name
->
setStyleSheet
(
"#mainbtnlabel_name{color:rgba(125,139,153,1)}"
);
ui
->
mainbtnlabel_lg
->
setStyleSheet
(
"#mainbtnlabel_lg{ border-image: url(:s
can
_off.png)}"
);
ui
->
mainbtnlabel_lg
->
setStyleSheet
(
"#mainbtnlabel_lg{ border-image: url(:s
hift
_off.png)}"
);
}
}
return
;
return
;
}
}
...
...
takeout/view/newchangeshiftsform.h
View file @
c768bf9d
...
@@ -134,7 +134,7 @@ private:
...
@@ -134,7 +134,7 @@ private:
data
.
insert
(
JSON_KEY_PARTNERID
,
map
[
JSON_KEY_PARTNERID
].
toString
());
data
.
insert
(
JSON_KEY_PARTNERID
,
map
[
JSON_KEY_PARTNERID
].
toString
());
data
.
insert
(
JSON_STOREID
,
map
[
JSON_STOREID
].
toString
());
data
.
insert
(
JSON_STOREID
,
map
[
JSON_STOREID
].
toString
());
data
.
insert
(
JSON_SEARCHSTARTDATE
,
map
[
JSON_KEY_TIMESTAMP
].
toString
());
data
.
insert
(
JSON_SEARCHSTARTDATE
,
map
[
JSON_KEY_TIMESTAMP
].
toString
());
// data.insert(JSON_SEARCHSTARTDATE, QString("2019-03-01 00:00
:00
"));
// data.insert(JSON_SEARCHSTARTDATE, QString("2019-03-01 00:00"));
data
.
insert
(
JSON_SEARCHENDDATE
,
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd hh:mm"
));
data
.
insert
(
JSON_SEARCHENDDATE
,
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd hh:mm"
));
return
true
;
return
true
;
}
}
...
...
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