From d62f93072f8dd7dbd418f68d10818aaca741af74 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期二, 15 七月 2025 17:27:07 +0800
Subject: [PATCH] 送货计划

---
 DevApp/Gs.DevApp/DevFrm/Rpt/WomShjh.cs |  114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 113 insertions(+), 1 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/WomShjh.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/WomShjh.cs
index 641c5cc..90ade0c 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rpt/WomShjh.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rpt/WomShjh.cs
@@ -1,4 +1,12 @@
-锘縰sing DevExpress.XtraEditors;
+锘縰sing DevExpress.Utils;
+using DevExpress.XtraEditors;
+using DevExpress.XtraGrid.Columns;
+using DevExpress.XtraGrid.Views.Grid.ViewInfo;
+using DevExpress.XtraRichEdit.Model;
+using Gs.DevApp.Entity;
+using Gs.DevApp.ToolBox;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -13,9 +21,113 @@
 {
     public partial class WomShjh : DevExpress.XtraEditors.XtraForm
     {
+        private readonly string _webServiceName = "QL/";
         public WomShjh()
         {
             InitializeComponent();
+            this.gridView1.OptionsView.ShowGroupPanel = false;
+            tips.Appearance.BackColor = Color.LightBlue; // 璁剧疆鑳屾櫙棰滆壊
+            tips.Appearance.ForeColor = Color.Black; // 璁剧疆鍓嶆櫙鑹诧紙鏂囧瓧棰滆壊锛�
+            gridView1.MouseMove += (s, e) =>
+            {
+                try
+                {
+                    GridHitInfo hi = gridView1.CalcHitInfo(new Point(e.X, e.Y));
+                    if (hi.InRowCell)
+                    {
+                        int cuRowHandle = hi.RowHandle;
+                        if (cuRowHandle < 0)
+                            return;
+                        DataRow curRow = gridView1.GetDataRow(cuRowHandle);
+                        var column = hi.Column;
+                        string showTxt = curRow[column.FieldName].ToString();
+                        ToolTipControllerShowEventArgs aa = new ToolTipControllerShowEventArgs();
+                        aa.AllowHtmlText = DefaultBoolean.True;
+                        aa.Title = column.Caption; //HTML, 绮椾綋 
+                        aa.ToolTip = showTxt; //鏂 
+                        aa.ShowBeak = true;
+                        aa.Rounded = true; ////鍦嗚 
+                        aa.RoundRadius = 7; //鍦嗚鐜� 
+                                            // aa.ToolTipType = ToolTipType.SuperTip; //瓒呯骇鏍峰紡锛屽彲澶氳鎴栨樉绀哄浘鏍� 
+                        aa.ToolTipType = ToolTipType.Standard;//鏍囧噯鏍峰紡锛屽彲鏄剧ず楦熷槾銆� 
+                        aa.IconType = ToolTipIconType.Information; //娑堟伅鍥炬爣 
+                        aa.IconSize = ToolTipIconSize.Small; //澶у浘鏍� 
+                        tips.ShowHint(aa);
+                    }
+                    else
+                        tips.HideHint();
+                }
+                catch (Exception exception)
+                {
+                }
+            };
+            gridView1.OptionsFind.AlwaysVisible = true; // 濮嬬粓鏄剧ず鏌ユ壘闈㈡澘
+            gridView1.OptionsFind.ShowClearButton = true; // 鏄剧ず娓呴櫎鎸夐挳
+            gridView1.OptionsFind.ShowCloseButton = true; // 鏄剧ず鍏抽棴鎸夐挳
+            gridView1.IndicatorWidth = 60;
+            gridView1.CustomDrawRowIndicator += (s, e) =>
+            {
+                if (e.Info.IsRowIndicator && e.RowHandle >= 0)
+                    e.Info.DisplayText = (e.RowHandle + 1).ToString();
+            };
+            gridView1.CustomDrawEmptyForeground += (s, e) =>
+            {
+                var str = "鏆傛湭鏌ユ壘鍒板尮閰嶇殑鏁版嵁!";
+                var f = new Font("寰蒋闆呴粦", 16);
+                var r = new Rectangle(gridView1.GridControl.Width / 2 - 100,
+                    e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
+                e.Graphics.DrawString(str, f, Brushes.Gray, r);
+            };
+            gridView1.ShowFindPanel(); // 鏄剧ず鏌ユ壘闈㈡澘
+            getPageList();
+        }
+
+        /// <summary>
+        /// </summary>
+        /// <param name="curPage">绗嚑椤�</param>
+        /// <param name="pageSize">姣忛〉鍑犳潯</param>
+        private void getPageList()
+        {
+            gcMain1.DataSource = null;
+            var _obj = new
+            {
+                orgId = "",//涓诲缓
+                beginDate = DateTime.Now.AddMonths(-1).ToString(),
+                endDate = DateTime.Now.ToString()
+            };
+            var json = JsonConvert.SerializeObject(_obj);
+            try
+            {
+                var strReturn = UtilityHelper.HttpPost("",
+                    _webServiceName + "GetQLList", JsonConvert.SerializeObject(_obj));
+                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strReturn);
+                if (_rtn.rtnCode > 0)
+                {
+                    JObject _job = JObject.Parse(strReturn);
+                    JArray array = new JArray();
+                    foreach (var a in _job["rtnData"]["list"])
+                    {
+                        array.Add(a);
+                    }
+                    DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
+                    gcMain1.BindingContext = new BindingContext();
+                    if (dt.Rows.Count > 0)
+                    {
+                        gcMain1.DataSource = dt;
+                        gcMain1.ForceInitialize();
+                        gridView1.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
+                    }
+                    else
+                        UtilityHelper.SetDefaultTable(gcMain1, gridView1);
+                }
+                else
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+            }
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3