@@ -31,12 +31,16 @@ namespace BPASmartClient.Business | |||
public static void InitConfig() | |||
{ | |||
if (!IsEnableNetwork) return; | |||
NetworkConnectState = UniversalHelper.GetInstance().GetNetworkState(); | |||
while (!NetworkConnectState) | |||
Task.Factory.StartNew(() => | |||
{ | |||
NetworkConnectState = UniversalHelper.GetInstance().GetNetworkState(); | |||
Thread.Sleep(2000); | |||
} | |||
while (!NetworkConnectState) | |||
{ | |||
NetworkConnectState = UniversalHelper.GetInstance().GetNetworkState(); | |||
Thread.Sleep(2000); | |||
} | |||
}); | |||
} | |||
/// <summary> | |||
@@ -110,6 +110,7 @@ | |||
<None Remove="Image\功能列表.png" /> | |||
<None Remove="Image\加.png" /> | |||
<None Remove="Image\发光按钮.png" /> | |||
<None Remove="Image\右.png" /> | |||
<None Remove="Image\告警.png" /> | |||
<None Remove="Image\告警\Wifi_NO.ico" /> | |||
<None Remove="Image\告警\Wifi_NO.png" /> | |||
@@ -136,6 +137,7 @@ | |||
<None Remove="Image\容器边框2.png" /> | |||
<None Remove="Image\工艺流程.jpg" /> | |||
<None Remove="Image\工艺流程.png" /> | |||
<None Remove="Image\左.png" /> | |||
<None Remove="Image\底部背景.png" /> | |||
<None Remove="Image\弹框\BG.png" /> | |||
<None Remove="Image\弹框\bh.png" /> | |||
@@ -381,6 +383,7 @@ | |||
<Resource Include="Image\功能列表.png" /> | |||
<Resource Include="Image\加.png" /> | |||
<Resource Include="Image\发光按钮.png" /> | |||
<Resource Include="Image\右.png" /> | |||
<Resource Include="Image\告警\Wifi_NO.png" /> | |||
<Resource Include="Image\告警\Wifi_OK.png" /> | |||
<Resource Include="Image\告警\严重告警.png" /> | |||
@@ -392,6 +395,7 @@ | |||
<Resource Include="Image\容器边框2.png" /> | |||
<Resource Include="Image\工艺流程.jpg" /> | |||
<Resource Include="Image\工艺流程.png" /> | |||
<Resource Include="Image\左.png" /> | |||
<Resource Include="Image\弹框\BG.png" /> | |||
<Resource Include="Image\弹框\bh.png" /> | |||
<Resource Include="Image\弹框\biankuang_.png" /> | |||
@@ -5,6 +5,7 @@ using System.Globalization; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Windows; | |||
using System.Windows.Data; | |||
using System.Windows.Media; | |||
@@ -30,7 +31,10 @@ namespace BPASmartClient.CustomResource.Converters | |||
returnValue = new SolidColorBrush(Color.FromArgb(255, 102, 204, 153)); | |||
break; | |||
case ORDER_STATUS.ERR_NOT_REPLY_WHEN_COOKING: | |||
returnValue = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0)); | |||
returnValue = new SolidColorBrush(Color.FromArgb(180, 180, 180, 180)); | |||
break; | |||
case ORDER_STATUS.UNABLE_COOK: | |||
returnValue = new SolidColorBrush(Color.FromRgb(247, 156,154)); | |||
break; | |||
default: | |||
break; | |||
@@ -38,6 +42,24 @@ namespace BPASmartClient.CustomResource.Converters | |||
return returnValue; | |||
} | |||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | |||
{ | |||
throw new NotImplementedException(); | |||
} | |||
} | |||
public class VisibleConvert : IValueConverter | |||
{ | |||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |||
{ | |||
switch ((ORDER_STATUS)value) | |||
{ | |||
case ORDER_STATUS.WAIT: | |||
return Visibility.Visible; | |||
default: | |||
return Visibility.Collapsed; | |||
} | |||
} | |||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | |||
{ | |||
throw new NotImplementedException(); | |||
@@ -6,6 +6,7 @@ using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Windows.Data; | |||
using System.Windows.Media; | |||
namespace BPASmartClient.CustomResource.Converters | |||
{ | |||
@@ -29,7 +30,10 @@ namespace BPASmartClient.CustomResource.Converters | |||
Text = "取餐完成"; | |||
break; | |||
case ORDER_STATUS.ERR_NOT_REPLY_WHEN_COOKING: | |||
Text = "制作超时"; | |||
Text = "未完成订单"; | |||
break; | |||
case ORDER_STATUS.UNABLE_COOK: | |||
Text = "已取消订单"; | |||
break; | |||
default: | |||
break; | |||
@@ -185,7 +185,7 @@ | |||
<Setter TargetName="Grid" Property="Opacity" Value="0.5" /> | |||
</Trigger> | |||
<Trigger Property="IsSelected" Value="True"> | |||
<Setter Property="Foreground" Value="red" /> | |||
<Setter Property="Foreground" Value="Red" /> | |||
</Trigger> | |||
<Trigger Property="IsToday" Value="True"> | |||
<Setter Property="Foreground" Value="yellow" /> | |||
@@ -218,8 +218,8 @@ | |||
<Border | |||
Background="Transparent" | |||
BorderBrush="Transparent" | |||
BorderThickness="1"> | |||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" /> | |||
BorderThickness="2"> | |||
<ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" /> | |||
</Border> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
@@ -264,10 +264,11 @@ | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="Auto" /> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="Auto" /> | |||
</Grid.RowDefinitions> | |||
<!-- Header --> | |||
<Grid | |||
Grid.Row="0" | |||
Grid.Row="2" | |||
HorizontalAlignment="Stretch" | |||
Background="Transparent"> | |||
<Grid.ColumnDefinitions> | |||
@@ -494,7 +495,7 @@ | |||
Width="19" | |||
Height="18" | |||
Margin="3,0,3,0" | |||
Fill="#A5FFFFFF" | |||
Fill="Black" | |||
RadiusX="1" | |||
RadiusY="1" /> | |||
<Popup | |||
@@ -51,6 +51,8 @@ namespace BPASmartClient.Model | |||
public string EndDate { get { return _mEndDate; } set { _mEndDate = value; OnPropertyChanged(); } } | |||
private string _mEndDate = string.Empty; | |||
public DateTime Date { get { return _mDate; } set { _mDate = value; OnPropertyChanged(); } } | |||
private DateTime _mDate = DateTime.Now; | |||
public string CompleteDate { get { return _mCompleteDate; } set { _mCompleteDate = value; OnPropertyChanged(); } } | |||
private string _mCompleteDate = string.Empty; | |||
@@ -1,6 +1,7 @@ | |||
using BPASmartClient.Model.小炒机; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Collections.ObjectModel; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
@@ -10,5 +11,6 @@ namespace BPASmartClient.Model.煮面机 | |||
public class NoodOrder | |||
{ | |||
public MaterialDiction<string, MorksSimorderModel> localOrder = new MaterialDiction<string, MorksSimorderModel> (); | |||
public ObservableCollection<MorkOrder> historyOrderLists = new ObservableCollection<MorkOrder>(); | |||
} | |||
} |
@@ -1082,6 +1082,7 @@ namespace BPASmartClient.MorkSUpgradedVer | |||
if (res != null) | |||
{ | |||
res.OrderStatus = ORDER_STATUS.COMPLETED_TAKE; | |||
res.CompleteDate = DateTime.Now.ToString("HH:mm:ss"); | |||
NoodOrderCtrl.GetInstance.FinishOrder(res); | |||
} | |||
else | |||
@@ -21,6 +21,8 @@ using BPASmartClient.Business; | |||
using BPASmartClient.Model.煮面机; | |||
using System.Windows.Controls; | |||
using static Opc.Ua.RelativePathFormatter; | |||
using SqlSugar; | |||
using Microsoft.Windows.Themes; | |||
namespace BPASmartClient.ViewModel | |||
{ | |||
@@ -34,15 +36,56 @@ namespace BPASmartClient.ViewModel | |||
public static ObservableCollection<FoodMenuModel> FoodMenus { get; set; } = new ObservableCollection<FoodMenuModel>(); | |||
public static int SortNum { get; set; } = 1; | |||
public static ObservableCollection<MorkOrder> orderStatusLists { get; set; } = new ObservableCollection<MorkOrder>(); | |||
public ObservableCollection<MorkOrder> history { get; set; } = new ObservableCollection<MorkOrder>(); | |||
/// <summary> | |||
/// 等待取餐列表 | |||
/// 当天显示 | |||
/// </summary> | |||
public static ObservableCollection<MorkOrder> WaitTakeMeal { get; set; } = new ObservableCollection<MorkOrder>(); | |||
public static ObservableCollection<MorkOrder> WaitTakeMeal { get; set; } = new ObservableCollection<MorkOrder>(Json<NoodOrder>.Data.historyOrderLists.Where(o => o.Date.Day == DateTime.Now.Day)); | |||
public FoodMenuViewModel() | |||
{ | |||
history = WaitTakeMeal; | |||
SearCh = new BPARelayCommand(() => | |||
{ | |||
int re = SearchDate.Day; | |||
history.Clear(); | |||
if (re<=DateTime.Now.Day) | |||
{ | |||
var res = Json<NoodOrder>.Data.historyOrderLists.Where(o => o.Date.Day == SearchDate.Day); | |||
if (res != null && res.ToList().Count > 0) | |||
{ | |||
res.ToList().ForEach(o => { history.Add(o); }); | |||
} | |||
else | |||
{ | |||
NoodOrderCtrl.GetInstance.Show("未查询到当日订单!"); | |||
} | |||
} | |||
else | |||
{ | |||
NoodOrderCtrl.GetInstance.Show("超出当前日期,请重新选择时间!"); | |||
} | |||
}); | |||
TodayOrder = new BPARelayCommand(() => | |||
{ | |||
SearchDate = DateTime.Now; | |||
var res = Json<NoodOrder>.Data.historyOrderLists.Where(o => o.Date.Day == SearchDate.Day); | |||
if (res != null && res.ToList().Count > 0) | |||
{ | |||
history.Clear(); | |||
res.ToList().ForEach(o => { history.Add(o); }); | |||
} | |||
else | |||
{ | |||
NoodOrderCtrl.GetInstance.Show("今日还未有订单完成!"); | |||
} | |||
}); | |||
} | |||
public BPARelayCommand SearCh { get; set; } | |||
public BPARelayCommand TodayOrder { get; set; } | |||
public DateTime SearchDate{get { return _searchDate; }set { _searchDate = value; OnPropertyChanged(); }} | |||
private DateTime _searchDate = DateTime.Now; | |||
/// <summary> | |||
@@ -104,7 +147,6 @@ namespace BPASmartClient.ViewModel | |||
}); | |||
if (orderStatusLists.Count > 0) | |||
{ | |||
orderStatusLists[0].OrderStatus = ORDER_STATUS.COOKING; | |||
} | |||
@@ -16,6 +16,7 @@ using System.Threading.Tasks; | |||
using System.Threading; | |||
using BPASmartClient.CustomResource.Converters; | |||
using System.Security.RightsManagement; | |||
using System.Net; | |||
namespace BPASmartClient | |||
{ | |||
@@ -78,6 +79,11 @@ namespace BPASmartClient | |||
FoodMenuViewModel.FoodMenus.Remove(re); | |||
} | |||
}); | |||
if (FoodMenuViewModel.WaitTakeMeal.Count > 0) | |||
{ | |||
FoodMenuViewModel.SortNum = FoodMenuViewModel.WaitTakeMeal.Count + 1; | |||
} | |||
} | |||
//public void RemoveOrder(object o) | |||
//{ | |||
@@ -113,55 +119,55 @@ namespace BPASmartClient | |||
FoodMenuModel = localOrder | |||
}); | |||
#region 展示使用 | |||
if (FoodMenuViewModel.orderStatusLists.Count==0) | |||
{ | |||
FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
{ | |||
OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
OrderStatus = ORDER_STATUS.COMPLETED_TAKE, | |||
StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
FoodMenuModel = localOrder | |||
}); | |||
} | |||
else if (FoodMenuViewModel.orderStatusLists.Count == 1) | |||
{ | |||
FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
{ | |||
OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
OrderStatus = ORDER_STATUS.COMPLETED_COOK, | |||
StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
FoodMenuModel = localOrder | |||
}); | |||
} | |||
else if (FoodMenuViewModel.orderStatusLists.Count == 2) | |||
{ | |||
FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
{ | |||
OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
OrderStatus = ORDER_STATUS.COOKING, | |||
StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
FoodMenuModel = localOrder | |||
}); | |||
} | |||
else | |||
{ | |||
FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
{ | |||
OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
OrderStatus = ORDER_STATUS.WAIT, | |||
StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
FoodMenuModel = localOrder | |||
}); | |||
} | |||
#endregion | |||
//FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
//if (FoodMenuViewModel.orderStatusLists.Count == 0) | |||
//{ | |||
// FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
// { | |||
// OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
// OrderStatus = ORDER_STATUS.COMPLETED_COOK, | |||
// StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
// FoodMenuModel = localOrder | |||
// }); | |||
//} | |||
//else if (FoodMenuViewModel.orderStatusLists.Count == 1) | |||
//{ | |||
// OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
// OrderStatus = ORDER_STATUS.WAIT, | |||
// StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
// FoodMenuModel = localOrder | |||
//}); | |||
// FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
// { | |||
// OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
// OrderStatus = ORDER_STATUS.COOKING, | |||
// StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
// FoodMenuModel = localOrder | |||
// }); | |||
//} | |||
//else if (FoodMenuViewModel.orderStatusLists.Count == 2) | |||
//{ | |||
// FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
// { | |||
// OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
// OrderStatus = ORDER_STATUS.COOKING, | |||
// StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
// FoodMenuModel = localOrder | |||
// }); | |||
//} | |||
//else | |||
//{ | |||
// FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
// { | |||
// OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
// OrderStatus = ORDER_STATUS.WAIT, | |||
// StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
// FoodMenuModel = localOrder | |||
// }); | |||
//} | |||
#endregion | |||
FoodMenuViewModel.orderStatusLists.Insert(0, new MorkOrder() | |||
{ | |||
OrderPush = new MorkOrderPush() { DeviceId = res.DeviceId, GoodsName = localOrder.GoodName, SortNum = FoodMenuViewModel.SortNum++ }, | |||
OrderStatus = ORDER_STATUS.WAIT, | |||
StartDate = DateTime.Now.ToString("HH:mm:ss"), | |||
FoodMenuModel = localOrder | |||
}); | |||
}); | |||
Json<NoodOrder>.Data.localOrder[localOrder.GoodName].Publish(); | |||
} | |||
@@ -213,6 +219,9 @@ namespace BPASmartClient | |||
{ | |||
Application.Current.Dispatcher.Invoke(() => | |||
{ | |||
res.OrderStatus = ORDER_STATUS.UNABLE_COOK; | |||
Json<NoodOrder>.Data.historyOrderLists.Insert(0, res); | |||
FoodMenuViewModel.WaitTakeMeal.Insert(0, res); | |||
FoodMenuViewModel.orderStatusLists.Remove(res); | |||
Show("成功取消订单!!!"); | |||
}); | |||
@@ -319,6 +328,7 @@ namespace BPASmartClient | |||
res.OrderStatus = ORDER_STATUS.COMPLETED_COOK; | |||
res.EndDate = DateTime.Now.ToString("HH:mm:ss"); | |||
FoodMenuViewModel.WaitTakeMeal.Insert(0, res); | |||
Json<NoodOrder>.Data.historyOrderLists.Insert(0,res); | |||
}); | |||
} | |||
public void WorkList(MorkOrder res) | |||
@@ -331,7 +341,7 @@ namespace BPASmartClient | |||
{ | |||
return Task.Factory.StartNew(() => | |||
{ | |||
Thread.Sleep(1000); | |||
Thread.Sleep(2000); | |||
Application.Current.Dispatcher.Invoke(() => | |||
{ | |||
FoodMenuViewModel.WaitTakeMeal.Remove(res); | |||
@@ -20,6 +20,7 @@ | |||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecButtonStyle.xaml" /> | |||
<ResourceDictionary> | |||
<con:VisibleConvert x:Key="visibleConvert"/> | |||
<con:ColorConverter x:Key="ColorConverter" /> | |||
<con:TextConverter x:Key="TextConverter" /> | |||
<con:VisibleTypeConverter x:Key="VisibleTypeConverter" /> | |||
@@ -478,6 +479,495 @@ | |||
<myConvert:NoodleConvert x:Key="noodleConvert"/> | |||
<myConvert:BowConvert x:Key="BowConvert"/> | |||
<myConvert:ResetConvert x:Key="resetConvert"/> | |||
<!--#region CalendarStyle日期选择框样式--> | |||
<Style x:Key="DatePickerCalendarStyle1" TargetType="{x:Type Calendar}"> | |||
<Setter Property="Foreground" Value="Black"/> | |||
<Setter Property="Background" Value="White" /> | |||
<Setter Property="BorderBrush" Value="{Binding BorderBrush,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DatePicker}}}"/> | |||
<Setter Property="BorderThickness" Value="{Binding BorderThickness,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DatePicker}}}"/> | |||
<Setter Property="FontSize" Value="18" /> | |||
<Setter Property="CalendarButtonStyle" Value="{DynamicResource ButtonStyle}" /> | |||
<Setter Property="CalendarDayButtonStyle" Value="{DynamicResource DayButtonStyle}" /> | |||
<Setter Property="CalendarItemStyle" Value="{DynamicResource CalendarItemsStyle}" /> | |||
</Style> | |||
<!--#region 年,月按钮样式--> | |||
<Style x:Key="ButtonStyle" TargetType="CalendarButton"> | |||
<Setter Property="Background" Value="#DDDDDD" /> | |||
<Setter Property="FontSize" Value="14" /> | |||
<Setter Property="BorderBrush" Value="Black" /> | |||
<Setter Property="BorderThickness" Value="4"/> | |||
<Setter Property="Template"> | |||
<Setter.Value> | |||
<ControlTemplate TargetType="{x:Type CalendarButton}"> | |||
<Grid x:Name="Grid" Margin="0"> | |||
<Border x:Name="Bg" Margin="2" Height="100" Width="120" Background="{TemplateBinding Background}" CornerRadius="20" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/> | |||
<ContentPresenter | |||
x:Name="NormalText" | |||
Margin="2" | |||
TextElement.Foreground="Black" | |||
TextElement.FontSize="30" | |||
TextElement.FontWeight="Black" | |||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | |||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> | |||
</Grid> | |||
<ControlTemplate.Triggers> | |||
<Trigger Property="IsMouseOver" Value="True"> | |||
<Setter Property="Background" Value="#ECBB52" /> | |||
<Setter Property="Foreground" Value="Black" /> | |||
</Trigger> | |||
</ControlTemplate.Triggers> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
</Setter> | |||
</Style> | |||
<!--#endregion--> | |||
<!--#region DayButtonStyle--> | |||
<Style x:Key="DayButtonStyle" TargetType="CalendarDayButton"> | |||
<Setter Property="Background" Value="#103153" /> | |||
<Setter Property="FontSize" Value="20" /> | |||
<Setter Property="Template"> | |||
<Setter.Value> | |||
<ControlTemplate TargetType="{x:Type CalendarDayButton}"> | |||
<Grid x:Name="Grid" Margin="0"> | |||
<Border | |||
x:Name="Bg" | |||
Margin="2" | |||
CornerRadius="5" | |||
Background="#EEEEEE" | |||
BorderBrush="Black" | |||
BorderThickness="2" /> | |||
<ContentPresenter | |||
x:Name="NormalText" | |||
Margin="10,5" | |||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | |||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" | |||
TextElement.Foreground="{TemplateBinding Foreground}" /> | |||
</Grid> | |||
<ControlTemplate.Triggers> | |||
<!-- 不在当月的日期 --> | |||
<Trigger Property="IsInactive" Value="True"> | |||
<Setter TargetName="Grid" Property="Opacity" Value="0.3" /> | |||
</Trigger> | |||
<Trigger Property="IsSelected" Value="True"> | |||
<Setter Property="Foreground" Value="Black" /> | |||
<Setter Property="FontWeight" Value="Black" /> | |||
<Setter Property="Background" TargetName="Bg" Value="#ECBB52"/> | |||
</Trigger> | |||
<Trigger Property="IsToday" Value="True"> | |||
<Setter Property="Foreground" Value="Black" /> | |||
<Setter Property="FontWeight" Value="Black" /> | |||
<Setter Property="Background" TargetName="Bg" Value="#444444"/> | |||
</Trigger> | |||
<Trigger Property="IsMouseOver" Value="True"> | |||
<Setter Property="Foreground" Value="Black" /> | |||
<Setter Property="Background" TargetName="Bg" Value="#ECBB52"/> | |||
</Trigger> | |||
</ControlTemplate.Triggers> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
</Setter> | |||
</Style> | |||
<!--#endregion--> | |||
<!--#region FButton_Transparency_1--> | |||
<Style x:Key="FButton_Transparency_1" TargetType="{x:Type Button}"> | |||
<Setter Property="Background" Value="White" /> | |||
<Setter Property="Foreground" Value="white" /> | |||
<Setter Property="FontFamily" Value="../Fonts/#iconfont" /> | |||
<Setter Property="HorizontalContentAlignment" Value="Center" /> | |||
<Setter Property="Height" Value="Auto" /> | |||
<Setter Property="Width" Value="Auto" /> | |||
<Setter Property="FontSize" Value="13" /> | |||
<Setter Property="Padding" Value="3,1,3,1" /> | |||
<Setter Property="Cursor" Value="Hand" /> | |||
<Setter Property="BorderBrush" Value="Transparent" /> | |||
<Setter Property="Template"> | |||
<Setter.Value> | |||
<ControlTemplate TargetType="{x:Type Button}"> | |||
<Grid> | |||
<Border x:Name="mybg" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" | |||
Background="{TemplateBinding Background}" | |||
BorderBrush="{TemplateBinding BorderBrush}" | |||
CornerRadius="10" | |||
BorderThickness="3"> | |||
</Border> | |||
<Border Background="#ECBB52" x:Name="content" CornerRadius="10" HorizontalAlignment="Stretch" Opacity="0" VerticalAlignment="Stretch"/> | |||
<ContentPresenter Margin="10,2" HorizontalAlignment="Center" VerticalAlignment="Center" /> | |||
</Grid> | |||
<ControlTemplate.Triggers> | |||
<Trigger Property="IsMouseOver" Value="True"> | |||
<Setter Property="Opacity" TargetName="content" Value="0.5" /> | |||
<Setter Property="Background" TargetName="content" Value="#ECBB52" /> | |||
</Trigger> | |||
</ControlTemplate.Triggers> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
</Setter> | |||
<Style.Triggers> | |||
<Trigger Property="IsMouseOver" Value="True"> | |||
<Setter Property="Background" Value="#ECBB52"/> | |||
</Trigger> | |||
</Style.Triggers> | |||
</Style> | |||
<!--#endregion--> | |||
<!--#region FButton_Transparency_1--> | |||
<Style x:Key="DropButton" TargetType="{x:Type Button}"> | |||
<Setter Property="Background" Value="White" /> | |||
<Setter Property="Foreground" Value="white" /> | |||
<Setter Property="FontFamily" Value="../Fonts/#iconfont" /> | |||
<Setter Property="HorizontalContentAlignment" Value="Center" /> | |||
<Setter Property="Height" Value="Auto" /> | |||
<Setter Property="Width" Value="Auto" /> | |||
<Setter Property="FontSize" Value="13" /> | |||
<Setter Property="Padding" Value="3,1,3,1" /> | |||
<Setter Property="Cursor" Value="Hand" /> | |||
<Setter Property="BorderBrush" Value="Transparent" /> | |||
<Setter Property="Template"> | |||
<Setter.Value> | |||
<ControlTemplate TargetType="{x:Type Button}"> | |||
<Grid> | |||
<Border x:Name="mybg" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" | |||
Background="{TemplateBinding Background}" | |||
BorderBrush="{TemplateBinding BorderBrush}" | |||
BorderThickness="{TemplateBinding BorderThickness}"> | |||
</Border> | |||
<ContentPresenter Margin="10,2" HorizontalAlignment="Center" VerticalAlignment="Center" /> | |||
</Grid> | |||
<ControlTemplate.Triggers> | |||
<Trigger Property="IsMouseOver" Value="True"> | |||
<Setter Property="Opacity" TargetName="mybg" Value="0.6" /> | |||
</Trigger> | |||
</ControlTemplate.Triggers> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
</Setter> | |||
</Style> | |||
<!--#endregion--> | |||
<!--#region FButton_Transparency--> | |||
<Style x:Key="FButton_Transparency" TargetType="{x:Type Button}"> | |||
<Setter Property="Background" Value="White" /> | |||
<Setter Property="Foreground" Value="white" /> | |||
<Setter Property="FontFamily" Value="../Fonts/#iconfont" /> | |||
<Setter Property="HorizontalContentAlignment" Value="Center" /> | |||
<Setter Property="Height" Value="Auto" /> | |||
<Setter Property="Width" Value="Auto" /> | |||
<Setter Property="FontSize" Value="13" /> | |||
<Setter Property="Padding" Value="3,1,3,1" /> | |||
<Setter Property="Cursor" Value="Hand" /> | |||
<Setter Property="BorderBrush" Value="Transparent" /> | |||
<Setter Property="Template"> | |||
<Setter.Value> | |||
<ControlTemplate TargetType="{x:Type Button}"> | |||
<Border x:Name="bg" HorizontalAlignment="Center" VerticalAlignment="Center" | |||
Background="Transparent" | |||
BorderBrush="Black" | |||
CornerRadius="10" | |||
BorderThickness="3"> | |||
<ContentControl x:Name="content" Content="{TemplateBinding Content}" Background="Transparent" Margin="10,2" HorizontalAlignment="Center" VerticalAlignment="Center" /> | |||
</Border> | |||
<ControlTemplate.Triggers> | |||
<Trigger Property="IsMouseOver" Value="True"> | |||
<Setter Property="Background" TargetName="bg" Value="#ECBB52"/> | |||
</Trigger> | |||
</ControlTemplate.Triggers> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
</Setter> | |||
</Style> | |||
<!--#endregion--> | |||
<!--#region CalendarItemsStyle--> | |||
<Style x:Key="CalendarItemsStyle" TargetType="{x:Type CalendarItem}"> | |||
<Setter Property="Template"> | |||
<Setter.Value> | |||
<ControlTemplate TargetType="{x:Type CalendarItem}"> | |||
<ControlTemplate.Resources> | |||
<!-- 头部星期样式 --> | |||
<DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}"> | |||
<TextBlock | |||
Margin="0,6,0,6" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
FontWeight="Bold" | |||
Foreground="Black" | |||
Text="{Binding}" /> | |||
</DataTemplate> | |||
</ControlTemplate.Resources> | |||
<Grid x:Name="PART_Root"> | |||
<Border | |||
Margin="{TemplateBinding Margin}" | |||
CornerRadius="20" | |||
Background="{TemplateBinding Background}" | |||
BorderBrush="{TemplateBinding BorderBrush}" | |||
BorderThickness="4"> | |||
<Grid Margin="2"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="Auto" /> | |||
</Grid.ColumnDefinitions> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="Auto" /> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="Auto" /> | |||
</Grid.RowDefinitions> | |||
<!-- Header --> | |||
<Grid | |||
Grid.Row="2" | |||
HorizontalAlignment="Stretch" | |||
Background="Transparent"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="2*" /> | |||
<ColumnDefinition Width="*" /> | |||
</Grid.ColumnDefinitions> | |||
<Button | |||
x:Name="PART_PreviousButton" BorderBrush="Black" | |||
Grid.Column="0" Height="30" Width="30" Content="" | |||
Style="{StaticResource FButton_Transparency_1}" | |||
Focusable="False"> | |||
<Button.Background> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/左.png"/> | |||
</Button.Background> | |||
</Button> | |||
<Button | |||
x:Name="PART_HeaderButton" | |||
Grid.Column="1" | |||
Foreground="Black" | |||
FontSize="30" | |||
FontWeight="Black" | |||
Focusable="False" | |||
Style="{StaticResource FButton_Transparency}" /> | |||
<Button | |||
x:Name="PART_NextButton" | |||
Grid.Column="2" Height="30" Width="30" BorderBrush="Black" | |||
Focusable="False" | |||
Content="" | |||
Style="{StaticResource FButton_Transparency_1}"> | |||
<Button.Background> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/右.png"/> | |||
</Button.Background> | |||
</Button> | |||
</Grid> | |||
<!-- PART_MonthView --> | |||
<Grid | |||
x:Name="PART_MonthView" | |||
Grid.Row="1" | |||
Margin="6,1,6,6" | |||
HorizontalAlignment="Stretch" | |||
VerticalAlignment="Stretch" | |||
Visibility="Visible"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="*" /> | |||
</Grid.ColumnDefinitions> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="*" /> | |||
</Grid.RowDefinitions> | |||
</Grid> | |||
<!-- PART_YearView --> | |||
<Grid | |||
x:Name="PART_YearView" | |||
Grid.Row="1" | |||
Margin="6,10,6,10" | |||
HorizontalAlignment="Stretch" | |||
VerticalAlignment="Stretch" | |||
Visibility="Hidden"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="*" /> | |||
</Grid.ColumnDefinitions> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="*" /> | |||
<RowDefinition Height="*" /> | |||
</Grid.RowDefinitions> | |||
</Grid> | |||
</Grid> | |||
</Border> | |||
</Grid> | |||
<ControlTemplate.Triggers> | |||
<!--<Trigger Property="IsEnabled" Value="False"> | |||
<Setter TargetName="PART_Root" Property="Opacity" Value="{StaticResource DisableOpacity}" /> | |||
</Trigger>--> | |||
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Year"> | |||
<Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" /> | |||
<Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" /> | |||
</DataTrigger> | |||
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Decade"> | |||
<Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" /> | |||
<Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" /> | |||
</DataTrigger> | |||
</ControlTemplate.Triggers> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
</Setter> | |||
</Style> | |||
<!--#endregion--> | |||
<!--#endregion--> | |||
<!--#region 日期控件样式--> | |||
<!--#region DatePickerTextBox样式--> | |||
<Style x:Key="DatePickerTextBoxStyle" TargetType="DatePickerTextBox"> | |||
<Setter Property="Background" Value="Transparent" /> | |||
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> | |||
<Setter Property="VerticalContentAlignment" Value="Stretch" /> | |||
<Setter Property="Focusable" Value="False" /> | |||
<Setter Property="Template"> | |||
<Setter.Value> | |||
<ControlTemplate TargetType="{x:Type TextBox}"> | |||
<TextBlock | |||
x:Name="tb" | |||
FontSize="{TemplateBinding FontSize}" | |||
Foreground="{TemplateBinding Foreground}" | |||
Text="{TemplateBinding Text}" /> | |||
<ControlTemplate.Triggers> | |||
<DataTrigger Binding="{Binding Text, RelativeSource={RelativeSource Mode=Self}}" Value=""> | |||
<Setter TargetName="tb" Property="Visibility" Value="Visible" /> | |||
</DataTrigger> | |||
</ControlTemplate.Triggers> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
</Setter> | |||
</Style> | |||
<!--#endregion--> | |||
<Style x:Key="PickerStyle_1" TargetType="{x:Type DatePicker}"> | |||
<Setter Property="Foreground" Value="Black" /> | |||
<Setter Property="IsTodayHighlighted" Value="True" /> | |||
<Setter Property="SelectedDateFormat" Value="Short" /> | |||
<Setter Property="Padding" Value="2" /> | |||
<Setter Property="BorderThickness" Value="4" /> | |||
<Setter Property="VerticalContentAlignment" Value="Center" /> | |||
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> | |||
<!-- Set CalendarStyle to DatePickerCalendarStyle. --> | |||
<Setter Property="CalendarStyle" Value="{StaticResource DatePickerCalendarStyle1}" /> | |||
<Setter Property="Width" Value="200" /> | |||
<Setter Property="FontSize" Value="25" /> | |||
<Setter Property="FontWeight" Value="Black"/> | |||
<!--<Setter Property="Height" Value="30" />--> | |||
<Setter Property="Template"> | |||
<Setter.Value> | |||
<ControlTemplate TargetType="{x:Type DatePicker}"> | |||
<Border | |||
x:Name="br" | |||
Padding="{TemplateBinding Padding}" | |||
Background="{TemplateBinding Background}" | |||
BorderBrush="{TemplateBinding BorderBrush}" | |||
CornerRadius="10" | |||
BorderThickness="{TemplateBinding BorderThickness}"> | |||
<Grid | |||
x:Name="PART_Root" | |||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | |||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="Auto" /> | |||
</Grid.ColumnDefinitions> | |||
<Button | |||
Margin="2,2,10,2" | |||
x:Name="PART_Button" | |||
Grid.Column="1" BorderBrush="Transparent" Width="30" Content="" | |||
Height="30" | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Top" | |||
Focusable="False" | |||
Foreground="{TemplateBinding Foreground}" | |||
Style="{StaticResource DropButton}"> | |||
<Button.Background> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/日历.png"/> | |||
</Button.Background> | |||
</Button> | |||
<DatePickerTextBox | |||
x:Name="PART_TextBox" | |||
Grid.Column="0" | |||
Margin="5,0,0,0" | |||
VerticalAlignment="Center" | |||
Foreground="{TemplateBinding Foreground}" | |||
Style="{StaticResource DatePickerTextBoxStyle}" | |||
Text="{TemplateBinding Text}" /> | |||
<Grid | |||
x:Name="PART_DisabledVisual" | |||
Grid.Row="0" | |||
Grid.Column="0" | |||
Grid.ColumnSpan="2" | |||
IsHitTestVisible="False" | |||
Opacity="0"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="*" /> | |||
<ColumnDefinition Width="Auto" /> | |||
</Grid.ColumnDefinitions> | |||
<Rectangle | |||
Grid.Row="0" | |||
Grid.Column="0" | |||
Fill="#A5FFFFFF" | |||
RadiusX="1" | |||
RadiusY="1" /> | |||
<Rectangle | |||
Grid.Row="0" | |||
Grid.Column="1" | |||
Width="19" | |||
Height="18" | |||
Margin="3,0,3,0" | |||
Fill="Black" | |||
RadiusX="1" | |||
RadiusY="1" /> | |||
<Popup | |||
x:Name="PART_Popup" | |||
AllowsTransparency="True" | |||
Placement="Bottom" | |||
PlacementTarget="{Binding ElementName=br}" | |||
PopupAnimation="Slide" | |||
StaysOpen="False" /> | |||
</Grid> | |||
</Grid> | |||
<VisualStateManager.VisualStateGroups> | |||
<VisualStateGroup x:Name="CommonStates"> | |||
<VisualState x:Name="Normal" /> | |||
<VisualState x:Name="Disabled"> | |||
<Storyboard> | |||
<DoubleAnimation | |||
Storyboard.TargetName="PART_DisabledVisual" | |||
Storyboard.TargetProperty="Opacity" | |||
To="1" | |||
Duration="0" /> | |||
</Storyboard> | |||
</VisualState> | |||
</VisualStateGroup> | |||
</VisualStateManager.VisualStateGroups> | |||
</Border> | |||
<ControlTemplate.Triggers> | |||
<Trigger Property="IsMouseOver" Value="True"> | |||
<Setter TargetName="br" Property="Opacity" Value="0.8" /> | |||
</Trigger> | |||
</ControlTemplate.Triggers> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
</Setter> | |||
</Style> | |||
<!--#endregion--> | |||
</ResourceDictionary> | |||
</Application.Resources> | |||
</Application> |
@@ -19,6 +19,7 @@ using System.Windows; | |||
using System.Windows.Forms; | |||
using BPASmartClient.Model.煮面机; | |||
using BPASmartClient.Business; | |||
using BPASmartClient.ViewModel; | |||
namespace BPASmartClient | |||
{ | |||
@@ -30,7 +31,7 @@ namespace BPASmartClient | |||
protected override void OnStartup(StartupEventArgs e) | |||
{ | |||
base.OnStartup(e); | |||
InternetInfo.IsEnableNetwork = false; | |||
InternetInfo.IsEnableNetwork = true; | |||
DataRead(); | |||
SystemHelper.GetInstance.CreateDesktopShortcut(); | |||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; | |||
@@ -128,11 +129,26 @@ namespace BPASmartClient | |||
/// </summary> | |||
private void DataSave() | |||
{ | |||
OrderSave(); | |||
Json<KeepDataBase>.Save(); | |||
Json<NoodOrder>.Save(); | |||
//Sqlite<Alarm>.GetInstance.Save(); | |||
} | |||
private void OrderSave() | |||
{ | |||
if (FoodMenuViewModel.orderStatusLists.Count > 0) | |||
{ | |||
int count = FoodMenuViewModel.orderStatusLists.Count; | |||
for (int i = 0; i < count; i++) | |||
{ | |||
var res = FoodMenuViewModel.orderStatusLists.Last(); | |||
res.OrderStatus = ORDER_STATUS.ERR_NOT_REPLY_WHEN_COOKING; | |||
Json<NoodOrder>.Data.historyOrderLists.Insert(0, res); | |||
FoodMenuViewModel.orderStatusLists.Remove(FoodMenuViewModel.orderStatusLists.Last()); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 输入读取 | |||
/// </summary> | |||
@@ -69,7 +69,7 @@ | |||
<Resource Include="Image\noodle.jpg" /> | |||
<Resource Include="Image\noodle_1.jpg" /> | |||
<Resource Include="Image\主页.png" /> | |||
<Resource Include="Image\表头.jpg" /> | |||
<Resource Include="表头.jpg" /> | |||
<Resource Include="Image\设备.png" /> | |||
</ItemGroup> | |||
@@ -23,7 +23,11 @@ | |||
</UserControl.Resources> | |||
<Grid Background="White"> | |||
<Image Source="../../Image/设备.png" Stretch="Fill" Margin="0,0,300,0"/> | |||
<!--#region --> | |||
<Border CornerRadius="20" Background="#ECBB52" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="100,180" Height="120" Width="250" BorderBrush="Black" BorderThickness="2"> | |||
<Button Background="Transparent" Style="{StaticResource adbtn}" Click="Init_Click" Content="初 始 化" BorderThickness="0" FontSize="40" FontWeight="Black"/> | |||
</Border> | |||
<!--#endregion--> | |||
<!--#region 煮面设定 --> | |||
<Border Margin="0,180,30,0" Width="500" VerticalAlignment="Center" HorizontalAlignment="Right" Height="400"> | |||
<StackPanel Orientation="Vertical" Width="500"> | |||
@@ -105,5 +105,19 @@ namespace BPASmartClient.Control | |||
} | |||
} | |||
private void Init_Click(object sender, RoutedEventArgs e) | |||
{ | |||
bool re = false; | |||
Application.Current.Dispatcher.Invoke(() => | |||
{ | |||
re = MessageNotify.GetInstance.ShowDialog($"是否开始初始化设备"); | |||
}); | |||
if (re) | |||
{ | |||
ActionManage.GetInstance.Send("InitDevice"); | |||
} | |||
else | |||
NoodOrderCtrl.GetInstance.Show("已取消操作"); | |||
} | |||
} | |||
} |
@@ -35,17 +35,35 @@ | |||
<Grid Background="#23282E"> | |||
<StackPanel Orientation="Vertical" VerticalAlignment="Top"> | |||
<RadioButton IsChecked="True" Click="RadioButton_Click" Style="{StaticResource toggle}" GroupName="or" Width="180" Height="60" FontSize="30" Content="正在制作" Foreground="White"/> | |||
<RadioButton IsChecked="False" Click="RadioButton_Click" Style="{StaticResource toggle}" GroupName="or" Width="180" Height="60" FontSize="30" Content="等待取餐" Foreground="White"/> | |||
<RadioButton IsChecked="False" Click="RadioButton_Click" Style="{StaticResource toggle}" GroupName="or" Width="180" Height="60" FontSize="30" Content="历史订单" Foreground="White"/> | |||
</StackPanel> | |||
</Grid> | |||
<Border Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Top" > | |||
<Grid Margin="20,50,10,0" > | |||
<Border Grid.Column="1" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" > | |||
<Grid Margin="20,0,10,0" > | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="60"/> | |||
<RowDefinition Height="140"/> | |||
<RowDefinition Height="50"/> | |||
<RowDefinition /> | |||
</Grid.RowDefinitions> | |||
<TextBlock x:Name="title" Text="制作列表" Foreground="White" HorizontalAlignment="Left" FontSize="30" FontWeight="Black" VerticalAlignment="Top" Margin="20,0"/> | |||
<Grid x:Name="historySearch" Visibility="Collapsed"> | |||
<Border CornerRadius="20" Margin="20,0,0,0" Background="#ECBB52" HorizontalAlignment="Center" VerticalAlignment="Center" Height="50" Width="200" BorderBrush="Black" BorderThickness="4"> | |||
<Button Background="Transparent" Style="{StaticResource adbtn}" Content="当日订单" Command="{Binding TodayOrder}" BorderThickness="0" FontSize="30" FontWeight="Black"/> | |||
</Border> | |||
<StackPanel Margin="0,0,100,0" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center"> | |||
<TextBlock Text="选择日期:" Foreground="Black" FontSize="30" FontWeight="Black"/> | |||
<DatePicker Style="{StaticResource PickerStyle_1}" SelectedDate="{Binding SearchDate,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" BorderBrush="Black" VerticalAlignment="Center"/> | |||
<Border CornerRadius="20" Margin="20,0,0,0" Background="#ECBB52" HorizontalAlignment="Center" VerticalAlignment="Center" Height="50" Width="150" BorderBrush="Black" BorderThickness="4"> | |||
<Button Background="Transparent" Style="{StaticResource adbtn}" Command="{Binding SearCh}" Content="查 询" BorderThickness="0" FontSize="30" FontWeight="Black"/> | |||
</Border> | |||
</StackPanel> | |||
</Grid> | |||
<TextBlock x:Name="title" Text="制作订单列表" Foreground="Black" HorizontalAlignment="Left" FontSize="35" FontWeight="Black" VerticalAlignment="Center" Margin="20,0,0,0"/> | |||
<!--<Grid x:Name="historySearch"> | |||
<Border CornerRadius="20" Background="#ECBB52" HorizontalAlignment="Center" VerticalAlignment="Center" Height="50" Width="200" BorderBrush="Black" BorderThickness="2"> | |||
<Button Background="Transparent" Style="{StaticResource adbtn}" Content="当日订单" BorderThickness="0" FontSize="30" FontWeight="Black"/> | |||
</Border> | |||
</Grid>--> | |||
<Grid Grid.Row="1" Background="#D7D7D7"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="*"/> | |||
@@ -55,19 +73,19 @@ | |||
<ColumnDefinition Width="2*"/> | |||
<ColumnDefinition/> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock Grid.Column="0" Text="取餐号" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" /> | |||
<TextBlock Grid.Column="1" Text="菜品名称" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/> | |||
<TextBlock Grid.Column="2" Text="开始时间" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" /> | |||
<TextBlock Grid.Column="3" Text="结束时间" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" /> | |||
<TextBlock Grid.Column="4" Text="完成时间" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" /> | |||
<TextBlock Grid.Column="5" Text="状态" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/> | |||
<TextBlock Grid.Column="0" Text="取餐号" Foreground="Black" FontWeight="Black" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Center" /> | |||
<TextBlock Grid.Column="1" Text="菜品名称" Foreground="Black" FontWeight="Black" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Center"/> | |||
<TextBlock Grid.Column="2" Text="开始时间" Foreground="Black" FontWeight="Black" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Center" /> | |||
<TextBlock Grid.Column="3" Text="结束时间" Foreground="Black" FontWeight="Black" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Center" /> | |||
<TextBlock Grid.Column="4" Text="完成时间" Foreground="Black" FontWeight="Black" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Center" /> | |||
<TextBlock Grid.Column="5" Text="状态" Foreground="Black" FontWeight="Black" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Center"/> | |||
</Grid> | |||
<Grid Grid.Row="2" x:Name="makeGrid"> | |||
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"> | |||
<ScrollViewer HorizontalScrollBarVisibility="Hidden" PanningMode="VerticalOnly" IsManipulationEnabled="True" VerticalScrollBarVisibility="Hidden"> | |||
<ItemsControl Background="#D7D7D7" ItemsSource="{Binding orderStatusLists}"> | |||
<ItemsControl.ItemTemplate> | |||
<DataTemplate> | |||
<Border CornerRadius="10" Height="60" Margin="0,10,0,0" Background="White"> | |||
<Border CornerRadius="10" Height="60" Margin="0,10,0,0" Background="{Binding OrderStatus, Converter={StaticResource ColorConverter}}"> | |||
<Grid > | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="*"/> | |||
@@ -77,23 +95,23 @@ | |||
<ColumnDefinition Width="2*"/> | |||
<ColumnDefinition/> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock Grid.Column="0" FontSize="25" FontFamily="黑体" Foreground="#609FE7" HorizontalAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.SortNum}" /> | |||
<Border Grid.Column="1" Background="{StaticResource nameColor}" CornerRadius="10" Margin="40,10"> | |||
<TextBlock Margin="5,0,0,0" FontSize="20" FontWeight="Black" VerticalAlignment="Center" FontFamily="黑体" Foreground="White" HorizontalAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.GoodsName}"/> | |||
<TextBlock Grid.Column="0" FontSize="35" FontWeight="Black" Foreground="Black" HorizontalAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.SortNum}" /> | |||
<Border Grid.Column="1" Background="Transparent" CornerRadius="10" Margin="40,10"> | |||
<TextBlock Margin="5,0,0,0" FontSize="30" FontWeight="Black" VerticalAlignment="Center" FontFamily="黑体" Foreground="Black" HorizontalAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.GoodsName}"/> | |||
</Border> | |||
<TextBlock HorizontalAlignment="Center" Grid.Column="2" Foreground="{StaticResource wordColor}" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding StartDate}" /> | |||
<TextBlock HorizontalAlignment="Center" Grid.Column="2" Foreground="Black" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding StartDate}" /> | |||
<Grid Grid.Column="3"> | |||
<TextBlock HorizontalAlignment="Center" Foreground="{StaticResource wordColor}" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding EndDate}" /> | |||
<TextBlock HorizontalAlignment="Center" Foreground="Black" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding EndDate}" /> | |||
</Grid> | |||
<Grid Grid.Column="4"> | |||
<TextBlock HorizontalAlignment="Center" Foreground="{StaticResource wordColor}" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding CompleteDate}" /> | |||
<TextBlock HorizontalAlignment="Center" Foreground="Black" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding CompleteDate}" /> | |||
</Grid> | |||
<Grid Grid.Column="5"> | |||
<TextBlock HorizontalAlignment="Center" FontSize="25" FontFamily="黑体" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderStatus, Converter={StaticResource TextConverter}}" /> | |||
<TextBlock HorizontalAlignment="Center" FontSize="30" FontWeight="Black" Foreground="Black" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderStatus, Converter={StaticResource TextConverter}}" /> | |||
</Grid> | |||
</Grid> | |||
</Border> | |||
</DataTemplate> | |||
@@ -103,10 +121,10 @@ | |||
</Grid> | |||
<Grid Grid.Row="2" x:Name="takeGrid" Visibility="Collapsed"> | |||
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"> | |||
<ItemsControl Background="#D7D7D7" ItemsSource="{Binding WaitTakeMeal}"> | |||
<ItemsControl Background="#D7D7D7" ItemsSource="{Binding history}"> | |||
<ItemsControl.ItemTemplate> | |||
<DataTemplate> | |||
<Border CornerRadius="10" Height="60" Margin="0,10,0,0" Background="White"> | |||
<Border CornerRadius="10" Height="60" Margin="0,10,0,0" Background="{Binding OrderStatus, Converter={StaticResource ColorConverter}}"> | |||
<Grid > | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="*"/> | |||
@@ -116,26 +134,20 @@ | |||
<ColumnDefinition Width="2*"/> | |||
<ColumnDefinition/> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock Grid.Column="0" FontSize="25" FontFamily="黑体" Foreground="#609FE7" HorizontalAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.SortNum}" /> | |||
<Border Grid.Column="1" CornerRadius="10" Margin="40,10"> | |||
<Border.Background> | |||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> | |||
<GradientStop Offset="0.0" Color="#9EC7F7" /> | |||
<GradientStop Offset="0.75" Color="#368CF2"/> | |||
</LinearGradientBrush> | |||
</Border.Background> | |||
<TextBlock Margin="5,0,0,0" FontSize="20" FontWeight="Black" VerticalAlignment="Center" FontFamily="黑体" Foreground="White" HorizontalAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.GoodsName}"/> | |||
<TextBlock Grid.Column="0" FontSize="35" FontWeight="Black" Foreground="Black" HorizontalAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.SortNum}" /> | |||
<Border Grid.Column="1" Background="Transparent" CornerRadius="10" Margin="40,10"> | |||
<TextBlock Margin="5,0,0,0" FontSize="30" FontWeight="Black" VerticalAlignment="Center" Foreground="Black" HorizontalAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.GoodsName}"/> | |||
</Border> | |||
<TextBlock HorizontalAlignment="Center" Grid.Column="2" Foreground="{StaticResource wordColor}" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding StartDate}" /> | |||
<TextBlock HorizontalAlignment="Center" Grid.Column="2" Foreground="Black" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding StartDate}" /> | |||
<Grid Grid.Column="3"> | |||
<TextBlock HorizontalAlignment="Center" Foreground="{StaticResource wordColor}" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding EndDate}" /> | |||
<TextBlock HorizontalAlignment="Center" Foreground="Black" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding EndDate}" /> | |||
</Grid> | |||
<Grid Grid.Column="4"> | |||
<TextBlock HorizontalAlignment="Center" Foreground="{StaticResource wordColor}" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding CompleteDate}" /> | |||
<TextBlock HorizontalAlignment="Center" Foreground="Black" FontWeight="Black" FontFamily="黑体" FontSize="25" Style="{StaticResource TextBlockStyle}" Text="{Binding CompleteDate}" /> | |||
</Grid> | |||
<Grid Grid.Column="5"> | |||
<TextBlock HorizontalAlignment="Center" FontSize="25" FontFamily="黑体" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderStatus, Converter={StaticResource TextConverter}}" /> | |||
<TextBlock HorizontalAlignment="Center" FontSize="30" FontWeight="Black" Foreground="Black" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderStatus, Converter={StaticResource TextConverter}}" /> | |||
</Grid> | |||
</Grid> | |||
@@ -147,162 +159,8 @@ | |||
</Grid> | |||
</Grid> | |||
</Border> | |||
<!--<Border Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,0"> | |||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Top"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="60"/> | |||
<RowDefinition Height="*"/> | |||
</Grid.RowDefinitions> | |||
<Grid Grid.Row="2"> | |||
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"> | |||
<ItemsControl Background="Transparent" ItemsSource="{Binding WaitTakeMeal}"> | |||
<ItemsControl.ItemTemplate> | |||
<DataTemplate> | |||
<Grid Height="40"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="100"/> | |||
<ColumnDefinition Width="250"/> | |||
<ColumnDefinition Width="250"/> | |||
<ColumnDefinition Width="250"/> | |||
<ColumnDefinition Width="250"/> | |||
<ColumnDefinition Width="150"/> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock Grid.Column="0" FontSize="16" HorizontalAlignment="Center" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.SuborderId}" /> | |||
<Border BorderThickness="0.3" Grid.ColumnSpan="1" BorderBrush="White"/> | |||
<Grid Grid.Column="1"> | |||
<TextBlock Margin="5,0,0,0" FontSize="16" HorizontalAlignment="Center" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.GoodsName}" /> | |||
<Border BorderThickness="0,0.3,0.3,0.3" BorderBrush="White"/> | |||
</Grid> | |||
<TextBlock HorizontalAlignment="Center" Grid.Column="2" FontSize="16" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding StartDate}" /> | |||
<Border BorderThickness="0,0.3,0.3,0.3" Grid.Column="2" BorderBrush="White"/> | |||
<Grid Grid.Column="3"> | |||
<TextBlock HorizontalAlignment="Center" FontSize="16" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding EndDate}" /> | |||
<Border BorderThickness="0,0.3,0.3,0.3" BorderBrush="White"/> | |||
</Grid> | |||
<Grid Grid.Column="5"> | |||
<TextBlock HorizontalAlignment="Center" FontSize="16" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderStatus, Converter={StaticResource TextConverter}}" /> | |||
<Border BorderThickness="0,0.3,0.6,0.3" BorderBrush="White"/> | |||
</Grid> | |||
<Grid Grid.Column="4"> | |||
<TextBlock FontSize="16" HorizontalAlignment="Center" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding CompleteDate}" /> | |||
<Border BorderThickness="0,0.3,0.3,0.3" BorderBrush="White"/> | |||
</Grid> | |||
</Grid> | |||
</DataTemplate> | |||
</ItemsControl.ItemTemplate> | |||
</ItemsControl> | |||
</ScrollViewer> | |||
</Grid> | |||
</Grid> | |||
</Border>--> | |||
</Grid> | |||
<!--<Grid> | |||
<Grid.RowDefinitions> | |||
<RowDefinition/> | |||
<RowDefinition Height="1.5*"/> | |||
</Grid.RowDefinitions> | |||
<Grid> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="0.48*"/> | |||
<ColumnDefinition/> | |||
</Grid.ColumnDefinitions> | |||
</Grid> | |||
<Border Grid.Row="1" > | |||
<Grid Margin="10,0" > | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="50"/> | |||
<RowDefinition Height="30"/> | |||
<RowDefinition Height="*"/> | |||
</Grid.RowDefinitions> | |||
<TextBlock HorizontalAlignment="Center" Text="正在制作列表"/> | |||
<Grid Grid.Row="1" > | |||
<Grid.Background> | |||
<ImageBrush ImageSource="../../Image/表头.jpg"/> | |||
</Grid.Background> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition /> | |||
<ColumnDefinition Width="3*"/> | |||
<ColumnDefinition Width="3*"/> | |||
<ColumnDefinition Width="3*"/> | |||
<ColumnDefinition Width="3*"/> | |||
<ColumnDefinition/> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock Grid.Column="0" Text="取餐号" HorizontalAlignment="Center"/> | |||
<Border BorderThickness="0.5" BorderBrush="White" Grid.Column="0" /> | |||
<TextBlock Grid.Column="1" Text="菜品名称" HorizontalAlignment="Center"/> | |||
<Border BorderThickness="0,0.5,0.5,0.5" BorderBrush="White" Grid.Column="1" /> | |||
<TextBlock Grid.Column="2" Text="开始时间" HorizontalAlignment="Center"/> | |||
<Border BorderThickness="0,0.5,0.5,0.5" BorderBrush="White" Grid.Column="2" /> | |||
<TextBlock Grid.Column="3" Text="结束时间" HorizontalAlignment="Center"/> | |||
<Border BorderThickness="0,0.5,0.5,0.5" BorderBrush="White" Grid.Column="3" /> | |||
<TextBlock Grid.Column="4" Text="完成时间" HorizontalAlignment="Center"/> | |||
<Border BorderThickness="0,0.5,0.5,0.5" BorderBrush="White" Grid.Column="4" /> | |||
<TextBlock Grid.Column="5" Text="状态" HorizontalAlignment="Center"/> | |||
<Border BorderThickness="0,0.5,0.5,0.5" BorderBrush="White" Grid.Column="5" /> | |||
</Grid> | |||
<Grid Grid.Row="2"> | |||
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"> | |||
<ItemsControl Background="Transparent" ItemsSource="{Binding orderStatusLists}"> | |||
<ItemsControl.ItemTemplate> | |||
<DataTemplate> | |||
<Grid Height="40"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition /> | |||
<ColumnDefinition Width="3*"/> | |||
<ColumnDefinition Width="3*"/> | |||
<ColumnDefinition Width="3*"/> | |||
<ColumnDefinition Width="3*"/> | |||
<ColumnDefinition/> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock Grid.Column="0" FontSize="16" HorizontalAlignment="Center" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.SortNum}" /> | |||
<Border BorderThickness="0.3" Grid.ColumnSpan="1" BorderBrush="White"/> | |||
<Grid Grid.Column="1"> | |||
<TextBlock Margin="5,0,0,0" FontSize="16" HorizontalAlignment="Center" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderPush.GoodsName}" /> | |||
<Border BorderThickness="0,0.3,0.3,0.3" BorderBrush="White"/> | |||
</Grid> | |||
<TextBlock HorizontalAlignment="Center" Grid.Column="2" FontSize="16" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding StartDate}" /> | |||
<Border BorderThickness="0,0.3,0.3,0.3" Grid.Column="2" BorderBrush="White"/> | |||
<Grid Grid.Column="3"> | |||
<TextBlock HorizontalAlignment="Center" FontSize="16" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding EndDate}" /> | |||
<Border BorderThickness="0,0.3,0.3,0.3" BorderBrush="White"/> | |||
</Grid> | |||
<Grid Grid.Column="5"> | |||
<TextBlock HorizontalAlignment="Center" FontSize="16" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding OrderStatus, Converter={StaticResource TextConverter}}" /> | |||
<Border BorderThickness="0,0.3,0.3,0.3" BorderBrush="White"/> | |||
</Grid> | |||
<Grid Grid.Column="4"> | |||
<TextBlock FontSize="16" HorizontalAlignment="Center" Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}" Style="{StaticResource TextBlockStyle}" Text="{Binding CompleteDate}" /> | |||
<Border BorderThickness="0,0.3,0.3,0.3" BorderBrush="White"/> | |||
</Grid> | |||
</Grid> | |||
</DataTemplate> | |||
</ItemsControl.ItemTemplate> | |||
</ItemsControl> | |||
</ScrollViewer> | |||
</Grid> | |||
</Grid> | |||
</Border> | |||
</Grid>--> | |||
</Grid> | |||
</UserControl> |
@@ -39,13 +39,15 @@ namespace BPASmartClient.Control | |||
{ | |||
makeGrid.Visibility = Visibility.Visible; | |||
takeGrid.Visibility = Visibility.Collapsed; | |||
historySearch.Visibility = Visibility.Collapsed; | |||
title.Text = "制作订单列表"; | |||
} | |||
else | |||
{ | |||
makeGrid.Visibility = Visibility.Collapsed; | |||
takeGrid.Visibility = Visibility.Visible; | |||
title.Text = "等待取餐列表"; | |||
historySearch.Visibility = Visibility.Visible; | |||
title.Text = "历史订单列表"; | |||
} | |||
} | |||
} | |||
@@ -165,8 +165,8 @@ | |||
<Grid> | |||
<TextBlock Text="订单信息" Foreground="Black" FontSize="40" HorizontalAlignment="Center" FontFamily="STHupo" VerticalAlignment="Center"/> | |||
</Grid> | |||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"> | |||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" PanningMode="VerticalOnly" IsManipulationEnabled="True" VerticalScrollBarVisibility="Hidden"> | |||
<ItemsControl ItemsSource="{Binding orderStatusLists}"> | |||
<ItemsControl.ItemTemplate> | |||
<DataTemplate> | |||
@@ -187,21 +187,21 @@ | |||
<StackPanel Margin="10,0,0,0" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal"> | |||
<TextBlock Text="下单时间:" VerticalAlignment="Center" Foreground="Black" FontFamily="黑体" FontSize="20"/> | |||
<TextBlock Text="下单时间:" FontWeight="Black" VerticalAlignment="Center" Foreground="Black" FontFamily="黑体" FontSize="20"/> | |||
<TextBlock Text="{Binding StartDate}" VerticalAlignment="Center" Foreground="Black" FontWeight="Black" FontFamily="黑体" FontSize="25" /> | |||
</StackPanel> | |||
<StackPanel Margin="0,0,10,0" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal"> | |||
<TextBlock HorizontalAlignment="Right" FontSize="20" VerticalAlignment="Center" Foreground="Black" FontWeight="Black" Text="{Binding OrderStatus, Converter={StaticResource TextConverter}}" /> | |||
</StackPanel> | |||
<Button x:Name="Exit" Click="Exit_Click" Margin="0,0,20,0" Style="{StaticResource adbtn}" Command="{Binding ElementName=orderstatusView,Path=ExitOrder}" CommandParameter="{Binding ElementName=SortNum,Path=Text}" BorderThickness="0" HorizontalAlignment="Right" Background="Transparent" Content="取消订单" Foreground="Black" FontFamily="STHupo" FontSize="30"/> | |||
<Button x:Name="Exit" Click="Exit_Click" Margin="0,0,20,0" Style="{StaticResource adbtn}" Command="{Binding ElementName=orderstatusView,Path=ExitOrder}" CommandParameter="{Binding ElementName=SortNum,Path=Text}" BorderThickness="0" HorizontalAlignment="Right" Background="Transparent" Content="取消订单" Visibility="{Binding OrderStatus, Converter={StaticResource visibleConvert}}" Foreground="Black" FontFamily="STHupo" FontSize="30"/> | |||
<StackPanel Margin="0,0,10,0" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal"> | |||
<TextBlock Text="面条:" Foreground="Black" FontFamily="黑体" VerticalAlignment="Center" FontSize="20"/> | |||
<TextBlock Text="面条:" FontWeight="Black" Foreground="Black" FontFamily="黑体" VerticalAlignment="Center" FontSize="20"/> | |||
<TextBlock Text="{Binding FoodMenuModel.NoodleLoc,Converter={StaticResource noodleConvert}}" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="Black" FontWeight="Black" FontFamily="黑体" FontSize="30"/> | |||
</StackPanel> | |||
<StackPanel Margin="10,0,0,0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal"> | |||
<TextBlock Text="面碗:" Foreground="Black" FontFamily="黑体" VerticalAlignment="Center" FontSize="20"/> | |||
<TextBlock Text="面碗:" Foreground="Black" FontFamily="黑体" FontWeight="Black" VerticalAlignment="Center" FontSize="20"/> | |||
<TextBlock Margin="10,0,0,0" Text="{Binding FoodMenuModel.BowLoc,Converter={StaticResource BowConvert}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black" FontFamily="STHupo" FontSize="30"/> | |||
</StackPanel> | |||
@@ -56,6 +56,7 @@ namespace BPASmartClient.Control | |||
} | |||
} | |||
#endregion | |||
#region 时间选择框加载 | |||
private void TimeUi_Loaded(object sender, RoutedEventArgs e) | |||
{ | |||
ObservableCollection<NoodTime> noodTimes = new ObservableCollection<NoodTime>(); | |||
@@ -66,6 +67,8 @@ namespace BPASmartClient.Control | |||
minCtrl.ItemsSource = noodTimes; | |||
secCtrl.ItemsSource = noodTimes; | |||
} | |||
#endregion | |||
public class NoodTime : NotifyBase | |||
{ | |||
@@ -157,8 +157,8 @@ | |||
</Border> | |||
<ContentControl Grid.Row="1" x:Name="orderContent"/> | |||
</Grid> | |||
<Grid HorizontalAlignment="Center" Margin="0,20" VerticalAlignment="Top" Background="Transparent"> | |||
<TextBlock Text="主页" x:Name="titleText" HorizontalAlignment="Center" Foreground="White" FontSize="40" VerticalAlignment="Center"/> | |||
<Grid HorizontalAlignment="Center" Margin="0,10" VerticalAlignment="Top" Background="Transparent"> | |||
<TextBlock Text="主页" x:Name="titleText" HorizontalAlignment="Center" Foreground="White" FontWeight="Black" FontSize="50" VerticalAlignment="Center"/> | |||
</Grid> | |||
<Border Margin="0,10,40,0" HorizontalAlignment="Right" VerticalAlignment="Top" Height="60" Width="60" > | |||
<Button Style="{StaticResource adbtn}" Height="60" Click="Close_Click" Width="60" BorderThickness="0" HorizontalAlignment="Center" VerticalAlignment="Center"> | |||
@@ -170,7 +170,7 @@ | |||
<Grid Visibility="Collapsed" x:Name="infoGrid" Margin="0,120" HorizontalAlignment="Center" Height="60" Width="400" VerticalAlignment="Top" Background="Transparent"> | |||
<Border Background="{DynamicResource infoColor}" BorderBrush="Black" BorderThickness="2" /> | |||
<Button Margin="5,4,0,0" Click="Info_Click" Style="{StaticResource adbtn}" Background="Transparent" Content="关闭" FontSize="12" BorderThickness="0" Foreground="Black" HorizontalAlignment="Left" VerticalAlignment="Top"/> | |||
<TextBlock Text="下单成功" x:Name="infoText" Foreground="Black" FontWeight="Black" HorizontalAlignment="Center" FontSize="18" FontFamily="黑体"/> | |||
<TextBlock Text="下单成功" x:Name="infoText" Foreground="Black" FontWeight="Black" HorizontalAlignment="Center" FontSize="25" /> | |||
<Image Margin="0,0,20,0" Source="/BPASmartClient.CustomResource;component/Image/提示.png" HorizontalAlignment="Right" VerticalAlignment="Center" Height="30"/> | |||
</Grid> | |||
</Grid> | |||
@@ -1,4 +1,5 @@ | |||
using BPA.Helper; | |||
using BPASmartClient.CustomResource.Pages.Model; | |||
using BPASmartClient.ViewModel; | |||
using Control; | |||
using System; | |||
@@ -89,9 +90,20 @@ namespace BPASmartClient | |||
private void Close_Click(object sender, RoutedEventArgs e) | |||
{ | |||
this.Close(); | |||
MainViewModel.GetInstance().window.Close(); | |||
if (FoodMenuViewModel.orderStatusLists.Count>0) | |||
{ | |||
bool re = MessageNotify.GetInstance.ShowDialog("订单未执行完成,是否退出?"); | |||
if (re) | |||
{ | |||
this.Close(); | |||
MainViewModel.GetInstance().window.Close(); | |||
} | |||
} | |||
else | |||
{ | |||
this.Close(); | |||
MainViewModel.GetInstance().window.Close(); | |||
} | |||
} | |||
private void Info_Click(object sender, RoutedEventArgs e) | |||