From c884c789edec46084c81ee500a404da2f0685e7d Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期三, 27 八月 2025 14:18:13 +0800 Subject: [PATCH] 生产部分优化 --- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs | 79 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 76 insertions(+), 3 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs index e855057..38dc355 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs @@ -10,6 +10,7 @@ using System; using System.Collections.Generic; using System.Data; +using System.Drawing; using System.Threading.Tasks; using System.Windows.Forms; @@ -40,7 +41,9 @@ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fstatus", "", (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); @@ -108,6 +111,18 @@ }; frm.ShowDialog(); }; + ////搴曢儴姹囨�诲惎鐢� + // gvMx1.OptionsView.ShowFooter = true; + + //// 涓烘煇涓�鍒楄缃眰鍜屾眹鎬� + // gvMx1.Columns["quantity"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum; + // gvMx1.Columns["quantity"].SummaryItem.DisplayFormat = "鍚堣: {0}"; + /////搴曢儴姹囨�� + UtilityHelper.SetupGridSummary(gvMx1, "quantity"); + //鎵撳嵃姣斾緥 + UtilityHelper.SetSimpleGridColor(gridView1, "barcodeProgress", "=100.00%", "Cell", Color.Green); + //鍏ュ簱姣斾緥 + UtilityHelper.SetSimpleGridColor(gridView1, "rkbl", "=100.00%", "Cell", Color.Green); } @@ -381,6 +396,13 @@ gvList.Add(gvMx1); UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false); toolBarMenu1.currentAction = ""; + // 銆愭柊澧炲埛鏂伴�昏緫銆戜繚瀛樻垚鍔熷悗绔嬪嵆鍒锋柊褰撳墠妯″瀷鏁版嵁鍜屽垪琛� + // 鍒锋柊褰撳墠鍗曟嵁璇︽儏 + getModel(lbGuid.Text.Trim()); + // 鍒锋柊鍒楄〃椤垫暟鎹� + getPageList(this.pageBar1.CurrentPage); + + // 璺宠浆鍒版煡鐪嬬粨鏋滈〉闈� Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); } } @@ -609,7 +631,7 @@ _webServiceName + _meth, JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - + if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg); @@ -620,7 +642,7 @@ int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); gridView1.FocusedRowHandle = rowHandle; //鍒ゆ柇瀹℃牳鍚庢槸鍚﹀彉涓虹孩绔狅紙1锛氱孩绔犲凡瀹℃牳 锛�-1 榛戠珷鏈鏍革級 - int _inFieldValue = ((_meth == "EditModelSubmit"|| _meth== "EditModelSubmitHb") ? 1 : -1); + int _inFieldValue = ((_meth == "EditModelSubmit" || _meth == "EditModelSubmitHb") ? 1 : -1); UtilityHelper.SetCheckIco(gridView1, "fstatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); } else @@ -647,5 +669,56 @@ HistoryDhmxcs frm = new HistoryDhmxcs(mxGuid); frm.ShowDialog(); } + + /// <summary> + /// 鏂板鏂规硶锛氬垪琛ㄦ樉绀� + /// </summary> + /// <param name="strGuid">涓昏〃id</param> + + private void getModelList(string strGuid) + { + gcMxL1.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); + } + } + else + ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + } + catch (Exception ex) + { + ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + } + } } \ No newline at end of file -- Gitblit v1.9.3