| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630 |
- /*******************************************************************************
- * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:F_SYS_0202.cs
- * 2.功能描述:系统导航栏页面
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 张国印 2014/08/27 1.00 新建
- *******************************************************************************/
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Reflection;
- using System.Windows.Forms;
- using Dongke.IBOSS.PRD.Basics.BaseControls;
- using Dongke.IBOSS.PRD.Basics.BaseResources;
- using Dongke.IBOSS.PRD.Basics.DockPanel;
- using Dongke.IBOSS.PRD.Basics.Library;
- using Dongke.IBOSS.PRD.Client.CommonModule;
- using Dongke.IBOSS.PRD.Client.Controls;
- using Dongke.IBOSS.PRD.Client.DataModels;
- using Dongke.IBOSS.PRD.Client.HRModule;
- using Dongke.IBOSS.PRD.Client.PAMModule;
- using Dongke.IBOSS.PRD.Client.PCModule;
- using Dongke.IBOSS.PRD.Client.PMModule;
- //using Dongke.IBOSS.PRD.Client.PPModule;
- using Dongke.IBOSS.PRD.Client.ReportModule;
- using Dongke.IBOSS.PRD.Client.ReportModule.R04.M01;
- using Dongke.IBOSS.PRD.Client.SAPDataModule;
- using Dongke.IBOSS.PRD.Client.SAPDataModule.Hegii;
- using Dongke.IBOSS.PRD.Client.SystemModule;
- using Dongke.IBOSS.PRD.Client.TATModule;
- using Dongke.IBOSS.PRD.WCF.DataModels;
- using Dongke.IBOSS.PRD.WCF.Proxys;
- namespace Dongke.IBOSS.PRD.Client
- {
- /// <summary>
- /// 系统导航栏页面
- /// </summary>
- public partial class F_SYS_0202 : DockPanelBase
- {
- #region 成员变量
- // 主窗体的DockPanel
- private readonly DockPanel _dockPanel = new DockPanel();
- #endregion
- #region 构造函数
- /// <summary>
- /// 构造函数
- /// </summary>
- /// <param name="dockpanel">主窗体的DockPanel控件</param>
- public F_SYS_0202(DockPanel dockpanel)
- {
- InitializeComponent();
- this.SetFromTitleInfo();
- this._dockPanel = dockpanel;
- this.TabPageContextMenuStrip = null;
- }
- #endregion
- #region 事件处理
- /// <summary>
- /// 页面加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void F_SYS_0202_Load(object sender, EventArgs e)
- {
- // 获取导航栏用户菜单
- DataTable dtTemp = LogInUserInfo.CurrentUser.CurrentUserEntity.UserNavigationData;
- // 返回第一级用户菜单,用于生成对应Button
- //var dicTemp = InitNavigationButtons(dtTemp);
- // 设置导航栏一级菜单 原来带Button 的菜单 一级菜单多了容易兑死
- //this.tvwNavigation.SetMenuDictionart(dicTemp);
- // 纯树形菜单
- this.InitNavigationTreeView(dtTemp);
- }
- /// <summary>
- /// 刷新树
- /// </summary>
- public void RefreshViewTree()
- {
- LogInUserInfo.CurrentUser.SysParameter.Clear();
- LogInUserInfo.CurrentUser.SysParameter.AcceptChanges();
- LoginRequestEntity requestEntity = new LoginRequestEntity();
- requestEntity.AccountCode = LogInUserInfo.CurrentUser.CurrentUserEntity.AccountCode;
- requestEntity.UserCode = LogInUserInfo.CurrentUser.CurrentUserEntity.UserCode;
- requestEntity.Password = LogInUserInfo.CurrentUser.CurrentUserEntity.Password;
- requestEntity.IPAddress = SystemAPI.IPAddress;
- requestEntity.MACAddress = SystemAPI.MacAddress;
- requestEntity.ComputerName = SystemAPI.ComputerName;
- LoginResultEntity result = (LoginResultEntity)DoAsync(new AsyncMethod(() =>
- {
- return DKIBOSSPRDProxy.Service.DoLoginRefresh(requestEntity);
- }));
- Dongke.IBOSS.PRD.Client.DataModels.UserEntity userEntity =
- new Dongke.IBOSS.PRD.Client.DataModels.UserEntity();
- DataConvert.Convert(result.CurrentUserEntity, userEntity);
- LogInUserInfo tempUser = new LogInUserInfo(userEntity, result.LicenseInfo,
- result.SysParameter);
- }
- /// <summary>
- /// 根据传入的ID生成对应的导航树
- /// </summary>
- /// <param name="appID">用户选择的菜单编号</param>
- /// <returns></returns>
- private TreeNode dkButtonTreeView1_GetTreeViewNodes(string appID)
- {
- DataTable sysList = LogInUserInfo.CurrentUser.CurrentUserEntity.UserNavigationData.Copy();
- // 递归生成功能权限树
- DataRow nodeRoot = sysList.Select("FunctionCode = '" + appID + "'").FirstOrDefault();
- if (nodeRoot != null)
- {
- TreeNode node = new TreeNode();
- node.Text = nodeRoot["FunctionName"].ToString();
- node.Name = nodeRoot["FunctionCode"].ToString();
- if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(nodeRoot["FunctionFlag"].ToString().Trim()))
- {
- node.ImageIndex = Constant.INT_IS_ONE;
- node.SelectedImageIndex = Constant.INT_IS_ONE;
- }
- DataRow[] navigationRows = sysList.Select("FunctionCode LIKE '" + appID
- + "%' AND " + "LEN(FunctionCode) = " + Constant.INT_IS_FOUR.ToString());
- this.InitTreeView(sysList, navigationRows, node);
- return node;
- }
- else
- {
- return null;
- }
- }
- /// <summary>
- /// 层叠树的节点时触发
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void trvMenu_AfterCollapse(object sender, TreeViewEventArgs e)
- {
- e.Node.SelectedImageIndex = Constant.INT_IS_ZERO;
- e.Node.ImageIndex = Constant.INT_IS_ZERO;
- }
- /// <summary>
- /// 展开树的节点时触发
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void trvMenu_AfterExpand(object sender, TreeViewEventArgs e)
- {
- e.Node.SelectedImageIndex = Constant.INT_IS_TWO;
- e.Node.ImageIndex = Constant.INT_IS_TWO;
- }
- /// <summary>
- /// 用户双击导航树时触发
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void trvMenu_DoubleClick(object sender, EventArgs e)
- {
- try
- {
- if (sender != null)
- {
- if (sender is TreeView)
- {
- if (((TreeView)sender).SelectedNode != null)
- {
- //xuwei add 2020-01-03 如果定义了url 跳转到url 用于转到webmes
- if(((TreeView)sender).SelectedNode.Tag is object)
- {
- string tag = ((TreeView)sender).SelectedNode.Tag.ToString();
- string title = ((TreeView)sender).SelectedNode.Text.ToString();
- if (tag!="" & tag!=",,,")
- {
- //静态配置
- //string goUrl = "http://192.168.0.237:9000/mes/mesgo.ashx";
- //xuwei modify 2023-03-25 改善模型,增加跳转包装线===============
- string functionCode = ((TreeView)sender).SelectedNode.Name;
- string goPort = "9000";
- if(functionCode.Length >=3)
- if (functionCode.Substring(0, 3) == "WEB") goPort = "9000";
- if (functionCode.Length >= 3)
- if (functionCode.Substring(0, 3) == "SOP" || functionCode.Substring(0, 3) == "CHK") goPort = "9100";
- if (functionCode.Length >= 2)
- if (functionCode.Substring(0, 2) == "TV") goPort = "9200";
- if (functionCode.Length >= 4)
- if (functionCode.Substring(0, 4) == "PACK") goPort = "9300";
- //从配置文件读取
- string goUrl = "http://" + Utility.ReadIniFile(Constant.INI_SECTION_NET, Constant.INI_KEY_IP, AppDomain.CurrentDomain.BaseDirectory + Constant.INI_FILE_NAME) + ":" + goPort + "/mes/mesgo.ashx";
- //xuwei end=======================================================
- string[] tagArray = tag.Split(',');
- if (tagArray.Length == 1 && tagArray[0].ToString() != "")
- System.Diagnostics.Process.Start(goUrl + "?go=" + tagArray[0] + "&title=" + title + "&sessionkey=" + LogInUserInfo.CurrentUser.SessionKey);
- if (tagArray.Length == 4 && tagArray[3].ToString() != "")
- System.Diagnostics.Process.Start(goUrl + "?go=" + tagArray[3] + "&title=" + title + "&sessionkey=" + LogInUserInfo.CurrentUser.SessionKey);
- }
- }
- //xuwei end
- switch (((TreeView)sender).SelectedNode.Name.ToString())
- {
- #region 01-系统管理
- case "01":
- //系统管理
- break;
- #region 系统管理-帐套信息
- case "0101":
- //系统管理-帐套信息
- break;
- case "010101":
- //系统管理-帐套信息-帐套管理
- F_MST_0001 frmAccount = new F_MST_0001();
- frmAccount.ShowDialog();
- break;
- #endregion
- #region 系统管理-用户及组织
- case "0102":
- //系统管理-用户及组织
- break;
- case "010201":
- //系统管理-用户及组织-组织机构
- this.ShowInDockPanel(F_MST_0101.Instance);
- break;
- case "010202":
- //系统管理-用户及组织-用户管理
- this.ShowInDockPanel(F_MST_0201.Instance);
- break;
- case "010203":
- case "010403":
- //系统管理-用户及组织-关联员工
- this.ShowInDockPanel(F_MST_0210.Instance);
- break;
- case "010204":
- //系统管理-用户及组织-功能权限
- F_MST_0206 frm0206 = new F_MST_0206();
- frm0206.ShowDialog();
- break;
- case "010205":
- //系统管理-用户及组织-范围权限
- F_MST_0207 frm0207 = new F_MST_0207();
- frm0207.ShowDialog();
- break;
- #endregion
- #region 系统管理-产品信息
- case "0103":
- //系统管理-产品信息
- break;
- case "010301":
- //系统管理-产品信息-产品类别
- F_MST_0405 mst0405 = new F_MST_0405();
- mst0405.ShowDialog();
- break;
- case "010302":
- //系统管理-产品信息-釉料类别
- break;
- case "010303":
- //系统管理-产品信息-产品档案
- this.ShowInDockPanel(F_MST_0501.Instance);
- break;
- case "010304":
- //系统管理-产品信息-产品缺陷
- this.ShowDialogForm(F_MST_0407.Instance);
- break;
- case "010305":
- //系统管理-产品信息-缺陷位置
- this.ShowDialogForm(F_MST_0409.Instance);
- break;
- case "010306":
- //系统管理-产品信息-产品分级
- this.ShowDialogForm(F_MST_0408.Instance);
- break;
- case "010307":
- //系统管理-产品信息-缺陷类别
- F_MST_0411 mst0411 = new F_MST_0411();
- mst0411.ShowDialog();
- break;
- case "010308":
- //系统管理-产品信息-半成品缺陷
- F_MST_1001 mst1001 = new F_MST_1001();
- mst1001.ShowDialog();
- break;
- case "010309":
- //系统管理-产品信息-半成品缺陷位置
- F_MST_1002 mst1002 = new F_MST_1002();
- mst1002.ShowDialog();
- break;
- case "010310":
- //系统管理-产品信息-产品线性图
- this.ShowInDockPanel(F_MST_GoodsImage.Instance);
- break;
- #endregion
- #region 系统管理-HR基础数据
- case "0104":
- //系统管理-HR基础数据
- break;
- case "010401":
- //系统管理-HR基础数据-工种
- this.ShowDialogForm(F_MST_0403.Instance);
- break;
- case "010402":
- //系统管理-HR基础数据-职务
- this.ShowDialogForm(F_MST_0404.Instance);
- break;
- #endregion
- #region 系统管理-生产基础数据
- case "0105":
- //系统管理-生产基础数据
- break;
- case "010501":
- //系统管理-生产基础数据-窑炉
- this.ShowDialogForm(F_MST_0301.Instance);
- break;
- case "010502":
- //系统管理-生产基础数据-窑车
- this.ShowDialogForm(F_MST_0302.Instance);
- break;
- case "010503":
- //系统管理-生产基础数据-成型线类型
- this.ShowDialogForm(F_MST_0410.Instance);
- break;
- case "010504":
- //系统管理-生产基础数据-温湿度管理
- this.ShowInDockPanel(F_MST_0601.Instance);
- break;
- case "010510":
- //系统管理-生产基础数据-成型破损原因
- this.ShowDialogForm(F_PM_0906.Instance);
- break;
- case "010511":
- //系统管理-生产基础数据-仓库管理
- this.ShowDialogForm(F_MST_1203.Instance);
- break;
- case "010512":
- //系统管理-生产基础数据-车牌号
- this.ShowDialogForm(F_MST_1204.Instance);
- break;
- #endregion
- #region 系统管理-系统字典
- case "0106":
- //系统管理-系统字典
- this.ShowDialogForm(F_MST_0402.Instance);
- break;
- #endregion
- #region 系统管理-系统设置
- case "0107":
- //系统管理-系统设置
- break;
- case "010701":
- //系统管理-系统设置-系统参数
- this.ShowDialogForm(F_MST_0401.Instance);
- break;
- case "010702":
- //系统管理-系统设置-票据设置
- break;
- #endregion
- #region 系统管理-报表工序
- case "0108":
- //系统管理-报表工序
- this.ShowInDockPanel(F_MST_0701.Instance);
- break;
- #endregion
- #region 系统管理-工艺管理
- case "0109":
- //系统管理-工艺部门
- this.ShowDialogForm(F_MST_1101.Instance);
- break;
- case "0110":
- //系统管理-工艺配置
- this.ShowInDockPanel(F_MST_1102.Instance);
- break;
- case "0111":
- //系统管理-条码打印模板
- this.ShowInDockPanel(F_MST_012001.Instance);
- break;
- case "0115":
- //系统管理-模具标签模板
- this.ShowInDockPanel(F_MST_013001.Instance);
- break;
- case "0112":
- //系统管理-工号分组
- this.ShowInDockPanel(F_MST_1201.Instance);
- break;
- case "0113":
- //系统管理-条码打印机
- this.ShowDialogForm(F_MST_0412.Instance);
- break;
- case "0114":
- //系统管理-PLC连接参数
- this.ShowDialogForm(F_MST_0413.Instance);
- break;
- #endregion
- case "010505":
- //系统管理-商标管理
- F_MST_0801 mst0801 = new F_MST_0801();
- mst0801.ShowDialog();
- break;
- case "010506":
- //系统管理-缺陷扣罚管理
- F_MST_0901 mst0901 = new F_MST_0901();
- mst0901.ShowDialog();
- break;
- case "010507":
- //系统管理-缺陷扣除数管理
- F_MST_0902 mst0902 = new F_MST_0902();
- mst0902.ShowDialog();
- break;
- case "010508":
- //系统管理-缺陷关系设置
- F_MST_0903 mst0903 = new F_MST_0903();
- mst0903.ShowDialog();
- break;
- case "010509":
- //系统管理-模具材料供应商
- F_MST_0414 mst0414 = new F_MST_0414();
- mst0414.ShowDialog();
- break;
- #endregion
- #region 02-策略管理
- case "02":
- //策略管理
- break;
- #region 策略管理-工资考核策略
- case "0201":
- //策略管理-工资考核策略
- break;
- case "020101":
- //策略管理-工资考核策略-基本工资策略
- this.ShowInDockPanel(F_TAT_0301.Instance);
- break;
- case "020102":
- //策略管理-工资考核策略-管理岗位工资策略
- this.ShowInDockPanel(F_TAT_0701.Instance);
- break;
- case "020103":
- //策略管理-工资考核策略-工价策略
- this.ShowInDockPanel(F_TAT_0201.Instance);
- break;
- case "020104":
- //策略管理-工资考核策略-出勤考核
- this.ShowInDockPanel(F_TAT_0801.Instance);
- break;
- case "020105":
- //策略管理-工资考核策略-质量考核
- this.ShowInDockPanel(F_TAT_0401.Instance);
- break;
- case "020106":
- //策略管理-工资考核策略-进度考核
- this.ShowInDockPanel(F_TAT_0501.Instance);
- break;
- case "020107":
- //策略管理-工资考核策略-缺陷扣罚策略
- this.ShowInDockPanel(F_TAT_0101.Instance);
- break;
- case "020108":
- //策略管理-工资考核策略-缺陷扣罚策略
- this.ShowInDockPanel(F_TAT_0601.Instance);
- break;
- #endregion
- #region 策略管理-工资管理策略
- case "020201":
- //策略管理-工资管理策略-工资方案参数设定
- this.ShowInDockPanel(F_PAM_0101.Instance);
- break;
- case "020202":
- //策略管理-工资管理策略-工种工资方案
- this.ShowInDockPanel(F_PAM_0102.Instance);
- break;
- case "020203":
- //策略管理-工资管理策略-工价分类
- this.ShowDialogForm(F_PAM_0202.Instance);
- break;
- case "020204":
- //策略管理-工资管理策略-产品工价分类
- this.ShowInDockPanel(F_PAM_0201.Instance);
- //this.ShowInDockPanel(F_PAM_0601.Instance);
- break;
- case "020205":
- //策略管理-工资管理策略-计件工资策略
- this.ShowInDockPanel(F_PAM_0301.Instance);
- break;
- case "020206":
- //策略管理-工资管理策略-品质考核策略
- this.ShowInDockPanel(F_PAM_0401.Instance);
- break;
- case "020207":
- //策略管理-工资管理策略-工资结算
- this.ShowInDockPanel(F_PAM_0601.Instance);
- break;
- #endregion
- #endregion
- #region 03-人力资源
- case "03":
- //人力资源
- break;
- #region 人力资源-员工管理
- case "0301":
- //人力资源-员工管理
- break;
- case "030101":
- //人力资源-员工管理-员工档案
- this.ShowInDockPanel(F_HR_0101.Instance);
- break;
- case "030102":
- //人力资源-员工管理-员工入职
- this.ShowInDockPanel(F_HR_0201.Instance);
- break;
- case "030103":
- //人力资源-员工管理-员工转正
- this.ShowInDockPanel(F_HR_0301.Instance);
- break;
- case "030104":
- //人力资源-员工管理-员工离职
- this.ShowInDockPanel(F_HR_0401.Instance);
- break;
- case "030105":
- //人力资源-员工管理-工种调整
- this.ShowInDockPanel(F_HR_0501.Instance);
- break;
- case "030106":
- //人力资源-员工管理-职务调整
- this.ShowInDockPanel(F_HR_0601.Instance);
- break;
- case "030107":
- //人力资源-员工管理-部门调整
- this.ShowInDockPanel(F_HR_0701.Instance);
- break;
- #endregion
- #region 人力资源-人事审批
- case "0302":
- //人力资源-人事审批
- break;
- case "030201":
- //人力资源-人事审批-员工入职
- this.ShowInDockPanel(F_HR_0203.Instance);
- break;
- case "030202":
- //人力资源-人事审批-员工转正
- this.ShowInDockPanel(F_HR_0303.Instance);
- break;
- case "030203":
- //人力资源-人事审批-员工离职
- this.ShowInDockPanel(F_HR_0403.Instance);
- break;
- case "030204":
- //人力资源-人事审批-工种调整
- this.ShowInDockPanel(F_HR_0503.Instance);
- break;
- case "030205":
- //人力资源-人事审批-职务调整
- this.ShowInDockPanel(F_HR_0603.Instance);
- break;
- case "030206":
- //人力资源-人事审批-部门调整
- this.ShowInDockPanel(F_HR_0703.Instance);
- break;
- #endregion
- #region 人力资源-行政管理
- case "0303":
- //人力资源-行政管理
- break;
- case "030301":
- //人力资源-行政管理-员工报餐
- this.ShowInDockPanel(F_HR_0901.Instance);
- break;
- case "030302":
- //人力资源-行政管理-员工考勤
- this.ShowInDockPanel(F_HR_1001.Instance);
- break;
- case "030303":
- //人力资源-行政管理-行政考核
- this.ShowInDockPanel(F_PAM_0501.Instance);
- break;
- case "030304":
- //人力资源-行政管理-行政考核审核
- this.ShowInDockPanel(F_PAM_0503.Instance);
- break;
- #endregion
- #region 人力资源-奖惩管理
- case "0304":
- //人力资源-奖惩管理
- break;
- case "030401":
- //人力资源-奖惩管理-进度奖惩
- this.ShowInDockPanel(F_PM_1104.Instance);
- break;
- case "030402":
- //人力资源-奖惩管理-行政奖惩
- this.ShowInDockPanel(F_HR_1101.Instance);
- break;
- case "030403":
- //人力资源-奖惩管理-行政奖惩审批
- this.ShowInDockPanel(F_HR_1103.Instance);
- break;
- case "030404":
- //人力资源-奖惩管理-进度奖惩审批
- this.ShowInDockPanel(F_PM_1106.Instance);
- break;
- #endregion
- #region 人力资源-工资管理
- case "0305":
- //人力资源-工资管理
- break;
- case "030501":
- //人力资源-工资管理-工资结算
- this.ShowInDockPanel(F_HR_1201.Instance);
- break;
- case "030502":
- //人力资源-工资管理-工资审批
- break;
- case "030503":
- //人力资源-工资管理-工资结算
- this.ShowInDockPanel(F_PAM_0601.Instance);
- break;
- case "030504":
- //人力资源-工资管理-工资调整
- this.ShowInDockPanel(F_PAM_0603.Instance);
- break;
- case "030505":
- //人力资源-工资管理-工资审批
- this.ShowInDockPanel(F_PAM_0604.Instance);
- break;
- #endregion
- #endregion
- #region 04-生产配置
- case "04":
- //生产配置
- break;
- #region 生产配置-成型线管理
- case "0401":
- //生产配置-成型线管理
- //this.ShowInDockPanel(F_PC_0104.Instance);
- this.ShowInDockPanel(F_PC_0104_1.Instance);
- //生产配置-生产模具管理
- break;
- case "0402":
- //生产配置-生产模具管理
- //this.ShowInDockPanel(F_PC_0101.Instance);
- this.ShowInDockPanel(F_PC_0101_1_1.Instance);
- break;
- case "0403":
- //生产配置-生产线配置
- //this.ShowInDockPanel(F_PC_0201.Instance);
- this.ShowInDockPanel(F_PC_0205.Instance);
- break;
- case "0404":
- //生产配置-班次配置
- this.ShowInDockPanel(F_PC_0401.Instance);
- break;
- case "0405":
- //生产配置-员工关联
- this.ShowInDockPanel(F_PC_0601.Instance);
- break;
- case "0406":
- //生产配置-装配工序组件配置
- this.ShowInDockPanel(F_PC_0701.Instance);
- break;
- case "0407":
- //生产配置-线边仓组件配置
- this.ShowInDockPanel(F_PC_0801.Instance);
- break;
- case "0408":
- //生产配置-作业指导书工序配置
- this.ShowInDockPanel(F_PC_1301.Instance);
- break;
- #endregion
- #endregion
- #region M04-模具管理
- case "M0401":
- // 模具管理-模具档案
- this.ShowInDockPanel(F_PC_1001.Instance);
- break;
- case "M0402":
- // 模具管理-模具盘点
- this.ShowInDockPanel(F_PC_1101.Instance);
- break;
- case "M0403":
- // 模具管理-模具库存结转
- this.ShowInDockPanel(F_PC_1201.Instance);
- break;
- #endregion
- #region 06-生产管理
- case "06":
- //生产管理
- break;
- #endregion
- #region 07-综合报表
- #region 明细表
- case "070401":
- //注浆明细表
- this.ShowInDockPanel(F_RPT_010101_1.Instance);
- break;
- case "070402":
- //半检明细表
- this.ShowInDockPanel(F_RPT_010102_1.Instance); //
- break;
- case "070403":
- //漏扫数据统计
- this.ShowInDockPanel(F_RPT_010201_1.Instance);
- break;
- case "070404":
- //条码变更
- this.ShowInDockPanel(F_RPT_010301_1.Instance);
- break;
- case "070407":
- //交坯明细
- this.ShowInDockPanel(F_RPT_010103.Instance);
- break;
- case "070408":
- //注浆次数明细
- this.ShowInDockPanel(F_RPT_010104.Instance);
- break;
- case "070415":
- //成型线模具使用明细表
- this.ShowInDockPanel(F_RPT_010105.Instance);
- break;
- case "070416":
- //成型线剩余注浆次数
- this.ShowInDockPanel(F_RPT_010106.Instance);
- break;
- case "070409":
- //历史模具明细表
- this.ShowInDockPanel(F_RPT_080101.Instance);
- break;
- case "070410":
- //工序产量明细表
- this.ShowInDockPanel(F_RPT_080105.Instance);
- break;
- case "070411":
- //成型线明细表
- this.ShowInDockPanel(F_PC_0108.Instance);
- break;
- case "070413":
- //生产数据明细表
- this.ShowInDockPanel(F_RPT_010403.Instance);
- break;
- case "070414":
- //半检登记明细表
- this.ShowInDockPanel(F_RPT_080107.Instance);
- break;
- case "070701":
- //
- this.ShowInDockPanel(F_RPT_080102.Instance);
- break;
- case "070702":
- //
- this.ShowInDockPanel(F_RPT_080103.Instance);
- break;
- case "070703":
- //
- this.ShowInDockPanel(F_RPT_080104.Instance);
- break;
- case "070412":// 温湿计明细表
- //
- this.ShowInDockPanel(F_RPT_080106.Instance);
- break;
- case "070417":// 商标变更明细表
- //
- this.ShowInDockPanel(F_RPT_010302.Instance);
- break;
- case "070418":
- // 产品损坯明细表
- this.ShowInDockPanel(F_RPT_010202.Instance);
- break;
- case "070419":
- // 在产品备份表
- this.ShowInDockPanel(F_RPT_010404.Instance);
- break;
- case "070420":
- // 产成品单值明细表
- this.ShowInDockPanel(F_RPT_010405.Instance);
- break;
- //xuwei begin add 2019-10-14
- case "070421":
- //半检返修登记明细表
- this.ShowInDockPanel(F_RPT_080108.Instance);
- break;
- //xuwei end
- // qinqi 20221209 产品装配明细表
- case "070424":
- //产品装配明细表
- this.ShowInDockPanel(F_RPT_080110.Instance);
- break;
- // qinqi 20230602 品管数据记录明细表
- case "070425":
- //品管数据记录明细表
- this.ShowInDockPanel(F_RPT_080112.Instance);
- break;
- // qinqi 20240104 BOM物料检验明细表
- case "070426":
- //BOM物料检验明细表
- this.ShowInDockPanel(F_RPT_080113.Instance);
- break;
- // qinqi 20240104 QC检验数据明细表
- case "070427":
- //QC检验数据明细表
- this.ShowInDockPanel(F_RPT_080114.Instance);
- break;
- // qinqi 20240104 QC检验计划完成明细表
- case "070428":
- //QC检验计划完成明细表
- this.ShowInDockPanel(F_RPT_080115.Instance);
- break;
- // qinqi 20240104 QC检验分析汇总表
- case "070429":
- //QC检验分析汇总表
- this.ShowInDockPanel(F_RPT_080116.Instance);
- break;
- // LSY 20240617 QC检验计划分析明细表
- case "070430":
- //QC检验分析汇总表
- this.ShowInDockPanel(F_RPT_080117.Instance);
- break;
- // QQ 20250610 裸瓷非工序撤销明细表
- case "070431":
- this.ShowInDockPanel(F_RPT_080118.Instance);
- break;
- #endregion
- #region 跟踪表
- case "070301":
- //产品统计-产品跟踪表
- this.ShowInDockPanel(F_RPT_020101_1.Instance);
- break;
- case "070302":
- //产品统计-窑车状态表
- this.ShowInDockPanel(F_RPT_020104.Instance);
- break;
- case "070303":
- // 模具跟踪表
- this.ShowInDockPanel(F_RPT_020105.Instance);
- break;
- #endregion
- #region 汇总表
- case "070601":
- //产品损坏汇总表
- this.ShowInDockPanel(F_RPT_030102_1.Instance);
- break;
- case "070602":
- //产品产量汇总表
- this.ShowInDockPanel(F_RPT_030101_1.Instance);
- break;
- case "070603":
- //出窑数量汇总表
- this.ShowInDockPanel(F_RPT_030103_1.Instance);
- break;
- case "070604":
- //窑车产量汇总表
- this.ShowInDockPanel(F_RPT_030104_1.Instance);
- break;
- case "070605":
- //生产统计-成型线变产记录
- this.ShowInDockPanel(F_PC_0501.Instance);
- break;
- case "070606":
- //在产产量汇总表
- this.ShowInDockPanel(F_RPT_030105.Instance);
- break;
- case "070607":
- //成检缺陷汇总表
- this.ShowInDockPanel(F_RPT_030106.Instance);
- break;
- case "070608":
- //工序交接数量汇总表
- this.ShowInDockPanel(F_RPT_030107.Instance);
- break;
- case "070609":
- //成型信息汇总表
- this.ShowInDockPanel(F_RPT_030108.Instance);
- break;
- case "070610":
- //撤销产品汇总表
- this.ShowInDockPanel(F_RPT_030109.Instance);
- break;
- case "070611":
- //半检信息汇总表
- this.ShowInDockPanel(F_RPT_030110.Instance);
- break;
- case "070612":
- //工序收发存汇总表
- this.ShowInDockPanel(F_RPT_030111.Instance);
- break;
- case "070713":
- //产成品交接汇总表
- this.ShowInDockPanel(F_RPT_030112.Instance);
- break;
- case "070714":
- // 模具收发存汇总表
- this.ShowInDockPanel(F_RPT_030113.Instance);
- break;
- case "070715":
- // 废弃产品汇总表
- this.ShowInDockPanel(F_RPT_030114.Instance);
- break;
- case "070716":
- // 工艺废弃产品汇总表
- this.ShowInDockPanel(F_RPT_030115.Instance);
- break;
- case "070717":
- // 成型存坯汇总表
- this.ShowInDockPanel(F_RPT_030116.Instance);
- break;
- case "070718":
- // 产成品交接撤销汇总表
- this.ShowInDockPanel(F_RPT_030117.Instance);
- break;
- case "070719":
- // 年度各工序月产量统计表
- this.ShowInDockPanel(F_RPT_030118.Instance);
- break;
- case "070720":
- // 半检返修缺陷汇总表
- this.ShowInDockPanel(F_RPT_030119.Instance);
- break;
- case "070721":
- // 跨车间作业量汇总表
- this.ShowInDockPanel(F_RPT_030120.Instance);
- break;
- case "070722":
- // 回收产品汇总表
- this.ShowInDockPanel(F_RPT_030121.Instance);
- break;
- #endregion
- #region 分析表
- case "070501":
- //注浆交坯比率分析表
- this.ShowInDockPanel(F_RPT_040101_1.Instance);
- break;
- case "070502":
- //工序产量分析表
- this.ShowInDockPanel(F_RPT_040102_1.Instance);//注释日期 20150608
- break;
- case "070503":
- //注浆产品工序分析表
- this.ShowInDockPanel(F_RPT_040107.Instance);
- break;
- case "070504":
- //成型线产量分析表
- this.ShowInDockPanel(F_RPT_040108.Instance);
- break;
- case "070505":
- //整体质量分析表
- this.ShowInDockPanel(F_RPT_040109.Instance);
- break;
- case "070506":
- //产成品逐日出窑数值分析表
- this.ShowInDockPanel(F_RPT_040110.Instance);
- break;
- case "070507":
- //模具注浆分析表
- this.ShowInDockPanel(F_RPT_040111.Instance);
- break;
- case "070508":
- //成检产品预算分析表
- this.ShowInDockPanel(F_RPT_040112.Instance);
- break;
- case "070203":
- //产品统计-工序质量分析表
- this.ShowInDockPanel(F_RPT_040103.Instance);
- break;
- case "070205":
- //产成品质量分析表
- this.ShowInDockPanel(F_RPT_040104.Instance);
- // this.ShowInDockPanel(F_RPT_080101.Instance);
- break;
- case "080109":
- // 半成检缺陷对照表(潮州)
- this.ShowInDockPanel(F_RPT_080109.Instance);
- break;
- #endregion
- #region 质量报表
- case "040105":
- this.ShowInDockPanel(F_RPT_040105.Instance);
- break;
- case "040106":
- //缺陷报表
- this.ShowInDockPanel(F_RPT_040106.Instance);
- break;
- case "040113":
- // 成品工艺质量表
- this.ShowInDockPanel(F_RPT_040113.Instance);
- break;
- case "040115":
- // 半成品工序质量表
- this.ShowInDockPanel(F_RPT_040115.Instance);
- break;
- case "070509":
- // 综合合格率分析表
- this.ShowInDockPanel(F_RPT_040114.Instance);
- break;
- case "070510":
- // 月度成品入库预算表
- this.ShowInDockPanel(F_RPT_040116.Instance);
- break;
- #endregion
- #endregion
- #region 生产管理-注浆管理
- case "0601":
- //生产管理-注浆管理
- break;
- case "060101":
- //生产管理-注浆管理-注浆登记
- this.ShowInDockPanel(F_PM_0101.Instance);
- break;
- case "060102":
- //生产管理-注浆管理-注浆日报
- this.ShowInDockPanel(F_RPT_010101_1.Instance);
- break;
- case "060103":
- //生产管理-注浆管理-环境登记
- this.ShowInDockPanel(F_PM_1701.Instance);
- break;
- case "060104":
- //生产管理-注浆管理-环境日报
- this.ShowDialogForm(new F_PM_1802());
- break;
- case "060105":
- //生产管理-注浆管理-注浆变更
- this.ShowDialogForm(new F_PM_2105());
- break;
- case "060106":
- //生产管理-注浆管理-成型报损
- this.ShowInDockPanel(F_PM_2701.Instance);
- break;
- case "060107":
- //生产管理-注浆管理-撤销报损
- this.ShowDialogForm(new F_PM_2801());
- break;
- #endregion
- #region 生产管理-条码管理
- case "0602":
- //生产管理-条码管理
- break;
- case "060201":
- //生产管理-条码生成
- //this.ShowDialogForm(new F_PM_0103());
- this.ShowDialogForm(new F_PM_0103());
- break;
- case "060202":
- //生产管理-条码维护
- //this.ShowDialogForm(new F_PM_0201());
- this.ShowInDockPanel(F_PM_0203.Instance);
- break;
- case "060203":
- //生产管理-商标设定
- this.ShowDialogForm(new F_PM_2118());
- break;
- case "060207":
- //生产管理-条码打印
- this.ShowDialogForm(new F_MST_012006());
- break;
- case "060205":
- //生产管理-开模报损
- this.ShowDialogForm(new F_PM_2901());
- break;
- #endregion
- #region 生产管理-生产数据采集
- case "0603":
- //生产管理-生产数据采集
- //F_PM_0301 fpm0301 = F_PM_0301.Instance(13);
- //ShowInDockPanel(fpm0301);
- //break;
- //case "06030101":
- // //生产管理-工序检验
- // break;
- break;
- #endregion
- #region 生产管理-废弃产品管理
- case "060401":
- //生产管理-产品报损
- this.ShowInDockPanel(F_PM_1101.Instance);
- break;
- #endregion
- #region 检验管理
- case "062001":
- //检验管理-半成品检验
- this.ShowInDockPanel(F_PM_2201.Instance);
- break;
- // 成品检验功能TODO
- case "062003":
- //检验管理-成品检验
- this.ShowInDockPanel(F_PM_3401.Instance);
- break;
- #endregion
- #region 生产订单
- case "0621":
- this.ShowInDockPanel(F_PM_2301.Instance);
- break;
- case "0622"://产成品交接
- this.ShowInDockPanel(F_PM_2401.Instance);
- break;
- #endregion
- #region 报表管理-生产数据
- case "060501":
- //生产数据-在产品明细数据
- this.ShowInDockPanel(F_RPT_010401.Instance);
- break;
- case "060502":
- //生产数据-产成品明细
- this.ShowInDockPanel(F_RPT_010402.Instance);
- break;
- case "060503":
- //生产数据-半检数据一览
- this.ShowInDockPanel(F_PM_1601.Instance);
- break;
- #endregion
- #region 半检数据
- case "0606":
- //生产数据-半检数据一览
- this.ShowInDockPanel(F_PM_1603.Instance);
- break;
- case "0608":
- // 在产盘点
- this.ShowInDockPanel(F_PM_2101.Instance);
- break;
- case "062301":
- // 成型盘点
- this.ShowInDockPanel(F_PM_2601.Instance);
- break;
- case "0609":
- //撤销包装
- F_PM_2104 frm2104 = new F_PM_2104();
- frm2104.ShowDialog();
- break;
- case "0610":
- //损坏撤销
- F_PM_2106 frm2106 = new F_PM_2106();
- frm2106.ShowDialog();
- break;
- case "0611":
- //公坯设定
- F_PM_2107 frm2107 = new F_PM_2107();
- frm2107.ShowDialog();
- break;
- case "0612":
- //清除在产残留数据
- this.ShowInDockPanel(F_PM_2108.Instance);
- break;
- case "0613":
- //清除在产回收站残留数据
- this.ShowInDockPanel(F_PM_2110.Instance);
- break;
- case "0614":
- //清除在产临时数据
- this.ShowInDockPanel(F_PM_2112.Instance);
- break;
- case "0615":
- //计件撤销
- F_PM_2115 frm2115 = new F_PM_2115();
- frm2115.ShowDialog();
- break;
- case "061601":
- //交坯撤销
- F_PM_2116 frm2116 = new F_PM_2116();
- frm2116.ShowDialog();
- break;
- case "0624":
- //产品挂起
- this.ShowInDockPanel(F_PM_3001.Instance);
- break;
- case "0626":
- //品保抽查
- this.ShowInDockPanel(F_PM_3101.Instance);
- break;
- #endregion
- #region SAP
- case "SAP0101":
- this.ShowInDockPanel(F_SAP_HEGII_0101.Instance);
- break;
- case "SAP0102":
- this.ShowInDockPanel(F_SAP_HEGII_0102.Instance);
- break;
- case "SAP0103":
- this.ShowInDockPanel(F_SAP_HEGII_0103.Instance);
- break;
- case "SAP0104":
- this.ShowInDockPanel(F_SAP_HEGII_0104.Instance);
- break;
- case "SAP0105":
- this.ShowInDockPanel(F_SAP_HEGII_0105.Instance);
- break;
- case "SAP0106":
- this.ShowInDockPanel(F_SAP_HEGII_0106.Instance);
- break;
- case "SAP0107":
- this.ShowInDockPanel(F_SAP_HEGII_0107.Instance);
- break;
- case "SAP0108":
- this.ShowInDockPanel(F_SAP_HEGII_0108.Instance);
- break;
- case "SAP0109":
- this.ShowInDockPanel(F_SAP_HEGII_0109.Instance);
- break;
- case "SAP0111":
- this.ShowInDockPanel(F_SAP_HEGII_0112.Instance);
- break;
- case "SAP0112":
- this.ShowInDockPanel(F_SAP_HEGII_0113.Instance);
- break;
- #endregion
- #region 送货单
- case "0631":
- this.ShowInDockPanel(F_PM_3501.Instance);
- break;
- #endregion
- #region 首件登记检验
- case "0632":
- this.ShowInDockPanel(F_PM_3601.Instance);
- break;
- #endregion
- #region 生产计划 xuwei 20190827 add
- //case "PP0101":
- // //年计划
- // this.ShowInDockPanel(F_PP_0101.Instance);
- // break;
- //case "PP0102":
- // //月计划
- // this.ShowInDockPanel(F_PP_0201.Instance);
- // break;
- //case "PP0103":
- // //日计划
- // this.ShowInDockPanel(F_PP_0301.Instance);
- // break;
- //case "PP0104":
- // //计划分析
- // this.ShowInDockPanel(F_PP_0121.Instance);
- // break;
- #endregion
- #region 其他
- default:
- TreeNode treenodes = ((TreeView)sender).SelectedNode;
- if (treenodes.Name.ToString().StartsWith("0603"))
- {
- string[] sub = treenodes.Tag.ToString().Split(',');
- if (sub[0] != string.Empty)
- {
- if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.DeliverMud))
- {
- //生产管理-交坯
- F_PM_0401 frm0401 = F_PM_0401.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0401);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.LoadCar))
- {
- //生产管理-装窑车
- F_PM_0501 frm0501 = F_PM_0501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0501);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.Normal))
- {
- if (Convert.ToInt32(sub[2]) == 1) // 计件模式
- {
- F_PM_0301 frm0301 = F_PM_0301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0301);
- }
- else if (Convert.ToInt32(sub[2]) == 2) // 半成品检验(标准检验)
- {
- F_PM_0901 frm0901 = F_PM_0901.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0901);
- }
- }
- //xuwei add 2020-06-15 加冷补 计件模式
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.ColdPatch))
- {
- F_PM_0301 frm0301 = F_PM_0301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0301);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.IntoKiln))
- {
- //生产管理-入窑
- F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0601);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.OutKiln))
- {
- //生产管理-出窑
- F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0601);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.UnloadCar))
- {
- //生产管理-卸窑车
- F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0601);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.CarAdd))
- {
- //生产管理-窑车补件
- F_PM_0501 frm0501 = F_PM_0501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0501);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.AdobeStock))
- {
- //生产管理-坯库
- F_PM_0301 frm0301 = F_PM_0301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0301);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.QualityStatistics))
- {
- //生产管理-成检(质量统计)
- F_PM_1201 frm1201 = F_PM_1201.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm1201);
- }
- //xuwei add 2019-12-12
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.SemiQualityStatistics))
- {
- //生产管理-半检(质量统计)
- F_PM_3201 frm3201 = F_PM_3201.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm3201);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.IntoKilnCheck))
- {
- //生产管理-入窑前检验
- F_PM_1301 frm1301 = F_PM_1301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm1301);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.SpecialRepair))
- {
- //生产管理-干补
- F_PM_2001 frm2001 = F_PM_2001.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm2001);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.Recovery))
- {
- //生产管理-回收
- F_PM_2501 frm2501 = F_PM_2501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm2501);
- }
- }
- }
- break;
- #endregion
- }
- }
- }
- }
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- }
- /// <summary>
- /// 展开全部节点
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnExpand_Click(object sender, EventArgs e)
- {
- TreeNode node = null;
- if (this.trvMenu.SelectedNode != null)
- {
- node = this.trvMenu.SelectedNode;
- this.trvMenu.SelectedNode = null;
- }
- else if (this.trvMenu.Nodes.Count > 0)
- {
- node = this.trvMenu.Nodes[0];
- }
- this.trvMenu.ExpandAll();
- if (node != null)
- {
- this.trvMenu.SelectedNode = node;
- }
- this.trvMenu.Focus();
- }
- /// <summary>
- /// 折叠全部节点
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnCollapse_Click(object sender, EventArgs e)
- {
- this.trvMenu.CollapseAll();
- this.trvMenu.Focus();
- }
- /// <summary>
- /// 设置按钮大小
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void trvMenu_SizeChanged(object sender, EventArgs e)
- {
- this.btnExpand.Width = this.trvMenu.Width / 2;
- }
- #endregion
- #region 私有方法
- /// <summary>
- /// 设置窗体按钮的文本信息
- /// </summary>
- private void SetFromTitleInfo()
- {
- this.Text = FormTitles.F_SYS_0202;
- }
- /// <summary>
- /// 获取用户菜单的一级菜单
- /// </summary>
- /// <param name="treeTable">用户菜单数据集</param>
- /// <returns>一级菜单字典</returns>
- private Dictionary<string, string> InitNavigationButtons(DataTable treeTable)
- {
- try
- {
- Dictionary<string, string> dicTemp = new Dictionary<string, string>();
- DataRow[] navigationRows = treeTable.Select("LEN(FunctionCode) = " + Constant.INT_IS_TWO.ToString()); // 编号2为一级菜单
- foreach (DataRow newRow in navigationRows)
- {
- string funcName = newRow["FunctionName"].ToString();
- string funcCode = newRow["FunctionCode"].ToString();
- if (!dicTemp.ContainsKey(funcCode))
- {
- dicTemp.Add(funcCode, funcName);
- }
- }
- return dicTemp;
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 初始化树形控件
- /// </summary>
- /// <param name="treeTable">菜单数据表</param>
- /// <param name="rows">待处理的菜单集合</param>
- /// <param name="node">当前树节点</param>
- private void InitTreeView(DataTable treeTable, DataRow[] rows, TreeNode node)
- {
- foreach (DataRow row in rows)
- {
- TreeNode sNode;
- if (node == null)
- {
- sNode = new TreeNode();
- sNode.Text = row["FunctionName"].ToString();
- sNode.Name = row["FunctionCode"].ToString();
- //xuwei add 2019-11-28
- sNode.Tag = row["Url"].ToString();
- //xuwei end
- if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(row["FunctionFlag"].ToString().Trim()))
- {
- sNode.ImageIndex = Constant.INT_IS_ONE;
- sNode.SelectedImageIndex = Constant.INT_IS_ONE;
- }
- this.trvMenu.Nodes.Add(sNode);
- }
- else
- {
- sNode = node.Nodes.Add(row["FunctionName"].ToString());
- sNode.Name = row["FunctionCode"].ToString();
- #region 陈冰 修改 增加工序类别和工序ID 2014-9-23
- //node.Tag = nodeRoot["FunctionCode"].ToString();
- //xuwei modify 2019-11-28
- //sNode.Tag = row["ProcedureModeltype"].ToString() + "," + row["ProcedureID"].ToString() + "," + row["ProcedureModel"].ToString();
- sNode.Tag = row["ProcedureModeltype"].ToString() + "," + row["ProcedureID"].ToString() + "," + row["ProcedureModel"].ToString()+"," + row["Url"].ToString();
- //xuwei end
- #endregion
- if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(row["FunctionFlag"].ToString().Trim()))
- {
- sNode.ImageIndex = Constant.INT_IS_ONE;
- sNode.SelectedImageIndex = Constant.INT_IS_ONE;
- }
- }
- string filterExpression = "Functionlevel LIKE '" + row["Functionlevel"].ToString()
- + "%' AND LEN(Functionlevel) = " + (row["Functionlevel"].ToString().Length + Constant.INT_IS_TWO);
- DataRow[] subRows = treeTable.Select(filterExpression);
- // 递归方法
- InitTreeView(treeTable, subRows, sNode);
- }
- }
- /// <summary>
- /// 显示对应的页面中主窗体中
- /// </summary>
- /// <param name="dockPanelBaseForm">需要停靠的DockPanelBase</param>
- private void ShowInDockPanel(DockPanelBase dockPanelBaseForm)
- {
- try
- {
- if (dockPanelBaseForm == null)
- {
- return;
- }
- dockPanelBaseForm.Show(_dockPanel, DockState.Document);
- dockPanelBaseForm.Activate();
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 模态打开窗体
- /// </summary>
- /// <param name="formBase"></param>
- private void ShowDialogForm(FormBase formBase)
- {
- try
- {
- if (formBase == null)
- {
- return;
- }
- formBase.ShowDialog();
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- private void InitNavigationTreeView(DataTable treeTable)
- {
- try
- {
- TreeNode node = null;
- DataRow[] navigationRows = treeTable.Select
- ("LEN(Functionlevel) = 2");
- // 递归生成功能权限树
- this.InitTreeView(treeTable, navigationRows, node);
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- #endregion
- }
- }
|