新增MES模块,包含供应商、客户、车辆和地磅数据记录管理功能,支持免密接口和数据同步。更新相关控制器、实体、服务和数据库配置,优化权限管理和数据字典支持,确保系统的灵活性和可扩展性。

This commit is contained in:
geht
2026-04-30 15:28:20 +08:00
parent 142a0bdaba
commit b03cbeff9b
121 changed files with 10540 additions and 424 deletions

View File

@@ -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>

View File

@@ -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;
}
}
}