From 372d2588763e0b9e9dd0d5b960744dd9205027f7 Mon Sep 17 00:00:00 2001 From: NXX <447201003@qq> Date: Mon, 10 Apr 2023 18:00:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmartClient.MorkBF/Control_MorkBF.cs | 16 +++---- BPASmartClient.MorkF/Control_MorkF.cs | 15 ++++--- BPASmartClient.MorkF/Model/MaterialSurplus.cs | 2 +- BPASmartClient/Control/FoodMenu.xaml | 45 +++++++++++++++++++ BPASmartClient/Control/FoodMenu.xaml.cs | 26 +++++++++++ BPASmartClient/MainWindow.xaml | 8 ++++ 6 files changed, 96 insertions(+), 16 deletions(-) create mode 100644 BPASmartClient/Control/FoodMenu.xaml create mode 100644 BPASmartClient/Control/FoodMenu.xaml.cs diff --git a/BPASmartClient.MorkBF/Control_MorkBF.cs b/BPASmartClient.MorkBF/Control_MorkBF.cs index 94d82768..a87d88f7 100644 --- a/BPASmartClient.MorkBF/Control_MorkBF.cs +++ b/BPASmartClient.MorkBF/Control_MorkBF.cs @@ -37,14 +37,14 @@ namespace BPASmartClient.MorkBF MonitorViewModel.DeviceId = DeviceId; ActionManage.GetInstance.Register(new Action(() => { - GlobalFoodMenu.LocalFoodMenus.Clear(); - if (BPASmartClient.Helper.Json.Data.FryPotMessage.Count > 0) - { - foreach (var item in BPASmartClient.Helper.Json.Data.FryPotMessage) - { - GlobalFoodMenu.LocalFoodMenus.Add(new FoodMenuModel { GoodKey = item.GoodKey, GoodName = item.GoodName }); - } - } + //GlobalFoodMenu.LocalFoodMenus.Clear(); + //if (BPASmartClient.Helper.Json.Data.FryPotMessage.Count > 0) + //{ + // foreach (var item in BPASmartClient.Helper.Json.Data.FryPotMessage) + // { + // GlobalFoodMenu.LocalFoodMenus.Add(new FoodMenuModel { GoodKey = item.GoodKey, GoodName = item.GoodName }); + // } + //} }), "更新菜单"); CommandRegist();//调试 ServerInit(); diff --git a/BPASmartClient.MorkF/Control_MorkF.cs b/BPASmartClient.MorkF/Control_MorkF.cs index 3e523895..db339e8e 100644 --- a/BPASmartClient.MorkF/Control_MorkF.cs +++ b/BPASmartClient.MorkF/Control_MorkF.cs @@ -1,4 +1,5 @@ using BPA.Message; +using System; using BPA.Message.Enum; using BPASmartClient.Device; using BPASmartClient.EventBus; @@ -755,10 +756,10 @@ namespace BPASmartClient.MorkF private void StartOrderMain(object o) { if (o == null) return; - if (o is FoodMenuModel good) - { - NewStartLocalOrder(good.GoodName); - } + //if (o is FoodMenuModel good) + //{ + // NewStartLocalOrder(good.GoodName); + //} //if (o == null) return; @@ -2477,7 +2478,7 @@ namespace BPASmartClient.MorkF if (materialInfo != null) { //if - if(Convert.ToInt32(materialInfo.Qty) - goodBatching.BatchingCount < 0) + if(System.Convert.ToInt32(materialInfo.Qty) - goodBatching.BatchingCount < 0) { MessageLog.GetInstance.ShowEx($"{materialInfo.Name}不够,请更新菜品库,并点击检测"); return; @@ -2887,12 +2888,12 @@ namespace BPASmartClient.MorkF if (batchingInfo == null) { //为空就新增 - BatchingInfos.Add(new BatchingInfo() { BatchingCount = Convert.ToInt32(surplus.Qty) - stagingCount, BatchingLoc = surplus.Loc, BatchingId = surplus.Key }); + BatchingInfos.Add(new BatchingInfo() { BatchingCount = System.Convert.ToInt32(surplus.Qty) - stagingCount, BatchingLoc = surplus.Loc, BatchingId = surplus.Key }); } else { batchingInfo.BatchingLoc = surplus.Loc; - batchingInfo.BatchingCount = Convert.ToInt32(surplus.Qty) - stagingCount; + batchingInfo.BatchingCount = System.Convert.ToInt32(surplus.Qty) - stagingCount; } } Thread.Sleep(1000); diff --git a/BPASmartClient.MorkF/Model/MaterialSurplus.cs b/BPASmartClient.MorkF/Model/MaterialSurplus.cs index b75043fd..0bef04b9 100644 --- a/BPASmartClient.MorkF/Model/MaterialSurplus.cs +++ b/BPASmartClient.MorkF/Model/MaterialSurplus.cs @@ -87,7 +87,7 @@ namespace BPASmartClient.MorkF foreach(MaterialInfo material in materials) { //surplus += int.Parse(material.Qty.ToString()); - surplus += Convert.ToInt32(material.Qty); + surplus += System.Convert.ToInt32(material.Qty); } return true; } diff --git a/BPASmartClient/Control/FoodMenu.xaml b/BPASmartClient/Control/FoodMenu.xaml new file mode 100644 index 00000000..44e6465a --- /dev/null +++ b/BPASmartClient/Control/FoodMenu.xaml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + diff --git a/BPASmartClient/Control/FoodMenu.xaml.cs b/BPASmartClient/Control/FoodMenu.xaml.cs new file mode 100644 index 00000000..245a4e39 --- /dev/null +++ b/BPASmartClient/Control/FoodMenu.xaml.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Control +{ + /// + /// FoodMenu.xaml 的交互逻辑 + /// + public partial class FoodMenu : UserControl + { + public FoodMenu() + { + InitializeComponent(); + } + } +} diff --git a/BPASmartClient/MainWindow.xaml b/BPASmartClient/MainWindow.xaml index 35bc41c3..69810d4f 100644 --- a/BPASmartClient/MainWindow.xaml +++ b/BPASmartClient/MainWindow.xaml @@ -80,6 +80,14 @@ Content="订单监视" Cursor="Hand" Tag="OrderStatusView" /> +