SPAHB00100_공통코드선택.xrw 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPAHB00100.xrw
  4. * 설 명 : 공통코드선택
  5. * 설 계 자 : 손주연
  6. * 작 성 자 : 손주연
  7. * 작 성 일 : 2007.05.13
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <cdlst>
  20. <item>
  21. <cmpycd/>
  22. <cmpynm/>
  23. <cmpyid/>
  24. <cmpyno/>
  25. <inducsid/>
  26. <zipcd1/>
  27. <zipcd2/>
  28. <addr/>
  29. <detladdr/>
  30. <telno/>
  31. <remcnts/>
  32. </item>
  33. </cdlst>
  34. </main>
  35. <send>
  36. <srchcdnm/>
  37. <srchinstcd/>
  38. <srchcond>cd</srchcond>
  39. <srchflag/>
  40. </send>
  41. <init/>
  42. <hidden>
  43. </hidden>
  44. <target>
  45. <srchflag/>
  46. <srchcond/>
  47. <srchcdnm/>
  48. <srchinstcd/>
  49. <openerid/>
  50. </target>
  51. </root>
  52. </instance>
  53. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  55. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. model.setFocus("ipt_cdnm");
  59. model.removeNodeset("/root/main/cdlst/item");
  60. fInit();
  61. ]]>
  62. </script>
  63. <submission id="TRAHA00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/cdlst"/>
  64. </model>
  65. <script type="javascript">
  66. <![CDATA[
  67. function fInit(){
  68. if( checkOpener() ){
  69. model.setValue("/root/send/srchflag" , "/root/target/srchflag" );
  70. model.setValue("/root/send/srchcond" , "/root/target/srchcond" );
  71. model.setValue("/root/send/srchcdnm" , "/root/target/srchcdnm" );
  72. model.setValue("/root/send/srchinstcd" , "/root/target/srchinstcd" );
  73. if(model.getValue("/root/send/srchcdnm") != "" ) {
  74. fGetComCdList();
  75. }
  76. }
  77. }
  78. /**
  79. ** srchflag : 검색구분 공통코드 A0114참조
  80. ** 01 판정의
  81. ** 02 건강보험공단
  82. ** 03 관할군병원
  83. ** 04 산업안전공단
  84. ** 05 보건소
  85. ** 06 노동청
  86. ** 07 지도원
  87. ** 08 사업체
  88. */
  89. function fGetComCdList(){
  90. var vFlag = model.getValue("/root/send/srchflag");
  91. if( vFlag == "" ){
  92. model.setValue("/root/send/srchflag", "08");
  93. }
  94. if( model.getValue("/root/send/srchinstcd") == ""){
  95. model.setValue("/root/send/srchinstcd", getUserInfo("dutplceinstcd"));
  96. }
  97. submit("TRAHA00105");
  98. }
  99. /**
  100. * opener id에 따른 분화
  101. */
  102. function fSetData(){
  103. if( checkOpener() ){
  104. var vOpener = model.getValue("/root/target/openerid");
  105. if( vOpener == "" ) return ;
  106. var idx = grd_cdlst.row;
  107. if( idx < 1) return ;
  108. var vFg = model.getValue("/root/send/srchflag");
  109. if( vOpener == "SMAHB00500" )//사업장계약정보
  110. {
  111. if( vFg == "08" ){
  112. copyNodeType("/root/main/coninfo/cmpyinfo/item", "/root/main/cdlst/item[" + idx + "]", "replace", opener.model, model );
  113. }
  114. }
  115. }
  116. }
  117. ]]>
  118. </script>
  119. </xhtml:head>
  120. <xhtml:body pagewidth="534" pageheight="543" guideline="1,1194;1,517;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  121. <group id="group3" scroll="auto" style="left:0px; top:0px; width:518px; height:515px; ">
  122. <datagrid id="grd_cdlst" nodeset="/root/main/cdlst/item" caption="코드^코드명" colsep="^" colwidth="83, 388" dataheight="25" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:49px; width:517px; height:463px; ">
  123. <col ref="cmpycd"/>
  124. <col ref="cmpynm"/>
  125. <script type="javascript" ev:event="ondblclick">
  126. <![CDATA[
  127. fSetData();
  128. ]]>
  129. </script>
  130. <script type="javascript" ev:event="onaftersort">
  131. <![CDATA[
  132. grd_cdlst.gridToInstance();
  133. ]]>
  134. </script>
  135. </datagrid>
  136. <group id="group2" style="left:0px; top:0px; width:517px; height:40px; vertical-align:top; ">
  137. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:517px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  138. <caption id="caption2" class="search_name" style="left:16px; top:12px; width:86px; height:17px; ">검색조건 :</caption>
  139. <button id="btn_search" class="btn1_letter2" style="left:445px; top:12px; width:56px; height:22px; ">
  140. <caption>조회</caption>
  141. <script type="javascript" ev:event="DOMActivate">
  142. <![CDATA[
  143. fGetComCdList();
  144. ]]>
  145. </script>
  146. </button>
  147. <line id="line13" style="x1:429px; y1:11px; x2:429px; y2:32px; border-color:#ffe4bb; border-left-style:solid; "/>
  148. <select1 id="cmb_srchcond2" ref="/root/send/srchcond" class="combo_search" appearance="minimal" style="left:105px; top:11px; width:80px; height:19px; ">
  149. <choices>
  150. <item>
  151. <label>코드</label>
  152. <value>cd</value>
  153. </item>
  154. <item>
  155. <label>명칭</label>
  156. <value>nm</value>
  157. </item>
  158. </choices>
  159. <script type="javascript" ev:event="xforms-select">
  160. <![CDATA[
  161. model.setFocus("ipt_cdnm");
  162. ]]>
  163. </script>
  164. </select1>
  165. <input id="ipt_cdnm" ref="/root/send/srchcdnm" class="input_search" style="left:188px; top:11px; width:227px; height:19px; ">
  166. <script type="javascript" ev:event="onkeyup">
  167. <![CDATA[
  168. inputEnterKey("btn_search", "DOMActivate");
  169. ]]>
  170. </script>
  171. </input>
  172. </group>
  173. <line id="line1" class="line_1" style="x1:0px; y1:46px; x2:517px; y2:46px; "/>
  174. </group>
  175. <group id="group4" scroll="auto" style="left:0px; top:515px; width:517px; height:28px; ">
  176. <button id="button9" class="btn4_letter2" style="left:461px; top:3px; width:56px; height:22px; ">
  177. <caption>취소</caption>
  178. <close ev:event="onclick"/>
  179. </button>
  180. <button id="button4" class="btn4_letter2" style="left:402px; top:3px; width:56px; height:22px; ">
  181. <caption>확인</caption>
  182. <script type="javascript" ev:event="DOMActivate">
  183. <![CDATA[
  184. fSetData();
  185. window.close();
  186. ]]>
  187. </script>
  188. </button>
  189. </group>
  190. </xhtml:body>
  191. </xhtml:html>