SPAHB00300_수가코드선택.xrw 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPAHB00300.xrw
  4. * 설 명 : 수가코드선택
  5. * 설 계 자 : 손주연
  6. * 작 성 자 : 손주연
  7. * 작 성 일 : 2007.07.01
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>수가코드선택</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <ocdlst>
  20. <item>
  21. <sel/>
  22. <calcscorcd/>
  23. <ordnm/>
  24. <hngnm/>
  25. <engnm/>
  26. <scoreamt/>
  27. <fromdd/>
  28. </item>
  29. </ocdlst>
  30. </main>
  31. <send>
  32. <srchcdnm/>
  33. <srchcond>cd</srchcond>
  34. </send>
  35. <init/>
  36. <hidden>
  37. </hidden>
  38. <temp/>
  39. </root>
  40. </instance>
  41. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  42. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  43. <script type="javascript" ev:event="xforms-ready">
  44. <![CDATA[
  45. fInit();
  46. ]]>
  47. </script>
  48. <submission id="TRAHB00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/ocdlst"/>
  49. </model>
  50. <script type="javascript">
  51. <![CDATA[
  52. /**
  53. * SPAHB00300_PARAM1 : 검색구분(cd/nm)
  54. * SPAHB00300_PARAM2 : 검색조건(코드/명칭)
  55. * SPAHB00300_PARAM3 : multiyn
  56. * SPAHB00300_PARAM4 : multi선택 시 setting할 목적노드
  57. * SPAHB00300_PARAM5 : code값을 setting할 목적노드
  58. * SPAHB00300_PARAM6 : name값을 setting할 목적노드
  59. * SPAHB00300_PARAM7 : 수가를 setting할 목적노드
  60. */ var vMultiYn = "";
  61. function fInit(){
  62. model.removeNodeset(grd_ocdlst.nodeset);
  63. if( checkOpener() ){
  64. opener.model.makeNode("/root/temp/okflag");
  65. model.makeValue("/root/send/srchcond" , opener.javascript.getParameter("SPAHB00300_PARAM1"));
  66. model.makeValue("/root/send/srchcdnm" , opener.javascript.getParameter("SPAHB00300_PARAM2"));
  67. vMultiYn = opener.javascript.getParameter("SPAHB00300_PARAM3");
  68. if( vMultiYn == "N" ) {
  69. grd_ocdlst.colHidden(1) = false;
  70. }
  71. if(model.getValue("/root/send/srchcdnm") != "" ) {
  72. fGetCalcScorCdList();
  73. }
  74. }
  75. model.setFocus("ipt_cdnm");
  76. model.refresh();
  77. }
  78. /**
  79. * 수가코드내역조회
  80. */
  81. function fGetCalcScorCdList(){
  82. if( ipt_cdnm.value.length < 2 ){
  83. messageBox("검색어를 두자이상 " , "C001");
  84. model.setFocus("ipt_cdnm");
  85. return ;
  86. }
  87. submit("TRAHB00104");
  88. }
  89. /**
  90. * opener id에 따른 분화
  91. */
  92. function fSetData(){
  93. if( checkOpener() ){
  94. var sDestXPath = opener.javascript.getParameter("SPAHB00300_PARAM4");
  95. var sDestXPathCd = opener.javascript.getParameter("SPAHB00300_PARAM5");
  96. var sDestXPathNm = opener.javascript.getParameter("SPAHB00300_PARAM6");
  97. var sDestXPathAmt = opener.javascript.getParameter("SPAHB00300_PARAM7");
  98. var idx = 0 ;
  99. if( vMultiYn == "N" ){
  100. idx = grd_ocdlst.row;
  101. if( idx < 1) return -1;
  102. opener.model.setValue( sDestXPathCd , model.getValue("/root/main/ocdlst/item[" + idx + "]/calcscorcd" ) );
  103. opener.model.setValue(sDestXPathNm, model.getValue("/root/main/ocdlst/item[" + idx + "]/ordnm" ) );
  104. opener.model.setValue(sDestXPathAmt, model.getValue("/root/main/ocdlst/item[" + idx + "]/scoreamt" ) );
  105. } if( vMultiYn == "U" ){
  106. idx = grd_ocdlst.row;
  107. opener.model.makeValue( "/root/tmp/sel/testnm" , model.getValue("/root/main/ocdlst/item[" + idx + "]/ordnm" ) );
  108. opener.model.makeValue( "/root/tmp/sel/testcd" , model.getValue("/root/main/ocdlst/item[" + idx + "]/calcscorcd" ) );
  109. } else {
  110. var nodeList = instance1.selectNodes(grd_ocdlst.nodeset + "[sel='Y']");
  111. if( nodeList.length > 0) {
  112. var rCSV = getNodeListCSV(nodeList);
  113. setCSVToNode("/root/temp", rCSV);
  114. copyNodeListType(sDestXPath, "/root/temp/list", "replace", opener.model, model );
  115. }
  116. else return -1;
  117. }
  118. opener.model.setValue("/root/temp/okflag", "ok");
  119. return 1;
  120. }
  121. }
  122. ]]>
  123. </script>
  124. </xhtml:head>
  125. <xhtml:body pagewidth="534" pageheight="543" guideline="1,1194;1,517;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  126. <group id="group3" scroll="auto" style="left:0px; top:0px; width:518px; height:515px; ">
  127. <datagrid id="grd_ocdlst" nodeset="/root/main/ocdlst/item" caption="선택^처방코드^시작일자^처방명^보험단가(종별가산)^구코드^한글명^영문명" colsep="^" colwidth="33, 71, 75, 178, 130, 83, 147, 100" dataheight="25" explorerbar="sortshow" extendlastcol="scroll" frozencols="3" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:49px; width:517px; height:463px; ">
  128. <col checkvalue="Y,N" ref="sel" type="checkbox"/>
  129. <col ref="calcscorcd"/>
  130. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  131. <col ref="ordnm"/>
  132. <col ref="scoreamt" format="#,###" style="text-align:right; "/>
  133. <col ref="oldordcd"/>
  134. <col ref="hngnm"/>
  135. <col ref="engnm"/>
  136. <script type="javascript" ev:event="ondblclick">
  137. <![CDATA[
  138. if( fSetData() == 1){
  139. window.close();
  140. }
  141. ]]>
  142. </script>
  143. <script type="javascript" ev:event="onaftersort">
  144. <![CDATA[
  145. grd_ocdlst.gridToInstance();
  146. ]]>
  147. </script>
  148. </datagrid>
  149. <group id="group2" style="left:0px; top:0px; width:517px; height:40px; vertical-align:top; ">
  150. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:517px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  151. <caption id="caption2" class="search_name" style="left:16px; top:12px; width:86px; height:17px; ">검색조건 :</caption>
  152. <button id="btn_search" class="btn1_letter2" style="left:445px; top:12px; width:56px; height:22px; ">
  153. <caption>조회</caption>
  154. <script type="javascript" ev:event="DOMActivate">
  155. <![CDATA[
  156. fGetCalcScorCdList();
  157. ]]>
  158. </script>
  159. </button>
  160. <line id="line13" style="x1:429px; y1:11px; x2:429px; y2:32px; border-color:#ffe4bb; border-left-style:solid; "/>
  161. <select1 id="cmb_srchcond2" ref="/root/send/srchcond" class="combo_search" appearance="minimal" style="left:105px; top:11px; width:80px; height:19px; ">
  162. <choices>
  163. <item>
  164. <label>코드</label>
  165. <value>cd</value>
  166. </item>
  167. <item>
  168. <label>구코드</label>
  169. <value>old</value>
  170. </item>
  171. <item>
  172. <label>처방명</label>
  173. <value>ordnm</value>
  174. </item>
  175. <item>
  176. <label>한글명</label>
  177. <value>hngnm</value>
  178. </item>
  179. <item>
  180. <label>영문명</label>
  181. <value>engnm</value>
  182. </item>
  183. </choices>
  184. <script type="javascript" ev:event="xforms-select">
  185. <![CDATA[
  186. model.setFocus("ipt_cdnm");
  187. ]]>
  188. </script>
  189. </select1>
  190. <input id="ipt_cdnm" ref="/root/send/srchcdnm" class="input_search" style="left:188px; top:11px; width:227px; height:19px; ">
  191. <script type="javascript" ev:event="onkeyup">
  192. <![CDATA[
  193. inputEnterKey("btn_search", "DOMActivate");
  194. ]]>
  195. </script>
  196. </input>
  197. </group>
  198. <line id="line1" class="line_1" style="x1:0px; y1:46px; x2:517px; y2:46px; "/>
  199. </group>
  200. <group id="group4" scroll="auto" style="left:0px; top:515px; width:517px; height:28px; ">
  201. <button id="button9" class="btn4_letter2" style="left:461px; top:3px; width:56px; height:22px; ">
  202. <caption>취소</caption>
  203. <script type="javascript" ev:event="DOMActivate">
  204. <![CDATA[
  205. if( checkOpener() ){
  206. opener.model.setValue("/root/temp/okflag", "");
  207. window.close();
  208. }
  209. ]]>
  210. </script>
  211. </button>
  212. <button id="button4" class="btn4_letter2" style="left:402px; top:3px; width:56px; height:22px; ">
  213. <caption>확인</caption>
  214. <script type="javascript" ev:event="DOMActivate">
  215. <![CDATA[
  216. if( fSetData() == 1){
  217. window.close();
  218. }
  219. ]]>
  220. </script>
  221. </button>
  222. </group>
  223. </xhtml:body>
  224. </xhtml:html>