SMRTH01130_증명서전자직인관리.xrw 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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>증명서 전자직인 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <imgdata>
  11. <photimg/>
  12. </imgdata>
  13. <imgviewlist>
  14. <instcd/>
  15. <photimg/>
  16. </imgviewlist>
  17. </main>
  18. <send>
  19. <issinstcd/>
  20. <imgviewlist/>
  21. </send>
  22. <init/>
  23. <hidden/>
  24. <temp/>
  25. </root>
  26. </instance>
  27. <script type="javascript" ev:event="xforms-ready">
  28. <![CDATA[
  29. fCheckAuth();
  30. model.removeNodeset(grd_imgviewlist.nodeset);
  31. misfMsterDetailSet(grd_imgviewlist, null, "TRRTH01130" ,"Y");
  32. //misfComboComCdList("R0305", "cmb_issinstcd_search", "Y");
  33. misfComboComCdListMulti("R0305", "cmb_issinstcd_search");
  34. addComboItem( "cmb_issinstcd_search", "가톨릭중앙의료원", "001", "above");
  35. ]]>
  36. </script>
  37. <script type="javascript">
  38. <![CDATA[
  39. //========================================================================================
  40. //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
  41. //========================================================================================
  42. function fCheckAuth() {
  43. btn_search.disabled = !checkAuth("R") ;
  44. btn_save.disabled = !checkAuth("X") ;
  45. }
  46. function fChangeImage(imgsrc) {
  47. img_hidden.src = imgsrc; // 파일에서 읽은 이미지의 base64 encoding 값을 가져오기 위한 이미지 컨트롤
  48. var data = img_hidden.getbase64data(); // base64 encoding 문자열을 가져온다.
  49. model.setValue("/root/main/imgdata/photimg",data,true); // 이미지를 보여주기 위하여 view용 이미지컨트롤의 ref instance에 값을 저장
  50. setImageRefInstance("/root/main/imgdata/photimg"); //base64 encoding 문자열을 이미지로 변환하여 보여준다,
  51. img_view.attribute("width")= "117";
  52. img_view.attribute("height")= "115";
  53. var cur_rows = grd_imgviewlist.rows;
  54. var instcd=model.getValue("/root/send/issinstcd");
  55. var imginstcd=model.getValue("/root/main/imgviewlist[1]/instcd");
  56. if(img_hidden.src != "../../../com/commonweb/images/no_image.gif" && imginstcd == ""){//이미지추가시 그리드 추가
  57. grd_imgviewlist.addrow(); // 입력할 행 추가.
  58. cur_row = grd_imgviewlist.row; // 추가된 행 번호 가져오기
  59. // 그리드에 추가
  60. model.setValue("/root/main/imgviewlist["+cur_row+"]/instcd",instcd);
  61. model.setValue("/root/main/imgviewlist["+cur_row+"]/photimg",data,true);
  62. }else if(img_hidden.src != "../../../com/commonweb/images/no_image.gif" && imginstcd != ""){//업데이트시 그리드셋팅
  63. grd_imgviewlist.addStatus(1,"update");
  64. model.setValue("/root/main/imgviewlist[1]/instcd",instcd);
  65. model.setValue("/root/main/imgviewlist[1]/photimg",data,true);
  66. }
  67. model.refresh();
  68. }
  69. function fRetrImage() {//조회시 그리드에 base64 encoding data셋팅하고 사진이미지 보여준다.
  70. if (grd_imgviewlist.Rows <= grd_imgviewlist.fixedRows) {
  71. fChangeImage("../../../com/commonweb/images/no_image.gif");//초기 이미지설정
  72. }
  73. else {
  74. for( var i = grd_imgviewlist.fixedRows ; i < grd_imgviewlist.Rows ; i++ ) {
  75. var imgdata = model.getValue("/root/main/imgviewlist["+i+"]/photimg"); // base64 encoding 문자열을 가져온다.
  76. model.setValue("/root/main/imgdata/photimg", imgdata,true);
  77. setImageRefInstance("/root/main/imgdata/photimg");
  78. }
  79. grd_imgviewlist.rebuild();
  80. }
  81. model.refresh();
  82. }
  83. ]]>
  84. </script>
  85. <submission id="TRRTH01130" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/imgviewlist"/>
  86. <submission id="TXRTH01130" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  87. </model>
  88. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  90. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  91. </xhtml:head>
  92. <xhtml:body>
  93. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  94. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">증명서 전자직인 관리</caption>
  95. </group>
  96. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  97. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:30; background-color:#fffbf2; border-color:#ffd799; "/>
  98. <caption id="caption2" class="search_name" style="left:15px; top:16px; width:151px; height:17px; ">기관선택 :</caption>
  99. <line id="line207" class="line_1" style="x1:0px; y1:65; x2:1195px; y2:65; "/>
  100. <button id="btn_search" class="btn1_letter2" navindex="8" style="left:1125px; top:14; width:56px; height:22px; text-align:left; ">
  101. <caption>조회</caption>
  102. <script type="javascript" ev:event="DOMActivate">
  103. <![CDATA[
  104. submit("TRRTH01130"); //직인이미지
  105. fRetrImage();
  106. ]]>
  107. </script>
  108. </button>
  109. <line id="line2" class="line_4" style="x1:1110px; y1:18px; x2:1110px; y2:30; border-color:#ffe4bb; border-left-style:solid; "/>
  110. <select1 id="cmb_issinstcd_search" ref="/root/send/issinstcd" class="combo_s_essential" appearance="minimal" style="left:104px; top:15px; width:159px; height:19px; ">
  111. <choices>
  112. <itemset>
  113. <label/>
  114. <value/>
  115. </itemset>
  116. </choices>
  117. </select1>
  118. <caption id="caption172" class="cell_1" style="left:10px; top:79px; width:127px; height:123px; vertical-align:middle; "/>
  119. <button id="btn_fileupload" class="btn2_letter9" style="left:13px; top:213px; width:119px; height:19px; text-align:center; ">
  120. <caption>직 인 변 경</caption>
  121. <script type="javascript" ev:event="DOMActivate">
  122. <![CDATA[
  123. var instcd=model.getValue("/root/send/issinstcd");
  124. if(instcd == ""){
  125. messageBox("기관을 ","C002");
  126. return;
  127. }
  128. var file = openImageFileDialog(1048576); // image 파일이 너무 크면 submit 시간이 매우 오래(5분이상) 걸리므로 가급적 사이즈를 작게 제한한다.
  129. if (file == "") {
  130. return;
  131. }
  132. fChangeImage(file);
  133. model.refresh();
  134. ]]>
  135. </script>
  136. </button>
  137. <img id="img_view" ref="/root/main/imgdata/photimg" style="left:15px; top:83px; width:117px; height:115px; background-stretch:stretch; "/>
  138. <img id="img_hidden" visibility="hidden" style="left:15px; top:83px; width:117px; height:115px; "/>
  139. <datagrid id="grd_imgviewlist" nodeset="/root/main/imgviewlist" visibility="hidden" caption="기관코드^직인이미지" colsep="^" colwidth="100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:245px; top:125px; width:240px; height:50px; ">
  140. <col ref="instcd"/>
  141. <col ref="photimg" style="background-stretch:stretch; "/>
  142. </datagrid>
  143. </group>
  144. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  145. <button id="button16" class="btn3_letter4" visibility="hidden" style="left:0px; top:3; width:80px; height:22px; ">
  146. <caption>화면이동</caption>
  147. </button>
  148. <line id="line1" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  149. <button id="btn_save" class="btn4_letter2" style="left:1139px; top:3px; width:56px; height:22px; ">
  150. <caption>저장</caption>
  151. <script type="javascript" ev:event="DOMActivate">
  152. <![CDATA[
  153. misfSave("TXRTH01130");
  154. ]]>
  155. </script>
  156. </button>
  157. </group>
  158. </xhtml:body>
  159. </xhtml:html>