Преглед на файлове

订单状态

样式分支
pry преди 2 години
родител
ревизия
9caac04e1a
променени са 12 файла, в които са добавени 370 реда и са изтрити 12 реда
  1. +2
    -2
      BPASmartClient.Business/Plugin/DeviceMgr.cs
  2. +6
    -0
      BPASmartClient.Business/Plugin/OrderProxy.cs
  3. +2
    -0
      BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
  4. Двоични данни
     
  5. +4
    -0
      BPASmartClient.CustomResource/RecDictionarys/RecTitleBarButtonStyle.xaml
  6. +2
    -2
      BPASmartClient.MorkS/Control.cs
  7. +4
    -0
      BPASmartClient.ViewModel/BPASmartClient.ViewModel.csproj
  8. +0
    -8
      BPASmartClient.ViewModel/Class1.cs
  9. +18
    -0
      BPASmartClient.ViewModel/OrderListDialogViewModel.cs
  10. +1
    -0
      BPASmartClient/BPASmartClient.csproj
  11. +304
    -0
      BPASmartClient/OrderListDialogView.xaml
  12. +27
    -0
      BPASmartClient/OrderListDialogView.xaml.cs

+ 2
- 2
BPASmartClient.Business/Plugin/DeviceMgr.cs Целия файл

@@ -81,8 +81,8 @@ namespace BPASmartClient.Business
{
int PushType = i;//0:主料 1:辅料
var jsondata = new { device.DeviceId, PushType };
string header = $"[{InternetInfo.StockServer}/GetItemInfo]_[{DateTime.Now.Ticks}]".AESEncrypt();
string url = $"{InternetInfo.ApiAddress}{InternetInfo.StockServer}/GetItemInfo";
string header = $"[{InternetInfo.StockServer}/stock/GetItemInfo]_[{DateTime.Now.Ticks}]".AESEncrypt();
string url = $"{InternetInfo.StockServer}/stock/GetItemInfo";
result = APIHelper.GetInstance.HttpRequest(url, header, jsondata, RequestType.POST);

if (PushType == 1)


+ 6
- 0
BPASmartClient.Business/Plugin/OrderProxy.cs Целия файл

@@ -72,6 +72,12 @@ namespace BPASmartClient.Business
var orderEvent = DoOrderEvent.Make(temp);
orderEvent.Id = device.DeviceId;
orderEvent.Publish();
Json<KeepDataBase>.Data.orderLists.Add(new OrderData()
{
IsSelected = true,
OrderPush = temp,
OrderStatus = BPA.Message.Enum.ORDER_STATUS.WAIT
});
}
}
Thread.Sleep(50);


+ 2
- 0
BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj Целия файл

@@ -15,6 +15,7 @@
<None Remove="Image\Cb_Checked.png" />
<None Remove="Image\Cb_HalfChecked.png" />
<None Remove="Image\hbl.ico" />
<None Remove="Image\HBL.png" />
<None Remove="Image\iconfont.ttf" />
<None Remove="Image\leftImage.png" />
<None Remove="Image\leftImageSub.png" />
@@ -149,6 +150,7 @@
</ItemGroup>

<ItemGroup>
<Resource Include="Image\HBL.png" />
<Resource Include="Image\告警\Wifi_NO.ico" />
<Resource Include="Image\告警\Wifi_OK.ico" />
<Resource Include="Image\顶部切图\Button_No.png" />


Двоични данни
Целия файл


+ 4
- 0
BPASmartClient.CustomResource/RecDictionarys/RecTitleBarButtonStyle.xaml Целия файл

@@ -0,0 +1,4 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</ResourceDictionary>

+ 2
- 2
BPASmartClient.MorkS/Control.cs Целия файл

@@ -228,8 +228,8 @@ namespace BPASmartClient.MorkS
ThreadManage.GetInstance().StartLong(new Action(() =>
{
mORKS.AllowRun = mORKS.InitComplete;
IsHealth = mORKS.Error && mORKS.InitComplete;
//IsHealth = mORKS.Error && mORKS.InitComplete;
IsHealth = true;
TakeBowlTask();

TakeNoodleTask();


+ 4
- 0
BPASmartClient.ViewModel/BPASmartClient.ViewModel.csproj Целия файл

@@ -6,4 +6,8 @@
<UseWPF>true</UseWPF>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" />
</ItemGroup>

</Project>

+ 0
- 8
BPASmartClient.ViewModel/Class1.cs Целия файл

@@ -1,8 +0,0 @@
using System;

namespace BPASmartClient.ViewModel
{
public class Class1
{
}
}

+ 18
- 0
BPASmartClient.ViewModel/OrderListDialogViewModel.cs Целия файл

@@ -0,0 +1,18 @@
using System;
using Microsoft.Toolkit.Mvvm.ComponentModel;

namespace BPASmartClient.ViewModel
{
public class OrderListDialogViewModel : ObservableObject
{
public OrderListDialogViewModel()
{

}





}
}

+ 1
- 0
BPASmartClient/BPASmartClient.csproj Целия файл

@@ -22,6 +22,7 @@
<ProjectReference Include="..\BPASmartClient.MorkS\BPASmartClient.MorkS.csproj" />
<ProjectReference Include="..\BPASmartClient.MorkT\BPASmartClient.MorkT.csproj" />
<ProjectReference Include="..\BPASmartClient.SCChip\BPASmartClient.SCChip.csproj" />
<ProjectReference Include="..\BPASmartClient.ViewModel\BPASmartClient.ViewModel.csproj" />
</ItemGroup>

<ItemGroup>


+ 304
- 0
BPASmartClient/OrderListDialogView.xaml Целия файл

@@ -0,0 +1,304 @@
<Window
x:Class="BPASmartClient.OrderListDialogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:BPASmartClient.ViewModel;assembly=BPASmartClient.ViewModel"
Title="OrderListDialogView"
Width="800"
Height="450"
AllowsTransparency="True"
Background="{x:Null}"
MouseMove="Window_MouseMove"
Opacity="0.8"
Topmost="True"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">


<Window.DataContext>
<vm:OrderListDialogViewModel/>
</Window.DataContext>

<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/BPASmartClient.CustomResource;component/RecDictionarys/RecCheckBox.xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>

<SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
<SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
<SolidColorBrush x:Key="TitleFontColor" Color="#ddd" />
<SolidColorBrush x:Key="CursorColor" Color="Aqua" />
<SolidColorBrush x:Key="TitleBorderColor" Color="#552AB2E7" />
<SolidColorBrush x:Key="TextBlockForeground" Color="#9934F7F7" />

<Style x:Key="buttonStyle" TargetType="Button">
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="Width" Value="100" />
<Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="Aqua" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="gr">
<ContentControl
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{TemplateBinding Content}"
Foreground="{TemplateBinding Foreground}" />
<Polygon
x:Name="poly"
Points="0 0,80 0,100 30,20 30"
Stroke="#FF34F7F7"
StrokeThickness="2" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="poly" Property="Fill" Value="#2234F7F7" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="TextBlockStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="楷体" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Background" Value="Transparent" />
<!--<Setter Property="Foreground" Value="{StaticResource FontColor}" />-->
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>

</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>

<Grid Background="#103153">
<Grid.RowDefinitions>
<RowDefinition Height="35" />
<RowDefinition />
<RowDefinition Height="50" />
</Grid.RowDefinitions>

<!--#region 标题栏设置-->
<Border
x:Name="MoveBorder"
Height="35"
VerticalAlignment="Top"
Background="#0C2349"
BorderBrush="#55ffffff"
BorderThickness="0,0,0,1">
<StackPanel Orientation="Horizontal">
<Image Margin="15,5,0,5" Source="pack://application:,,,/BPASmartClient.CustomResource;component/Image/HBL.png" />
<TextBlock
Name="tbTitle"
Margin="10,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="订单数据" />
</StackPanel>
</Border>

<UniformGrid
Width="150"
Height="30"
HorizontalAlignment="Right"
Columns="3">
<Button
Name="ButMin"
Content="&#xe664;"
Style="{StaticResource TitleBarStyle}"
Visibility="Hidden" />
<Button
Name="ButMax"
Content="&#xe65d;"
Style="{StaticResource TitleBarStyle}"
Visibility="Hidden" />
<Button
Name="ButClose"
Command="{Binding CloseCommand}"
Content="&#xe602;"
FontSize="30"
Style="{StaticResource TitleBarStyle}" />
</UniformGrid>
<!--#endregion-->

<!--#region 表单数据-->
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition />
</Grid.RowDefinitions>

<!--#region 表格标题栏设置-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.1*" />
<ColumnDefinition Width="0.3*" />
<ColumnDefinition />
<ColumnDefinition Width="0.7*" />
</Grid.ColumnDefinitions>

<CheckBox
Height="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="#FF2AB2E7"
Content=""
FontSize="14"
Foreground="#ddd"
IsChecked="{Binding AllSelected}"
Template="{StaticResource CbTemplate}" />

<Border
Grid.Column="1"
Grid.ColumnSpan="3"
Background="#882AB2E7" />

<Grid Grid.Column="1">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="取餐号" />
<Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
</Grid>

<TextBlock
Grid.Column="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="商品名称" />

<Grid Grid.Column="3">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="{StaticResource TitleFontColor}"
Text="订单状态" />
<Border BorderBrush="{StaticResource TitleBorderColor}" BorderThickness="1,0,1,0" />
</Grid>

<Border
Grid.ColumnSpan="8"
BorderBrush="{StaticResource BorderSolid}"
BorderThickness="1,0,1,1" />


</Grid>
<!--#endregion-->

<!--#region 表格数据显示-->
<ScrollViewer
Grid.Row="1"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">
<ItemsControl ItemsSource="{Binding orderStatusLists}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.1*" />
<ColumnDefinition Width="0.3*" />
<ColumnDefinition />
<ColumnDefinition Width="0.7*" />
</Grid.ColumnDefinitions>

<CheckBox
Height="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="#FF2AB2E7"
Content=""
FontSize="14"
Foreground="#ddd"
IsChecked="{Binding IsSelected}"
Template="{StaticResource CbTemplate}" />

<Grid Grid.Column="1">
<TextBlock
Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}"
Style="{StaticResource TextBlockStyle}"
Text="{Binding OrderPush.SortNum}" />
<Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
</Grid>

<TextBlock
Grid.Column="2"
Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}"
Style="{StaticResource TextBlockStyle}"
Text="{Binding OrderPush.GoodsName}" />

<Grid Grid.Column="3">
<TextBlock
Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}"
Style="{StaticResource TextBlockStyle}"
Text="{Binding OrderStatus, Converter={StaticResource TextConverter}}" />
<Border BorderBrush="{StaticResource BorderSolid}" BorderThickness="1,0,1,0" />
</Grid>

<Border
Grid.ColumnSpan="8"
BorderBrush="{StaticResource BorderSolid}"
BorderThickness="1,0,1,1" />

</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<!--#endregion-->

</Grid>
<!--#endregion-->

<!--#region 信息取-->
<Grid Grid.Row="2">

<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="0.2*" />
<ColumnDefinition Width="0.2*" />
</Grid.ColumnDefinitions>

<TextBlock
Margin="10,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="楷体"
FontSize="20"
Foreground="Yellow"
Text="请选择需要继续制作的订单,取消或关闭将删除所有订单。" />

<Button
Grid.Column="1"
VerticalAlignment="Center"
Command="{Binding CancelCommand}"
Content="取消"
Style="{StaticResource buttonStyle}" />

<Button
Grid.Column="2"
VerticalAlignment="Center"
Command="{Binding ConfirmCommand}"
Content="确认"
Style="{StaticResource buttonStyle}" />
</Grid>
<!--#endregion-->

</Grid>


</Window>

+ 27
- 0
BPASmartClient/OrderListDialogView.xaml.cs Целия файл

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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.Shapes;

namespace BPASmartClient
{
/// <summary>
/// OrderListDialogView.xaml 的交互逻辑
/// </summary>
public partial class OrderListDialogView : Window
{
public OrderListDialogView()
{
InitializeComponent();
}
}
}

Зареждане…
Отказ
Запис