|
|
@ -7,11 +7,13 @@ |
|
|
|
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls" |
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|
|
|
mc:Ignorable="d" |
|
|
|
Title="ChoosePurchaseScheme" Height="200" Width="600" |
|
|
|
Title="ChoosePurchaseScheme" Height="400" Width="1024" |
|
|
|
Style="{StaticResource bwstyle}" |
|
|
|
MinButtonVisibility="Collapsed" |
|
|
|
MaxButtonVisibility="Collapsed" |
|
|
|
DataContext="{Binding ChoosePurchaseScheme,Source={StaticResource Locator}}"> |
|
|
|
DataContext="{Binding ChoosePurchaseScheme,Source={StaticResource Locator}}" |
|
|
|
UseLayoutRounding="True" |
|
|
|
SnapsToDevicePixels="True"> |
|
|
|
<b:Interaction.Triggers> |
|
|
|
<b:EventTrigger EventName="Loaded"> |
|
|
|
<b:InvokeCommandAction Command="{Binding LoadCommand}"/> |
|
|
@ -22,14 +24,136 @@ |
|
|
|
</b:Interaction.Triggers> |
|
|
|
<Grid> |
|
|
|
<Grid.RowDefinitions> |
|
|
|
<RowDefinition Height="30"/> |
|
|
|
<RowDefinition Height="30"/> |
|
|
|
<RowDefinition/> |
|
|
|
<RowDefinition Height="40"/> |
|
|
|
</Grid.RowDefinitions> |
|
|
|
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|
|
|
<Border BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|
|
|
Background="{StaticResource Border.Background}"> |
|
|
|
<TextBlock Text="选择采购商" Style="{StaticResource middleTextBlock}"/> |
|
|
|
</Border> |
|
|
|
<DataGrid Grid.Row="1" |
|
|
|
|
|
|
|
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1,1,1,0" |
|
|
|
Background="#F2F2F2" |
|
|
|
Grid.Row="1"> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="120"/> |
|
|
|
<ColumnDefinition Width="80"/> |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition Width="80"/> |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition Width="80"/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<TextBlock Text="SKU" Style="{StaticResource middleTextBlock}"/> |
|
|
|
<TextBlock Text="平台" Grid.Column="1" Style="{StaticResource middleTextBlock}"/> |
|
|
|
<TextBlock Text="采购商名称" Grid.Column="2" Style="{StaticResource middleTextBlock}"/> |
|
|
|
<TextBlock Text="发货地" Grid.Column="3" Style="{StaticResource middleTextBlock}"/> |
|
|
|
<TextBlock Text="单价" Grid.Column="4" Style="{StaticResource middleTextBlock}"/> |
|
|
|
<TextBlock Text="上次采购时间" Grid.Column="5" Style="{StaticResource middleTextBlock}"/> |
|
|
|
<TextBlock Text="操作" Grid.Column="6" Style="{StaticResource middleTextBlock}"/> |
|
|
|
|
|
|
|
<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"/> |
|
|
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|
|
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
|
|
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/> |
|
|
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="6"/> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<ListBox Grid.Row="2" |
|
|
|
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|
|
|
ItemsSource="{Binding SkuGroup}" |
|
|
|
BorderBrush="{StaticResource Border.Brush}" |
|
|
|
BorderThickness="1" |
|
|
|
x:Name="listbox_skuGroup"> |
|
|
|
<ListBox.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<Grid MinHeight="30" |
|
|
|
Width="{Binding ActualWidth,ElementName=listbox_skuGroup}"> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="119"/> |
|
|
|
<ColumnDefinition/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<TextBlock Text="{Binding SkuId}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|
|
|
|
|
|
|
<ListBox Grid.Column="1" |
|
|
|
ItemsSource="{Binding SchemeList}" |
|
|
|
SelectedItem="{Binding SelectedScheme,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
|
|
|
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}" |
|
|
|
Style="{StaticResource NoScrollViewListBoxStyle}" |
|
|
|
BorderThickness="1,0,0,0" |
|
|
|
BorderBrush="{StaticResource Border.Brush}" |
|
|
|
x:Name="listbox_Scheme"> |
|
|
|
<ListBox.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<Grid Height="30" |
|
|
|
Width="{Binding ActualWidth,ElementName=listbox_Scheme,Converter={StaticResource widthConverter},ConverterParameter=3}"> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="80"/> |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition Width="80"/> |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition Width="80"/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
|
|
|
|
<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"/> |
|
|
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/> |
|
|
|
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4"/> |
|
|
|
|
|
|
|
<TextBlock Text="{Binding PurchasePlatform}" Style="{StaticResource middleTextBlock}"/> |
|
|
|
<TextBlock Text="{Binding PurchaserName}" Style="{StaticResource middleTextBlock}" Grid.Column="1"/> |
|
|
|
<TextBlock Text="{Binding PurchaserLocation}" Style="{StaticResource middleTextBlock}" Grid.Column="2"/> |
|
|
|
|
|
|
|
<Border x:Name="bd" Grid.Column="5" Background="{StaticResource Border.Background}"> |
|
|
|
<TextBlock Text="选择" Style="{StaticResource middleTextBlock}"/> |
|
|
|
</Border> |
|
|
|
<Border Height="1" VerticalAlignment="Bottom" Grid.ColumnSpan="6" Background="{StaticResource Border.Brush}"/> |
|
|
|
</Grid> |
|
|
|
<DataTemplate.Triggers> |
|
|
|
<DataTrigger Binding="{Binding IsSelected,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}}}" |
|
|
|
Value="True"> |
|
|
|
<Setter Property="Background" TargetName="bd" Value="#1CC2A2"/> |
|
|
|
<Setter Property="TextBlock.Foreground" TargetName="bd" Value="White"/> |
|
|
|
</DataTrigger> |
|
|
|
</DataTemplate.Triggers> |
|
|
|
</DataTemplate> |
|
|
|
</ListBox.ItemTemplate> |
|
|
|
</ListBox> |
|
|
|
|
|
|
|
<Border Height="1" VerticalAlignment="Bottom" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="2"/> |
|
|
|
</Grid> |
|
|
|
</DataTemplate> |
|
|
|
</ListBox.ItemTemplate> |
|
|
|
</ListBox> |
|
|
|
|
|
|
|
<CheckBox Grid.Row="3" HorizontalAlignment="Right" Margin="0,0,100,0" VerticalContentAlignment="Center" VerticalAlignment="Center" |
|
|
|
IsChecked="{Binding FreeChoice,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"> |
|
|
|
<CheckBox.Content> |
|
|
|
<StackPanel Orientation="Horizontal"> |
|
|
|
<TextBlock Text="自由选择"/> |
|
|
|
<Path Style="{StaticResource path_question}" |
|
|
|
Width="14" |
|
|
|
Margin="5,0,0,0" |
|
|
|
Fill="{StaticResource Text.Pink}" |
|
|
|
ToolTipService.InitialShowDelay="0" |
|
|
|
ToolTip="勾选自由选择,将不自动选择相同采购商"/> |
|
|
|
</StackPanel> |
|
|
|
</CheckBox.Content> |
|
|
|
</CheckBox> |
|
|
|
|
|
|
|
<c:BButton Grid.Row="3" HorizontalAlignment="Right" Margin="0,0,5,0" Content="确定" Width="80" |
|
|
|
Command="{Binding ConfirmCommand}"/> |
|
|
|
|
|
|
|
<!--<DataGrid Grid.Row="1" |
|
|
|
ItemsSource="{Binding PurchaserList}"> |
|
|
|
<DataGrid.Columns> |
|
|
|
<DataGridTextColumn Binding="{Binding Platform}" Header="采购平台" Width="80" HeaderStyle="{StaticResource ColumnHeaderStyle_Center}" |
|
|
@ -45,14 +169,17 @@ |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition/> |
|
|
|
<!--<ColumnDefinition/> |
|
|
|
--> |
|
|
|
<!--<ColumnDefinition/> |
|
|
|
<ColumnDefinition/>--> |
|
|
|
<!-- |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<c:BButton Content="下单" HorizontalAlignment="Stretch" |
|
|
|
Background="#1CC2A2" |
|
|
|
Command="{Binding DataContext.PreviewPurchaseCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}}" |
|
|
|
CommandParameter="{Binding }"/> |
|
|
|
<!--<c:BButton Content="编辑" Grid.Column="1" HorizontalAlignment="Stretch" |
|
|
|
--> |
|
|
|
<!--<c:BButton Content="编辑" Grid.Column="1" HorizontalAlignment="Stretch" |
|
|
|
Background="#02A7F0" |
|
|
|
Command="{Binding DataContext.EditCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}}" |
|
|
|
CommandParameter="{Binding }"/> |
|
|
@ -60,16 +187,14 @@ |
|
|
|
Background="#EC808D" |
|
|
|
Command="{Binding DataContext.DeleteCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}}" |
|
|
|
CommandParameter="{Binding }"/>--> |
|
|
|
<!-- |
|
|
|
</Grid> |
|
|
|
</DataTemplate> |
|
|
|
</DataGridTemplateColumn.CellTemplate> |
|
|
|
</DataGridTemplateColumn> |
|
|
|
</DataGrid.Columns> |
|
|
|
</DataGrid> |
|
|
|
<TextBlock Text="缺少共同采购商" Grid.Row="1" |
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" |
|
|
|
Foreground="{StaticResource TextBox.BorderBrush}" |
|
|
|
FontSize="16" |
|
|
|
Visibility="{Binding NoPurchaser,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}"/> |
|
|
|
</DataGrid>--> |
|
|
|
|
|
|
|
|
|
|
|
</Grid> |
|
|
|
</c:BWindow> |
|
|
|