123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- * 제 목 : SMLBT12000_혈액출고관리.xrw
- * 설 명 : 혈액출고관리
- * 설 계 자 :
- * 작 성 자 : 김성희
- * 작 성 일 : 2008.07.28
- * 수정이력: 2010.03.24 박정은 출고취소기능 추가
- * 기 타 :
- -->
- <?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>
- <main>
- <delivepsninfo>
- <delivepid/>
- <delivenm/>
- </delivepsninfo>
- <bloddelive>
- <bloddelivelist>
- <chk/>
- <blodno/>
- <blodcomcd/>
- <blodbarcd/>
- <abo/>
- <windt/>
- <validt/>
- <delivedt/>
- <deliveid/>
- <delivekindcd/>
- <delivekindresn/>
- <instcd/>
- <iokind/>
- <iokindresn/>
- </bloddelivelist>
- </bloddelive>
- <temp>
- <bloddelivelist>
- <chk/>
- <blodno/>
- <blodcomcd/>
- <blodbarcd/>
- <abo/>
- <windt/>
- <validt/>
- <delivedt/>
- <deliveid/>
- <delivekindcd/>
- <delivekindresn/>
- <instcd/>
- </bloddelivelist>
- </temp>
- <tempcc>
- <bloddelivelist>
- <chk/>
- <blodno/>
- <blodcomcd/>
- <blodbarcd/>
- <abo/>
- <windt/>
- <validt/>
- <delivedt/>
- <deliveid/>
- <delivekindcd/>
- <delivekindresn/>
- <instcd/>
- <iokind/>
- <iokindresn/>
- </bloddelivelist>
- </tempcc>
- </main>
- <send>
- <codeflag/>
- <delivepid/>
- <grddata/>
- <data>
- <startdt/>
- <enddt/>
- <blodcomcd/>
- <blodbarcd/>
- <blodno/>
- </data>
- </send>
- <init>
- </init>
- <hidden>
- <ref>
- <delivekindcd>00</delivekindcd>
- <delivekindresn>00</delivekindresn>
- <delivepid/>
- <delivenm/>
- <blodno/>
- <startdt/>
- <enddt/>
- <blodcomcd/>
- <searchgbn/>
- <blodcomcdcc>00</blodcomcdcc>
- <blodnocc/>
- </ref>
- <stat>1</stat>
- <stat2/>
- </hidden>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fSetInit();
- ]]>
- </script>
- <!-- 출고유형 사유코드 조회-->
- <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0801"/>
- <submission id="TRLBT12101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/delivepsninfo"/>
- <submission id="TRLBT12102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/bloddelive"/>
- <submission id="TRLBT12103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/temp"/>
- <submission id="TRLBT12104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/tempcc"/>
- <submission id="TXLBT12101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
- <submission id="TXLBT12102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
- </model>
- <script type="javascript">
- <![CDATA[
- /* @group : 초기화
- * @ver : 2008.08.18
- * @by : 김성희
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화 Function
- */
- function fSetInit() {
-
- model.removeNodeset("/root/init/LB0801");
- model.removeNodeset("/root/init/LB0802");
- model.removeNodeset("/root/init/LB0803");
- model.removeNodeset("/root/main/bloddelive/bloddelivelist");
- model.removeNodeset("/root/main/temp/bloddelivelist");
-
- var toDay = getCurrentDate();
-
- model.setValue("/root/hidden/ref/startdt", toDay);
- model.setValue("/root/hidden/ref/enddt", toDay);
-
- model.setValue("/root/hidden/ref/delivepid", "");
- model.setValue("/root/hidden/ref/delivenm", "");
-
- // 초기정보 조회
- model.setValue("/root/send/codeflag", "0801|0802|0803|");
- submit("TRLZZ00101");
-
- //데이타 초기화
- cmb_delivekindcd.select(0);
- cmb_delivekindresn.select(0);
- cmb_blodcomcd.select(0);
-
- //출고유형별 사유코드 비활성화
- cmb_delivekindresn.disabled = true;
-
- grd_bloddelivelist.colHidden(9) = false;
- grd_bloddelivelist.colHidden(10) = false;
- grd_bloddelivelist.colHidden(11) = true;
- grd_bloddelivelist.colHidden(12) = true;
- model.setFocus("ipt_delivepid");
- }
-
- /* @group : 출고유형 콤보 셋팅
- * @ver : 2008.08.18
- * @by : 김성희
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 출고유형, 출고유형 사유 코드 셋팅
- */
- function fSetDeliveKindCd(){
- var delivekindcd = model.getValue("/root/hidden/ref/delivekindcd");
- //출고유형 선택 하지 않았을때
- if(delivekindcd == "00"){
- //출고유형별 사유코드 비활성화
- cmb_delivekindresn.disabled = true;
- model.setValue("/root/hidden/ref/delivekindresn" , "00");
- cmb_delivekindresn.choices.itemset.attribute("nodeset") = "/root/init/LB0802[etc01= '00']";
-
- //출고유형 선택시 유형별 사유코드 조회
- }else{
- //출고유형별 사유코드 활성화
- cmb_delivekindresn.disabled = false;
- model.setValue("/root/hidden/ref/delivekindresn" , "00");
- cmb_delivekindresn.choices.itemset.attribute("nodeset") = "/root/init/LB0802[etc01= '00' or etc01='"+ delivekindcd +"']";
-
- }
-
- cmb_delivekindresn.refresh();
- //fSetDeliveKindRsen();
- }
-
- function fSetDeliveKindRsen(){
- var searchgbn = model.getValue("/root/hidden/ref/searchgbn");
- if(searchgbn == "blodno"){
- var delivekindcd = model.getValue("/root/hidden/ref/delivekindcd");
- var delivekindresn= model.getValue("/root/hidden/ref/delivekindresn");
- grd_bloddelivelist.cellComboNodeset(grd_bloddelivelist.row ,grd_bloddelivelist.colRef("delivekindresn")) = "/root/init/LB0802[etc01= '"+ delivekindcd +"']";
- if(delivekindcd == "00"){
- model.setValue("/root/main/bloddelive/bloddelivelist["+grd_bloddelivelist.row+"]/delivekindcd", "");
- }else{
- model.setValue("/root/main/bloddelive/bloddelivelist["+grd_bloddelivelist.row+"]/delivekindcd", delivekindcd);
- }
-
- if(delivekindresn == "00"){
- model.setValue("/root/main/bloddelive/bloddelivelist["+grd_bloddelivelist.row+"]/delivekindresn", "");
- }else{
- model.setValue("/root/main/bloddelive/bloddelivelist["+grd_bloddelivelist.row+"]/delivekindresn", delivekindresn);
- }
- }
-
- }
-
- /* @group : 키이벤트
- * @ver : 2008.08.18
- * @by : 김성희
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 엔터키 입력시
- */
- function fKeyEvent(){
- if(event.keyCode == "13"){
- //-------------------------------------
- //출고자 엔터키 입력시
- if(event.target == "ipt_delivepid"){
- fGetDelivePsn();
- model.setFocus("ipt_blodno");
- }
-
- //-------------------------------------
- //혈액번호 리딩시
- if(event.target == "ipt_blodno"){
-
- model.setValue("/root/hidden/ref/blodno", "");
- model.setValue("/root/hidden/ref/blodno", (ipt_blodno.currentText).substr(0,10));
-
-
- if(model.getValue("/root/hidden/ref/blodcomcd") == "00"){
- messageBox("혈액성분을 선택해주십시오.", "I");
- return;
- }
-
- fGetBlodDeliveList("blodno");
-
- model.setValue("/root/hidden/ref/blodno", "");
- ipt_blodno.refresh();
-
- model.setFocus("ipt_blodno");
-
- ipt_blodno.selBegin = 0;
- ipt_blodno.selEnd = ipt_blodno.currentText.length;
- }
-
-
- if(event.target =="ipt_cancelblod"){ // 출고취소 혈액번호 리딩시
-
- if(model.getValue("/root/hidden/ref/blodcomcdcc") == "00"){
- messageBox("혈액성분을 선택해주십시오.", "I");
- return;
- }
-
- model.setValue("/root/hidden/ref/blodnocc", "");
- model.setValue("/root/hidden/ref/blodnocc", (ipt_cancelblod.currentText).substr(0,10));
- model.setValue("/root/hidden/ref/searchgbn", "blodno");
- fGetBlodDeliveListcc("blodno");
-
- model.setFocus("ipt_cancelblod");
-
- }
- }
-
- }
-
- /* @group : 출고자 조회
- * @ver : 2008.08.18
- * @by : 김성희
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 출고자 조회
- */
- function fGetDelivePsn(){
- model.setValue("/root/hidden/ref/delivepid", (ipt_delivepid.currentText).toUpperCase());
-
- model.setValue("/root/send/delivepid", model.getValue("/root/hidden/ref/delivepid"));
-
- submit("TRLBT12101");
-
- model.setValue("/root/hidden/ref/delivenm", model.getValue("/root/main/delivepsninfo/delivenm"));
- opt_delivenm.refresh();
-
- if(opt_delivenm.value == ""){
- model.setFocus("ipt_delivepid");
-
- ipt_delivepid.selBegin = 0;
- ipt_delivepid.selEnd = ipt_delivepid.currentText.length;
- }else{
- model.setFocus("ipt_blodbarcd");
- }
-
- }
-
- /* @group : 혈액출고 조회
- * @ver : 2008.08.18
- * @by : 김성희
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액출고 조회
- */
- function fGetBlodDeliveList(ref){
- grd_bloddelivelist.rebuildStyle();
- var blodcomcd = model.getValue("/root/hidden/ref/blodcomcd");
- var blodbarcd = model.getValue("/root/init/LB0803[cd='"+ blodcomcd +"']/etc01");
- var searchgbn = model.getValue("/root/hidden/ref/searchgbn");
- var returnValue ="";
-
- //// if(model.getValue("/root/hidden/stat")=="2"){
- //// var stat2 = model.getValue("/root/hidden/stat2");
- //// fSetgrdstat(stat2);
- //// model.setValue("/root/hidden/stat","1");
- //// model.refresh();
- //// }
-
- //-------------------------------------
- //조회버튼 클릭시
- if(ref == "btn"){
-
- //전체 체크박스
- grd_bloddelivelist.fixedcellcheckbox(0,1)= false;
- grd_bloddelivelist.colHidden(9) = false;
- grd_bloddelivelist.colHidden(10) = false;
- grd_bloddelivelist.colHidden(11) = true;
- grd_bloddelivelist.colHidden(12) = true;
-
- if(model.getValue("/root/hidden/ref/startdt") == "" || model.getValue("/root/hidden/ref/enddt") == ""){
- messageBox("출고일자를 입력해주십시오.", "I");
- return;
- }
-
- model.setValue("/root/send/data/startdt" , model.getValue("/root/hidden/ref/startdt"));
- model.setValue("/root/send/data/enddt" , model.getValue("/root/hidden/ref/enddt"));
- model.setValue("/root/send/data/blodcomcd" , blodcomcd);
- model.setValue("/root/send/data/blodbarcd" , blodbarcd);
-
- grd_bloddelivelist.colDisabled(1) = true;
-
- /*if(searchgbn == "blodno"){
- //Q010=초기화 하시겠습니까? retrun yes=6, no=7
- returnValue = messageBox("출고중인 혈액이 있습니다. \n출고중인 혈액을","Q010");
- }
- //-------------------------------------------------------------------
- if(returnValue == "7"){ //혈액출고 계속 진행
-
- return false;
-
- }else if(returnValue == "6"){
- return true;
- } */
-
- model.setValue("/root/hidden/ref/searchgbn", ref);
- submit("TRLBT12102");
-
-
- //------------------------------------
- //혈액번호 바코드 리딩시
- }else if(ref == "blodno"){
-
- //전체 체크박스
- grd_bloddelivelist.fixedcellcheckbox(0,1)= true;
-
- grd_bloddelivelist.colHidden(9) = true;
- grd_bloddelivelist.colHidden(10) = true;
- grd_bloddelivelist.colHidden(11) = false;
- grd_bloddelivelist.colHidden(12) = false;
-
- if(model.getValue("/root/hidden/ref/delivekindcd") == "00" || model.getValue("/root/hidden/ref/delivekindresn") == "00"){
- messageBox("출고유형을 선택해주십시오.", "I");
- return;
- }
-
- var cnt = 0;
- var rows = 0;
-
- model.setValue("/root/send/data/blodno" , model.getValue("/root/hidden/ref/blodno"));
- model.setValue("/root/send/data/blodbarcd" , blodbarcd);
-
- grd_bloddelivelist.colDisabled(1) = false;
-
- submit("TRLBT12103");
-
- var tmpcnt = getNodesetCount("/root/main/temp/bloddelivelist");
-
- if(searchgbn == "blodno"){
-
- //cnt = getNodesetCount("/root/main/bloddelive/bloddelivelist");
- rows = grd_bloddelivelist.rows;
- //if(cnt == 0) {
- // model.removeNodeset("/root/main/bloddelive/bloddelivelist");
- // model.refresh();
- // copyNodeType("/root/main/bloddelive", "/root/main/temp", "replace");
- //}else if(cnt > 0){
- //alert("22222");
- copyNodeType("/root/main/bloddelive", "/root/main/temp", "after");
- //}
-
- }else {
- rows = 1;
- model.removeNodeset("/root/main/bloddelive/bloddelivelist");
- model.refresh();
- copyNodeType("/root/main/bloddelive", "/root/main/temp", "replace");
- //alert("3333");
-
- }
- if(tmpcnt > 0){
- var delivekindcd = model.getValue("/root/hidden/ref/delivekindcd");
- var delivekindresn= model.getValue("/root/hidden/ref/delivekindresn");
- model.setValue("/root/main/bloddelive/bloddelivelist["+rows+"]/delivekindcd", delivekindcd);
- grd_bloddelivelist.refresh();
- grd_bloddelivelist.cellComboNodeset(rows ,grd_bloddelivelist.colRef("delivekindresn")) = "/root/init/LB0802[etc01= '"+ delivekindcd +"']";
- grd_bloddelivelist.refresh();
- model.setValue("/root/main/bloddelive/bloddelivelist["+rows+"]/delivekindresn", delivekindresn);
- }
- grd_bloddelivelist.refresh();
-
-
- //grd_bloddelivelist.addRow(false);
-
- grd_bloddelivelist.row = (grd_bloddelivelist.rows-1);
-
- var gridRow = grd_bloddelivelist.rows; //===
- grd_bloddelivelist.topRow = gridRow;
-
- model.setValue("/root/hidden/ref/searchgbn", "blodno");
-
- }
- model.setValue("/root/hidden/stat2", "1");
- }
-
- /* @group : 혈액출고 취소 할 혈액 조회
- * @ver : 2010.03.12
- * @by : 박정은
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 출고 취소할 혈액 조회
- */
- function fGetBlodDeliveListcc(ref){
- //grd_bloddelivelist.rebuildStyle();
- grd_bloddelivelist.fixedcellcheckbox(0,1)= true;
-
- var blodcomcdcc = model.getValue("/root/hidden/ref/blodcomcdcc");
- var blodbarcdcc = model.getValue("/root/init/LB0803[cd='"+ blodcomcdcc +"']/etc01");
- //var searchgbn = model.getValue("/root/hidden/ref/searchgbn");
- //var returnValue ="";
-
- //-------------------------------------
- //혈액번호 바코드리딩 클릭시
- if(ref == "blodno"){
-
- //// if(model.getValue("/root/hidden/stat")=="1"){
- //// var stat2 = model.getValue("/root/hidden/stat2");
- //// fSetgrdstat(stat2);
- //// model.setValue("/root/hidden/stat","2");
- //// model.refresh();
- //// }
- model.makeValue("/root/send/data/blodnocc" , model.getValue("/root/hidden/ref/blodnocc"));
- model.makeValue("/root/send/data/blodbarcdcc" , blodbarcdcc);
-
- submit("TRLBT12104");
-
- grd_bloddelivelist.colHidden(9) = true;
- grd_bloddelivelist.colHidden(10) = true;
- grd_bloddelivelist.colHidden(11) = false;
- grd_bloddelivelist.colHidden(12) = false;
-
- if(getNodesetCount("/root/main/tempcc/bloddelivelist") > 0){ // 취소할 혈액 조회되면
- //grd_bloddelivelist.addRow();
- //copyNodeType("/root/main/bloddelive", "/root/main/tempcc", "replace");
- var tblodno = model.getValue("/root/main/tempcc/bloddelivelist/blodno");
- var tblodbarcd = model.getValue("/root/main/tempcc/bloddelivelist/blodbarcd");
-
-
-
- if(grd_bloddelivelist.rows > 1) { // 조회된 목록 있을때
-
- var findrow = grd_bloddelivelist.findRow(tblodno , 1, 2 , true, true);
-
-
- if(findrow<1){ // 혈액번호 없을때
- grd_bloddelivelist.addRow();
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/chk", "Y");
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodno", model.getValue("/root/main/tempcc/bloddelivelist/blodno"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodcomcd", model.getValue("/root/main/tempcc/bloddelivelist/blodcomcd"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodbarcd", model.getValue("/root/main/tempcc/bloddelivelist/blodbarcd"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/deliveid", model.getValue("/root/main/tempcc/bloddelivelist/deliveid"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivekindcd", model.getValue("/root/main/tempcc/bloddelivelist/delivekindcd"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivekindresn", model.getValue("/root/main/tempcc/bloddelivelist/delivekindresn"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/instcd", model.getValue("/root/main/tempcc/bloddelivelist/instcd"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/abo", model.getValue("/root/main/tempcc/bloddelivelist/abo"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/windt", model.getValue("/root/main/tempcc/bloddelivelist/windt"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/validt", model.getValue("/root/main/tempcc/bloddelivelist/validt"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivedt", model.getValue("/root/main/tempcc/bloddelivelist/delivedt"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivenm", model.getValue("/root/main/tempcc/bloddelivelist/delivenm"));
-
- grd_bloddelivelist.cellStyle("color", (grd_bloddelivelist.rows-1), 1, (grd_bloddelivelist.rows-1), 12) = "red";
- }else{ // 있을때
- model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/chk", "Y");
- model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/delivekindresn", model.getValue("/root/main/tempcc/bloddelivelist/delivekindresn"));
- model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/iokindresn", model.getValue("/root/main/tempcc/bloddelivelist/iokindresn"));
- model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/iokind", model.getValue("/root/main/tempcc/bloddelivelist/iokind"));
- model.setValue("/root/main/bloddelive/bloddelivelist["+findrow+"]/delivekindcd", model.getValue("/root/main/tempcc/bloddelivelist/delivekindcd"));
- grd_bloddelivelist.cellStyle("color", findrow, 1, findrow, 12) = "red";
- //grd_bloddelivelist.refresh();
- }
-
- }else{ // 그리드 내용 없을떄
- grd_bloddelivelist.addRow();
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/chk", "Y");
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodno", model.getValue("/root/main/tempcc/bloddelivelist/blodno"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodcomcd", model.getValue("/root/main/tempcc/bloddelivelist/blodcomcd"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/blodbarcd", model.getValue("/root/main/tempcc/bloddelivelist/blodbarcd"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/deliveid", model.getValue("/root/main/tempcc/bloddelivelist/deliveid"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivekindcd", model.getValue("/root/main/tempcc/bloddelivelist/delivekindcd"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivekindresn", model.getValue("/root/main/tempcc/bloddelivelist/delivekindresn"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/instcd", model.getValue("/root/main/tempcc/bloddelivelist/instcd"));
-
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/abo", model.getValue("/root/main/tempcc/bloddelivelist/abo"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/windt", model.getValue("/root/main/tempcc/bloddelivelist/windt"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/validt", model.getValue("/root/main/tempcc/bloddelivelist/validt"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivedt", model.getValue("/root/main/tempcc/bloddelivelist/delivedt"));
- model.makeValue("/root/main/bloddelive/bloddelivelist["+(grd_bloddelivelist.rows-1)+"]/delivenm", model.getValue("/root/main/tempcc/bloddelivelist/delivenm"));
-
- grd_bloddelivelist.cellStyle("color", (grd_bloddelivelist.rows-1), 1, (grd_bloddelivelist.rows-1), 12) = "red";
-
- }
-
- }
- model.refresh();
- // grd_bloddelivelist.row = (grd_bloddelivelist.rows-1);
- //grd_bloddelivelist.rowStatus(grd_bloddelivelist.row)=1;
- }
- model.setValue("/root/hidden/stat2", "2");
-
- //model.refresh();
- }
- /* @group : 혈액출고 조회
- * @ver : 2008.08.18
- * @by : 김성희
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액출고 조회
- */
- function fSaveBlodDelive(){
-
- if(model.getValue("/root/hidden/ref/delivepid") == "" || model.getValue("/root/hidden/ref/delivenm") == ""){
- messageBox("출고자를 입력하십시오." , "I");
- return;
- }
-
- var cnt = getNodesetCount("/root/main/bloddelive/bloddelivelist");
- var TF = false;
- var delivekindcd = "";
- var delivekindresn = "";
-
- for(iRow = 1; iRow <= cnt; iRow++){
- delivekindcd = model.getValue("/root/main/bloddelive/bloddelivelist["+iRow+"]/delivekindcd");
- delivekindresn = model.getValue("/root/main/bloddelive/bloddelivelist["+iRow+"]/delivekindresn");
-
- if(delivekindcd == "" || delivekindresn == ""){
- messageBox(iRow + "번째 행에 출고유형 및 사유가 누락되었습니다." , "I");
- return;
- }
-
- if(model.getValue("/root/main/bloddelive/bloddelivelist["+iRow+"]/chk") == "Y"){
- grd_bloddelivelist.addStatus(iRow, "insert");
- TF = true;
- }
- }
-
- if(TF){
- //alert(grd_bloddelivelist.getUpdateData("insert"));
- model.setValue("/root/send/grddata" , grd_bloddelivelist.getUpdateData("insert"));
- model.setValue("/root/send/delivepid", model.getValue("/root/hidden/ref/delivepid"));
- submit("TXLBT12101");
-
- grd_bloddelivelist.clearStatus();
- grd_bloddelivelist.refresh();
- }else{
- messageBox("저장 할 내역이 없습니다." , "I");
- return;
- }
-
- }
- // 출고취소
- function fSaveBlodDeliveCancel(){
-
- for(iRow = 1; iRow < grd_bloddelivelist.rows; iRow++){
-
- if(model.getValue("/root/main/bloddelive/bloddelivelist["+iRow+"]/chk")=="Y"){
- grd_bloddelivelist.rowStatus(iRow) = 1;
- }
- }
-
- //grd_bloddelivelist.refresh();
-
- if(grd_bloddelivelist.getUpdateData("insert") == ""){
- messageBox("저장 할 내역이 없습니다." , "I");
- return;
- }
-
- model.makeValue("/root/send/grddata" , grd_bloddelivelist.getUpdateData("insert"));
- //model.makeValue("/root/send/delivepid", model.getValue("/root/hidden/ref/delivepid"));
-
- submit("TXLBT12102");
-
- model.removeNodeset("/root/main/bloddelive/bloddelivelist");
-
- grd_bloddelivelist.clearStatus();
- grd_bloddelivelist.refresh();
- }
-
- // 그리드상태 설정
- function fSetgrdstat(ref){
- var stat = model.getValue("/root/hidden/stat"); // 라디오버튼
- var returnValue = "";
-
- if(grd_bloddelivelist.rows>1){
-
- if(stat == "1"){
- //alert("ref= " + ref);
- //Q010=초기화 하시겠습니까? retrun yes=6, no=7
- returnValue = messageBox("취소중인 혈액이 있습니다. \n취소중인 혈액을","Q010");
- }else if(stat =="2"){
- //alert("ref= " + ref);
- returnValue = messageBox("출고중인 혈액이 있습니다. \n출고중인 혈액을","Q010");
- }
-
- //-------------------------------------------------------------------
- if(returnValue == "7"){ //혈액출고 계속 진행
-
- return false;
-
- }else if(returnValue == "6"){
- model.removeNodeset("/root/main/bloddelive/bloddelivelist");
- model.refresh();
- return true;
- }
-
- }
-
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group4" style="left:0px; top:40px; width:1195px; height:744px; ">
- <caption id="caption11" class="tit_2" style="left:5px; top:105px; width:139px; height:13px; ">혈액출고 목록</caption>
- <line id="line7" class="line_1" style="x1:0px; y1:120px; x2:1194px; y2:120px; "/>
- <datagrid id="grd_bloddelivelist" nodeset="/root/main/bloddelive/bloddelivelist" caption="^혈액번호^성분제제^혈액형^입고일시^유효일시^출고일시^출고자^출고유형^사유^출고유형^사유^혈액바코드^기관코드" colsep="^" colwidth="35, 123, 138, 70, 117, 104, 100, 100, 100, 181, 100, 181,0, 0" dataheight="23" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:125px; width:1194px; height:608px; text-align:center; ">
- <col checkvalue="Y,N" ref="chk" type="checkbox"/>
- <col ref="blodno" type="input"/>
- <col disabled="true" ref="blodbarcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/LB0803">
- <label ref="nm"/>
- <value ref="etc01"/>
- </itemset>
- </choices>
- </col>
- <col ref="abo" style="text-align:center; "/>
- <col ref="windt" format="yyyy-mm-dd hh:nn"/>
- <col ref="validt" format="yyyy-mm-dd hh:nn"/>
- <col ref="delivedt" format="yyyy-mm-dd hh:nn"/>
- <col ref="delivenm"/>
- <col ref="iokind"/>
- <col ref="iokindresn"/>
- <col disabled="true" ref="delivekindcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/LB0801">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" ref="delivekindresn" type="combo">
- <choices>
- <itemset nodeset="/root/init/LB0802">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col ref="blodbarcd"/>
- <col ref="instcd"/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_bloddelivelist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <group id="group2" style="left:0px; top:0px; width:1195px; height:100px; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:1195px; height:95px; "/>
- <input id="ipt_startdt" ref="/root/hidden/ref/startdt" class="input_search" inputtype="date" style="left:470px; top:8px; width:90px; height:19px; "/>
- <caption id="caption7" style="left:565px; top:10px; width:15px; height:20px; ">~</caption>
- <input id="ipt_enddt" ref="/root/hidden/ref/enddt" class="input_search" inputtype="date" style="left:580px; top:8px; width:90px; height:19px; "/>
- <button id="btn_ref" class="btn1_letter2" style="left:1124px; top:19px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetBlodDeliveList("btn");
- ]]>
- </script>
- </button>
- <caption id="caption2" class="search_name" style="left:30px; top:9px; width:96px; height:17px; ">출고자 :</caption>
- <input id="ipt_delivepid" ref="/root/hidden/ref/delivepid" class="input_button" inputtype="button" style="left:125px; top:8px; width:100px; height:19px; "/>
- <caption id="caption3" class="search_name" style="left:375px; top:9px; width:89px; height:17px; ">출고일자 :</caption>
- <output id="opt_delivenm" ref="/root/hidden/ref/delivenm" class="output_search" style="left:232px; top:8px; width:101px; height:19px; "/>
- <line id="line13" class="line_4" style="x1:1109px; y1:8px; x2:1109px; y2:52px; "/>
- <input id="ipt_blodno" ref="/root/hidden/ref/blodno" class="input_button" inputtype="button" style="left:125px; top:33px; width:208px; height:19px; "/>
- <caption id="caption1" class="search_name" style="left:30px; top:34px; width:90px; height:17px; ">혈액번호 :</caption>
- <caption id="caption4" class="search_name" style="left:375px; top:33px; width:89px; height:17px; ">출고유형 :</caption>
- <select1 id="cmb_delivekindcd" ref="/root/hidden/ref/delivekindcd" class="combo_s_essential" appearance="minimal" style="left:470px; top:32px; width:110px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0801">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //출고유형별로 콤보내용변경..
- fSetDeliveKindCd();
- ]]>
- </script>
- </select1>
- <select1 id="cmb_delivekindresn" ref="/root/hidden/ref/delivekindresn" class="combo_s_essential" appearance="minimal" style="left:579px; top:32px; width:135px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0802">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //사유 선택시 출고목록에 셋팅
- //fSetDeliveKindRsen();
- ]]>
- </script>
- </select1>
- <caption id="caption6" class="search_name" style="left:745px; top:9px; width:89px; height:17px; ">혈액성분 :</caption>
- <select1 id="cmb_blodcomcd" ref="/root/hidden/ref/blodcomcd" class="combo_s_essential" appearance="minimal" style="left:840px; top:8px; width:135px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0803">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <line id="line5" class="line_7" style="x1:15px; y1:59px; x2:1180px; y2:59px; "/>
- <caption id="caption8" class="search_name" style="left:375px; top:67px; width:156px; height:17px; ">출고취소 혈액번호 :</caption>
- <input id="ipt_cancelblod" ref="/root/hidden/ref/blodnocc" class="input_button" inputtype="button" style="left:525px; top:66px; width:153px; height:19px; "/>
- <select1 id="combo1" ref="/root/hidden/ref/blodcomcdcc" class="combo_s_essential" appearance="minimal" style="left:125px; top:68px; width:208px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0803">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption9" class="search_name" style="left:30px; top:69px; width:89px; height:17px; ">혈액성분 :</caption>
- <select1 id="radio1" ref="/root/hidden/stat" visibility="hidden" appearance="full" vcellspacing="28" overflow="visible" style="left:1020px; top:10px; width:80px; height:75px; font-weight:bold; text-decoration:underline; color:#000000; border-style:none; ">
- <choices>
- <item>
- <label>혈액출고</label>
- <value>1</value>
- </item>
- <item>
- <label>출고취소</label>
- <value>2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //// fSetgrdstat();
- ]]>
- </script>
- </select1>
- </group>
- <button id="btn_add" class="btn2_letter3" style="left:1141px; top:98px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- grd_bloddelivelist.deleteRow(grd_bloddelivelist.row);
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption5" class="tit_1" style="left:0px; top:0px; width:145px; height:14px; ">혈액출고관리</caption>
- </group>
- <group id="group3" style="left:0px; top:13px; width:1195px; height:27px; ">
- <button id="btn_init" class="btn4_letter3" style="left:1126px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSetInit();
- ]]>
- </script>
- </button>
- <line id="line1" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
- <button id="btn_save" class="btn4_letter2" style="left:984px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/hidden/ref/searchgbn") == "blodno"){
- fSaveBlodDelive();
- }
- ]]>
- </script>
- </button>
- <button id="button1" class="btn4_letter4" style="left:1043px; top:3px; width:80px; height:22px; ">
- <caption>출고취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/hidden/ref/searchgbn") == "blodno"){
- fSaveBlodDeliveCancel();
- }
- ]]>
- </script>
- </button>
- </group>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- fKeyEvent();
- ]]>
- </script>
- </xhtml:body>
- </xhtml:html>
|