From 6c6960372db2f68615a4c927d0934693694c6a7c Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期三, 10 十二月 2025 23:16:49 +0800
Subject: [PATCH] 蓝宝优化项更新

---
 DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs |   82 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 80 insertions(+), 2 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs b/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
index 81d4769..e7113af 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
@@ -7,6 +7,7 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
+using System.Linq;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
@@ -39,6 +40,7 @@
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
             toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+            this.toolBarMenu1.btnPrintClick += ToolBarMenu1_btnPrintClick;
             this.toolBarMenu1.getXmlConfig();
             Form parentForm = this.FindForm();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
@@ -153,6 +155,72 @@
             getPageList(1);
         }
 
+        private void ToolBarMenu1_btnPrintClick(object sender, EventArgs e)
+        {
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_blNo, gridView1);
+            if (string.IsNullOrEmpty(rowGuid))
+            {
+                this.toolBarMenu1.rptParameter = "return false";
+                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎵撳嵃鐨勫崟鎹紒");
+                return;
+            }
+
+            var dr = gridView1.GetFocusedDataRow();
+            string ordertype = txt_bl017.Text.Trim();
+
+            // 鍒ゆ柇鍝釜涓嶄负绌哄氨璧嬪�肩粰 ordertype
+            if (!string.IsNullOrEmpty(txt_bl017.Text.Trim()))
+            {
+                ordertype = txt_bl017.Text.Trim();
+            }
+            else if (!string.IsNullOrEmpty(dr["bl009"].ToString()))
+            {
+                ordertype = dr["bl009"].ToString();
+            }
+
+            // 濡傛灉涓や釜閮戒负绌猴紝鍒欐彁绀洪敊璇�
+            if (string.IsNullOrEmpty(ordertype))
+            {
+                this.toolBarMenu1.rptParameter = "return false";
+                Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
+                txt_bl017.Focus();
+                return;
+            }
+ 
+            if (ordertype == "濮斿琛ユ枡")
+            {
+                string rptParameter = "rpt_wwblsqd{"
+              + rowGuid  // @inOrderGuid - 鍗曟嵁guid
+              + "," + "100"  // @isDesign - 閲嶆墦閮芥槸浼�100
+              + "," + ""  // @in1 - 鍏ュ簱鏃堕棿锛堟墿灞曠敤锛�
+              + "," + ""  // @in2 - 鐗归噰锛堟墿灞曠敤锛�
+              + "," + ""  // @in3 - 渚涘簲鍟唅d锛堟墿灞曠敤锛�
+              + "," + ""  // @in4 - 寮犳暟锛堟墿灞曠敤锛�
+              + "," + ""  // @in5 - 鏁伴噺锛堟墿灞曠敤锛�
+              + "," + ""  // @in6 - 鎵╁睍鐢�
+              + "}";
+                this.toolBarMenu1.rptParameter = rptParameter;
+                this.toolBarMenu1.guidKey = rowGuid;
+            }
+            else
+            {
+                string rptParameter = "rpt_wwclsqd{"
+              + rowGuid  // @inOrderGuid - 鍗曟嵁guid
+              + "," + "100"  // @isDesign - 閲嶆墦閮芥槸浼�100
+              + "," + ""  // @in1 - 鍏ュ簱鏃堕棿锛堟墿灞曠敤锛�
+              + "," + ""  // @in2 - 鐗归噰锛堟墿灞曠敤锛�
+              + "," + ""  // @in3 - 渚涘簲鍟唅d锛堟墿灞曠敤锛�
+              + "," + ""  // @in4 - 寮犳暟锛堟墿灞曠敤锛�
+              + "," + ""  // @in5 - 鏁伴噺锛堟墿灞曠敤锛�
+              + "," + ""  // @in6 - 鎵╁睍鐢�
+              + "}";
+                this.toolBarMenu1.rptParameter = rptParameter;
+                this.toolBarMenu1.guidKey = rowGuid;
+            }
+           
+        }
+
         /// <summary>
         /// 鍙栨秷浜嬩欢
         /// </summary>
@@ -256,6 +324,9 @@
                 gvList.Add(gvMx1);
                 UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
             }
+            //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼
+            txt_orgId.IsReadly = true;
+            txt_aboutGuid.IsReadly = true;
         }
         /// <summary>
         /// 鏂板浜嬩欢
@@ -270,6 +341,9 @@
             gridViews.Add(gvMx1);
             UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
             Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+            //澧炲姞鏃讹紝榛樿缁勭粐
+            string deftOrg = UtilityHelper.GetFirstOrg(txt_orgId);
+
 
         }
         /// <summary>
@@ -377,8 +451,12 @@
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage)
         {
-            gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
-            _sbSqlWhere += " and a.bl008='" + strType + "'";
+            gcMain1.DataSource = null;
+            System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+            _sbSqlWhere.Append("  and a.bl008='" + strType + "'");
+            _sbSqlWhere.Append(" and a.org_id in");
+            _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+            _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
             PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);
             try

--
Gitblit v1.9.3