Files
qhmes/yy-admin-master/YY.Admin/Views/WeightRecord/WeightRecordEditDialogView.xaml

190 lines
10 KiB
XML

<UserControl x:Class="YY.Admin.Views.WeightRecord.WeightRecordEditDialogView"
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="720"
MinHeight="500">
<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 Record.BillNo, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="磅单号"
hc:InfoElement.TitleWidth="80"
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 Record.WeighDate}"
hc:InfoElement.Title="称重日期"
hc:InfoElement.TitleWidth="80"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Necessary="True"
hc:InfoElement.Symbol="*"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 进出方向 -->
<hc:Col Span="12">
<hc:ComboBox SelectedValuePath="Value"
DisplayMemberPath="Key"
ItemsSource="{Binding InoutDirectionOptions}"
SelectedValue="{Binding Record.InoutDirection}"
hc:InfoElement.Title="进出方向"
hc:InfoElement.TitleWidth="80"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Necessary="True"
hc:InfoElement.Symbol="*"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 车牌号 -->
<hc:Col Span="12">
<hc:TextBox Text="{Binding Record.PlateNumber, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="车牌号"
hc:InfoElement.TitleWidth="80"
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 Record.SenderUnit, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="发货单位"
hc:InfoElement.TitleWidth="80"
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 Record.ReceiverUnit, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="收货单位"
hc:InfoElement.TitleWidth="80"
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 Record.GoodsName, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="货物名称"
hc:InfoElement.TitleWidth="80"
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 Record.GrossWeight}"
Minimum="0"
DecimalPlaces="2"
Style="{StaticResource NumericUpDownPlus}"
hc:InfoElement.Title="毛重(KG)"
hc:InfoElement.TitleWidth="80"
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 Record.TareWeight}"
Minimum="0"
DecimalPlaces="2"
Style="{StaticResource NumericUpDownPlus}"
hc:InfoElement.Title="皮重(KG)"
hc:InfoElement.TitleWidth="80"
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 Record.NetWeight}"
Minimum="0"
DecimalPlaces="2"
Style="{StaticResource NumericUpDownPlus}"
IsEnabled="True"
hc:InfoElement.Title="净重(KG)"
hc:InfoElement.TitleWidth="80"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="自动计算"
Margin="0,0,0,16"/>
</hc:Col>
<!-- 司机 -->
<hc:Col Span="12">
<hc:TextBox Text="{Binding Record.DriverName, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="司机姓名"
hc:InfoElement.TitleWidth="80"
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 Record.DriverPhone, UpdateSourceTrigger=PropertyChanged}"
hc:InfoElement.Title="手机号码"
hc:InfoElement.TitleWidth="80"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.Placeholder="请输入手机号"
hc:InfoElement.ShowClearButton="True"
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>