Commit 077caf2a by ss.dai

调试打印

parent 49b63027
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <QFile> #include <QFile>
#include <QCoreApplication> #include <QCoreApplication>
#include <QDateTime> #include <QDateTime>
#include <QPrinter>
FmPrinter &FmPrinter::GetInstance() FmPrinter &FmPrinter::GetInstance()
{ {
...@@ -36,7 +37,7 @@ QString FmPrinter::_GetPrintData(OrderObject *pData) ...@@ -36,7 +37,7 @@ QString FmPrinter::_GetPrintData(OrderObject *pData)
{ {
QString name, price; QString name, price;
name = pData->proList[i]->name; 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)); .arg(_Penny2Dollar(pData->proList[i]->price*pData->proList[i]->productAmount));
str_comd_list.append(QString(name+price)); str_comd_list.append(QString(name+price));
} }
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#------------------------------------------------- #-------------------------------------------------
QT -= gui QT -= gui
QT += printsupport
TARGET = fmPrinter TARGET = fmPrinter
TEMPLATE = lib TEMPLATE = lib
......
...@@ -5,23 +5,20 @@ ...@@ -5,23 +5,20 @@
客户姓名: %5 客户姓名: %5
客户电话: %6 客户电话: %6
客户地址: %7 客户地址: %7
******************************* ------------------------------------------------
品名 数量 单价 金额 品名 数量 单价 金额
%8******************************* %8------------------------------------------------
商品金额:¥%9 商品金额:¥%9
商品优惠:¥%10 商品优惠:¥%10
运费金额:¥%11 运费金额:¥%11
总件数: %12 总件数: %12
%13 %13
******************************* -------------------------------------------------------
下单时间: %14 下单时间: %14
备注:%15 备注:%15
配送员: %16 配送员: %16
电话: %17 电话: %17
送达时间: %18 送达时间: %18
老乡鸡安徽快餐领先品牌
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment