F_SYS_0202.cs 48 KB

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