From f23d33d0cf77a73d449cd7c38effda9e50c8fda4 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 06 三月 2025 08:13:37 +0800
Subject: [PATCH] 版面

---
 DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs |   56 +++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs b/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
index ff48c77..bbf91fd 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
@@ -6,11 +6,7 @@
 using Newtonsoft.Json.Linq;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
@@ -18,7 +14,7 @@
 {
     public partial class WwBlcl : DevExpress.XtraEditors.XtraUserControl
     {
-
+        string _ucCk = "";//浠撳簱
         string _webServiceName = "WWBlManager/";
         List<FilterEntity> _filterList = new List<FilterEntity>();
         public string strType = "";
@@ -27,7 +23,6 @@
             InitializeComponent();
             strType = _strType;
             txt_bl017.Text = _strType;
-            // txt_bl017.Tag = "moren." + _strType;
         }
         protected override void OnCreateControl()
         {
@@ -42,9 +37,13 @@
             this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
             Form parentForm = this.FindForm();
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, parentForm, "bl018", "", (value) =>
+            List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+            gvList.Add(gridView1);
+            Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(parentForm.GetType().FullName, gvList);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx( gvMx1);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter( gridView1, picCheckBox, parentForm, "bl018", "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
             });
@@ -57,11 +56,12 @@
             });
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
-            //璁剧疆浠撳簱閫夋嫨
-            txt_bl010.getSuppler("");
-            this.txt_bl010.EditChanged += (s, e) =>
+            //璁剧疆缁勭粐
+            this.txt_orgId.EditChanged += (s, e) =>
             {
-
+                string orgdId = txt_orgId.GetId();
+                if (string.IsNullOrEmpty(orgdId)) return;
+                txt_bl010.getSuppler(orgdId, _ucCk);
             };
             //閫夋嫨濮斿宸ュ崟
             this.txt_aboutGuid.EditChanged += (s, e) =>
@@ -100,6 +100,20 @@
             Task.Delay(100);
             getPageList(1);
         }
+        /// <summary>
+        /// 鏃ュ織
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_blNo, gridView1);
+            toolBarMenu1.guidKey = rowGuid;
+        }
+        
         /// <summary>
         /// 鍒嗛〉浜嬩欢
         /// </summary>
@@ -263,6 +277,13 @@
             toolBarMenu1.isSetBtn = false;
             string inGdId = txt_aboutGuid.GetId();//宸ュ崟鍙�
             string inCkId = txt_bl010.GetId();//鍙戞枡浠�
+            string inFlOrg= txt_orgId.GetId();//鍙戞枡缁勭粐
+            if (string.IsNullOrEmpty(inFlOrg))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍙戞枡缁勭粐锛�");
+                txt_orgId.Focus();
+                return;
+            }
             if (string.IsNullOrEmpty(inGdId))
             {
                 Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨宸ュ崟锛�");
@@ -284,7 +305,7 @@
             var _obj = new
             {
                 guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
-                inOrgId = "",//
+                inOrgId = inFlOrg,//鍙戞枡缁勭粐
                 inGdId = inGdId,//宸ュ崟鍙�
                 inCkId = inCkId,//浠撳簱
                 inYy = txt_bl007.Text.Trim(),//鍘熷洜
@@ -327,11 +348,13 @@
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
                 if (_rtn.rtnCode > 0)
                 {
-                    lbGuid.Text = _rtn.rtnData;
+                    lbGuid.Text = _rtn.rtnData.outGuid;
+                    txt_blNo.Text = _rtn.rtnData.outNo;
                     toolBarMenu1.isSetBtn = true;
                     List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                     gvList.Add(gvMx1);
                     UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList);
+                    toolBarMenu1.currentAction = "";
                 }
             }
             catch (Exception ex)
@@ -348,7 +371,7 @@
         private void getPageList(int curPage)
         {
             var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
-            // _sbSqlWhere += " and bl017=200";
+            _sbSqlWhere += " and a.bl008='" + strType + "'";
             PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);
             try
@@ -405,10 +428,12 @@
                 if (_rtn.rtnCode > 0)
                 {
                     dynamic dy = _rtn.rtnData;
+                    _ucCk = dy.bl010;
                     lbGuid.Text = strGuid;
                     List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                     gvList.Add(gvMx1);
                     UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList);
+                    _ucCk = "";
                     JObject _job = JObject.Parse(strJson);
                     JArray array = new JArray();
                     foreach (var a in _job["rtnData"]["list"])
@@ -566,5 +591,6 @@
                 }
             }
         }
+ 
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3