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

151 lines
12 KiB

<Page x:Class="BBWY.Client.Views.BatchPurchase.BatchPurchaseOrderList"
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:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:BBWY.Client.Views.BatchPurchase"
mc:Ignorable="d"
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
d:DesignHeight="1080" d:DesignWidth="1920"
Title="BatchPurchaseOrderList"
DataContext="{Binding BatchPurchaseOrderListVM,Source={StaticResource Locator}}">
<Page.Resources>
<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>
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999"/>
<Grid Margin="5,0">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="5"/>
<RowDefinition Height="30"/>
<RowDefinition Height="5"/>
<RowDefinition Height="30"/>
<RowDefinition Height="5"/>
<RowDefinition Height="30"/>
<RowDefinition/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Grid Background="{StaticResource Border.Background}" HorizontalAlignment="Left" Height="75" Panel.ZIndex="999">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<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="5,0,0,0"/>
<DatePicker SelectedDate="{Binding StartDate}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/>
<DatePicker SelectedDate="{Binding EndDate}" Width="133.5" Height="30" VerticalContentAlignment="Center" FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/>
<TextBlock Text="采购单" VerticalAlignment="Center" Margin="5,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchPurchaseOrderId}" WaterRemark="精确匹配"/>
<TextBlock Text="SPU" VerticalAlignment="Center" Margin="5,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" WaterRemark="精确匹配" Text="{Binding SearchProductId}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0,0,0,5" Height="30">
<c:BButton Content="今天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d0}"/>
<c:BButton Content="昨天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d1}"/>
<c:BButton Content="近3天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d3}"/>
<c:BButton Content="近7天" Width="50" Height="24" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d7}"/>
<c:BButton Content="近15天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d15}"/>
<c:BButton Content="近30天" Width="50" Height="25" Margin="5,0,0,0"
Command="{Binding SetSearchDateCommand}"
CommandParameter="{StaticResource d30}"/>
<TextBlock VerticalAlignment="Center" Margin="5,0,0,0" Text="采购商"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchPurchaseName}" WaterRemark="精确匹配"/>
<TextBlock Text="SKU" VerticalAlignment="Center" Margin="5,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchSkuId}" WaterRemark="精确匹配"/>
<c:BButton Content="同步" Width="50" Margin="5,0,0,0" Command="{Binding SyncOrderCommand}" ToolTipService.InitialShowDelay="0" ToolTipService.ShowDuration="10000"
Visibility="Collapsed">
<c:BButton.ToolTip>
<StackPanel>
<TextBlock Text="1.使用筛选条件中的开始时间和结束时间进行同步"/>
<TextBlock Text="2.从开始时间起每次同步3小时时长的订单直到到达结束时间"/>
<TextBlock Text="3.已存在未结束的同步任务将不会重复执行"/>
</StackPanel>
</c:BButton.ToolTip>
</c:BButton>
</StackPanel>
<Grid Grid.Column="1" Grid.RowSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Content="搜索" Width="50" VerticalAlignment="Stretch" Margin="5,0,0,0" Command="{Binding SearchPurchaseOrderCommand}"
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/>
<Button Content="导出" Command="{Binding ExportCommand}" Width="50" Grid.Column="1"
Visibility="{Binding Visibility,ElementName=listbox_order}" Background="#1CC2A2" BorderThickness="0" Foreground="White"/>
<!--<Button Content="同步" Command="{Binding SyncOrderCommand}" Width="50" Grid.Column="1" Grid.Row="1"
Visibility="{Binding Visibility,ElementName=listbox_order}" Background="#02A7F0" BorderThickness="0" Foreground="White"/>-->
</Grid>
</Grid>
<StackPanel Grid.Row="2" HorizontalAlignment="Left" Orientation="Horizontal">
<c:BButton Content="新建采购单" Padding="10,0" Margin="0,0,10,0" Background="#2879FF"
Command="{Binding OpenCreateNewPurchaseOrderDialogCommand}"/>
<c:BButton Content="全部" Width="100" Margin="5,0,0,0"
Background="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=#null:#8080FF:#F2F2F2}"
Foreground="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=#null:White:#4A4A4A}"
Command="{Binding SetPurchaseOrderStateCommand}" CommandParameter="{x:Null}"/>
<c:BButton Content="待付款" Width="100"
Background="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待付款:#8080FF:#F2F2F2}"
Foreground="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待付款:White:#4A4A4A}"
Command="{Binding SetPurchaseOrderStateCommand}" CommandParameter="{x:Static cmodel:PurchaseOrderState.待付款}"/>
<c:BButton Content="待发货" Width="100"
Background="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待发货:#8080FF:#F2F2F2}"
Foreground="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待发货:White:#4A4A4A}"
Command="{Binding SetPurchaseOrderStateCommand}" CommandParameter="{x:Static cmodel:PurchaseOrderState.待发货}"/>
<c:BButton Content="待收货" Width="100"
Background="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待收货:#8080FF:#F2F2F2}"
Foreground="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待收货:White:#4A4A4A}"
Command="{Binding SetPurchaseOrderStateCommand}" CommandParameter="{x:Static cmodel:PurchaseOrderState.待收货}"/>
<c:BButton Content="待质检" Width="100"
Background="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待质检:#8080FF:#F2F2F2}"
Foreground="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待质检:White:#4A4A4A}"
Command="{Binding SetPurchaseOrderStateCommand}" CommandParameter="{x:Static cmodel:PurchaseOrderState.待质检}"/>
<c:BButton Content="待打包" Width="100"
Background="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待打包:#8080FF:#F2F2F2}"
Foreground="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待打包:White:#4A4A4A}"
Command="{Binding SetPurchaseOrderStateCommand}" CommandParameter="{x:Static cmodel:PurchaseOrderState.待打包}"/>
<c:BButton Content="待结算" Width="100"
Background="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待结算:#8080FF:#F2F2F2}"
Foreground="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=待结算:White:#4A4A4A}"
Command="{Binding SetPurchaseOrderStateCommand}" CommandParameter="{x:Static cmodel:PurchaseOrderState.待结算}"/>
<c:BButton Content="已完成" Width="100"
Background="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=已完成:#8080FF:#F2F2F2}"
Foreground="{Binding PurchaseOrderState,Converter={StaticResource objConverter},ConverterParameter=已完成:White:#4A4A4A}"
Command="{Binding SetPurchaseOrderStateCommand}" CommandParameter="{x:Static cmodel:PurchaseOrderState.已完成}"/>
</StackPanel>
</Grid>
</Grid>
</Page>