From f924cbebf1695c6323c1ed38f418dccd288fe1b9 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期三, 06 十一月 2024 14:45:27 +0800 Subject: [PATCH] iqc --- DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs | 157 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 92 insertions(+), 65 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs index 55cbb39..6e3b0e4 100644 --- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs +++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs @@ -2,10 +2,8 @@ using System.Collections.Generic; using System.Data; using System.Drawing; -using System.Security.Cryptography; using System.Text; using System.Windows.Forms; -using DevExpress.DataAccess.DataFederation; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; using DevExpress.XtraGrid.Views.Grid; @@ -22,7 +20,6 @@ { private List<FilterEntity> _filterList = new List<FilterEntity>(); private readonly string _webServiceName = "MesInvItemArnManager/"; - public Frm_MesInvItemArn() { InitializeComponent(); @@ -39,6 +36,7 @@ toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick; toolBarMenu1.btnFjianYanClick += ToolBarMenu1_btnFjianYanClick; + toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; getPageList(1, UtilityHelper.GetPageSize()); gridView1.CustomDrawRowIndicator += (s, e) => @@ -54,11 +52,28 @@ e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); e.Graphics.DrawString(str, f, Brushes.Gray, r); }; - this.txt_depotsCode.KeyFile = "depotCode"; - this.txt_suppNo.KeyFile = "suppNo"; + //璁剧疆浠撳簱閫夋嫨 + this.txt_depotsId.KeyFile = "depotId"; + this.txt_depotsId.EditChanged += (s, e) => + { + txtDepotsId.Text = this.txt_depotsId.GetId(); + }; + //璁剧疆渚涘簲鍟嗛�夋嫨 + this.txt_suppId.KeyFile = "id"; + this.txt_suppId.EditChanged += (s, e) => + { + txtSupplierId.Text = this.txt_suppId.GetId(); + }; + //閫夋嫨闇�瑕佸叆搴撶殑鏄庣粏 btnSelect.Click += (s, e) => { - var frm = new SelectCgMx(); + if (string.IsNullOrEmpty(this.txt_suppId.GetId())) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨渚涘簲鍟嗭紝鎵嶈兘閫夋嫨鏉ユ枡鏄庣粏锛�"); + return; + } + var frm = new SelectCgMx(this.txt_suppId.GetId()); + //璧嬪�肩粰鏄庣粏琛� frm.UpdateParent += (ss, ee) => { var lst = new List<string>(); @@ -82,41 +97,7 @@ frm.ShowDialog(); }; } - - private void ToolBarMenu1_btnFjianYanClick1(object sender, EventArgs e) - { - throw new NotImplementedException(); - } - - /// <summary> - /// 鍙嶆楠� - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - /// <exception cref="NotImplementedException"></exception> - private void ToolBarMenu1_btnFjianYanClick(object sender, EventArgs e) - { - toolBarMenu1.guidKey = ""; - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_billNo, gridView1); - toolBarMenu1.guidKey = rowGuid; - } - - /// <summary> - /// 妫�楠� - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - /// <exception cref="NotImplementedException"></exception> - private void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e) - { - toolBarMenu1.guidKey = ""; - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_billNo, gridView1); - toolBarMenu1.guidKey = rowGuid; - } + /// <summary> /// 鍙屽嚮浜嬩欢 @@ -163,7 +144,49 @@ _filterList = e.FilterList; getPageList(1, pageBar1.RowsCount); } + /// <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_billNo, gridView1); + toolBarMenu1.guidKey = rowGuid; + } + /// <summary> + /// 鍙嶆楠� + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + /// <exception cref="NotImplementedException"></exception> + private void ToolBarMenu1_btnFjianYanClick(object sender, EventArgs e) + { + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_billNo, gridView1); + toolBarMenu1.guidKey = rowGuid; + } + + /// <summary> + /// 妫�楠� + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + /// <exception cref="NotImplementedException"></exception> + private void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e) + { + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_billNo, gridView1); + toolBarMenu1.guidKey = rowGuid; + } /// <summary> /// 鍙栨秷浜嬩欢 /// </summary> @@ -268,38 +291,32 @@ private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) { toolBarMenu1.isSetBtn = false; - var _ckCode = txt_depotsCode.GetCode(); //浠撳簱缂栧彿 depots_code - var _gysCode = txt_suppNo.GetCode(); //渚涘簲鍟嗙紪鍙� - if (string.IsNullOrEmpty(_ckCode)) - { - MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�"); - txt_depotsCode.Focus(); - return; - } - - if (string.IsNullOrEmpty(_gysCode)) + var _ckId = txt_depotsId.GetId(); //浠撳簱缂栧彿 depots_code + var _gysId = txt_suppId.GetId(); //渚涘簲鍟嗙紪鍙� + if (string.IsNullOrEmpty(_gysId)) { MsgHelper.Warning("璇烽�夋嫨渚涘簲鍟嗭紒"); - txt_suppNo.Focus(); + txt_suppId.Focus(); return; } - if (string.IsNullOrEmpty(txt_paperBillNo.Text.Trim())) + if (string.IsNullOrEmpty(_ckId)) { - MsgHelper.Warning("璇烽�夋嫨閫佽揣鍗曞彿锛�"); - txt_paperBillNo.Focus(); + MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�"); + txt_depotsId.Focus(); return; } - - var _obj = new MesInvItemArn(); - _obj.Guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()); //鍒拌揣鍗曚富閿� - _obj.PaperBillNo = txt_paperBillNo.Text.Trim(); //閫佽揣鍗曞彿; - _obj.Remark = ""; //澶囨敞 - _obj.SuppNo = _gysCode; //渚涘簲鍟嗙紪鍙� - _obj.DepotsCode = _ckCode; //浠撳簱缂栧彿 depots_code - _obj.FType = txt_fType.Checked; //0=閲囪喘锛�1=濮斿 - _obj.UrgentFlag = txt_urgentFlag.Checked;//0=涓嶆�ワ紝1=鎬� - _obj.list = new List<MesInvItemArnDetail>(); + var _obj = new MesInvItemArn() + { + Guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()), //鍒拌揣鍗曚富閿� + PaperBillNo = txt_paperBillNo.Text.Trim(), //閫佽揣鍗曞彿; + Remark = txt_remark.Text.Trim(), //澶囨敞 + SuppId = _gysId, //渚涘簲鍟� + DepotsId = _ckId,//浠撳簱 + FType = txt_fType.Checked,//0=閲囪喘锛�1=濮斿 + UrgentFlag = txt_urgentFlag.Checked,//0=涓嶆�ワ紝1=鎬� + list = new List<MesInvItemArnDetail>(), + }; gvMx1.CloseEditor(); gvMx1.UpdateCurrentRow(); if (gvMx1.DataRowCount <= 0) @@ -440,6 +457,11 @@ } } + /// <summary> + /// 鏄庣粏鍒犻櫎 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> private void repositoryItemButtonEdit1_ButtonClick(object sender, ButtonPressedEventArgs e) { @@ -452,6 +474,11 @@ var mxGuid = dr["guid"].ToString(); if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵")) return; + if (string.IsNullOrEmpty(mxGuid)) + { + gvMx1.DeleteRow(rowhandle); + return; + } var strJson = ""; var lst = new List<string>(); lst.Add(mxGuid); -- Gitblit v1.9.3