F_SYS_0202.cs 48 KB

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