Files
qhmes/yy-admin-master/YY.Admin/Views/MixerMaterialTareStrategy/MixerMaterialTareStrategyEditDialogView.xaml

164 lines
9.7 KiB
Plaintext
Raw Normal View History

<UserControl x:Class="YY.Admin.Views.MixerMaterialTareStrategy.MixerMaterialTareStrategyEditDialogView"
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:hc="https://handyorg.github.io/handycontrol"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d"
Width="760"
MinHeight="560">
<Grid Background="{DynamicResource ThirdlyRegionBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<hc:SimplePanel Margin="20">
<TextBlock FontSize="18" Foreground="{DynamicResource PrimaryTextBrush}"
Text="{Binding DialogTitle}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Button Width="22" Height="22" Command="hc:ControlCommands.Close"
Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}"
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
</hc:SimplePanel>
<hc:ScrollViewer Grid.Row="1" IsInertiaEnabled="True">
<StackPanel Margin="20,0,20,0">
<hc:Row Gutter="10">
<hc:Col Span="24">
<Grid Margin="0,0,0,16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<hc:TextBox Grid.Column="0"
Text="{Binding SelectedMaterialDisplay, Mode=OneWay}"
IsReadOnly="True"
hc:InfoElement.Title="密炼物料"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Necessary="True"
hc:InfoElement.Symbol="*"/>
<Button Grid.Column="1" Margin="8,0,0,0" Content="选择" Width="70"
Command="{Binding OpenMaterialPickerCommand}" Style="{StaticResource ButtonPrimary}"/>
<Button Grid.Column="2" Margin="8,0,0,0" Content="清除" Width="70"
Command="{Binding ClearMaterialCommand}" Style="{StaticResource ButtonDefault}"/>
</Grid>
</hc:Col>
<hc:Col Span="24">
<Grid Margin="0,0,0,16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<hc:TextBox Grid.Column="0"
Text="{Binding SelectedSupplierDisplay, Mode=OneWay}"
IsReadOnly="True"
hc:InfoElement.Title="供应商"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Necessary="True"
hc:InfoElement.Symbol="*"/>
<Button Grid.Column="1" Margin="8,0,0,0" Content="选择" Width="70"
Command="{Binding OpenSupplierPickerCommand}" Style="{StaticResource ButtonPrimary}"/>
<Button Grid.Column="2" Margin="8,0,0,0" Content="清除" Width="70"
Command="{Binding ClearSupplierCommand}" Style="{StaticResource ButtonDefault}"/>
</Grid>
</hc:Col>
<hc:Col Span="24">
<StackPanel Margin="0,0,0,16">
<hc:TextBox Text="{Binding Strategy.MaterialSpec, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="物料规格"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入物料规格"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,4"/>
<TextBlock Text="同一供应商/密炼物料下,不同规格可分别维护;规格相同且生效日期重叠时不允许重复"
Foreground="{DynamicResource SecondaryTextBrush}"
FontSize="12"
TextWrapping="Wrap"
Margin="90,0,0,0"/>
</StackPanel>
</hc:Col>
<hc:Col Span="12">
<hc:NumericUpDown Value="{Binding Strategy.TareWeight}"
Minimum="0"
DecimalPlaces="4"
Style="{StaticResource NumericUpDownPlus}"
hc:InfoElement.Title="包装物重量"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Necessary="True"
hc:InfoElement.Symbol="*"
hc:InfoElement.Placeholder="请输入包装物重量"
Margin="0,0,0,16"/>
</hc:Col>
<hc:Col Span="12">
<hc:NumericUpDown Value="{Binding Strategy.PalletWeight}"
Minimum="0"
DecimalPlaces="4"
Style="{StaticResource NumericUpDownPlus}"
hc:InfoElement.Title="托盘重量"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入托盘重量"
Margin="0,0,0,16"/>
</hc:Col>
<hc:Col Span="12">
<hc:ComboBox SelectedValuePath="Id"
DisplayMemberPath="UnitName"
ItemsSource="{Binding UnitOptions}"
SelectedValue="{Binding Strategy.UnitId, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="单位"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Necessary="True"
hc:InfoElement.Symbol="*"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<hc:Col Span="12">
<hc:DatePicker SelectedDate="{Binding Strategy.EffectiveStartDate, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="生效开始"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Necessary="True"
hc:InfoElement.Symbol="*"
Margin="0,0,0,16"/>
</hc:Col>
<hc:Col Span="12">
<hc:DatePicker SelectedDate="{Binding Strategy.EffectiveEndDate, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="生效截止"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Necessary="True"
hc:InfoElement.Symbol="*"
Margin="0,0,0,16"/>
</hc:Col>
</hc:Row>
</StackPanel>
</hc:ScrollViewer>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="20">
<Button Content="取消" Command="{Binding CancelCommand}" Style="{StaticResource ButtonDefault}" Margin="0,0,15,0" Width="100"/>
<Button Content="确定" Command="{Binding SaveCommand}" Style="{StaticResource ButtonPrimary}" Width="100"/>
</StackPanel>
</Grid>
</UserControl>