步步为盈
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.

148 lines
9.2 KiB

<UserControl x:Class="BBWY.Client.Views.FallWare.WareFallWareListControl"
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.FallWare"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:ctr="clr-namespace:BBWY.Client.Converters" Background="White"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:packtask ="clr-namespace:BBWY.Client.Views.PackTask"
xmlns:sealbox="clr-namespace:BBWY.Client.Views.SealBox"
xmlns:fallware="clr-namespace:BBWY.Client.Views.FallWare"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
DataContext="{Binding WareHouseList,Source={StaticResource Locator}}"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1500">
<UserControl.Resources>
<ObjectDataProvider x:Key="storageTypeProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="cmodel:StorageType"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ctr:OrderStorageTypeOptionConverter x:Key="ostConverter"/>
<ctr:ProfitRatioConverter x:Key="profitRatioConverter"/>
<ctr:WaybillNoConverter x:Key="waybillConverter"/>
<ctr:MultiParameterTransferConverter x:Key="mptConverter"/>
<ctr:SaleGrossProfitConverter x:Key="sgpcConverter"/>
<Style TargetType="RadioButton">
<Setter Property="IsChecked" Value="False" />
<Setter Property="Background" Value="#8080FF" />
<Setter Property="Foreground" Value="Black" />
<!--<Setter Property="Content" Value="{Binding ElementName=txt,Path=Text}"/>-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#F2F2F2" >
<Rectangle x:Name="_Rect" Fill="#F2F2F2" HorizontalAlignment="Center" Height="35" 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>
</UserControl.Resources>
<Grid>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="50,15,0,0"
>
<c:BTextBox x:Name="tbShop" Width="150" Height="30" TextChanged="tbShop_TextChanged" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></c:BTextBox>
<ListBox MaxHeight="300" x:Name="tipBoxShop" SelectionChanged="tipBoxShop_SelectionChanged" Background="{StaticResource Border.Background}">
</ListBox>
</StackPanel>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="54"/>
<RowDefinition Height="40"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Background="{StaticResource Border.Background}" Grid.Row="0" HorizontalAlignment="Stretch" Panel.ZIndex="999" Margin="0,5,0,0" >
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Height="30" >
<StackPanel.Resources>
<Style TargetType="DatePickerTextBox">
<Setter Property="IsReadOnly" Value="True"/>
</Style>
</StackPanel.Resources>
<TextBlock x:Name="textblock_shop" Text="店铺:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Name="btbShopName" Width="150" Visibility="Hidden" Margin="5,0,0,0" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"/>
<TextBlock Text="任务ID:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchTaskId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark=""/>
<StackPanel Orientation="Horizontal" >
<TextBlock Text="封箱ID:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchSealBoxId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark=""/>
</StackPanel>
<TextBlock Text="SKU:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" WaterRemark="" Text="{Binding SearchSkuId,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Height="30" Grid.Row="1">
</StackPanel>
<Grid Grid.Column="1" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Content="搜索" Width="94" Height="30" HorizontalAlignment="Left" Margin="0,0,0,0"
Command="{Binding SearchTaskCommand}"
Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/>
</Grid>
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<RadioButton Content="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待落仓:待贴单:待封箱}" Height="35" Width="130" Tag="{Binding FallWareConfiguredCount,Mode=TwoWay}" IsChecked="{Binding SealBoxConfigureType,Converter={StaticResource objConverter},ConverterParameter=已配置:True:False}"
Command="{Binding SetSealBoxConfigureTypeCommand}" CommandParameter="{x:Static cmodel:SealBoxConfigureType.已配置}"
/>
<RadioButton Content="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待落仓:待同步采购单:待配置}" Height="35" Width="130" Tag="{Binding FallWareWaitConfigureCount,Mode=TwoWay}" IsChecked="{Binding SealBoxConfigureType,Converter={StaticResource objConverter},ConverterParameter=待配置:True:False}"
Command="{Binding SetSealBoxConfigureTypeCommand}" CommandParameter="{x:Static cmodel:SealBoxConfigureType.待配置}"
/>
</StackPanel>
<Grid Grid.Row="2"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待落仓:Visible:Collapsed}"
>
<packtask:WaitFallWareControl/>
</Grid>
<Grid Grid.Row="2"
Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待封箱:Visible:Collapsed}"
>
<packtask:WaitSealBoxControl
Visibility="{Binding SealBoxConfigureType,Converter={StaticResource objConverter},ConverterParameter=已配置:Visible:Collapsed}"
/>
<sealbox:SealBoxNoConfigureControl
Visibility="{Binding SealBoxConfigureType,Converter={StaticResource objConverter},ConverterParameter=待配置:Visible:Collapsed}"
/>
</Grid>
</Grid>
</Grid>
</UserControl>