|
|
@ -9,7 +9,7 @@ |
|
|
|
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" |
|
|
|
Style="{StaticResource bwstyle}" |
|
|
|
Title="BatchPurchaseAddProductSku" Height="600" Width="500" |
|
|
|
Title="BatchPurchaseAddProductSku" Height="600" Width="550" |
|
|
|
DataContext="{Binding BatchPurchaseAddProductSku,Source={StaticResource Locator}}"> |
|
|
|
<Grid> |
|
|
|
<Grid.RowDefinitions> |
|
|
@ -31,7 +31,8 @@ |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition Width="50"/> |
|
|
|
<ColumnDefinition/> |
|
|
|
<ColumnDefinition Width="80"/> |
|
|
|
<ColumnDefinition Width="5"/> |
|
|
|
<ColumnDefinition Width="Auto"/> |
|
|
|
</Grid.ColumnDefinitions> |
|
|
|
<Grid.RowDefinitions> |
|
|
|
<RowDefinition/> |
|
|
@ -43,21 +44,23 @@ |
|
|
|
<TextBlock Text="SKU" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="2" Margin="0,0,5,0"/> |
|
|
|
<c:BTextBox Grid.Column="3" Text="{Binding Sku}"/> |
|
|
|
|
|
|
|
<c:BButton Grid.Column="4" Content="搜索" Width="70" Command="{Binding SearchCommand}"/> |
|
|
|
<c:BButton Grid.Column="5" Content="搜索" Width="70" Command="{Binding SearchCommand}"/> |
|
|
|
|
|
|
|
<TextBlock Text="采购商" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="1" Margin="0,0,5,0"/> |
|
|
|
<ComboBox Grid.Column="1" Grid.Row="1" Height="30" |
|
|
|
ItemsSource="{Binding PurchaserList}" |
|
|
|
SelectedItem="{Binding SelectedPurchaser}" |
|
|
|
DisplayMemberPath="Name" |
|
|
|
VerticalContentAlignment="Center"/> |
|
|
|
|
|
|
|
<TextBlock Text="平台" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="2" Grid.Row="1" Margin="0,0,5,0"/> |
|
|
|
<ComboBox Grid.Column="3" Grid.Row="1" Height="30" |
|
|
|
ItemsSource="{Binding PurchasePlatformList}" |
|
|
|
SelectedItem="{Binding SelectedPurchasePlatform}" |
|
|
|
DisplayMemberPath="Value" |
|
|
|
VerticalContentAlignment="Center"/> |
|
|
|
|
|
|
|
<c:BButton Grid.Column="4" Content="筛选" Width="70" Grid.Row="1" Background="#2879FF" Command="{Binding FilterCommand}"/> |
|
|
|
<c:BButton Grid.Column="5" Content="筛选" Width="70" Grid.Row="1" Background="#2879FF" Command="{Binding FilterCommand}"/> |
|
|
|
|
|
|
|
|
|
|
|
</Grid> |
|
|
@ -68,24 +71,29 @@ |
|
|
|
BorderBrush="{StaticResource Border.Brush}" |
|
|
|
BorderThickness="1" |
|
|
|
RowHeight="90"> |
|
|
|
<DataGrid.RowStyle> |
|
|
|
<Style TargetType="DataGridRow"> |
|
|
|
<Setter Property="IsEnabled" Value="{Binding PurchaseSchemeId,ConverterParameter=0:false:true,Converter={StaticResource objConverter}}"/> |
|
|
|
</Style> |
|
|
|
</DataGrid.RowStyle> |
|
|
|
<DataGrid.Columns> |
|
|
|
<DataGridTemplateColumn Width="35"> |
|
|
|
<DataGridTemplateColumn.HeaderTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<CheckBox Margin="5,0,0,0" |
|
|
|
IsChecked="{Binding DataContext.AllSelected,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}}"/> |
|
|
|
IsChecked="{Binding DataContext.AllSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}}"/> |
|
|
|
</DataTemplate> |
|
|
|
</DataGridTemplateColumn.HeaderTemplate> |
|
|
|
<DataGridTemplateColumn.CellTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<CheckBox IsChecked="{Binding IsSelected}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|
|
|
<CheckBox IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|
|
|
</DataTemplate> |
|
|
|
</DataGridTemplateColumn.CellTemplate> |
|
|
|
</DataGridTemplateColumn> |
|
|
|
<DataGridTemplateColumn Header="商品信息" Width="*" HeaderStyle="{StaticResource ColumnHeaderStyle_Center}"> |
|
|
|
<DataGridTemplateColumn.CellTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<Grid Width="{Binding ActualWidth,ElementName=listbox_orerSku}"> |
|
|
|
<Grid> |
|
|
|
<Grid.ColumnDefinitions> |
|
|
|
<ColumnDefinition Width="90"/> |
|
|
|
<ColumnDefinition/> |
|
|
@ -99,49 +107,55 @@ |
|
|
|
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="0,5,0,5"> |
|
|
|
<TextBlock TextTrimming="CharacterEllipsis"> |
|
|
|
<Run Text="SKU:"/> |
|
|
|
<Run Text="{Binding SkuId}"/> |
|
|
|
</TextBlock> |
|
|
|
<TextBlock TextTrimming="CharacterEllipsis" |
|
|
|
Text="{Binding Title}" |
|
|
|
Margin="0,10,0,0"> |
|
|
|
<TextBlock.ToolTip> |
|
|
|
<ToolTip Style="{StaticResource OrderCouponToolipStyle}"> |
|
|
|
<TextBlock Text="{Binding Title}"/> |
|
|
|
</ToolTip> |
|
|
|
</TextBlock.ToolTip> |
|
|
|
<Run Text="SKU名称:"/> |
|
|
|
<Run Text="{Binding Title}"/> |
|
|
|
</TextBlock> |
|
|
|
<StackPanel Orientation="Horizontal"> |
|
|
|
<StackPanel Orientation="Vertical"> |
|
|
|
<StackPanel Orientation="Horizontal"> |
|
|
|
<TextBlock Text="SPU:"/> |
|
|
|
<c:BButton Content="{Binding ProductId}" Style="{StaticResource LinkButton}" |
|
|
|
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|
|
|
CommandParameter="{Binding ProductId}" |
|
|
|
Margin=" 5,0,0,0"/> |
|
|
|
</StackPanel> |
|
|
|
<StackPanel Orientation="Horizontal"> |
|
|
|
<TextBlock Text="SKU:"/> |
|
|
|
<c:BButton Content="{Binding Id}" Style="{StaticResource LinkButton}" |
|
|
|
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}" |
|
|
|
CommandParameter="{Binding Id}" |
|
|
|
Margin=" 5,0,0,0"/> |
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
<TextBlock TextWrapping="Wrap" Margin=" 5,0,0,0"> |
|
|
|
<Run Text="单价:"/> |
|
|
|
<Run Text="{Binding Price}"/> |
|
|
|
</TextBlock> |
|
|
|
</StackPanel> |
|
|
|
</TextBlock> |
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,10,0,0"> |
|
|
|
<TextBlock> |
|
|
|
<Run Text="采购平台:"/> |
|
|
|
<Run Text="{Binding PurchasePlatform}"/> |
|
|
|
</TextBlock> |
|
|
|
<TextBlock Margin="10,0,0,0"> |
|
|
|
<Run Text="采购商:"/> |
|
|
|
<Run Text="{Binding PurchaseName}"/> |
|
|
|
</TextBlock> |
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
</Grid> |
|
|
|
</DataTemplate> |
|
|
|
</DataGridTemplateColumn.CellTemplate> |
|
|
|
</DataGridTemplateColumn> |
|
|
|
<DataGridTemplateColumn Header="数量" Width="80" HeaderStyle="{StaticResource ColumnHeaderStyle_Center}"> |
|
|
|
<DataGridTemplateColumn Header="数量" Width="100" HeaderStyle="{StaticResource ColumnHeaderStyle_Center}"> |
|
|
|
<DataGridTemplateColumn.CellTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<StackPanel Orientation="Horizontal"> |
|
|
|
<c:BButton Content="-"/> |
|
|
|
<c:BTextBox Text="{Binding Quantity}" Margin="5,0"/> |
|
|
|
<c:BButton Content="+"/> |
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> |
|
|
|
<c:BButton Content="-" Background="White" Foreground="Black" |
|
|
|
BorderBrush="{StaticResource Border.Brush}" |
|
|
|
BorderThickness="1" |
|
|
|
Width="15" |
|
|
|
Height="18" |
|
|
|
Command="{Binding DataContext.SubtractQuantityCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}}" |
|
|
|
CommandParameter="{Binding }"/> |
|
|
|
<c:BTextBox Text="{Binding Quantity}" Margin="5,0" VerticalAlignment="Center" |
|
|
|
Width="40" |
|
|
|
DisableBgColor="{StaticResource TextBox.Disable.BgColor}"/> |
|
|
|
<c:BButton Content="+" Background="White" Foreground="Black" |
|
|
|
BorderBrush="{StaticResource Border.Brush}" |
|
|
|
BorderThickness="1" |
|
|
|
Width="15" |
|
|
|
Height="18" |
|
|
|
Command="{Binding DataContext.AddQuantityCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}}" |
|
|
|
CommandParameter="{Binding }"/> |
|
|
|
</StackPanel> |
|
|
|
</DataTemplate> |
|
|
|
</DataGridTemplateColumn.CellTemplate> |
|
|
|