123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>외부자료등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <trgdatagrid>
- <outdata>
- <sel/>
- </outdata>
- </trgdatagrid>
- </main>
- <send/>
- <init/>
- <hidden>
- <filename/>
- <datasel/>
- <drugcode>
- <caption/>
- <cols/>
- </drugcode>
- <drugcnst>
- <caption>선택^약품코드^한글약품명^영문약품명^성분 및 함량^효능 및 효과^제형이름^동효약^동종약^제약회사^사진^색상이름^문자1^문자2^문양1^문양2^모양^장축^단축^두꼐^분할선뒤^분할선앞</caption>
- <cols>drugcd^hngnm^engnm^comcnts^efcysmm^drugtype^samedrug^homodrugflag^prodcmpynm^photyn^color^char1^char2^shape1^shape2^shapecd^longax^shrtax^thick^divline1^divline2</cols>
- </drugcnst>
- </hidden>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- function fAddCol( colCnt, nodeset, copyNodeset, pGrid, coltype )
- {
- var oldColCnt = parseInt(pGrid.cols);
- var caption = model.getValue(copyNodeset+"/caption");
- var colsArray = model.getValue(copyNodeset+"/cols").split("^");
- var cols = pGrid.cols- pGrid.fixedCols;
-
- for(var i = 0; i <cols-1; i++){
- pGrid.removeColumn(false);
- }
-
- model.removeNodeset("/root/main/trgdatagrid");
- model.makeNode("/root/main/trgdatagrid/outdata/");
- model.makeNode("/root/main/trgdatagrid/outdata/sel");
-
- for ( i=0; i<colCnt; i++)
- {
- if ( coltype == null || coltype=="" )
- coltype = "output";
- //컬럼 생성
- pGrid.addColumn("ref:"+colsArray[i]+"; type:"+coltype+";",false);
-
- //model.copyNode("/root/main/outdata", "/root/hidden/drug");
- //copynode할 원본 노드셋에도 생성된 자식 노드 추가
- //model.makeNode(copyNodeset+"/" +(nodename + oldColCnt));
- }
- //캡션 수정
- pGrid.caption = caption;
- model.refresh();
- }
- ]]>
- </script>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:106px; height:14px; ">외부자료등록</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <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; ">
- <col ref="sel2" type="checkbox"/>
- <col/>
- </datagrid>
- <group id="group2" style="left:0px; top:5px; width:1195px; height:40px; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
- <button id="button37" class="btn1_letter2" style="left:1129px; top:9px; width:56px; height:22px; ">
- <caption>조회</caption>
- </button>
- <caption id="caption1" class="search_name" style="left:15px; top:10px; width:86px; height:17px; ">자료구분 :</caption>
- <line id="line13" style="x1:1115px; y1:10px; x2:1115px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
- <select1 id="cmb_datasel" ref="/root/hidden/datasel" class="combo_s_essential" appearance="minimal" style="left:100px; top:10px; width:100px; height:19px; ">
- <choices>
- <item>
- <label>약품코드</label>
- <value>01</value>
- </item>
- <item>
- <label>병용금기</label>
- <value>02</value>
- </item>
- <item>
- <label>약품편람</label>
- <value>03</value>
- </item>
- <item>
- <label>약품식별</label>
- <value>04</value>
- </item>
- <item>
- <label>복약기준</label>
- <value>05</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- if(cmb_datasel.value == 01){
- fAddCol(21, "/root/main/trgdatagrid/outdata", "/root/hidden/drugcode", datagrid1, "input");
- }else if(cmb_datasel.value == 02){
- alert("병용금기");
- }else if(cmb_datasel.value ==03){
- alert("약품편람");
- }else if(cmb_datasel.value == 04){
- fAddCol(21, "/root/main/trgdatagrid/outdata", "/root/hidden/drugcnst", datagrid1, "input");
- }else if(cmb_datasel.value == 05){
- }
- ]]>
- </script>
- </select1>
- <button id="button61" class="icon_search" style="left:480px; top:10px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var file = window.fileDialog("open", ",", false, "","xls", "ExcelFiles(*.xls)|*xls");
- /*
-
- model.setValue("/root/hidden/filename", filename);
- model.refresh();
- */
- alert(file);
- var tmp = file.split("\\");
- var filename = tmp[tmp.length-1];
- model.setValue("/root/hidden/filename", filename);
- datagrid1.loadExcel(file);
- //datagrid1.deleteRow(1);
- //model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption6" class="search_name" style="left:275px; top:10px; width:86px; height:17px; ">파일찾기 :</caption>
- <input id="input5" ref="/root/hidden/filename" class="input_search" style="left:365px; top:10px; width:110px; height:19px; "/>
- </group>
- <caption id="caption22" class="tit_2" style="left:5px; top:55px; width:216px; height:13px; ">대상</caption>
- <line id="line1" class="line_1" style="x1:1px; y1:68px; x2:1194px; y2:68px; "/>
- <caption id="caption15" class="tit_2" style="left:5px; top:375px; width:216px; height:13px; ">결과</caption>
- <line id="line2" class="line_1" style="x1:1px; y1:390px; x2:1194px; y2:390px; "/>
- <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; ">
- <col ref="sel" type="checkbox"/>
- </datagrid>
- <button id="button1" class="icon_bottom" style="left:560px; top:345px; width:26px; height:19px; ">
- <caption/>
- </button>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="button42" class="btn4_letter2" style="left:1138px; top:5px; width:56px; height:22px; ">
- <caption>실행</caption>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|