@@ -37,14 +37,14 @@ namespace BPASmartClient.MorkBF | |||||
MonitorViewModel.DeviceId = DeviceId; | MonitorViewModel.DeviceId = DeviceId; | ||||
ActionManage.GetInstance.Register(new Action(() => | ActionManage.GetInstance.Register(new Action(() => | ||||
{ | { | ||||
GlobalFoodMenu.LocalFoodMenus.Clear(); | |||||
if (BPASmartClient.Helper.Json<LocalFryPotMessage>.Data.FryPotMessage.Count > 0) | |||||
{ | |||||
foreach (var item in BPASmartClient.Helper.Json<LocalFryPotMessage>.Data.FryPotMessage) | |||||
{ | |||||
GlobalFoodMenu.LocalFoodMenus.Add(new FoodMenuModel { GoodKey = item.GoodKey, GoodName = item.GoodName }); | |||||
} | |||||
} | |||||
//GlobalFoodMenu.LocalFoodMenus.Clear(); | |||||
//if (BPASmartClient.Helper.Json<LocalFryPotMessage>.Data.FryPotMessage.Count > 0) | |||||
//{ | |||||
// foreach (var item in BPASmartClient.Helper.Json<LocalFryPotMessage>.Data.FryPotMessage) | |||||
// { | |||||
// GlobalFoodMenu.LocalFoodMenus.Add(new FoodMenuModel { GoodKey = item.GoodKey, GoodName = item.GoodName }); | |||||
// } | |||||
//} | |||||
}), "更新菜单"); | }), "更新菜单"); | ||||
CommandRegist();//调试 | CommandRegist();//调试 | ||||
ServerInit(); | ServerInit(); | ||||
@@ -1,4 +1,5 @@ | |||||
using BPA.Message; | using BPA.Message; | ||||
using System; | |||||
using BPA.Message.Enum; | using BPA.Message.Enum; | ||||
using BPASmartClient.Device; | using BPASmartClient.Device; | ||||
using BPASmartClient.EventBus; | using BPASmartClient.EventBus; | ||||
@@ -755,10 +756,10 @@ namespace BPASmartClient.MorkF | |||||
private void StartOrderMain(object o) | private void StartOrderMain(object o) | ||||
{ | { | ||||
if (o == null) return; | if (o == null) return; | ||||
if (o is FoodMenuModel good) | |||||
{ | |||||
NewStartLocalOrder(good.GoodName); | |||||
} | |||||
//if (o is FoodMenuModel good) | |||||
//{ | |||||
// NewStartLocalOrder(good.GoodName); | |||||
//} | |||||
//if (o == null) return; | //if (o == null) return; | ||||
@@ -2477,7 +2478,7 @@ namespace BPASmartClient.MorkF | |||||
if (materialInfo != null) | if (materialInfo != null) | ||||
{ | { | ||||
//if | //if | ||||
if(Convert.ToInt32(materialInfo.Qty) - goodBatching.BatchingCount < 0) | |||||
if(System.Convert.ToInt32(materialInfo.Qty) - goodBatching.BatchingCount < 0) | |||||
{ | { | ||||
MessageLog.GetInstance.ShowEx($"{materialInfo.Name}不够,请更新菜品库,并点击检测"); | MessageLog.GetInstance.ShowEx($"{materialInfo.Name}不够,请更新菜品库,并点击检测"); | ||||
return; | return; | ||||
@@ -2887,12 +2888,12 @@ namespace BPASmartClient.MorkF | |||||
if (batchingInfo == null) | 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 | else | ||||
{ | { | ||||
batchingInfo.BatchingLoc = surplus.Loc; | batchingInfo.BatchingLoc = surplus.Loc; | ||||
batchingInfo.BatchingCount = Convert.ToInt32(surplus.Qty) - stagingCount; | |||||
batchingInfo.BatchingCount = System.Convert.ToInt32(surplus.Qty) - stagingCount; | |||||
} | } | ||||
} | } | ||||
Thread.Sleep(1000); | Thread.Sleep(1000); | ||||
@@ -87,7 +87,7 @@ namespace BPASmartClient.MorkF | |||||
foreach(MaterialInfo material in materials) | foreach(MaterialInfo material in materials) | ||||
{ | { | ||||
//surplus += int.Parse(material.Qty.ToString()); | //surplus += int.Parse(material.Qty.ToString()); | ||||
surplus += Convert.ToInt32(material.Qty); | |||||
surplus += System.Convert.ToInt32(material.Qty); | |||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
@@ -0,0 +1,45 @@ | |||||
<UserControl x:Class="Control.FoodMenu" | |||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |||||
xmlns:local="clr-namespace:Control" | |||||
mc:Ignorable="d" | |||||
d:DesignHeight="450" d:DesignWidth="800" | |||||
Name="FoodMenu"> | |||||
<UserControl.Resources> | |||||
<ResourceDictionary> | |||||
<ResourceDictionary.MergedDictionaries> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" /> | |||||
</ResourceDictionary.MergedDictionaries> | |||||
<Style TargetType="ListBoxItem"> | |||||
<Setter Property="Margin" Value="2"/> | |||||
<Setter Property="FontSize" Value="22"/> | |||||
<Setter Property="FontWeight" Value="Black"/> | |||||
<Setter Property="Background" Value="Transparent"/> | |||||
<Setter Property="FontFamily" Value="楷体"/> | |||||
<Setter Property="Template"> | |||||
<Setter.Value> | |||||
<ControlTemplate TargetType="ListBoxItem"> | |||||
<Border BorderBrush="Black" BorderThickness="0" Background="Transparent"> | |||||
<Grid> | |||||
<Grid.ColumnDefinitions> | |||||
<ColumnDefinition Width="80*"/> | |||||
<ColumnDefinition Width="20*"/> | |||||
</Grid.ColumnDefinitions> | |||||
</Grid> | |||||
</Border> | |||||
</ControlTemplate> | |||||
</Setter.Value> | |||||
</Setter> | |||||
</Style> | |||||
</ResourceDictionary> | |||||
</UserControl.Resources> | |||||
<Grid> | |||||
<ListBox> | |||||
</ListBox> | |||||
</Grid> | |||||
</UserControl> |
@@ -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 | |||||
{ | |||||
/// <summary> | |||||
/// FoodMenu.xaml 的交互逻辑 | |||||
/// </summary> | |||||
public partial class FoodMenu : UserControl | |||||
{ | |||||
public FoodMenu() | |||||
{ | |||||
InitializeComponent(); | |||||
} | |||||
} | |||||
} |
@@ -80,6 +80,14 @@ | |||||
Content="订单监视" | Content="订单监视" | ||||
Cursor="Hand" | Cursor="Hand" | ||||
Tag="OrderStatusView" /> | Tag="OrderStatusView" /> | ||||
<Button | |||||
Width="120" | |||||
Height="40" | |||||
Margin="20,0" | |||||
Click="MenuItem_Click" | |||||
Content="本地菜单" | |||||
Cursor="Hand" | |||||
Tag="OrderStatusView" /> | |||||
</StackPanel> | </StackPanel> | ||||
<!--#endregion--> | <!--#endregion--> | ||||
<Menu x:Name="myMenu" Visibility="Visible"> | <Menu x:Name="myMenu" Visibility="Visible"> | ||||