123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638 |
- <?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>
- <exptdeptlist>
- <exptdeptitem>
- <exptorddeptcd/>
- <exptorddeptnm/>
- <instcd/>
- </exptdeptitem>
- </exptdeptlist>
- <voldivlist>
- <voldivitem>
- <voldivflag/>
- <voldivcd/>
- <drugcd/>
- <instcd/>
- <seqno/>
- <basevol/>
- <basevolunit/>
- <nextvol/>
- </voldivitem>
- </voldivlist>
- <voldruglist>
- <voldrugitem>
- <divcd/>
- <voldivflag/>
- <voldivcd/>
- <drugcd/>
- <drugnm/>
- <seqno/>
- <basevol/>
- <nextvol/>
- <instcd/>
- <saveflag/>
- </voldrugitem>
- </voldruglist>
- </main>
- <send>
- <srchinfo>
- <srchvoldivflag/>
- <srchvoldivcd/>
- <srchdrug/>
- <srchdrugnm/>
- </srchinfo>
- <req>
- <exptdeptdata/>
- <voldivdata/>
- <voldrugdata/>
- <srchdeptcd/>
- <srchdrugcd/>
- </req>
- </send>
- <init>
- <deptitem>
- <deptcd/>
- <deptnm/>
- </deptitem>
- <drugitem>
- <drugcd/>
- <drugnm/>
- </drugitem>
- <codelist>
- <unit/>
- </codelist>
- </init>
- <hidden>
- <count/>
- <exptitem/>
- <voldivitem/>
- <voldrugitem/>
- </hidden>
- <temp>
- <receivedata>
- <receiveref>/root/temp/receivedata/drugcd</receiveref>
- <drugcd/>
- <drugnm/>
- <comcd/>
- </receivedata>
- </temp>
- </root>
- </instance>
- <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" src="../../../ast/commonweb/js/AST.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- <submission id="TRADB02601" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/main/exptdeptlist"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
-
- // 권한 관리
- btn_save.disabled =! checkAuth("X"); // 저장
- grd_voldruglist.backcoloralternate = "transparent";
-
- //환산단위 기준자료조회.
- zbcfGetCodeList(new Array("A0599"), new Array("/root/init/codelist/unit"));
-
- fGetVolDivList();
- for(var i = grd_voldruglist.colRef("drugcd"); i < grd_voldruglist.cols; i++){
- grd_voldruglist.mergeCol(i) = false;
- }
- model.refresh();
- ]]>
- </script>
- <submission id="TRADB02602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main/voldruglist"/>
- <submission id="TXADB02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden/count"/>
- <submission id="TRADB02603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/init/deptitem"/>
- <submission id="TRADB02604" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/init/drugitem"/>
- <submission id="TRZBC00101"/>
- <script type="javascript">
- <![CDATA[
- function fGetVolDivList() {
- grd_voldruglist.rebuildStyle();
- submit("TRADB02601", false);
- submit("TRADB02602", false);
- grd_exptdeptlist.clearStatus();
- grd_voldruglist.clearStatus();
- model.refresh();
- /*
- if (model.getValue("/root/main/voldivlist/voldivitem[1]/voldivflag") != "") {
- grd_voldivlist.row= 1;
- grd_voldivlist.dispatch("onclick");
- model.refresh();
- }
- */
- }
-
- function fOpenDrugSrch() {
- // 약품코드 검색
- modal("SPADB60100",0,100,150,"SPADB60100","/root/temp/receivedata","/root/temp/receivedata");
- var drugcode = model.getValue("/root/temp/receivedata/drugcd");
- // 약품명 검색
- if (drugcode != "") {
- model.makeValue("/root/send/srchinfo/srchdrug",drugcode);
- }
-
- ipt_srchdrugcd.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="caption1" class="tit_1" style="left:65px; top:75px; width:106px; height:13px; ">용량분할관리</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1194px; height:744px; ">
- <datagrid id="grd_voldruglist" nodeset="/root/main/voldruglist/voldrugitem" caption="caption1^관리구분^관리코드^약품코드^약품명^적용순서^기준용량^기준단위^큰함량단위용량^관리구분^saveflag^관리코드^기관코드" colsep="^" colwidth="100, 60, 59, 113, 356, 56, 57, 55, 91, 100, 100" explorerbar="sortshow" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:295px; top:89px; width:885px; height:619px; ">
- <col ref="divcd" type="input" visibility="hidden"/>
- <col disabled="true" ref="voldivflag" type="combo">
- <choices>
- <item>
- <label>항암</label>
- <value>A</value>
- </item>
- <item>
- <label>일반</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col ref="voldivcd" type="input" _key="true"/>
- <col ref="drugcd" type="inputbutton" _key="true"/>
- <col ref="drugnm" _key="true"/>
- <col ref="seqno" type="input" style="text-align:right; "/>
- <col ref="basevol" type="input" style="text-align:right; "/>
- <col ref="basevolunit" type="combo">
- <choices>
- <itemset nodeset="/root/init/codelist/unit/A0599">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="nextvol" type="input" style="text-align:right; "/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="saveflag" visibility="hidden"/>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- var grdrow= grd_voldruglist.row;
- var grdcol = grd_voldruglist.col;
- var srchdrugcd = "";
-
- if(event.keyCode == "13") {
- if(grd_voldruglist.mouseCol == grd_voldruglist.colRef("drugcd")){
- srchdrugcd = model.getValue("/root/main/voldruglist/voldrugitem["+grd_voldruglist.row+"]/drugcd");
- if (srchdrugcd == "") {
- messageBox("약품코드를", "C001");
- }
-
- model.setValue("/root/send/req/srchdrugcd",srchdrugcd.toUpperCase());
- submit("TRADB02604");
- model.setValue("/root/main/voldruglist/voldrugitem["+grd_voldruglist.row+"]/drugcd" ,model.getValue("/root/init/drugitem/drugcd") );
- model.setValue("/root/main/voldruglist/voldrugitem["+grd_voldruglist.row+"]/drugnm" ,model.getValue("/root/init/drugitem/drugnm") );
- }
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- var row = grd_voldruglist.row;
- if(grd_voldruglist.rowStatus(row) == 1) {
- var drugcode = null;
- var drugnm = model.getValue("/root/main/hbookinfo/druglist["+row+"]/drugnm");
-
- if(grd_voldruglist.col == grd_voldruglist.colRef("drugcd")){
- // 약품코드 검색
- modal("SPADB60100",0,100,150,"SPADB60100","/root/temp/receivedata","/root/temp/receivedata");
- drugcode = model.getValue("/root/temp/receivedata/drugcd");
- // 약품명 검색
- if (drugcode != "") {
- model.setValue("/root/main/voldruglist/voldrugitem["+row+"]/drugcd",drugcode);
- model.setValue("/root/send/req/srchdrugcd",drugcode);
- if(submit("TRADB02604",false)){
-
- var n_drugcd = model.getValue("/root/init/drugitem/drugcd");
- var n_drugnm = model.getValue("/root/init/drugitem/drugnm");
- var o_drugcd = model.getValue("/root/main/voldruglist/voldrugitem["+row+"]/drugcd");
- var o_drugnm = model.getValue("/root/main/voldruglist/voldrugitem["+row+"]/drugnm");
-
- if(o_drugcd != n_drugcd || o_drugnm != n_drugnm){
- model.setValue("/root/main/voldruglist/voldrugitem["+row+"]/drugcd" , n_drugcd);
- model.setValue("/root/main/voldruglist/voldrugitem["+row+"]/drugnm" , n_drugnm);
- grd_voldruglist.addStatus(grd_voldruglist.row, "update"); // 조회된 사항이 이전데이터와 상이할 때 UPDATE 상태로 변경
- }
-
- model.setValue("/root/temp/receivedata/drugcd","");
- model.setValue("/root/temp/receivedata/drugnm","");
- model.setValue("/root/temp/receivedata/comcd","");
-
-
- }
- }
- }
- model.refresh();
- } else {
- messageBox("약품코드는 추가 및 삭제만 가능 합니다.", "I999");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keyCode == "46"){
- btn_grddel3.dispatch("DOMActivate");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var sSaveflag = model.getValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/saveflag");
- var sVoldivflag = model.getValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/voldivflag");
- var sVoldivcd = model.getValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/voldivcd");
- var sBaseVolUnit = model.getValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/basevolunit");
-
- if(grd_voldruglist.col == grd_voldruglist.colRef("basevolunit")) {
- for(var iRow = 1 ; iRow <= getNodesetCount("/root/main/voldruglist/voldrugitem") ; iRow++) {
- if(model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/voldivflag") == sVoldivflag
- && model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/voldivcd") == sVoldivcd) {
-
- model.setValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/basevolunit", sBaseVolUnit);
-
- if(model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/saveflag") == "N"
- || model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/saveflag") == "M") {
- grd_voldruglist.rowStatus(iRow) = 1;
- } else {
- grd_voldruglist.rowStatus(iRow) = 2;
- }
-
- }
- }
- }
-
- if((sSaveflag == "N") || (sSaveflag == "M")) {
- grd_voldruglist.rowStatus(grd_voldruglist.row) = 1;
- }
-
- grd_voldruglist.refresh();
- ]]>
- </script>
- </datagrid>
- <caption id="caption2" class="tit_2" style="left:300px; top:45px; width:144px; height:13px; ">상세적용</caption>
- <caption id="caption4" class="tit_2" style="left:5px; top:45px; width:144px; height:13px; ">전체적용</caption>
- <caption id="caption14" class="cell_1" style="left:0px; top:65px; width:67px; height:23px; vertical-align:middle; ">제외진료과</caption>
- <line id="line1" class="line_1" style="x1:295px; y1:60px; x2:1180px; y2:60px; "/>
- <line id="line2" class="line_1" style="x1:0px; y1:60px; x2:290px; y2:60px; "/>
- <line id="line4" class="line_3" style="x1:5px; y1:742px; x2:1185px; y2:742px; "/>
- <datagrid id="grd_exptdeptlist" nodeset="/root/main/exptdeptlist/exptdeptitem" visibility="visible" caption="과코드^진료과명^기관코드" colsep="^" colwidth="93, 154, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:89px; width:290px; height:651px; ">
- <col ref="exptorddeptcd" type="inputbutton" _key="true"/>
- <col ref="exptorddeptnm" _key="true"/>
- <col ref="instcd" visibility="hidden"/>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- var row= grd_exptdeptlist.row;
- var col = grd_exptdeptlist.col;
- var srchdeptcd = "";
-
- if(event.keyCode == "13") {
- srchdeptcd = model.getValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptcd");
- if (srchdeptcd == "") {
- messageBox("제외진료과를", "C001");
- }
-
- model.setValue("/root/send/req/srchdeptcd",srchdeptcd);
- submit("TRADB02603",false);
- model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptcd" ,model.getValue("/root/init/deptitem/deptcd") );
- model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptnm",model.getValue("/root/init/deptitem/deptnm" ));
- model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/instcd" ,model.getValue("/root/init/deptitem/instcd" ));
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- var row= grd_exptdeptlist.row;
-
- //수정은 불가하고 추가 및 삭제 만 가능.
- if(grd_exptdeptlist.rowStatus(row) == 1) {
- var search_condition = "deptnm";
- var search_term = ""; // model.getValue("/root/main/sample1/deptcd");
- var receive_deptcd_path = "/root/init/deptitem/deptcd";
- var receive_deptnm_path = "/root/init/deptitem/deptnm";
- var standard_yn = "orduseyn";
- var ord_deptflag = ""; //D
- model.setValue("/root/init/deptitem/deptcd","");
- model.setValue("/root/init/deptitem/deptnm","");
- zbcfOpenInstDeptCodeList(search_condition, search_term, receive_deptcd_path, receive_deptnm_path, standard_yn, ord_deptflag);
- if (model.getValue("/root/init/deptitem/deptcd")!=""){
- model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptcd" ,model.getValue("/root/init/deptitem/deptcd") );
- model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptnm" ,model.getValue("/root/init/deptitem/deptnm") );
- }
-
- model.refresh();
- } else {
- messageBox("추가 및 삭제만 가능 합니다.", "I999");
- }
-
- ]]>
- </script>
- </datagrid>
- <caption id="caption3" class="cell_1" style="left:295px; top:65px; width:79px; height:23px; ">관리구분코드</caption>
- <button id="btn_grdadd1" class="btn2_letter3" style="left:182px; top:69px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_exptdeptlist.addItem();
- ]]>
- </script>
- </button>
- <button id="btn_grdcopy1" class="btn2_letter3" visibility="hidden" style="left:80px; top:65px; width:53px; height:19px; ">
- <caption>행복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var grdrow = grd_exptdeptlist.row;
- model.copyNode("/root/hidden/exptitem","/root/main/exptdeptlist/exptdeptitem["+ grdrow +"]");
- grd_exptdeptlist.insertItem(grdrow);
- model.copyNode("/root/main/exptdeptlist/exptdeptitem["+ grdrow +"]","/root/hidden/exptitem");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_grddel1" class="btn2_letter3" style="left:237px; top:69px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_exptdeptlist.addStatus(grd_exptdeptlist.row,"delete");
- ]]>
- </script>
- </button>
- <button id="btn_grdadd2" class="btn2_letter3" visibility="hidden" style="left:382px; top:69px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_voldivlist.insertRow(grd_voldivlist.row, "below", false, true);
-
- // insertRow 실행 후 그리드상의 포커스 이동됨.
-
- grd_voldivlist.valueMatrix(grd_voldivlist.row, grd_voldivlist.colRef("drugcd")) = "ZZZZZZZZZZZZ";
- grd_voldivlist.valueMatrix(grd_voldivlist.row, grd_voldivlist.colRef("seqno")) = "0";
- grd_voldivlist.valueMatrix(grd_voldivlist.row, grd_voldivlist.colRef("basevol")) = "0";
- grd_voldivlist.valueMatrix(grd_voldivlist.row, grd_voldivlist.colRef("nextvol")) = "0";
- /*
- model.setValue("/root/main/voldivlist/voldivitem["+row+"]/drugcd" ,"ZZZZZZZZZZZZ");
- model.setValue("/root/main/voldivlist/voldivitem["+row+"]/seqno" ,0);
- model.setValue("/root/main/voldivlist/voldivitem["+row+"]/basevol",0);
- model.setValue("/root/main/voldivlist/voldivitem["+row+"]/nextvol" ,0);
- */
- grd_voldivlist.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_grdadd3" class="btn2_letter3" style="left:1017px; top:69px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- // 그리드상에 포커스가 존재하지 않을시
- var BeforeRow = grd_voldruglist.row;
- if(BeforeRow == "-1"){
- BeforeRow = "1";
- }
-
- if(model.getValue("/root/main/voldruglist/voldrugitem["+ BeforeRow +"]/voldivflag") == ""
- || model.getValue("/root/main/voldruglist/voldrugitem["+ BeforeRow +"]/voldivcd") == "") {
- messageBox("관리구분, 관리코드를 입력하여 주세요.", "I999");
- return;
- }
-
- grd_voldruglist.insertRow(BeforeRow, "below", false, true);
-
- var currentRow = grd_voldruglist.row;
-
- grd_voldruglist.valueMatrix(currentRow, grd_voldruglist.colRef("voldivflag")) = grd_voldruglist.valueMatrix(BeforeRow, grd_voldruglist.colRef("voldivflag"));
- grd_voldruglist.valueMatrix(currentRow, grd_voldruglist.colRef("voldivcd")) = grd_voldruglist.valueMatrix(BeforeRow, grd_voldruglist.colRef("voldivcd"));
- grd_voldruglist.isReadOnly(currentRow, grd_voldruglist.colRef("voldivcd")) = true;
- model.setValue("/root/main/voldruglist/voldrugitem["+ currentRow +"]/saveflag", "M");
- grd_voldruglist.refresh();
-
- ]]>
- </script>
- </button>
- <button id="btn_grdcopy2" class="btn2_letter3" visibility="hidden" style="left:437px; top:69px; width:53px; height:19px; ">
- <caption>행복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var grdrow = grd_voldivlist.row;
- model.copyNode("/root/hidden/voldivitem","/root/main/voldivlist/voldivitem["+ grdrow +"]");
- grd_voldivlist.insertItem(grdrow);
- model.copyNode("/root/main/voldivlist/voldivitem["+ grdrow +"]","/root/hidden/voldivitem");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_grdcopy3" class="btn2_letter3" style="left:1072px; top:69px; width:53px; height:19px; ">
- <caption>행복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var grdrow = grd_voldruglist.row;
-
- if(model.getValue("/root/main/voldruglist/voldrugitem["+ grdrow +"]/voldivflag") == ""
- || model.getValue("/root/main/voldruglist/voldrugitem["+ grdrow +"]/voldivcd") == "") {
- messageBox("관리구분, 관리코드를 입력하여 주세요.", "I999");
- return;
- }
-
- model.copyNode("/root/hidden/voldrugitem","/root/main/voldruglist/voldrugitem["+ grdrow +"]");
- grd_voldruglist.insertItem(grdrow);
- model.copyNode("/root/main/voldruglist/voldrugitem["+ grdrow +"]","/root/hidden/voldrugitem");
- model.setValue("/root/main/voldruglist/voldrugitem["+ grdrow+"]/saveflag", "M");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_grddel2" class="btn2_letter3" visibility="hidden" style="left:492px; top:69px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_voldivlist.addStatus(grd_voldivlist.row,"delete");
- ]]>
- </script>
- </button>
- <button id="btn_grddel3" class="btn2_letter3" style="left:1127px; top:69px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var col = grd_voldruglist.colRef("seqno");
- var cnt = 1;
- // 선택한 행들에 대한 상태변경
- /*
- var selectedRows = Array(grd_voldruglist.selectedRows);
- for(var i = 0; i < grd_voldruglist.selectedRows; i++){
- selectedRows[i] = grd_voldruglist.selectedRow(i);
- }
-
- for(var i = selectedRows.length-1; i >= 0 ; i--){
- rowIdx = selectedRows[i];
- var row_status = grd_voldruglist.rowStatus(rowIdx);
- if(row_status == 1 || row_status == 3) {
- grd_voldruglist.deleteRow(rowIdx, false);
- }else{
- grd_voldruglist.addStatus(rowIdx, "delete");
- grd_voldruglist.rowStyle(rowIdx, "data", "background-color") = "#ffff00"
- }
- }
- */
- rowIdx = grd_voldruglist.row;
- var row_status = grd_voldruglist.rowStatus(rowIdx);
- if(row_status == 1 || row_status == 3) {
- grd_voldruglist.deleteRow(rowIdx, false);
- }else{
- grd_voldruglist.addStatus(rowIdx, "delete");
- grd_voldruglist.rowStyle(rowIdx, "data", "background-color") = "#ffff00"
- }
-
- // 삭제된 행을 제외한 나머지에 대하여 적용순서 변경
- // 순차적으로 증가
- for(var i = grd_voldruglist.fixedRows; i < grd_voldruglist.rows; i++){
- // 선택한 행의 같은 관리 코드인 항목에 한해서..
- if(grd_voldruglist.valueMatrix(grd_voldruglist.row, grd_voldruglist.colRef("voldivcd")) == grd_voldruglist.valueMatrix(i, grd_voldruglist.colRef("voldivcd"))){
- if(grd_voldruglist.rowStatus(i) != "4"){
- grd_voldruglist.valueMatrix(i, col) = cnt;
- cnt ++;
- }
- }
- }
- grd_voldruglist.refresh();
- ]]>
- </script>
- </button>
- <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:295px; top:710px; width:185px; height:30px; background-color:transparent; border-color:#7cbbdd; border-style:solid; "/>
- <caption id="caption47" class="cell_2" style="left:302px; top:715px; width:70px; height:20px; ">범 례</caption>
- <caption id="caption32" style="left:380px; top:718px; width:44px; height:14px; color:#008000; vertical-align:middle; ">항암(A)</caption>
- <caption id="caption8" style="left:430px; top:718px; width:48px; height:14px; color:#008000; vertical-align:middle; ">일반(N)</caption>
- <caption id="caption6" class="cell_1" style="left:456px; top:65px; width:79px; height:23px; ">분할코드내역</caption>
- <group id="group2" style="left:0px; top:3px; width:1180px; height:37px; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1180px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line13" style="x1:1098px; y1:7px; x2:1098px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption10" class="search_name" style="left:5px; top:9px; width:95px; height:17px; ">약품코드 :</caption>
- <button id="btn_sea" class="btn1_letter2" style="left:1110px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetVolDivList();
- ]]>
- </script>
- </button>
- <input id="ipt_srchdrugcd" ref="/root/send/srchinfo/srchdrug" class="input_search" inputtype="button" style="left:96px; top:8px; width:140px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == 13) {
- model.setValue("/root/send/srchinfo/srchdrug", ipt_srchdrugcd.currentText);
- ipt_srchdrugcd.refresh();
-
- fGetVolDivList();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- fOpenDrugSrch();
- ]]>
- </script>
- </input>
- <caption id="caption5" class="search_name" style="left:265px; top:10px; width:95px; height:17px; ">약품명 :</caption>
- <input id="ipt_srchdrugnm" ref="/root/send/srchinfo/srchdrugnm" class="input_search" style="left:344px; top:8px; width:466px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == 13) {
- model.setValue("/root/send/srchinfo/srchdrugnm", ipt_srchdrugnm.currentText);
- ipt_srchdrugnm.refresh();
-
- fGetVolDivList();
- }
- ]]>
- </script>
- </input>
- </group>
- <button id="btn_grdadd" class="btn2_letter4" style="left:951px; top:69px; width:64px; height:19px; ">
- <caption>신규추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_voldruglist.addItem();
- grd_voldruglist.bottomRow = grd_voldruglist.row;
- model.setValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/saveflag", "N");
- ]]>
- </script>
- </button>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1194px; height:27px; ">
- <button id="btn_cle" class="btn4_letter4" visibility="hidden" style="left:1030px; top:5px; width:80px; height:22px; ">
- <caption>새로고침</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetVolDivList();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:1124px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var updtdata1 = getGridUpdateData(grd_exptdeptlist);
- //var updtdata2 = getGridUpdateData(grd_voldivlist);
- var updtdata3 = getGridUpdateData(grd_voldruglist);
- var sSaveFlag = "";
-
- //if (updtdata1 == "" && updtdata2 == "" && updtdata3 == "") {
- if (updtdata1 == "" && updtdata3 == "") {
- messageBox("변경된 데이터가","I004");
- return;
- }
-
- for(var iRow = 1 ; iRow <= getNodesetCount("/root/main/voldruglist/voldrugitem") ; iRow++) {
- sSaveFlag = model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/saveflag");
- if(sSaveFlag == "N" || sSaveFlag == "M") {
- if(model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/basevolunit") == "") {
- messageBox("[" + model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/drugcd") + "] " + "기준단위는 ","I003");
- return;
- }
- }
- }
-
- // 제외진료과 필수사항체크
- if (checkKeyColumn("grd_exptdeptlist") == false) return;
-
- // 관리구분코드 필수사항체크
- //if (checkKeyColumn("grd_voldivlist") == false) return;
-
- // 분할코드내역 필수사항체크
- if (checkKeyColumn("grd_voldruglist") == false) return;
-
- model.setValue( "/root/send/req/exptdeptdata", grd_exptdeptlist.getUpdateData());
- //model.setValue( "/root/send/req/voldivdata" , grd_voldivlist.getUpdateData());
- model.setValue( "/root/send/req/voldrugdata" , grd_voldruglist.getUpdateData());
-
- if(submit("TXADB02601")) {
- fGetVolDivList();
- }
- //submit("TRADB02601");
-
- //btn_cle.dispatch("DOMActivate");
- //grd_voldivlist.dispatch("onclick");
- //model.refresh();
- //messageBox("용량분할 자료처리가", "I002");
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|