F_SYS_0202.cs 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:F_SYS_0202.cs
  5. * 2.功能描述:系统导航栏页面
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 张国印 2014/08/27 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. using System.Collections.Generic;
  12. using System.Data;
  13. using System.Linq;
  14. using System.Reflection;
  15. using System.Windows.Forms;
  16. using Dongke.IBOSS.PRD.Basics.BaseControls;
  17. using Dongke.IBOSS.PRD.Basics.BaseResources;
  18. using Dongke.IBOSS.PRD.Basics.DockPanel;
  19. using Dongke.IBOSS.PRD.Basics.Library;
  20. using Dongke.IBOSS.PRD.Client.CommonModule;
  21. using Dongke.IBOSS.PRD.Client.Controls;
  22. using Dongke.IBOSS.PRD.Client.DataModels;
  23. using Dongke.IBOSS.PRD.Client.HRModule;
  24. using Dongke.IBOSS.PRD.Client.PAMModule;
  25. using Dongke.IBOSS.PRD.Client.PCModule;
  26. using Dongke.IBOSS.PRD.Client.PMModule;
  27. //using Dongke.IBOSS.PRD.Client.PPModule;
  28. using Dongke.IBOSS.PRD.Client.ReportModule;
  29. using Dongke.IBOSS.PRD.Client.SAPDataModule;
  30. using Dongke.IBOSS.PRD.Client.SystemModule;
  31. using Dongke.IBOSS.PRD.Client.TATModule;
  32. using Dongke.IBOSS.PRD.WCF.DataModels;
  33. using Dongke.IBOSS.PRD.WCF.Proxys;
  34. namespace Dongke.IBOSS.PRD.Client
  35. {
  36. /// <summary>
  37. /// 系统导航栏页面
  38. /// </summary>
  39. public partial class F_SYS_0202 : DockPanelBase
  40. {
  41. #region 成员变量
  42. // 主窗体的DockPanel
  43. private readonly DockPanel _dockPanel = new DockPanel();
  44. #endregion
  45. #region 构造函数
  46. /// <summary>
  47. /// 构造函数
  48. /// </summary>
  49. /// <param name="dockpanel">主窗体的DockPanel控件</param>
  50. public F_SYS_0202(DockPanel dockpanel)
  51. {
  52. InitializeComponent();
  53. this.SetFromTitleInfo();
  54. this._dockPanel = dockpanel;
  55. this.TabPageContextMenuStrip = null;
  56. }
  57. #endregion
  58. #region 事件处理
  59. /// <summary>
  60. /// 页面加载事件
  61. /// </summary>
  62. /// <param name="sender"></param>
  63. /// <param name="e"></param>
  64. private void F_SYS_0202_Load(object sender, EventArgs e)
  65. {
  66. // 获取导航栏用户菜单
  67. DataTable dtTemp = LogInUserInfo.CurrentUser.CurrentUserEntity.UserNavigationData;
  68. // 返回第一级用户菜单,用于生成对应Button
  69. //var dicTemp = InitNavigationButtons(dtTemp);
  70. // 设置导航栏一级菜单 原来带Button 的菜单 一级菜单多了容易兑死
  71. //this.tvwNavigation.SetMenuDictionart(dicTemp);
  72. // 纯树形菜单
  73. this.InitNavigationTreeView(dtTemp);
  74. }
  75. /// <summary>
  76. /// 刷新树
  77. /// </summary>
  78. public void RefreshViewTree()
  79. {
  80. LogInUserInfo.CurrentUser.SysParameter.Clear();
  81. LogInUserInfo.CurrentUser.SysParameter.AcceptChanges();
  82. LoginRequestEntity requestEntity = new LoginRequestEntity();
  83. requestEntity.AccountCode = LogInUserInfo.CurrentUser.CurrentUserEntity.AccountCode;
  84. requestEntity.UserCode = LogInUserInfo.CurrentUser.CurrentUserEntity.UserCode;
  85. requestEntity.Password = LogInUserInfo.CurrentUser.CurrentUserEntity.Password;
  86. requestEntity.IPAddress = SystemAPI.IPAddress;
  87. requestEntity.MACAddress = SystemAPI.MacAddress;
  88. requestEntity.ComputerName = SystemAPI.ComputerName;
  89. LoginResultEntity result = (LoginResultEntity)DoAsync(new AsyncMethod(() =>
  90. {
  91. return DKIBOSSPRDProxy.Service.DoLoginRefresh(requestEntity);
  92. }));
  93. Dongke.IBOSS.PRD.Client.DataModels.UserEntity userEntity =
  94. new Dongke.IBOSS.PRD.Client.DataModels.UserEntity();
  95. DataConvert.Convert(result.CurrentUserEntity, userEntity);
  96. LogInUserInfo tempUser = new LogInUserInfo(userEntity, result.LicenseInfo,
  97. result.SysParameter);
  98. }
  99. /// <summary>
  100. /// 根据传入的ID生成对应的导航树
  101. /// </summary>
  102. /// <param name="appID">用户选择的菜单编号</param>
  103. /// <returns></returns>
  104. private TreeNode dkButtonTreeView1_GetTreeViewNodes(string appID)
  105. {
  106. DataTable sysList = LogInUserInfo.CurrentUser.CurrentUserEntity.UserNavigationData.Copy();
  107. // 递归生成功能权限树
  108. DataRow nodeRoot = sysList.Select("FunctionCode = '" + appID + "'").FirstOrDefault();
  109. if (nodeRoot != null)
  110. {
  111. TreeNode node = new TreeNode();
  112. node.Text = nodeRoot["FunctionName"].ToString();
  113. node.Name = nodeRoot["FunctionCode"].ToString();
  114. if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(nodeRoot["FunctionFlag"].ToString().Trim()))
  115. {
  116. node.ImageIndex = Constant.INT_IS_ONE;
  117. node.SelectedImageIndex = Constant.INT_IS_ONE;
  118. }
  119. DataRow[] navigationRows = sysList.Select("FunctionCode LIKE '" + appID
  120. + "%' AND " + "LEN(FunctionCode) = " + Constant.INT_IS_FOUR.ToString());
  121. this.InitTreeView(sysList, navigationRows, node);
  122. return node;
  123. }
  124. else
  125. {
  126. return null;
  127. }
  128. }
  129. /// <summary>
  130. /// 层叠树的节点时触发
  131. /// </summary>
  132. /// <param name="sender"></param>
  133. /// <param name="e"></param>
  134. private void trvMenu_AfterCollapse(object sender, TreeViewEventArgs e)
  135. {
  136. e.Node.SelectedImageIndex = Constant.INT_IS_ZERO;
  137. e.Node.ImageIndex = Constant.INT_IS_ZERO;
  138. }
  139. /// <summary>
  140. /// 展开树的节点时触发
  141. /// </summary>
  142. /// <param name="sender"></param>
  143. /// <param name="e"></param>
  144. private void trvMenu_AfterExpand(object sender, TreeViewEventArgs e)
  145. {
  146. e.Node.SelectedImageIndex = Constant.INT_IS_TWO;
  147. e.Node.ImageIndex = Constant.INT_IS_TWO;
  148. }
  149. /// <summary>
  150. /// 用户双击导航树时触发
  151. /// </summary>
  152. /// <param name="sender"></param>
  153. /// <param name="e"></param>
  154. private void trvMenu_DoubleClick(object sender, EventArgs e)
  155. {
  156. try
  157. {
  158. if (sender != null)
  159. {
  160. if (sender is TreeView)
  161. {
  162. if (((TreeView)sender).SelectedNode != null)
  163. {
  164. //xuwei add 2019-11-28 如果定义了url 跳转到url
  165. if(((TreeView)sender).SelectedNode.Tag is object)
  166. {
  167. string tag = ((TreeView)sender).SelectedNode.Tag.ToString();
  168. if(tag!="" & tag!=",,,")
  169. {
  170. string[] tagArray = tag.Split(',');
  171. if (tagArray.Length == 1 && tagArray[0].ToString() != "")
  172. System.Diagnostics.Process.Start(tagArray[0] + "?sessionkey=" + LogInUserInfo.CurrentUser.SessionKey);
  173. if (tagArray.Length == 4 && tagArray[3].ToString() != "")
  174. System.Diagnostics.Process.Start(tagArray[3] + "?sessionkey=" + LogInUserInfo.CurrentUser.SessionKey);
  175. }
  176. }
  177. //xuwei end
  178. switch (((TreeView)sender).SelectedNode.Name.ToString())
  179. {
  180. #region 01-系统管理
  181. case "01":
  182. //系统管理
  183. break;
  184. #region 系统管理-帐套信息
  185. case "0101":
  186. //系统管理-帐套信息
  187. break;
  188. case "010101":
  189. //系统管理-帐套信息-帐套管理
  190. F_MST_0001 frmAccount = new F_MST_0001();
  191. frmAccount.ShowDialog();
  192. break;
  193. #endregion
  194. #region 系统管理-用户及组织
  195. case "0102":
  196. //系统管理-用户及组织
  197. break;
  198. case "010201":
  199. //系统管理-用户及组织-组织机构
  200. this.ShowInDockPanel(F_MST_0101.Instance);
  201. break;
  202. case "010202":
  203. //系统管理-用户及组织-用户管理
  204. this.ShowInDockPanel(F_MST_0201.Instance);
  205. break;
  206. case "010203":
  207. case "010403":
  208. //系统管理-用户及组织-关联员工
  209. this.ShowInDockPanel(F_MST_0210.Instance);
  210. break;
  211. case "010204":
  212. //系统管理-用户及组织-功能权限
  213. F_MST_0206 frm0206 = new F_MST_0206();
  214. frm0206.ShowDialog();
  215. break;
  216. case "010205":
  217. //系统管理-用户及组织-范围权限
  218. F_MST_0207 frm0207 = new F_MST_0207();
  219. frm0207.ShowDialog();
  220. break;
  221. #endregion
  222. #region 系统管理-产品信息
  223. case "0103":
  224. //系统管理-产品信息
  225. break;
  226. case "010301":
  227. //系统管理-产品信息-产品类别
  228. F_MST_0405 mst0405 = new F_MST_0405();
  229. mst0405.ShowDialog();
  230. break;
  231. case "010302":
  232. //系统管理-产品信息-釉料类别
  233. break;
  234. case "010303":
  235. //系统管理-产品信息-产品档案
  236. this.ShowInDockPanel(F_MST_0501.Instance);
  237. break;
  238. case "010304":
  239. //系统管理-产品信息-产品缺陷
  240. this.ShowDialogForm(F_MST_0407.Instance);
  241. break;
  242. case "010305":
  243. //系统管理-产品信息-缺陷位置
  244. this.ShowDialogForm(F_MST_0409.Instance);
  245. break;
  246. case "010306":
  247. //系统管理-产品信息-产品分级
  248. this.ShowDialogForm(F_MST_0408.Instance);
  249. break;
  250. case "010307":
  251. //系统管理-产品信息-缺陷类别
  252. F_MST_0411 mst0411 = new F_MST_0411();
  253. mst0411.ShowDialog();
  254. break;
  255. case "010308":
  256. //系统管理-产品信息-半成品缺陷
  257. F_MST_1001 mst1001 = new F_MST_1001();
  258. mst1001.ShowDialog();
  259. break;
  260. case "010309":
  261. //系统管理-产品信息-半成品缺陷位置
  262. F_MST_1002 mst1002 = new F_MST_1002();
  263. mst1002.ShowDialog();
  264. break;
  265. #endregion
  266. #region 系统管理-HR基础数据
  267. case "0104":
  268. //系统管理-HR基础数据
  269. break;
  270. case "010401":
  271. //系统管理-HR基础数据-工种
  272. this.ShowDialogForm(F_MST_0403.Instance);
  273. break;
  274. case "010402":
  275. //系统管理-HR基础数据-职务
  276. this.ShowDialogForm(F_MST_0404.Instance);
  277. break;
  278. #endregion
  279. #region 系统管理-生产基础数据
  280. case "0105":
  281. //系统管理-生产基础数据
  282. break;
  283. case "010501":
  284. //系统管理-生产基础数据-窑炉
  285. this.ShowDialogForm(F_MST_0301.Instance);
  286. break;
  287. case "010502":
  288. //系统管理-生产基础数据-窑车
  289. this.ShowDialogForm(F_MST_0302.Instance);
  290. break;
  291. case "010503":
  292. //系统管理-生产基础数据-成型线类型
  293. this.ShowDialogForm(F_MST_0410.Instance);
  294. break;
  295. case "010504":
  296. //系统管理-生产基础数据-温湿度管理
  297. this.ShowInDockPanel(F_MST_0601.Instance);
  298. break;
  299. case "010510":
  300. //系统管理-生产基础数据-成型破损原因
  301. this.ShowDialogForm(F_PM_0906.Instance);
  302. break;
  303. #endregion
  304. #region 系统管理-系统字典
  305. case "0106":
  306. //系统管理-系统字典
  307. this.ShowDialogForm(F_MST_0402.Instance);
  308. break;
  309. #endregion
  310. #region 系统管理-系统设置
  311. case "0107":
  312. //系统管理-系统设置
  313. break;
  314. case "010701":
  315. //系统管理-系统设置-系统参数
  316. this.ShowDialogForm(F_MST_0401.Instance);
  317. break;
  318. case "010702":
  319. //系统管理-系统设置-票据设置
  320. break;
  321. #endregion
  322. #region 系统管理-报表工序
  323. case "0108":
  324. //系统管理-报表工序
  325. this.ShowInDockPanel(F_MST_0701.Instance);
  326. break;
  327. #endregion
  328. #region 系统管理-工艺管理
  329. case "0109":
  330. //系统管理-工艺部门
  331. this.ShowDialogForm(F_MST_1101.Instance);
  332. break;
  333. case "0110":
  334. //系统管理-工艺配置
  335. this.ShowInDockPanel(F_MST_1102.Instance);
  336. break;
  337. case "0111":
  338. //系统管理-条码打印模板
  339. this.ShowInDockPanel(F_MST_012001.Instance);
  340. break;
  341. case "0115":
  342. //系统管理-模具标签模板
  343. this.ShowInDockPanel(F_MST_013001.Instance);
  344. break;
  345. case "0112":
  346. //系统管理-工号分组
  347. this.ShowInDockPanel(F_MST_1201.Instance);
  348. break;
  349. case "0113":
  350. //系统管理-条码打印机
  351. this.ShowDialogForm(F_MST_0412.Instance);
  352. break;
  353. case "0114":
  354. //系统管理-PLC连接参数
  355. this.ShowDialogForm(F_MST_0413.Instance);
  356. break;
  357. #endregion
  358. case "010505":
  359. //系统管理-商标管理
  360. F_MST_0801 mst0801 = new F_MST_0801();
  361. mst0801.ShowDialog();
  362. break;
  363. case "010506":
  364. //系统管理-缺陷扣罚管理
  365. F_MST_0901 mst0901 = new F_MST_0901();
  366. mst0901.ShowDialog();
  367. break;
  368. case "010507":
  369. //系统管理-缺陷扣除数管理
  370. F_MST_0902 mst0902 = new F_MST_0902();
  371. mst0902.ShowDialog();
  372. break;
  373. case "010508":
  374. //系统管理-缺陷关系设置
  375. F_MST_0903 mst0903 = new F_MST_0903();
  376. mst0903.ShowDialog();
  377. break;
  378. case "010509":
  379. //系统管理-模具材料供应商
  380. F_MST_0414 mst0414 = new F_MST_0414();
  381. mst0414.ShowDialog();
  382. break;
  383. #endregion
  384. #region 02-策略管理
  385. case "02":
  386. //策略管理
  387. break;
  388. #region 策略管理-工资考核策略
  389. case "0201":
  390. //策略管理-工资考核策略
  391. break;
  392. case "020101":
  393. //策略管理-工资考核策略-基本工资策略
  394. this.ShowInDockPanel(F_TAT_0301.Instance);
  395. break;
  396. case "020102":
  397. //策略管理-工资考核策略-管理岗位工资策略
  398. this.ShowInDockPanel(F_TAT_0701.Instance);
  399. break;
  400. case "020103":
  401. //策略管理-工资考核策略-工价策略
  402. this.ShowInDockPanel(F_TAT_0201.Instance);
  403. break;
  404. case "020104":
  405. //策略管理-工资考核策略-出勤考核
  406. this.ShowInDockPanel(F_TAT_0801.Instance);
  407. break;
  408. case "020105":
  409. //策略管理-工资考核策略-质量考核
  410. this.ShowInDockPanel(F_TAT_0401.Instance);
  411. break;
  412. case "020106":
  413. //策略管理-工资考核策略-进度考核
  414. this.ShowInDockPanel(F_TAT_0501.Instance);
  415. break;
  416. case "020107":
  417. //策略管理-工资考核策略-缺陷扣罚策略
  418. this.ShowInDockPanel(F_TAT_0101.Instance);
  419. break;
  420. case "020108":
  421. //策略管理-工资考核策略-缺陷扣罚策略
  422. this.ShowInDockPanel(F_TAT_0601.Instance);
  423. break;
  424. #endregion
  425. #region 策略管理-工资管理策略
  426. case "020201":
  427. //策略管理-工资管理策略-工资方案参数设定
  428. this.ShowInDockPanel(F_PAM_0101.Instance);
  429. break;
  430. case "020202":
  431. //策略管理-工资管理策略-工种工资方案
  432. this.ShowInDockPanel(F_PAM_0102.Instance);
  433. break;
  434. case "020203":
  435. //策略管理-工资管理策略-工价分类
  436. this.ShowDialogForm(F_PAM_0202.Instance);
  437. break;
  438. case "020204":
  439. //策略管理-工资管理策略-产品工价分类
  440. this.ShowInDockPanel(F_PAM_0201.Instance);
  441. //this.ShowInDockPanel(F_PAM_0601.Instance);
  442. break;
  443. case "020205":
  444. //策略管理-工资管理策略-计件工资策略
  445. this.ShowInDockPanel(F_PAM_0301.Instance);
  446. break;
  447. case "020206":
  448. //策略管理-工资管理策略-品质考核策略
  449. this.ShowInDockPanel(F_PAM_0401.Instance);
  450. break;
  451. case "020207":
  452. //策略管理-工资管理策略-工资结算
  453. this.ShowInDockPanel(F_PAM_0601.Instance);
  454. break;
  455. #endregion
  456. #endregion
  457. #region 03-人力资源
  458. case "03":
  459. //人力资源
  460. break;
  461. #region 人力资源-员工管理
  462. case "0301":
  463. //人力资源-员工管理
  464. break;
  465. case "030101":
  466. //人力资源-员工管理-员工档案
  467. this.ShowInDockPanel(F_HR_0101.Instance);
  468. break;
  469. case "030102":
  470. //人力资源-员工管理-员工入职
  471. this.ShowInDockPanel(F_HR_0201.Instance);
  472. break;
  473. case "030103":
  474. //人力资源-员工管理-员工转正
  475. this.ShowInDockPanel(F_HR_0301.Instance);
  476. break;
  477. case "030104":
  478. //人力资源-员工管理-员工离职
  479. this.ShowInDockPanel(F_HR_0401.Instance);
  480. break;
  481. case "030105":
  482. //人力资源-员工管理-工种调整
  483. this.ShowInDockPanel(F_HR_0501.Instance);
  484. break;
  485. case "030106":
  486. //人力资源-员工管理-职务调整
  487. this.ShowInDockPanel(F_HR_0601.Instance);
  488. break;
  489. case "030107":
  490. //人力资源-员工管理-部门调整
  491. this.ShowInDockPanel(F_HR_0701.Instance);
  492. break;
  493. #endregion
  494. #region 人力资源-人事审批
  495. case "0302":
  496. //人力资源-人事审批
  497. break;
  498. case "030201":
  499. //人力资源-人事审批-员工入职
  500. this.ShowInDockPanel(F_HR_0203.Instance);
  501. break;
  502. case "030202":
  503. //人力资源-人事审批-员工转正
  504. this.ShowInDockPanel(F_HR_0303.Instance);
  505. break;
  506. case "030203":
  507. //人力资源-人事审批-员工离职
  508. this.ShowInDockPanel(F_HR_0403.Instance);
  509. break;
  510. case "030204":
  511. //人力资源-人事审批-工种调整
  512. this.ShowInDockPanel(F_HR_0503.Instance);
  513. break;
  514. case "030205":
  515. //人力资源-人事审批-职务调整
  516. this.ShowInDockPanel(F_HR_0603.Instance);
  517. break;
  518. case "030206":
  519. //人力资源-人事审批-部门调整
  520. this.ShowInDockPanel(F_HR_0703.Instance);
  521. break;
  522. #endregion
  523. #region 人力资源-行政管理
  524. case "0303":
  525. //人力资源-行政管理
  526. break;
  527. case "030301":
  528. //人力资源-行政管理-员工报餐
  529. this.ShowInDockPanel(F_HR_0901.Instance);
  530. break;
  531. case "030302":
  532. //人力资源-行政管理-员工考勤
  533. this.ShowInDockPanel(F_HR_1001.Instance);
  534. break;
  535. case "030303":
  536. //人力资源-行政管理-行政考核
  537. this.ShowInDockPanel(F_PAM_0501.Instance);
  538. break;
  539. case "030304":
  540. //人力资源-行政管理-行政考核审核
  541. this.ShowInDockPanel(F_PAM_0503.Instance);
  542. break;
  543. #endregion
  544. #region 人力资源-奖惩管理
  545. case "0304":
  546. //人力资源-奖惩管理
  547. break;
  548. case "030401":
  549. //人力资源-奖惩管理-进度奖惩
  550. this.ShowInDockPanel(F_PM_1104.Instance);
  551. break;
  552. case "030402":
  553. //人力资源-奖惩管理-行政奖惩
  554. this.ShowInDockPanel(F_HR_1101.Instance);
  555. break;
  556. case "030403":
  557. //人力资源-奖惩管理-行政奖惩审批
  558. this.ShowInDockPanel(F_HR_1103.Instance);
  559. break;
  560. case "030404":
  561. //人力资源-奖惩管理-进度奖惩审批
  562. this.ShowInDockPanel(F_PM_1106.Instance);
  563. break;
  564. #endregion
  565. #region 人力资源-工资管理
  566. case "0305":
  567. //人力资源-工资管理
  568. break;
  569. case "030501":
  570. //人力资源-工资管理-工资结算
  571. this.ShowInDockPanel(F_HR_1201.Instance);
  572. break;
  573. case "030502":
  574. //人力资源-工资管理-工资审批
  575. break;
  576. case "030503":
  577. //人力资源-工资管理-工资结算
  578. this.ShowInDockPanel(F_PAM_0601.Instance);
  579. break;
  580. case "030504":
  581. //人力资源-工资管理-工资调整
  582. this.ShowInDockPanel(F_PAM_0603.Instance);
  583. break;
  584. case "030505":
  585. //人力资源-工资管理-工资审批
  586. this.ShowInDockPanel(F_PAM_0604.Instance);
  587. break;
  588. #endregion
  589. #endregion
  590. #region 04-生产配置
  591. case "04":
  592. //生产配置
  593. break;
  594. #region 生产配置-成型线管理
  595. case "0401":
  596. //生产配置-成型线管理
  597. //this.ShowInDockPanel(F_PC_0104.Instance);
  598. this.ShowInDockPanel(F_PC_0104_1.Instance);
  599. //生产配置-生产模具管理
  600. break;
  601. case "0402":
  602. //生产配置-生产模具管理
  603. //this.ShowInDockPanel(F_PC_0101.Instance);
  604. this.ShowInDockPanel(F_PC_0101_1_1.Instance);
  605. break;
  606. case "0403":
  607. //生产配置-生产线配置
  608. //this.ShowInDockPanel(F_PC_0201.Instance);
  609. this.ShowInDockPanel(F_PC_0205.Instance);
  610. break;
  611. case "0404":
  612. //生产配置-班次配置
  613. this.ShowInDockPanel(F_PC_0401.Instance);
  614. break;
  615. case "0405":
  616. //生产配置-员工关联
  617. this.ShowInDockPanel(F_PC_0601.Instance);
  618. break;
  619. #endregion
  620. #endregion
  621. #region M04-模具管理
  622. case "M0401":
  623. // 模具管理-模具档案
  624. this.ShowInDockPanel(F_PC_1001.Instance);
  625. break;
  626. case "M0402":
  627. // 模具管理-模具盘点
  628. this.ShowInDockPanel(F_PC_1101.Instance);
  629. break;
  630. case "M0403":
  631. // 模具管理-模具库存结转
  632. this.ShowInDockPanel(F_PC_1201.Instance);
  633. break;
  634. #endregion
  635. #region 06-生产管理
  636. case "06":
  637. //生产管理
  638. break;
  639. #endregion
  640. #region 07-综合报表
  641. #region 明细表
  642. case "070401":
  643. //注浆明细表
  644. this.ShowInDockPanel(F_RPT_010101_1.Instance);
  645. break;
  646. case "070402":
  647. //半检明细表
  648. this.ShowInDockPanel(F_RPT_010102_1.Instance); //
  649. break;
  650. case "070403":
  651. //漏扫数据统计
  652. this.ShowInDockPanel(F_RPT_010201_1.Instance);
  653. break;
  654. case "070404":
  655. //条码变更
  656. this.ShowInDockPanel(F_RPT_010301_1.Instance);
  657. break;
  658. case "070407":
  659. //交坯明细
  660. this.ShowInDockPanel(F_RPT_010103.Instance);
  661. break;
  662. case "070408":
  663. //注浆次数明细
  664. this.ShowInDockPanel(F_RPT_010104.Instance);
  665. break;
  666. case "070415":
  667. //成型线模具使用明细表
  668. this.ShowInDockPanel(F_RPT_010105.Instance);
  669. break;
  670. case "070416":
  671. //成型线剩余注浆次数
  672. this.ShowInDockPanel(F_RPT_010106.Instance);
  673. break;
  674. case "070409":
  675. //历史模具明细表
  676. this.ShowInDockPanel(F_RPT_080101.Instance);
  677. break;
  678. case "070410":
  679. //工序产量明细表
  680. this.ShowInDockPanel(F_RPT_080105.Instance);
  681. break;
  682. case "070411":
  683. //成型线明细表
  684. this.ShowInDockPanel(F_PC_0108.Instance);
  685. break;
  686. case "070413":
  687. //生产数据明细表
  688. this.ShowInDockPanel(F_RPT_010403.Instance);
  689. break;
  690. case "070414":
  691. //半检登记明细表
  692. this.ShowInDockPanel(F_RPT_080107.Instance);
  693. break;
  694. case "070701":
  695. //
  696. this.ShowInDockPanel(F_RPT_080102.Instance);
  697. break;
  698. case "070702":
  699. //
  700. this.ShowInDockPanel(F_RPT_080103.Instance);
  701. break;
  702. case "070703":
  703. //
  704. this.ShowInDockPanel(F_RPT_080104.Instance);
  705. break;
  706. case "070412":// 温湿计明细表
  707. //
  708. this.ShowInDockPanel(F_RPT_080106.Instance);
  709. break;
  710. case "070417":// 商标变更明细表
  711. //
  712. this.ShowInDockPanel(F_RPT_010302.Instance);
  713. break;
  714. case "070418":
  715. // 产品损坯明细表
  716. this.ShowInDockPanel(F_RPT_010202.Instance);
  717. break;
  718. case "070419":
  719. // 在产品备份表
  720. this.ShowInDockPanel(F_RPT_010404.Instance);
  721. break;
  722. case "070420":
  723. // 产成品单值明细表
  724. this.ShowInDockPanel(F_RPT_010405.Instance);
  725. break;
  726. //xuwei begin add 2019-10-14
  727. case "070421":
  728. //半检返修登记明细表
  729. this.ShowInDockPanel(F_RPT_080108.Instance);
  730. break;
  731. //xuwei end
  732. #endregion
  733. #region 跟踪表
  734. case "070301":
  735. //产品统计-产品跟踪表
  736. this.ShowInDockPanel(F_RPT_020101_1.Instance);
  737. break;
  738. case "070302":
  739. //产品统计-窑车状态表
  740. this.ShowInDockPanel(F_RPT_020104.Instance);
  741. break;
  742. case "070303":
  743. // 模具跟踪表
  744. this.ShowInDockPanel(F_RPT_020105.Instance);
  745. break;
  746. #endregion
  747. #region 汇总表
  748. case "070601":
  749. //产品损坏汇总表
  750. this.ShowInDockPanel(F_RPT_030102_1.Instance);
  751. break;
  752. case "070602":
  753. //产品产量汇总表
  754. this.ShowInDockPanel(F_RPT_030101_1.Instance);
  755. break;
  756. case "070603":
  757. //出窑数量汇总表
  758. this.ShowInDockPanel(F_RPT_030103_1.Instance);
  759. break;
  760. case "070604":
  761. //窑车产量汇总表
  762. this.ShowInDockPanel(F_RPT_030104_1.Instance);
  763. break;
  764. case "070605":
  765. //生产统计-成型线变产记录
  766. this.ShowInDockPanel(F_PC_0501.Instance);
  767. break;
  768. case "070606":
  769. //在产产量汇总表
  770. this.ShowInDockPanel(F_RPT_030105.Instance);
  771. break;
  772. case "070607":
  773. //成检缺陷汇总表
  774. this.ShowInDockPanel(F_RPT_030106.Instance);
  775. break;
  776. case "070608":
  777. //工序交接数量汇总表
  778. this.ShowInDockPanel(F_RPT_030107.Instance);
  779. break;
  780. case "070609":
  781. //成型信息汇总表
  782. this.ShowInDockPanel(F_RPT_030108.Instance);
  783. break;
  784. case "070610":
  785. //撤销产品汇总表
  786. this.ShowInDockPanel(F_RPT_030109.Instance);
  787. break;
  788. case "070611":
  789. //半检信息汇总表
  790. this.ShowInDockPanel(F_RPT_030110.Instance);
  791. break;
  792. case "070612":
  793. //工序收发存汇总表
  794. this.ShowInDockPanel(F_RPT_030111.Instance);
  795. break;
  796. case "070713":
  797. //产成品交接汇总表
  798. this.ShowInDockPanel(F_RPT_030112.Instance);
  799. break;
  800. case "070714":
  801. // 模具收发存汇总表
  802. this.ShowInDockPanel(F_RPT_030113.Instance);
  803. break;
  804. case "070715":
  805. // 废弃产品汇总表
  806. this.ShowInDockPanel(F_RPT_030114.Instance);
  807. break;
  808. case "070716":
  809. // 工艺废弃产品汇总表
  810. this.ShowInDockPanel(F_RPT_030115.Instance);
  811. break;
  812. case "070717":
  813. // 成型存坯汇总表
  814. this.ShowInDockPanel(F_RPT_030116.Instance);
  815. break;
  816. case "070718":
  817. // 产成品交接撤销汇总表
  818. this.ShowInDockPanel(F_RPT_030117.Instance);
  819. break;
  820. case "070719":
  821. // 年度各工序月产量统计表
  822. this.ShowInDockPanel(F_RPT_030118.Instance);
  823. break;
  824. case "070720":
  825. // 半检返修缺陷汇总表
  826. this.ShowInDockPanel(F_RPT_030119.Instance);
  827. break;
  828. #endregion
  829. #region 分析表
  830. case "070501":
  831. //注浆交坯比率分析表
  832. this.ShowInDockPanel(F_RPT_040101_1.Instance);
  833. break;
  834. case "070502":
  835. //工序产量分析表
  836. this.ShowInDockPanel(F_RPT_040102_1.Instance);//注释日期 20150608
  837. break;
  838. case "070503":
  839. //注浆产品工序分析表
  840. this.ShowInDockPanel(F_RPT_040107.Instance);
  841. break;
  842. case "070504":
  843. //成型线产量分析表
  844. this.ShowInDockPanel(F_RPT_040108.Instance);
  845. break;
  846. case "070505":
  847. //整体质量分析表
  848. this.ShowInDockPanel(F_RPT_040109.Instance);
  849. break;
  850. case "070506":
  851. //产成品逐日出窑数值分析表
  852. this.ShowInDockPanel(F_RPT_040110.Instance);
  853. break;
  854. case "070507":
  855. //模具注浆分析表
  856. this.ShowInDockPanel(F_RPT_040111.Instance);
  857. break;
  858. case "070508":
  859. //成检产品预算分析表
  860. this.ShowInDockPanel(F_RPT_040112.Instance);
  861. break;
  862. case "070203":
  863. //产品统计-工序质量分析表
  864. this.ShowInDockPanel(F_RPT_040103.Instance);
  865. break;
  866. case "070205":
  867. //产成品质量分析表
  868. this.ShowInDockPanel(F_RPT_040104.Instance);
  869. // this.ShowInDockPanel(F_RPT_080101.Instance);
  870. break;
  871. #endregion
  872. #region 质量报表
  873. case "040105":
  874. this.ShowInDockPanel(F_RPT_040105.Instance);
  875. break;
  876. case "040106":
  877. this.ShowInDockPanel(F_RPT_040106.Instance);
  878. break;
  879. case "040113":
  880. // 各工序质量表
  881. this.ShowInDockPanel(F_RPT_040113.Instance);
  882. break;
  883. case "070509":
  884. // 综合合格率分析表
  885. this.ShowInDockPanel(F_RPT_040114.Instance);
  886. break;
  887. //case "040105":
  888. // this.ShowInDockPanel(F_RPT_040105.Instance);
  889. // break;
  890. #endregion
  891. #endregion
  892. #region 生产管理-注浆管理
  893. case "0601":
  894. //生产管理-注浆管理
  895. break;
  896. case "060101":
  897. //生产管理-注浆管理-注浆登记
  898. this.ShowInDockPanel(F_PM_0101.Instance);
  899. break;
  900. case "060102":
  901. //生产管理-注浆管理-注浆日报
  902. this.ShowInDockPanel(F_RPT_010101_1.Instance);
  903. break;
  904. case "060103":
  905. //生产管理-注浆管理-环境登记
  906. this.ShowInDockPanel(F_PM_1701.Instance);
  907. break;
  908. case "060104":
  909. //生产管理-注浆管理-环境日报
  910. this.ShowDialogForm(new F_PM_1802());
  911. break;
  912. case "060105":
  913. //生产管理-注浆管理-注浆变更
  914. this.ShowDialogForm(new F_PM_2105());
  915. break;
  916. case "060106":
  917. //生产管理-注浆管理-成型报损
  918. this.ShowInDockPanel(F_PM_2701.Instance);
  919. break;
  920. case "060107":
  921. //生产管理-注浆管理-撤销报损
  922. this.ShowDialogForm(new F_PM_2801());
  923. break;
  924. #endregion
  925. #region 生产管理-条码管理
  926. case "0602":
  927. //生产管理-条码管理
  928. break;
  929. case "060201":
  930. //生产管理-条码生成
  931. //this.ShowDialogForm(new F_PM_0103());
  932. this.ShowDialogForm(new F_PM_0103());
  933. break;
  934. case "060202":
  935. //生产管理-条码维护
  936. //this.ShowDialogForm(new F_PM_0201());
  937. this.ShowInDockPanel(F_PM_0203.Instance);
  938. break;
  939. case "060203":
  940. //生产管理-商标设定
  941. this.ShowDialogForm(new F_PM_2118());
  942. break;
  943. case "060204":
  944. //生产管理-条码打印
  945. this.ShowDialogForm(new F_MST_012006());
  946. break;
  947. case "060205":
  948. //生产管理-开模报损
  949. this.ShowDialogForm(new F_PM_2901());
  950. break;
  951. #endregion
  952. #region 生产管理-生产数据采集
  953. case "0603":
  954. //生产管理-生产数据采集
  955. //F_PM_0301 fpm0301 = F_PM_0301.Instance(13);
  956. //ShowInDockPanel(fpm0301);
  957. //break;
  958. //case "06030101":
  959. // //生产管理-工序检验
  960. // break;
  961. break;
  962. #endregion
  963. #region 生产管理-废弃产品管理
  964. case "060401":
  965. //生产管理-产品报损
  966. this.ShowInDockPanel(F_PM_1101.Instance);
  967. break;
  968. #endregion
  969. #region 检验管理
  970. case "062001":
  971. //检验管理-半成品检验
  972. this.ShowInDockPanel(F_PM_2201.Instance);
  973. break;
  974. #endregion
  975. #region 生产订单
  976. case "0621":
  977. this.ShowInDockPanel(F_PM_2301.Instance);
  978. break;
  979. case "0622"://产成品交接
  980. this.ShowInDockPanel(F_PM_2401.Instance);
  981. break;
  982. #endregion
  983. #region 报表管理-生产数据
  984. case "060501":
  985. //生产数据-在产品明细数据
  986. this.ShowInDockPanel(F_RPT_010401.Instance);
  987. break;
  988. case "060502":
  989. //生产数据-产成品明细
  990. this.ShowInDockPanel(F_RPT_010402.Instance);
  991. break;
  992. case "060503":
  993. //生产数据-半检数据一览
  994. this.ShowInDockPanel(F_PM_1601.Instance);
  995. break;
  996. #endregion
  997. #region 半检数据
  998. case "0606":
  999. //生产数据-半检数据一览
  1000. this.ShowInDockPanel(F_PM_1603.Instance);
  1001. break;
  1002. case "0608":
  1003. // 在产盘点
  1004. this.ShowInDockPanel(F_PM_2101.Instance);
  1005. break;
  1006. case "062301":
  1007. // 成型盘点
  1008. this.ShowInDockPanel(F_PM_2601.Instance);
  1009. break;
  1010. case "0609":
  1011. //撤销包装
  1012. F_PM_2104 frm2104 = new F_PM_2104();
  1013. frm2104.ShowDialog();
  1014. break;
  1015. case "0610":
  1016. //损坏撤销
  1017. F_PM_2106 frm2106 = new F_PM_2106();
  1018. frm2106.ShowDialog();
  1019. break;
  1020. case "0611":
  1021. //公坯设定
  1022. F_PM_2107 frm2107 = new F_PM_2107();
  1023. frm2107.ShowDialog();
  1024. break;
  1025. case "0612":
  1026. //清除在产残留数据
  1027. this.ShowInDockPanel(F_PM_2108.Instance);
  1028. break;
  1029. case "0613":
  1030. //清除在产回收站残留数据
  1031. this.ShowInDockPanel(F_PM_2110.Instance);
  1032. break;
  1033. case "0614":
  1034. //清除在产临时数据
  1035. this.ShowInDockPanel(F_PM_2112.Instance);
  1036. break;
  1037. case "0615":
  1038. //计件撤销
  1039. F_PM_2115 frm2115 = new F_PM_2115();
  1040. frm2115.ShowDialog();
  1041. break;
  1042. case "061601":
  1043. //交坯撤销
  1044. F_PM_2116 frm2116 = new F_PM_2116();
  1045. frm2116.ShowDialog();
  1046. break;
  1047. case "0624":
  1048. //产品挂起
  1049. this.ShowInDockPanel(F_PM_3001.Instance);
  1050. break;
  1051. case "0626":
  1052. //品保抽查
  1053. this.ShowInDockPanel(F_PM_3101.Instance);
  1054. break;
  1055. #endregion
  1056. #region SAP
  1057. case "SAP0101":
  1058. this.ShowInDockPanel(F_SAP_HEGII_0101.Instance);
  1059. break;
  1060. case "SAP0102":
  1061. this.ShowInDockPanel(F_SAP_HEGII_0102.Instance);
  1062. break;
  1063. case "SAP0103":
  1064. this.ShowInDockPanel(F_SAP_HEGII_0103.Instance);
  1065. break;
  1066. #endregion
  1067. #region 生产计划 xuwei 20190827 add
  1068. //case "PP0101":
  1069. // //年计划
  1070. // this.ShowInDockPanel(F_PP_0101.Instance);
  1071. // break;
  1072. //case "PP0102":
  1073. // //月计划
  1074. // this.ShowInDockPanel(F_PP_0201.Instance);
  1075. // break;
  1076. //case "PP0103":
  1077. // //日计划
  1078. // this.ShowInDockPanel(F_PP_0301.Instance);
  1079. // break;
  1080. //case "PP0104":
  1081. // //计划分析
  1082. // this.ShowInDockPanel(F_PP_0121.Instance);
  1083. // break;
  1084. #endregion
  1085. #region 其他
  1086. default:
  1087. TreeNode treenodes = ((TreeView)sender).SelectedNode;
  1088. if (treenodes.Name.ToString().StartsWith("0603"))
  1089. {
  1090. string[] sub = treenodes.Tag.ToString().Split(',');
  1091. if (sub[0] != string.Empty)
  1092. {
  1093. if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.DeliverMud))
  1094. {
  1095. //生产管理-交坯
  1096. F_PM_0401 frm0401 = F_PM_0401.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1097. this.ShowInDockPanel(frm0401);
  1098. }
  1099. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.LoadCar))
  1100. {
  1101. //生产管理-装窑车
  1102. F_PM_0501 frm0501 = F_PM_0501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1103. this.ShowInDockPanel(frm0501);
  1104. }
  1105. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.Normal))
  1106. {
  1107. if (Convert.ToInt32(sub[2]) == 1) // 计件模式
  1108. {
  1109. F_PM_0301 frm0301 = F_PM_0301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1110. this.ShowInDockPanel(frm0301);
  1111. }
  1112. else if (Convert.ToInt32(sub[2]) == 2) // 半成品检验(标准检验)
  1113. {
  1114. F_PM_0901 frm0901 = F_PM_0901.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1115. this.ShowInDockPanel(frm0901);
  1116. }
  1117. }
  1118. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.IntoKiln))
  1119. {
  1120. //生产管理-入窑
  1121. F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1122. this.ShowInDockPanel(frm0601);
  1123. }
  1124. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.OutKiln))
  1125. {
  1126. //生产管理-出窑
  1127. F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1128. this.ShowInDockPanel(frm0601);
  1129. }
  1130. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.UnloadCar))
  1131. {
  1132. //生产管理-卸窑车
  1133. F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1134. this.ShowInDockPanel(frm0601);
  1135. }
  1136. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.CarAdd))
  1137. {
  1138. //生产管理-窑车补件
  1139. F_PM_0501 frm0501 = F_PM_0501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1140. this.ShowInDockPanel(frm0501);
  1141. }
  1142. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.AdobeStock))
  1143. {
  1144. //生产管理-坯库
  1145. F_PM_0301 frm0301 = F_PM_0301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1146. this.ShowInDockPanel(frm0301);
  1147. }
  1148. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.QualityStatistics))
  1149. {
  1150. //生产管理-成检(质量统计)
  1151. F_PM_1201 frm1201 = F_PM_1201.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1152. this.ShowInDockPanel(frm1201);
  1153. }
  1154. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.IntoKilnCheck))
  1155. {
  1156. //生产管理-入窑前检验
  1157. F_PM_1301 frm1301 = F_PM_1301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1158. this.ShowInDockPanel(frm1301);
  1159. }
  1160. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.SpecialRepair))
  1161. {
  1162. //生产管理-干补
  1163. F_PM_2001 frm2001 = F_PM_2001.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1164. this.ShowInDockPanel(frm2001);
  1165. }
  1166. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.Recovery))
  1167. {
  1168. //生产管理-回收
  1169. F_PM_2501 frm2501 = F_PM_2501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1170. this.ShowInDockPanel(frm2501);
  1171. }
  1172. }
  1173. }
  1174. break;
  1175. #endregion
  1176. }
  1177. }
  1178. }
  1179. }
  1180. }
  1181. catch (Exception ex)
  1182. {
  1183. // 对异常进行共通处理
  1184. ExceptionManager.HandleEventException(this.ToString(),
  1185. MethodBase.GetCurrentMethod().Name, this.Text, ex);
  1186. }
  1187. }
  1188. /// <summary>
  1189. /// 展开全部节点
  1190. /// </summary>
  1191. /// <param name="sender"></param>
  1192. /// <param name="e"></param>
  1193. private void btnExpand_Click(object sender, EventArgs e)
  1194. {
  1195. TreeNode node = null;
  1196. if (this.trvMenu.SelectedNode != null)
  1197. {
  1198. node = this.trvMenu.SelectedNode;
  1199. this.trvMenu.SelectedNode = null;
  1200. }
  1201. else if (this.trvMenu.Nodes.Count > 0)
  1202. {
  1203. node = this.trvMenu.Nodes[0];
  1204. }
  1205. this.trvMenu.ExpandAll();
  1206. if (node != null)
  1207. {
  1208. this.trvMenu.SelectedNode = node;
  1209. }
  1210. this.trvMenu.Focus();
  1211. }
  1212. /// <summary>
  1213. /// 折叠全部节点
  1214. /// </summary>
  1215. /// <param name="sender"></param>
  1216. /// <param name="e"></param>
  1217. private void btnCollapse_Click(object sender, EventArgs e)
  1218. {
  1219. this.trvMenu.CollapseAll();
  1220. this.trvMenu.Focus();
  1221. }
  1222. /// <summary>
  1223. /// 设置按钮大小
  1224. /// </summary>
  1225. /// <param name="sender"></param>
  1226. /// <param name="e"></param>
  1227. private void trvMenu_SizeChanged(object sender, EventArgs e)
  1228. {
  1229. this.btnExpand.Width = this.trvMenu.Width / 2;
  1230. }
  1231. #endregion
  1232. #region 私有方法
  1233. /// <summary>
  1234. /// 设置窗体按钮的文本信息
  1235. /// </summary>
  1236. private void SetFromTitleInfo()
  1237. {
  1238. this.Text = FormTitles.F_SYS_0202;
  1239. }
  1240. /// <summary>
  1241. /// 获取用户菜单的一级菜单
  1242. /// </summary>
  1243. /// <param name="treeTable">用户菜单数据集</param>
  1244. /// <returns>一级菜单字典</returns>
  1245. private Dictionary<string, string> InitNavigationButtons(DataTable treeTable)
  1246. {
  1247. try
  1248. {
  1249. Dictionary<string, string> dicTemp = new Dictionary<string, string>();
  1250. DataRow[] navigationRows = treeTable.Select("LEN(FunctionCode) = " + Constant.INT_IS_TWO.ToString()); // 编号2为一级菜单
  1251. foreach (DataRow newRow in navigationRows)
  1252. {
  1253. string funcName = newRow["FunctionName"].ToString();
  1254. string funcCode = newRow["FunctionCode"].ToString();
  1255. if (!dicTemp.ContainsKey(funcCode))
  1256. {
  1257. dicTemp.Add(funcCode, funcName);
  1258. }
  1259. }
  1260. return dicTemp;
  1261. }
  1262. catch (Exception ex)
  1263. {
  1264. throw ex;
  1265. }
  1266. }
  1267. /// <summary>
  1268. /// 初始化树形控件
  1269. /// </summary>
  1270. /// <param name="treeTable">菜单数据表</param>
  1271. /// <param name="rows">待处理的菜单集合</param>
  1272. /// <param name="node">当前树节点</param>
  1273. private void InitTreeView(DataTable treeTable, DataRow[] rows, TreeNode node)
  1274. {
  1275. foreach (DataRow row in rows)
  1276. {
  1277. TreeNode sNode;
  1278. if (node == null)
  1279. {
  1280. sNode = new TreeNode();
  1281. sNode.Text = row["FunctionName"].ToString();
  1282. sNode.Name = row["FunctionCode"].ToString();
  1283. //xuwei add 2019-11-28
  1284. sNode.Tag = row["Url"].ToString();
  1285. //xuwei end
  1286. if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(row["FunctionFlag"].ToString().Trim()))
  1287. {
  1288. sNode.ImageIndex = Constant.INT_IS_ONE;
  1289. sNode.SelectedImageIndex = Constant.INT_IS_ONE;
  1290. }
  1291. this.trvMenu.Nodes.Add(sNode);
  1292. }
  1293. else
  1294. {
  1295. sNode = node.Nodes.Add(row["FunctionName"].ToString());
  1296. sNode.Name = row["FunctionCode"].ToString();
  1297. #region 陈冰 修改 增加工序类别和工序ID 2014-9-23
  1298. //node.Tag = nodeRoot["FunctionCode"].ToString();
  1299. //xuwei modify 2019-11-28
  1300. //sNode.Tag = row["ProcedureModeltype"].ToString() + "," + row["ProcedureID"].ToString() + "," + row["ProcedureModel"].ToString();
  1301. sNode.Tag = row["ProcedureModeltype"].ToString() + "," + row["ProcedureID"].ToString() + "," + row["ProcedureModel"].ToString()+"," + row["Url"].ToString();
  1302. //xuwei end
  1303. #endregion
  1304. if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(row["FunctionFlag"].ToString().Trim()))
  1305. {
  1306. sNode.ImageIndex = Constant.INT_IS_ONE;
  1307. sNode.SelectedImageIndex = Constant.INT_IS_ONE;
  1308. }
  1309. }
  1310. string filterExpression = "Functionlevel LIKE '" + row["Functionlevel"].ToString()
  1311. + "%' AND LEN(Functionlevel) = " + (row["Functionlevel"].ToString().Length + Constant.INT_IS_TWO);
  1312. DataRow[] subRows = treeTable.Select(filterExpression);
  1313. // 递归方法
  1314. InitTreeView(treeTable, subRows, sNode);
  1315. }
  1316. }
  1317. /// <summary>
  1318. /// 显示对应的页面中主窗体中
  1319. /// </summary>
  1320. /// <param name="dockPanelBaseForm">需要停靠的DockPanelBase</param>
  1321. private void ShowInDockPanel(DockPanelBase dockPanelBaseForm)
  1322. {
  1323. try
  1324. {
  1325. if (dockPanelBaseForm == null)
  1326. {
  1327. return;
  1328. }
  1329. dockPanelBaseForm.Show(_dockPanel, DockState.Document);
  1330. dockPanelBaseForm.Activate();
  1331. }
  1332. catch (Exception ex)
  1333. {
  1334. throw ex;
  1335. }
  1336. }
  1337. /// <summary>
  1338. /// 模态打开窗体
  1339. /// </summary>
  1340. /// <param name="formBase"></param>
  1341. private void ShowDialogForm(FormBase formBase)
  1342. {
  1343. try
  1344. {
  1345. if (formBase == null)
  1346. {
  1347. return;
  1348. }
  1349. formBase.ShowDialog();
  1350. }
  1351. catch (Exception ex)
  1352. {
  1353. throw ex;
  1354. }
  1355. }
  1356. private void InitNavigationTreeView(DataTable treeTable)
  1357. {
  1358. try
  1359. {
  1360. TreeNode node = null;
  1361. DataRow[] navigationRows = treeTable.Select
  1362. ("LEN(Functionlevel) = 2");
  1363. // 递归生成功能权限树
  1364. this.InitTreeView(treeTable, navigationRows, node);
  1365. }
  1366. catch (Exception ex)
  1367. {
  1368. throw ex;
  1369. }
  1370. }
  1371. #endregion
  1372. }
  1373. }