123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
- <xhtml:head>
- <xhtml:title>Medical Zone (약품정보)</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <druginfo>
- <codelist>
- <dgseq/>
- <instcd/>
- <dginsdate/>
- <dgtitle/>
- <dgbigo/>
- <filenm/>
- <filepath/>
- </codelist>
- </druginfo>
- </main>
- <send>
- <viewinfo>
- <viewlist>
- <dgseq/>
- <instcd/>
- <dginsdate/>
- <dgtitle/>
- <dgbigo/>
- <filenm/>
- <filepath/>
- </viewlist>
- </viewinfo>
- <save>
- <reqdesc/>
- <file/>
- </save>
- </send>
- <tmp>
- <datalist>
- <maxseq>
- <seq/>
- <instcd/>
- </maxseq>
- </datalist>
- <viewseq>
- <seq/>
- <instcd/>
- </viewseq>
- </tmp>
- <hidden>
- <file/>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- // model.refresh();
- ]]>
- </script>
- <submission id="TRADB65001" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/send/viewinfo/viewlist"/>
- <submission id="TRADB65200" mediatype="multipart/form-data" method="form-data-post" ref="/root/main/druginfo/codelist" resultref="/root/tmp/datalist/viewseq"/>
- <submission id="TRADB65000" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/tmp/datalist"/>
- <submission id="TRADB65300" mediatype="application/x-www-form-urlencoded" method="form-data-post" ref="/root/hidden/file" resultref="/root/main/filepath"/>
- <submission id="TRADB65002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/tmp/viewseq" resultref="/root/main/druginfo/codelist"/>
- <submission id="TRADB65003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/druginfo/codelist" resultref="/root/main"/>
- <submission id="TRADB65400" mediatype="application/x-www-form-urlencoded" method="form-data-post" ref="/root/tmp/viewseq"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../ast/pharmacyweb/js/SMADB65000.js"/>
- <script type="javascript">
- <![CDATA[
- function fInitialize() {
- //모든 데이타을 claear 셋팅하는 부분
- model.setvalue("/root/main/druginfo/codelist/instcd", "" );
- model.setvalue("/root/main/druginfo/codelist/dgseq", "" );
- model.setvalue("/root/main/druginfo/codelist/dginsdate", "" );
- model.setvalue("/root/main/druginfo/codelist/dgtitle", "" );
- model.setvalue("/root/main/druginfo/codelist/dgbigo", "" );
- model.setvalue("/root/main/druginfo/codelist/filenm", "" );
- model.setvalue("/root/main/druginfo/codelist/filepath", "" );
- model.setvalue("/root/hidden/file", "" );
- model.setvalue("/root/tmp/viewseq/instcd", "" );
- model.setvalue("/root/tmp/viewseq/seq", "" );
- model.setvalue("/root/main/druginfo/codelist/filepath", "" );
-
- SaveFlag = "Y" ;
- submit("TRADB65000");
- var work_seq_tmp = model.getValue("/root/tmp/datalist/maxseq/seq");
- // alert(work_seq_tmp)
- model.setValue("/root/main/druginfo/codelist/dgseq",work_seq_tmp);
- model.refresh();
- }
- function fCheckSaveData() {
- /////구분
- var inpseq = model.getValue( "/root/tmp/datalist/maxseq/seq");
- if ( inpseq == "" ) {
- messageBox("신규버튼을 클릭하고 등록하세요!! ","");
- /////////저장 데이타 점검 Flag
- SaveFlag = 'N' ;
- }
- var instcd = model.getValue( "/root/main/druginfo/codelist/instcd");
- if ( instcd == "" ) {
- messageBox("구분를 선택하세요!! ","");
- /////////저장 데이타 점검 Flag
- SaveFlag = 'N' ;
- }
- var drugtitle = model.getValue( "/root/main/druginfo/codelist/dgtitle");
- if ( drugtitle == "" ) {
- messageBox("제목을를 입력하세요!! ","");
- /////////저장 데이타 점검 Flag
- SaveFlag = 'N' ;
- }
- var indate = model.getValue( "/root/main/druginfo/codelist/dginsdate" );
- if ( indate == "" ) {
- messageBox("등록일자를 입력하세요!! ","");
- /////////저장 데이타 점검 Flag
- SaveFlag = 'N' ;
- }
- var savefile = model.getValue( "/root/main/druginfo/codelist/filenm");
- if ( savefile == "" ) {
- messageBox("첨부파일을 등록하세요!! ","");
- /////////저장 데이타 점검 Flag
- SaveFlag = 'N' ;
- }
- }
- ////////저장루틴
- function fSaveData(savemode) {
- // alert("savemode : " + savemode)
- //alert(savemode);
- //----신규 Insert ,update하기
- if (savemode == "i"){
- submit("TRADB65200"); // 데이타 저장 서브밋
- submit("TRADB65001"); // 저장 데이타 조회 서브밋
- //----삭제 하기
- }else if(savemode == "d"){
- // alert("savemode : " + savemode)
- submit("TRADB65400");
- submit("TRADB65001"); // 저장 데이타 조회 서브밋
- }
- }
-
- function fupload(){
- var files = window.fileDialog("open", ",", false);
- var replacepath = "";
- if ( files.length <= 0 ) return;
- model.makeValue(ipt_updpath.attribute("ref") , files); //전체파일경로와이름을 셋팅
- var filename = files.substring(files.lastIndexOf('\\')+1 , files.length ); //파일이름만 나오게 문자정리
- model.setValue(inp_savefile.attribute("ref") , filename);
-
- submit("TRADB65300");
- model.setValue("/root/main/druginfo/codelist/filepath",model.getValue("/root/main/filepath/filepath"));
- ipt_filepath.dispatch("xforms-value-changed");
- model.refresh();
- }
-
- function fdown(){
- var filenm = model.getValue("/root/main/druginfo/codelist/filenm");
- var filepath = model.getValue("/root/main/druginfo/codelist/filepath");
- //파일명의 확장자만 받아옴
- var fileext = filenm.lastIndexOf(".");
- var ext = filenm.substring(fileext +1);
-
- //파일을 다운로드 하기 위해 저장할 창을 띄움
- var localfile = window.fileDialog("save","|",false,filenm,ext,"All Files(*.*)|*.*");
- // var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
- if (localfile != "") {
- model.download(getActionURL("TRADB65003")+"&filepath="+filepath,localfile);
- var rtn = messageBox("파일을", "Q004");
- if( rtn == 6 ) {
- window.exec(localfile);
- }
- }
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="900px" pageheight="700px" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <caption id="caption1" class="tit_1" style="left:5px; top:15px; width:252px; height:13px; ">Medical Zone (약품정보)</caption>
- <shape id="rectangle1" appearance="roundrect" style="left:3px; top:35px; width:892px; height:83px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption11" class="search_name" visibility="visible" style="left:15px; top:70px; width:94px; height:17px; ">등록일자</caption>
- <button id="btn_sea" class="btn1_letter2" style="left:835px; top:10px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- SaveFlag = "Y" ;
- //alert ("시작 " + SaveFlag);
- fCheckSaveData() ;
- //alert ("체크 " + SaveFlag);
- if (SaveFlag == "Y") {
- fSaveData("i");
- fInitialize();
- model.refresh();
- }
- ]]>
- </script>
- </button>
- <line id="line7" class="line_1" style="x1:3px; y1:119px; x2:900px; y2:120px; "/>
- <datagrid id="datagrid1" nodeset="/root/send/viewinfo/viewlist" visibility="visible" caption="순번^구분^등록일자^제목^비고^파일명^파일 위치" colsep="^" colwidth="31, 49, 66, 360, 120, 235, 290" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:8px; top:125px; width:890px; height:545px; ">
- <col ref="dgseq" type="input" visibility="hidden" maxlength="3" style="text-align:center; "/>
- <col ref="instcd" type="output" style="text-align:left; "/>
- <col ref="dginsdate" type="input" style="text-align:center; "/>
- <col ref="dgtitle" type="input" style="left:166px; top:23px; width:360px; height:23px; text-align:left; "/>
- <col ref="dgbigo" type="output" visibility="visible"/>
- <col ref="filenm" style="left:734px; top:23px; width:300px; height:23px; "/>
- <col ref="filepath" visibility="hidden"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- var row = datagrid1.row;
- // alert (" 선택 Row " + row);
- var instcd = model.getValue("/root/send/viewinfo/viewlist["+row+"]/instcd")
- var dgseq = model.getValue("/root/send/viewinfo/viewlist["+row+"]/dgseq")
- // alert (" 선택 instcd " + instcd);
- // alert (" 선택 dgseq " + dgseq);
- model.setvalue("/root/tmp/viewseq/instcd", instcd );
- model.setvalue("/root/tmp/viewseq/seq", dgseq );
- submit("TRADB65002");
- ]]>
- </script>
- </datagrid>
- <button id="btn_save" class="btn4_letter2" style="left:705px; top:10px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- submit("TRADB65001");
- //model.setValue("/root/tmp/datalist/viewseq/seq", "" );
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption2" class="search_name" style="left:240px; top:45px; width:63px; height:17px; ">제목:</caption>
- <input id="inp_drugtitle" ref="/root/main/druginfo/codelist/dgtitle" class="input_search" visibility="visible" style="left:305px; top:45px; width:575px; height:19px; "/>
- <caption id="caption3" class="search_name" style="left:15px; top:42px; width:63px; height:17px; ">구분:</caption>
- <caption id="caption5" class="search_name" style="left:14px; top:94px; width:81px; height:17px; ">첨부파일:</caption>
- <select1 id="rad_instcd" ref="/root/main/druginfo/codelist/instcd" appearance="full" cellspacing="20" cols="2" overflow="visible" style="left:102px; top:42px; width:120px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>본원</label>
- <value>031</value>
- </item>
- <item>
- <label>칠곡</label>
- <value>032</value>
- </item>
- </choices>
- </select1>
- <input id="inp_savefile" ref="/root/main/druginfo/codelist/filenm" class="input_search" disabled="true" visibility="visible" style="left:100px; top:93px; width:510px; height:19px; "/>
- <button id="button1" class="btn2_letter4" visibility="visible" style="left:615px; top:93px; width:64px; height:19px; ">
- <caption>UpLoad</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fupload();
- ]]>
- </script>
- </button>
- <input id="inp_indate" ref="/root/main/druginfo/codelist/dginsdate" class="input_essential" navindex="14" inputtype="date" style="left:100px; top:70px; width:130px; height:19px; "/>
- <caption id="caption4" class="search_name" style="left:240px; top:70px; width:63px; height:17px; ">비고:</caption>
- <input id="inp_bigo" ref="/root/main/druginfo/codelist/dgbigo" class="input_search" visibility="visible" style="left:305px; top:70px; width:575px; height:19px; "/>
- <button id="button2" class="btn4_letter2" style="left:640px; top:10px; width:56px; height:22px; ">
- <caption>신규</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <output id="inp_seq" ref="/root/tmp/viewseq/seq" visibility="hidden" appearance="output" style="left:470px; top:10px; width:20px; height:19px; "/>
- <output id="input1" ref="/root/main/druginfo/codelist/dgseq" visibility="hidden" appearance="output" style="left:766px; top:93px; width:45px; height:19px; "/>
- <output id="ipt_updpath" ref="/root/hidden/file" class="input_search" visibility="hidden" disabled="true" appearance="output" style="left:360px; top:12px; width:35px; height:19px; "/>
- <output id="ipt_filepath" ref="/root/main/druginfo/codelist/filepath" class="input_search" visibility="hidden" disabled="true" appearance="output" style="left:400px; top:10px; width:40px; height:19px; "/>
- <upload id="upload1" nodeset="/root/hidden/file" style="left:325px; top:15px; width:30px; height:20px; "/>
- <button id="button5" class="btn2_letter5" visibility="visible" style="left:682px; top:93px; width:75px; height:19px; ">
- <caption>DownLoad</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fdown();
- ]]>
- </script>
- </button>
- <output id="inp_instcd" ref="/root/tmp/viewseq/instcd" visibility="hidden" appearance="output" style="left:495px; top:10px; width:25px; height:19px; "/>
- <output id="output1" ref="/root/tmp/datalist/maxseq/seq" visibility="hidden" appearance="output" style="left:440px; top:10px; width:25px; height:19px; "/>
- <button id="button3" class="btn4_letter2" style="left:770px; top:10px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSaveData("d");
- fInitialize();
- model.refresh();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|