Files
qhmes/yy-admin-master/YY.Admin/Views/RawMaterialCard/RawMaterialCardEditDialogView.xaml

224 lines
12 KiB
Plaintext
Raw Normal View History

<UserControl x:Class="YY.Admin.Views.RawMaterialCard.RawMaterialCardEditDialogView"
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="780"
MinHeight="480">
<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="12">
<hc:TextBox Text="{Binding Card.Barcode, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="条码"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入条码"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 批次号 -->
<hc:Col Span="12">
<hc:TextBox Text="{Binding Card.BatchNo, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="批次号"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入批次号"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 入场日期 -->
<hc:Col Span="12">
<hc:DatePicker SelectedDate="{Binding Card.EntryDate}"
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:TextBox Text="{Binding Card.MaterialName, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="物料名称"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入物料名称"
hc:InfoElement.Necessary="True"
hc:InfoElement.Symbol="*"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 供应商名称 -->
<hc:Col Span="12">
<hc:TextBox Text="{Binding Card.SupplierName, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="供应商名称"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入供应商名称"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 厂家物料名称 -->
<hc:Col Span="12">
<hc:TextBox Text="{Binding Card.ManufacturerMaterialName, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="厂家物料名称"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入厂家物料名称"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 保质期 -->
<hc:Col Span="12">
<hc:TextBox Text="{Binding Card.ShelfLife, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="保质期"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入保质期"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 库区 -->
<hc:Col Span="12">
<hc:TextBox Text="{Binding Card.WarehouseArea, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="库区"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入库区"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 卸货人 -->
<hc:Col Span="12">
<hc:TextBox Text="{Binding Card.UnloadOperator, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="卸货人"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入卸货人"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 总重 -->
<hc:Col Span="12">
<hc:NumericUpDown Value="{Binding Card.TotalWeight}"
Minimum="0"
DecimalPlaces="3"
Style="{StaticResource NumericUpDownPlus}"
hc:InfoElement.Title="总重(kg)"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入总重"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 剩余重量 -->
<hc:Col Span="12">
<hc:NumericUpDown Value="{Binding Card.RemainingWeight}"
Minimum="0"
DecimalPlaces="3"
Style="{StaticResource NumericUpDownPlus}"
hc:InfoElement.Title="剩余重量"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 剩余数量 -->
<hc:Col Span="12">
<hc:NumericUpDown Value="{Binding Card.RemainingQuantity}"
Minimum="0"
DecimalPlaces="0"
Style="{StaticResource NumericUpDownPlus}"
hc:InfoElement.Title="剩余数量"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.ShowClearButton="True"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 状态 -->
<hc:Col Span="12">
<hc:ComboBox SelectedValuePath="Value"
DisplayMemberPath="Key"
ItemsSource="{Binding StatusOptions}"
SelectedValue="{Binding Card.Status}"
hc:InfoElement.Title="状态"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 检测结果 -->
<hc:Col Span="12">
<hc:ComboBox SelectedValuePath="Value"
DisplayMemberPath="Key"
ItemsSource="{Binding TestResultOptions}"
SelectedValue="{Binding Card.TestResult}"
hc:InfoElement.Title="检测结果"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 物料描述 -->
<hc:Col Span="24">
<hc:TextBox Text="{Binding Card.MaterialDesc, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="物料描述"
hc:InfoElement.TitleWidth="90"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入物料描述"
TextWrapping="Wrap"
AcceptsReturn="True"
MinHeight="60"
MaxHeight="100"
VerticalScrollBarVisibility="Auto"
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>