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

220 lines
14 KiB

<Page x:Class="BBWY.Client.Views.PackTask.WareHouseList"
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.PackTask"
xmlns:fallware="clr-namespace:BBWY.Client.Views.FallWare"
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:ctr="clr-namespace:BBWY.Client.Converters"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
DataContext="{Binding WareHouseList,Source={StaticResource Locator}}"
mc:Ignorable="d" Background="White"
d:DesignHeight="450" d:DesignWidth="2048"
Title="TaskList">
<Page.Resources>
<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>
<!--<sys:Int32 x:Key="d0">0</sys:Int32>
<sys:Int32 x:Key="d1">1</sys:Int32>
<sys:Int32 x:Key="d3">2</sys:Int32>
<sys:Int32 x:Key="d7">6</sys:Int32>
<sys:Int32 x:Key="d15">14</sys:Int32>
<sys:Int32 x:Key="d30">29</sys:Int32>-->
</Page.Resources>
<Grid>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="810,15,0,0">
<c:BTextBox x:Name="tb" Width="150" Height="30" TextChanged="tb_TextChanged" Text="{Binding SearchDepartment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></c:BTextBox>
<ListBox MaxHeight="300" x:Name="tipBox" SelectionChanged="SelectionChangeCommand" Background="{StaticResource Border.Background}">
</ListBox>
</StackPanel>
<StackPanel Panel.ZIndex="100" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" Margin="1009,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>
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/>
<Grid Margin="5,0">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="40"/>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
<!---->
</Grid.RowDefinitions>
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Left" Panel.ZIndex="999" Margin="0,5,0,0" >
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0" Height="30" >
<StackPanel.Resources>
<Style TargetType="DatePickerTextBox">
<Setter Property="IsReadOnly" Value="True"/>
</Style>
</StackPanel.Resources>
<TextBlock Text="提交时间:" VerticalAlignment="Center" Margin="11,0,0,0"/>
<DatePicker SelectedDate="{Binding StartTime}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="10,0,0,0"/>
<DatePicker SelectedDate="{Binding EndTime}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="10,0,0,0"/>
<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=""/>
<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}"/>
<TextBlock Text="部门: " VerticalAlignment="Center" Margin="16,0,2,0"/>
<c:BTextBox Visibility="Hidden" Width="150" Height="30" TextChanged="tb_TextChanged" ></c:BTextBox>
<TextBlock x:Name="textblock_shop" Text="店铺:" VerticalAlignment="Center" Margin="16,0,0,0"/>
<c:BTextBox Name="btbShopName" Width="150" Margin="5,0,0,0" Text="{Binding SearchShopName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="店铺名称"/>
<TextBlock Text="物流单号:" VerticalAlignment="Center" Margin="10,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchWayBillNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="精准搜索"/>
<TextBlock Text="物流公司名称:" VerticalAlignment="Center" Margin="10,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchExpressName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" WaterRemark="模糊搜索"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Height="30" Grid.Row="1">
</StackPanel>
<Grid Grid.Column="1" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Content="搜索" Width="60" VerticalAlignment="Stretch" Margin="5,0,0,0"
Command="{Binding SearchTaskCommand}"
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/>
</Grid>
</Grid>
<StackPanel Grid.Row="1" Grid.RowSpan="1" HorizontalAlignment="Left" Orientation="Horizontal">
<RadioButton Height="35" Width="126" VerticalAlignment="Center" x:Name="qb" Content="全部" Command="{Binding SetTaskStateCommand}"
IsChecked="{Binding TaskState,Mode=TwoWay,Converter={StaticResource taskStateToBoolean},ConverterParameter=#null:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.未到货}" Content="未到货" Tag="{Binding NoArrivedCount,Mode=TwoWay}"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=未到货:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.部分到货}" Content="部分到货" Tag="{Binding SomeArrivedCount,Mode=TwoWay}"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=部分到货:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.待质检}" Tag="{Binding ArrivedCount,Mode=TwoWay}" Content="待质检"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待质检:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.待打包}" Content="待打包" Tag="{Binding WaitPackCount,Mode=TwoWay}"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待打包:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.待封箱}" Content="待封箱" Tag="{Binding WaitSealBoxCount,Mode=TwoWay}"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待封箱:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.待落仓}" Content="待落仓" Tag="{Binding WaitFallWareCount,Mode=TwoWay}"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待落仓:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.待出库}" Content="待出库" Tag="{Binding WaitOutbound,Mode=TwoWay}"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待出库:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已完成}" Content="已完成"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=已完成:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.商家自取}" Content="商家自取"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=商家自取:True:False}"
/>
<RadioButton Height="35" Width="126" VerticalAlignment="Center" Command="{Binding SetTaskStateCommand}" CommandParameter="{x:Static cmodel:TaskState.已取消}" Content="已取消"
IsChecked="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=已取消:True:False}"
/>
</StackPanel>
<Border Grid.Row="2" Margin="0,5,0,0" BorderBrush="{StaticResource Border.Brush}" BorderThickness="0,1,0,0"/>
<Border Grid.Row="3" Margin="0,0,0,0" BorderBrush="{StaticResource Border.Brush}" BorderThickness="0,1,0,0"
/>
<Grid Grid.Row="2" Margin="0,5,0,0">
<fallware:WareFallWareListControl Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待落仓:Visible:Collapsed}" />
<local:WareHouseListControl Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待封箱|待落仓:Collapsed:Visible}" />
<fallware:WareFallWareListControl Visibility="{Binding TaskState,Converter={StaticResource objConverter},ConverterParameter=待封箱:Visible:Collapsed}" />
</Grid>
<c:PageControl PageIndex="{Binding PageIndex,Mode=TwoWay}"
PageSize="{Binding PageSize,Mode=TwoWay}"
RecordCount="{Binding OrderCount,Mode=TwoWay}"
Grid.Row="3"
HorizontalAlignment="Left" Width="450">
<b:Interaction.Triggers>
<b:EventTrigger EventName="OnPageIndexChanged">
<b:InvokeCommandAction Command="{Binding TaskPageIndexChangedCommand}" PassEventArgsToCommand="True"/>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:PageControl>
</Grid>
</Grid>
</Page>