SPLQP00200_QC레벨조회.xrw 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>레벨 조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root>
  9. <main>
  10. <levllist>
  11. <chk/>
  12. <levlcd/>
  13. <levlnm/>
  14. </levllist>
  15. </main>
  16. <send>
  17. <deptflag/>
  18. <eqmtcd/>
  19. <testcd/>
  20. </send>
  21. <init>
  22. </init>
  23. <hidden>
  24. <ref>
  25. <levlcd/>
  26. <levlnm/>
  27. <levlcd2/>
  28. </ref>
  29. </hidden>
  30. </root>
  31. </instance>
  32. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  33. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  34. <script type="javascript" ev:event="xforms-ready">
  35. <![CDATA[
  36. if (checkOpener()) { //opener 검사
  37. var param = opener.javascript.getParameter("opener_parameter_id"); //opener parameter value를 get
  38. if(param != "") { // opener parameter value가 있는 경우
  39. //parameter value를 이용하여 프로그램 수행
  40. condarray = param.split("▦");
  41. model.setValue("/root/send/eqmtcd" , condarray[1]); //장비코드
  42. model.setValue("/root/send/deptflag" , condarray[2]); //사용자부서코드
  43. model.setValue("/root/send/testcd" , condarray[3]); //검사코드 코드▩코드▩코드▩코드▩코드▩ 체외에서 선택한 검사항목에 대한 레벨만 보여야 된다고 함-_-
  44. submit("TRLQP00113");
  45. }
  46. }
  47. grd_levlList.fixedcellcheckbox(0,0) = true;
  48. ]]>
  49. </script>
  50. <submission id="TRLQP00113" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/levllist"/>
  51. </model>
  52. <script type="javascript">
  53. <![CDATA[
  54. function fExeCancel() {
  55. window.close();
  56. }
  57. function fExeOut(){
  58. if (event.keyCode == "27") {
  59. fExeCancel();
  60. }
  61. }
  62. //확인
  63. function fAccept(){
  64. var levlnm = ""; //레벨명
  65. var levlcd = ""; //레벨코드
  66. var levlcd2 = ""; //레벨코드2(조회때 사용)
  67. for (i = 1; i < grd_levlList.rows; i++){
  68. if(model.getValue("/root/main/levllist[" + i + "]/chk" )== "1"){ //선택된 항목만 가져가기 위해..
  69. if (levlnm == ""){ //레벨명이 아직 비어있다면 그대로 값 저장
  70. levlnm = model.getValue("/root/main/levllist[" + i + "]/levlnm");
  71. levlcd = model.getValue("/root/main/levllist[" + i + "]/levlcd");
  72. levlcd2 = model.getValue("/root/main/levllist[" + i + "]/levlcd");
  73. }else { //검사명이 하나라도 추가 되어 있다면 ▦나 , 추가해서~
  74. levlnm = levlnm + ", " + model.getValue("/root/main/levllist[" + i + "]/levlnm"); //검사항목에 표시~
  75. levlcd = levlcd + "▦" + model.getValue("/root/main/levllist[" + i + "]/levlcd"); //요거는 여기저기서 씀.. 컬럼삭제, 생성, 그리고 서버단에서도 씀
  76. levlcd2 = levlcd2 + "', '" + model.getValue("/root/main/levllist[" + i + "]/levlcd"); //요거는 sql에서 levlcd in ()할라고..
  77. }
  78. }
  79. }
  80. model.setValue("/root/hidden/ref/levlcd", levlcd); //저장된 값을 보내주기 위해 노드에 저장
  81. model.setValue("/root/hidden/ref/levlnm", levlnm);
  82. model.setValue("/root/hidden/ref/levlcd2", levlcd2);
  83. model.copyNode(opener.root.hidden.ref.levllist, root.hidden.ref); //메인으로 보내준다~~
  84. //opener.model.refresh();
  85. fExeCancel(); //종료
  86. }
  87. ]]>
  88. </script>
  89. </xhtml:head>
  90. <xhtml:body pagewidth="270" pageheight="620" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  91. <group id="group1" style="left:0px; top:0px; width:250px; height:570px; ">
  92. <caption id="caption5" class="tit_2" style="left:5px; top:11px; width:150px; height:14px; ">레벨 조회</caption>
  93. <line id="line8" class="line_1" style="x1:0px; y1:26px; x2:250px; y2:26px; "/>
  94. <line id="line2" class="line_3" style="x1:250px; y1:570px; x2:250px; y2:570px; "/>
  95. <datagrid id="grd_levlList" nodeset="/root/main/levllist" caption="^레벨코드^레벨명" colsep="^" colwidth="30, 70, 150" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:30px; width:250px; height:540px; ">
  96. <col checkvalue="1,0" ref="chk" type="checkbox"/>
  97. <col ref="levlcd"/>
  98. <col ref="levlnm"/>
  99. </datagrid>
  100. </group>
  101. <group id="group2" style="left:0px; top:570px; width:250px; height:30px; ">
  102. <line id="line11" class="line_6" style="x1:0px; y1:30px; x2:0px; y2:30px; "/>
  103. <button id="btn_can" class="btn4_letter2" style="left:185px; top:5px; width:56px; height:22px; ">
  104. <caption>닫기</caption>
  105. <script type="javascript" ev:event="DOMActivate">
  106. <![CDATA[
  107. fExeCancel();
  108. ]]>
  109. </script>
  110. </button>
  111. <button id="btn_accept" class="btn4_letter2" style="left:128px; top:5px; width:56px; height:22px; ">
  112. <caption>확인</caption>
  113. <script type="javascript" ev:event="DOMActivate">
  114. <![CDATA[
  115. fAccept();
  116. ]]>
  117. </script>
  118. </button>
  119. </group>
  120. <script type="javascript" ev:event="onkeydown">
  121. <![CDATA[
  122. fExeOut();
  123. ]]>
  124. </script>
  125. </xhtml:body>
  126. </xhtml:html>