From 8afccee95f065d4d9c2d6800d895878a13667e8b Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期六, 19 四月 2025 09:18:56 +0800 Subject: [PATCH] 打印 --- DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs | 4 +- DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs | 4 +- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs | 4 +- DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs | 5 +- DevApp/Gs.DevApp/App.config | 4 +- DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs | 4 +- DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs | 11 ++--- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs | 4 +- DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs | 4 +- DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 19 ++++++++- 10 files changed, 36 insertions(+), 27 deletions(-) diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config index 5bad92a..2ad734f 100644 --- a/DevApp/Gs.DevApp/App.config +++ b/DevApp/Gs.DevApp/App.config @@ -28,8 +28,8 @@ </assemblyBinding> </runtime> <appSettings> - <add key="WebApiUrl" value="http://localhost:5263/" /> - <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />--> + <!--<add key="WebApiUrl" value="http://localhost:5263/" />--> + <add key="WebApiUrl" value="http://192.168.1.145:81/" /> <add key="LogPath" value="logs" /> <add key="ProductName" value="G-MES V2.0" /> <add key="PageSize" value="50" /> diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs index fd306c5..7bbe0f6 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs @@ -89,14 +89,14 @@ ucBtnPrint1.guidKey = ""; string rowGuid = lbMxGuid.Text.Trim(); ucBtnPrint1.guidKey = rowGuid; - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); txt_iCount_1.Focus(); this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); txt_psnQty_1.Focus(); diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs index f5080a8..386adf5 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs @@ -112,14 +112,14 @@ ucBtnPrint1.guidKey = ""; string rowGuid = lbMxGuid.Text.Trim(); ucBtnPrint1.guidKey = rowGuid; - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); txt_iCount_1.Focus(); this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); txt_psnQty_1.Focus(); diff --git a/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs b/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs index 400407a..e6ee984 100644 --- a/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs +++ b/DevApp/Gs.DevApp/DevFrm/Sales/Frm_SalesReturnNotice.cs @@ -84,14 +84,14 @@ ucBtnPrint1.guidKey = ""; string rowGuid = lbMxGuid.Text.Trim(); ucBtnPrint1.guidKey = rowGuid; - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); txt_iCount_1.Focus(); this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); txt_psnQty_1.Focus(); diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs index 03c8a8d..f5f6c7b 100644 --- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs +++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs @@ -562,16 +562,16 @@ this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); txt_iCount_1.Focus(); this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍐呭寘瑁呮暟閲忥紒"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); txt_psnQty_1.Focus(); this.ucBtnPrint1.rptParameter = "return false"; return; @@ -600,7 +600,7 @@ this.ucBtnPrint98.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_iCount_98.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_98.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); txt_iCount_98.Focus(); @@ -631,7 +631,6 @@ this.ucBtnPrint100.rptParameter = "return false"; return; } - this.ucBtnPrint100.rptParameter = "rpt_hgm{" + "100" + "," + "" @@ -674,8 +673,6 @@ } } } - #endregion - } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs index 4066744..38addce 100644 --- a/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs +++ b/DevApp/Gs.DevApp/DevFrm/WW/Frm_WwTbl.cs @@ -97,14 +97,14 @@ ucBtnPrint1.guidKey = ""; string rowGuid = lbMxGuid.Text.Trim(); ucBtnPrint1.guidKey = rowGuid; - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); txt_iCount_1.Focus(); this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); txt_psnQty_1.Focus(); diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs index 0c51293..f90bf5f 100644 --- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs +++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs @@ -44,14 +44,14 @@ { string rowGuid = lbMxGuid.Text.Trim(); ucBtnPrint1.guidKey = rowGuid; - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); txt_iCount_1.Focus(); this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); txt_psnQty_1.Focus(); diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs index 70e4f7a..d934a03 100644 --- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs +++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs @@ -40,7 +40,6 @@ { txt_suppId.Text = this.txt_suppNo_1.GetCode(); }; - this.ucBtnPrint1.btnDesignClick += (s, e) => { ucBtnPrint1.rptParameter = "rpt_ItemInv{}"; @@ -58,14 +57,14 @@ this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); txt_iCount_1.Focus(); this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); txt_psnQty_1.Focus(); diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs index 3f7c8bc..281da1b 100644 --- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs +++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs @@ -82,14 +82,14 @@ ucBtnPrint1.guidKey = ""; string rowGuid = lbMxGuid.Text.Trim(); ucBtnPrint1.guidKey = rowGuid; - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); txt_iCount_1.Focus(); this.ucBtnPrint1.rptParameter = "return false"; return; } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) + if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim())) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); txt_psnQty_1.Focus(); diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs index e534477..3967e2b 100644 --- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs +++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs @@ -1722,7 +1722,7 @@ } }; gridView1.OptionsView.ColumnAutoWidth = false;//鑷姩璋冩暣鍒楀 - + if (isPostSearch == true) { gridView1.OptionsView.ShowGroupPanel = false; @@ -2044,7 +2044,20 @@ bool isNumeric = decimal.TryParse(input, out number); return isNumeric; } - + /// <summary> + /// 鍒ゆ柇鏄笉鏄竴涓湁鏁堢殑姝f暣鏁� + /// </summary> + /// <param name="str"></param> + /// <returns></returns> + public static bool IsNumeric3(string str) + { + string input = str; + decimal number; + bool isNumeric = decimal.TryParse(input, out number); + if (isNumeric && number > 0) + return true; + return false; + } public static void PrintJiSuan(DevExpress.XtraEditors.TextEdit box1, DevExpress.XtraEditors.TextEdit box2, string sum, DevExpress.XtraEditors.RadioGroup rd) { if (rd.SelectedIndex == 2) @@ -2107,7 +2120,7 @@ // private GridColumn checkBoxColumn = null; public static void CustomDrawColumnHeader(object sender, ColumnHeaderCustomDrawEventArgs e) { - + Rectangle checkBoxColumnHeaderRect = new Rectangle(51, 1, 37, 57); if (e.Column != null && e.Column.AbsoluteIndex == 0) { -- Gitblit v1.9.3