|
|
<Window x:Class="B3DealerClient.Windows.FreshSaleOutWindow_.FreshSaleOutWindow"
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
xmlns:self="clr-namespace:B3DealerClient.Windows.FreshSaleOutWindow_"
|
|
|
Title="鲜品发货" Height="800" Width="1200" FontSize="17" WindowState="Maximized">
|
|
|
<Window.Resources>
|
|
|
<self:TrueToFalseConverter x:Key="TrueToFalseConverter"/>
|
|
|
<Style TargetType="TextBlock">
|
|
|
<Setter Property="Margin" Value="5,20"/>
|
|
|
<Setter Property="Width" Value="80"/>
|
|
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
|
</Style>
|
|
|
<Style x:Key="textBox" TargetType="TextBox">
|
|
|
<Setter Property="Width" Value="150"/>
|
|
|
<Setter Property="Height" Value="40"/>
|
|
|
<Setter Property="TextAlignment" Value="Center"/>
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
</Style>
|
|
|
<Style x:Key="deleteBtn" TargetType="Button" BasedOn="{StaticResource RedButton}">
|
|
|
<Setter Property="Width" Value="120"/>
|
|
|
<Setter Property="Height" Value="55"/>
|
|
|
<Setter Property="Margin" Value="10,0"/>
|
|
|
</Style>
|
|
|
</Window.Resources>
|
|
|
|
|
|
<Grid Margin="5">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="165"/>
|
|
|
<ColumnDefinition/>
|
|
|
<ColumnDefinition Width="320"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="100"/>
|
|
|
<RowDefinition Height="0.8*"/>
|
|
|
<RowDefinition/>
|
|
|
<RowDefinition Height="80"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
<Border Grid.RowSpan="3" Margin="0,2" Style="{StaticResource DefaultBorder}">
|
|
|
<ListBox x:Name="customerPanel" ItemsSource="{Binding CustomerList}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" BorderThickness="0">
|
|
|
<ListBox.Resources>
|
|
|
<Style TargetType="ListBoxItem">
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
|
<EventSetter Event="PreviewMouseDown" Handler="CustomerBtn_PriviewMouseDown"/>
|
|
|
</Style>
|
|
|
<Style TargetType="Button" BasedOn="{StaticResource DefaultButton}">
|
|
|
<Setter Property="Margin" Value="0,5"/>
|
|
|
<Setter Property="Width" Value="150"/>
|
|
|
<Setter Property="Height" Value="50"/>
|
|
|
<Style.Triggers>
|
|
|
<MultiDataTrigger>
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
<Condition Binding="{Binding Selected}" Value="False" />
|
|
|
<Condition Binding="{Binding Finished}" Value="True" />
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
<Setter Property="Background" Value="DarkGreen"/>
|
|
|
</MultiDataTrigger>
|
|
|
<DataTrigger Binding="{Binding Selected}" Value="True">
|
|
|
<Setter Property="Background" Value="Orange"/>
|
|
|
</DataTrigger>
|
|
|
</Style.Triggers>
|
|
|
</Style>
|
|
|
<Style TargetType="TextBlock">
|
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
|
</Style>
|
|
|
</ListBox.Resources>
|
|
|
<ListBox.ItemTemplate>
|
|
|
<DataTemplate>
|
|
|
<Button>
|
|
|
<Button.Content>
|
|
|
<TextBlock Text="{Binding Name}"/>
|
|
|
</Button.Content>
|
|
|
</Button>
|
|
|
</DataTemplate>
|
|
|
</ListBox.ItemTemplate>
|
|
|
</ListBox>
|
|
|
</Border>
|
|
|
|
|
|
<WrapPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
<WrapPanel.Resources>
|
|
|
<Style TargetType="Button" BasedOn="{StaticResource DefaultButton}">
|
|
|
<Setter Property="Margin" Value="2,0"/>
|
|
|
<Setter Property="Width" Value="75"/>
|
|
|
<Setter Property="Height" Value="40"/>
|
|
|
<EventSetter Event="PreviewMouseDown" Handler="PageBtn_PreviewMouseDown"/>
|
|
|
</Style>
|
|
|
</WrapPanel.Resources>
|
|
|
<Button Content="上一页" Tag="0"/>
|
|
|
<Button Content="下一页" Tag="1"/>
|
|
|
</WrapPanel>
|
|
|
|
|
|
<Grid Grid.Column="1">
|
|
|
<Grid.Resources>
|
|
|
<Style TargetType="TextBlock">
|
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
|
</Style>
|
|
|
</Grid.Resources>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="0.6*"/>
|
|
|
<ColumnDefinition Width="60"/>
|
|
|
<ColumnDefinition Width="1*"/>
|
|
|
<ColumnDefinition Width="60"/>
|
|
|
<ColumnDefinition Width="1*"/>
|
|
|
<ColumnDefinition Width="0.6*"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition/>
|
|
|
<RowDefinition/>
|
|
|
</Grid.RowDefinitions>
|
|
|
<TextBlock Grid.Column="1" Text="客户:"/>
|
|
|
<TextBlock Grid.Column="2" Text="{Binding Dmo.Customer_Name}"/>
|
|
|
<TextBlock Grid.Column="3" Text="司机:"/>
|
|
|
<TextBlock Grid.Column="4" Text="{Binding Dmo.Driver_Name}"/>
|
|
|
<TextBlock Grid.Column="1" Grid.Row="1" Text="仓库:"/>
|
|
|
<TextBlock Grid.Column="2" Grid.Row="1" Text="{Binding Dmo.Store_Name}"/>
|
|
|
</Grid>
|
|
|
|
|
|
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Margin="2" Style="{StaticResource DefaultBorder}">
|
|
|
<DataGrid Margin="5" ItemsSource="{Binding DmoList}">
|
|
|
<DataGrid.RowStyle>
|
|
|
<Style TargetType="DataGridRow" BasedOn="{StaticResource DefaultDataGridRow}">
|
|
|
<EventSetter Event="PreviewMouseDown" Handler="MainGridFocus"/>
|
|
|
<Style.Triggers>
|
|
|
<MultiDataTrigger>
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
<Condition Binding="{Binding Selected}" Value="False" />
|
|
|
<Condition Binding="{Binding AssignFinished}" Value="True" />
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
<Setter Property="Background">
|
|
|
<Setter.Value>
|
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
|
|
<GradientStop Offset="0.0" Color="#9ACD32"/>
|
|
|
<GradientStop Offset="1.0" Color="White"/>
|
|
|
</LinearGradientBrush>
|
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
|
</MultiDataTrigger>
|
|
|
<DataTrigger Binding="{Binding Selected}" Value="True">
|
|
|
<Setter Property="Background" Value="#1581ED"/>
|
|
|
</DataTrigger>
|
|
|
</Style.Triggers>
|
|
|
</Style>
|
|
|
</DataGrid.RowStyle>
|
|
|
<DataGrid.Columns>
|
|
|
<DataGridTextColumn Binding="{Binding ID}" Header="单号" Width="0.6*"/>
|
|
|
<DataGridTextColumn Binding="{Binding Goods_Name}" Header="存货名称" Width="1.0*"/>
|
|
|
<DataGridTextColumn Binding="{Binding LoadTime ,StringFormat=\{0:yyyy-MM-dd\}}" Header="出库时间" Width="0.8*"/>
|
|
|
<DataGridTextColumn Binding="{Binding Number, StringFormat=\{0:0.######\}}" Header="主数量" Width="0.6*"/>
|
|
|
<DataGridTextColumn Binding="{Binding SecondNumber, StringFormat=\{0:0.######\}}" Header="辅数量" Width="0.6*"/>
|
|
|
<DataGridTextColumn Binding="{Binding AlreadyNumber ,StringFormat=\{0:0.######\}}" Header="已配主数量" Width="0.8*"/>
|
|
|
<DataGridTextColumn Binding="{Binding AlreadySecondNumber,StringFormat=\{0:0.######\}}" Header="已配辅数量" Width="0.8*"/>
|
|
|
</DataGrid.Columns>
|
|
|
</DataGrid>
|
|
|
</Border>
|
|
|
|
|
|
<StackPanel Grid.Row="1" Grid.Column="2" HorizontalAlignment="Center">
|
|
|
<WrapPanel>
|
|
|
<TextBlock Text="发货日期"/>
|
|
|
<DatePicker SelectedDate="{Binding Date}" Width="150" Height="40" Margin="-0.2,0,0,0"/>
|
|
|
</WrapPanel>
|
|
|
<WrapPanel>
|
|
|
<TextBlock Text="仓库"/>
|
|
|
<TextBox x:Name="Store" Style="{StaticResource textBox}" Text="{Binding Store.Name}" PreviewMouseDown="BaseInfoBox_PreviewMouseDown"/>
|
|
|
</WrapPanel>
|
|
|
</StackPanel>
|
|
|
|
|
|
<StackPanel Grid.Row="2" Grid.Column="2">
|
|
|
<StackPanel.Resources>
|
|
|
<Style TargetType="TextBox" BasedOn="{StaticResource textBox}">
|
|
|
<EventSetter Event="PreviewMouseDown" Handler="InputBox_PreviewMouseDown"/>
|
|
|
</Style>
|
|
|
</StackPanel.Resources>
|
|
|
<Button Content="按备货发货" Width="160" Height="55" Margin="0,20" IsEnabled="{Binding Dmo ,Converter={StaticResource TrueToFalseConverter}}" PreviewMouseDown="SendAsDmo_PreviewMouseDown"/>
|
|
|
<WrapPanel HorizontalAlignment="Center">
|
|
|
<TextBlock Text="件数"/>
|
|
|
<TextBox x:Name="number" Text="{Binding Number}"/>
|
|
|
</WrapPanel>
|
|
|
<WrapPanel HorizontalAlignment="Center">
|
|
|
<TextBlock Text="重量"/>
|
|
|
<TextBox x:Name="weight" Text="{Binding Weight}"/>
|
|
|
</WrapPanel>
|
|
|
<Button Content="确认" Width="160" Height="55" Margin="0,20" IsEnabled="{Binding CanSave}" PreviewMouseDown="SaveBtn_PreviewMouseDown"/>
|
|
|
</StackPanel>
|
|
|
|
|
|
<WrapPanel Grid.Row="3" Grid.Column="1" VerticalAlignment="Center">
|
|
|
<WrapPanel.Resources>
|
|
|
<Style TargetType="Button" BasedOn="{StaticResource DefaultButton}">
|
|
|
<Setter Property="Width" Value="120"/>
|
|
|
<Setter Property="Height" Value="55"/>
|
|
|
</Style>
|
|
|
</WrapPanel.Resources>
|
|
|
<TextBlock Text="送货线路" VerticalAlignment="Center" Margin="20,0,10,0"/>
|
|
|
<Button x:Name="DriverGoodsLine" PreviewMouseDown="BaseInfoBox_PreviewMouseDown">
|
|
|
<Button.Content>
|
|
|
<TextBlock Text="{Binding DriverGoodsLine.Name}" Style="{x:Null}"/>
|
|
|
</Button.Content>
|
|
|
</Button>
|
|
|
</WrapPanel>
|
|
|
<WrapPanel Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right">
|
|
|
<WrapPanel.Resources>
|
|
|
<Style TargetType="Button" BasedOn="{StaticResource DefaultButton}">
|
|
|
<Setter Property="Width" Value="120"/>
|
|
|
<Setter Property="Height" Value="55"/>
|
|
|
<Setter Property="Margin" Value="10,0"/>
|
|
|
</Style>
|
|
|
</WrapPanel.Resources>
|
|
|
<Button Content="配货完成" IsEnabled="{Binding Dmo ,Converter={StaticResource TrueToFalseConverter}}" PreviewMouseDown="FinishBtn_PreviewMouseDown"/>
|
|
|
|
|
|
</WrapPanel>
|
|
|
</Grid>
|
|
|
</Window>
|