7 changed files with 340 additions and 16 deletions
@ -0,0 +1,83 @@ |
|||||
|
<c:BWindow x:Class="BBWY.Client.Views.StorePickSelf.QualityStorePickProductWindow" |
||||
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||
|
xmlns:local="clr-namespace:BBWY.Client.Views.StorePickSelf" |
||||
|
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
||||
|
WindowStartupLocation="CenterScreen" |
||||
|
CloseButtonVisibility="Visible" |
||||
|
xmlns:hc="https://handyorg.github.io/handycontrol" |
||||
|
CloseButtonColor="{StaticResource WindowButtonColor}" |
||||
|
MinButtonVisibility="Collapsed" |
||||
|
MaxButtonVisibility="Collapsed" |
||||
|
Width="384" Height="300" ResizeMode="NoResize" |
||||
|
RightButtonGroupMargin="0,5,5,0"> |
||||
|
<!--CloseButtonColor="{StaticResource WindowButtonColor}" --> |
||||
|
<Grid> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="39"/> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition Height="36"/> |
||||
|
|
||||
|
</Grid.RowDefinitions> |
||||
|
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
||||
|
Background="{StaticResource Button.Background}"> |
||||
|
<TextBlock Text="商家自取" HorizontalAlignment="Left" Foreground="White" Margin="20 0 0 0" VerticalAlignment="Center"/> |
||||
|
</Border> |
||||
|
<Grid Grid.Row="1" Margin="50 20 50 20"> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<StackPanel Grid.Row="0" Orientation="Horizontal"> |
||||
|
<TextBlock Style="{StaticResource middleTextBlock}" Text="剩余数量:"/> |
||||
|
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding StoreGetSelfResponse.PickMaxCount}"/> |
||||
|
</StackPanel> |
||||
|
<Grid Grid.Row="1" Height="30"> |
||||
|
<Rectangle Width="260" HorizontalAlignment="Left" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
||||
|
<StackPanel Orientation="Horizontal" Height="30" > |
||||
|
<Label HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="60" Content="取件人:"/> |
||||
|
<Grid Grid.Column="1" Grid.ColumnSpan="3"> |
||||
|
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
||||
|
<ComboBox Height="30" Width="200" ItemsSource="{Binding StoreGetSelfResponse.DepartmentUsers}" DisplayMemberPath="UserName" Text="{Binding UserName}" BorderThickness="0" Margin="1" > |
||||
|
<ComboBox.Resources> |
||||
|
<ResourceDictionary> |
||||
|
<ResourceDictionary.MergedDictionaries > |
||||
|
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/> |
||||
|
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/> |
||||
|
</ResourceDictionary.MergedDictionaries> |
||||
|
</ResourceDictionary> |
||||
|
</ComboBox.Resources> |
||||
|
</ComboBox> |
||||
|
|
||||
|
</Grid> |
||||
|
|
||||
|
</StackPanel> |
||||
|
</Grid> |
||||
|
|
||||
|
|
||||
|
<Grid Grid.Row="2" Height="30"> |
||||
|
<Rectangle Width="260" HorizontalAlignment="Left" Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
||||
|
<StackPanel Orientation="Horizontal" Height="30" > |
||||
|
<Label HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="60" Content="自取数量:"/> |
||||
|
<StackPanel Orientation="Horizontal"> |
||||
|
<c:BTextBox Height="30" Width="150" Text="{Binding Count}" BorderThickness="1"/> |
||||
|
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" BorderThickness="0" Height="30" Width="50" Foreground="{StaticResource Border.Brush}" Click="BButton_Click_1"/> |
||||
|
|
||||
|
</StackPanel> |
||||
|
|
||||
|
</StackPanel> |
||||
|
</Grid> |
||||
|
|
||||
|
<TextBlock VerticalAlignment="Center" Grid.Row="3" Text="{Binding StoreGetSelfResponse.ShowMessage}" Foreground="Orange"/> |
||||
|
</Grid> |
||||
|
|
||||
|
<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Row="2" VerticalAlignment="Top"/> |
||||
|
<c:BButton Grid.Row="2" Content="确定" HorizontalAlignment="Right" Width="105" VerticalAlignment="Center" Height="40" Click="BButton_Click" |
||||
|
/> |
||||
|
|
||||
|
</Grid> |
||||
|
</c:BWindow> |
@ -0,0 +1,56 @@ |
|||||
|
using BBWY.Client.Models.PackTask; |
||||
|
using BBWY.Controls; |
||||
|
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.Shapes; |
||||
|
|
||||
|
namespace BBWY.Client.Views.StorePickSelf |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// QualityStorePickProductWindow.xaml 的交互逻辑
|
||||
|
/// </summary>
|
||||
|
public partial class QualityStorePickProductWindow : BWindow |
||||
|
{ |
||||
|
public QualityStorePickProductWindow(StoreGetSelfResponse model, Func<int, string, bool> SaveData) |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
StoreGetSelfResponse = model; |
||||
|
InitializeComponent(); |
||||
|
this.DataContext = this; |
||||
|
} |
||||
|
private string userName; |
||||
|
/// <summary>
|
||||
|
/// 用户名
|
||||
|
/// </summary>
|
||||
|
public string UserName { get => userName; set { Set(ref userName, value); } } |
||||
|
|
||||
|
private int count; |
||||
|
|
||||
|
public int Count { get => count; set { Set(ref count, value); } } |
||||
|
|
||||
|
private StoreGetSelfResponse storeGetSelfResponse; |
||||
|
|
||||
|
public StoreGetSelfResponse StoreGetSelfResponse { get => storeGetSelfResponse; set { Set(ref storeGetSelfResponse, value); } } |
||||
|
private void BButton_Click(object sender, RoutedEventArgs e) |
||||
|
{ |
||||
|
if (SaveData != null && SaveData.Invoke(Count, UserName)) |
||||
|
{ |
||||
|
this.Close(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
private Func<int, string, bool> SaveData { get; set; } |
||||
|
private void BButton_Click_1(object sender, RoutedEventArgs e) |
||||
|
{ |
||||
|
Count = StoreGetSelfResponse.PickMaxCount; |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue