From cdecb20b3d2b7ed8a2f444479e459d94e847499b Mon Sep 17 00:00:00 2001 From: wenjy Date: Fri, 27 Mar 2026 14:28:20 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=BA=93=E4=BD=8D=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sln.Wcs.Model/Domain/BaseLocationInfo.cs | 8 +- Sln.Wcs.UI/Controls/CustomMessageBox.xaml.cs | 13 +- Sln.Wcs.UI/MainWindow.xaml.cs | 5 +- .../LocationInfo/LocationAddWindow.xaml | 393 +++++++++++++++ .../LocationInfo/LocationAddWindow.xaml.cs | 94 ++++ .../LocationInfo/LocationEditWindow.xaml | 393 +++++++++++++++ .../LocationInfo/LocationEditWindow.xaml.cs | 132 +++++ .../LocationInfo/LocationInfoPage.xaml | 472 ++++++++++++++++++ .../LocationInfo/LocationInfoPage.xaml.cs | 188 +++++++ 9 files changed, 1694 insertions(+), 4 deletions(-) create mode 100644 Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationAddWindow.xaml create mode 100644 Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationAddWindow.xaml.cs create mode 100644 Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationEditWindow.xaml create mode 100644 Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationEditWindow.xaml.cs create mode 100644 Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationInfoPage.xaml create mode 100644 Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationInfoPage.xaml.cs diff --git a/Sln.Wcs.Model/Domain/BaseLocationInfo.cs b/Sln.Wcs.Model/Domain/BaseLocationInfo.cs index d8d8b22..83194e7 100644 --- a/Sln.Wcs.Model/Domain/BaseLocationInfo.cs +++ b/Sln.Wcs.Model/Domain/BaseLocationInfo.cs @@ -1,4 +1,4 @@ -using SqlSugar; +using SqlSugar; using System; using System.Collections.Generic; using System.Linq; @@ -194,5 +194,11 @@ namespace Sln.Wcs.Model.Domain /// [SugarColumn(ColumnName = "updated_time")] public DateTime? updatedTime { get; set; } + + /// + /// 序号(用于列表显示,不参与数据库操作) + /// + [SugarColumn(IsIgnore = true)] + public int RowIndex { get; set; } } } diff --git a/Sln.Wcs.UI/Controls/CustomMessageBox.xaml.cs b/Sln.Wcs.UI/Controls/CustomMessageBox.xaml.cs index 7c706b4..6550828 100644 --- a/Sln.Wcs.UI/Controls/CustomMessageBox.xaml.cs +++ b/Sln.Wcs.UI/Controls/CustomMessageBox.xaml.cs @@ -24,8 +24,17 @@ namespace Sln.Wcs.UI.Controls { window.PanelOneButton.Visibility = Visibility.Visible; window.PanelTwoButtons.Visibility = Visibility.Collapsed; - window.TxtIcon.Text = "✓"; - window.TxtIcon.Foreground = new System.Windows.Media.SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#4CAF50")); + + if (title.Contains("错误") || title.Contains("失败") || title.Contains("警告")) + { + window.TxtIcon.Text = "✕"; + window.TxtIcon.Foreground = new System.Windows.Media.SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#F44336")); + } + else + { + window.TxtIcon.Text = "✓"; + window.TxtIcon.Foreground = new System.Windows.Media.SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#4CAF50")); + } } else if (button == MessageBoxButton.YesNo) { diff --git a/Sln.Wcs.UI/MainWindow.xaml.cs b/Sln.Wcs.UI/MainWindow.xaml.cs index b828713..bfb5df1 100644 --- a/Sln.Wcs.UI/MainWindow.xaml.cs +++ b/Sln.Wcs.UI/MainWindow.xaml.cs @@ -1,6 +1,7 @@ using Sln.Wcs.UI.Attribute; using Sln.Wcs.UI.Page.BasicInfo; using Sln.Wcs.UI.Page.BasicInfo.DeviceInfo; +using Sln.Wcs.UI.Page.BasicInfo.LocationInfo; using Sln.Wcs.UI.Page.BasicInfo.MaterialInfo; using Sln.Wcs.UI.Page.BasicInfo.StoreInfo; using Sln.Wcs.UI.Page.Home; @@ -22,6 +23,7 @@ namespace Sln.Wcs.UI private DeviceInfoPage _deviceInfoPage; private MaterialInfoPage _materialInfoPage; private StoreInfoPage _storeInfoPage; + private LocationInfoPage _locationInfoPage; public MainWindow() { @@ -31,6 +33,7 @@ namespace Sln.Wcs.UI _deviceInfoPage = new DeviceInfoPage(); _materialInfoPage = new MaterialInfoPage(); _storeInfoPage = new StoreInfoPage(); + _locationInfoPage = new LocationInfoPage(); MainContent.Content = _homePage; BtnBasicInfo.Checked += BtnBasicInfo_Checked; @@ -106,7 +109,7 @@ namespace Sln.Wcs.UI private void BtnLocationInfo_Click(object sender, RoutedEventArgs e) { BtnBasicInfo.IsChecked = false; - MainContent.Content = _basicInfoPage; + MainContent.Content = _locationInfoPage; } private void BtnExit_Click(object sender, RoutedEventArgs e) diff --git a/Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationAddWindow.xaml b/Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationAddWindow.xaml new file mode 100644 index 0000000..2bc5cfb --- /dev/null +++ b/Sln.Wcs.UI/Page/BasicInfo/LocationInfo/LocationAddWindow.xaml @@ -0,0 +1,393 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +