From 3c6cad1224e7cb985f03d15cc98a4a2074a5af49 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期一, 22 十二月 2025 22:25:33 +0800
Subject: [PATCH] 增加轮播看板

---
 DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs |   71 ++++++++++++++++++++++++++++++-----
 1 files changed, 60 insertions(+), 11 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs
index 5eb5e7b..c8364ef 100644
--- a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs
+++ b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesDepot.cs
@@ -1,6 +1,7 @@
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
 using DevExpress.XtraGrid.Views.Grid;
+using Gs.DevApp.DevFrm.Rpt;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Gs.DevApp.UserControl;
@@ -43,6 +44,47 @@
             }, lbGuid);
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
+
+
+            #region 鎵撳嵃搴撲綅鐮侊紝浠呬粎鎵撳嵃
+            this.ucBtnPrint1.SetPlButton(true);
+            this.ucBtnPrint1.SetPrintButton(false);
+            //鎵撳嵃鎵归噺鎿嶄綔浜嬩欢
+            this.ucBtnPrint1.btnAllClick += (s, e) =>
+            {
+                string rowGuid = lbGuid.Text.Trim();
+                SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "浠撲綅鐮�");
+                string strCodeList = "";
+                frm.UpdateParent += (ss, ee) =>
+                {
+                    strCodeList = ee.StringSingle;
+                };
+                frm.ShowDialog();
+                if (string.IsNullOrEmpty(strCodeList))
+                    return;
+                try
+                {
+                    string rptParameter = "rpt_KW{"
+                        + "100" // 閲嶆墦閮芥槸浼�100
+                        + "," + ""
+                        + "," + ""
+                        + "," + ""
+                        + "," + ""
+                        + "," + strCodeList
+                        + "}";
+
+                    using (Form rpt = new RptPreview(rowGuid, rptParameter))
+                    {
+                        rpt.ShowDialog();
+                    }
+                    frm.Close();
+                }
+                catch (Exception ex)
+                {
+                    MsgHelper.ShowError(ex.Message);
+                }
+            };
+            #endregion
         }
         private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
@@ -159,14 +201,14 @@
             toolBarMenu1.isSetBtn = false;
             if (string.IsNullOrEmpty(txt_depotCode.Text.Trim()))
             {
-                MsgHelper.Warning("浠撳簱缂栫爜涓嶈兘涓虹┖锛�");
+                MsgHelper.ShowError("浠撳簱缂栫爜涓嶈兘涓虹┖锛�");
                 txt_depotCode.Focus();
                 return;
             }
 
             if (string.IsNullOrEmpty(txt_depotName.Text.Trim()))
             {
-                MsgHelper.Warning("浠撳簱鍚嶇О涓嶈兘涓虹┖锛�");
+                MsgHelper.ShowError("浠撳簱鍚嶇О涓嶈兘涓虹┖锛�");
                 txt_depotName.Focus();
                 return;
             }
@@ -183,11 +225,11 @@
                         MsgHelper.ShowError("缂栫爜涓嶈兘涓虹┖锛�");
                         return;
                     }
-                    if (string.IsNullOrEmpty(row["DepotSectionName"].ToString()))
-                    {
-                        MsgHelper.ShowError("鍚嶇О涓嶈兘涓虹┖锛�");
-                        return;
-                    }
+                    //if (string.IsNullOrEmpty(row["DepotSectionName"].ToString()))
+                    //{
+                    //    MsgHelper.ShowError("鍚嶇О涓嶈兘涓虹┖锛�");
+                    //    return;
+                    //}
                     lst.Add(new MesDepotSections
                     {
                         Guid = UtilityHelper.ToGuid(row["guid"].ToString()),
@@ -203,18 +245,18 @@
                 DepotCode = txt_depotCode.Text,
                 DepotName = txt_depotName.Text,
                 Description = txt_description.Text,
+                Remark5 = txt_remark5.TextTxt.Trim(),
                 list = lst
             };
-
             try
             {
                 var strJson = UtilityHelper.HttpPost("",
                     _webServiceName + "EditModel",
                     JsonConvert.SerializeObject(_obj));
                 var _rtn = UtilityHelper.ReturnToDynamic(strJson);
-                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
                 if (_rtn.rtnCode > 0)
                 {
+                    MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
                     lbGuid.Text = _rtn.rtnData;
                     toolBarMenu1.isSetBtn = true;
                     var gridViews = new List<GridView>();
@@ -223,10 +265,12 @@
                     toolBarMenu1.currentAction = "";
                     Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                 }
+                else
+                    MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 
@@ -236,7 +280,11 @@
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage)
         {
-            gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+            gcMain1.DataSource = null;
+            System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+            _sbSqlWhere.Append(" and a.FSubsidiary in");
+            _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+            _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
             var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc ,a.depot_code", "asc",
                 "", _sbSqlWhere.ToString());
             var json = JsonConvert.SerializeObject(pgq);
@@ -365,5 +413,6 @@
                 }
             }
         }
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3