From 03a9e3df0b72e02c4217bc50de0f2ea40531bcea Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期日, 22 十二月 2024 10:02:35 +0800 Subject: [PATCH] 采购退货申请 --- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs | 96 +++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 82 insertions(+), 14 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs index 38cfbce..97c8615 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs @@ -7,10 +7,9 @@ using System; using System.Collections.Generic; using System.Data; -using System.Drawing; using System.Threading.Tasks; using System.Windows.Forms; -using System.Windows.Media.Animation; + namespace Gs.DevApp.DevFrm { @@ -30,7 +29,10 @@ this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => + toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick; + toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick; + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "qt015", "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); }); @@ -43,6 +45,8 @@ }); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; + txt_qt011.getSuppler(""); + txt_qt018.getSuppler(""); //璁剧疆浠撳簱閫夋嫨 this.txt_qt011.EditChanged += (s, e) => { @@ -73,7 +77,7 @@ { MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } - + gcMx1.MouseClick += GcMx1_MouseClick; } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { @@ -114,6 +118,55 @@ { _filterList = e.FilterList; getPageList(1); + } + private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e) + { + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_qtck, gridView1); + toolBarMenu1.guidKey = rowGuid; + toolBarMenu1.rptParameter = "rpt_Qtrk{}"; + } + private void ToolBarMenu1_btnReportClick(object sender, EventArgs e) + { + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_qtck, gridView1); + toolBarMenu1.guidKey = rowGuid; + if (xtraTabControl1.SelectedTabPageIndex == 0) + { + getModel(rowGuid); + this.toolBarMenu1.rptParameter = "return false"; + return; + } + if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); + txt_iCount_1.Focus(); + this.toolBarMenu1.rptParameter = "return false"; + return; + } + if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); + txt_psnQty_1.Focus(); + this.toolBarMenu1.rptParameter = "return false"; + return; + } + if (lbMxGuid.Text.Trim().Length < 10) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�"); + this.toolBarMenu1.rptParameter = "return false"; + return; + } + this.toolBarMenu1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim() + + "," + "" + + "," + "" + + "," + txt_iCount_1.Text.Trim() + + "," + txt_psnQty_1.Text.Trim() + + "}"; } /// <summary> @@ -254,7 +307,7 @@ inRklx = txt_qt020.Text.Trim(),//鍏ュ簱绫诲瀷 inGys = inGys,//渚涘簲鍟� inCjId = inCjId,//鍏ュ簱浠撳簱 - inDepart = txt_qt009.Text.Trim(),//鐢宠閮ㄩ棬 + inDepart = txt_qt009.GetId(),//鐢宠閮ㄩ棬 inXsdh = txt_qt021.Text.Trim(),//閿�鍞崟鍙� inRkyy = txt_qt010.Text.Trim(),//鍏ュ簱鍘熷洜 list = new List<dynamic>(), @@ -272,12 +325,12 @@ if (row != null) { Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); - //string _msl = row["quantity"].ToString(); - //if (string.IsNullOrEmpty(_msl)) - //{ - // MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�"); - // return; - //} + string _msl = row["qd007"].ToString(); + if (string.IsNullOrEmpty(_msl)) + { + MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�"); + return; + } _obj.list.Add(new { Guid = _guid, @@ -358,7 +411,6 @@ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - var _obj = new { guid = strGuid,//涓诲缓 @@ -403,12 +455,12 @@ private void repositoryItemSearchLookUpEdit1_EditValueChanged(object sender, EventArgs e) { - SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit; DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow(); gvMx1.SetFocusedRowCellValue("qd002", SelectedDataRow["itemNo"]); gvMx1.SetFocusedRowCellValue("qd003", SelectedDataRow["itemName"]); gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]); + gvMx1.SetFocusedRowCellValue("qd009", SelectedDataRow["dwName"]); } private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) @@ -527,6 +579,22 @@ } - + private void GcMx1_MouseClick(object sender, MouseEventArgs e) + { + string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gvMx1, e, "guid"); + if (string.IsNullOrEmpty(rowGuid)) + return; + lbMxGuid.Text = rowGuid; + toolBarMenu1.guidKey = rowGuid; + var info = gvMx1.CalcHitInfo(e.Location); + var view = info.View; + var row = view.GetDataRow(info.RowHandle); + txtWlid.Text = row["itemId"].ToString(); + txtWlgg.Text = row["qd004"].ToString(); + txtWlmc.Text = row["qd003"].ToString(); + txtQuantity.Text = row["qd007"].ToString();//鐢宠鎬婚噺 + txtYdy.Text = row["YDYNUM"].ToString();//宸叉墦鍗版�婚噺 + kyPrtQty.Text = row["KDYNUM"].ToString();//鍙墦鍗版�婚噺 + } } } \ No newline at end of file -- Gitblit v1.9.3