From 9516ce1ad9e8be1b9d33f7961c91a5683cc83f07 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期六, 07 六月 2025 15:37:32 +0800 Subject: [PATCH] 采购报表 --- DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 41 insertions(+), 4 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs index 433ab06..3cf93b3 100644 --- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs +++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs @@ -1,5 +1,6 @@ using DevExpress.XtraEditors; using DevExpress.XtraGrid.Views.Grid; +using Gs.DevApp.DevFrm.Rk; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; @@ -24,7 +25,8 @@ toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; this.toolBarMenu1.getXmlConfig(); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "docStusTxt", "", (value) => + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "docStusTxt", "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); }, tips); @@ -110,7 +112,7 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage) { - var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); + gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); var json = JsonConvert.SerializeObject(pgq); @@ -147,6 +149,10 @@ MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } + /// <summary> + /// 璇诲彇瀹炰綋 + /// </summary> + /// <param name="strGuid"></param> private void getModel(string strGuid) { bool isEdit = false; @@ -178,8 +184,7 @@ var _job = JObject.Parse(strJson); var array = new JArray(); foreach (var a in _job["rtnData"]["list"]) array.Add(a); - var dt = - JsonConvert.DeserializeObject<DataTable>( + var dt = JsonConvert.DeserializeObject<DataTable>( array.ToString()); if (dt.Rows.Count > 0) { @@ -192,6 +197,22 @@ { UtilityHelper.SetDefaultTable(gcMx1, gvMx1); } + + var array2 = new JArray(); + foreach (var a in _job["rtnData"]["list2"]) array2.Add(a); + var dt2 = JsonConvert.DeserializeObject<DataTable>( + array2.ToString()); + if (dt2.Rows.Count > 0) + { + gcMx2.BindingContext = new BindingContext(); + gcMx2.DataSource = dt2; + gcMx2.ForceInitialize(); + gvMx2.BestFitColumns(); + } + else + { + UtilityHelper.SetDefaultTable(gcMx2, gvMx2); + } } else { @@ -203,5 +224,21 @@ MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } + + /// <summary> + /// 鏌ョ湅鍒拌揣璁板綍锛屾牴鎹噰璐槑缁唃uid + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void rptHistory_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) + { + var rowhandle = gvMx1.FocusedRowHandle; + if (rowhandle < 0) + return; + var dr = gvMx1.GetDataRow(rowhandle); + var mxGuid = dr["guid"].ToString(); + HistoryDhmxcs frm = new HistoryDhmxcs(mxGuid); + frm.ShowDialog(); + } } } \ No newline at end of file -- Gitblit v1.9.3