F_SYS_0202.cs 48 KB

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