9 changed files with 231 additions and 81 deletions
@ -0,0 +1,45 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.Text; |
|||
|
|||
namespace BBWY.Client.Models.PackTask |
|||
{ |
|||
public class StoreGetSelfResponse:NotifyObject |
|||
{ /// <summary>
|
|||
/// 团队用户列表(取件人)
|
|||
/// </summary>
|
|||
private ObservableCollection<DepartmentUser> departmentUsers; |
|||
|
|||
/// <summary>
|
|||
/// 团队用户列表(取件人)
|
|||
/// </summary>
|
|||
public ObservableCollection<DepartmentUser> DepartmentUsers { get=> departmentUsers; set { Set(ref departmentUsers, value); } } |
|||
|
|||
/// <summary>
|
|||
/// 可取的最大数
|
|||
/// </summary>
|
|||
public int PickMaxCount { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 提示消息
|
|||
/// </summary>
|
|||
public string ShowMessage { get; set; } |
|||
} |
|||
public class DepartmentUser:NotifyObject |
|||
{ |
|||
/// <summary>
|
|||
/// 用户id
|
|||
/// </summary>
|
|||
public string UserId { get; set; } |
|||
|
|||
|
|||
|
|||
|
|||
private string userName; |
|||
/// <summary>
|
|||
/// 名称
|
|||
/// </summary>
|
|||
public string UserName { get => userName; set { Set(ref userName, value); } } //
|
|||
} |
|||
} |
@ -0,0 +1,83 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.StorePickSelf.StorePickProductWindow" |
|||
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 Border.Background}"> |
|||
<TextBlock Text="添加落仓" HorizontalAlignment="Center" 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,54 @@ |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models.PackTask; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
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 BBWY.Client.Views.StorePickSelf |
|||
{ |
|||
/// <summary>
|
|||
/// StorePickProductWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class StorePickProductWindow : BWindow |
|||
{ |
|||
public StorePickProductWindow(StoreGetSelfResponse model) |
|||
{ |
|||
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) |
|||
{ |
|||
this.DialogResult = true; |
|||
|
|||
} |
|||
|
|||
private void BButton_Click_1(object sender, RoutedEventArgs e) |
|||
{ |
|||
Count = StoreGetSelfResponse.PickMaxCount; |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue