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.
203 lines
13 KiB
203 lines
13 KiB
<Page x:Class="BBWY.Client.Views.Setting.ShopSetting"
|
|
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.Setting"
|
|
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:cmodel="clr-namespace:BBWY.Client.Models"
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800"
|
|
Title="ShopSetting"
|
|
DataContext="{Binding ShopSetting,Source={StaticResource Locator}}">
|
|
<Page.Resources>
|
|
<sys:Int32 x:Key="p0">0</sys:Int32>
|
|
<sys:Int32 x:Key="p1">1</sys:Int32>
|
|
<sys:Int32 x:Key="p2">2</sys:Int32>
|
|
|
|
<ObjectDataProvider x:Key="PlatformProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="cmodel:Platform"/>
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
<Style x:Key="textblockPropertyStyle" TargetType="TextBlock">
|
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
</Style>
|
|
<Style x:Key="textboxValueStyle" TargetType="{x:Type c:BTextBox}">
|
|
<Setter Property="Width" Value="150"/>
|
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Height" Value="30"/>
|
|
<Setter Property="Background" Value="White"/>
|
|
<Setter Property="BorderBrush" Value="{StaticResource TextBox.BorderBrush}"/>
|
|
</Style>
|
|
</Page.Resources>
|
|
<b:Interaction.Triggers>
|
|
<b:EventTrigger EventName="Loaded">
|
|
<b:InvokeCommandAction Command="{Binding LoadCommand}"/>
|
|
</b:EventTrigger>
|
|
<b:EventTrigger EventName="Unloaded">
|
|
<b:InvokeCommandAction Command="{Binding UnloadCommand}"/>
|
|
</b:EventTrigger>
|
|
</b:Interaction.Triggers>
|
|
<Grid>
|
|
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999" Visibility="{Binding IsLoading,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}"/>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition/>
|
|
<RowDefinition Height="60"/>
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Orientation="Horizontal" Margin="20,0">
|
|
<TextBlock Text="管理密码" Style="{StaticResource textblockPropertyStyle}"/>
|
|
<c:BTextBox Grid.Column="1" Style="{StaticResource textboxValueStyle}"
|
|
DisableBgColor="{StaticResource TextBox.Disable.BgColor}"
|
|
PasswordStr="{Binding ManagePwd,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
|
IsPasswordBox="True"/>
|
|
|
|
<TextBlock Text="平台扣点(%)" Style="{StaticResource textblockPropertyStyle}" Margin="10,0,0,0"/>
|
|
<c:BTextBox Grid.Column="1" Style="{StaticResource textboxValueStyle}" Margin="5,0,0,0"
|
|
DisableBgColor="{StaticResource TextBox.Disable.BgColor}"
|
|
Text="{Binding PlatformCommissionRatio,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
<TextBlock Text="税务扣点(%)" Style="{StaticResource textblockPropertyStyle}" Margin="10,0,0,0"/>
|
|
<c:BTextBox Grid.Column="1" Style="{StaticResource textboxValueStyle}" Margin="5,0,0,0"
|
|
DisableBgColor="{StaticResource TextBox.Disable.BgColor}"
|
|
IsEnabled="false"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,0">
|
|
<c:BButton Content="采购配置" Width="100"
|
|
Command="{Binding SetPanelIndexCommand}" CommandParameter="{StaticResource p0}"
|
|
Background="{Binding PanelIndex,Converter={StaticResource objConverter},ConverterParameter=0:#8080FF:#F2F2F2}"
|
|
Foreground="{Binding PanelIndex,Converter={StaticResource objConverter},ConverterParameter=0:White:#4A4A4A}"/>
|
|
<c:BButton Content="库存预警" Width="100" Command="{Binding SetPanelIndexCommand}" CommandParameter="{StaticResource p1}"
|
|
Background="{Binding PanelIndex,Converter={StaticResource objConverter},ConverterParameter=1:#8080FF:#F2F2F2}"
|
|
Foreground="{Binding PanelIndex,Converter={StaticResource objConverter},ConverterParameter=1:White:#4A4A4A}"/>
|
|
<c:BButton Content="司南" Width="100" Command="{Binding SetPanelIndexCommand}" CommandParameter="{StaticResource p2}"
|
|
Background="{Binding PanelIndex,Converter={StaticResource objConverter},ConverterParameter=2:#8080FF:#F2F2F2}"
|
|
Foreground="{Binding PanelIndex,Converter={StaticResource objConverter},ConverterParameter=2:White:#4A4A4A}"/>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="2" Margin="20,0" Visibility="{Binding PanelIndex,Converter={StaticResource objConverter},ConverterParameter=0:Visible:Collapsed}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="80"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="采购平台" Style="{StaticResource textblockPropertyStyle}"/>
|
|
<ComboBox ItemsSource="{Binding Source={StaticResource PlatformProvider}}" Grid.Column="1"
|
|
SelectedItem="{Binding PurchaseAccount.PurchasePlatformId}"
|
|
DisplayMemberPath="."
|
|
Height="25"
|
|
Width="150"
|
|
HorizontalAlignment="Left"
|
|
VerticalContentAlignment="Center"/>
|
|
|
|
<TextBlock Text="账号名称" Style="{StaticResource textblockPropertyStyle}" Grid.Row="1"/>
|
|
<c:BTextBox Grid.Column="1" Style="{StaticResource textboxValueStyle}" Grid.Row="1"
|
|
Text="{Binding PurchaseAccount.AccountName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
<TextBlock Text="AppKey" Style="{StaticResource textblockPropertyStyle}" Grid.Row="2"/>
|
|
<c:BTextBox Grid.Column="1" Grid.Row="2"
|
|
Text="{Binding PurchaseAccount.AppKey,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
<TextBlock Text="AppSecret" Style="{StaticResource textblockPropertyStyle}" Grid.Row="3"/>
|
|
<c:BTextBox Grid.Column="1" Grid.Row="3"
|
|
Text="{Binding PurchaseAccount.AppSecret,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
<TextBlock Text="AppToken" Style="{StaticResource textblockPropertyStyle}" Grid.Row="4"/>
|
|
<c:BTextBox Grid.Column="1" Grid.Row="4"
|
|
Text="{Binding PurchaseAccount.AppToken,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2" Margin="20,0" Visibility="{Binding PanelIndex,Converter={StaticResource objConverter},ConverterParameter=1:Visible:Collapsed}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="80"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="通知设置" Style="{StaticResource textblockPropertyStyle}"/>
|
|
|
|
|
|
<TextBlock Text="密钥" Style="{StaticResource textblockPropertyStyle}" Grid.Row="1"/>
|
|
<c:BTextBox Grid.Column="1" Style="{StaticResource textboxValueStyle}" Grid.Row="1" Width="500"
|
|
Text="{Binding DingDingKey,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
<TextBlock Text="WebHook" Style="{StaticResource textblockPropertyStyle}" Grid.Row="2"/>
|
|
<c:BTextBox Grid.Column="1" Style="{StaticResource textboxValueStyle}" Grid.Row="2" Width="500"
|
|
Text="{Binding DingDingWebHook,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
<Border Height="1" SnapsToDevicePixels="True" UseLayoutRounding="True" Background="{StaticResource Border.Brush}" Grid.ColumnSpan="2" Grid.Row="3"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<TextBlock Text="策略设置" Style="{StaticResource textblockPropertyStyle}" Grid.Row="4"/>
|
|
|
|
<TextBlock Text="安全周转天数" Style="{StaticResource textblockPropertyStyle}" Grid.Row="5"/>
|
|
<ComboBox ItemsSource="{Binding SafeDayList}" SelectedItem="{Binding SelectedSkuSafeTurnoverDay,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" Height="30" Width="100"
|
|
VerticalContentAlignment="Center"/>
|
|
|
|
<Grid Grid.ColumnSpan="2" Grid.Row="6" Margin="4.5,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.32*"/>
|
|
<ColumnDefinition Width="0.32*"/>
|
|
<ColumnDefinition Width="0.36*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel>
|
|
<TextBlock Text="增长期定义" FontWeight="Bold" Margin="0,10,0,5"/>
|
|
<TextBlock Text="以3天为1个周期,连续2个周期增长幅度均超20%。" Margin="0,0,0,15"/>
|
|
<TextBlock Text="提醒规则" FontWeight="Bold" Margin="0,0,0,5"/>
|
|
<TextBlock Text="总库存/近七天日均销量小于15天" Margin="0,0,0,5"/>
|
|
<TextBlock Text="备货量建议:" Margin="0,0,0,5"/>
|
|
<TextBlock Text="14天周转天数:近7天总单量*2*1.5" Margin="0,0,0,5"/>
|
|
<TextBlock Text="21天周转天数:近7天总单量*3*1.5" Margin="0,0,0,5"/>
|
|
<TextBlock Text="28天周转天数:近7天总单量*4*1.5" Margin="0,0,0,5"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1">
|
|
<TextBlock Text="稳定期定义" FontWeight="Bold" Margin="0,10,0,5"/>
|
|
<TextBlock Text="以3天为1个周期,两两组合的波动幅度不超20%。" Margin="0,0,0,15"/>
|
|
<TextBlock Text="提醒规则" FontWeight="Bold" Margin="0,0,0,5"/>
|
|
<TextBlock Text="总库存/近七天日均销量小于8天" Margin="0,0,0,5"/>
|
|
<TextBlock Text="备货量建议:" Margin="0,0,0,5"/>
|
|
<TextBlock Text="14天周转天数:近7天总单量*2*1" Margin="0,0,0,5"/>
|
|
<TextBlock Text="21天周转天数:近7天总单量*3*1" Margin="0,0,0,5"/>
|
|
<TextBlock Text="28天周转天数:近7天总单量*4*1" Margin="0,0,0,5"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="2">
|
|
<TextBlock Text="衰退期定义" FontWeight="Bold" Margin="0,10,0,5"/>
|
|
<TextBlock Text="以3天为1个周期,连续2个周期下降幅度均超20%,或7个周期内两两下降幅度最高超50%。" Margin="0,0,0,15"/>
|
|
<TextBlock Text="提醒规则" FontWeight="Bold" Margin="0,0,0,5"/>
|
|
<TextBlock Text="总库存/近七天日均销量小于8天" Margin="0,0,0,5"/>
|
|
<TextBlock Text="备货量建议:" Margin="0,0,0,5"/>
|
|
<TextBlock Text="暂停备货,采购代发。" Margin="0,0,0,5"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
<c:BButton Content="保存" Grid.Row="3" Width="80" HorizontalAlignment="Left"
|
|
Command="{Binding SaveCommand}" Margin="20,0,0,0"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Page>
|
|
|