From 625e05f90deea001e2faffa30ce8efebd48d6326 Mon Sep 17 00:00:00 2001 From: cyf Date: Mon, 14 Apr 2025 01:25:36 +0000 Subject: [PATCH] SVN r481 SVN-Revision: r481 --- 插件库/Lskj.ProductPlatform/FrmMain.cs | 37 +++++++++++++++++++++----- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/插件库/Lskj.ProductPlatform/FrmMain.cs b/插件库/Lskj.ProductPlatform/FrmMain.cs index 5de3219..faf069d 100644 --- a/插件库/Lskj.ProductPlatform/FrmMain.cs +++ b/插件库/Lskj.ProductPlatform/FrmMain.cs @@ -66,6 +66,10 @@ namespace Lskj.ProductPlatform /// 记录窗口位置 /// private Point _mousePostion; + /// + /// 机台信息 + /// + private DataTable MachineInformation = new DataTable(); public FrmMain() { @@ -129,6 +133,7 @@ namespace Lskj.ProductPlatform DataTable mWorkTable = MainImpl.MesGetCJ(); DataRow[] rows = mWorkTable.Select(string.Format("mc = '{0}'", ERPInfo.Instance.WorkCJ)); DataTable table = MainImpl.MesGetJT(rows[0]["dm"] + ""); + MachineInformation = table.Copy(); // 车间列表 //foreach (DataRow item in table.Rows) //{ @@ -198,6 +203,14 @@ namespace Lskj.ProductPlatform BaseImpl.HasExistsColumn(tableName, "PPTitle", "VARCHAR(100)"); this.mMenuCode = string.IsNullOrEmpty(ERPInfo.Instance.WorkModid) ? BaseImpl.GetResult("select PPMenuCode from P_SystemTab") + "" : ERPInfo.Instance.WorkModid; + //如果机台配置了对应的模块号,就以机台的配置为准 + if (MachineInformation.Rows.Count > 0&& MachineInformation.Columns.Contains("modid")) + { + DataRow dr = MachineInformation.Select("mc='" + ERPInfo.Instance.WorkJT + "'")[0]; + if (dr != null&&!string.IsNullOrWhiteSpace(dr["modid"] + "")) this.mMenuCode = dr["modid"] + ""; + } + + this.lblTitle.Text = BaseImpl.GetResult("select PPTitle from P_SystemTab") + ""; string pageSize = BaseImpl.GetResult("select PPGridRowSize from P_SystemTab") + ""; @@ -222,6 +235,11 @@ namespace Lskj.ProductPlatform this.gcMain.GridView.RowHeight = this.gcDetail.GridView.RowHeight = this.gcAttach.GridView.RowHeight = this.gcRight.GridView.RowHeight = this.ModelObj.RowHeight > 0 ? this.ModelObj.RowHeight : 40; this.gcMain.GridView.ColumnPanelRowHeight = this.gcDetail.GridView.ColumnPanelRowHeight = this.gcAttach.GridView.ColumnPanelRowHeight = this.gcRight.GridView.ColumnPanelRowHeight = 40; + if (this.ModelObj.GridObjIsCheck == 1)//主表加载复选框 + { + GridDragGrid.GridAddCheckBox(this.gcMain.GridView); + } + // Step 1. 获取模块配置信息 this.InitializeModule(); // Step 2. 获取附加配置信息 @@ -702,22 +720,29 @@ namespace Lskj.ProductPlatform { if (button.Tag is GridRightMenuModel) { - DataRow focusedRow = this.gcMain.GridView.GetFocusedDataRow(); - GridRightMenuModel model = button.Tag as GridRightMenuModel; - - if (rowItem == null && !model.isStartRun) + //DataRow focusedRow = this.gcMain.GridView.GetFocusedDataRow(); + //if (rowItem == null && !model.isStartRun) + //{ + // MessageUtil.Show(ResourceKeys.SelectRowIsNull); + // return; + //} + DataRow[] rowArray = gcMain.GetViewFocusedDataRows(); + if (rowArray.Length==0 && !model.isStartRun) { MessageUtil.Show(ResourceKeys.SelectRowIsNull); return; } BaseRightMenu menu = new BaseRightMenu(); menu.Model = this.DyncModel; - if (menu.ExecRightMenu(model, new DataRow[] { focusedRow }) && model.Refresh) + if (menu.ExecRightMenu(model, rowArray) && model.Refresh) { this.SearchLastGrid(); } - + //if (menu.ExecRightMenu(model, new DataRow[] { focusedRow }) && model.Refresh) + //{ + // this.SearchLastGrid(); + //} } else {