Ver Fonte

增加料号国别切换

KWD há 4 meses atrás
pai
commit
c9ea258b0f

Diff do ficheiro suprimidas por serem muito extensas
+ 651 - 281
TeamAAS-VM/Core/Management.cs


+ 22 - 0
TeamAAS-VM/Models/ProductWithMes.cs

@@ -66,5 +66,27 @@ namespace TeamAAS_VP.Models
             get { return _ProductLoadMode; }
             get { return _ProductLoadMode; }
             set { SetProperty(ref _ProductLoadMode, value); }
             set { SetProperty(ref _ProductLoadMode, value); }
         }
         }
+
+        ///// <summary>
+        ///// 产品集合
+        ///// </summary>
+        //private List<string> _ProductLoadList = new List<string>();
+        //public List<string> ProductLoadList
+        //{
+        //    get { return _ProductLoadList; }
+        //    set { SetProperty(ref _ProductLoadList, value); }
+        //}
+
+       
+        private string _ProductLoad;
+        /// <summary>
+        /// 产品集合
+        /// </summary>
+        [SugarColumn(Length =2550)]
+        public string ProductLoad
+        {
+            get { return _ProductLoad; }
+            set { SetProperty(ref _ProductLoad, value); }
+        }
     }
     }
 }
 }

+ 18 - 0
TeamAAS-VM/Models/SystemConfiguration.cs

@@ -532,6 +532,24 @@ namespace TeamAAS_VP.Models
             set => SetProperty(ref _iouThreshold, value);
             set => SetProperty(ref _iouThreshold, value);
         }
         }
 
 
+        private bool _IsManual;
+        /// <summary>
+        /// 是否有人工站
+        /// </summary>
+        public bool IsManual
+        {
+            get => _IsManual;
+            set => SetProperty(ref _IsManual, value);
+        }
 
 
+        private double _PermissionIdleTimeout = 0;
+        /// <summary>
+        ///  工程师和管理员权限的无操作超时时长
+        /// </summary>
+        public double PermissionIdleTimeout
+        {
+            get => _PermissionIdleTimeout;
+            set => SetProperty(ref _PermissionIdleTimeout, value);
+        }
     }
     }
 }
 }

+ 2 - 2
TeamAAS-VM/Services/MesService.cs

@@ -101,11 +101,11 @@ namespace TeamAAS_VP.Services
             string url = "";
             string url = "";
             if (device.F == "PTL")
             if (device.F == "PTL")
             {
             {
-                url = $"{device.MesUrl}?c=QUERY_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&comp={device.comp}:{comp}&p=unit_process_check,message,model,sn,wo,model_num,color,ppid,stage,KB";
+                url = $"{device.MesUrl}?c=QUERY_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&comp={device.comp}:{comp}&p=unit_process_check,message,model,sn,wo,model_num,color,ppid,stage,KB,KB_PN";
             }
             }
             else
             else
             {
             {
-                url = $"{device.MesUrl}?c=QUERY_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&p=unit_process_check,message,model,sn,wo,model_num,color,ppid,stage,KB";
+                url = $"{device.MesUrl}?c=QUERY_RECORD&line={device.Line}&station={device.Station}&fixtureid={device.FixtureId}&sn={sn}&p=unit_process_check,message,model,sn,wo,model_num,color,ppid,stage,KB,KB_PN";
             }
             }
 
 
             LogHelper.WriteLogMes($"¡¾Ñ¯ÎÊURL¡¿{url}");
             LogHelper.WriteLogMes($"¡¾Ñ¯ÎÊURL¡¿{url}");

+ 2 - 0
TeamAAS-VM/Services/ProductService.cs

@@ -541,6 +541,7 @@ namespace TeamAAS_VP.Services
             {
             {
                 foreach (var prc in camera.ProcedureModels)
                 foreach (var prc in camera.ProcedureModels)
                 {
                 {
+                    if (prc.ToolBlock != null) continue;
                     string prcPath = Path.Combine(dir, camera.Camera, prc.Name + ".vpp");
                     string prcPath = Path.Combine(dir, camera.Camera, prc.Name + ".vpp");
 
 
                     prc.ToolBlock = _vppCache.GetOrAdd(prcPath, path =>
                     prc.ToolBlock = _vppCache.GetOrAdd(prcPath, path =>
@@ -576,6 +577,7 @@ namespace TeamAAS_VP.Services
                 {
                 {
                     foreach (var prc in camera.ProcedureModels)
                     foreach (var prc in camera.ProcedureModels)
                     {
                     {
+                        if (prc.ToolBlock != null) continue;
                         string prcPath = Path.Combine(dir, camera.Camera, prc.Name + ".vpp");
                         string prcPath = Path.Combine(dir, camera.Camera, prc.Name + ".vpp");
                         temp = prcPath;
                         temp = prcPath;
                         prc.ToolBlock = CogSerializer.LoadObjectFromFile(prcPath) as CogToolBlock;
                         prc.ToolBlock = CogSerializer.LoadObjectFromFile(prcPath) as CogToolBlock;

+ 3 - 3
TeamAAS-VM/ViewModels/HomeViewModel.cs

@@ -390,8 +390,8 @@ namespace TeamAAS_VP.ViewModels
         /// </summary>
         /// </summary>
         async void ExecuteResetCounterCommand()
         async void ExecuteResetCounterCommand()
         {
         {
-
-            if (management.CurrentProduct == null) return;
+            var currentproduct = _productService.GetCurrentProduct();
+            if (currentproduct == null) return;
             var view = new ShowMessage(Lang.计数清零, Lang.是否重置当前产品的计数);
             var view = new ShowMessage(Lang.计数清零, Lang.是否重置当前产品的计数);
             //show the dialog
             //show the dialog
             var result = await DialogHost.Show(view, "RootDialog", null, null, null);
             var result = await DialogHost.Show(view, "RootDialog", null, null, null);
@@ -400,7 +400,7 @@ namespace TeamAAS_VP.ViewModels
                 if (((bool)result))
                 if (((bool)result))
                 {
                 {
                     isCanExecute = false;
                     isCanExecute = false;
-                    await _systemDatabaseService.ResetProductionAsync(management.CurrentProduct.Name);
+                    await _systemDatabaseService.ResetProductionAsync(currentproduct.Name);
                     isCanExecute = true;
                     isCanExecute = true;
                 }
                 }
             }
             }

+ 6 - 1
TeamAAS-VM/ViewModels/MainWindowViewModel.cs

@@ -69,7 +69,7 @@ namespace TeamAAS_VP.ViewModels
         /// 工程师和管理员权限的无操作超时时长。
         /// 工程师和管理员权限的无操作超时时长。
         /// 超过该时长后自动切回操作员权限。
         /// 超过该时长后自动切回操作员权限。
         /// </summary>
         /// </summary>
-        private readonly TimeSpan PermissionIdleTimeout = TimeSpan.FromMinutes(0.5);
+        private TimeSpan PermissionIdleTimeout = TimeSpan.FromMinutes(0.5);
 
 
         /// <summary>
         /// <summary>
         /// 权限空闲检测计时器。
         /// 权限空闲检测计时器。
@@ -265,6 +265,11 @@ namespace TeamAAS_VP.ViewModels
         {
         {
             // 1. 读取配置参数
             // 1. 读取配置参数
             _configService.LoadAll();
             _configService.LoadAll();
+
+            //if (_regionManager != null && _configService.GetSystemConfiguration().PermissionIdleTimeout > 0)
+            //{
+            //    PermissionIdleTimeout = TimeSpan.FromMinutes(_configService.GetSystemConfiguration().PermissionIdleTimeout);
+            //}
             // 2. 加载校准
             // 2. 加载校准
             _calibrationService.LoadAll();
             _calibrationService.LoadAll();
 
 

+ 72 - 1
TeamAAS-VM/ViewModels/Product/AdvancedProcedureViewModel.cs

@@ -1,4 +1,6 @@
-using Cognex.VisionPro.ToolBlock;
+using Cognex.VisionPro;
+using Cognex.VisionPro.ToolBlock;
+using MaterialDesignThemes.Wpf;
 using OpenCvSharp;
 using OpenCvSharp;
 using Prism.Commands;
 using Prism.Commands;
 using Prism.Events;
 using Prism.Events;
@@ -19,6 +21,7 @@ using System.Windows.Media.Media3D;
 using Team.FFFeederService;
 using Team.FFFeederService;
 using Team.FFFeederService.Interfaces;
 using Team.FFFeederService.Interfaces;
 using TeamAAS_VP;
 using TeamAAS_VP;
+using TeamAAS_VP.Controls;
 using TeamAAS_VP.Core;
 using TeamAAS_VP.Core;
 using TeamAAS_VP.Core.Lights;
 using TeamAAS_VP.Core.Lights;
 using TeamAAS_VP.Enums;
 using TeamAAS_VP.Enums;
@@ -94,6 +97,16 @@ namespace TeamAAS_VP.ViewModels.Product
             get { return _Message; }
             get { return _Message; }
             set { SetProperty(ref _Message, value); }
             set { SetProperty(ref _Message, value); }
         }
         }
+
+        /// <summary>
+        /// 模板 ToolBlock 的默认路径,用于在产品不存在视觉工具文件时进行初始化。
+        /// </summary>
+        public const string TemplateToolBlock = "..//Vision Template//TemplateToolBlock.vpp";
+
+        /// <summary>
+        /// 默认产品路径的相对子目录(相对于应用运行目录或配置指定的根)。
+        /// </summary>
+        public const string DefaultProductsSubPath = "..//Products";
         #endregion
         #endregion
 
 
         #region 命令
         #region 命令
@@ -113,6 +126,11 @@ namespace TeamAAS_VP.ViewModels.Product
         public DelegateCommand RunVisionProcessCommand =>
         public DelegateCommand RunVisionProcessCommand =>
             _RunVisionProcessCommand ?? (_RunVisionProcessCommand = new DelegateCommand(async () => await ExecuteRunVisionProcessCommand()));
             _RunVisionProcessCommand ?? (_RunVisionProcessCommand = new DelegateCommand(async () => await ExecuteRunVisionProcessCommand()));
 
 
+        private DelegateCommand _SaveRunVisionVPPCommand;
+        public DelegateCommand SaveRunVisionVPPCommand =>
+            _SaveRunVisionVPPCommand ?? (_SaveRunVisionVPPCommand = new DelegateCommand(async () => await ExecuteSaveRunVisionVPPCommand()));
+
+
         private DelegateCommand _VisionStaticAccuracyAnalyzerCommand;
         private DelegateCommand _VisionStaticAccuracyAnalyzerCommand;
         public DelegateCommand VisionStaticAccuracyAnalyzerCommand =>
         public DelegateCommand VisionStaticAccuracyAnalyzerCommand =>
             _VisionStaticAccuracyAnalyzerCommand ?? (_VisionStaticAccuracyAnalyzerCommand = new DelegateCommand(ExecuteVisionStaticAccuracyAnalyzerCommand));
             _VisionStaticAccuracyAnalyzerCommand ?? (_VisionStaticAccuracyAnalyzerCommand = new DelegateCommand(ExecuteVisionStaticAccuracyAnalyzerCommand));
@@ -210,6 +228,59 @@ namespace TeamAAS_VP.ViewModels.Product
             }
             }
         }
         }
 
 
+
+        /// <summary>
+        /// 保存Vpp
+        /// </summary>
+        /// <returns></returns>
+        async Task ExecuteSaveRunVisionVPPCommand()
+        {
+            try
+            {
+
+                if (MessageBox.Show(Lang.是否保存产品.Replace("[{0}]", ""), Lang.保存产品, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
+                {
+                    var waiting = new WaitingControl();
+
+                    var task = DialogHost.Show(waiting, "RootDialog", null, null, null);
+                    string prcPath = DefaultProductsSubPath + "//" + SelectProduct.Name + "//" + SelectProcedure.CameraName + "//" + SelectProcedure.Name + ".vpp";
+                    var prcDir = Path.GetDirectoryName(prcPath);
+                    if (!Directory.Exists(prcDir))
+                    {
+                        Directory.CreateDirectory(prcDir);
+                    }
+
+                    // 【关键修复】如果目标 vpp 已存在(例如 CopyProduct 刚复制过来),则不再用模板/ToolBlock 覆盖它
+                    if (File.Exists(prcPath))
+                    {
+                        if (SelectProcedure.ToolBlock == null)
+                        {
+                            SelectProcedure.ToolBlock = CogSerializer.LoadObjectFromFile(prcPath) as CogToolBlock;
+                        }
+                    }
+                    if (SelectProcedure.ToolBlock != null)
+                    {
+                        CogSerializer.SaveObjectToFile(SelectProcedure.ToolBlock, prcPath);
+                    }
+                    else if (File.Exists(TemplateToolBlock))
+                    {
+                        SelectProcedure.ToolBlock = CogSerializer.LoadObjectFromFile(TemplateToolBlock) as CogToolBlock;
+                        CogSerializer.SaveObjectToFile(SelectProcedure.ToolBlock, prcPath);
+                    }
+                    if (DialogHost.IsDialogOpen("RootDialog"))
+                    {
+                        DialogHost.Close("RootDialog");
+                    }
+                    await task;
+                    MessageBox.Show($"保存{SelectProcedure.Name}VPP成功");
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"保存VPP异常{ex.Message}");
+            }
+        }
+
         async Task ExecuteRunVisionProcessCommand()
         async Task ExecuteRunVisionProcessCommand()
         {
         {
             try
             try

+ 86 - 3
TeamAAS-VM/ViewModels/SettingViewModel.cs

@@ -1,5 +1,6 @@
 using ICSharpCode.AvalonEdit.Search;
 using ICSharpCode.AvalonEdit.Search;
 using MaterialDesignThemes.Wpf;
 using MaterialDesignThemes.Wpf;
+using Newtonsoft.Json;
 using NPOI.SS.Formula.Functions;
 using NPOI.SS.Formula.Functions;
 using Opc.Ua;
 using Opc.Ua;
 using Prism.Commands;
 using Prism.Commands;
@@ -412,6 +413,27 @@ namespace TeamAAS_VP.ViewModels
             get { return _DeviceInfoList; }
             get { return _DeviceInfoList; }
             set { SetProperty(ref _DeviceInfoList, value); }
             set { SetProperty(ref _DeviceInfoList, value); }
         }
         }
+
+
+        private string _Product;
+
+        public string Product
+        {
+            get { return _Product; }
+            set { SetProperty(ref _Product, value); }
+        }
+
+        private ObservableCollection<string> _productLoadList = new ObservableCollection<string>();
+        /// <summary>
+        /// 产品集合
+        /// </summary>
+        // ComboBox数据源集合(要用ObservableCollection,UI才自动刷新)
+        public ObservableCollection<string> ProductLoadList
+        {
+            get => _productLoadList;
+            set { SetProperty(ref _productLoadList, value); }
+        }
+
         #endregion
         #endregion
 
 
         #region 命令
         #region 命令
@@ -536,7 +558,22 @@ namespace TeamAAS_VP.ViewModels
         private DelegateCommand _RemoveDeviceInfoCommand;
         private DelegateCommand _RemoveDeviceInfoCommand;
         public DelegateCommand RemoveDeviceInfoCommand => _RemoveDeviceInfoCommand ?? (_RemoveDeviceInfoCommand = new DelegateCommand(ExecuteRemoveDeviceInfoCommand));
         public DelegateCommand RemoveDeviceInfoCommand => _RemoveDeviceInfoCommand ?? (_RemoveDeviceInfoCommand = new DelegateCommand(ExecuteRemoveDeviceInfoCommand));
 
 
-        
+
+
+        private DelegateCommand _DeleteProductMesCommand;
+        /// <summary>
+        /// 删除产品
+        /// </summary>
+        public DelegateCommand DeleteProductMesCommand =>
+            _DeleteProductMesCommand ?? (_DeleteProductMesCommand = new DelegateCommand(DeleteEProWithMesCommand));
+
+        private DelegateCommand _AddProWithMesCommand;
+        /// <summary>
+        /// 增加产品
+        /// </summary>
+        public DelegateCommand AddProWithMesCommand =>
+            _AddProWithMesCommand ?? (_AddProWithMesCommand = new DelegateCommand(AddEProWithMesCommand));
+
 
 
         #endregion
         #endregion
 
 
@@ -546,7 +583,7 @@ namespace TeamAAS_VP.ViewModels
 
 
         public SettingViewModel(IRegionManager regionManager, IEventAggregator ea, IContainerProvider container, IDialogService dialogService,
         public SettingViewModel(IRegionManager regionManager, IEventAggregator ea, IContainerProvider container, IDialogService dialogService,
             IConfigService configService, IRobotService robotService, ICameraService cameraService, IFeederService feederService, IPlcService plcService,
             IConfigService configService, IRobotService robotService, ICameraService cameraService, IFeederService feederService, IPlcService plcService,
-            IProductService productService, ISystemDatabaseService systemDatabaseService,IScannerService scannerService)
+            IProductService productService, ISystemDatabaseService systemDatabaseService, IScannerService scannerService)
         {
         {
             _regionManager = regionManager;
             _regionManager = regionManager;
             _eventAggregator = ea;
             _eventAggregator = ea;
@@ -1365,7 +1402,7 @@ namespace TeamAAS_VP.ViewModels
         /// <exception cref="NotImplementedException"></exception>
         /// <exception cref="NotImplementedException"></exception>
         public async void OnNavigatedTo(NavigationContext navigationContext)
         public async void OnNavigatedTo(NavigationContext navigationContext)
         {
         {
-            if (_systemDatabaseService.GetCurrentUser().userPart == Enums.UserPart.Operator|| _systemDatabaseService.GetCurrentUser().userPart == Enums.UserPart.Engineer)
+            if (_systemDatabaseService.GetCurrentUser().userPart == Enums.UserPart.Operator || _systemDatabaseService.GetCurrentUser().userPart == Enums.UserPart.Engineer)
             {
             {
                 IsAllowEdit = false;
                 IsAllowEdit = false;
             }
             }
@@ -1815,6 +1852,41 @@ namespace TeamAAS_VP.ViewModels
 
 
         #region 产品与mes绑定
         #region 产品与mes绑定
 
 
+        /// <summary>
+        /// 增加产品国别
+        /// </summary>
+        private void AddEProWithMesCommand()
+        {
+            if (string.IsNullOrWhiteSpace(Product))
+                return;
+
+            // 不存在才添加,去重
+            if (!ProductLoadList.Contains(Product))
+            {
+                ProductLoadList.Add(Product);
+                // 同步更新存储字符串
+                ProMesInfo.ProductLoad = JsonConvert.SerializeObject(ProductLoadList);
+            }
+
+        }
+        /// <summary>
+        /// 删除产品国别
+        /// </summary>
+        private void DeleteEProWithMesCommand()
+        {
+            if (string.IsNullOrWhiteSpace(Product))
+                return;
+
+            if (ProductLoadList.Contains(Product))
+            {
+                ProductLoadList.Remove(Product);
+                ProMesInfo.ProductLoad = JsonConvert.SerializeObject(ProductLoadList);
+            }
+        }
+
+
+
+
         private async void ExecuteGetProWithMesCommand()
         private async void ExecuteGetProWithMesCommand()
         {
         {
             var v = await _systemDatabaseService.QueryProductWithMesAsync(SelectProduct);
             var v = await _systemDatabaseService.QueryProductWithMesAsync(SelectProduct);
@@ -1824,6 +1896,8 @@ namespace TeamAAS_VP.ViewModels
                 ProMesInfo.ProductColor = "";
                 ProMesInfo.ProductColor = "";
                 ProMesInfo.ProductKBSN = "";
                 ProMesInfo.ProductKBSN = "";
                 ProMesInfo.ProductLoadMode = 0;
                 ProMesInfo.ProductLoadMode = 0;
+                ProMesInfo.ProductLoad = "";
+                ProductLoadList = new ObservableCollection<string>();
             }
             }
             else
             else
             {
             {
@@ -1831,6 +1905,14 @@ namespace TeamAAS_VP.ViewModels
                 ProMesInfo.ProductColor = v.ProductColor;
                 ProMesInfo.ProductColor = v.ProductColor;
                 ProMesInfo.ProductKBSN = v.ProductKBSN;
                 ProMesInfo.ProductKBSN = v.ProductKBSN;
                 ProMesInfo.ProductLoadMode = v.ProductLoadMode;
                 ProMesInfo.ProductLoadMode = v.ProductLoadMode;
+                ProMesInfo.ProductLoad = v.ProductLoad;
+                // 先清空原有数据
+                //ProductLoadList.Clear();
+                ProductLoadList = JsonConvert.DeserializeObject<ObservableCollection<string>>(v.ProductLoad);
+                if (ProductLoadList==null)
+                {
+                    ProductLoadList = new ObservableCollection<string>();
+                }
             }
             }
         }
         }
 
 
@@ -1847,6 +1929,7 @@ namespace TeamAAS_VP.ViewModels
                     ProMesInfo.ProductColor = "";
                     ProMesInfo.ProductColor = "";
                     ProMesInfo.ProductKBSN = "";
                     ProMesInfo.ProductKBSN = "";
                     ProMesInfo.ProductLoadMode = 0;
                     ProMesInfo.ProductLoadMode = 0;
+                    ProMesInfo.ProductLoad = "";
                 }
                 }
             }
             }
         }
         }

+ 12 - 0
TeamAAS-VM/Views/Product/AdvancedProcedure.xaml

@@ -131,6 +131,18 @@
                                    VerticalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Foreground="Gray" />
                                    Foreground="Gray" />
                     </StackPanel>
                     </StackPanel>
+
+                    <!--<StackPanel Grid.Row="1" 
+                                Margin="5,3"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center"
+                                Orientation="Horizontal">
+                        <Button Content="保存VPP"
+                                Width="100"
+                                Command="{Binding SaveRunVisionVPPCommand}" />
+                    </StackPanel>-->
+
+
                     <Button Grid.Row="1"
                     <Button Grid.Row="1"
     Margin="5,3"
     Margin="5,3"
     HorizontalAlignment="Right"
     HorizontalAlignment="Right"

+ 106 - 8
TeamAAS-VM/Views/SettingView.xaml

@@ -2677,6 +2677,7 @@
                                   VerticalAlignment="Center"
                                   VerticalAlignment="Center"
                                   HorizontalAlignment="Right"
                                   HorizontalAlignment="Right"
                                   FontSize="{DynamicResource Font.Size.Body3}"
                                   FontSize="{DynamicResource Font.Size.Body3}"
+                                  
                                   Margin="0,0,6,0">保存拍照數據CSV</CheckBox>
                                   Margin="0,0,6,0">保存拍照數據CSV</CheckBox>
                         <!-- 保存拍照數據CSV -->
                         <!-- 保存拍照數據CSV -->
                         <StackPanel Grid.Row="9"
                         <StackPanel Grid.Row="9"
@@ -2913,6 +2914,9 @@
                                 <RowDefinition Height=" auto" />
                                 <RowDefinition Height=" auto" />
                                 <RowDefinition Height=" auto" />
                                 <RowDefinition Height=" auto" />
                                 <RowDefinition Height=" auto" />
                                 <RowDefinition Height=" auto" />
+                                <RowDefinition Height=" auto" />
+                                <RowDefinition Height=" auto" />
+                                <RowDefinition Height=" auto" />
                             </Grid.RowDefinitions>
                             </Grid.RowDefinitions>
 
 
                             <TextBlock Margin="0,0,0,8"
                             <TextBlock Margin="0,0,0,8"
@@ -3017,13 +3021,13 @@
                            FontSize="{DynamicResource Font.Size.Body3}"
                            FontSize="{DynamicResource Font.Size.Body3}"
                            HorizontalAlignment="Right" />
                            HorizontalAlignment="Right" />
                             <TextBox Grid.Row="4"
                             <TextBox Grid.Row="4"
-                         Grid.Column="1"
-                         Margin="10,4"
-                         MinWidth="100"
-                         FontSize="{DynamicResource Font.Size.Body3}"
-                         TextAlignment="Center"
-                         HorizontalAlignment="Left"
-                         VerticalAlignment="Center">
+                                    Grid.Column="1"
+                                    Margin="10,4"
+                                    MinWidth="100"
+                                    FontSize="{DynamicResource Font.Size.Body3}"
+                                    TextAlignment="Center"
+                                    HorizontalAlignment="Left"
+                                    VerticalAlignment="Center">
                                 <TextBox.Text>
                                 <TextBox.Text>
                                     <Binding Path="ProMesInfo.ProductLoadMode"
                                     <Binding Path="ProMesInfo.ProductLoadMode"
                                  Mode="TwoWay">
                                  Mode="TwoWay">
@@ -3031,7 +3035,101 @@
                                 </TextBox.Text>
                                 </TextBox.Text>
                             </TextBox>
                             </TextBox>
 
 
-                            <StackPanel Grid.Row="6"
+                            <TextBlock Margin="0,0,0,8"
+                                       Grid.Row="5"
+                                       VerticalAlignment="Center"
+                                       Text="产品集合:"
+                                       FontSize="{DynamicResource Font.Size.Body3}"
+                                       HorizontalAlignment="Right" />
+                     
+                            <ComboBox x:Name="ProductLoadList"  Grid.Row="5"
+                                       Grid.Column="5"
+                                       Width="100"
+                                       Margin="10,4"
+                                       FontSize="14"
+                                       materialDesign:HintAssist.Hint="选择产品"
+                                        ItemsSource="{Binding ProductLoadList}"
+                                        SelectedItem="{Binding Product, Mode=TwoWay}"
+                                       HorizontalAlignment="Left">
+                                <ComboBox.ItemTemplate>
+                                    <DataTemplate>
+                                        <StackPanel Orientation="Vertical">
+                                            <StackPanel Orientation="Horizontal">
+                                                <materialDesign:PackIcon Kind="CubeOutline" />
+                                                <TextBlock Text="{Binding }" />
+                                            </StackPanel>
+                                            <TextBlock Text="{Binding Description}"
+                                                MinHeight="0"
+                                                MaxWidth="300"
+                                                Foreground="Gray"
+                                                TextTrimming="CharacterEllipsis"
+                                                FontSize="{DynamicResource Font.Size.Captions4}"
+                                                TextWrapping="Wrap" />
+                                        </StackPanel>
+                                    </DataTemplate>
+                                </ComboBox.ItemTemplate>
+                            </ComboBox>
+
+
+                            <TextBlock Margin="0,0,0,8"
+                                       Grid.Row="6"
+                                       VerticalAlignment="Center"
+                                       Text="添加产品:"
+                                       FontSize="{DynamicResource Font.Size.Body3}"
+                                       HorizontalAlignment="Right" />
+                            <TextBox Grid.Row="6"
+                                     Grid.Column="1"
+                                     Margin="10,4"
+                                     MinWidth="100"
+                                     FontSize="{DynamicResource Font.Size.Body3}"
+                                     TextAlignment="Center"
+                                     HorizontalAlignment="Left"
+                                     VerticalAlignment="Center">
+                                <TextBox.Text>
+                                    <Binding Path="Product"
+                                     Mode="TwoWay">
+                                    </Binding>
+                                </TextBox.Text>
+                            </TextBox>
+
+
+                            <StackPanel Grid.Row="7"
+                                        Grid.ColumnSpan="2"
+                                        Margin="0,6"
+                                        Orientation="Horizontal"
+                                        HorizontalAlignment="Center">
+
+                                <Button Margin="5"
+                                        Style="{StaticResource MaterialDesignRaisedButton}"
+                                        materialDesign:ButtonAssist.CornerRadius="10"
+                                        MinWidth="100"
+                                        Command="{Binding AddProWithMesCommand}">
+                                    <StackPanel Orientation="Horizontal"
+                                        HorizontalAlignment="Center">
+                                        <materialDesign:PackIcon Kind="AddBox"
+                                         Margin="0,0,6,0" />
+                                        <TextBlock VerticalAlignment="Center"
+                                         Text="添加产品" />
+                                    </StackPanel>
+                                </Button>
+                                <Button Margin="5"
+                                        Style="{StaticResource MaterialDesignRaisedButton}"
+                                        materialDesign:ButtonAssist.CornerRadius="10"
+                                        MinWidth="100"
+                                        Command="{Binding DeleteProductMesCommand}">
+                                    <StackPanel Orientation="Horizontal"
+                                        HorizontalAlignment="Center">
+                                        <materialDesign:PackIcon Kind="Delete"
+                                         Margin="0,0,6,0" />
+                                        <TextBlock VerticalAlignment="Center"
+                                         Text="删除产品" />
+                                    </StackPanel>
+                                </Button>
+                            </StackPanel>
+
+
+
+                            <StackPanel Grid.Row="8"
                             Grid.ColumnSpan="2"
                             Grid.ColumnSpan="2"
                             Margin="0,6"
                             Margin="0,6"
                             Orientation="Horizontal"
                             Orientation="Horizontal"

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff