123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346 |
- <?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:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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>진료재료 집계 상세내역</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <list>
- <searchgood>
- <searchgoodlist/>
- </searchgood>
- </list>
- </main>
- <init>
- </init>
- <send>
- <searchgood>
- <instcd/>
- <acptddfr/>
- <acptddto/>
- <prcpdeptcd/>
- <prcpdeptnm/>
- <goodcd/>
- <goodnm/>
- <pid/>
- <patnm/>
- <sumflag/>
- <sumcnt/>
- <erprcpflag/>
- <flag/>
- <genrsumcnt/>
- <lastsumcnt/>
- <facptddfr/>
- <fsumcnt/>
- <prcpinptflag/>
- </searchgood>
- <save>
- <searchgoodlist/>
- </save>
- </send>
- <temp>
- <sumqty1/>
- <sumqty2/>
- </temp>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- fGetdata();
- ]]>
- </script>
- <submission id="TRRSD02203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchgood" resultref="/root/main/list/searchgood"/>
- <submission id="TRRSD07501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchgood" resultref="/root/main/list/searchgood"/>
- <submission id="TXRSD07501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript">
- <![CDATA[
- var fpopup = model.getValue("/root/temp/fpopup");
-
- function fInitialize()
- {
- model.resetInstanceNode("/root/send");
- model.setValue("/root/send/searchgood/sumflag", "Y"); // 집계된 처방 조회
- model.setValue("/root/send/searchgood/erprcpflag", "A"); // 일반, 응급 전체 조회
- misfGridInit(grd_searchgood);
-
- //misfComboComCdList("Z0007",cmb_instcd); // 기관코드
- misfComboComCdListMulti("C0048,030R0034","cmb_instcd,grd_searchgood.erprcpflag");
-
- model.setValue("/root/send/searchgood/instcd", getUserInfo("dutplceinstcd")); // 기관 설정
-
- if(fpopup == "1"){
- model.setValue("/root/send/searchgood/flag","1");
- misfMsterDetailSet(grd_searchgood, null, "TRRSD02203", "N");
- grd_searchgood.colWidth(grd_searchgood.colRef("rtninspsnid")) = 0; //규격
-
- if(getUserInfo("dutplcecd") == "3080000000" || getUserInfo("dutplcecd") == "4020334000" || getUserInfo("dutplcecd") == "3360000000" || getUserInfo("userid") == "97089"){
- btn_save.visible = true;
- }
-
- }else if(fpopup == "2"){
- model.setValue("/root/send/searchgood/flag","2");
- misfMsterDetailSet(grd_searchgood, null, "TRRSD07501", "N");
-
- grd_searchgood.caption = "집계일자^집계일자^처방일자^등록번호^환자명^물품코드^물품코드^물품명^규격^처방명^반납수량^반납자";
- grd_searchgood.colWidth(grd_searchgood.colRef("totqty")) = 70; //처방명 200
- for(i = grd_searchgood.colRef("beforqty") ; i < grd_searchgood.cols ; i++){
- grd_searchgood.colWidth(i) = 0;
- }
- grd_searchgood.colWidth(grd_searchgood.colRef("goodspec")) = 176; //규격 216
- grd_searchgood.colWidth(grd_searchgood.colRef("prcpnm")) = 180; //처방명 200
- grd_searchgood.colWidth(grd_searchgood.colRef("rtninspsnid")) = 70; //반납등록자
-
- btn_save.visible = false;
- //grd_searchgood.colwidth(0) = "67, 36, 69, 55, 56, 70, 28, 183, 80, 158, 80, 50, 60, 66, 57, 36, 55, 40, 72, 100, 0, 0, 0, 100, 100, 100, 100, 100";
- }
- model.refresh();
- }
-
- function fGetdata()
- {
- if( fpopup == "1" ){ //1 = 미반납, 2 = 반납
- // Popup 으로 불려지면 기관코드, 자산코드 값 설정.
- if(model.getValue("/root/temp/goodcd") != "")
- {
- var getNode = "/root/temp";
- var setNode = "/root/send/searchgood";
-
- model.setValue(setNode + "/instcd" , model.getValue(getNode + "/instcd"));
- model.setValue(setNode + "/acptddfr" , model.getValue(getNode + "/acptddfr"));
- model.setValue(setNode + "/acptddto" , model.getValue(getNode + "/acptddto"));
- model.setValue(setNode + "/genrsumcnt", model.getValue(getNode + "/genrsumcnt"));
- model.setValue(setNode + "/lastsumcnt" , model.getValue(getNode + "/lastsumcnt"));
- model.setValue(setNode + "/prcpdeptcd" , model.getValue(getNode + "/prcpdeptcd"));
- model.setValue(setNode + "/prcpdeptnm", model.getValue(getNode + "/prcpdeptnm"));
- model.setValue(setNode + "/goodcd" , model.getValue(getNode + "/goodcd"));
- model.setValue(setNode + "/goodnm" , model.getValue(getNode + "/goodnm"));
-
- model.setValue(setNode + "/facptddfr" , model.getValue(getNode + "/facptddfr"));
- model.setValue(setNode + "/fsumcnt" , model.getValue(getNode + "/fsumcnt"));
-
- model.setValue(setNode + "/prcpinptflag" , "ignore"); // CCD처방 제외
-
- if(model.getValue(getNode + "/sumcnt") != ""){
- model.setValue(setNode + "/sumcnt" , model.getValue(getNode + "/sumcnt"));
- ipt_sumcnt.visible = true;
- ipt_acptddto.visible = false;
- }
-
- if(model.getValue(getNode + "/erprcpflag") != "-"){
- model.setValue(setNode + "/erprcpflag", model.getValue(getNode + "/erprcpflag"));
- } else {
- model.setValue(setNode + "/erprcpflag", "A"); // 일반, 응급 전체 조회
- }
- }
- }else if( fpopup == "2"){
- if(model.getValue("/root/temp/goodcd") != "")
- {
- var getNode = "/root/temp";
- var setNode = "/root/send/searchgood";
-
- model.setValue(setNode + "/instcd" , model.getValue(getNode + "/instcd"));
- model.setValue(setNode + "/acptddfr" , model.getValue(getNode + "/acptddfr"));
- model.setValue(setNode + "/prcpdeptcd" , model.getValue(getNode + "/prcpdeptcd"));
- model.setValue(setNode + "/prcpdeptnm", model.getValue(getNode + "/prcpdeptnm"));
- model.setValue(setNode + "/goodcd" , model.getValue(getNode + "/goodcd"));
- model.setValue(setNode + "/goodnm" , model.getValue(getNode + "/goodnm"));
-
- model.setValue(setNode + "/sumcnt" , model.getValue(getNode + "/sumcnt"));
-
- model.setValue(setNode + "/prcpinptflag" , "ignore"); // CCD처방 제외
-
- ipt_sumcnt.visible = true;
- ipt_acptddto.visible = false;
-
- if(model.getValue(getNode + "/erprcpflag") != "-"){
- model.setValue(setNode + "/erprcpflag", model.getValue(getNode + "/erprcpflag"));
- } else {
- model.setValue(setNode + "/erprcpflag", "A"); // 일반, 응급 전체 조회
- }
- }
- }
-
- model.refresh();
- btn_search.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1080" pageheight="640" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:8px; top:0px; width:1057px; height:590px; ">
- <group id="group2" style="left:0px; top:5px; width:1055px; height:60px; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1055px; height:60px; "/>
- <button id="btn_search" class="btn1_letter2" style="left:985px; top:20px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(fpopup == "1"){
- var setNode = "/root/send/searchgood";
- // 집계횟수가 있을경우 집계일자 기간은 동일하게 조회
- if(model.getValue(setNode + "/sumcnt") != ""){
- model.setValue(setNode + "/acptddto" , model.getValue(setNode + "/acptddfr"));
- }
- misfMsterDetailRetrieve(); //submit("TRRSD02203");
-
- for(var idx=grd_searchgood.fixedRows; idx<grd_searchgood.rows; idx++) {
- if(grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("erprcpflag")) == "Y") {
- var beforqty = grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("beforqty"));
- grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("erprcpqty")) = beforqty;
- grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("beforqty")) = 0;
- } else {
- grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("erprcpqty")) = 0;
- }
-
- var sumyn = grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("sumyn"));
- var totqty = grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("totqty"));
- if(sumyn == "Y" || totqty > 0){
- grd_searchgood.cellAttribute("disabled", idx, grd_searchgood.colRef("rtnqty")) = "true";
- //grd_searchgood.cellStyle("background-color", idx, grd_searchgood.colRef("rtnqty")) = "#FF3300";
- }
- }
- }else if(fpopup == "2"){
- misfMsterDetailRetrieve(); //submit("TRRSD07501");
-
- for(var idx=grd_searchgood.fixedRows; idx<grd_searchgood.rows; idx++) {
- if(grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("erprcpflag")) == "Y") {
- grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("erprcpqty")) = grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("beforqty"));
- grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("beforqty")) = 0;
- } else {
- grd_searchgood.valueMatrix(idx, grd_searchgood.colRef("erprcpqty")) = 0;
- }
- }
- }
- grd_searchgood.refresh();
- ]]>
- </script>
- </button>
- <line id="line13" class="line_4" style="x1:970px; y1:7px; x2:970px; y2:55px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="cap_instcd" class="search_name" style="left:15px; top:7px; width:90px; height:17px; ">기관코드 :</caption>
- <select1 id="cmb_instcd" ref="/root/send/searchgood/instcd" class="combo_default" disabled="true" appearance="minimal" style="left:105px; top:6px; width:160px; height:19px; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption2" class="search_name" style="left:15px; top:33px; width:99px; height:17px; ">집계일자 :</caption>
- <caption id="caption12" style="left:205px; top:33px; width:20px; height:20px; font-weight:bold; ">~</caption>
- <input id="ipt_acptddfr" ref="/root/send/searchgood/acptddfr" class="input_s_essential" navindex="2" inputtype="date" style="left:105px; top:33px; width:95px; height:19px; "/>
- <input id="ipt_acptddto" ref="/root/send/searchgood/acptddto" class="input_s_essential" navindex="3" inputtype="date" style="left:220px; top:33px; width:95px; height:19px; "/>
- <input id="ipt_goodcd_search" ref="/root/send/searchgood/goodcd" class="output_fix" navindex="6" editable="false" imemode="disabled" _chartype="upper" style="left:670px; top:8px; width:130px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="cap_goodcd_search" class="search_name" style="left:580px; top:8px; width:89px; height:17px; ">물품코드 :</caption>
- <caption id="cap_prcpdeptcd" class="search_name" style="left:310px; top:8px; width:89px; height:17px; ">시행부서 :</caption>
- <input id="cmb_prcpdeptcd" ref="/root/send/searchgood/prcpdeptnm" class="output_fix" navindex="1" editable="false" editmode="search" appearance="minimal" style="left:400px; top:8px; width:160px; height:19px; "/>
- <input id="ipt_pid" ref="/root/send/searchgood/pid" class="input_fix" navindex="9" autonext="false" imemode="disabled" maxlength="10" _chartype="upper" style="left:475px; top:33px; width:85px; height:19px; "/>
- <caption id="caption1" class="search_name" style="left:386px; top:33px; width:89px; height:17px; ">등록번호 :</caption>
- <caption id="caption3" class="search_name" style="left:580px; top:33px; width:83px; height:17px; ">환 자 명 :</caption>
- <input id="ipt_patnm" ref="/root/send/searchgood/patnm" class="input_fix" navindex="10" imemode="hangul" style="left:669px; top:33px; width:70px; height:19px; "/>
- <input id="ipt_sumcnt" ref="/root/send/searchgood/sumcnt" class="input_fix" navindex="9" visibility="hidden" autonext="false" imemode="disabled" maxlength="10" _chartype="upper" style="left:205px; top:33px; width:45px; height:19px; "/>
- </group>
- <caption id="caption4" class="tit_2" style="left:5px; top:74px; width:113px; height:15px; ">처방 상세내역</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:88px; x2:1055px; y2:88px; "/>
- <datagrid id="grd_searchgood" nodeset="/root/main/list/searchgood/searchgoodlist" caption="집계일자^집계일자^처방일자^등록번호^환자명^물품코드^물품코드^물품명^규격^처방명^총수량^선불출^응급불출^반납수량^시행일자^처방구분^입외^병동^병실^처방부서^비고^반납등록자^수량^횟수^일수" colsep="^" colwidth="67, 24, 69, 55, 56, 70, 0, 183, 108, 158, 50, 50, 60, 60, 66, 57, 36, 55, 40, 72, 100, 100, 0, 0, 0, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" navindex="20" style="left:0px; top:90px; width:1055px; height:500px; ">
- <col ref="acptdd" format="yyyy-mm-dd"/>
- <col ref="sumcnt" style="text-align:center; "/>
- <col ref="prcpdd" format="yyyy-mm-dd"/>
- <col ref="pid"/>
- <col ref="patnm"/>
- <col ref="goodcd"/>
- <col ref="allsizespecid" visibility="hidden"/>
- <col ref="goodnm"/>
- <col ref="goodspec"/>
- <col ref="prcpnm"/>
- <col ref="totqty" format="#,###.#" style="text-align:right; "/>
- <col ref="beforqty" format="#,###.#" style="text-align:right; "/>
- <col ref="erprcpqty" format="#,###.#" style="text-align:right; "/>
- <col ref="rtnqty" type="input" format="#,###.#" style="text-align:right; "/>
- <col ref="rgstdd" format="yyyy-mm-dd"/>
- <col disabled="true" ref="erprcpflag" type="combo" style="text-align:center; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" ref="ioflag"/>
- <col ref="wardnm"/>
- <col ref="room"/>
- <col ref="orddeptcdnm"/>
- <col ref="cmt"/>
- <col ref="rtninspsnid"/>
- <col ref="goodqty" format="#,###.#" style="text-align:right; "/>
- <col ref="times" format="#,###" style="text-align:right; "/>
- <col ref="dayno" format="#,###" style="text-align:right; "/>
- <col ref="fstrgstrid" visibility="hidden"/>
- <col ref="fstrgstdt" visibility="hidden" format="yyyy-mm-dd"/>
- <col ref="ward" visibility="hidden"/>
- <col ref="orddeptcd" visibility="hidden"/>
- <col ref="prcpdeptcd" visibility="hidden"/>
- <col ref="sumyn" visibility="hidden"/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="genrdd" visibility="hidden"/>
- <col ref="genrno" visibility="hidden"/>
- <col ref="genrseq" visibility="hidden"/>
- <col ref="facptddfr" visibility="hidden"/>
- <col ref="fsumcnt" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (grd_searchgood.colAttribute(grd_searchgood.col,"ref") == "rtnqty") {
- var rtnqty = grd_searchgood.valueMatrix(grd_searchgood.row, grd_searchgood.colRef("rtnqty"));
- var totqty = grd_searchgood.valueMatrix(grd_searchgood.row, grd_searchgood.colRef("totqty"));
- var beforqty = grd_searchgood.valueMatrix(grd_searchgood.row, grd_searchgood.colRef("beforqty"));
- var erprcpqty = grd_searchgood.valueMatrix(grd_searchgood.row, grd_searchgood.colRef("erprcpqty"));
-
- if(parseInt(totqty) - parseInt(beforqty) - parseInt(erprcpqty) + parseInt(rtnqty) > 0) {
- messageBox("수량이 잘 못 입력되었습니다.","E");
- grd_searchgood.editCell();
- return;
- }
-
- var sumyn = grd_searchgood.valueMatrix(grd_searchgood.row, grd_searchgood.colRef("sumyn"));
- if(sumyn == "O"){
- grd_searchgood.rowStatus(grd_searchgood.row) = 1;
- }
- }
- ]]>
- </script>
- </datagrid>
- <button id="btn_save" class="btn4_letter2" visibility="hidden" style="left:998px; top:66px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var updateData = grd_searchgood.getUpdateData();
- if(messageBox("","Q002") == 6) {
- model.setValue("/root/send/save/searchgoodlist", updateData);
- submit("TXRSD07501");
- btn_search.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </button>
- </group>
- <group id="group1" scroll="auto" style="left:0px; top:590px; width:1065px; height:30px; ">
- <button id="btn_cancel" class="btn4_letter2" style="left:1004px; top:5px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <close ev:event="DOMActivate"/>
- </button>
- <line id="line3" class="line_6" style="x1:0px; y1:0px; x2:935; y2:0px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|