123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>
- <adbmcrtn>
- <item>
- <subjno/>
- <stdyno/>
- <prcpno/>
- <prcphistno/>
- <itemnm/>
- <screenno/>
- <subtesteephosid/>
- <subtesteephosnm/>
- <srchpid/>
- <hngnm/>
- <prcpdd/>
- <drugcd/>
- <orddrid/>
- <orddrnm/>
- <prcpvol/>
- <prcpvolunitnm/>
- <prcpqty/>
- <prcpqtyunitnm/>
- <prcptims/>
- <prcpdayno/>
- <drugmthdspccd/>
- <rtndd/>
- <rtnsavedt/>
- <rtnrid/>
- <rtnnm/>
- <cmtcnts/>
- <state/>
- </item>
- </adbmcrtn>
- <cond>
- <subjno/>
- <srchstdyno/>
- <subjnoflag>1</subjnoflag>
- <stdynoflag>1</stdynoflag>
- <srchrtnyn>Y</srchrtnyn>
- <srchpid/>
- <srchfromdd/>
- <srchtodd/>
- </cond>
- <userpopupinfo/>
- <tempuserinfo/>
- </main>
- <send>
- <adbmcrtn/>
- </send>
- <init>
- </init>
- <hidden>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- var addDate=new Date();
- var curdate = getCurrentDate().toDate("YYYYMMDD").getAddDate(-1, "M");
- //model.setValue("/root/main/cond/srchfromdd", curdate.getDateFormat("YYYYMMDD") ); // 날짜 초기값 세팅
- model.setValue("/root/main/cond/srchfromdd", getCurrentDate() ); // 날짜 초기값 세팅
- model.setValue("/root/main/cond/srchtodd", getCurrentDate());
-
- model.removeNodeset("/root/main/adbmcrtn/item"); // 첫 row 를 제거한다.
- model.refresh();
- ]]>
- </script>
- <submission id="TRATR00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/adbmcrtn"/>
- <submission id="TXATR00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/adbmcrtn"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- radio3.selected = true;
- radio1.selected = true;
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript">
- <![CDATA[
- //사용자 팝업 호출 및 사용자 정보 return
- function fGetUserInfo() {
- var ref = "/root/main/adbmcrtn/item";
- var iRow = grd_mthdlist.row - grd_mthdlist.fixedRows + 1;
- var iCol = grd_mthdlist.col;
- if( iRow > 0 && iRow <= grd_mthdlist.rows ){
- if (iCol == grd_mthdlist.colRef("rtnnm")) {
- var srchTxt = model.getValue(ref + "[" + iRow + "]/rtnnm");
- var rtndt = model.getValue(ref + "[" + iRow + "]/rtndt");
-
- model.resetInstanceNode("/root/main/userpopupinfo");
- model.resetInstanceNode("/root/main/tempuserinfo");
- model.removeNodeset("/root/main/tempuserinfo/list"); //누락하면 다음에 사용자팝업에서 리턴 안됨
-
- model.makeValue("/root/main/userpopupinfo/param", "_OneS");
- model.makeValue("/root/main/userpopupinfo/flag", "usernm");
- model.makeValue("/root/main/userpopupinfo/searchitem", srchTxt );
-
- modal("../../userdeptinfoweb/xrw/SPZSU10103", "", "200", "200", "SPZSU10103","/root/main/userpopupinfo","/root/main/temp");
-
- var iParam = getParameter("SPZSU10103_");
- if( !isNull(iParam) ){
- setCSVToNode("/root/main/tempuserinfo", iParam, "list"); //return 받은 데이터
-
- var id = model.getValue("/root/main/tempuserinfo/list[1]/userid");
- var nm = model.getValue("/root/main/tempuserinfo/list[1]/usernm");
-
- model.setValue(ref + "[" + iRow + "]/rtnrid", id);
- model.setValue(ref + "[" + iRow + "]/rtnnm", nm);
- if(isNull(rtndt)) model.setValue(ref + "[" + iRow + "]/rtnsavedt", getCurrentDate());
- if(isNull(rtndt)) model.setValue(ref + "[" + iRow + "]/rtndd", getCurrentDate());
-
- fnsaveflag( iRow);
- model.refresh();
- }
- clearParameter("SPZSU10103_");
- }
- }
- }
-
- //저장flag
- function fnsaveflag( iRow) {
- if ( model.getValue("/root/main/adbmcrtn/item["+ iRow+"]/state") == "1" ){
- grd_mthdlist.rowStatus(iRow) = 1;
- //alert("신규");
- //model.setValue("/root/main/adbmcrtn/item["+ iRow+"]/state", "1"); //신규
- }else{
- grd_mthdlist.rowStatus(iRow) = 2;
- //alert("수정");
- //model.setValue("/root/main/adbmcrtn/item["+ iRow+"]/state", "2"); //업데이트
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,2123;1,2102;1,2109;1,2082;1,6;1,2078;1,2123;1,2112;1,2109;" 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:145px; height:14px; ">반환약등록</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1194px; height:744px; ">
- <group id="group2" style="left:0px; top:5px; width:1194px; height:55px; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:1px; width:1194px; height:47px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line13" class="line_4" style="x1:1080px; y1:10px; x2:1080px; y2:35px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_seamthd" class="btn1_letter2" style="left:1110px; top:13px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if (model.getValue("/root/main/cond/srchfromdd") =="") {
- messageBox("처방일자(from) ","C001");
- model.setFocus("ipt_prcpddfr");
- return;
- }
- if (model.getValue("/root/main/cond/srchtodd") =="") {
- messageBox("처방일자(to) ","C001");
- model.setFocus("ipt_prcpddto");
- return;
- }
-
- model.copyNode("/root/send", "/root/main/cond");
- submit("TRATR00401");
- ]]>
- </script>
- </button>
- <input id="input8" ref="/root/main/cond/subjno" class="input_default" style="left:110px; top:6px; width:93px; height:19px; "/>
- <caption id="caption10" class="search_name" style="left:15px; top:6px; width:112px; height:17px; ">과제번호 :</caption>
- <caption id="caption1" class="search_name" style="left:15px; top:26px; width:91px; height:17px; ">연구코드 :</caption>
- <select1 id="radio1" ref="/root/main/cond/stdynoflag" appearance="full" cols="3" overflow="visible" style="left:205px; top:26px; width:95px; height:25px; border-style:none; ">
- <choices>
- <item>
- <label>포함</label>
- <value>1</value>
- </item>
- <item>
- <label>일치</label>
- <value>2</value>
- </item>
- </choices>
- </select1>
- <select1 id="radio3" ref="/root/main/cond/subjnoflag" appearance="full" cols="3" overflow="visible" style="left:205px; top:6px; width:95px; height:25px; border-style:none; ">
- <choices>
- <item>
- <label>포함</label>
- <value>1</value>
- </item>
- <item>
- <label>일치</label>
- <value>2</value>
- </item>
- </choices>
- </select1>
- <input id="input3" ref="/root/main/cond/srchstdyno" class="input_default" style="left:110px; top:27px; width:93px; height:19px; "/>
- <caption id="caption2" class="search_name" style="left:330px; top:15px; width:112px; height:17px; ">반환여부 :</caption>
- <caption id="caption4" class="search_name" style="left:543px; top:15px; width:112px; height:17px; ">등록번호 :</caption>
- <input id="input2" ref="/root/main/cond/srchpid" class="input_default" style="left:638px; top:15px; width:93px; height:19px; "/>
- <select1 id="combo1" ref="/root/main/cond/srchrtnyn" appearance="minimal" style="left:417px; top:14px; width:40px; height:19px; ">
- <choices>
- <item>
- <label>Y</label>
- <value>Y</value>
- </item>
- <item>
- <label>N</label>
- <value>N</value>
- </item>
- </choices>
- </select1>
- </group>
- <button id="btn_excsave" class="btn2_letter2" style="left:1150px; top:55px; width:42px; height:19px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
- grd_mthdlist.saveExcel(file);
- ]]>
- </script>
- </button>
- <datagrid id="grd_mthdlist" nodeset="/root/main/adbmcrtn/item" backcoloralternate="#f0f0f0" caption="과제번호^연구코드^품목명^screen no^피험자 id^피험자 initial^등록번호^성명^처방일자^처방의^처방의명^약품코드^용량^단위^수량^단위^횟수^일수^용법^반환일^반환입력일^반납자^비고^상태1^상태2^반납자ID" colsep="^" colwidth="98, 70, 257, 67, 57, 76, 64, 58, 76, 57, 76, 69, 40, 40, 40, 40, 40, 40, 40, 94, 84, 87, 100, 0,85, 100, 100, 0" explorerbar="sortshow" extendlastcol="scroll" frozencols="10" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:76px; width:1194px; height:644px; margin-left:0; margin-right:0; ">
- <col ref="subjno" type="output"/>
- <col ref="stdyno" type="output"/>
- <col ref="itemnm" type="output" style="left:198px; top:23px; width:204px; height:23px; "/>
- <col ref="screenno" type="output"/>
- <col ref="subtesteephosid" type="output"/>
- <col ref="subtesteephosnm" type="output"/>
- <col ref="srchpid" type="output"/>
- <col ref="hngnm" type="output"/>
- <col ref="prcpdd" type="output" format="yyyy-mm-dd"/>
- <col ref="orddrid" type="output"/>
- <col ref="orddrnm" type="output"/>
- <col ref="drugcd" type="output"/>
- <col ref="prcpvol" type="output" style="text-align:right; "/>
- <col ref="prcpvolunitnm" type="output" style="text-align:right; "/>
- <col ref="prcpqty" type="output" style="text-align:right; "/>
- <col ref="prcpqtyunitnm" type="output" style="text-align:right; "/>
- <col ref="prcptims" type="output" style="text-align:right; "/>
- <col ref="prcpdayno" type="output" style="text-align:right; "/>
- <col ref="drugmthdspccd" type="output" visibility="hidden"/>
- <col ref="rtndd" type="inputdate" style="text-align:center; "/>
- <col ref="rtnsavedt" type="output" visibility="hidden"/>
- <col ref="rtnnm" type="inputbutton"/>
- <col ref="cmtcnts" type="input"/>
- <col ref="state" type="output" visibility="hidden"/>
- <col ref="prcphistno" type="output" visibility="hidden"/>
- <col ref="prcpno" type="output" visibility="hidden"/>
- <col ref="rtnrid" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var iRow = grd_mthdlist.row;
- if( grd_mthdlist.row > 0 && grd_mthdlist.row <= grd_mthdlist.rows ){
- fnsaveflag(grd_mthdlist.row );
- }
- ]]>
- </script>
- <!-- (20091120) -->
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- fGetUserInfo();
- ]]>
- </script>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- var iRow = grd_mthdlist.row - grd_mthdlist.fixedRows + 1;
- var iCol = grd_mthdlist.col;
-
- if( iRow > 0 && iRow <= grd_mthdlist.rows ){
- if(event.keyCode == "13") {
- fGetUserInfo();
- }
- }
-
- ]]>
- </script>
- <!-- (20091120) -->
- </datagrid>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1194px; height:27px; ">
- <button id="button1" class="btn4_letter2" style="left:1135px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var update = grd_mthdlist.getUpdateData();
- model.makeValue("/root/send/save", update);
- if(submit("TXATR00401")){
- model.copyNode("/root/send", "/root/main/cond");
- submit("TRATR00401");
- }
-
- ]]>
- </script>
- </button>
- </group>
- <caption id="caption3" class="search_name" style="left:753px; top:60px; width:148px; height:17px; ">처방일자 :</caption>
- <input id="ipt_prcpddfr" ref="/root/main/cond/srchfromdd" class="input_s_essential" inputtype="date" style="left:850px; top:59px; width:100px; height:19px; "/>
- <input id="ipt_prcpddto" ref="/root/main/cond/srchtodd" class="input_s_essential" inputtype="date" style="left:972px; top:59px; width:100px; height:19px; "/>
- <caption id="caption11" class="search_n_b" style="left:955px; top:61px; width:12px; height:17px; font-weight:bolder; ">~</caption>
- </xhtml:body>
- </xhtml:html>
|