SPAHA00500_기관코드선택.xrw 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPAHA00500.xrw
  4. * 설 명 : 기관코드선택
  5. * 설 계 자 : 손주연
  6. * 작 성 자 : 손주연
  7. * 작 성 일 : 2007.05.13
  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. <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. <desxpathcd/>
  51. <desxpathnm/>
  52. </target>
  53. </root>
  54. </instance>
  55. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  56. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  57. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  58. <script type="javascript" ev:event="xforms-ready">
  59. <![CDATA[
  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. /**
  68. * SPAHA00500_PARAM1 : 코드구분 공통코드 A0114참조
  69. * SPAHA00500_PARAM2 : 검색구분(cd/nm)
  70. * SPAHA00500_PARAM3 : 검색조건(코드/명칭)
  71. * SPAHA00500_PARAM4 : 기관코드
  72. * SPAHA00500_PARAM5 : openerid
  73. * SPAHA00500_PARAM6 : code값을 setting할 목적노드
  74. * SPAHA00500_PARAM7 : name값을 setting할 목적노드
  75. */
  76. function fInit(){
  77. model.removeNodeset("/root/main/cdlst/item");
  78. if( checkOpener() ){
  79. model.setValue("/root/send/srchflag" , opener.javascript.getParameter("SPAHA00500_PARAM1"));
  80. model.setValue("/root/send/srchcond" , opener.javascript.getParameter("SPAHA00500_PARAM2"));
  81. model.setValue("/root/send/srchcdnm" , opener.javascript.getParameter("SPAHA00500_PARAM3"));
  82. model.setValue("/root/send/srchinstcd" , opener.javascript.getParameter("SPAHA00500_PARAM4"));
  83. if(model.getValue("/root/send/srchcdnm") != "" ) {
  84. fGetComCdList();
  85. }
  86. }
  87. model.setFocus("ipt_cdnm");
  88. model.refresh();
  89. }
  90. /**
  91. ** srchflag : 검색구분 공통코드 A0114참조
  92. ** 01 판정의
  93. ** 02 건강보험공단
  94. ** 03 관할군병원
  95. ** 04 산업안전공단
  96. ** 05 보건소
  97. ** 06 노동청
  98. ** 07 지도원
  99. ** 08 사업체
  100. */
  101. function fGetComCdList(){
  102. var vFlag = model.getValue("/root/send/srchflag");
  103. if( vFlag == "" ){
  104. model.setValue("/root/send/srchflag", "08");
  105. }
  106. if( model.getValue("/root/send/srchinstcd") == ""){
  107. model.setValue("/root/send/srchinstcd", getUserInfo("dutplceinstcd"));
  108. }
  109. submit("TRAHA00105");
  110. //만료된 기간 색 표시
  111. grd_cdlst.rebuildStyle();
  112. for(var i = 1; i<grd_cdlst.rows; i++){
  113. if(grd_cdlst.valueMatrix(i, grd_cdlst.colRef("expireyn")) == "Y"){
  114. grd_cdlst.rowStyle(i, "data", "color") = "#ff0000";
  115. }
  116. }
  117. }
  118. /**
  119. * opener id에 따른 분화
  120. */
  121. function fSetData(){
  122. if( checkOpener() ){
  123. var vOpener = opener.javascript.getParameter("SPAHA00500_PARAM5") ;
  124. if( vOpener == "" ) return ;
  125. var idx = grd_cdlst.row;
  126. if( idx < 1) return ;
  127. var vFg = model.getValue("/root/send/srchflag");
  128. if(( vOpener == "SMAHB00500") && ( vFg == "08" ) )//사업장계약정보
  129. {
  130. copyNodesetType("/root/main/coninfo/cmpyinfo/item", "/root/main/cdlst/item[" + idx + "]", "replace", opener.model, model );
  131. }
  132. else{
  133. var desCd = opener.javascript.getParameter("SPAHA00500_PARAM6") ;
  134. var desNm = opener.javascript.getParameter("SPAHA00500_PARAM7") ;
  135. opener.model.makeNode(desCd);
  136. opener.model.makeNode(desNm);
  137. opener.model.setValue( desCd , model.getValue("/root/main/cdlst/item[" + idx + "]/cmpycd" ) );
  138. opener.model.setValue(desNm, model.getValue("/root/main/cdlst/item[" + idx + "]/cmpynm" ) );
  139. }
  140. opener.model.refresh();
  141. }
  142. }
  143. ]]>
  144. </script>
  145. </xhtml:head>
  146. <xhtml:body pagewidth="534" pageheight="543" guideline="1,1194;1,517;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  147. <group id="group3" scroll="auto" style="left:0px; top:0px; width:518px; height:515px; ">
  148. <datagrid id="grd_cdlst" nodeset="/root/main/cdlst/item" caption="코드^코드명^기관종료여부" colsep="^" colwidth="83, 384, 100" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:49px; width:517px; height:463px; ">
  149. <col ref="cmpycd"/>
  150. <col ref="cmpynm"/>
  151. <col ref="expireyn" visibility="hidden"/>
  152. <script type="javascript" ev:event="ondblclick">
  153. <![CDATA[
  154. fSetData();
  155. window.close();
  156. ]]>
  157. </script>
  158. </datagrid>
  159. <group id="group2" style="left:0px; top:0px; width:517px; height:40px; vertical-align:top; ">
  160. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:517px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  161. <caption id="caption2" class="search_name" style="left:16px; top:12px; width:86px; height:17px; ">검색조건 :</caption>
  162. <button id="btn_search" class="btn1_letter2" style="left:445px; top:12px; width:56px; height:22px; ">
  163. <caption>조회</caption>
  164. <script type="javascript" ev:event="DOMActivate">
  165. <![CDATA[
  166. fGetComCdList();
  167. ]]>
  168. </script>
  169. </button>
  170. <line id="line13" style="x1:429px; y1:11px; x2:429px; y2:32px; border-color:#ffe4bb; border-left-style:solid; "/>
  171. <select1 id="cmb_srchcond2" ref="/root/send/srchcond" class="combo_search" appearance="minimal" style="left:105px; top:11px; width:80px; height:19px; ">
  172. <choices>
  173. <item>
  174. <label>코드</label>
  175. <value>cd</value>
  176. </item>
  177. <item>
  178. <label>명칭</label>
  179. <value>nm</value>
  180. </item>
  181. </choices>
  182. <script type="javascript" ev:event="xforms-select">
  183. <![CDATA[
  184. model.setFocus("ipt_cdnm");
  185. ]]>
  186. </script>
  187. </select1>
  188. <input id="ipt_cdnm" ref="/root/send/srchcdnm" class="input_search" style="left:188px; top:11px; width:227px; height:19px; ">
  189. <script type="javascript" ev:event="onkeyup">
  190. <![CDATA[
  191. inputEnterKey("btn_search", "DOMActivate");
  192. ]]>
  193. </script>
  194. </input>
  195. </group>
  196. <line id="line1" class="line_1" style="x1:0px; y1:46px; x2:517px; y2:46px; "/>
  197. </group>
  198. <group id="group4" scroll="auto" style="left:0px; top:515px; width:517px; height:28px; ">
  199. <button id="button9" class="btn4_letter2" style="left:461px; top:3px; width:56px; height:22px; ">
  200. <caption>취소</caption>
  201. <close ev:event="onclick"/>
  202. </button>
  203. <button id="button4" class="btn4_letter2" style="left:402px; top:3px; width:56px; height:22px; ">
  204. <caption>확인</caption>
  205. <script type="javascript" ev:event="DOMActivate">
  206. <![CDATA[
  207. fSetData();
  208. window.close();
  209. ]]>
  210. </script>
  211. </button>
  212. <caption id="caption1" style="left:5px; top:5px; width:360px; height:20px; font-weight:bold; color:#0000ff; ">
  213. <![CDATA[※ 붉은 글씨는 기간 만료된 기관입니다.
  214. ]]>
  215. </caption>
  216. </group>
  217. </xhtml:body>
  218. </xhtml:html>