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.

772 lines
58 KiB

<Page x:Class="BBWYB.Client.Views.Order.OrderList"
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:cmodel="clr-namespace:BBWYB.Client.Models"
xmlns:local="clr-namespace:BBWYB.Client.Views.Order"
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
xmlns:ctr="clr-namespace:BBWYB.Client.Converters"
DataContext="{Binding OrderVM,Source={StaticResource Locator}}"
d:DesignHeight="1080" d:DesignWidth="1920"
Title="OrderList">
<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>
<ctr:SaleGrossProfitConverter x:Key="sgpConverter"/>
</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/>
<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 SearchOrderId}" WaterRemark="精确匹配"/>
<TextBlock Text="SPU" VerticalAlignment="Center" Margin="5,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" WaterRemark="精确匹配" Text="{Binding SearchProductId}"/>
<TextBlock Text="SKU" VerticalAlignment="Center" Margin="5,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchSku}" WaterRemark="精确匹配"/>
<!--<TextBlock Text="下单账号" VerticalAlignment="Center" Margin="5,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" WaterRemark="暂不支持" IsEnabled="False"
DisableBgColor="{StaticResource TextBox.Disable.BgColor}"/>-->
</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}"/>
2 years ago
<TextBlock Text="采购单" VerticalAlignment="Center" Margin="5,0,0,0"/>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchPurchaseOrderId}" WaterRemark="精确匹配"/>
<TextBlock VerticalAlignment="Center" Margin="5,0,0,0">
<Run Text="下单"/>
<LineBreak/>
<Run Text="店铺"/>
</TextBlock>
2 years ago
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchSourceShopName}" WaterRemark="模糊匹配"/>
<TextBlock VerticalAlignment="Center" Margin="5,0,0,0">
<Run Text="下单"/>
<LineBreak/>
<Run Text="SKU"/>
</TextBlock>
<c:BTextBox Width="150" Margin="5,0,0,0" Text="{Binding SearchSourceSku}" WaterRemark="精确匹配" Visibility="{Binding Visibility,ElementName=listbox_order}"/>
<c:BButton Content="同步" Width="50" Margin="5,0,0,0" 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>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Content="搜索" Width="50" VerticalAlignment="Stretch" Margin="5,0,0,0" Command="{Binding SearchOrderCommand}"
Grid.RowSpan="2" Background="{StaticResource Button.Selected.Background}" BorderThickness="0" Foreground="White"/>
<Button Content="导出" Command="{Binding ExportCommand}" Width="50" Grid.Column="1"
Background="#1CC2A2" BorderThickness="0" Foreground="White"/>
<Button Content="同步" Command="{Binding SyncOrderCommand}" Width="50" Grid.Column="1" Grid.Row="1"
Background="#02A7F0" BorderThickness="0" Foreground="White"/>
</Grid>
</Grid>
<StackPanel Grid.Row="2" HorizontalAlignment="Left" Orientation="Horizontal">
<c:BButton Content="全部订单" Width="100"
Command="{Binding SetOrderStateCommand}" CommandParameter="{x:Null}"
Background="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=#null:#8080FF:#F2F2F2}"
Foreground="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=#null:White:#4A4A4A}"/>
2 years ago
<c:BButton Width="100"
Background="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待付款:#8080FF:#F2F2F2}"
Foreground="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待付款:White:#4A4A4A}"
Command="{Binding SetOrderStateCommand}" CommandParameter="{x:Static cmodel:OrderState.待付款}">
<c:BButton.Content>
<TextBlock>
<Run Text="待付款"/>
<!--<Run Text="{Binding WaitPurchaseOrderCount,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Foreground="{StaticResource Text.Pink}"/>-->
</TextBlock>
</c:BButton.Content>
</c:BButton>
<c:BButton Width="100"
Background="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=等待采购:#8080FF:#F2F2F2}"
Foreground="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=等待采购:White:#4A4A4A}"
Command="{Binding SetOrderStateCommand}" CommandParameter="{x:Static cmodel:OrderState.等待采购}">
<c:BButton.Content>
<TextBlock>
<Run Text="等待采购"/>
2 years ago
<!--<Run Text="{Binding WaitPurchaseOrderCount,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Foreground="{StaticResource Text.Pink}"/>-->
</TextBlock>
</c:BButton.Content>
</c:BButton>
2 years ago
<c:BButton Width="100"
Background="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待配置:#8080FF:#F2F2F2}"
Foreground="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待配置:White:#4A4A4A}"
Command="{Binding SetOrderStateCommand}" CommandParameter="{x:Static cmodel:OrderState.待配置}">
<c:BButton.Content>
<TextBlock>
<Run Text="待配置"/>
<!--<Run Text="{Binding WaitOutStoreCount,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Foreground="{StaticResource Text.Pink}"/>-->
</TextBlock>
</c:BButton.Content>
</c:BButton>
<c:BButton Width="100"
Background="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待出库:#8080FF:#F2F2F2}"
Foreground="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待出库:White:#4A4A4A}"
Command="{Binding SetOrderStateCommand}" CommandParameter="{x:Static cmodel:OrderState.待出库}">
<c:BButton.Content>
<TextBlock>
<Run Text="待出库"/>
2 years ago
<!--<Run Text="{Binding WaitOutStoreCount,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Foreground="{StaticResource Text.Pink}"/>-->
</TextBlock>
</c:BButton.Content>
</c:BButton>
<c:BButton Content="待收货" Width="100"
Background="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待收货:#8080FF:#F2F2F2}"
Foreground="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待收货:White:#4A4A4A}"
Command="{Binding SetOrderStateCommand}" CommandParameter="{x:Static cmodel:OrderState.待收货}"/>
<c:BButton Content="已完成" Width="100"
Background="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=已完成:#8080FF:#F2F2F2}"
Foreground="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=已完成:White:#4A4A4A}"
Command="{Binding SetOrderStateCommand}" CommandParameter="{x:Static cmodel:OrderState.已完成}"/>
<c:BButton Content="已取消" Width="100"
2 years ago
Background="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=已取消:#8080FF:#F2F2fF2}"
Foreground="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=已取消:White:#4A4A4A}"
2 years ago
Command="{Binding SetOrderStateCommand}" CommandParameter="{x:Static cmodel:OrderState.已取消}"/>
</StackPanel>
2 years ago
<!--<Border x:Name="bd_statistics" Grid.RowSpan="3" HorizontalAlignment="Right" Padding="15,0" TextBlock.Foreground="{StaticResource Text.Color}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.4*"/>
<ColumnDefinition Width="0.4*"/>
<ColumnDefinition Width="0.2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<Grid Grid.ColumnSpan="3" Grid.RowSpan="2" Margin="-10,0">
<Grid.Effect>
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="#DCDCDC"/>
</Grid.Effect>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<Border Background="{StaticResource Button.Selected.Background}">
</Border>
<Border Background="white" Grid.Row="1">
</Border>
</Grid>
<TextBlock VerticalAlignment="Center" Foreground="White">
<Run Text="成交额"/>
<LineBreak/>
<Run Text="{Binding ToDayOrderAchievement.SaleAmount}" FontSize="24"/>
</TextBlock>
<TextBlock Grid.Column="1" VerticalAlignment="Center" Foreground="White" Margin="10,0">
<Run Text="利润至"/>
<Run Text="{Binding ToDayOrderAchievement.PularizeEndDate,StringFormat=yyyy-MM-dd}"/>
<LineBreak/>
<Run Text="{Binding ToDayOrderAchievement.Profit}" FontSize="24"/>
<Run Text="{Binding ToDayOrderAchievement.ProfitRaito,StringFormat=({0}%)}"/>
</TextBlock>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Foreground="White">
<Run Text="总单量"/>
<LineBreak/>
<Run Text="{Binding ToDayOrderAchievement.OrderCount}" FontSize="24"/>
</TextBlock>
<StackPanel Grid.Row="1" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Margin="0,0,0,5">
<TextBlock>
<Run Text="货物成本"/>
<Run Text="{Binding ToDayOrderAchievement.PurchaseAmount}"/>
</TextBlock>
</StackPanel>
<TextBlock>
<Run Text="平台扣点"/>
<Run Text="{Binding ToDayOrderAchievement.PlatformCommissionAmount}"/>
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="10,0">
<StackPanel Orientation="Horizontal" Margin="0,0,0,5">
<TextBlock>
<Run Text="推广成本"/>
<Run Text="{Binding ToDayOrderAchievement.AdvCost}"/>
</TextBlock>
<Path Style="{StaticResource path_question}" Fill="{StaticResource Text.Pink}" Width="14" Margin="5,0,0,0"
ToolTipService.InitialShowDelay="0"
ToolTipService.ShowDuration="20000">
<Path.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<StackPanel>
<ListBox ItemsSource="{Binding ToDayOrderAchievement.ShoppopularizeList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
Style="{StaticResource NoScrollViewListBoxStyle}"
Foreground="{StaticResource Text.Color}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock>
<Run Text="{Binding ItemName}"/>
<Run Text="{Binding Cost}"/>
</TextBlock>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock>
<Run Text="SD成本"/>
<Run Text="{Binding ToDayOrderAchievement.SdCost}"/>
</TextBlock>
</StackPanel>
</ToolTip>
</Path.ToolTip>
</Path>
</StackPanel>
<TextBlock>
<Run Text="人工成本"/>
<Run Text="{Binding ToDayOrderAchievement.EmployereCost}"/>
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center">
<TextBlock Margin="0,0,0,5">
<Run Text="销售运费"/>
<Run Text="{Binding ToDayOrderAchievement.DeliveryExpressFreight}"/>
</TextBlock>
<TextBlock>
<Run Text="税务成本"/>
<Run Text="{Binding ToDayOrderAchievement.TaxCost}"/>
</TextBlock>
</StackPanel>
</Grid>
2 years ago
</Border>-->
<Border Grid.Row="4" Background="{StaticResource Border.Background}"
Visibility="{Binding Visibility,ElementName=listbox_order}">
<StackPanel Orientation="Horizontal" >
<CheckBox Content="过滤已取消" Margin="5,0,0,0" IsChecked="{Binding ExcludeCanceled,Mode=OneWayToSource,UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>
</Border>
<Grid Grid.Row="6">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border BorderBrush="{StaticResource Border.Brush}" BorderThickness="1,1,1,0"
Background="#F2F2F2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="351"/>
2 years ago
<ColumnDefinition Width="210"/>
2 years ago
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
<ColumnDefinition/>
2 years ago
<ColumnDefinition Width="98"/>
</Grid.ColumnDefinitions>
<TextBlock Text="商品信息" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="采购信息" Grid.Column="1" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="成本信息" Grid.Column="2" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="利润信息" Grid.Column="3" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="物流信息" Grid.Column="4" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="备注信息" Grid.Column="5" Style="{StaticResource middleTextBlock}"/>
<TextBlock Text="操作" Grid.Column="6" Style="{StaticResource middleTextBlock}"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="1"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="2"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="3"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="4"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="5"/>
<Border Width="1" HorizontalAlignment="Right" Background="{StaticResource Border.Brush}" Grid.Column="6"/>
</Grid>
</Border>
<ListBox x:Name="listbox_order"
Grid.Row="1"
ItemsSource="{Binding OrderList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
BorderBrush="{StaticResource Border.Brush}"
BorderThickness="1,1,1,0"
Foreground="{StaticResource Text.Color}"
Visibility="{Binding IncludeAfterOrder,Converter={StaticResource objConverter},ConverterParameter=true:Collapsed:Visible}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_order,Converter={StaticResource widthConverter},ConverterParameter=-0}"
MinHeight="185">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Background="#F2F2F2" Grid.ColumnSpan="2">
<StackPanel Orientation="Horizontal">
2 years ago
<TextBlock Text="{Binding StartTime,StringFormat=yyyy-MM-dd HH:mm:ss}" VerticalAlignment="Center" Margin="5,0,0,0"/>
<TextBlock VerticalAlignment="Center" Text="订单号:" Margin="5,0,0,0" />
<c:BButton Content="{Binding Id}" Style="{StaticResource LinkButton}"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding Id}" Margin="5,0,0,0"/>
<c:BButton x:Name="btn_orderState" Content="{Binding OrderState}" Margin="5,0,0,0" Height="25" Padding="5,0" Background="{StaticResource Text.Link.Color}"/>
<Border Width="1" Margin="5,5,0,5" Background="{StaticResource Border.Brush}"/>
2 years ago
<TextBlock VerticalAlignment="Center" Margin="5,0,0,0" Text="下单账号:"/>
<c:BButton Style="{StaticResource LinkButton}" Content="{Binding BuyerAccount}" Margin="5,0,0,0"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding BuyerAccount}"/>
2 years ago
<TextBlock VerticalAlignment="Center" Margin="5,0,0,0" Text="下单店铺:"/>
<c:BButton Style="{StaticResource LinkButton}" Content="{Binding SourceShopName}" Margin="5,0,0,0"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding SourceShopName}"/>
2 years ago
<TextBlock VerticalAlignment="Center" Margin="5,0,0,0" Text="店铺SKU:"/>
2 years ago
<c:BButton Style="{StaticResource LinkButton}" Content="{Binding SourceSku}" Margin="5,0,0,0"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding SourceSku}"/>
</StackPanel>
<Border VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="350"/>
2 years ago
<ColumnDefinition Width="210"/>
2 years ago
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
<ColumnDefinition/>
<!--<ColumnDefinition/>-->
2 years ago
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<ListBox x:Name="listbox_orerSku" ItemsSource="{Binding ItemList}"
Style="{StaticResource NoScrollViewListBoxStyle}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Width="{Binding ActualWidth,ElementName=listbox_orerSku}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--{Binding Logo}-->
<c:BAsyncImage UrlSource="{Binding Logo}"
Width="80" DecodePixelWidth="80"
2 years ago
VerticalAlignment="Top" Margin="0,5,0,5"
Cursor="Hand"/>
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="0,5,0,5">
<TextBlock TextTrimming="CharacterEllipsis">
<TextBlock.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<TextBlock Text="{Binding Title}"/>
</ToolTip>
</TextBlock.ToolTip>
<Run Text="SKU名称:"/>
<Run Text="{Binding Title}"/>
</TextBlock>
<TextBlock TextWrapping="Wrap">
<Run Text="单价:"/>
<Run Text="{Binding Price}"/>
</TextBlock>
<TextBlock TextWrapping="Wrap">
<Run Text="数量:"/>
<Run Text="{Binding ItemTotal}"/>
</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:"/>
2 years ago
<c:BButton Content="{Binding SkuId}" Style="{StaticResource LinkButton}"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Page}}}"
2 years ago
CommandParameter="{Binding SkuId}"
Margin=" 5,0,0,0"/>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<Border Grid.ColumnSpan="2" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"
DataContext="{Binding DataContext,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
Visibility="{Binding ItemList.Count,Converter={StaticResource objConverter},ConverterParameter=1:Collapsed:Visible}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
2 years ago
<Border Width="1" Background="{StaticResource Border.Brush}" HorizontalAlignment="Right"/>
2 years ago
<Border Width="1" Background="{StaticResource Border.Brush}" Grid.Column="1" HorizontalAlignment="Right"/>
<Border Width="1" Background="{StaticResource Border.Brush}" Grid.Column="2" HorizontalAlignment="Right"/>
<Border Width="1" Background="{StaticResource Border.Brush}" Grid.Column="3" HorizontalAlignment="Right"/>
<Border Width="1" Background="{StaticResource Border.Brush}" Grid.Column="4" HorizontalAlignment="Right"/>
<Border Width="1" Background="{StaticResource Border.Brush}" Grid.Column="5" HorizontalAlignment="Right"/>
2 years ago
<c:BButton Content="采购" Grid.Column="1" Width="100"
2 years ago
Command="{Binding DataContext.OnlinePurchaseCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
2 years ago
CommandParameter="{Binding }">
<c:BButton.Visibility>
<MultiBinding Converter="{StaticResource mobjConverter}"
ConverterParameter="已取消;true:|:Collapsed:Visible:1">
<Binding Path="OrderState"/>
<Binding Path="IsPurchased"/>
</MultiBinding>
</c:BButton.Visibility>
</c:BButton>
2 years ago
<ListBox Grid.Column="1"
Visibility="{Binding IsPurchased,ConverterParameter=true:Visible:Collapsed,Converter={StaticResource objConverter}}"
ItemsSource="{Binding OrderPurchaseInfoList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
Style="{StaticResource NoScrollViewListBoxStyle}"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Grid.Column="1" Margin="0,0,0,10">
<TextBlock>
<Run Text="采购方式:"/>
<Run Text="{Binding PurchaseMethod}"/>
</TextBlock>
<TextBlock>
<Run Text="采购平台:"/>
<Run Text="{Binding PurchasePlatform}"/>
</TextBlock>
<TextBlock>
<Run Text="采购商家:"/>
<Run Text="{Binding PurchaserName}"/>
</TextBlock>
<TextBlock>
<Run Text="采购账号:"/>
<Run Text="{Binding PurchaseAccountName}"/>
</TextBlock>
2 years ago
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="采购单号:"/>
<c:BButton Style="{StaticResource LinkButton}" Content="{Binding PurchaseOrderId}" Margin="5,0,0,0"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
CommandParameter="{Binding PurchaseOrderId}"/>
</StackPanel>
2 years ago
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
2 years ago
2 years ago
<Border x:Name="bd_costbg" Background="#FCECEE" Grid.Column="2" Margin="0,0,1,0"
Visibility="{Binding IsCostException,ConverterParameter=true:Visible:Collapsed}"/>
<StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,10">
<StackPanel Orientation="Horizontal">
<TextBlock>
<Run Text="实收金额"/>
<Run Text="{Binding ActualAmount,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"/>
</TextBlock>
<Path Style="{StaticResource path_question}"
Width="14" Margin="5,0,0,0" Fill="{StaticResource Text.Pink}" ToolTipService.InitialShowDelay="0">
<Path.ToolTip>
<ToolTip Style="{StaticResource OrderCouponToolipStyle}">
<StackPanel>
<TextBlock>
<Run Text="货款金额"/>
<Run Text="{Binding OrderSellerPrice}"/>
</TextBlock>
<TextBlock>
<Run Text="用户支付运费"/>
<Run Text="{Binding FreightPrice}"/>
</TextBlock>
</StackPanel>
</ToolTip>
</Path.ToolTip>
</Path>
</StackPanel>
<StackPanel x:Name="sp_purchaseAmount" Orientation="Horizontal">
<TextBlock>
<Run Text="采购成本"/>
<Run Text="{Binding OrderCost.PurchaseAmount}"/>
</TextBlock>
</StackPanel>
<TextBlock>
<Run Text="成本总计"/>
<Run Text="{Binding OrderCost.TotalCost,Mode=OneWay}"/>
</TextBlock>
</StackPanel>
2 years ago
<!--<Border Height="1" Background="{StaticResource Border.Brush}" Grid.Column="2" VerticalAlignment="Bottom" Margin="0,0,0,23"
Visibility="{Binding Visibility,ElementName=btn_editCost}"/>-->
<!--<c:BButton x:Name="btn_editCost" Content="修改" Grid.Column="2" VerticalAlignment="Bottom"
2 years ago
Foreground="{StaticResource Text.Color}"
HorizontalAlignment="Stretch"
Background="White"
Margin="0,0,1,0"
Command="{Binding DataContext.EditCostCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
CommandParameter="{Binding }"
2 years ago
Height="23"/>-->
2 years ago
<StackPanel Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock>
2 years ago
<Run Text="利润"/>
<Run Text="{Binding OrderCost.Profit}"/>
</TextBlock>
2 years ago
<!--<TextBlock>
<Run Text="销售毛利率"/>
<Run>
<Run.Text>
<MultiBinding Converter="{StaticResource sgpConverter}">
<Binding Path="OrderCost.Profit"/>
<Binding Path="ActualAmount" Mode="OneWay"/>
</MultiBinding>
</Run.Text>
</Run>
2 years ago
</TextBlock>-->
<TextBlock>
2 years ago
<Run Text="利润率"/>
2 years ago
<Run Text="{Binding OrderCost.ProfitRatio,Mode=OneWay,StringFormat=\{0\}%}"/>
</TextBlock>
</StackPanel>
2 years ago
<Grid x:Name="sp_store" Grid.Column="4">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
2 years ago
<ListBox ItemsSource="{Binding OrderPurchaseInfoList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
Style="{StaticResource NoScrollViewListBoxStyle}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal"
Visibility="{Binding WaybillNo,ConverterParameter=#null:Collapsed:Visible,Converter={StaticResource objConverter}}">
<TextBlock>
<Run Text="物流状态:" Foreground="Black"/>
<Run Text="待对接" Foreground="{StaticResource Text.Link.Color}"/>
</TextBlock>
<TextBlock Margin="10,0,0,0">
<Run Text="{Binding SourceExpressName,StringFormat=\{0\}:}" Foreground="Black"/>
<Run Text="{Binding WaybillNo}"/>
</TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
2 years ago
<StackPanel Orientation="Horizontal">
<TextBlock>
<Run Text="收货人:" Foreground="Black"/>
<Run Text="{Binding Consignee.ContactName}"/>
</TextBlock>
<TextBlock Margin="10,0,0,0">
<Run Text="联系方式:" Foreground="Black"/>
<Run Text="{Binding Consignee.Mobile}"/>
</TextBlock>
</StackPanel>
<TextBlock TextWrapping="Wrap">
<Run Text="收货地址:" Foreground="Black"/>
<Run Text="{Binding Consignee.Address}"/>
</TextBlock>
</StackPanel>
<c:BButton x:Name="btn_outStore" Content="出库" VerticalAlignment="Bottom"
Foreground="{StaticResource Text.Color}"
HorizontalAlignment="Stretch"
Background="White"
Margin="0,0,1,0"
Height="25"
Visibility="{Binding OrderState,Converter={StaticResource objConverter},ConverterParameter=待出库:Visible:Collapsed}"
Command="{Binding DataContext.OutStockCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding }"/>
<Border Height="1" Background="{StaticResource Border.Brush}" VerticalAlignment="Bottom" Margin="0,0,0,25"
Visibility="{Binding Visibility,ElementName=btn_outStore}"/>
</Grid>
2 years ago
<StackPanel Orientation="Vertical" Grid.Column="5" Margin="5,5,5,0">
2 years ago
<StackPanel Visibility="{Binding BuyerRemark,ConverterParameter=#null:Collapsed:Visible,Converter={StaticResource objConverter}}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="买家备注"/>
<c:BButton Content="复制" Style="{StaticResource LinkButton}" Margin="5,0,0,0"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding BuyerRemark}"/>
</StackPanel>
<TextBlock Text="{Binding BuyerRemark}" TextWrapping="Wrap"/>
</StackPanel>
2 years ago
<StackPanel Visibility="{Binding PurchaseRemark,ConverterParameter=#null:Collapsed:Visible,Converter={StaticResource objConverter}}"
Margin="0,10,0,0">
<StackPanel Orientation="Horizontal">
2 years ago
<TextBlock Text="采购备注"/>
<c:BButton Content="复制" Style="{StaticResource LinkButton}" Margin="5,0,0,0"
Command="{Binding DataContext.CopyTextCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
2 years ago
CommandParameter="{Binding PurchaseRemark}"/>
</StackPanel>
2 years ago
<TextBlock Text="{Binding PurchaseRemark}" TextWrapping="Wrap"/>
</StackPanel>
</StackPanel>
2 years ago
2 years ago
<!--<StackPanel Height="70" Grid.Column="7" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Center">
2 years ago
<c:BButton Content="取消" Style="{StaticResource LinkButton}"
Command="{Binding DataContext.CancelOrderCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding Id}">
<c:BButton.Visibility>
<MultiBinding Converter="{StaticResource mobjConverter}"
ConverterParameter="已取消;true:|:Collapsed:Visible:1">
2 years ago
<Binding Path="OrderState" />
2 years ago
<Binding Path="IsPurchased"/>
</MultiBinding>
</c:BButton.Visibility>
</c:BButton>
2 years ago
<c:BButton Content="改价" Margin="5,0,0,0"
Command="{Binding DataContext.EditPriceCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding }"
Style="{StaticResource LinkButton}"
Visibility="{Binding OrderState,ConverterParameter=已取消:Collapsed:Visible,Converter={StaticResource objConverter}}"/>
2 years ago
<c:BButton Content="配置" Margin="5,0,0,0"
Command="{Binding DataContext.EditPackConfigCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
CommandParameter="{Binding }"
Style="{StaticResource LinkButton}"
Visibility="{Binding PackConfigState ,ConverterParameter=#null:Collapsed:Visible,Converter={StaticResource objConverter}}"/>
</StackPanel>-->
<ListBox Grid.Column="7"
Visibility="{Binding IsPurchased,ConverterParameter=true:Visible:Collapsed,Converter={StaticResource objConverter}}"
ItemsSource="{Binding ItemList}"
ItemContainerStyle="{StaticResource NoBgListBoxItemStyle}"
Style="{StaticResource NoScrollViewListBoxStyle}"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<StackPanel DataContext="{Binding DataContext,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}" MinHeight="90" Grid.Column="7" Orientation="Horizontal" HorizontalAlignment="Center">
<c:BButton Content="取消" Style="{StaticResource LinkButton}"
Command="{Binding DataContext.CancelOrderCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
CommandParameter="{Binding Id}">
<!--OrderId-->
<c:BButton.Visibility>
<MultiBinding Converter="{StaticResource mobjConverter}"
ConverterParameter="已取消;true:|:Collapsed:Visible:1">
<Binding Path="OrderState" />
<Binding Path="IsPurchased"/>
</MultiBinding>
</c:BButton.Visibility>
</c:BButton>
<c:BButton Content="改价" Margin="5,0,0,0"
Command="{Binding DataContext.EditPriceCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page }}}"
CommandParameter="{Binding }"
Style="{StaticResource LinkButton}"
Visibility="{Binding OrderState,ConverterParameter=已取消:Collapsed:Visible,Converter={StaticResource objConverter}}"/>
<c:BButton Content="配置" Margin="5,0,0,0"
Command="{Binding DataContext.EditPackConfigCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Page}}}"
CommandParameter="{Binding }"
Style="{StaticResource LinkButton}"
Visibility="{Binding PackConfigState ,ConverterParameter=#null:Collapsed:Visible,Converter={StaticResource objConverter}}"/>
</StackPanel>
<Border Grid.ColumnSpan="2" Margin="-20 0 -20 0" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"
DataContext="{Binding DataContext,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBox}}}"
Visibility="{Binding ItemList.Count,Converter={StaticResource objConverter},ConverterParameter=1:Collapsed:Visible}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Border Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
</Grid>
<Border Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="{StaticResource Border.Brush}"/>
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding OrderState}" Value="已取消">
<Setter TargetName="btn_orderState" Property="Background" Value="#EC808D"/>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
2 years ago
<c:PageControl PageIndex="{Binding PageIndex}"
PageSize="{Binding PageSize}"
RecordCount="{Binding OrderCount}"
Grid.Row="7"
HorizontalAlignment="Left">
<b:Interaction.Triggers>
<b:EventTrigger EventName="OnPageIndexChanged">
<b:InvokeCommandAction Command="{Binding OrderPageIndexChangedCommand}" PassEventArgsToCommand="True"/>
</b:EventTrigger>
</b:Interaction.Triggers>
</c:PageControl>
</Grid>
</Grid>
</Page>