From bcad58747aa94c710e35228fea00d95d379333fc Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期六, 11 一月 2025 17:39:05 +0800 Subject: [PATCH] 细节 --- DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs | 83 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 78 insertions(+), 5 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs index dfc2bc0..a6eecf3 100644 --- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs +++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs @@ -27,7 +27,9 @@ this.toolBarMenu1.btnTzblClick += ToolBarMenu1_btnTzblClick; this.toolBarMenu1.btnKgClick += ToolBarMenu1_btnKgClick; this.toolBarMenu1.btnWgClick += ToolBarMenu1_btnWgClick; + toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); @@ -41,8 +43,16 @@ }); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; + txt_sjXt.getSuppler(""); + this.ucBtnPrint1.btnDesignClick += (s, e) => + { + ucBtnPrint1.rptParameter = "rpt_daa{}"; + }; + this.ucBtnPrint1.btnReportClick += (s, e) => + { + _print(); + }; } - private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); @@ -113,7 +123,19 @@ { _toolCk(8); } - + /// <summary> + /// 鏃ュ織 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnLogClick(object sender, EventArgs e) + { + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_daa001, gridView1); + toolBarMenu1.guidKey = rowGuid; + } /// <summary> /// 鍙栨秷浜嬩欢 /// </summary> @@ -121,7 +143,7 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); } /// <summary> @@ -220,6 +242,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); + gridView1.BestFitColumns(); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); @@ -237,7 +260,6 @@ { ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } - } private void getModel(string strGuid) { @@ -266,6 +288,7 @@ lbGuid.Text = strGuid; List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); gvList.Add(gvMx1); + gvList.Add(gvMx2); UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList); JObject _job = JObject.Parse(strJson); JArray array = new JArray(); @@ -279,10 +302,28 @@ gcMx1.BindingContext = new BindingContext(); gcMx1.DataSource = dt; gcMx1.ForceInitialize(); + gvMx1.BestFitColumns(); } else { Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); + } + JArray array2 = new JArray(); + foreach (var a in _job["rtnData"]["list2"]) + { + array2.Add(a); + } + DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(array2.ToString()); + if (dt2.Rows.Count > 0) + { + gcMx2.BindingContext = new BindingContext(); + gcMx2.DataSource = dt2; + gcMx2.ForceInitialize(); + gvMx2.BestFitColumns(); + } + else + { + Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2); } } else @@ -293,7 +334,6 @@ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } - /// <summary> /// 宸ュ叿鏉′簨浠� @@ -368,5 +408,38 @@ MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } + private void _print() + { + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_daa001, gridView1); + ucBtnPrint1.guidKey = rowGuid; + if (rowGuid.Length < 36) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨浣犺鎵撳嵃鐨勮锛�"); + this.ucBtnPrint1.rptParameter = "return false"; + return; + } + if (string.IsNullOrEmpty(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())) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); + txt_psnQty_1.Focus(); + this.ucBtnPrint1.rptParameter = "return false"; + return; + } + this.ucBtnPrint1.rptParameter = "rpt_daa{" + "" + + "," + txt_printRemark.Text.Trim() + + "," + "" + + "," + txt_iCount_1.Text.Trim() + + "," + txt_psnQty_1.Text.Trim() + + "}"; + } } } \ No newline at end of file -- Gitblit v1.9.3