张洋 4 gadi atpakaļ
vecāks
revīzija
1103660f58

+ 2 - 2
zhipuzi_pos_windows/page/CShangpinCreatePageUI.cpp

@@ -66,7 +66,7 @@ void CShangpinCreatePageUI::InitShow()
 
 	//商品条码
 	CEditUI* pTiaoma = static_cast<CEditUI*>(this->FindSubControl(L"shangpin_create_page_barcode_edit"));
-	pXuhao->SetText(L"");
+	pTiaoma->SetText(L"");
 
 	//商品价格
 	CEditUI* pPrice = static_cast<CEditUI*>(this->FindSubControl(L"shangpin_create_page_price_edit"));
@@ -654,7 +654,7 @@ void CShangpinCreatePageUI::HandleSave()
 
 	params["dabao_money"] = m_dabaofei;
 
-	params["jiagong_type"] = m_jiagong_type;
+	params["jiagong_type"] = to_string(m_jiagong_type);
 	
 	//这下面是接口要求必传参数
 	params["goods_img"] = "";

+ 7 - 2
zhipuzi_pos_windows/page/CShangpinUpdatePageUI.cpp

@@ -620,6 +620,7 @@ void CShangpinUpdatePageUI::HandleSave()
 {
 	std::map<string, string> params;
 
+	params["goods_id"] = m_foodinfo.id;
 	params["goods_name"] = m_name;
 	params["goods_tag"] = m_xuhao;
 	params["type_lv1_id"] = m_foodtype_id_map[m_fenlei];
@@ -661,6 +662,8 @@ void CShangpinUpdatePageUI::HandleSave()
 
 	params["buying_price"] = m_jinhuojia;
 
+	//这里目前缺少一个进货价模式
+
 	if (m_is_shouyinji_show)
 	{
 		params["is_shouyinji_show"] = "1";
@@ -701,10 +704,12 @@ void CShangpinUpdatePageUI::HandleSave()
 
 	params["dabao_money"] = m_dabaofei;
 
-	params["jiagong_type"] = m_jiagong_type;
+	params["jiagong_type"] = to_string(m_jiagong_type);
 	
 	//这下面是接口要求必传参数
-	params["goods_img"] = "";
+	params["goods_img"] = m_foodinfo.goods_img;
+	params["goods_thumb_img"] = m_foodinfo.goods_img;
+
 	params["open_autostock"] = "0";
 	params["stock_warning"] = "0";
 

BIN
zhipuzi_pos_windows/resource/skin.zip


+ 17 - 6
zhipuzi_pos_windows/tool/CSqlite3.cpp

@@ -825,6 +825,12 @@ bool CSqlite3::InitFoodData(rapidjson::Value& foodrows)
 		rapidjson::Value& foodinfo = foodrows[i];
 
 		std::string id = foodinfo["id"].GetString();
+
+		if (id == "5625413")
+		{
+			int a = 1;
+		}
+
 		std::string shop_id = foodinfo["shop_id"].GetString();
 		std::string name = foodinfo["name"].GetString();
 		std::string price = foodinfo["price"].GetString();
@@ -1252,15 +1258,20 @@ std::vector<CFood> CSqlite3::GetFoodByTypeid(std::string type_id, bool is_shouyi
 			newFood.member_price_used = (char*)sqlite3_column_text(stmt, 15);
 			newFood.member_price = (char*)sqlite3_column_text(stmt, 16);
 			newFood.buying_price = (char*)sqlite3_column_text(stmt, 17);
-			newFood.stock = (char*)sqlite3_column_text(stmt,18);
+			newFood.stock = (char*)sqlite3_column_text(stmt, 18);
 			newFood.stockvalid = (char*)sqlite3_column_text(stmt, 19);
 			newFood.stock_warning = (char*)sqlite3_column_text(stmt, 20);
 			newFood.is_shouyinji_show = (char*)sqlite3_column_text(stmt, 21);
-			newFood.expiration_date = (char*)sqlite3_column_text(stmt, 22);
-			newFood.is_weight = (char*)sqlite3_column_text(stmt, 23);
-			newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 24);
-			newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 25);
-			newFood.member_price_json = (char*)sqlite3_column_text(stmt, 26);
+			newFood.is_waimai_show = (char*)sqlite3_column_text(stmt, 22);
+			newFood.is_tangshi_show = (char*)sqlite3_column_text(stmt, 23);
+			newFood.is_zhengcan_show = (char*)sqlite3_column_text(stmt, 24);
+			newFood.expiration_date = (char*)sqlite3_column_text(stmt, 25);
+			newFood.is_weight = (char*)sqlite3_column_text(stmt, 26);
+			newFood.weight_plu_code = (char*)sqlite3_column_text(stmt, 27);
+			newFood.weight_food_code = (char*)sqlite3_column_text(stmt, 28);
+			newFood.jiagong_type = (char*)sqlite3_column_text(stmt, 29);
+			newFood.cost_mode = (char*)sqlite3_column_text(stmt, 30);
+			newFood.member_price_json = (char*)sqlite3_column_text(stmt, 31);
 
 			data.push_back(newFood);
 		}