步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

202 lines
13 KiB

<c:BWindow x:Class="BBWY.Client.Views.SealBox.SealBoxConfigureWindow"
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.SealBox"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
Title="PackSkuConfigWindow" Height="500" Width="1024"
MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed"
Style="{StaticResource bwstyle}"
DataContext="{Binding SealBoxConfigureVModel,Source={StaticResource Locator}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<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>
<ListBox x:Name="listbox"
ItemsSource="{Binding SealBoxConfigureModelList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="1,0,0,0"
Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox,Converter={StaticResource widthConverter},ConverterParameter=3}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="170"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--{Binding Logo}-->
<c:BAsyncImage UrlSource="{Binding Logo}"
Width="150" DecodePixelWidth="150"
VerticalAlignment="Top" Margin="10 10 10 10"
Cursor="Hand"/>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Center" Margin="10,10,0,0">
<Run Text="SKU:"/>
<Run Text="{Binding SkuId}"/>
</TextBlock>
<TextBlock VerticalAlignment="Center" Margin="10,10,0,0">
<Run Text="任务ID:"/>
<Run Text="{Binding TaskId}"/>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock VerticalAlignment="Center" Grid.Column="1" Margin="30,10,0,0">
<Run Text="采购数量:"/>
<Run Text="{Binding SkuCount}"/>
</TextBlock>
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="1" Margin="30,5,0,0">
<TextBlock Text="份数:" VerticalAlignment="Center"/>
<c:BTextBox Text="{Binding SplitCount}" Width="40" Margin="5,0" Height="25"/>
<c:BButton Command="{Binding DataContext.SetSplitCountCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding }"
Content="设置"
Style="{StaticResource LinkButton}"/>
</StackPanel>
</StackPanel>
</StackPanel>
<Grid Grid.Row="2" Grid.ColumnSpan="2"
Visibility="{Binding WareHourseDatas.Count,ConverterParameter=0:Collapsed:Visible,Converter={StaticResource objConverter}}"
>
<!--<ListBox Grid.Row="2" Grid.ColumnSpan="2" Name="listbox_ware"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderThickness="1,1,0,1"
BorderBrush="{StaticResource Border.Brush}"
ItemsSource="{Binding WareHourseDatas}"
Width="Auto"
Margin="10,0,0,10"
HorizontalAlignment="Left" Height="92"
Visibility="{Binding DataContext.SealBoxId,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type c:BWindow}},ConverterParameter=0:Visible:Collapsed,Converter={StaticResource objConverter}}"
>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="auto" Height="90" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Index,StringFormat=第\{0\}份}" Style="{StaticResource middleTextBlock}"/>
<c:BButton MinWidth="100" Content="设置" Style="{StaticResource LinkButton}" Grid.Row="1"
Command="{Binding DataContext.SetPackCountAndStoreCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}"
CommandParameter="{Binding}"/>
<TextBlock Grid.Row="2" Style="{StaticResource middleTextBlock}" Margin="5 0 5 0 ">
<Run Text="{Binding WareName}"/>
<Run Text="{Binding Count,StringFormat= \{0\}件}"/>
</TextBlock>
<Border Width="1" Grid.RowSpan="3" HorizontalAlignment="Right"
Background="{StaticResource Border.Brush}"/>
<Border Height="1" Background="{StaticResource Border.Brush}"
VerticalAlignment="Bottom"/>
<Border Height="1" Background="{StaticResource Border.Brush}"
VerticalAlignment="Bottom" Grid.Row="1"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>-->
<ListBox Grid.Row="2" Grid.ColumnSpan="2"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderThickness="1,1,0,1"
BorderBrush="{StaticResource Border.Brush}"
ItemsSource="{Binding WareHourseDatas}"
Width="Auto"
Margin="10,0,0,10"
HorizontalAlignment="Left" Height="122" >
<!--Visibility="{Binding DataContext.SealBoxId,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type c:BWindow}},Converter={StaticResource objConverter},ConverterParameter=0:Collapsed:Visible}"-->
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="auto" Height="120" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Index,StringFormat=第\{0\}份}" Style="{StaticResource middleTextBlock}"/>
<TextBlock Grid.Row="1" Style="{StaticResource middleTextBlock}" Margin="5 0 5 0 ">
<Run Text="{Binding Count,StringFormat=\{0\}件}"/>
</TextBlock>
<TextBlock Grid.Row="2" Style="{StaticResource middleTextBlock}" Margin="5 0 5 0 ">
<Run Text="{Binding WareName}"/>
</TextBlock>
<c:BButton MinWidth="100" Content="{Binding Count,Converter={StaticResource objConverter},ConverterParameter=0:设置:修改}" Style="{StaticResource LinkButton}" Grid.Row="3"
Command="{Binding DataContext.SetPackCountAndStoreCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}}"
CommandParameter="{Binding}"
IsEnabled="{Binding WareState,Converter={StaticResource objConverter},ConverterParameter=#null|待封箱:True:False}"
/>
<Border Width="1" Grid.RowSpan="4" HorizontalAlignment="Right"
Background="{StaticResource Border.Brush}"/>
<Border Height="1" Background="{StaticResource Border.Brush}"
VerticalAlignment="Bottom"/>
<Border Height="1" Background="{StaticResource Border.Brush}"
VerticalAlignment="Bottom" Grid.Row="1"/>
<Border Height="1" Background="{StaticResource Border.Brush}"
VerticalAlignment="Bottom" Grid.Row="2"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Grid>
<Border Grid.ColumnSpan="2" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
<Border HorizontalAlignment="Right" Width="1" Background="{StaticResource Border.Brush}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Border Grid.ColumnSpan="2" Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
<c:BButton Content="{Binding SealBoxId,Converter={StaticResource objConverter},ConverterParameter=0:提交任务:保存}" Width="80" HorizontalAlignment="Right" Grid.Row="2"
Command="{Binding SaveCommand}" Margin="0,0,5,0"
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type c:BWindow}}}"
/>
</Grid>
</c:BWindow>