新增MES模块,包含供应商、客户、车辆和地磅数据记录管理功能,支持免密接口和数据同步。更新相关控制器、实体、服务和数据库配置,优化权限管理和数据字典支持,确保系统的灵活性和可扩展性。
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
<UserControl x:Class="YY.Admin.Views.Customer.CustomerEditDialogView"
|
||||
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="700"
|
||||
MinHeight="400">
|
||||
|
||||
<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 Customer.CustomerCode, 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 Customer.CustomerName, 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 Customer.CustomerShortName, 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:ComboBox SelectedValuePath="Value"
|
||||
DisplayMemberPath="Key"
|
||||
ItemsSource="{Binding CustomerRegionOptions}"
|
||||
SelectedValue="{Binding Customer.CustomerRegion}"
|
||||
hc:InfoElement.Title="客户区域"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
|
||||
<!-- ERP编码 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Customer.ErpCode, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="ERP编码"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入ERP编码"
|
||||
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 Customer.Status}"
|
||||
hc:InfoElement.Title="状态"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
|
||||
<!-- 客户描述 -->
|
||||
<hc:Col Span="24">
|
||||
<hc:TextBox Text="{Binding Customer.CustomerDesc, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="客户描述"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入客户描述"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="True"
|
||||
Height="80"
|
||||
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>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.Customer;
|
||||
|
||||
public partial class CustomerEditDialogView : UserControl
|
||||
{
|
||||
public CustomerEditDialogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
174
yy-admin-master/YY.Admin/Views/Customer/CustomerListView.xaml
Normal file
174
yy-admin-master/YY.Admin/Views/Customer/CustomerListView.xaml
Normal file
@@ -0,0 +1,174 @@
|
||||
<UserControl x:Class="YY.Admin.Views.Customer.CustomerListView"
|
||||
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 FilterCustomerCode, 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:TextBox Text="{Binding FilterCustomerName, 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 CustomerRegionOptions}"
|
||||
SelectedValue="{Binding FilterCustomerRegion}"
|
||||
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>
|
||||
<Button Style="{StaticResource ButtonSuccess}" Command="{Binding AddCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="Plus"/>
|
||||
<TextBlock Text="新增" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</hc:UniformSpacingPanel>
|
||||
</Border>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<DataGrid Grid.Row="2"
|
||||
ItemsSource="{Binding Customers}"
|
||||
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 CustomerCode}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="130"/>
|
||||
<DataGridTextColumn Header="客户名称" Binding="{Binding CustomerName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="160"/>
|
||||
<DataGridTextColumn Header="客户简称" Binding="{Binding CustomerShortName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="120"/>
|
||||
<DataGridTextColumn Header="客户区域" Binding="{Binding CustomerRegion}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="100"/>
|
||||
<DataGridTextColumn Header="ERP编码" Binding="{Binding ErpCode}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="120"/>
|
||||
<DataGridTextColumn Header="状态" Binding="{Binding StatusText}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="80"/>
|
||||
<DataGridTextColumn Header="描述" Binding="{Binding CustomerDesc}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="180"/>
|
||||
<DataGridTemplateColumn Header="操作" Width="200" CellStyle="{StaticResource CusOperDataGridCellStyle}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<hc:UniformSpacingPanel Spacing="5">
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}" MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="SquareEditOutline" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="修改" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.ToggleStatusCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}" MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="ToggleSwitch" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="启/停" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}" MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="TrashCanOutline" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="删除" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</hc:UniformSpacingPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</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>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.Customer;
|
||||
|
||||
public partial class CustomerListView : UserControl
|
||||
{
|
||||
public CustomerListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,8 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ctls="clr-namespace:YY.Admin.Core.Controls;assembly=YY.Admin.Core"
|
||||
Width="460" Height="360">
|
||||
Width="520" Height="420"
|
||||
Loaded="UserControl_Loaded">
|
||||
<Border Background="White" BorderBrush="#f0f0f0" BorderThickness="1" CornerRadius="4">
|
||||
<Grid Margin="0">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -19,16 +20,23 @@
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="20,16,20,0">
|
||||
<TextBlock Text="IP" Margin="0,0,0,6"/>
|
||||
<TextBox Text="{Binding Ip, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
|
||||
<TextBox Text="{Binding Ip, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
|
||||
|
||||
<TextBlock Text="端口" Margin="0,12,0,6"/>
|
||||
<TextBox Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
|
||||
<TextBox Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
|
||||
|
||||
<TextBlock Text="WebSocket 地址(可选)" Margin="0,12,0,6"/>
|
||||
<TextBox Text="{Binding WebSocketUrl, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
|
||||
<TextBox Text="{Binding WebSocketUrl, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
|
||||
|
||||
<TextBlock Text="后端上下文路径" Margin="0,12,0,6"/>
|
||||
<TextBox Text="{Binding BasePath, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
|
||||
<TextBox Text="{Binding BasePath, UpdateSourceTrigger=PropertyChanged}" Height="32" IsEnabled="{Binding IsConnectionFieldsEnabled}"/>
|
||||
|
||||
<DockPanel Margin="0,12,0,0" LastChildFill="False">
|
||||
<TextBlock Text="断开连接" VerticalAlignment="Center"/>
|
||||
<ToggleButton DockPanel.Dock="Right"
|
||||
IsChecked="{Binding DisconnectConnection, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</DockPanel>
|
||||
|
||||
<TextBlock Text="{Binding ErrorMessage}" Foreground="Red" Margin="0,12,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows;
|
||||
|
||||
namespace YY.Admin.Views.Dialogs
|
||||
{
|
||||
@@ -11,5 +12,22 @@ namespace YY.Admin.Views.Dialogs
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var win = Window.GetWindow(this);
|
||||
if (win == null) return;
|
||||
|
||||
// 必须先关闭 AllowsTransparency,再改 WindowStyle(否则会抛出:
|
||||
// 「当 AllowsTransparency 为 true 时,WindowStyle.None 是唯一有效值」)
|
||||
win.AllowsTransparency = false;
|
||||
win.WindowStyle = WindowStyle.SingleBorderWindow;
|
||||
win.ResizeMode = ResizeMode.CanResizeWithGrip;
|
||||
win.SizeToContent = SizeToContent.Manual;
|
||||
win.MinWidth = 520;
|
||||
win.MinHeight = 420;
|
||||
if (win.Width < 520) win.Width = 520;
|
||||
if (win.Height < 420) win.Height = 420;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
<UserControl x:Class="YY.Admin.Views.Supplier.SupplierEditDialogView"
|
||||
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="700" MinHeight="360">
|
||||
<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 Supplier.SupplierCode, 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 Supplier.SupplierName, 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 Supplier.SupplierShortName, 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 Supplier.ErpCode, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="ERP编码"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入ERP编码"
|
||||
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 Supplier.Status}"
|
||||
hc:InfoElement.Title="状态"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="24">
|
||||
<hc:TextBox Text="{Binding Supplier.Remark, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="备注"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入备注"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="True"
|
||||
Height="80"
|
||||
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>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.Supplier;
|
||||
|
||||
public partial class SupplierEditDialogView : UserControl
|
||||
{
|
||||
public SupplierEditDialogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
<UserControl x:Class="YY.Admin.Views.Supplier.SupplierListView"
|
||||
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="*"/></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 FilterSupplierCode}" Margin="0 0 10 10" hc:InfoElement.Title="供应商编码"/></hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}"><hc:TextBox Text="{Binding FilterSupplierName}" Margin="0 0 10 10" hc:InfoElement.Title="供应商名称"/></hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}"><hc:TextBox Text="{Binding FilterSupplierShortName}" Margin="0 0 10 10" hc:InfoElement.Title="供应商简称"/></hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}"><hc:TextBox Text="{Binding FilterErpCode}" Margin="0 0 10 10" hc:InfoElement.Title="ERP编码"/></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: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>
|
||||
<Button Style="{StaticResource ButtonSuccess}" Command="{Binding AddCommand}"><StackPanel Orientation="Horizontal"><md:PackIcon Kind="Plus"/><TextBlock Text="新增" Style="{StaticResource IconButtonStyle}"/></StackPanel></Button>
|
||||
</hc:UniformSpacingPanel>
|
||||
</Border>
|
||||
<DataGrid Grid.Row="2" ItemsSource="{Binding Suppliers}" AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource CusDataGridStyle}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="供应商编码" Binding="{Binding SupplierCode}" Width="120"/>
|
||||
<DataGridTextColumn Header="供应商名称" Binding="{Binding SupplierName}" Width="160"/>
|
||||
<DataGridTextColumn Header="供应商简称" Binding="{Binding SupplierShortName}" Width="140"/>
|
||||
<DataGridTextColumn Header="ERP编码" Binding="{Binding ErpCode}" Width="120"/>
|
||||
<DataGridTextColumn Header="备注" Binding="{Binding Remark}" Width="180"/>
|
||||
<DataGridTextColumn Header="状态" Binding="{Binding StatusText}" Width="80"/>
|
||||
<DataGridTemplateColumn Header="操作" Width="200" CellStyle="{StaticResource CusOperDataGridCellStyle}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<hc:UniformSpacingPanel Spacing="5">
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}"
|
||||
MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="SquareEditOutline" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="修改" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.ToggleStatusCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}"
|
||||
MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="ToggleSwitch" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="启/停" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}"
|
||||
MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="TrashCanOutline" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="删除" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</hc:UniformSpacingPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.Supplier;
|
||||
|
||||
public partial class SupplierListView : UserControl
|
||||
{
|
||||
public SupplierListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
112
yy-admin-master/YY.Admin/Views/SysManage/LoginSettingsView.xaml
Normal file
112
yy-admin-master/YY.Admin/Views/SysManage/LoginSettingsView.xaml
Normal file
@@ -0,0 +1,112 @@
|
||||
<UserControl x:Class="YY.Admin.Views.SysManage.LoginSettingsView"
|
||||
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/"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="560" d:DesignWidth="980"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True">
|
||||
|
||||
<Grid Style="{StaticResource BaseViewStyle}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" Margin="0,0,0,12">
|
||||
<hc:UniformSpacingPanel Spacing="10">
|
||||
<ToggleButton IsChecked="{Binding NeverExpire, Mode=TwoWay}" MinWidth="110" Height="32" Padding="12,0">
|
||||
<TextBlock Text="永不过期"/>
|
||||
</ToggleButton>
|
||||
<Button Style="{StaticResource ButtonDefault}" Command="{Binding LoadCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="Refresh"/>
|
||||
<TextBlock Text="重新加载" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource ButtonPrimary}" Command="{Binding SaveCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="ContentSaveOutline"/>
|
||||
<TextBlock Text="保存" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</hc:UniformSpacingPanel>
|
||||
</Border>
|
||||
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel MaxWidth="980">
|
||||
<TextBlock TextWrapping="Wrap" Margin="0,0,0,16" Opacity="0.85"
|
||||
Text="以下参数保存在本地库 sys_config 中,保存后立即影响新登录与当前会话的续期逻辑;检查间隔会立即应用到已运行的登录状态定时器。开启“永不过期”后,下方参数将锁定为只读,且系统不再弹出登录超时重新登录提示。"/>
|
||||
|
||||
<StackPanel IsEnabled="{Binding IsConfigEditable}">
|
||||
<Border CornerRadius="4" Padding="16" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
||||
<hc:Row>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<TextBlock FontWeight="SemiBold" Text="会话与检查" Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:NumericUpDown Value="{Binding TokenExpireMinutes, Mode=TwoWay}"
|
||||
Minimum="5" Maximum="43200" DecimalPlaces="0"
|
||||
hc:InfoElement.Title="Token 过期时间"
|
||||
hc:InfoElement.TitleWidth="140"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Style="{StaticResource NumericUpDownPlus}"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:NumericUpDown Value="{Binding IdleExtendMinutes, Mode=TwoWay}"
|
||||
Minimum="1" Maximum="1440" DecimalPlaces="0"
|
||||
hc:InfoElement.Title="操作时续期阈值"
|
||||
hc:InfoElement.TitleWidth="140"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Style="{StaticResource NumericUpDownPlus}"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<TextBlock TextWrapping="Wrap" Opacity="0.75" Margin="0,-4,0,12"
|
||||
Text="用户有鼠标或键盘操作时:若距离过期不足「续期阈值」分钟,则将过期时间重新延长为「Token 过期时间」整段。"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:NumericUpDown Value="{Binding CheckIntervalMinutes, Mode=TwoWay}"
|
||||
Minimum="1" Maximum="120" DecimalPlaces="0"
|
||||
hc:InfoElement.Title="状态检查间隔"
|
||||
hc:InfoElement.TitleWidth="140"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Style="{StaticResource NumericUpDownPlus}"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<TextBlock TextWrapping="Wrap" Opacity="0.75" Margin="0,-4,0,0"
|
||||
Text="桌面端定时检查登录是否仍有效的间隔(分钟)。间隔越大,过期后提示可能越晚出现。"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
</Border>
|
||||
|
||||
<Border CornerRadius="4" Padding="12" Margin="0,16,0,0" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
||||
<hc:Row>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<TextBlock FontWeight="SemiBold" Text="RefreshToken(分钟)" Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<hc:NumericUpDown Value="{Binding RefreshTokenExpireMinutes, Mode=TwoWay}"
|
||||
Minimum="60" Maximum="999999" DecimalPlaces="0"
|
||||
hc:InfoElement.Title="过期时间"
|
||||
hc:InfoElement.TitleWidth="140"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Style="{StaticResource NumericUpDownPlus}"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<TextBlock TextWrapping="Wrap" Opacity="0.75"
|
||||
Text="与 Web 端约定一致,建议 ≥ 2 × Token 过期时间。当前桌面端内存会话主要受「Token 过期时间」控制,此项仍写入配置供扩展或对接使用。"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.SysManage;
|
||||
|
||||
public partial class LoginSettingsView : UserControl
|
||||
{
|
||||
public LoginSettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
211
yy-admin-master/YY.Admin/Views/SysManage/MenuManagementView.xaml
Normal file
211
yy-admin-master/YY.Admin/Views/SysManage/MenuManagementView.xaml
Normal file
@@ -0,0 +1,211 @@
|
||||
<UserControl x:Class="YY.Admin.Views.SysManage.MenuManagementView"
|
||||
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:core="clr-namespace:YY.Admin.Core;assembly=YY.Admin.Core"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="980"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True">
|
||||
|
||||
<Grid Style="{StaticResource BaseViewStyle}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" Margin="0,0,0,10">
|
||||
<hc:UniformSpacingPanel Spacing="10">
|
||||
<Button Style="{StaticResource ButtonPrimary}" Command="{Binding RefreshCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="Refresh"/>
|
||||
<TextBlock Text="刷新" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource ButtonSuccess}" Command="{Binding AddRootCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="FolderPlusOutline"/>
|
||||
<TextBlock Text="新增根目录" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource ButtonSuccess}" Command="{Binding AddChildCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="FileTreeOutline"/>
|
||||
<TextBlock Text="新增子级" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource ButtonPrimary}" Command="{Binding SaveCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="ContentSaveOutline"/>
|
||||
<TextBlock Text="保存" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource ButtonDanger}" Command="{Binding DeleteCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="DeleteOutline"/>
|
||||
<TextBlock Text="删除" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</hc:UniformSpacingPanel>
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="320" MinWidth="240"/>
|
||||
<ColumnDefinition Width="12"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Grid.Column="0" CornerRadius="4" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Padding="4">
|
||||
<DockPanel LastChildFill="True">
|
||||
<TextBlock DockPanel.Dock="Top" Margin="4,0,4,8" Text="菜单树(点击选中后在右侧编辑)" TextWrapping="Wrap" Opacity="0.85"/>
|
||||
<ListBox ItemsSource="{Binding FlatRows}"
|
||||
SelectedItem="{Binding SelectedRow, Mode=TwoWay}"
|
||||
DisplayMemberPath="IndentTitle"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<GridSplitter Grid.Column="1" Width="12" HorizontalAlignment="Stretch" Background="Transparent"/>
|
||||
|
||||
<ScrollViewer Grid.Column="2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<StackPanel>
|
||||
<TextBlock Text="编辑区" FontWeight="SemiBold" Margin="0,0,0,8"/>
|
||||
<TextBlock TextWrapping="Wrap" Margin="0,0,0,12" Opacity="0.75"
|
||||
Text="桌面端左侧导航依赖「路径 / 组件 / 路由名」与 MenuTreeViewModel 中的路由映射。新增业务页时,请将「组件」填写为已在 Prism 中 RegisterForNavigation 的视图名(如 VehicleListView)。"/>
|
||||
|
||||
<Border CornerRadius="4" Padding="8"
|
||||
Visibility="{Binding HasEditor, Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||
<hc:Row DataContext="{Binding Editor}">
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:TextBox Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="菜单名称"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:ComboBox ItemsSource="{Binding DataContext.ParentOptions, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
DisplayMemberPath="Value"
|
||||
SelectedValuePath="Key"
|
||||
SelectedValue="{Binding Pid, Mode=TwoWay}"
|
||||
hc:InfoElement.Title="父级"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:ComboBox ItemsSource="{Binding DataContext.MenuTypeList, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
DisplayMemberPath="Key"
|
||||
SelectedValuePath="Value"
|
||||
SelectedValue="{Binding Type, Converter={StaticResource EnumToIntConverter}, ConverterParameter={x:Type core:MenuTypeEnum}}"
|
||||
hc:InfoElement.Title="类型"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:ComboBox ItemsSource="{Binding DataContext.StatusList, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
DisplayMemberPath="Key"
|
||||
SelectedValuePath="Value"
|
||||
SelectedValue="{Binding Status, Converter={StaticResource EnumToIntConverter}, ConverterParameter={x:Type core:StatusEnum}}"
|
||||
hc:InfoElement.Title="状态"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:TextBox Text="{Binding OrderNo, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="排序号"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:TextBox Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="路由名称"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<hc:TextBox Text="{Binding Path, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="路径"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<hc:TextBox Text="{Binding Component, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="组件/视图名"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:TextBox Text="{Binding Icon, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="图标"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=6, Lg=6, Xl=6}">
|
||||
<hc:TextBox Text="{Binding Permission, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="权限标识"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<hc:TextBox Text="{Binding Redirect, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="重定向"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<hc:TextBox Text="{Binding Remark, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="备注"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=12, Lg=12, Xl=12}">
|
||||
<hc:TextBox Text="{Binding OutLink, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="外链"
|
||||
hc:InfoElement.TitleWidth="88"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,10"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=4, Lg=4, Xl=4}">
|
||||
<CheckBox Content="内嵌 IFrame" IsChecked="{Binding IsIframe}" Margin="0,6,0,0"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=4, Lg=4, Xl=4}">
|
||||
<CheckBox Content="隐藏菜单" IsChecked="{Binding IsHide}" Margin="0,6,0,0"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=4, Lg=4, Xl=4}">
|
||||
<CheckBox Content="固定页签" IsChecked="{Binding IsAffix}" Margin="0,6,0,0"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=12, Md=4, Lg=4, Xl=4}">
|
||||
<CheckBox Content="缓存页面" IsChecked="{Binding IsKeepAlive}" Margin="0,6,0,0"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.SysManage;
|
||||
|
||||
public partial class MenuManagementView : UserControl
|
||||
{
|
||||
public MenuManagementView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -28,18 +28,17 @@
|
||||
<hc:ScrollViewer Grid.Row="1" IsInertiaEnabled="True">
|
||||
<StackPanel x:Name="RootPanel" Margin="20 0 20 0">
|
||||
<hc:Row Gutter="10">
|
||||
<hc:Col Span="12" Visibility="{Binding IsAddMode, Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||
<hc:TextBox
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox
|
||||
Text="{Binding SysUser.Account, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.TitleWidth="70"
|
||||
Margin="0,0,0,20"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请输入账号"
|
||||
hc:InfoElement.Title="账号"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
hc:IsEnabled="{Binding IsAddMode}"/>
|
||||
hc:InfoElement.Symbol="*"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12" Visibility="{Binding IsAddMode, Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||
<hc:PasswordBox
|
||||
|
||||
@@ -150,6 +150,14 @@
|
||||
<TextBlock Text="新增" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button
|
||||
Style="{StaticResource ButtonPrimary}"
|
||||
Command="{Binding ManualUploadCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="Upload"/>
|
||||
<TextBlock Text="手动上传" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button
|
||||
Style="{StaticResource ButtonDanger}"
|
||||
IsEnabled="{Binding HasSelectedItems}"
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
<UserControl x:Class="YY.Admin.Views.Vehicle.VehicleEditDialogView"
|
||||
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="700"
|
||||
MinHeight="400">
|
||||
|
||||
<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 x:Name="RootPanel" Margin="20,0,20,0">
|
||||
<hc:Row Gutter="10">
|
||||
|
||||
<!-- 车牌号 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Vehicle.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:ComboBox SelectedValuePath="Value"
|
||||
DisplayMemberPath="Key"
|
||||
ItemsSource="{Binding VehicleBelongOptions}"
|
||||
SelectedValue="{Binding Vehicle.VehicleBelong}"
|
||||
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:NumericUpDown Value="{Binding Vehicle.TareWeightKg}"
|
||||
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 Vehicle.LoadCapacity}"
|
||||
Minimum="0"
|
||||
DecimalPlaces="2"
|
||||
Style="{StaticResource NumericUpDownPlus}"
|
||||
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 Vehicle.CustomerShortName, 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 Vehicle.SupplierName, 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 Vehicle.SupplierShortName, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="供应商简称"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,16"/>
|
||||
</hc:Col>
|
||||
|
||||
<!-- 司机 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Vehicle.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 Vehicle.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:Col Span="12">
|
||||
<hc:ComboBox SelectedValuePath="Value"
|
||||
DisplayMemberPath="Key"
|
||||
ItemsSource="{Binding StatusOptions}"
|
||||
SelectedValue="{Binding Vehicle.Status}"
|
||||
hc:InfoElement.Title="状态"
|
||||
hc:InfoElement.TitleWidth="80"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
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>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.Vehicle;
|
||||
|
||||
public partial class VehicleEditDialogView : UserControl
|
||||
{
|
||||
public VehicleEditDialogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
160
yy-admin-master/YY.Admin/Views/Vehicle/VehicleListView.xaml
Normal file
160
yy-admin-master/YY.Admin/Views/Vehicle/VehicleListView.xaml
Normal file
@@ -0,0 +1,160 @@
|
||||
<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>
|
||||
<Button Style="{StaticResource ButtonSuccess}" Command="{Binding AddCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="Plus"/>
|
||||
<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"/>
|
||||
<DataGridTemplateColumn Header="操作" Width="150" CellStyle="{StaticResource CusOperDataGridCellStyle}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<hc:UniformSpacingPanel Spacing="5">
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}"
|
||||
MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="SquareEditOutline" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="修改" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}"
|
||||
MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="TrashCanOutline" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="删除" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</hc:UniformSpacingPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</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>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.Vehicle;
|
||||
|
||||
public partial class VehicleListView : UserControl
|
||||
{
|
||||
public VehicleListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user