ソースを参照

菜单

master
NXX 1年前
コミット
372d258876
6個のファイルの変更96行の追加16行の削除
  1. +8
    -8
      BPASmartClient.MorkBF/Control_MorkBF.cs
  2. +8
    -7
      BPASmartClient.MorkF/Control_MorkF.cs
  3. +1
    -1
      BPASmartClient.MorkF/Model/MaterialSurplus.cs
  4. +45
    -0
      BPASmartClient/Control/FoodMenu.xaml
  5. +26
    -0
      BPASmartClient/Control/FoodMenu.xaml.cs
  6. +8
    -0
      BPASmartClient/MainWindow.xaml

+ 8
- 8
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<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();//调试
ServerInit();


+ 8
- 7
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);


+ 1
- 1
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;
}


+ 45
- 0
BPASmartClient/Control/FoodMenu.xaml ファイルの表示

@@ -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>

+ 26
- 0
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
{
/// <summary>
/// FoodMenu.xaml 的交互逻辑
/// </summary>
public partial class FoodMenu : UserControl
{
public FoodMenu()
{
InitializeComponent();
}
}
}

+ 8
- 0
BPASmartClient/MainWindow.xaml ファイルの表示

@@ -80,6 +80,14 @@
Content="订单监视"
Cursor="Hand"
Tag="OrderStatusView" />
<Button
Width="120"
Height="40"
Margin="20,0"
Click="MenuItem_Click"
Content="本地菜单"
Cursor="Hand"
Tag="OrderStatusView" />
</StackPanel>
<!--#endregion-->
<Menu x:Name="myMenu" Visibility="Visible">


読み込み中…
キャンセル
保存