shanji 3 years ago
parent
commit
1d871c6990
  1. 13
      BBWY.Client/ViewModels/Order/OrderListViewModel_SDGroup.cs
  2. 11
      BBWY.Client/Views/Order/SDGroup.xaml

13
BBWY.Client/ViewModels/Order/OrderListViewModel_SDGroup.cs

@ -1,5 +1,7 @@
using BBWY.Client.Models;
using BBWY.Client.Views.SelectShop;
using GalaSoft.MvvmLight.Command;
using System;
using System.Windows.Input;
namespace BBWY.Client.ViewModels
@ -9,9 +11,10 @@ namespace BBWY.Client.ViewModels
private int sdGroupButtonIndex;
private Shop sdGroupSelectedShop;
public int SDGroupButtonIndex { get => sdGroupButtonIndex; set { Set(ref sdGroupButtonIndex, value); }}
public int SDGroupButtonIndex { get => sdGroupButtonIndex; set { Set(ref sdGroupButtonIndex, value); } }
public ICommand SetSDButtinIndexCommand { get; set; }
public ICommand SDGroupSelectedShopChangedCommand { get; set; }
public Shop SdGroupSelectedShop { get => sdGroupSelectedShop; set { Set(ref sdGroupSelectedShop, value); } }
@ -19,11 +22,19 @@ namespace BBWY.Client.ViewModels
private void SDGroupInit()
{
SetSDButtinIndexCommand = new RelayCommand<int>(SetSDButtinIndex);
SDGroupSelectedShopChangedCommand = new RelayCommand<OnShopChangedEventArgs>(SDGroupSelectedShopChanged);
}
private void SetSDButtinIndex(int index)
{
SDGroupButtonIndex = index;
}
private void SDGroupSelectedShopChanged(OnShopChangedEventArgs args)
{
this.SdGroupSelectedShop = args.SelectedShop;
}
}
}

11
BBWY.Client/Views/Order/SDGroup.xaml

@ -8,6 +8,7 @@
xmlns:selectShop="clr-namespace:BBWY.Client.Views.SelectShop"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="SDGroup"
@ -48,10 +49,16 @@
Visibility="{Binding SDGroupButtonIndex,ConverterParameter=0:Visible:Collapsed,Converter={StaticResource objConverter}}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="店铺:" VerticalAlignment="Center" Margin="5,0,0,0"/>
<selectShop:SelectShopDialog DepartmentList="{Binding globalContext.User.DepartmentList}" Height="30"/>
<selectShop:SelectShopDialog DepartmentList="{Binding globalContext.User.DepartmentList}" Height="30">
<b:Interaction.Triggers>
<b:EventTrigger EventName="OnShopChanged">
<b:InvokeCommandAction Command="{Binding SDGroupSelectedShopChangedCommand}" PassEventArgsToCommand="True"/>
</b:EventTrigger>
</b:Interaction.Triggers>
</selectShop:SelectShopDialog>
<TextBlock Text="订单号:" VerticalAlignment="Center" Margin="5,0,0,0"/>
<c:BTextBox Width="150" Height="30" Margin="5,0,0,0" Text="{Binding SearchOrderId}" WaterRemark="精确匹配"/>
<c:BButton Content="拉取" Height="30" Margin="5,0,0,0" Width="60"/>
<c:BButton Content="拉取" Height="30" Margin="5,0,0,0" Width="60" Command="{Binding SDGroupPullCommand}"/>
</StackPanel>
</Grid>

Loading…
Cancel
Save