348 lines
10 KiB
XML
348 lines
10 KiB
XML
<basewindows:BaseWindow
|
||
x:Class="_29WxOrderWpf.Windows.OrderWindows.BuyMapSkuSelectWindow"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:basewindows="clr-namespace:_29WxOrderWpf.BaseWindows"
|
||
xmlns:buyerctrls="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:local="clr-namespace:_29WxOrderWpf.Windows.OrderWindows"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:skudata="clr-namespace:AllBase.Model.Result;assembly=29WxOrderAllBase"
|
||
xmlns:userctrls="clr-namespace:_29WxOrderWpf.UserControls"
|
||
Title="SkuSelectWindow"
|
||
Width="1360"
|
||
Height="768"
|
||
d:Height="700"
|
||
d:Width="1200"
|
||
FontSize="15"
|
||
Loaded="SkuSelectWindow_Loaded"
|
||
ResizeMode="NoResize"
|
||
Style="{StaticResource BaseNoneBorderWindowStyle}"
|
||
mc:Ignorable="d">
|
||
<Window.Resources>
|
||
<!--<x:Array x:Key="frontSkuInfo" Type="skudata:frontSkuInfo3">
|
||
<skudata:frontSkuInfo3 />
|
||
</x:Array>-->
|
||
</Window.Resources>
|
||
<Grid
|
||
x:Name="mainGrid"
|
||
Margin="2"
|
||
Background="Transparent"
|
||
MouseLeftButtonDown="gridTitle_MouseLeftButtonDown">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="50" />
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
<Grid x:Name="gridTitle">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="auto" />
|
||
<ColumnDefinition Width="auto" />
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
</Grid.ColumnDefinitions>
|
||
<Image
|
||
Width="50"
|
||
Height="50"
|
||
Margin="4"
|
||
HorizontalAlignment="Left"
|
||
VerticalAlignment="Center"
|
||
Source="{StaticResource main29WeixinIcon}" />
|
||
<Label
|
||
x:Name="lblAppName"
|
||
Grid.Column="1"
|
||
Margin="0,0,0,0"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
VerticalContentAlignment="Center"
|
||
Content="选择SKU规格"
|
||
FontSize="20"
|
||
Foreground="{StaticResource mainColorLightBrush}" />
|
||
</Grid>
|
||
<Border
|
||
Grid.Row="1"
|
||
Padding="40,20"
|
||
Background="White">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" MinHeight="50" />
|
||
<RowDefinition Height="Auto" MinHeight="50" />
|
||
<RowDefinition Height="*" MinHeight="50" />
|
||
<RowDefinition Height="Auto" MinHeight="50" />
|
||
</Grid.RowDefinitions>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="auto" MinWidth="100" />
|
||
<ColumnDefinition />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock
|
||
Grid.Row="0"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Top"
|
||
FontSize="15"
|
||
Text="订单商品:" />
|
||
<Grid Grid.Column="1">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="auto" />
|
||
<ColumnDefinition />
|
||
</Grid.ColumnDefinitions>
|
||
<Image
|
||
x:Name="imgSku"
|
||
Grid.Row="0"
|
||
Grid.Column="0"
|
||
Width="100"
|
||
Height="100"
|
||
Margin="8"
|
||
VerticalAlignment="Top"
|
||
Cursor="Hand"
|
||
MouseDown="imgSku_MouseDown"
|
||
MouseEnter="imgSku_MouseEnter"
|
||
MouseLeave="imgSku_MouseLeave" />
|
||
<Grid
|
||
Grid.Column="1"
|
||
Margin="0,8"
|
||
VerticalAlignment="Center">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="auto" />
|
||
<RowDefinition Height="auto" />
|
||
<RowDefinition Height="auto" />
|
||
<RowDefinition Height="auto" />
|
||
<RowDefinition Height="auto" />
|
||
<RowDefinition Height="auto" />
|
||
<RowDefinition Height="auto" />
|
||
<RowDefinition Height="auto" />
|
||
<RowDefinition Height="auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<WrapPanel Visibility="{Binding ShopGoodsName, Converter={StaticResource HasTextVisibility}}">
|
||
<TextBox
|
||
VerticalAlignment="Top"
|
||
d:Opacity="0.5"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
IsReadOnly="True"
|
||
Text="店铺商品标题:"
|
||
TextWrapping="Wrap" />
|
||
<TextBox
|
||
VerticalAlignment="Top"
|
||
d:Opacity="0.5"
|
||
d:Text="店铺商品标题"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
IsReadOnly="True"
|
||
Text="{Binding ShopGoodsName}"
|
||
TextWrapping="Wrap" />
|
||
</WrapPanel>
|
||
<WrapPanel Grid.Row="1" Visibility="{Binding ShopSkuName, Converter={StaticResource HasTextVisibility}}">
|
||
<TextBox
|
||
VerticalAlignment="Top"
|
||
d:Opacity="0.5"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
IsReadOnly="True"
|
||
Text="店铺商品规格:"
|
||
TextWrapping="Wrap" />
|
||
<TextBox
|
||
Grid.Row="0"
|
||
VerticalAlignment="Top"
|
||
d:Opacity="0.5"
|
||
d:Text="店铺SKU规格"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
FontWeight="Bold"
|
||
IsReadOnly="True"
|
||
Text="{Binding ShopSkuName}"
|
||
TextWrapping="Wrap" />
|
||
</WrapPanel>
|
||
|
||
<WrapPanel Grid.Row="2" Visibility="{Binding ShopSkuPrice, Converter={StaticResource HasTextVisibility}}">
|
||
<TextBox
|
||
VerticalAlignment="Top"
|
||
d:Opacity="0.5"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
IsReadOnly="True"
|
||
Text="店铺规格单价:"
|
||
TextWrapping="Wrap" />
|
||
<TextBox
|
||
Grid.Row="0"
|
||
VerticalAlignment="Top"
|
||
d:Opacity="0.5"
|
||
d:Text="0.00"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
IsReadOnly="True"
|
||
Text="{Binding ShopSkuPrice}"
|
||
TextWrapping="Wrap" />
|
||
</WrapPanel>
|
||
</Grid>
|
||
</Grid>
|
||
<TextBlock
|
||
Grid.Row="1"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Top"
|
||
FontSize="15"
|
||
Text="关联商品:" />
|
||
<Grid Grid.Row="1" Grid.Column="1">
|
||
<ListBox
|
||
x:Name="lbxOrderItem"
|
||
Grid.Row="1"
|
||
Grid.Column="1"
|
||
Margin="7,0,7,0"
|
||
HorizontalContentAlignment="Stretch"
|
||
BorderThickness="0"
|
||
ItemsSource="{Binding BuyMapSkus}"
|
||
ScrollViewer.CanContentScroll="True"
|
||
VirtualizingPanel.ScrollUnit="Pixel">
|
||
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
||
<ListBox.ItemContainerStyle>
|
||
<Style TargetType="ListBoxItem">
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="ListBoxItem">
|
||
<ContentPresenter
|
||
Content="{TemplateBinding Content}"
|
||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
</ListBox.ItemContainerStyle>
|
||
<ListBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<!-- 此处绑定将数据源传递给子自定义控件OrderListRowCtrl -->
|
||
<!--<buyerctrls:SkuSelectListRowCtrl
|
||
VerticalAlignment="Center"
|
||
VerticalContentAlignment="Center"
|
||
DataContext="{Binding}" />-->
|
||
<RadioButton
|
||
MaxWidth="250"
|
||
Margin="0,0,12,0"
|
||
Click="RadioButton_Click"
|
||
IsChecked="{Binding IsChecked}">
|
||
<TextBox
|
||
VerticalAlignment="Top"
|
||
d:Opacity="0.5"
|
||
d:Text="商品标题"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
IsReadOnly="True"
|
||
Text="{Binding map_goods_name}"
|
||
TextWrapping="Wrap" />
|
||
</RadioButton>
|
||
</DataTemplate>
|
||
</ListBox.ItemTemplate>
|
||
<ListBox.ItemsPanel>
|
||
<ItemsPanelTemplate>
|
||
<!-- 单行横向,超出部分隐藏或滚动 -->
|
||
<StackPanel IsItemsHost="True" Orientation="Horizontal" />
|
||
|
||
<!-- 若需自动换行,替换为以下 WrapPanel -->
|
||
<!-- <WrapPanel Orientation="Horizontal" IsItemsHost="True"/> -->
|
||
</ItemsPanelTemplate>
|
||
</ListBox.ItemsPanel>
|
||
</ListBox>
|
||
</Grid>
|
||
|
||
<TextBlock
|
||
Grid.Row="2"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Top"
|
||
FontSize="15"
|
||
Text="选择SKU:" />
|
||
<ListBox
|
||
x:Name="lbxSku"
|
||
Grid.Row="2"
|
||
Grid.Column="1"
|
||
Margin="7,0,7,0"
|
||
HorizontalContentAlignment="Stretch"
|
||
BorderThickness="0"
|
||
ItemsSource="{Binding FrontSkuInfos}"
|
||
ScrollViewer.CanContentScroll="True"
|
||
VirtualizingPanel.ScrollUnit="Pixel">
|
||
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
||
<ListBox.ItemContainerStyle>
|
||
<Style TargetType="ListBoxItem">
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="ListBoxItem">
|
||
<ContentPresenter
|
||
Content="{TemplateBinding Content}"
|
||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
</ListBox.ItemContainerStyle>
|
||
<ListBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<!-- 此处绑定将数据源传递给子自定义控件OrderListRowCtrl -->
|
||
<buyerctrls:SkuSelectListRowCtrl
|
||
VerticalAlignment="Center"
|
||
VerticalContentAlignment="Center"
|
||
DataContext="{Binding}" />
|
||
</DataTemplate>
|
||
</ListBox.ItemTemplate>
|
||
</ListBox>
|
||
<Button
|
||
x:Name="btnAdd"
|
||
Grid.Row="3"
|
||
Grid.Column="1"
|
||
MinWidth="48"
|
||
MinHeight="28"
|
||
Padding="4"
|
||
HorizontalAlignment="Left"
|
||
VerticalAlignment="Center"
|
||
d:Visibility="Visible"
|
||
Click="btnAdd_Click"
|
||
Content="添 加"
|
||
Style="{StaticResource BasePageButtonStyle}"
|
||
Visibility="Collapsed" />
|
||
<Image
|
||
x:Name="imgLoading"
|
||
Grid.Row="9"
|
||
Grid.Column="1"
|
||
Width="20"
|
||
Height="20"
|
||
Margin="52,0,0,0"
|
||
HorizontalAlignment="Left"
|
||
d:Visibility="Visible"
|
||
IsEnabled="False"
|
||
Source="{StaticResource imgLoadingPic}"
|
||
Visibility="Collapsed">
|
||
<Image.RenderTransform>
|
||
<RotateTransform Angle="45" CenterX="10" CenterY="10" />
|
||
</Image.RenderTransform>
|
||
<Image.Triggers>
|
||
<EventTrigger RoutedEvent="Image.Loaded">
|
||
<BeginStoryboard>
|
||
<Storyboard>
|
||
<DoubleAnimation
|
||
RepeatBehavior="Forever"
|
||
Storyboard.TargetName="imgLoading"
|
||
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
||
From="0"
|
||
To="360"
|
||
Duration="0:0:3" />
|
||
</Storyboard>
|
||
</BeginStoryboard>
|
||
</EventTrigger>
|
||
</Image.Triggers>
|
||
</Image>
|
||
<Label
|
||
x:Name="lblMsg"
|
||
Grid.Row="9"
|
||
Grid.Column="1"
|
||
Margin="70,0,0,0"
|
||
Foreground="{StaticResource PageWarningBrushCC}" />
|
||
</Grid>
|
||
</Border>
|
||
<userctrls:UcWindowBoxes
|
||
x:Name="ucWindowBox"
|
||
Margin="4"
|
||
HorizontalAlignment="Right"
|
||
VerticalAlignment="Top"
|
||
MaxBoxVisibility="Visible" />
|
||
</Grid>
|
||
</basewindows:BaseWindow>
|