F_SYS_0202.cs 48 KB

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