SMADB01700_외부자료등록.xrw 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <trgdatagrid>
  11. <outdata>
  12. <sel/>
  13. </outdata>
  14. </trgdatagrid>
  15. </main>
  16. <send/>
  17. <init/>
  18. <hidden>
  19. <filename/>
  20. <datasel/>
  21. <drugcode>
  22. <caption/>
  23. <cols/>
  24. </drugcode>
  25. <drugcnst>
  26. <caption>선택^약품코드^한글약품명^영문약품명^성분 및 함량^효능 및 효과^제형이름^동효약^동종약^제약회사^사진^색상이름^문자1^문자2^문양1^문양2^모양^장축^단축^두꼐^분할선뒤^분할선앞</caption>
  27. <cols>drugcd^hngnm^engnm^comcnts^efcysmm^drugtype^samedrug^homodrugflag^prodcmpynm^photyn^color^char1^char2^shape1^shape2^shapecd^longax^shrtax^thick^divline1^divline2</cols>
  28. </drugcnst>
  29. </hidden>
  30. </root>
  31. </instance>
  32. <script type="javascript">
  33. <![CDATA[
  34. function fAddCol( colCnt, nodeset, copyNodeset, pGrid, coltype )
  35. {
  36. var oldColCnt = parseInt(pGrid.cols);
  37. var caption = model.getValue(copyNodeset+"/caption");
  38. var colsArray = model.getValue(copyNodeset+"/cols").split("^");
  39. var cols = pGrid.cols- pGrid.fixedCols;
  40. for(var i = 0; i <cols-1; i++){
  41. pGrid.removeColumn(false);
  42. }
  43. model.removeNodeset("/root/main/trgdatagrid");
  44. model.makeNode("/root/main/trgdatagrid/outdata/");
  45. model.makeNode("/root/main/trgdatagrid/outdata/sel");
  46. for ( i=0; i<colCnt; i++)
  47. {
  48. if ( coltype == null || coltype=="" )
  49. coltype = "output";
  50. //컬럼 생성
  51. pGrid.addColumn("ref:"+colsArray[i]+"; type:"+coltype+";",false);
  52. //model.copyNode("/root/main/outdata", "/root/hidden/drug");
  53. //copynode할 원본 노드셋에도 생성된 자식 노드 추가
  54. //model.makeNode(copyNodeset+"/" +(nodename + oldColCnt));
  55. }
  56. //캡션 수정
  57. pGrid.caption = caption;
  58. model.refresh();
  59. }
  60. ]]>
  61. </script>
  62. </model>
  63. </xhtml:head>
  64. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  65. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  66. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:106px; height:14px; ">외부자료등록</caption>
  67. </group>
  68. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  69. <datagrid id="datagrid2" nodeset="/root/b" caption="선택^결과" colsep="^" colwidth="35, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:400px; width:1194px; height:342px; ">
  70. <col ref="sel2" type="checkbox"/>
  71. <col/>
  72. </datagrid>
  73. <group id="group2" style="left:0px; top:5px; width:1195px; height:40px; ">
  74. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  75. <button id="button37" class="btn1_letter2" style="left:1129px; top:9px; width:56px; height:22px; ">
  76. <caption>조회</caption>
  77. </button>
  78. <caption id="caption1" class="search_name" style="left:15px; top:10px; width:86px; height:17px; ">자료구분 :</caption>
  79. <line id="line13" style="x1:1115px; y1:10px; x2:1115px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  80. <select1 id="cmb_datasel" ref="/root/hidden/datasel" class="combo_s_essential" appearance="minimal" style="left:100px; top:10px; width:100px; height:19px; ">
  81. <choices>
  82. <item>
  83. <label>약품코드</label>
  84. <value>01</value>
  85. </item>
  86. <item>
  87. <label>병용금기</label>
  88. <value>02</value>
  89. </item>
  90. <item>
  91. <label>약품편람</label>
  92. <value>03</value>
  93. </item>
  94. <item>
  95. <label>약품식별</label>
  96. <value>04</value>
  97. </item>
  98. <item>
  99. <label>복약기준</label>
  100. <value>05</value>
  101. </item>
  102. </choices>
  103. <script type="javascript" ev:event="xforms-select">
  104. <![CDATA[
  105. if(cmb_datasel.value == 01){
  106. fAddCol(21, "/root/main/trgdatagrid/outdata", "/root/hidden/drugcode", datagrid1, "input");
  107. }else if(cmb_datasel.value == 02){
  108. alert("병용금기");
  109. }else if(cmb_datasel.value ==03){
  110. alert("약품편람");
  111. }else if(cmb_datasel.value == 04){
  112. fAddCol(21, "/root/main/trgdatagrid/outdata", "/root/hidden/drugcnst", datagrid1, "input");
  113. }else if(cmb_datasel.value == 05){
  114. }
  115. ]]>
  116. </script>
  117. </select1>
  118. <button id="button61" class="icon_search" style="left:480px; top:10px; width:16px; height:16px; ">
  119. <caption/>
  120. <script type="javascript" ev:event="DOMActivate">
  121. <![CDATA[
  122. var file = window.fileDialog("open", ",", false, "","xls", "ExcelFiles(*.xls)|*xls");
  123. /*
  124. model.setValue("/root/hidden/filename", filename);
  125. model.refresh();
  126. */
  127. alert(file);
  128. var tmp = file.split("\\");
  129. var filename = tmp[tmp.length-1];
  130. model.setValue("/root/hidden/filename", filename);
  131. datagrid1.loadExcel(file);
  132. //datagrid1.deleteRow(1);
  133. //model.refresh();
  134. ]]>
  135. </script>
  136. </button>
  137. <caption id="caption6" class="search_name" style="left:275px; top:10px; width:86px; height:17px; ">파일찾기 :</caption>
  138. <input id="input5" ref="/root/hidden/filename" class="input_search" style="left:365px; top:10px; width:110px; height:19px; "/>
  139. </group>
  140. <caption id="caption22" class="tit_2" style="left:5px; top:55px; width:216px; height:13px; ">대상</caption>
  141. <line id="line1" class="line_1" style="x1:1px; y1:68px; x2:1194px; y2:68px; "/>
  142. <caption id="caption15" class="tit_2" style="left:5px; top:375px; width:216px; height:13px; ">결과</caption>
  143. <line id="line2" class="line_1" style="x1:1px; y1:390px; x2:1194px; y2:390px; "/>
  144. <datagrid id="datagrid1" nodeset="/root/main/trgdatagrid/outdata" caption="선택" colsep="^" colwidth="100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:80px; width:1194px; height:250px; ">
  145. <col ref="sel" type="checkbox"/>
  146. </datagrid>
  147. <button id="button1" class="icon_bottom" style="left:560px; top:345px; width:26px; height:19px; ">
  148. <caption/>
  149. </button>
  150. </group>
  151. <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  152. <button id="button42" class="btn4_letter2" style="left:1138px; top:5px; width:56px; height:22px; ">
  153. <caption>실행</caption>
  154. </button>
  155. </group>
  156. </xhtml:body>
  157. </xhtml:html>