/*******************************************************************************
* 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 Curtain.Helpers;
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.SAPDataModule;
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
{
///
/// 系统导航栏页面
///
public partial class F_SYS_0202 : DockPanelBase
{
#region 成员变量
// 主窗体的DockPanel
private readonly DockPanel _dockPanel = new DockPanel();
#endregion
#region 构造函数
///
/// 构造函数
///
/// 主窗体的DockPanel控件
public F_SYS_0202(DockPanel dockpanel)
{
InitializeComponent();
this.SetFromTitleInfo();
this._dockPanel = dockpanel;
this.TabPageContextMenuStrip = null;
}
#endregion
#region 事件处理
///
/// 页面加载事件
///
///
///
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);
}
///
/// 刷新树
///
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);
}
///
/// 根据传入的ID生成对应的导航树
///
/// 用户选择的菜单编号
///
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;
}
}
///
/// 层叠树的节点时触发
///
///
///
private void trvMenu_AfterCollapse(object sender, TreeViewEventArgs e)
{
e.Node.SelectedImageIndex = Constant.INT_IS_ZERO;
e.Node.ImageIndex = Constant.INT_IS_ZERO;
}
///
/// 展开树的节点时触发
///
///
///
private void trvMenu_AfterExpand(object sender, TreeViewEventArgs e)
{
e.Node.SelectedImageIndex = Constant.INT_IS_TWO;
e.Node.ImageIndex = Constant.INT_IS_TWO;
}
///
/// 用户双击导航树时触发
///
///
///
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";
//从配置文件读取
string goUrl = "http://" + Utility.ReadIniFile(Constant.INI_SECTION_NET, Constant.INI_KEY_IP, AppDomain.CurrentDomain.BaseDirectory + Constant.INI_FILE_NAME) + ":9000/mes/mesgo.ashx";
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;
case "010206":
//系统管理-用户及组织-登录记录
this.ShowInDockPanel(F_MST_0208.Instance);
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":
//系统管理-产品信息-金蝶代码对应
ShowInDockPanel(F_MST_1301.Instance);
break;
case "010311":
//系统管理-产品信息-模具产品对应
ShowInDockPanel(F_MST_1401.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;
#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;
#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
#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;
#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 "070509":
// 综合合格率分析表
this.ShowInDockPanel(F_RPT_040114.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 "060204":
//生产管理-条码打印
this.ShowDialogForm(new F_MST_012006());
break;
case "060205":
//生产管理-开模报损
this.ShowDialogForm(new F_PM_2901());
break;
case "060207":
//生产管理-条码预设
this.ShowInDockPanel(F_PM_0107.Instance);
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;
#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;
#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);
}
}
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);
}
}
///
/// 展开全部节点
///
///
///
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();
}
///
/// 折叠全部节点
///
///
///
private void btnCollapse_Click(object sender, EventArgs e)
{
this.trvMenu.CollapseAll();
this.trvMenu.Focus();
}
///
/// 设置按钮大小
///
///
///
private void trvMenu_SizeChanged(object sender, EventArgs e)
{
this.btnExpand.Width = this.trvMenu.Width / 2;
}
#endregion
#region 私有方法
///
/// 设置窗体按钮的文本信息
///
private void SetFromTitleInfo()
{
this.Text = FormTitles.F_SYS_0202;
}
///
/// 获取用户菜单的一级菜单
///
/// 用户菜单数据集
/// 一级菜单字典
private Dictionary InitNavigationButtons(DataTable treeTable)
{
try
{
Dictionary dicTemp = new Dictionary();
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;
}
}
///
/// 初始化树形控件
///
/// 菜单数据表
/// 待处理的菜单集合
/// 当前树节点
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);
}
}
///
/// 显示对应的页面中主窗体中
///
/// 需要停靠的DockPanelBase
private void ShowInDockPanel(DockPanelBase dockPanelBaseForm)
{
try
{
if (dockPanelBaseForm == null)
{
return;
}
dockPanelBaseForm.Show(_dockPanel, DockState.Document);
dockPanelBaseForm.Activate();
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 模态打开窗体
///
///
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
}
}