Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmTakeaway
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
shangshang.dai
FmTakeaway
Commits
077caf2a
Commit
077caf2a
authored
Sep 09, 2016
by
ss.dai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试打印
parent
49b63027
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
fmPrinter/fmPrinter.cpp
+2
-1
fmPrinter/fmPrinter.pro
+1
-0
run/printformat.txt
+3
-6
No files found.
fmPrinter/fmPrinter.cpp
View file @
077caf2a
...
...
@@ -4,6 +4,7 @@
#include <QFile>
#include <QCoreApplication>
#include <QDateTime>
#include <QPrinter>
FmPrinter
&
FmPrinter
::
GetInstance
()
{
...
...
@@ -36,7 +37,7 @@ QString FmPrinter::_GetPrintData(OrderObject *pData)
{
QString
name
,
price
;
name
=
pData
->
proList
[
i
]
->
name
;
price
=
QString
(
"
\r\n
x%1 %2 %4
\r\n
"
).
arg
(
pData
->
proList
[
i
]
->
productAmount
).
arg
(
_Penny2Dollar
(
pData
->
proList
[
i
]
->
price
))
price
=
QString
(
"
\r\n
x%1 %2 %3
\r\n
"
).
arg
(
pData
->
proList
[
i
]
->
productAmount
).
arg
(
_Penny2Dollar
(
pData
->
proList
[
i
]
->
price
))
.
arg
(
_Penny2Dollar
(
pData
->
proList
[
i
]
->
price
*
pData
->
proList
[
i
]
->
productAmount
));
str_comd_list
.
append
(
QString
(
name
+
price
));
}
...
...
fmPrinter/fmPrinter.pro
View file @
077caf2a
...
...
@@ -5,6 +5,7 @@
#-------------------------------------------------
QT
-=
gui
QT
+=
printsupport
TARGET
=
fmPrinter
TEMPLATE
=
lib
...
...
run/printformat.txt
View file @
077caf2a
...
...
@@ -5,23 +5,20 @@
客户姓名: %5
客户电话: %6
客户地址: %7
*******************************
------------------------------------------------
品名 数量 单价 金额
%8
*******************************
%8
------------------------------------------------
商品金额:¥%9
商品优惠:¥%10
运费金额:¥%11
总件数: %12
%13
*******************************
-------------------------------------------------------
下单时间: %14
备注:%15
配送员: %16
电话: %17
送达时间: %18
老乡鸡安徽快餐领先品牌
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