From 46db25ec513ceb5dbfa78c1ea447003b41f1c900 Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期五, 27 十二月 2024 10:16:23 +0800
Subject: [PATCH] 资产--单独匹配修改

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs
index d1e91f6..763ef30 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-info/CreateXhsSchemeInfoPage.cs
@@ -1,4 +1,6 @@
-锘縩amespace HStation.WinFrmUI
+锘縰sing DevExpress.Utils.Svg;
+
+namespace HStation.WinFrmUI
 {
     public partial class CreateXhsSchemeInfoPage : DevExpress.XtraEditors.XtraUserControl, Yw.WinFrmUI.IWizardPage<CreateXhsSchemeViewModel>
     {
@@ -25,7 +27,7 @@
         /// 鍒濆鍖�
         /// </summary>
         public async void InitialPage(CreateXhsSchemeViewModel t)
-        {
+        { 
             if (_isInitialize)
             {
                 return;
@@ -57,7 +59,9 @@
                 t.Scheme = new XhsSchemeVmo();
                 if (t.AllSchemeList != null && t.AllSchemeList.Count > 0)
                 {
-                    t.Scheme.SortCode = t.AllSchemeList.Max(x => x.SortCode) + 1;
+                    var sort_code= t.AllSchemeList.Max(x => x.SortCode) + 1;
+                    t.Scheme.SortCode = sort_code;
+                    this.txtName.EditValue = $"鏂规{sort_code}";
                 }
             }
         }
@@ -77,6 +81,7 @@
             }
             _vm.Scheme.Name = this.txtName.Text.Trim();
             _vm.Scheme.NO = this.txtNO.Text.Trim();
+            _vm.Scheme.SiteID = _vm.ProjectSite.ID;
             _vm.Scheme.Flags = this.setFlagsEditCtrl1.SelectedFlagList;
             _vm.Scheme.AllowCustom = this.ckAllowCustom.Checked;
             _vm.Scheme.ChangeTypes = this.xhsSchemeChangeTypeCheckedListHorizCtrl1.GetCheckedList();
@@ -144,7 +149,11 @@
         /// 鑳藉惁涓嬩竴姝�
         /// </summary>
         public bool CanNext()
-        { 
+        {
+            if (!_isInitialize)
+            {
+                return false;
+            }
             return Save();
         }
 
@@ -161,7 +170,14 @@
         /// </summary>
         public bool CanComplete()
         {
-            return Save();
+            if (!_isInitialize)
+            {
+                return false;
+            }
+            if (!Save())
+                return false;
+            var bol = Task.Run(async () => await CreateXhsSchemeHelper.Create(_vm)).Result;
+            return bol;
         }
 
 

--
Gitblit v1.9.3