123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 |
- <?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>
- <cond>
- <srchfromdd/>
- <srchtodd/>
- <pid/>
- <drugno/>
- <prcpdd/>
- <hngnm/>
- </cond>
- <sumdeptlist>
- <info/>
- </sumdeptlist>
- <forminfo>
- <info>
- <sumdeptcd/>
- <sumdeptnm/>
- <sumdeptflag/>
- <prcpexecdeptcd/>
- <prcpexecdeptnm/>
- <useyn>Y</useyn>
- <status>I</status>
- </info>
- </forminfo>
- <patinfo/>
- </main>
- <init>
- <tmp/>
- <deptflag/>
- <deptinfo/>
- </init>
- <send>
- <reqdata/>
- <cond/>
- <deptinfo/>
- </send>
- <temp>
- <initsrch/>
- </temp>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <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/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript">
- <![CDATA[
- var ref = "/root/main/sumdeptlist/info";
- var saveFlag = "";
-
- function fInitialize(){
- //오늘 날짜로 초기화 하는 부분.(조회일자를 default로 오늘 날짜로 선택함)
- var currDate;
- currDate = getCurrentDate();
- var addDy;
- addDy = currDate.toDate().getAddDate(-7,"D");
- addDy = addDy.getDateFormat("YYYYMMDD");
-
- model.setValue("/root/main/cond/srchfromdd", addDy );
- model.setValue("/root/main/cond/srchtodd", getCurrentDate() );
-
- //부서코드 조회
- //zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "", "", "/root/init/deptinfo"); //부서 콤보조회
-
- fGetSumDeptList();
- }
-
- function fGetSumDeptList(){
- if( !isRequiredControls("ipt_searchfromdd","ipt_searchtodd") ){
- return;
- }
-
- model.removenode("/root/send/cond");
- model.makeNode("/root/send/cond");
- model.copyNode("/root/send/cond", "/root/main/cond");
-
- submit("TRADT10341", true);
- }
-
- /* 저장한다. */
- function fSaveInfo(flag, qestyn){
-
- var saveDataNodes = instance1.selectNodes(ref + "[status!='']");
- if( saveDataNodes.length <= 0 ){
- messageBox( "저장할 데이터가", "I004"); //없습니다
- return;
- }
-
- model.removeNodeset("root/send/savedata");
- model.makeNode("root/send/savedata");
- copyNodeListType("root/send/savedata", "/root/main/sumdeptlist/info[status!='']", "replace", model, model);
- //model.setValue("root/send/savedata", grd_sumdeptlist.getUpdateData());
-
- if( submit("TXADT10334", false) ){
- grd_sumdeptlist.clearStatus();
- grd_sumdeptlist.refresh();
- return true;
- }else{
- return false;
- }
- }
-
- function fAddRow(){
- grd_sumdeptlist.addRow();
- //copyNodeType("/root/main/sumdeptlist", "/root/main/forminfo/info", "after", model, model);
- var iRows = grd_sumdeptlist.rows-1;
- model.setValue(ref + "[" + iRows + "]/status", "I");
- model.setValue(ref + "[" + iRows + "]/useyn", "Y");
- }
-
- function fDelRow(){
- var selectedRows = grd_sumdeptlist.selectedRows;
- var iStatus = "";
-
- for (var i=selectedRows-1; i>=0; i--) {
- iStatus = rowStatus = model.getValue( ref + "[" + grd_sumdeptlist.selectedrow(i) + "]/status" );
- if( iStatus == "I" ){
- //model.removeNodeset(ref + "[" + grd_sumdeptlist.selectedrow(i) +"]");
- grd_sumdeptlist.deleteRow(grd_sumdeptlist.selectedrow(i));
- }else{
- if( iStatus == "D" ){
- model.setValue ( ref + "[" + grd_sumdeptlist.selectedrow(i) + "]/status", "" );
- grd_sumdeptlist.rowStatus(grd_sumdeptlist.selectedrow(i)) = 0; //delete status
- }else{
- model.setValue ( ref + "[" + grd_sumdeptlist.selectedrow(i) + "]/status", "D" );
- grd_sumdeptlist.rowStatus(grd_sumdeptlist.selectedrow(i)) = 4; //delete status
- }
- }
- }
- }
-
- function fPatSrch(s_val, flag){
- if(flag == "1"){
- model.makeValue("/root/temp/pid", s_val);
- } else if(flag == "2"){
- model.makeValue("/root/temp/hngnm", s_val);
- }
- model.makeValue("/root/temp/srchcond", flag);
- model.makeValue("/root/temp/autoflag","Y"); // 1건인경우 자동으로닫힘
-
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
- modal("SPPMC02500", 1,10, 10, "SPPMC02500", "/root/temp", "/root/send");
-
- model.refresh();
- }
- ]]>
- </script>
- <submission id="TRADT10341" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/sumdeptlist"/>
- <script type="javascript" ev:event="xforms-model-construct-done">
- <![CDATA[
- grd_sumdeptlist.explorerbar = "sortshow";
- ]]>
- </script>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1195;2,783;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:257px; height:14px; ">선불출조회</caption>
- </group>
- <group id="group5" class="datagrid2" scroll="auto" style="left:0px; top:13px; width:1195px; height:771px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1195px; height:35px; "/>
- <button id="button1" class="btn1_letter2" navindex="6" style="left:1041px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetSumDeptList();
- ]]>
- </script>
- </button>
- <line id="line13" class="line_4" style="x1:1020px; y1:7px; x2:1020px; y2:29px; "/>
- <button id="button3" class="btn1_letter4" style="left:1102px; top:7px; width:80px; height:22px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fileName = window.fileDialog("save", ",", false, "선불출리스트", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "") grd_sumdeptlist.saveExcel(fileName, "선불출리스트", false, false, "", "", false);
- ]]>
- </script>
- </button>
- <caption id="caption1" class="search_name" style="left:785px; top:10px; width:86px; height:17px; ">처방일자 :</caption>
- <caption id="caption4" style="left:194px; top:10px; width:15px; height:15px; text-align:center; ">-</caption>
- <input id="ipt_searchtodd" ref="/root/main/cond/srchtodd" class="input_s_essential" navindex="2" inputtype="date" style="left:209px; top:9px; width:90px; height:19px; "/>
- <input id="ipt_searchfromdd" ref="/root/main/cond/srchfromdd" class="input_s_essential" navindex="1" inputtype="date" style="left:104px; top:9px; width:90px; height:19px; "/>
- <caption id="caption2" class="search_name" style="left:570px; top:10px; width:86px; height:17px; ">투약번호 :</caption>
- <input id="input2" ref="/root/main/cond/prcpdd" class="input_search" navindex="2" inputtype="date" style="left:875px; top:10px; width:90px; height:19px; "/>
- <input id="input3" ref="/root/main/cond/drugno" class="input_search" navindex="3" style="left:660px; top:10px; width:90px; height:19px; "/>
- <caption id="cap_searchfromdd" class="search_name" visibility="hidden" style="left:0px; top:5px; width:20px; height:17px; ">집계시작일자</caption>
- <caption id="cap_srchdd" class="search_name" style="left:15px; top:10px; width:99px; height:17px; ">집계일자 :</caption>
- <caption id="cap_searchtodd" class="search_name" visibility="hidden" style="left:0px; top:15px; width:30px; height:17px; ">집계종료일자</caption>
- <caption id="cap_srchpat" class="search_name" style="left:335px; top:10px; width:86px; height:17px; ">환자번호 :</caption>
- <input id="ipt_srchpat" ref="/root/main/cond/pid" class="input_search" navindex="3" style="left:425px; top:10px; width:90px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- inputEnterKey("btn_srchpat", "DOMActivate");
- ]]>
- </script>
- </input>
- <button id="btn_srchpat" class="icon_search" style="left:520px; top:12px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.makeNode("/root/main/patinfo/patinfolist");
- var pid = model.getValue("/root/main/cond/pid");
- var hngnm = model.getValue("/root/main/cond/hngnm");
- if((pid !="")){
- fPatSrch(pid, "1");
- } else {
- modal("SPPMC02500")
- }
-
- model.setValue("/root/main/cond/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.setValue("/root/main/cond/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
- model.refresh();
- ]]>
- </script>
- </button>
- </group>
- <line id="line2" class="line_1" style="x1:0px; y1:75px; x2:1195px; y2:75px; "/>
- <line id="line1" class="line_3" style="x1:0px; y1:764px; x2:1195px; y2:764px; "/>
- <datagrid id="grd_sumdeptlist" nodeset="/root/main/sumdeptlist/info" class="datagrid1" caption="집계일시^집계부서코드^집계부서명^투약일자^투약번호^투약순번^등록번호^내원구분^처방일자^처방코드^처방명^용량^단위^수량^단위^횟수^일수^집계횟수^반환수량^반환일자^반환일시^prcpno^prcphistno^execprcpno^execprcpuniqno" colsep="^" colwidth="80, 80, 125, 80, 90, 70, 85, 55, 80, 85, 110, 45, 50, 45, 50, 35, 35, 55, 62, 80, 56, 10, 10, 10, 10" ellipsis="true" rowheader="update" rowsep="|" tooltip="true" style="left:0px; top:80px; width:1195px; height:683px; ">
- <col ref="sumdt" type="output" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="sumdeptcd" type="output" style="text-align:center; "/>
- <col ref="sumdeptnm" type="output"/>
- <col ref="drugdd" type="output" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="drugno" style="text-align:center; "/>
- <col checkvalue="Y,N" ref="drugseqno" type="output"/>
- <col ref="pid"/>
- <col ref="ordddioflag" style="text-align:center; "/>
- <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="prcpcd"/>
- <col ref="prcpnm"/>
- <col ref="prcpvol" style="text-align:right; "/>
- <col ref="prcpvolunit"/>
- <col ref="prcpqty" style="text-align:right; "/>
- <col ref="prcpqtyunit"/>
- <col ref="prcptims" style="text-align:right; "/>
- <col ref="prcpdayno" style="text-align:right; "/>
- <col ref="sumqty" style="text-align:right; "/>
- <col ref="rtnqty" style="text-align:right; "/>
- <col ref="rtndd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="rtntm" format="hh:nn:ss" style="text-align:center; "/>
- <col ref="prcpno" visibility="hidden"/>
- <col ref="prcphistno" visibility="hidden"/>
- <col ref="execprcpno" visibility="hidden"/>
- <col ref="execprcpuniqno" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var iRow = grd_sumdeptlist.row;
- var iCol = grd_sumdeptlist.col; //12~13 신청, 14~15 수행
- var rowStatus = "";
-
- if( iRow > 0 && iRow <= grd_sumdeptlist.rows ){
- rowStatus = model.getValue( ref + "[" + iRow + "]/status" );
- //rowStatus = grd_sumdeptlist.rowStatus(iRow);
-
- if( rowStatus == "I" ){
- model.setValue( ref + "[" + iRow + "]/status", "I" );
- grd_sumdeptlist.rowStatus(iRow) = 1; //insert status
- }else{
- model.setValue( ref + "[" + iRow + "]/status", "U" );
- grd_sumdeptlist.rowStatus(iRow) = 2; //delete status
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_sumdeptlist.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- var iRow = grd_sumdeptlist.row;
- var iCol = grd_sumdeptlist.col; //12~13 신청, 14~15 수행
- var rowStatus = "";
- var inputSumdeptcd = "";
- var inputPrcpexecdeptcd = "";
- var inpitDeptCd = "";
- var iStatus = "";
-
- if( iRow > 0 && iRow <= grd_sumdeptlist.rows ){
- iStatus = model.getValue( ref + "[" + iRow + "]/status" );
- /*
- if( iCol == grd_sumdeptlist.colRef("sumdeptcd") ){
- inputSumdeptcd = model.getValue( ref + "[" + iRow + "]/sumdeptcd" );
- inpitDeptCd = inputSumdeptcd;
- }else
- */
- if( iCol == grd_sumdeptlist.colRef("prcpexecdeptcd") ){
- inputPrcpexecdeptcd = model.getValue( ref + "[" + iRow + "]/prcpexecdeptcd" );
- inpitDeptCd = inputPrcpexecdeptcd;
- }
-
- if( !isNull(inpitDeptCd) ){
- var deptList = instance1.selectNodes("/root/init/deptinfo/dept");
- var node = null;
- var iDeptNode = null;
- var iDeptCd = "";
- var iDeptNm = "";
- for(var i=0; i<deptList.length; i++ ){
- node = deptList.item(i);
- iDeptNode = node.selectSingleNode("deptcd");
- if( iDeptNode != null ){
- iDeptCd = iDeptNode.text;
- if( iDeptCd == inpitDeptCd ){
- iDeptNm = node.selectSingleNode("depthngnm").text;
- break;
- }
- }
- }
-
- /*
- if( !isNull(inputSumdeptcd) ){
- if( !isNull(iDeptNm) )
- model.setValue(ref + "[" + iRow + "]/sumdeptnm", iDeptNm);
- else
- model.setValue(ref + "[" + iRow + "]/sumdeptnm", "");
- }
- */
- if( !isNull(inputPrcpexecdeptcd) ){
- if( !isNull(iDeptNm) )
- model.setValue(ref + "[" + iRow + "]/prcpexecdeptnm", iDeptNm);
- else
- model.setValue(ref + "[" + iRow + "]/prcpexecdeptnm", "");
- }
- }
-
- //grd_sumdeptlist.refresh();
- }
- ]]>
- </script>
- </datagrid>
- <caption id="caption19" class="tit_2" style="left:5px; top:59px; width:100px; height:14px; ">선불출 리스트</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|