From 94c437fea114e923bc5f9fb9c7145dd43e9b78e8 Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期四, 11 十二月 2025 23:28:11 +0800
Subject: [PATCH] 优化更新
---
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemIns.cs | 84 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 83 insertions(+), 1 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemIns.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemIns.cs
index 4a7b96c..2f01e48 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemIns.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemIns.cs
@@ -27,10 +27,15 @@
this.toolBarMenu1.getXmlConfig();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMxL2);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMxL1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- }, tips);
+ }, tips, true, (strGuid) =>
+ {
+ getModelList(strGuid);
+ });
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
@@ -40,6 +45,13 @@
}, lbGuid);
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
+
+
+ // 涓轰簡鏂逛究浣跨敤鏁村悎鍒� UtilityHelper 绫讳腑鐨� SetupGridSummary 鏂规硶
+ UtilityHelper.SetupGridSummary(gvMx1, "quantity");
+ UtilityHelper.SetupGridSummary(gvMxL1, "quantity");
+ UtilityHelper.SetupGridSummary(gvMx2, "quantity");
+ UtilityHelper.SetupGridSummary(gvMxL2, "quantity");
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
@@ -306,6 +318,76 @@
}
+ /// <summary>
+ /// 鏂板鏂规硶锛氬垪琛ㄦ樉绀�
+ /// </summary>
+ /// <param name="strGuid">涓昏〃id</param>
+
+ private void getModelList(string strGuid)
+ {
+ gcMxL1.DataSource = null;
+ gcMxL2.DataSource = null;
+
+ var _obj = new
+ {
+ guid = strGuid,//涓诲缓
+ };
+ try
+ {
+ string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj));
+ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ dynamic dy = _rtn.rtnData;
+
+ JArray array1 = new JArray();
+ foreach (var a in dy["list"])
+ {
+ array1.Add(a);
+ }
+ DataTable dt1 = JsonConvert.DeserializeObject<DataTable>(array1.ToString());
+ if (dt1.Rows.Count > 0)
+ {
+ gcMxL1.BindingContext = new BindingContext();
+ gcMxL1.DataSource = dt1;
+ gcMxL1.ForceInitialize();
+ gvMxL1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMxL1);
+ }
+ else
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMxL1, gvMxL1);
+ }
+ JArray array2 = new JArray();
+ foreach (var a in dy["list2"])
+ {
+ array2.Add(a);
+ }
+
+ DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(array2.ToString());
+ if (dt2.Rows.Count > 0)
+ {
+ gcMxL2.BindingContext = new BindingContext();
+ gcMxL2.DataSource = dt2;
+ gcMxL2.ForceInitialize();
+ gvMxL2.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMxL2);
+ }
+ else
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMxL2, gvMxL2);
+ }
+ }
+ else
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+ }
+
+
/*/// <summary>
/// 杩欐槸鎵撳嵃
/// </summary>
--
Gitblit v1.9.3