F_SYS_0202.cs 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472
  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. case "080109":
  872. // 半成检缺陷对照表(潮州)
  873. this.ShowInDockPanel(F_RPT_080109.Instance);
  874. break;
  875. #endregion
  876. #region 质量报表
  877. case "040105":
  878. this.ShowInDockPanel(F_RPT_040105.Instance);
  879. break;
  880. case "040106":
  881. this.ShowInDockPanel(F_RPT_040106.Instance);
  882. break;
  883. case "040113":
  884. // 各工序质量表
  885. this.ShowInDockPanel(F_RPT_040113.Instance);
  886. break;
  887. case "070509":
  888. // 综合合格率分析表
  889. this.ShowInDockPanel(F_RPT_040114.Instance);
  890. break;
  891. #endregion
  892. #endregion
  893. #region 生产管理-注浆管理
  894. case "0601":
  895. //生产管理-注浆管理
  896. break;
  897. case "060101":
  898. //生产管理-注浆管理-注浆登记
  899. this.ShowInDockPanel(F_PM_0101.Instance);
  900. break;
  901. case "060102":
  902. //生产管理-注浆管理-注浆日报
  903. this.ShowInDockPanel(F_RPT_010101_1.Instance);
  904. break;
  905. case "060103":
  906. //生产管理-注浆管理-环境登记
  907. this.ShowInDockPanel(F_PM_1701.Instance);
  908. break;
  909. case "060104":
  910. //生产管理-注浆管理-环境日报
  911. this.ShowDialogForm(new F_PM_1802());
  912. break;
  913. case "060105":
  914. //生产管理-注浆管理-注浆变更
  915. this.ShowDialogForm(new F_PM_2105());
  916. break;
  917. case "060106":
  918. //生产管理-注浆管理-成型报损
  919. this.ShowInDockPanel(F_PM_2701.Instance);
  920. break;
  921. case "060107":
  922. //生产管理-注浆管理-撤销报损
  923. this.ShowDialogForm(new F_PM_2801());
  924. break;
  925. #endregion
  926. #region 生产管理-条码管理
  927. case "0602":
  928. //生产管理-条码管理
  929. break;
  930. case "060201":
  931. //生产管理-条码生成
  932. //this.ShowDialogForm(new F_PM_0103());
  933. this.ShowDialogForm(new F_PM_0103());
  934. break;
  935. case "060202":
  936. //生产管理-条码维护
  937. //this.ShowDialogForm(new F_PM_0201());
  938. this.ShowInDockPanel(F_PM_0203.Instance);
  939. break;
  940. case "060203":
  941. //生产管理-商标设定
  942. this.ShowDialogForm(new F_PM_2118());
  943. break;
  944. case "060204":
  945. //生产管理-条码打印
  946. this.ShowDialogForm(new F_MST_012006());
  947. break;
  948. case "060205":
  949. //生产管理-开模报损
  950. this.ShowDialogForm(new F_PM_2901());
  951. break;
  952. #endregion
  953. #region 生产管理-生产数据采集
  954. case "0603":
  955. //生产管理-生产数据采集
  956. //F_PM_0301 fpm0301 = F_PM_0301.Instance(13);
  957. //ShowInDockPanel(fpm0301);
  958. //break;
  959. //case "06030101":
  960. // //生产管理-工序检验
  961. // break;
  962. break;
  963. #endregion
  964. #region 生产管理-废弃产品管理
  965. case "060401":
  966. //生产管理-产品报损
  967. this.ShowInDockPanel(F_PM_1101.Instance);
  968. break;
  969. #endregion
  970. #region 检验管理
  971. case "062001":
  972. //检验管理-半成品检验
  973. this.ShowInDockPanel(F_PM_2201.Instance);
  974. break;
  975. #endregion
  976. #region 生产订单
  977. case "0621":
  978. this.ShowInDockPanel(F_PM_2301.Instance);
  979. break;
  980. case "0622"://产成品交接
  981. this.ShowInDockPanel(F_PM_2401.Instance);
  982. break;
  983. #endregion
  984. #region 报表管理-生产数据
  985. case "060501":
  986. //生产数据-在产品明细数据
  987. this.ShowInDockPanel(F_RPT_010401.Instance);
  988. break;
  989. case "060502":
  990. //生产数据-产成品明细
  991. this.ShowInDockPanel(F_RPT_010402.Instance);
  992. break;
  993. case "060503":
  994. //生产数据-半检数据一览
  995. this.ShowInDockPanel(F_PM_1601.Instance);
  996. break;
  997. #endregion
  998. #region 半检数据
  999. case "0606":
  1000. //生产数据-半检数据一览
  1001. this.ShowInDockPanel(F_PM_1603.Instance);
  1002. break;
  1003. case "0608":
  1004. // 在产盘点
  1005. this.ShowInDockPanel(F_PM_2101.Instance);
  1006. break;
  1007. case "062301":
  1008. // 成型盘点
  1009. this.ShowInDockPanel(F_PM_2601.Instance);
  1010. break;
  1011. case "0609":
  1012. //撤销包装
  1013. F_PM_2104 frm2104 = new F_PM_2104();
  1014. frm2104.ShowDialog();
  1015. break;
  1016. case "0610":
  1017. //损坏撤销
  1018. F_PM_2106 frm2106 = new F_PM_2106();
  1019. frm2106.ShowDialog();
  1020. break;
  1021. case "0611":
  1022. //公坯设定
  1023. F_PM_2107 frm2107 = new F_PM_2107();
  1024. frm2107.ShowDialog();
  1025. break;
  1026. case "0612":
  1027. //清除在产残留数据
  1028. this.ShowInDockPanel(F_PM_2108.Instance);
  1029. break;
  1030. case "0613":
  1031. //清除在产回收站残留数据
  1032. this.ShowInDockPanel(F_PM_2110.Instance);
  1033. break;
  1034. case "0614":
  1035. //清除在产临时数据
  1036. this.ShowInDockPanel(F_PM_2112.Instance);
  1037. break;
  1038. case "0615":
  1039. //计件撤销
  1040. F_PM_2115 frm2115 = new F_PM_2115();
  1041. frm2115.ShowDialog();
  1042. break;
  1043. case "061601":
  1044. //交坯撤销
  1045. F_PM_2116 frm2116 = new F_PM_2116();
  1046. frm2116.ShowDialog();
  1047. break;
  1048. case "0624":
  1049. //产品挂起
  1050. this.ShowInDockPanel(F_PM_3001.Instance);
  1051. break;
  1052. case "0626":
  1053. //品保抽查
  1054. this.ShowInDockPanel(F_PM_3101.Instance);
  1055. break;
  1056. #endregion
  1057. #region SAP
  1058. case "SAP0101":
  1059. this.ShowInDockPanel(F_SAP_HEGII_0101.Instance);
  1060. break;
  1061. case "SAP0102":
  1062. this.ShowInDockPanel(F_SAP_HEGII_0102.Instance);
  1063. break;
  1064. case "SAP0103":
  1065. this.ShowInDockPanel(F_SAP_HEGII_0103.Instance);
  1066. break;
  1067. #endregion
  1068. #region 生产计划 xuwei 20190827 add
  1069. //case "PP0101":
  1070. // //年计划
  1071. // this.ShowInDockPanel(F_PP_0101.Instance);
  1072. // break;
  1073. //case "PP0102":
  1074. // //月计划
  1075. // this.ShowInDockPanel(F_PP_0201.Instance);
  1076. // break;
  1077. //case "PP0103":
  1078. // //日计划
  1079. // this.ShowInDockPanel(F_PP_0301.Instance);
  1080. // break;
  1081. //case "PP0104":
  1082. // //计划分析
  1083. // this.ShowInDockPanel(F_PP_0121.Instance);
  1084. // break;
  1085. #endregion
  1086. #region 其他
  1087. default:
  1088. TreeNode treenodes = ((TreeView)sender).SelectedNode;
  1089. if (treenodes.Name.ToString().StartsWith("0603"))
  1090. {
  1091. string[] sub = treenodes.Tag.ToString().Split(',');
  1092. if (sub[0] != string.Empty)
  1093. {
  1094. if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.DeliverMud))
  1095. {
  1096. //生产管理-交坯
  1097. F_PM_0401 frm0401 = F_PM_0401.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1098. this.ShowInDockPanel(frm0401);
  1099. }
  1100. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.LoadCar))
  1101. {
  1102. //生产管理-装窑车
  1103. F_PM_0501 frm0501 = F_PM_0501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1104. this.ShowInDockPanel(frm0501);
  1105. }
  1106. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.Normal))
  1107. {
  1108. if (Convert.ToInt32(sub[2]) == 1) // 计件模式
  1109. {
  1110. F_PM_0301 frm0301 = F_PM_0301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1111. this.ShowInDockPanel(frm0301);
  1112. }
  1113. else if (Convert.ToInt32(sub[2]) == 2) // 半成品检验(标准检验)
  1114. {
  1115. F_PM_0901 frm0901 = F_PM_0901.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1116. this.ShowInDockPanel(frm0901);
  1117. }
  1118. }
  1119. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.IntoKiln))
  1120. {
  1121. //生产管理-入窑
  1122. F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1123. this.ShowInDockPanel(frm0601);
  1124. }
  1125. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.OutKiln))
  1126. {
  1127. //生产管理-出窑
  1128. F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1129. this.ShowInDockPanel(frm0601);
  1130. }
  1131. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.UnloadCar))
  1132. {
  1133. //生产管理-卸窑车
  1134. F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1135. this.ShowInDockPanel(frm0601);
  1136. }
  1137. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.CarAdd))
  1138. {
  1139. //生产管理-窑车补件
  1140. F_PM_0501 frm0501 = F_PM_0501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1141. this.ShowInDockPanel(frm0501);
  1142. }
  1143. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.AdobeStock))
  1144. {
  1145. //生产管理-坯库
  1146. F_PM_0301 frm0301 = F_PM_0301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1147. this.ShowInDockPanel(frm0301);
  1148. }
  1149. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.QualityStatistics))
  1150. {
  1151. //生产管理-成检(质量统计)
  1152. F_PM_1201 frm1201 = F_PM_1201.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1153. this.ShowInDockPanel(frm1201);
  1154. }
  1155. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.IntoKilnCheck))
  1156. {
  1157. //生产管理-入窑前检验
  1158. F_PM_1301 frm1301 = F_PM_1301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1159. this.ShowInDockPanel(frm1301);
  1160. }
  1161. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.SpecialRepair))
  1162. {
  1163. //生产管理-干补
  1164. F_PM_2001 frm2001 = F_PM_2001.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1165. this.ShowInDockPanel(frm2001);
  1166. }
  1167. else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.Recovery))
  1168. {
  1169. //生产管理-回收
  1170. F_PM_2501 frm2501 = F_PM_2501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
  1171. this.ShowInDockPanel(frm2501);
  1172. }
  1173. }
  1174. }
  1175. break;
  1176. #endregion
  1177. }
  1178. }
  1179. }
  1180. }
  1181. }
  1182. catch (Exception ex)
  1183. {
  1184. // 对异常进行共通处理
  1185. ExceptionManager.HandleEventException(this.ToString(),
  1186. MethodBase.GetCurrentMethod().Name, this.Text, ex);
  1187. }
  1188. }
  1189. /// <summary>
  1190. /// 展开全部节点
  1191. /// </summary>
  1192. /// <param name="sender"></param>
  1193. /// <param name="e"></param>
  1194. private void btnExpand_Click(object sender, EventArgs e)
  1195. {
  1196. TreeNode node = null;
  1197. if (this.trvMenu.SelectedNode != null)
  1198. {
  1199. node = this.trvMenu.SelectedNode;
  1200. this.trvMenu.SelectedNode = null;
  1201. }
  1202. else if (this.trvMenu.Nodes.Count > 0)
  1203. {
  1204. node = this.trvMenu.Nodes[0];
  1205. }
  1206. this.trvMenu.ExpandAll();
  1207. if (node != null)
  1208. {
  1209. this.trvMenu.SelectedNode = node;
  1210. }
  1211. this.trvMenu.Focus();
  1212. }
  1213. /// <summary>
  1214. /// 折叠全部节点
  1215. /// </summary>
  1216. /// <param name="sender"></param>
  1217. /// <param name="e"></param>
  1218. private void btnCollapse_Click(object sender, EventArgs e)
  1219. {
  1220. this.trvMenu.CollapseAll();
  1221. this.trvMenu.Focus();
  1222. }
  1223. /// <summary>
  1224. /// 设置按钮大小
  1225. /// </summary>
  1226. /// <param name="sender"></param>
  1227. /// <param name="e"></param>
  1228. private void trvMenu_SizeChanged(object sender, EventArgs e)
  1229. {
  1230. this.btnExpand.Width = this.trvMenu.Width / 2;
  1231. }
  1232. #endregion
  1233. #region 私有方法
  1234. /// <summary>
  1235. /// 设置窗体按钮的文本信息
  1236. /// </summary>
  1237. private void SetFromTitleInfo()
  1238. {
  1239. this.Text = FormTitles.F_SYS_0202;
  1240. }
  1241. /// <summary>
  1242. /// 获取用户菜单的一级菜单
  1243. /// </summary>
  1244. /// <param name="treeTable">用户菜单数据集</param>
  1245. /// <returns>一级菜单字典</returns>
  1246. private Dictionary<string, string> InitNavigationButtons(DataTable treeTable)
  1247. {
  1248. try
  1249. {
  1250. Dictionary<string, string> dicTemp = new Dictionary<string, string>();
  1251. DataRow[] navigationRows = treeTable.Select("LEN(FunctionCode) = " + Constant.INT_IS_TWO.ToString()); // 编号2为一级菜单
  1252. foreach (DataRow newRow in navigationRows)
  1253. {
  1254. string funcName = newRow["FunctionName"].ToString();
  1255. string funcCode = newRow["FunctionCode"].ToString();
  1256. if (!dicTemp.ContainsKey(funcCode))
  1257. {
  1258. dicTemp.Add(funcCode, funcName);
  1259. }
  1260. }
  1261. return dicTemp;
  1262. }
  1263. catch (Exception ex)
  1264. {
  1265. throw ex;
  1266. }
  1267. }
  1268. /// <summary>
  1269. /// 初始化树形控件
  1270. /// </summary>
  1271. /// <param name="treeTable">菜单数据表</param>
  1272. /// <param name="rows">待处理的菜单集合</param>
  1273. /// <param name="node">当前树节点</param>
  1274. private void InitTreeView(DataTable treeTable, DataRow[] rows, TreeNode node)
  1275. {
  1276. foreach (DataRow row in rows)
  1277. {
  1278. TreeNode sNode;
  1279. if (node == null)
  1280. {
  1281. sNode = new TreeNode();
  1282. sNode.Text = row["FunctionName"].ToString();
  1283. sNode.Name = row["FunctionCode"].ToString();
  1284. //xuwei add 2019-11-28
  1285. sNode.Tag = row["Url"].ToString();
  1286. //xuwei end
  1287. if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(row["FunctionFlag"].ToString().Trim()))
  1288. {
  1289. sNode.ImageIndex = Constant.INT_IS_ONE;
  1290. sNode.SelectedImageIndex = Constant.INT_IS_ONE;
  1291. }
  1292. this.trvMenu.Nodes.Add(sNode);
  1293. }
  1294. else
  1295. {
  1296. sNode = node.Nodes.Add(row["FunctionName"].ToString());
  1297. sNode.Name = row["FunctionCode"].ToString();
  1298. #region 陈冰 修改 增加工序类别和工序ID 2014-9-23
  1299. //node.Tag = nodeRoot["FunctionCode"].ToString();
  1300. //xuwei modify 2019-11-28
  1301. //sNode.Tag = row["ProcedureModeltype"].ToString() + "," + row["ProcedureID"].ToString() + "," + row["ProcedureModel"].ToString();
  1302. sNode.Tag = row["ProcedureModeltype"].ToString() + "," + row["ProcedureID"].ToString() + "," + row["ProcedureModel"].ToString()+"," + row["Url"].ToString();
  1303. //xuwei end
  1304. #endregion
  1305. if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(row["FunctionFlag"].ToString().Trim()))
  1306. {
  1307. sNode.ImageIndex = Constant.INT_IS_ONE;
  1308. sNode.SelectedImageIndex = Constant.INT_IS_ONE;
  1309. }
  1310. }
  1311. string filterExpression = "Functionlevel LIKE '" + row["Functionlevel"].ToString()
  1312. + "%' AND LEN(Functionlevel) = " + (row["Functionlevel"].ToString().Length + Constant.INT_IS_TWO);
  1313. DataRow[] subRows = treeTable.Select(filterExpression);
  1314. // 递归方法
  1315. InitTreeView(treeTable, subRows, sNode);
  1316. }
  1317. }
  1318. /// <summary>
  1319. /// 显示对应的页面中主窗体中
  1320. /// </summary>
  1321. /// <param name="dockPanelBaseForm">需要停靠的DockPanelBase</param>
  1322. private void ShowInDockPanel(DockPanelBase dockPanelBaseForm)
  1323. {
  1324. try
  1325. {
  1326. if (dockPanelBaseForm == null)
  1327. {
  1328. return;
  1329. }
  1330. dockPanelBaseForm.Show(_dockPanel, DockState.Document);
  1331. dockPanelBaseForm.Activate();
  1332. }
  1333. catch (Exception ex)
  1334. {
  1335. throw ex;
  1336. }
  1337. }
  1338. /// <summary>
  1339. /// 模态打开窗体
  1340. /// </summary>
  1341. /// <param name="formBase"></param>
  1342. private void ShowDialogForm(FormBase formBase)
  1343. {
  1344. try
  1345. {
  1346. if (formBase == null)
  1347. {
  1348. return;
  1349. }
  1350. formBase.ShowDialog();
  1351. }
  1352. catch (Exception ex)
  1353. {
  1354. throw ex;
  1355. }
  1356. }
  1357. private void InitNavigationTreeView(DataTable treeTable)
  1358. {
  1359. try
  1360. {
  1361. TreeNode node = null;
  1362. DataRow[] navigationRows = treeTable.Select
  1363. ("LEN(Functionlevel) = 2");
  1364. // 递归生成功能权限树
  1365. this.InitTreeView(treeTable, navigationRows, node);
  1366. }
  1367. catch (Exception ex)
  1368. {
  1369. throw ex;
  1370. }
  1371. }
  1372. #endregion
  1373. }
  1374. }