From e478b8fdaa74e09191304b52673fefb15f18a3a4 Mon Sep 17 00:00:00 2001 From: fyf Date: Fri, 18 Nov 2022 17:28:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../分餐机/ScreenSplitMealsControl3.xaml | 375 +++++++++--------- .../ScreenSplitMealsControl3.xaml.cs | 49 ++- .../ScreenSplitMealsControl3ViewModel.cs | 14 + .../炒锅/ScreenMaxWokControl.xaml | 2 +- 4 files changed, 251 insertions(+), 189 deletions(-) diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml index 5e3c1601..14cd17f9 100644 --- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml +++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml @@ -1,188 +1,189 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 设备工作状态 - - - - 今日刷卡数 - - - - - - - - - - - - 前一位刷卡人 - - - - 当前刷卡人 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 设备工作状态 - - - - 今日刷卡数 - - - - - - - - - - - - 前一位刷卡人 - - - - 当前刷卡人 - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 设备工作状态 + + + + 今日刷卡数 + + + + + + + + + + + + 前一位刷卡人 + + + + 当前刷卡人 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 设备工作状态 + + + + 今日刷卡数 + + + + + + + + + + + + 前一位刷卡人 + + + + 当前刷卡人 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml.cs b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml.cs index 4d3a69f0..1f94f8bf 100644 --- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml.cs +++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml.cs @@ -23,8 +23,55 @@ namespace BPASmartClient.ScreenLib public ScreenSplitMealsControl3() { InitializeComponent(); - this.DataContext = new ScreenSplitMealsControl3ViewModel(); + if (int.Parse(System.Configuration.ConfigurationManager.AppSettings["ShowForm"].ToString()) == 0) + { + guanggao.Visibility = Visibility.Visible; + diqiu.Visibility = Visibility.Collapsed; + } + else + { + guanggao.Visibility = Visibility.Collapsed; + diqiu.Visibility = Visibility.Visible; + } + Show(); + } + + + /// + /// 点击切换广告 + /// + /// + /// + private void StackPanel_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + try + { + guanggao.Visibility = guanggao.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed; + diqiu.Visibility = guanggao.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed; + Show(); + } + catch (Exception ex) + { + + } + } + + /// + /// 显示广告 + /// + public void Show() + { + string str = string.Empty; + if (Main.GetInstance.SaasRouteReturn != null && Main.GetInstance.SaasRouteReturn.Count >= 6) + { + AdDTO dto = Main.GetInstance.SaasRouteReturn?.Find(par => par.Address == "02"); + if (dto != null) + { + str = dto.Ad; + Main.GetInstance.InitView2(str, webView, guanggao); + } + } } } } diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs index de1fff1c..d935667d 100644 --- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs +++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs @@ -38,6 +38,19 @@ namespace BPASmartClient.ScreenLib /// 当前刷新数据类型 /// public ScreenDeviceType type = ScreenDeviceType.分餐机; + /// + /// 订单总数 + /// + public int OrderCount + { + get { return _OrderCount; } + set + { + _OrderCount = value; + OnPropertyChanged(); + } + } + private int _OrderCount = 0; #endregion public ScreenSplitMealsControl3ViewModel() @@ -52,6 +65,7 @@ namespace BPASmartClient.ScreenLib if (modelMaxWok != null && modelMaxWok.Alarm != null) modelMaxWok.Alarm = modelMaxWok.Alarm?.OrderByDescending(k => DateTime.Parse(k.AlarmTime)).ToList(); ViewData = modelMaxWok; + OrderCount = modelMaxWok.SplitMeals_CreditCardCount_5 + modelMaxWok.SplitMeals_CreditCardCount_6; } })); Thread.Sleep(1000); diff --git a/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml b/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml index 1a5c6e34..82519346 100644 --- a/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml +++ b/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml @@ -115,7 +115,7 @@ - +