|
@@ -933,12 +933,30 @@ std::string CPosPrinterData::PrintDiandanOrderShouyin(CDiandanOrder& order)
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
|
|
|
|
|
string date = "取餐号:" + CLewaimaiString::UTF8ToANSI(order.take_food_code);
|
|
string date = "取餐号:" + CLewaimaiString::UTF8ToANSI(order.take_food_code);
|
|
|
- POS_TextOut(date, false, true);
|
|
|
|
|
|
|
+ POS_TextOut(date, true, true, 1);
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
|
|
|
|
|
|
|
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
|
|
|
|
|
|
|
+ if (order.m_canpai.length() > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ string order_num = "餐牌:" + CLewaimaiString::UTF8ToANSI(order.m_canpai);
|
|
|
|
|
+ POS_TextOut(order_num, false, false);
|
|
|
|
|
+ POS_FeedLine();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //订单号
|
|
|
|
|
+ bool setting_printer_dingdanhao_big = false;
|
|
|
|
|
+ if (CSetting::GetParam("setting_printer_dingdanhao_big") == "1")
|
|
|
|
|
+ {
|
|
|
|
|
+ setting_printer_dingdanhao_big = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ string order_num = "订 单 号:" + CLewaimaiString::UTF8ToANSI(order.show_trade_no);
|
|
|
|
|
+ POS_TextOut(order_num, false, setting_printer_dingdanhao_big);
|
|
|
|
|
+ POS_FeedLine();
|
|
|
|
|
+
|
|
|
//订单来源
|
|
//订单来源
|
|
|
if (order.order_from == 1)
|
|
if (order.order_from == 1)
|
|
|
{
|
|
{
|
|
@@ -959,18 +977,6 @@ std::string CPosPrinterData::PrintDiandanOrderShouyin(CDiandanOrder& order)
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //订单号
|
|
|
|
|
- bool setting_printer_dingdanhao_big = false;
|
|
|
|
|
-
|
|
|
|
|
- if (CSetting::GetParam("setting_printer_dingdanhao_big") == "1")
|
|
|
|
|
- {
|
|
|
|
|
- setting_printer_dingdanhao_big = true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- string order_num = "订 单 号:" + CLewaimaiString::UTF8ToANSI(order.show_trade_no);
|
|
|
|
|
- POS_TextOut(order_num, false, setting_printer_dingdanhao_big);
|
|
|
|
|
- POS_FeedLine();
|
|
|
|
|
-
|
|
|
|
|
//下单时间
|
|
//下单时间
|
|
|
bool setting_printer_xiadanshijian_big = false;
|
|
bool setting_printer_xiadanshijian_big = false;
|
|
|
|
|
|
|
@@ -1041,7 +1047,7 @@ std::string CPosPrinterData::PrintDiandanOrderShouyin(CDiandanOrder& order)
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
//商品内容
|
|
//商品内容
|
|
|
- for (std::vector<CWaimaiOrderItem>::iterator it = order.m_order_items.begin(); it != order.m_order_items.end(); it++)
|
|
|
|
|
|
|
+ for (std::vector<CDiandanOrderItemPrint>::iterator it = order.m_items_print.begin(); it != order.m_items_print.end(); it++)
|
|
|
{
|
|
{
|
|
|
std::string food_name = (*it).m_food_name;
|
|
std::string food_name = (*it).m_food_name;
|
|
|
std::string food_price = (*it).m_item_price;
|
|
std::string food_price = (*it).m_item_price;
|
|
@@ -1127,7 +1133,7 @@ std::string CPosPrinterData::PrintDiandanOrderShouyin(CDiandanOrder& order)
|
|
|
setting_printer_price_big = true;
|
|
setting_printer_price_big = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (order.m_is_dabao == "1")
|
|
|
|
|
|
|
+ if (atof(order.m_dabao_money.c_str()) > 0)
|
|
|
{
|
|
{
|
|
|
string dabao = "打包费:" + CLewaimaiString::UTF8ToANSI(order.m_dabao_money);
|
|
string dabao = "打包费:" + CLewaimaiString::UTF8ToANSI(order.m_dabao_money);
|
|
|
POS_TextOut(dabao, false, setting_printer_price_big);
|
|
POS_TextOut(dabao, false, setting_printer_price_big);
|
|
@@ -1151,47 +1157,82 @@ std::string CPosPrinterData::PrintDiandanOrderShouyin(CDiandanOrder& order)
|
|
|
}
|
|
}
|
|
|
}*/
|
|
}*/
|
|
|
|
|
|
|
|
- if (order.m_discount < 10)
|
|
|
|
|
|
|
+ if (atof(order.m_shangpinquan_youhui.c_str()) > 0)
|
|
|
{
|
|
{
|
|
|
- string discount = "打折:" + CLewaimaiString::DoubleToString((double)order.m_discount, 2) + "折";
|
|
|
|
|
- POS_TextOut(discount, false, setting_printer_price_big);
|
|
|
|
|
|
|
+ string youhui = "商品券优惠:" + order.m_shangpinquan_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
is_other_money = true;
|
|
is_other_money = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (order.m_is_member_discount == "1")
|
|
|
|
|
|
|
+ if (atof(order.m_cika_youhui.c_str()) > 0)
|
|
|
{
|
|
{
|
|
|
- string member_discount = "会员优惠:-" + order.m_member_discount;
|
|
|
|
|
- POS_TextOut(member_discount, false, setting_printer_price_big);
|
|
|
|
|
|
|
+ string youhui = "次卡优惠:" + order.m_cika_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
is_other_money = true;
|
|
is_other_money = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (order.m_is_firstcut == "1")
|
|
|
|
|
|
|
+ if (atof(order.m_total_member_youhui.c_str()) > 0)
|
|
|
{
|
|
{
|
|
|
- string firstcut = "首单优惠:-" + order.m_firstcut_value;
|
|
|
|
|
- POS_TextOut(firstcut, false, setting_printer_price_big);
|
|
|
|
|
|
|
+ string youhui = "商品会员价优惠:" + order.m_total_member_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
is_other_money = true;
|
|
is_other_money = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //满减
|
|
|
|
|
- string::size_type position = order.m_promotion.find(":");
|
|
|
|
|
|
|
+ if (atof(order.m_zhekou_youhui.c_str()) > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ string youhui = "整单折扣优惠:" + order.m_zhekou_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
|
|
+ POS_FeedLine();
|
|
|
|
|
+ is_other_money = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (atof(order.m_member_zhekou_youhui.c_str()) > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ string youhui = "会员整单折扣优惠:" + order.m_member_zhekou_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
|
|
+ POS_FeedLine();
|
|
|
|
|
+ is_other_money = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (atof(order.m_quanyika_youhui.c_str()) > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ string youhui = "权益卡优惠:" + order.m_quanyika_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
|
|
+ POS_FeedLine();
|
|
|
|
|
+ is_other_money = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (atof(order.m_manjian_youhui.c_str()) > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ string youhui = "满减优惠:" + order.m_manjian_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
|
|
+ POS_FeedLine();
|
|
|
|
|
+ is_other_money = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (atof(order.m_youhuiquan_youhui.c_str()) > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ string youhui = "优惠券优惠:" + order.m_youhuiquan_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
|
|
+ POS_FeedLine();
|
|
|
|
|
+ is_other_money = true;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- if (position != order.m_promotion.npos)
|
|
|
|
|
|
|
+ if (atof(order.m_rengong_youhui.c_str()) > 0)
|
|
|
{
|
|
{
|
|
|
- string promotion_value;
|
|
|
|
|
- promotion_value.assign(order.m_promotion, position + 1);
|
|
|
|
|
- string promotion = "满减优惠:-" + CLewaimaiString::DoubleToString((double)(atof(promotion_value.c_str())), 2);
|
|
|
|
|
- POS_TextOut(promotion, false, setting_printer_price_big);
|
|
|
|
|
|
|
+ string youhui = "人工优惠:" + order.m_rengong_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
is_other_money = true;
|
|
is_other_money = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (order.m_coupon > 0)
|
|
|
|
|
|
|
+ if (atof(order.m_moling_youhui.c_str()) > 0)
|
|
|
{
|
|
{
|
|
|
- string coupon = "优惠券:-" + CLewaimaiString::DoubleToString((double)order.m_coupon, 2);
|
|
|
|
|
- POS_TextOut(coupon, false, setting_printer_price_big);
|
|
|
|
|
|
|
+ string youhui = "抹零优惠:" + order.m_moling_youhui + "元";
|
|
|
|
|
+ POS_TextOut(youhui, false, setting_printer_price_big);
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
is_other_money = true;
|
|
is_other_money = true;
|
|
|
}
|
|
}
|
|
@@ -1203,7 +1244,7 @@ std::string CPosPrinterData::PrintDiandanOrderShouyin(CDiandanOrder& order)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//最后显示总价
|
|
//最后显示总价
|
|
|
- POS_TextOut("总计:¥" + CLewaimaiString::DoubleToString(order.m_price, 2), false, setting_printer_price_big, 2);
|
|
|
|
|
|
|
+ POS_TextOut("总计:" + order.m_total_price + "元", false, setting_printer_price_big, 2);
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
|
|
|
|
|
//显示付款方式
|
|
//显示付款方式
|
|
@@ -1214,7 +1255,7 @@ std::string CPosPrinterData::PrintDiandanOrderShouyin(CDiandanOrder& order)
|
|
|
setting_printer_pay_big = true;
|
|
setting_printer_pay_big = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- POS_TextOut("支付方式:" + CLewaimaiString::UTF8ToANSI(order.m_pay_type), false, setting_printer_pay_big, 2);
|
|
|
|
|
|
|
+ POS_TextOut("支付方式:" + CLewaimaiString::UTF8ToANSI(order.shoukuan_type), false, setting_printer_pay_big, 2);
|
|
|
|
|
|
|
|
POS_FeedLine();
|
|
POS_FeedLine();
|
|
|
|
|
|