Kaynağa Gözat

取餐号打印优化

张洋 3 yıl önce
ebeveyn
işleme
5e20b17b42

+ 3 - 3
zhipuzi_pos_windows/network/CZhipuziHttpClient.cpp

@@ -15,9 +15,9 @@ CZhipuziHttpClient::CZhipuziHttpClient()
 
 	if (m_env == DEV)
 	{
-		m_pingtai_url = "https://pf-api-dev.zhipuzi.com/pos";
-		m_canyin_yewu_url = "https://cyapi-dev.zhipuzi.com/pos";
-		m_lingshou_yewu_url = "https://lsapi-dev.zhipuzi.com/pos";
+		m_pingtai_url = "https://pf-api-dev3.zhipuzi.com/pos";
+		m_canyin_yewu_url = "https://cyapi-dev3.zhipuzi.com/pos";
+		m_lingshou_yewu_url = "https://lsapi-dev3.zhipuzi.com/pos";
 	}
 	else if (m_env == TEST)
 	{

+ 24 - 5
zhipuzi_pos_windows/print/CPosPrinterData.cpp

@@ -62,6 +62,22 @@ std::string CPosPrinterData::PrintWaimaiOrderShouyin(CWaimaiOrder& order)
 			POS_TextOut("取货", false, false);
 
 			POS_FeedLine();
+
+			//自取单打印取餐码
+			if (CShopinfo::GetInstance()->m_version_type == "1")
+			{
+				//餐饮
+				string date = "取餐号:" + CLewaimaiString::UTF8ToANSI(order.m_take_food_code);
+				POS_TextOut(date, true, true, 1);
+				POS_FeedLine();
+			}
+			else
+			{
+				//零售
+				string date = "取货号:" + CLewaimaiString::UTF8ToANSI(order.m_take_food_code);
+				POS_TextOut(date, true, true, 1);
+				POS_FeedLine();
+			}
 		}
 		else
 		{
@@ -85,7 +101,7 @@ std::string CPosPrinterData::PrintWaimaiOrderShouyin(CWaimaiOrder& order)
 		}
 
 		POS_FeedLine();
-
+		
 		//打印取货方式
 		/*
         bool setting_printer_quhuo_big = false;
@@ -1082,10 +1098,13 @@ std::string CPosPrinterData::PrintDiandanOrderShouyin(CDiandanOrder& order)
 		POS_FeedLine();
 		POS_FeedLine();
 
-		string date = "取餐号:" + CLewaimaiString::UTF8ToANSI(order.take_food_code);
-		POS_TextOut(date, true, true, 1);
-		POS_FeedLine();
-
+		if (CShopinfo::GetInstance()->m_version_type == "1")
+		{
+			//餐饮版才打印取餐号
+			string date = "取餐号:" + CLewaimaiString::UTF8ToANSI(order.take_food_code);
+			POS_TextOut(date, true, true, 1);
+			POS_FeedLine();
+		}
 
 		POS_FeedLine();