125 lines
7.6 KiB
Plaintext
125 lines
7.6 KiB
Plaintext
|
|
<UserControl x:Class="YY.Admin.Views.Vehicle.VehicleListView"
|
||
|
|
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:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
|
xmlns:prism="http://prismlibrary.com/"
|
||
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
||
|
|
mc:Ignorable="d">
|
||
|
|
|
||
|
|
<Grid Style="{StaticResource BaseViewStyle}">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
<RowDefinition Height="*"/>
|
||
|
|
<RowDefinition Height="Auto"/>
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<!-- 搜索条件区域 -->
|
||
|
|
<Border Grid.Row="0" CornerRadius="4" Margin="0 0 -10 0">
|
||
|
|
<hc:Row>
|
||
|
|
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
||
|
|
<hc:TextBox Text="{Binding FilterPlateNumber, UpdateSourceTrigger=PropertyChanged}"
|
||
|
|
Margin="0 0 10 10"
|
||
|
|
hc:InfoElement.Title="车牌号"
|
||
|
|
hc:InfoElement.TitlePlacement="Left"
|
||
|
|
hc:InfoElement.TitleWidth="65"
|
||
|
|
hc:InfoElement.Placeholder="请输入车牌号"
|
||
|
|
hc:InfoElement.ShowClearButton="True"/>
|
||
|
|
</hc:Col>
|
||
|
|
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
||
|
|
<hc:ComboBox SelectedValuePath="Value"
|
||
|
|
DisplayMemberPath="Key"
|
||
|
|
ItemsSource="{Binding VehicleBelongOptions}"
|
||
|
|
SelectedValue="{Binding FilterVehicleBelong}"
|
||
|
|
Margin="0 0 10 10"
|
||
|
|
hc:InfoElement.Title="车辆归属"
|
||
|
|
hc:InfoElement.TitlePlacement="Left"
|
||
|
|
hc:InfoElement.TitleWidth="65"
|
||
|
|
hc:InfoElement.Placeholder="请选择车辆归属"
|
||
|
|
hc:InfoElement.ShowClearButton="True"/>
|
||
|
|
</hc:Col>
|
||
|
|
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
||
|
|
<hc:ComboBox SelectedValuePath="Value"
|
||
|
|
DisplayMemberPath="Key"
|
||
|
|
ItemsSource="{Binding StatusOptions}"
|
||
|
|
SelectedValue="{Binding FilterStatus}"
|
||
|
|
Margin="0 0 10 10"
|
||
|
|
hc:InfoElement.Title="状态"
|
||
|
|
hc:InfoElement.TitlePlacement="Left"
|
||
|
|
hc:InfoElement.TitleWidth="65"
|
||
|
|
hc:InfoElement.Placeholder="请选择状态"
|
||
|
|
hc:InfoElement.ShowClearButton="True"/>
|
||
|
|
</hc:Col>
|
||
|
|
</hc:Row>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<!-- 操作工具栏 -->
|
||
|
|
<Border Grid.Row="1" Margin="0,10">
|
||
|
|
<hc:UniformSpacingPanel Spacing="10">
|
||
|
|
<Button Style="{StaticResource ButtonPrimary}" Command="{Binding SearchCommand}">
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<md:PackIcon Kind="Search"/>
|
||
|
|
<TextBlock Text="搜索" Style="{StaticResource IconButtonStyle}"/>
|
||
|
|
</StackPanel>
|
||
|
|
</Button>
|
||
|
|
<Button Style="{StaticResource ButtonDefault}" Command="{Binding ResetCommand}">
|
||
|
|
<StackPanel Orientation="Horizontal">
|
||
|
|
<md:PackIcon Kind="Refresh"/>
|
||
|
|
<TextBlock Text="重置" Style="{StaticResource IconButtonStyle}"/>
|
||
|
|
</StackPanel>
|
||
|
|
</Button>
|
||
|
|
</hc:UniformSpacingPanel>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<!-- 数据表格 -->
|
||
|
|
<DataGrid Grid.Row="2"
|
||
|
|
ItemsSource="{Binding Vehicles}"
|
||
|
|
AutoGenerateColumns="False"
|
||
|
|
IsReadOnly="True"
|
||
|
|
CanUserAddRows="False"
|
||
|
|
SelectionMode="Extended"
|
||
|
|
SelectionUnit="FullRow"
|
||
|
|
RowHeaderWidth="55"
|
||
|
|
GridLinesVisibility="Horizontal"
|
||
|
|
HorizontalGridLinesBrush="#FFEDEDED"
|
||
|
|
VerticalGridLinesBrush="Transparent"
|
||
|
|
HeadersVisibility="All"
|
||
|
|
ColumnHeaderStyle="{StaticResource CusDataGridColumnHeaderStyle}"
|
||
|
|
Style="{StaticResource CusDataGridStyle}"
|
||
|
|
hc:DataGridAttach.ShowSelectAllButton="True"
|
||
|
|
VerticalScrollBarVisibility="Auto"
|
||
|
|
HorizontalScrollBarVisibility="Auto">
|
||
|
|
<DataGrid.RowHeaderTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<CheckBox IsChecked="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=DataGridRow}}"/>
|
||
|
|
</DataTemplate>
|
||
|
|
</DataGrid.RowHeaderTemplate>
|
||
|
|
<DataGrid.Columns>
|
||
|
|
<DataGridTextColumn Header="车牌号" Binding="{Binding PlateNumber}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="120"/>
|
||
|
|
<DataGridTextColumn Header="车辆归属" Binding="{Binding VehicleBelongText}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="100"/>
|
||
|
|
<DataGridTextColumn Header="皮重(KG)" Binding="{Binding TareWeightKg, StringFormat=N2}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="100"/>
|
||
|
|
<DataGridTextColumn Header="装载量" Binding="{Binding LoadCapacity, StringFormat=N2}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="100"/>
|
||
|
|
<DataGridTextColumn Header="客户简称" Binding="{Binding CustomerShortName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="140"/>
|
||
|
|
<DataGridTextColumn Header="供应商名称" Binding="{Binding SupplierName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="140"/>
|
||
|
|
<DataGridTextColumn Header="供应商简称" Binding="{Binding SupplierShortName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="120"/>
|
||
|
|
<DataGridTextColumn Header="司机" Binding="{Binding DriverName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="100"/>
|
||
|
|
<DataGridTextColumn Header="联系电话" Binding="{Binding DriverPhone}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="130"/>
|
||
|
|
<DataGridTextColumn Header="状态" Binding="{Binding StatusText}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="80"/>
|
||
|
|
</DataGrid.Columns>
|
||
|
|
</DataGrid>
|
||
|
|
|
||
|
|
<!-- 分页 -->
|
||
|
|
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,0,0">
|
||
|
|
<TextBlock Text="{Binding Total, StringFormat=共 {0} 条}" VerticalAlignment="Center" Margin="0,0,16,0"
|
||
|
|
Foreground="{DynamicResource SecondaryTextBrush}"/>
|
||
|
|
<Button Content="上一页" Command="{Binding PrevPageCommand}" Style="{StaticResource ButtonDefault}" Margin="0,0,4,0" Width="80"/>
|
||
|
|
<TextBlock Text="{Binding PageNo, StringFormat=第 {0} 页}" VerticalAlignment="Center" Margin="8,0"
|
||
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
||
|
|
<Button Content="下一页" Command="{Binding NextPageCommand}" Style="{StaticResource ButtonDefault}" Width="80"/>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</UserControl>
|