38 changed files with 2221 additions and 245 deletions
@ -0,0 +1,49 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SealBox.AddWareListWindow" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
Width="384" Height="510" |
|||
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"> |
|||
<ListBox Name="list_ware" Margin="50 20" |
|||
ItemsSource="{Binding WareList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,1" |
|||
Foreground="{StaticResource Text.Color}" |
|||
> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=list_ware,Converter={StaticResource widthConverter},ConverterParameter=-0}" Height="35"> |
|||
<CheckBox Content="{Binding WareName}" IsEnabled="{Binding IsEdit}" IsChecked="{Binding IsSelect}" FontSize="14" Margin="5 0 0 0"/> |
|||
<Border Height="1" Background="{StaticResource Border.Brush}" VerticalAlignment="Bottom"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
|
|||
</ListBox> |
|||
|
|||
</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,163 @@ |
|||
using AutoMapper.Internal; |
|||
using BBWY.Client.APIServices; |
|||
using BBWY.Client.Models; |
|||
using BBWY.Client.Models.SealBox; |
|||
using BBWY.Controls; |
|||
using Org.BouncyCastle.Utilities.Collections; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
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.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// AddWareListWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class AddWareListWindow : BWindow |
|||
{ |
|||
public AddWareListWindow(WareType WareType, LogisticsService logisticsService, List<SealBoxConfigureModel> SealBoxConfigureModelList) |
|||
{ |
|||
this.WareType = WareType; |
|||
InitializeComponent(); |
|||
LoadWare(logisticsService, SealBoxConfigureModelList); |
|||
this.DataContext = this; |
|||
} |
|||
|
|||
private WareType wareType; |
|||
public WareType WareType { get => wareType; set { Set(ref wareType, value); } } |
|||
|
|||
|
|||
|
|||
public void LoadWare(LogisticsService logisticsService, List<SealBoxConfigureModel> SealBoxConfigureModelList) |
|||
{ |
|||
if (WareType != WareType.聚水潭) |
|||
{ |
|||
var response = logisticsService.GetStoreList();//京仓库类型 商家仓 = 1, 京仓 = 2, 云仓 = 3
|
|||
if (response == null || !response.Success) |
|||
{ |
|||
MessageBox.Show($"加载仓库列表失败,{response?.Msg}"); |
|||
return; |
|||
} |
|||
|
|||
var data = response.Data.Where(w => w.Status == StockStatus.使用); |
|||
var stockType = StockType.云仓; |
|||
switch (WareType) |
|||
{ |
|||
case WareType.京仓: |
|||
stockType = StockType.京仓; |
|||
break; |
|||
case WareType.云仓: |
|||
stockType = StockType.云仓; |
|||
|
|||
break; |
|||
case WareType.商家仓: |
|||
stockType = StockType.商家仓; |
|||
break; |
|||
//case WareType.聚水潭:
|
|||
// WareList = new List<StoreWare> { new StoreWare { WareId = "qiyuejushuitan", WareName = "齐越聚水潭", IsSelect = false } };
|
|||
// break;
|
|||
//default:
|
|||
// break;
|
|||
} |
|||
WareList = new List<StoreWare>(); |
|||
data.Where(d => d.Type == stockType).ForAll(d => |
|||
{ |
|||
if (SealBoxConfigureModelList.Where(s => s.WareType == WareType &&s.WareHourseDatas!=null).SelectMany(s => s.WareHourseDatas).Any(w => w.WareId == d.Id))//存在
|
|||
{ |
|||
bool isedit = true; |
|||
if (SealBoxConfigureModelList.Where(s => s.WareType == WareType && s.WareHourseDatas != null).SelectMany(s => s.WareHourseDatas).Any(s=>s.WareState>0&& s.WareId == d.Id)) |
|||
isedit =false; |
|||
WareList.Add(new StoreWare |
|||
{ |
|||
IsSelect = true, |
|||
WareId = d.Id, |
|||
WareName = d.Name, |
|||
IsEdit= isedit |
|||
}); |
|||
} |
|||
else |
|||
{ |
|||
WareList.Add(new StoreWare |
|||
{ |
|||
IsSelect = false, |
|||
WareId = d.Id, |
|||
WareName = d.Name, |
|||
IsEdit = true |
|||
}); |
|||
} |
|||
|
|||
|
|||
}); |
|||
|
|||
} |
|||
else |
|||
{ |
|||
bool isJST = false; |
|||
if (SealBoxConfigureModelList.Where(s => s.WareType == WareType).SelectMany(s => s.WareHourseDatas).Any(w => w.WareId == "qiyuejushuitan"))//存在
|
|||
isJST = true; |
|||
WareList = new List<StoreWare> { new StoreWare { WareId = "qiyuejushuitan", WareName = "齐越聚水潭", IsSelect = isJST } }; |
|||
} |
|||
|
|||
} |
|||
private List<StoreWare> wareList; |
|||
public List<StoreWare> WareList { get => wareList; set { Set(ref wareList, value); } } |
|||
|
|||
|
|||
public Action<WareType, List<StoreWare>> AddWareList { get; set; } |
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
var selectWare = WareList.Where(w => w.IsSelect).ToList(); |
|||
if (AddWareList != null) AddWareList(WareType, selectWare); |
|||
this.Close(); |
|||
} |
|||
private PositionType ToPositionType(WareType wareType) |
|||
{ |
|||
switch (wareType) |
|||
{ |
|||
case WareType.京仓: |
|||
return PositionType.京仓; |
|||
break; |
|||
case WareType.云仓: |
|||
return PositionType.云仓; |
|||
break; |
|||
case WareType.商家仓: |
|||
return PositionType.商家仓; |
|||
break; |
|||
case WareType.聚水潭: |
|||
return PositionType.聚水潭; |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
return PositionType.聚水潭; |
|||
} |
|||
} |
|||
|
|||
public class StoreWare : NotifyObject |
|||
{ |
|||
private bool isSelect; |
|||
public bool IsSelect { get => isSelect; set { Set(ref isSelect, value); } } |
|||
|
|||
private string wareName; |
|||
public string WareName { get => wareName; set { Set(ref wareName, value); } } |
|||
|
|||
private string wareId; |
|||
public string WareId { get => wareId; set { Set(ref wareId, value); } } |
|||
|
|||
|
|||
private bool isEdit=true; |
|||
public bool IsEdit { get => isEdit; set { Set(ref isEdit, value); } } |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
<UserControl x:Class="BBWY.Client.Views.SealBox.SetSealBoxPolicyWareListControl" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:local="clr-namespace:BBWY.Client.Views.SealBox" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="450" d:DesignWidth="800"> |
|||
<Grid> |
|||
|
|||
</Grid> |
|||
</UserControl> |
@ -0,0 +1,26 @@ |
|||
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.Navigation; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace BBWY.Client.Views.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// SetSealBoxPolicyWareListControl.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetSealBoxPolicyWareListControl : UserControl |
|||
{ |
|||
public SetSealBoxPolicyWareListControl() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,777 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SealBox.SetSealBoxPolicyWindow" |
|||
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:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|||
mc:Ignorable="d" |
|||
DataContext="{Binding SealBoxConfigureVModel,Source={StaticResource Locator}}" |
|||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|||
Height="800" Width="1000" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
Style="{StaticResource bwstyle}" |
|||
|
|||
> |
|||
<c:BWindow.Resources> |
|||
<Style TargetType="RadioButton"> |
|||
|
|||
<Setter Property="IsChecked" Value="False" /> |
|||
<Setter Property="Background" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="Black" /> |
|||
<Setter Property="Template"> |
|||
<Setter.Value> |
|||
<ControlTemplate TargetType="RadioButton"> |
|||
<Grid Background="#F2F2F2" > |
|||
<Rectangle x:Name="_Rect" Fill="White" HorizontalAlignment="Center" Height="35" Stroke="{StaticResource Border.Brush}" VerticalAlignment="Center" Width="{TemplateBinding Width}" RenderTransformOrigin="0.5,0.5"> |
|||
<Rectangle.RenderTransform> |
|||
<TransformGroup> |
|||
<ScaleTransform ScaleY="-1"/> |
|||
<SkewTransform/> |
|||
<RotateTransform/> |
|||
<TranslateTransform/> |
|||
</TransformGroup> |
|||
</Rectangle.RenderTransform> |
|||
</Rectangle> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Height="35"> |
|||
<TextBlock VerticalAlignment="Center" Text="{TemplateBinding Content}" /> |
|||
<TextBlock VerticalAlignment="Center" Text="{TemplateBinding Tag}" Foreground="{StaticResource Text.Pink}" Margin="5 0 0 0" /> |
|||
</StackPanel> |
|||
</Grid> |
|||
<ControlTemplate.Triggers> |
|||
<Trigger Property="IsChecked" Value="true"> |
|||
<Setter TargetName="_Rect" Property="Fill" Value="#8080FF" /> |
|||
<Setter Property="Foreground" Value="white"/> |
|||
</Trigger> |
|||
</ControlTemplate.Triggers> |
|||
</ControlTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
</c:BWindow.Resources> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="40"/> |
|||
<RowDefinition Height="60"/> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition/> |
|||
<RowDefinition Height="40"/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="配置封箱策略" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
|
|||
<StackPanel Orientation="Horizontal" Height="35" Grid.Row="1" > |
|||
<RadioButton Content="京仓" Width="116" Margin="20 0 0 0" IsChecked="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=京仓:True:false}" Command="{Binding SelectWareTypeCommand}"/> |
|||
<RadioButton Content="云仓" Width="116" Margin="-1 0 0 0" IsChecked="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=云仓:True:false}" Command="{Binding SelectWareTypeCommand}"/> |
|||
<RadioButton Content="聚水潭" Width="116" Margin="-1 0 0 0" IsChecked="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=聚水潭:True:false}" Command="{Binding SelectWareTypeCommand}"/> |
|||
<RadioButton Content="商家仓" Width="116" Margin="-1 0 0 0" IsChecked="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=商家仓:True:false}" Command="{Binding SelectWareTypeCommand}"/> |
|||
</StackPanel> |
|||
|
|||
<StackPanel Orientation="Horizontal" Grid.Row="2" Height="30"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="SKU:" Margin="20 00 0 0"/> |
|||
<c:BTextBox Width="170" Margin="5 0 5 0" Text="{Binding SearchSkuId}"/> |
|||
<c:BButton Width="66" Content="搜索" Command="{Binding SearchSkuCommand}" |
|||
|
|||
/> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
<Grid Grid.Row="3" Margin="20 10 20 0" > |
|||
|
|||
<ListBox Name="jd_list" ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" ScrollViewer.HorizontalScrollBarVisibility="Auto"> |
|||
<Grid Visibility="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=京仓:Visible:Collapsed}" |
|||
Width="{Binding Width,ElementName=jd_list,Converter={StaticResource widthConverter},ConverterParameter=-0}" |
|||
|
|||
> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1"> |
|||
<Grid > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<Border Width="1" Grid.Column="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
|
|||
<Border Width="1" Grid.Column="3" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="商品信息"/> |
|||
<TextBlock Grid.Column="1" Style="{StaticResource middleTextBlock}" Text="待分配量"/> |
|||
<Grid Grid.Column="2"> |
|||
|
|||
</Grid> |
|||
<ListBox Grid.Column="2" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
ItemsSource="{Binding JdWareHourseHeaderList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" ScrollViewer.HorizontalScrollBarVisibility="Visible" |
|||
Visibility="{Binding JdWareHourseHeaderList.Count,Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="180" Height="32"> |
|||
<TextBlock Text="{Binding WareName,Mode=TwoWay}" Style="{StaticResource middleTextBlock}"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<TextBlock Grid.Column="3" Style="{StaticResource middleTextBlock}" Text="操作"/> |
|||
</Grid> |
|||
|
|||
</Border> |
|||
<ListBox Grid.Column="2" Grid.Row="1" Name="list_sealbox_jddata" |
|||
ItemsSource="{Binding JdConfigureModelList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate > |
|||
<Grid Width="{Binding Width,ElementName=list_sealbox_jddata,Converter={StaticResource widthConverter},ConverterParameter=-0}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal" Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="任务ID:" Margin="10 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskId}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<TextBlock Text="任务状态:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskState}" Style="{StaticResource middleTextBlock}" |
|||
Foreground="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Red:Black}" |
|||
/> |
|||
|
|||
<TextBlock Text="包装数量:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding SkuCount}" Style="{StaticResource middleTextBlock}"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid MinHeight="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage DecodePixelWidth="48" Margin="10 0 0 0" |
|||
Cursor="Hand" UrlSource="{Binding Logo}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
|
|||
<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
/> |
|||
</StackPanel> |
|||
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0"> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
|
|||
</TextBlock> |
|||
</StackPanel> |
|||
</Grid> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitConfigureCount}" Grid.Column="1"/> |
|||
|
|||
<ListBox Grid.Column="2" Name="list_ware_data" VerticalAlignment="Center" |
|||
ItemsSource="{Binding WareHourseDatas}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="180" Height="68"> |
|||
<TextBox Text="{Binding Count,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="0" Width="180" Height="68" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"> |
|||
|
|||
</TextBox> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<StackPanel Grid.Column="3" Orientation="Vertical" VerticalAlignment="Center"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="添加仓库" Command="{Binding DataContext.AddWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="分配至其他仓" Margin="0 5 0 0" CommandParameter="{Binding}" Command="{Binding DataContext.SpliteOtherWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
</StackPanel> |
|||
|
|||
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="5" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" /> |
|||
</Grid> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
</Grid> |
|||
</ListBox> |
|||
|
|||
|
|||
|
|||
<Grid |
|||
Visibility="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=云仓:Visible:Collapsed}" |
|||
> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1"> |
|||
<Grid > |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<Border Width="1" Grid.Column="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
|
|||
|
|||
|
|||
<Border Width="1" Grid.Column="3" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="商品信息"/> |
|||
<TextBlock Grid.Column="1" Style="{StaticResource middleTextBlock}" Text="待分配量"/> |
|||
<ListBox Grid.Column="2" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
ItemsSource="{Binding CloudWareHourseHeaderList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding CloudWareHourseHeaderList.Count,Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
|
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="200" Height="32"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="60"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="{Binding WareName}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<c:BButton Style="{StaticResource LinkButton}" Content="批量MAX" |
|||
CommandParameter="{Binding WareId}" Command="{Binding DataContext.BatchSetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Left"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<TextBlock Grid.Column="3" Style="{StaticResource middleTextBlock}" Text="操作"/> |
|||
</Grid> |
|||
|
|||
</Border> |
|||
<ListBox Grid.Column="2" Grid.Row="1" Name="list_sealbox_data_cloud" |
|||
ItemsSource="{Binding CloudConfigureModelList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=list_sealbox_data_cloud,Converter={StaticResource widthConverter},ConverterParameter=-0}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal" Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="任务ID:" Margin="10 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskId}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<TextBlock Text="任务状态:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskState}" Style="{StaticResource middleTextBlock}" |
|||
Foreground="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Red:Black}" |
|||
/> |
|||
|
|||
<TextBlock Text="包装数量:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding SkuCount}" Style="{StaticResource middleTextBlock}"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid MinHeight="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage DecodePixelWidth="48" Margin="10 0 0 0" |
|||
Cursor="Hand" UrlSource="{Binding Logo}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
|
|||
<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
/> |
|||
</StackPanel> |
|||
|
|||
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0"> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
|
|||
</TextBlock> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</Grid> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitConfigureCount}" Grid.Column="1"/> |
|||
|
|||
<ListBox Grid.Column="2" Name="list_ware_data" VerticalAlignment="Center" |
|||
ItemsSource="{Binding WareHourseDatas}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="200" Height="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="50"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBox Text="{Binding Count,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="0" Width="155" Height="68" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" Grid.Column="1"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" FontSize="14" Foreground="Gray" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
CommandParameter="{Binding}" Command="{Binding DataContext.SetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Center"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<StackPanel Grid.Column="3" Orientation="Vertical" VerticalAlignment="Center"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="添加仓库" Command="{Binding DataContext.AddWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="分配至其他仓" Margin="0 5 0 0" CommandParameter="{Binding}" Command="{Binding DataContext.SpliteOtherWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
</StackPanel> |
|||
|
|||
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="5" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" /> |
|||
</Grid> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
<Grid |
|||
Visibility="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=聚水潭:Visible:Collapsed}" |
|||
ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1"> |
|||
<Grid > |
|||
|
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<Border Width="1" Grid.Column="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
|
|||
<Border Width="1" Grid.Column="3" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="商品信息"/> |
|||
<TextBlock Grid.Column="1" Style="{StaticResource middleTextBlock}" Text="待分配量"/> |
|||
<ListBox Grid.Column="2" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
ItemsSource="{Binding JstWareHourseHeaderList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding JstWareHourseHeaderList.Count,Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="155" Height="32"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="60"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="{Binding WareName}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<c:BButton Style="{StaticResource LinkButton}" Content="批量MAX" |
|||
CommandParameter="{Binding WareId}" Command="{Binding DataContext.BatchSetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Left"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<TextBlock Grid.Column="3" Style="{StaticResource middleTextBlock}" Text="操作"/> |
|||
</Grid> |
|||
|
|||
</Border> |
|||
<ListBox Grid.Column="2" Grid.Row="1" Name="list_sealbox_data_jst" |
|||
ItemsSource="{Binding JstConfigureModelList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemTemplate > |
|||
<DataTemplate > |
|||
<Grid Width="{Binding ActualWidth,ElementName=list_sealbox_data_jst,Converter={StaticResource widthConverter},ConverterParameter=-0}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal" Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="任务ID:" Margin="10 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskId}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<TextBlock Text="任务状态:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskState}" Style="{StaticResource middleTextBlock}" |
|||
Foreground="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Red:Black}" |
|||
/> |
|||
|
|||
<TextBlock Text="包装数量:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding SkuCount}" Style="{StaticResource middleTextBlock}"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid MinHeight="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage DecodePixelWidth="48" Margin="10 0 0 0" |
|||
Cursor="Hand" UrlSource="{Binding Logo}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
|
|||
<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
/> |
|||
</StackPanel> |
|||
|
|||
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0"> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
|
|||
</TextBlock> |
|||
</StackPanel> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</Grid> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitConfigureCount}" Grid.Column="1"/> |
|||
|
|||
<ListBox Grid.Column="2" VerticalAlignment="Center" |
|||
ItemsSource="{Binding WareHourseDatas}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="155" Height="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="50"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBox Text="{Binding Count,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="0" Width="155" Height="68" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" Grid.Column="1"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" FontSize="14" Foreground="Gray" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
CommandParameter="{Binding}" Command="{Binding DataContext.SetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Center"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<StackPanel Grid.Column="3" Orientation="Vertical" VerticalAlignment="Center"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="添加仓库" Command="{Binding DataContext.AddWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="分配至其他仓" Margin="0 5 0 0" CommandParameter="{Binding}" Command="{Binding DataContext.SpliteOtherWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
</StackPanel> |
|||
|
|||
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="5" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" /> |
|||
</Grid> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
</Grid> |
|||
|
|||
|
|||
<Grid |
|||
Visibility="{Binding SelectWareType,Converter={StaticResource objConverter}, ConverterParameter=商家仓:Visible:Collapsed}" |
|||
ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1"> |
|||
<Grid > |
|||
|
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<Border Width="1" Grid.Column="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
|
|||
<Border Width="1" Grid.Column="3" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" /> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="商品信息"/> |
|||
<TextBlock Grid.Column="1" Style="{StaticResource middleTextBlock}" Text="待分配量"/> |
|||
<ListBox Grid.Column="2" ScrollViewer.VerticalScrollBarVisibility="Hidden" |
|||
ItemsSource="{Binding StoreWareHourseHeaderList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding StoreWareHourseHeaderList.Count,Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="155" Height="32"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="60"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="{Binding WareName}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<c:BButton Style="{StaticResource LinkButton}" Content="批量MAX" |
|||
CommandParameter="{Binding WareId}" Command="{Binding DataContext.BatchSetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Left"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
|
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<TextBlock Grid.Column="3" Style="{StaticResource middleTextBlock}" Text="操作"/> |
|||
</Grid> |
|||
|
|||
</Border> |
|||
<ListBox Name="list_sealbox_data_store" |
|||
Grid.Row="1" |
|||
ItemsSource="{Binding StoreConfigureModelList}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="1,1,1,0" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
|
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="{Binding ActualWidth,ElementName=list_sealbox_data_store,Converter={StaticResource widthConverter},ConverterParameter=-0}"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="32"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Orientation="Horizontal" Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="任务ID:" Margin="10 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskId}" Style="{StaticResource middleTextBlock}"/> |
|||
|
|||
<TextBlock Text="任务状态:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding TaskState}" Style="{StaticResource middleTextBlock}" |
|||
Foreground="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待验收|待排单|待包装:Red:Black}" |
|||
/> |
|||
<TextBlock Text="包装数量:" Margin="20 0 0 0" Style="{StaticResource middleTextBlock}"/> |
|||
<TextBlock Text="{Binding SkuCount}" Style="{StaticResource middleTextBlock}"/> |
|||
</StackPanel> |
|||
<Grid Grid.Row="1"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="224"/> |
|||
<ColumnDefinition Width="97"/> |
|||
<ColumnDefinition Width="auto"/> |
|||
<ColumnDefinition Width="157"/> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid MinHeight="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="60"/> |
|||
<ColumnDefinition/> |
|||
</Grid.ColumnDefinitions> |
|||
<c:BAsyncImage DecodePixelWidth="48" Margin="10 0 0 0" |
|||
Cursor="Hand" UrlSource="{Binding Logo}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
|
|||
<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center"> |
|||
|
|||
<StackPanel Orientation="Horizontal"> |
|||
<TextBlock Text="SKU:"/> |
|||
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}" |
|||
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
CommandParameter="{Binding SkuId}" |
|||
/> |
|||
</StackPanel> |
|||
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0"> |
|||
<Run Text="SKU名称:"/> |
|||
<Run Text="{Binding SkuName}"/> |
|||
</TextBlock> |
|||
</StackPanel> |
|||
</Grid> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitConfigureCount}" Grid.Column="1"/> |
|||
|
|||
<ListBox Grid.Column="2" VerticalAlignment="Center" |
|||
ItemsSource="{Binding WareHourseDatas}" |
|||
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|||
BorderBrush="{StaticResource Border.Brush}" |
|||
BorderThickness="0" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Collapsed:Visible}" |
|||
Foreground="{StaticResource Text.Color}"> |
|||
<ListBox.ItemsPanel> |
|||
<ItemsPanelTemplate> |
|||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" /> |
|||
</ItemsPanelTemplate> |
|||
</ListBox.ItemsPanel> |
|||
<ListBox.ItemTemplate> |
|||
<DataTemplate> |
|||
<Grid Width="155" Height="68"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition/> |
|||
<ColumnDefinition Width="50"/> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBox Text="{Binding Count,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="0" Width="155" Height="68" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
BorderThickness="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Left" Grid.Column="1"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" FontSize="14" Foreground="Gray" |
|||
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=待封箱|#null:true:false}" |
|||
CommandParameter="{Binding}" Command="{Binding DataContext.SetWareMaxCountCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
Grid.Column="1" HorizontalAlignment="Center"/> |
|||
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right" Grid.ColumnSpan="2"/> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
|
|||
<StackPanel Grid.Column="3" Orientation="Vertical" VerticalAlignment="Center"> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="添加仓库" Command="{Binding DataContext.AddWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="分配至其他仓" Margin="0 5 0 0" CommandParameter="{Binding}" Command="{Binding DataContext.SpliteOtherWareCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type c:BWindow}}}"/> |
|||
</StackPanel> |
|||
|
|||
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="5" Background="{StaticResource Border.Brush}"/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1" /> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2" |
|||
Visibility="{Binding WareHourseDatas.Count,Converter={StaticResource objConverter},ConverterParameter=#null:Visible:Collapsed}" |
|||
/> |
|||
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3" /> |
|||
</Grid> |
|||
</Grid> |
|||
</DataTemplate> |
|||
</ListBox.ItemTemplate> |
|||
</ListBox> |
|||
</Grid> |
|||
</Grid> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<Border Grid.Row="3" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/> |
|||
<c:BButton Content="{Binding SealBoxId,Converter={StaticResource objConverter},ConverterParameter=0:提交任务:保存}" Width="80" HorizontalAlignment="Right" Grid.Row="4" |
|||
Command="{Binding SaveCommand}" Margin="0,0,5,0" |
|||
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type c:BWindow}}}" |
|||
/> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,196 @@ |
|||
using BBWY.Client.Models.SealBox; |
|||
using BBWY.Client.ViewModels.SealBox; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Collections.ObjectModel; |
|||
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; |
|||
using AutoMapper.Internal; |
|||
using BBWY.Client.APIServices; |
|||
|
|||
namespace BBWY.Client.Views.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// SetSealBoxPolicyWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SetSealBoxPolicyWindow : BWindow |
|||
{ |
|||
public SetSealBoxPolicyWindow(IList<SealBoxConfigureModel> sealBoxWaitConfigureModels, Action ReflashWindow, long sealboxId = 0) |
|||
{ |
|||
InitializeComponent(); |
|||
var sealBoxConfigureVM = this.DataContext as SealBoxConfigureViewModel; |
|||
sealBoxConfigureVM.SealBoxConfigureModelList = sealBoxWaitConfigureModels.ToList(); |
|||
sealBoxConfigureVM.JdConfigureModelList = new ObservableCollection<SealBoxConfigureModel>(); |
|||
sealBoxConfigureVM.CloudConfigureModelList = new ObservableCollection<SealBoxConfigureModel>(); |
|||
sealBoxConfigureVM.JstConfigureModelList = new ObservableCollection<SealBoxConfigureModel>(); |
|||
sealBoxConfigureVM.StoreConfigureModelList = new ObservableCollection<SealBoxConfigureModel>(); |
|||
sealBoxConfigureVM.SealBoxId = sealboxId; |
|||
sealBoxConfigureVM.ReflashWindow = ReflashWindow; |
|||
LoadData(sealBoxWaitConfigureModels, sealboxId, sealBoxConfigureVM); |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 加载数据
|
|||
/// </summary>
|
|||
/// <param name="sealBoxWaitConfigureModels"></param>
|
|||
/// <param name="sealboxId"></param>
|
|||
/// <param name="sealBoxConfigureVM"></param>
|
|||
private void LoadData(IList<SealBoxConfigureModel> sealBoxWaitConfigureModels, long sealboxId, SealBoxConfigureViewModel sealBoxConfigureVM) |
|||
{ |
|||
|
|||
|
|||
if (sealboxId == 0)//设置
|
|||
{ |
|||
sealBoxConfigureVM.JstWareHourseHeaderList = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = "齐越聚水潭",WareId="qiyuejushuitan" |
|||
} |
|||
}; |
|||
var storeListRes = sealBoxConfigureVM.logisticsService.GetStoreList(); |
|||
|
|||
if (storeListRes.Success) |
|||
{ |
|||
//加载商家仓 全国仓
|
|||
var storeList = storeListRes.Data.Where(s=>s.Status== Models.StockStatus.使用); |
|||
|
|||
var store = storeList.FirstOrDefault(s => s.Id == "0");//商家全国仓
|
|||
if (store != null) |
|||
{ |
|||
sealBoxConfigureVM.StoreWareHourseHeaderList = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = store.Name,WareId=store.Id |
|||
} |
|||
}; |
|||
} |
|||
|
|||
|
|||
//加载 泉州齐越云仓3号库
|
|||
var cloud = storeList.FirstOrDefault(s => s.Id == "800009450");//商家全国仓
|
|||
if (cloud != null) |
|||
{ |
|||
sealBoxConfigureVM.CloudWareHourseHeaderList = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = cloud.Name,WareId=cloud.Id |
|||
} |
|||
}; |
|||
} |
|||
} |
|||
|
|||
//sealBoxConfigureVM.CloudWareHourseHeaderList = new ObservableCollection<SealBoxConfigureWareHourseModel> {
|
|||
// new SealBoxConfigureWareHourseModel{
|
|||
// WareName = "泉州齐越云仓3号库",WareId="800009450"
|
|||
// }
|
|||
//};
|
|||
} |
|||
|
|||
|
|||
|
|||
foreach (var sealBoxWaitConfigureModel in sealBoxWaitConfigureModels) |
|||
{ |
|||
if (sealBoxWaitConfigureModel.WareHourseDatas != null && sealBoxWaitConfigureModel.WareHourseDatas.Count > 0)//修改数据
|
|||
{ |
|||
sealBoxWaitConfigureModel.WaitConfigureCount = 0; |
|||
sealBoxWaitConfigureModel.WareHourseDatas.ForAll(w => { w.TotalWareCount = sealBoxConfigureVM.TotalCount; w.TaskId = sealBoxWaitConfigureModel.TaskId; }); |
|||
} |
|||
else |
|||
{ |
|||
sealBoxWaitConfigureModel.WaitConfigureCount = sealBoxWaitConfigureModel.SkuCount; |
|||
} |
|||
|
|||
|
|||
switch (sealBoxWaitConfigureModel.WareType.Value) |
|||
{ |
|||
case Models.WareType.商家仓: |
|||
|
|||
if (sealboxId == 0) |
|||
{ |
|||
if (sealBoxConfigureVM.StoreWareHourseHeaderList != null && sealBoxConfigureVM.StoreWareHourseHeaderList.Count > 0) |
|||
{ |
|||
sealBoxConfigureVM.StoreWareHourseHeaderList.ForAll(s => |
|||
{ |
|||
|
|||
sealBoxWaitConfigureModel.WareHourseDatas = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = s.WareName, |
|||
WareId=s.WareId, |
|||
TaskId=sealBoxWaitConfigureModel.TaskId, |
|||
TotalWareCount=sealBoxConfigureVM.TotalCount, |
|||
|
|||
} |
|||
}; |
|||
|
|||
}); |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
sealBoxConfigureVM.StoreConfigureModelList.Add(sealBoxWaitConfigureModel); |
|||
sealBoxConfigureVM.StoreWareHourseHeaderList = sealBoxWaitConfigureModel.WareHourseDatas; |
|||
break; |
|||
case Models.WareType.云仓: |
|||
if (sealboxId == 0) |
|||
{ |
|||
if (sealBoxConfigureVM.CloudWareHourseHeaderList != null && sealBoxConfigureVM.CloudWareHourseHeaderList.Count > 0) |
|||
{ |
|||
sealBoxConfigureVM.CloudWareHourseHeaderList.ForAll(s => |
|||
{ |
|||
|
|||
sealBoxWaitConfigureModel.WareHourseDatas = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = s.WareName, |
|||
WareId=s.WareId, |
|||
TaskId=sealBoxWaitConfigureModel.TaskId, |
|||
TotalWareCount=sealBoxConfigureVM.TotalCount, |
|||
|
|||
} |
|||
}; |
|||
|
|||
}); |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
sealBoxConfigureVM.CloudConfigureModelList.Add(sealBoxWaitConfigureModel); |
|||
sealBoxConfigureVM.CloudWareHourseHeaderList = sealBoxWaitConfigureModel.WareHourseDatas; |
|||
break; |
|||
case Models.WareType.京仓: |
|||
sealBoxConfigureVM.JdConfigureModelList.Add(sealBoxWaitConfigureModel); |
|||
sealBoxConfigureVM.JdWareHourseHeaderList = sealBoxWaitConfigureModel.WareHourseDatas; |
|||
break; |
|||
case Models.WareType.聚水潭: |
|||
sealBoxConfigureVM.JstConfigureModelList.Add(sealBoxWaitConfigureModel); |
|||
if (sealboxId == 0) |
|||
{ |
|||
sealBoxWaitConfigureModel.WareHourseDatas = new ObservableCollection<SealBoxConfigureWareHourseModel> { |
|||
new SealBoxConfigureWareHourseModel{ |
|||
WareName = "齐越聚水潭",WareId="qiyuejushuitan", TaskId=sealBoxWaitConfigureModel.TaskId, TotalWareCount=sealBoxConfigureVM.TotalCount, |
|||
|
|||
} |
|||
}; |
|||
} |
|||
|
|||
sealBoxConfigureVM.JstWareHourseHeaderList = sealBoxWaitConfigureModel.WareHourseDatas; |
|||
|
|||
|
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,71 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.SealBox.SplitOtherWareWindow" |
|||
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: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="254" 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="100 20 100 20"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<StackPanel Grid.Row="0" Orientation="Horizontal"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="待分配量:"/> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="{Binding WaitCount}"/> |
|||
</StackPanel> |
|||
<StackPanel Grid.Row="1" Orientation="Horizontal"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="仓库:"/> |
|||
<Grid Margin="5" Height="30" Width="150" Grid.Column="1" Grid.ColumnSpan="3"> |
|||
<Rectangle Stroke="{StaticResource Border.Brush}" StrokeThickness="1"/> |
|||
<ComboBox Height="30" Width="150" SelectedItem="{Binding SelectWareType}" ItemsSource="{Binding WareTypeList}" BorderThickness="0" Margin="1" BorderBrush="Black"> |
|||
<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> |
|||
<StackPanel Grid.Row="2" Orientation="Horizontal"> |
|||
<TextBlock Style="{StaticResource middleTextBlock}" Text="数量:"/> |
|||
<Border BorderBrush="{StaticResource Border.Brush}" Margin="5 0 0 0" Height="30" BorderThickness="1"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<c:BTextBox Height="30" Width="100" Text="{Binding Count}" BorderThickness="0 0 1 0"/> |
|||
<c:BButton Style="{StaticResource LinkButton}" Content="MAX" BorderThickness="0" Height="30" Width="50" Foreground="{StaticResource Border.Brush}" Click="BButton_Click_1"/> |
|||
|
|||
</StackPanel> |
|||
</Border> |
|||
</StackPanel> |
|||
</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,64 @@ |
|||
using BBWY.Client.Models; |
|||
using BBWY.Controls; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
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.SealBox |
|||
{ |
|||
/// <summary>
|
|||
/// SplitOtherWareWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class SplitOtherWareWindow : BWindow |
|||
{ |
|||
public SplitOtherWareWindow(int waitCount, WareType wareType, Action<int, WareType> SplitWare) |
|||
{ |
|||
this. SplitWare = SplitWare; |
|||
WaitCount = waitCount; |
|||
WareTypeList.Remove(wareType);//移除当前落仓
|
|||
InitializeComponent(); |
|||
this.DataContext = this; |
|||
} |
|||
private Action<int, WareType> SplitWare { get;set;} |
|||
private int waitCount; |
|||
public int WaitCount { get => waitCount; set { Set(ref waitCount, value); } } |
|||
|
|||
private int count; |
|||
public int Count { get => count; set { Set(ref count, value); } } |
|||
|
|||
private WareType selectWareType; |
|||
public WareType SelectWareType { get => selectWareType; set { Set(ref selectWareType, value); } } |
|||
|
|||
|
|||
private ObservableCollection<WareType> wareTypeList=new ObservableCollection<WareType> { |
|||
WareType.京仓, WareType.云仓, WareType.商家仓, WareType.聚水潭 |
|||
}; |
|||
public ObservableCollection<WareType> WareTypeList { get => wareTypeList; set { Set(ref wareTypeList, value); } } |
|||
|
|||
private void BButton_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
if (WaitCount< Count) |
|||
{ |
|||
MessageBox.Show("可分配量不足!"); |
|||
return; |
|||
} |
|||
if (SplitWare != null) SplitWare(Count, SelectWareType); |
|||
|
|||
this.Close(); |
|||
} |
|||
|
|||
private void BButton_Click_1(object sender, RoutedEventArgs e) |
|||
{ |
|||
Count = WaitCount; |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue