F_SYS_0202.cs 48 KB

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