From a1125f42a23245ea2e7b737bd237097d8377a2ca Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期六, 12 四月 2025 17:02:52 +0800 Subject: [PATCH] 打印自动计算 --- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs | 42 ++++++++++++++++++++++++++++++++++-------- 1 files changed, 34 insertions(+), 8 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs index f966757..07b1f2f 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs @@ -39,14 +39,14 @@ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isSh", "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); - }); + }, tips); Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => { getModel(value); }, (value) => { getPageList(this.pageBar1.CurrentPage); - }); + }, lbGuid); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; @@ -111,15 +111,31 @@ } this.ucBtnPrint1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim() + "," + "" - + "," + "" + + "," + Gs.DevApp.ToolBox.UtilityHelper.PrintYuLiang(radOut).ToString() + "," + txt_iCount_1.Text.Trim() + "," + txt_psnQty_1.Text.Trim() + "}"; }; + + //鑷姩璁$畻鎵撳嵃閲� + txt_psnQty_1.TextChanged += (s, e) => + { + Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(this, txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut); + }; + txt_iCount_1.TextChanged += (s, e) => + { + Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(this, txt_iCount_1, txt_psnQty_1, txt_kQty.Text.Trim(), radOut); + }; + radOut.SelectedIndexChanged += (s, e) => + { + txt_psnQty_1.Text = ""; + txt_iCount_1.Text = ""; + radOut.Properties.Items[0].Description = "鍏ㄨ嚜鍔�"; + }; } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { - Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); + _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); } @@ -156,7 +172,7 @@ gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; gridView1.ActiveFilter.Clear(); gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; - var frm = new ShowFilter(gridView1.Columns, _filterList); + var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); frm.UpdateParent += Frm_UpdateParent; frm.ShowDialog(); } @@ -337,6 +353,12 @@ txt_qt019.Focus(); return; } + if (string.IsNullOrEmpty(kcBm) && string.IsNullOrEmpty(kcGys)) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("閮ㄩ棬鎴栦緵搴斿晢蹇呴』閫変竴涓紒"); + txt_qt009.Focus(); + return; + } if (string.IsNullOrEmpty(kcCk)) { Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鏀舵枡浠撳簱锛�"); @@ -401,6 +423,7 @@ UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); ucLookHuoZhu1.Enabled = false; toolBarMenu1.currentAction = ""; + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); } } catch (Exception ex) @@ -432,7 +455,7 @@ { gcMain1.DataSource = dt; gcMain1.ForceInitialize(); - gridView1.BestFitColumns(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); } else UtilityHelper.SetDefaultTable(gcMain1, gridView1); @@ -453,6 +476,7 @@ } private void getModel(string strGuid) { + gcMx1.DataSource = null; bool isEdit = false; if (toolBarMenu1.currentAction == "add") return; if (toolBarMenu1.currentAction == "edit") isEdit = true; @@ -501,6 +525,7 @@ gcMx1.DataSource = dt; gcMx1.ForceInitialize(); gvMx1.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); } else { @@ -518,6 +543,7 @@ gcMx2.DataSource = dt2; gcMx2.ForceInitialize(); gvMx2.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2); } else { @@ -672,7 +698,7 @@ txtWlmc.Text = row["qd003"].ToString(); txtQuantity.Text = row["qd007"].ToString();//鐢宠鎬婚噺 txtYdy.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺 - txtKdy.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺 + txt_kQty.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺 } } /// <summary> @@ -699,7 +725,7 @@ try { var strJson = UtilityHelper.HttpPost("", - _webServiceName + "DeleteBarcode", + "VArrivalBarcodeManager/DeleteBarcode", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) -- Gitblit v1.9.3