From cd5483b6c38111f9b45cd39b8201cc1ceb847e48 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期三, 05 三月 2025 09:22:44 +0800 Subject: [PATCH] 委外退料版面 --- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs | 84 ++++++++++++++++-------------------------- 1 files changed, 32 insertions(+), 52 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs index 2919f8f..1c6ecef 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs @@ -20,14 +20,18 @@ InitializeComponent(); this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; - toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; + toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; + List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + gvList.Add(gridView1); + Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => - { - Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); - }); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) => + { + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); + }); Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => { getModel(value); @@ -43,6 +47,19 @@ Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); + } + /// <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> /// 鍒嗛〉浜嬩欢 @@ -76,48 +93,6 @@ { _filterList = e.FilterList; getPageList(1); - } - /// <summary> - /// 鍒犻櫎浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) - { - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_billNo, gridView1, "roleName"); - if (string.IsNullOrEmpty(rowGuid)) - { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); - return; - } - - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵\n璇ユ搷浣滃皢浼氭竻绌虹浉搴旂殑鐢ㄦ埛鏉冮檺")) - return; - var lst = new List<string>(); - lst.Add(rowGuid); - var _obj = lst; - try - { - var strJson = UtilityHelper.HttpPost("", "Role/DeleteModel", - JsonConvert.SerializeObject(_obj)); - var _rtn = UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) - { - if (xtraTabControl1.SelectedTabPageIndex == 0) - { } - else - Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); - getPageList(this.pageBar1.CurrentPage); - } - - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); - } - catch (Exception ex) - { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); - } } /// <summary> @@ -186,6 +161,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); + gridView1.BestFitColumns(); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); @@ -228,8 +204,8 @@ dynamic dy = _rtn.rtnData; lbGuid.Text = strGuid; List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); - gvList.Add(gvMx1); gvList.Add(gvMx2); + gvList.Add(gvMx1); UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList); JObject _job = JObject.Parse(strJson); JArray array = new JArray(); @@ -243,6 +219,7 @@ gcMx1.BindingContext = new BindingContext(); gcMx1.DataSource = dt; gcMx1.ForceInitialize(); + gvMx1.BestFitColumns(); } else { @@ -259,6 +236,7 @@ gcMx2.BindingContext = new BindingContext(); gcMx2.DataSource = dt2; gcMx2.ForceInitialize(); + gvMx2.BestFitColumns(); } else { @@ -272,7 +250,6 @@ { ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } - } /// <summary> @@ -314,12 +291,15 @@ JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); - if (_rtn.rtnCode > 0) + if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { if (xtraTabControl1.SelectedTabPageIndex == 1) + { getModel(lbGuid.Text.Trim()); - else - getPageList(this.pageBar1.CurrentPage); + } + int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); + gridView1.FocusedRowHandle = rowHandle; + UtilityHelper.SetCheckIco(gridView1, "checkStatus", "checkUser", "checkUser", picCheckBox, this, _inFieldValue.ToString()); } } catch (Exception ex) -- Gitblit v1.9.3