SMMNP01401_수술환자조회.xrw 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <KeyData>
  11. <patdata>
  12. <pid/>
  13. <pidname/>
  14. </patdata>
  15. </KeyData>
  16. </main>
  17. <send>
  18. <searchitem/>
  19. <flag/>
  20. <instcd/>
  21. <pid/>
  22. </send>
  23. <init>
  24. <searchitem/>
  25. <flag>
  26. <lable>환자번호</lable>
  27. <value>patid</value>
  28. </flag>
  29. <flag>
  30. <lable>환자명</lable>
  31. <value>patnm</value>
  32. </flag>
  33. </init>
  34. <popinfo>
  35. <refinfo>
  36. <serchitem/>
  37. </refinfo>
  38. </popinfo>
  39. </root>
  40. </instance>
  41. <script type="javascript" ev:event="xforms-ready">
  42. <![CDATA[
  43. fInitialize();
  44. ]]>
  45. </script>
  46. <submission id="TRMNP01402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/KeyData"/>
  47. </model>
  48. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  49. <script type="javascript">
  50. <![CDATA[
  51. /*
  52. 초기화 작업을 합니다.
  53. */
  54. function fInitialize(){
  55. // model.removeNodeset("/root/main/list/userlist");
  56. radio1.select(0);
  57. // ipt_search_item.currentText = SearchItem;
  58. model.refresh();
  59. }
  60. /*
  61. 버튼 컨트롤들을 클릭했을때 공통으로 타는 함수입니다.
  62. control : "search" 는 조회 버튼 클릭
  63. "init"은 신규 버튼 클릭
  64. "save"는 저장 버튼 클릭
  65. grid : 그리드 컨트롤을 넘겨줍니다.
  66. param : 기타 param을 넘겨줍니다.
  67. */
  68. function fClicked(control, grid, param){
  69. if ("search" == control){
  70. fSearchClick(grid, param);
  71. // model.resetInstanceNode("/root/send");
  72. } else if ("init" == control){
  73. model.reset();
  74. } else {
  75. messageBox("처리를 수행","E002");
  76. }
  77. model.refresh();
  78. }
  79. /*
  80. 조회버튼 클릭 타는 함수입니다.
  81. grid.explorerbar = "sortshow" sort설정합니다.
  82. ipt_usercdnm_flag는 검색조건의 사용자코드 or 사용자명입니다.
  83. radio1은 사용자코드 or 사용자명 선택 라디오 버튼입니다.
  84. submit을 날립니다.
  85. .
  86. */
  87. function fSearchClick(grid,param){
  88. var isearchitem = ipt_search_item.value;
  89. grid.explorerbar = "sortshow";
  90. model.removeNodeset("/root/main/KeyData");
  91. grid.rebuild();
  92. model.resetInstanceNode("/root/send");
  93. model.setValue("/root/send/searchitem", ipt_search_item.currentText+'%');
  94. model.setValue("/root/send/flag" , radio1.value);
  95. submit("TRMNP01402");
  96. }
  97. function fResetNode(node, destinationelement){
  98. // model.setValue(node + "/" + destinationelement, "");
  99. alert(model.elementName("/root/main/item"));
  100. }
  101. /*
  102. model.getValue(); 를 함수로 만들었습니다.
  103. param1 : node는 grid의 xPath입니다.
  104. param2 : row는 grid에서 선택한 row값입니다.
  105. param3 : element는 getvalue할 해당 element 명입니다.
  106. 해당 getvalue값을 return 해줍니다.
  107. return 하지 않으면 해당값을 가져올 수 없습니다.
  108. */
  109. function fGetValue(node, row, element) {
  110. var rtnValue = model.getValue(node + "[" + row + "]/" + element);
  111. return rtnValue;
  112. }
  113. /*
  114. model.setValue();를 함수로 만들었습니다.
  115. param1 : node는 setvalue할 컨트롤의 xPath입니다.
  116. param2 : destinationelement는 setvalue할 element명 입니다.
  117. param3 : sourceelement는 setvalue할 값입니다.
  118. */
  119. function fSetValue(node, destinationelement, sourceelement) {
  120. model.setValue(node + "/" + destinationelement, sourceelement);
  121. }
  122. function fDblclick(pRow) {
  123. var iParam="";
  124. var iNode = "/root/main/KeyData/patdata";
  125. var iParam_patid = fGetValue(iNode, pRow, "pid");
  126. var iParam_patnm = fGetValue(iNode, pRow, "pidname");
  127. iParam = iParam_patid +"|"+ iParam_patnm ;
  128. // alert(iParam);
  129. opener.javascript.setParameter("SendData", iParam);
  130. window.close();
  131. }
  132. ]]>
  133. </script>
  134. </xhtml:head>
  135. <xhtml:body pagewidth="510" pageheight="435" guideline="1,508;" style="border-color:#c7a3cf; ">
  136. <group id="group5" scroll="auto" style="left:0px; top:15px; width:505px; height:410px; border-color:#c7a3cf; border-style:solid; ">
  137. <group id="group2" style="left:-1px; top:14px; width:500px; height:35px; vertical-align:top; ">
  138. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:500px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  139. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:117px; height:17px; ">검색조건</caption>
  140. <button id="btn_search" class="btn1_letter2" style="left:430px; top:7px; width:56px; height:22px; ">
  141. <caption>조회</caption>
  142. <script type="javascript" ev:event="DOMActivate">
  143. <![CDATA[
  144. var param = ipt_search_item.currentText;
  145. // alert(ipt_search_item.attribute("ref"));
  146. fClicked("search", grd_userlist);
  147. ]]>
  148. </script>
  149. </button>
  150. <input id="ipt_search_item" ref="/root/init/searchitem" class="input_s_essential" style="left:285px; top:10px; width:122px; height:19px; ">
  151. <script type="javascript" ev:event="onkeypress">
  152. <![CDATA[
  153. if("13" == event.keyCode){
  154. btn_search.dispatch("DOMActivate");
  155. //fClicked("search", grd_userbaseinfo, param);
  156. }
  157. ]]>
  158. </script>
  159. </input>
  160. <select1 id="radio1" ref="/root/init" class="s" overflow="visible" appearance="full" cols="2" style="left:141px; top:10px; width:13px; height:13px; background-color:transparent; border-style:none; ">
  161. <choices>
  162. <itemset nodeset="/root/init/flag">
  163. <label ref="lable"/>
  164. <value ref="value"/>
  165. </itemset>
  166. </choices>
  167. </select1>
  168. </group>
  169. <caption id="caption9" class="tit_2" style="left:0px; top:57px; width:111px; height:14px; vertical-align:middle; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">수술환자조회</caption>
  170. <line id="line12" class="line_1" style="x1:-1px; y1:72px; x2:500px; y2:73px; "/>
  171. <datagrid id="grd_userlist" nodeset="/root/main/KeyData/patdata" caption="환자ID^환자명" colwidth="100, 356" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" style="left:-1px; top:74px; width:503px; height:334px; ">
  172. <col ref="pid"/>
  173. <col ref="pidname"/>
  174. <script type="javascript" ev:event="ondblclick">
  175. <![CDATA[
  176. var iRow = grd_userlist.row;
  177. fDblclick(iRow);
  178. ]]>
  179. </script>
  180. </datagrid>
  181. </group>
  182. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:440px; height:20px; ">수술환자조회</caption>
  183. </xhtml:body>
  184. </xhtml:html>