F_SYS_0202.cs 48 KB

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