/** * ÆÄ ÀÏ ¸í : SPADT62300.js * ¼³ ¸í : (ÆË¾÷)º´µ¿¶óº§Ãâ·Â Javascriot * ¼³ °è ÀÚ : °øµÎ°æ * ÀÛ ¼º ÀÚ : °øµÎ°æ * ¼öÁ¤ÀÌ·Â : 2007.09.17 / ÃÖÃÊÀÛ¼º / °øµÎ°æ */ var sSndMsg = ""; //¶óº§Ãâ·Â³»¿ë var iPoint = 1; //¶óº§Ãâ·Ârow var iCnt = 0; //¶óº§Ãâ·Â¸Å¼ö var iImageCnt = 0; //¶óº§±×·¡ÇÈÆùÆ®¼ö var gTimer = null; var pg =0; var totpg =0; var totcnt =0; var ordflag = ""; var bordflag = ""; var vcnt = 0; var nCnt = 0; var vlblcnt = false; var mlblcnt2 = false; var mlblcnt1 = false; var nextPage = false; var prntflag = false; var iTotalPageNum = 0; var iPageCnt = 0; var BarOCX ; /** * ÃʱâÈ­ */ function fInit_lbl() { submit("TRADT62301"); } /** * */ function fStopTimer() { window.clearinterval(gTimer); } function fSleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } /** * º´µ¿ ¶óº§Ãâ·Â(ÀÛÀº»çÀÌÁî) */ function fSmallLBLPrint() { /* ¶óº§ Sorting ·ÎÁ÷ //mgt¿¡¼­ vo·Î ¸®ÅÏ ´ëºÐ·ù - ³»º¹¾à, ¿Ü¿ë¾à, ÁÖ»ç, Ç×¾ÏÁ¦, TPN, ¸¶¾à, Áߺзù - ¹æ¹ýÄÚµå ¼ÒºÐ·ù - ³»º¹¾à,¿Ü¿ë¾à(¹æ¹ýÄÚµå), ÁÖ»ç,¸¶¾à,Ç×¾ÏÁ¦(mix) web js Ãâ·Â·ÎÁ÷ °¡. Åð¿ø/¿Ü·¡/ÀÀ±Þ½Ç/¿Ü¹Ú/¿ÜÃâ : Å«»çÀÌÁî¶óº§ ¿Ü·¡±âÁØ ³ª. ±×¿Ü ÀÔ¿øÃ³¹æ 1. ¿Ü¿ë¾à ´Üµ¶Ãâ·Â 2. ³»º¹¾à ´Üµ¶Ãâ·Â µû·ÎÆ÷Àå º¹¿ë¹æ¹ý 3. ÁÖ»ç¾à ´Üµ¶Ãâ·Â mix³¢¸® °í°¡,ÇâÁ¤,º¸°üº¡¹ýÀÌ ½Ç¿ÂÀÌ ¾Æ´Ñ°æ¿ì ÀÚ°¡ÁÖ»çÀÎ °æ¿ì ´Üµ¶ ³ª¸ÓÁö */ PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind"); PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left"); PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top"); commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind"); Comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm"); PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval"); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX = CommAX1; } else { BarOCX = CommAX2; } if(commkind == "02") { PortNm = 1; } else { PortNm = 2; } //alert("PrnKind : " + PrnKind + "\nportnm:" + PortNm + "\nprtnm:" + PrtNm + "\ncomm:" + Comm); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.setPrt(PrnKind, PortNm, PrtNm, Comm); } else { BarOCX.CommPort = "1"; // Ãâ·Â Port BarOCX.Settings = "9600,n,8,1"; // Comm ¼³Á¤ var ocxcnt = 0; while(!BarOCX.PortOpen() && ocxcnt < 10) { BarOCX.PortClose(); fSleep(2000); ocxcnt++; } } var sDD = getCurrentDate(); var sTM = getCurrentTime(); var reprint =""; totcnt = 0; pg = 0; totpg = 0; for ( var i = 1; i <= getNodesetCount("/root/main/lbllist/lbllist") ; i++){ if(model.getValue("/root/main/lbllist/lbllist["+i+"]/pid") == "") { return; } if ( model.getValue("/root/main/lbllist/lbllist["+i+"]/lblgrup") != "DI" && model.getValue("/root/main/lbllist/lbllist["+i+"]/lblgrup") != "DS" ){ totcnt++; } } // 2010.02.12 pymi if( (totcnt%6) != 0) totcnt ++; // ¶óº§Âï±â Àü¿¡ ÇÑÁÙ ¶ç¿ì±â for ( var i = 1; i <= getNodesetCount("/root/main/lbllist/lbllist") ; i++){ if(model.getValue("/root/main/lbllist/lbllist["+ i +"]/lblcnts2").length > 0) { totcnt++; vlblcnt = true;} } // (e) for(iPoint = 1; iPoint <= getNodesetCount("/root/main/lbllist/lbllist") ; iPoint++){ if ( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblprnttims")>0 ){ reprint ="(Àç)"; } //½ÃÀÛ(X, Y) sSndMsg += astfStartFormat(0, 0, "S"); if(PrnKind == "2" || PrnKind == "7") { //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 21, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 25, 21, "Ãâ·Â:"+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 55, 21, "ó¹æ:"+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } else { //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 25, 21, "Ãâ ·Â : "+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 55, 21, "ó ¹æ : "+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } //º´½Ç sSndMsg += astfPrintOut(20, 80, 31, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/roomcd"),""); //ȯÀÚÀ̸§ sSndMsg += astfPrintOut(120, 80, 31, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/patnm"),""); //ȯÀÚ¹øÈ£ sSndMsg += astfPrintOut(240, 80, 31, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid")+" ("+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugno")+reprint+")",""); //¼±±×¸®±â sSndMsg += astfGraphicBox(5, 120, 465, 0, 4); var sDrugKindcd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"); var sMixno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpmixno"); if(sDrugKindcd == "[³»º¹¾à]"){ if(model.getValue("/root/send/prcpinfo/lbltype") == "Y"){ fInUseDrugLBL2(); // 2010.02.12 pymi //if((vcnt < 6) && (vlblcnt) && (iPoint == getNodesetCount("/root/main/lbllist/lbllist")) ) { if(vcnt < 6 && vlblcnt) { mlblcnt2 = true; fPrntLblCnt2(vcnt, ordflag); ordflag = ""; vcnt = 0; } // (e) } else { fInUseDrugLBL(); // 2010.02.19 pymi if((vcnt < 4) && (ordflag.length > 0)) { mlblcnt1 = true; fPrntLblCnt1(vcnt, ordflag); ordflag = ""; vcnt = 0; } // (e) } } else if(sDrugKindcd == "[¿Ü¿ë¾à]"){ //fExUseDrugLBL(); if(model.getValue("/root/send/prcpinfo/lbltype") == "Y"){ fInUseDrugLBL2(); } else { fInUseDrugLBL(); } } else if(sDrugKindcd == "[ÁÖ»ç¾à]"){ if(sMixno != "-"){ fMixLBL(); } else { fInjDrugLBL(); } } if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.SendMsg(sSndMsg); BarOCX.PortClose(); sSndMsg = ""; } else { BarOCX.SendMessage(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } // 2010.02.11 pymi if(sDrugKindcd == "[³»º¹¾à]"){ if( iPoint == getNodesetCount("/root/main/lbllist/lbllist") ) { if(model.getValue("/root/send/prcpinfo/lbltype") == "Y"){ if(vlblcnt && (!mlblcnt2) && (ordflag.length > 0)) { fPrntLblCnt2(vcnt, ordflag); ordflag = ""; vcnt = 0; } } else { if(vlblcnt && (!mlblcnt1) && (ordflag.length > 0)) { fPrntLblCnt1(vcnt, ordflag); ordflag = ""; vcnt = 0; } } mlblcnt2 = false; mlblcnt1= false; } else if( iPoint < getNodesetCount("/root/main/lbllist/lbllist") ){ if(model.getValue("/root/send/prcpinfo/lbltype") != "Y"){ if(prntflag) { fPrntLblCnt1(vcnt, ordflag); ordflag = ""; vcnt = 0; prntflag = false; } } } } // (e) } if(PrnKind == "2" || PrnKind == "7" ) {//sato } else { BarOCX.PortClose(); //alert("close 1"); } model.refresh(); } /** * mix ¶óº§ */ function fMixLBL() { var sMixno1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpmixno"); var cnt = 0; for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){ sMixno2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpmixno"); var qty = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqty"); var dayqty = model.getValue("/root/main/lbllist/lbllist["+j+"]/dayprcpqty"); var qtyunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqtyunit"); var tims = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims"); var dayno = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); if(PrnKind == "2") { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); prcpnm = prcpnm.substr(0,7); } else { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); } if(sMixno1 == sMixno2){ // // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ //sSndMsg += astfPrintOut(20, 140+(cnt*30), 24, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),""); // sSndMsg += astfPrintOut(170, 140+(cnt*30), 11, prcpnm.substr(0,7),""); // sSndMsg += astfPrintOut(360, 140+(cnt*30), 2, dayqty+qtyunit,""); // sSndMsg += astfPrintOut(430, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(460, 140+(cnt*30), 2, dayno,""); cnt++; } else { j--; break; } //2010-07-05 º´µ¿Ã³¹æÀüÃâ·Â È­¸é - JCI°ü·Ã - º¸°ü±¸ºÐ:[³ÃÀåÁÖ»ç]/[°íÀ§ÇèÁÖ»ç] MIXÀÌ´õ¶ó°í ´Üµ¶À¸·Î Ãâ·ÂÇÑ´Ù. //if(cnt == 5){ // break; //} var sDngryn = model.getValue("/root/main/lbllist/lbllist["+j+"]/dngryn"); //°íÀ§ÇèÁÖ»ç ¿©ºÎ var sKeepmthdyn = model.getValue("/root/main/lbllist/lbllist["+j+"]/keepmthdyn"); //³ÃÀåÁÖ»ç ¿©ºÎ if ( sDngryn =="Y" || sKeepmthdyn =="Y" ) { if(cnt == 5 || fChkIndependInj(j)){ //j++; break; } }else{ if(cnt == 5){ break; } } } iPoint = j; //Á¾·á(¸Å¼ö) sSndMsg += astfEndFormat(0); } /** * ³»º¹¾à ¶óº§ */ function fInUseDrugLBL() { // var sSumCls1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls"); var sMthdcd1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcd"); var qty = ""; var dayqty = ""; var qtyunit = ""; var tims = ""; var dayno = ""; var cnt = 0; var chgMth = false; // 2010.02.17 pymi for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){ if(cnt != 0 && fChkIndependDrug(j)){ break; } // sSumCls2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/sumcls"); sMthdcd2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthdcd"); qty = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqty"); dayqty = model.getValue("/root/main/lbllist/lbllist["+j+"]/dayprcpqty"); qtyunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqtyunit"); tims = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims"); dayno = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); if(PrnKind == "2") { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); prcpnm = prcpnm.substr(0,7); } else { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); } if((sMthdcd1 == sMthdcd2)){ if(PrnKind == "2") { // // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ //sSndMsg += astfPrintOut(20, 140+(cnt*30), 24, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),""); // // 2010.02.17 pymi if(model.getValue("/root/main/lbllist/lbllist["+ j +"]/lblcnts2").length > 0 ) {ordflag += j + "/";} // (e) sSndMsg += astfPrintOut(165, 140+(cnt*30), 11, prcpnm.substr(0,7),""); if( model.getValue("/root/main/lbllist/lbllist["+j+"]/lblgrup") == "DS"){ // sSndMsg += astfPrintOut(360, 140+(cnt*30), 2, dayqty+qtyunit,""); // sSndMsg += astfPrintOut(430, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(460, 140+(cnt*30), 2, dayno,""); } else { // sSndMsg += astfPrintOut(360, 140+(cnt*30), 2, dayqty,""); // sSndMsg += astfPrintOut(430, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(460, 140+(cnt*30), 2, dayno,""); } } else { // // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ //sSndMsg += astfPrintOut(20, 140+(cnt*30), 24, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),""); // // 2010.02.17 pymi if(model.getValue("/root/main/lbllist/lbllist["+ j +"]/lblcnts2").length > 0 ) {ordflag += j + "/";} // (e) sSndMsg += astfPrintOut(135, 140+(cnt*30), 11, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"),""); if( model.getValue("/root/main/lbllist/lbllist["+j+"]/lblgrup") == "DS"){ // sSndMsg += astfPrintOut(330, 140+(cnt*30), 2, dayqty+qtyunit,""); // sSndMsg += astfPrintOut(400, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(430, 140+(cnt*30), 2, dayno,""); } else { // sSndMsg += astfPrintOut(330, 140+(cnt*30), 2, dayqty,""); // sSndMsg += astfPrintOut(390, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(420, 140+(cnt*30), 2, dayno,""); } } cnt++; } else { // ¿ë¹ý¹Ù²ð¶§ 2010.02.17 pymi chgMth = true; // (e) break; } if(cnt == fMthdnmLength(iPoint) || fChkIndependDrug(j)){ j++; // ´ÙÀ½ ¿ë¹ýÀÌ ´Ù¸¦¶§ 2010.02.17 pymi sMthdcd3 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthdcd"); if((sMthdcd1 != sMthdcd3) && (ordflag.length > 0) ){ prntflag = true; } // break; } } iPoint = j-1; //º¸°ü¹æ¹ý °í°¡ Ãâ·Â var sKeepmthd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd"); var sExpnyn = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/expnyn"); var sExpnnm = ""; if(sExpnyn == "Y") sExpnnm = "°í°¡"; //if(sKeepmthd != "" && sExpnnm != ""){ // sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+sExpnnm+">",""); //} else if(sKeepmthd != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+">",""); } if(sExpnnm != ""){ sSndMsg += astfPrintOut(135, 180, 3, "<"+sExpnnm+">",""); } /* if(sKeepmthd != "" && sExpnnm != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+sExpnnm+">",""); } else if(sKeepmthd != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+">",""); } if(sExpnnm != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sExpnnm+">",""); }*/ //¿ë¹ýÀÇ ±æÀÌ¿¡ µû¶ó Âï´Â À§Ä¡¸¦ ´Þ¸®ÇÑ´Ù(¿ë¹ýÂïÀ» °ø°£À» È®º¸) var iYPoint = 0; if( fMthdnmLength(iPoint) == 4){ iYPoint = 280; } else { iYPoint = 245; } if( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblgrup") == "DS"){ sSndMsg += astfPrintOut(20, iYPoint, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims")+"ȸ " +qty+qtyunit+" "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno")+"ÀϺÐ",""); } else { sSndMsg += astfPrintOut(20, iYPoint, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims")+"ȸ " +model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno")+"ÀϺÐ",""); } // sSndMsg += fMthdnm(iPoint); //Á¾·á(¸Å¼ö) //sSndMsg += astfEndFormat(0); // ¿ë¹ý¹Ù²ð¶§ 2010.02.17 pymi //if(chgMth) { if(ordflag.length > 0) { cnt++; //¶óº§³»¿ëÂï±âÀü ÇÑÁÙ ¶ç¿ì±â if(cnt >= 4) sSndMsg += astfEndFormat(0); } else { sSndMsg += astfEndFormat(0); } //} // (e) // ¿ë¹ý ¹Ù²îÁö ¾Ê´Â ¸¶Áö¸·ÀÌ ¾Æ´Ñ ó¹æ 2010.02.17 pymi /*if(iPoint != getNodesetCount("/root/main/lbllist/lbllist") && (!chgMth)) { cnt++; sSndMsg += astfEndFormat(0); }*/ vcnt = cnt; // (e) } // Æ÷Àå¶óº§³»¿ë Ãâ·Â 2010.02.17 pymi function fPrntLblCnt1(cnt, ordflag) { var lblcnts2 = ""; var sordflag = ordflag.split("/"); var mthprnt = false; var lblcnt = cnt; var qty = ""; var qtyunit = ""; var sDD = getCurrentDate(); var sTM = getCurrentTime(); var y = 0; var x = parseInt(sordflag[y]); while( x <= parseInt(sordflag[sordflag.length - 2])) { if(lblcnt >= fMthdnmLength(x) || lblcnt == 0) { mthprnt = false; lblcnt = 0; // /*PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind"); PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left"); PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top"); commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind"); Comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm"); PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval"); if(commkind == "02") { PortNm = 1; } else { PortNm = 2; } BarOCX.setPrt(PrnKind, PortNm, PrtNm, Comm);*/ // var reprint =""; if ( model.getValue("/root/main/lbllist/lbllist["+x+"]/lblprnttims")>0 ){ reprint ="(Àç)"; } //½ÃÀÛ(X, Y) sSndMsg += astfStartFormat(0, 0, "S"); //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) //sSndMsg += astfPrintOut(20, 25, 21, model.getValue("/root/main/lbllist/lbllist["+x+"]/drugkindnm"),""); if(PrnKind == "2" || PrnKind == "7") { //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 21, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 25, 21, "Ãâ·Â:"+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 55, 21, "ó¹æ:"+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } else { //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 25, 21, "Ãâ ·Â : "+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 55, 21, "ó ¹æ : "+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } //º´½Ç sSndMsg += astfPrintOut(20, 80, 31, model.getValue("/root/main/lbllist/lbllist["+x+"]/roomcd"),""); //ȯÀÚÀ̸§ sSndMsg += astfPrintOut(120, 80, 31, model.getValue("/root/main/lbllist/lbllist["+x+"]/patnm"),""); //ȯÀÚ¹øÈ£ sSndMsg += astfPrintOut(240, 80, 31, model.getValue("/root/main/lbllist/lbllist["+x+"]/pid")+" ("+model.getValue("/root/main/lbllist/lbllist["+x+"]/drugno")+reprint+")",""); //¼±±×¸®±â sSndMsg += astfGraphicBox(5, 120, 465, 0, 4); } if( !fChkIndependDrug(x) ) { lblcnts2 = model.getValue("/root/main/lbllist/lbllist["+ x +"]/lblcnts2"); // 2010.02.10 pymi sSndMsg += astfPrintOut(20, 140+(lblcnt*30), 24, lblcnts2,""); lblcnt ++; } if(lblcnt == fMthdnmLength(x)){ mthprnt = true; lblcnt = 0; //¿ë¹ýÀÇ ±æÀÌ¿¡ µû¶ó Âï´Â À§Ä¡¸¦ ´Þ¸®ÇÑ´Ù(¿ë¹ýÂïÀ» °ø°£À» È®º¸) var iYPoint = 0; qty = model.getValue("/root/main/lbllist/lbllist["+ x +"]/prcpqty"); qtyunit = model.getValue("/root/main/lbllist/lbllist["+ x +"]/prcpqtyunit"); if( fMthdnmLength(x) == 4){ iYPoint = 280; } else { iYPoint = 245; } if( model.getValue("/root/main/lbllist/lbllist["+x+"]/lblgrup") == "DS"){ sSndMsg += astfPrintOut(20, iYPoint, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+x+"]/prcptims")+"ȸ " +qty+qtyunit+" "+model.getValue("/root/main/lbllist/lbllist["+x+"]/prcpdayno")+"ÀϺÐ",""); } else { sSndMsg += astfPrintOut(20, iYPoint, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+x+"]/prcptims")+"ȸ " +model.getValue("/root/main/lbllist/lbllist["+x+"]/prcpdayno")+"ÀϺÐ",""); } // sSndMsg += fMthdnm(iPoint); sSndMsg += astfEndFormat(0); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.SendMsg(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; //break; } else { BarOCX.SendMessage(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } } x = parseInt(sordflag[++y]); } // end while if(!mthprnt) { //¿ë¹ýÀÇ ±æÀÌ¿¡ µû¶ó Âï´Â À§Ä¡¸¦ ´Þ¸®ÇÑ´Ù(¿ë¹ýÂïÀ» °ø°£À» È®º¸) var iYPoint = 0; var lastvalu = parseInt(sordflag[sordflag.length - 2]); qty = model.getValue("/root/main/lbllist/lbllist["+ lastvalu +"]/prcpqty"); qtyunit = model.getValue("/root/main/lbllist/lbllist["+ lastvalu +"]/prcpqtyunit"); if( fMthdnmLength(lastvalu) == 4){ iYPoint = 280; } else { iYPoint = 245; } if( model.getValue("/root/main/lbllist/lbllist["+ lastvalu +"]/lblgrup") == "DS"){ sSndMsg += astfPrintOut(20, iYPoint, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+ lastvalu +"]/prcptims")+"ȸ " +qty+qtyunit+" "+model.getValue("/root/main/lbllist/lbllist["+ lastvalu +"]/prcpdayno")+"ÀϺÐ",""); } else { sSndMsg += astfPrintOut(20, iYPoint, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+ lastvalu +"]/prcptims")+"ȸ " +model.getValue("/root/main/lbllist/lbllist["+ lastvalu +"]/prcpdayno")+"ÀϺÐ",""); } // sSndMsg += fMthdnm(iPoint); sSndMsg += astfEndFormat(0); } if(!mlblcnt1) { if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.SendMsg(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } else { BarOCX.SendMessage(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } } ordflag = ""; vcnt = 0; mlblcnt1 = false; model.refresh(); } // (e) /** * ³»º¹¾à ¶óº§ - ÇÑÀå¿¡ ¸ðµç ¿ë¹ý ¾àÀ» ... */ function fInUseDrugLBL2() { // var sSumCls1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls"); var sMthdcd1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcd"); var qty = ""; var dayqty = ""; var qtyunit = ""; var tims = ""; var dayno = ""; var cnt = 0; var chk = false; totpg = Math.ceil(totcnt / 6 ); for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){ if(cnt != 0 && model.getValue("/root/main/lbllist/lbllist["+j+"]/lblgrup") == "DI" ) { break; } //if(cnt != 0 && fChkIndependDrug(j)){ // break; //} // sSumCls2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/sumcls"); sMthdcd2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthdcd"); qty = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqty"); dayqty = model.getValue("/root/main/lbllist/lbllist["+j+"]/dayprcpqty"); qtyunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqtyunit"); tims = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims"); dayno = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); if(PrnKind == "2") { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); prcpnm = prcpnm.substr(0,7); } else { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); } //if((sMthdcd1 == sMthdcd2)){ // if( model.getValue("/root/main/lbllist/lbllist["+j+"]/lblgrup") == "DT"){ //PTP´Â * Ç¥½Ã sSndMsg += astfPrintOut(20, 140+(cnt*30), 24, "*",""); } // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ //sSndMsg += astfPrintOut(30, 140+(cnt*30), 24, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),""); //20100224 À̼±°æ ¼öÁ¤ : zebra´Â ¸íĪ ±æ°Ô ³ª¿Àµµ·Ï ÇÔ »çÅ丸 Àß¶ó¼­ Ãâ·Â if(PrnKind == "2" || PrnKind == "7" ) {//sato sSndMsg += astfPrintOut(165, 140+(cnt*30), 11, prcpnm.substr(0,7),""); if( model.getValue("/root/main/lbllist/lbllist["+j+"]/lblgrup") == "DS"){ // sSndMsg += astfPrintOut(360, 140+(cnt*30), 2, dayqty+qtyunit,""); // sSndMsg += astfPrintOut(430, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(460, 140+(cnt*30), 2, dayno,""); } else { // sSndMsg += astfPrintOut(360, 140+(cnt*30), 2, dayqty,""); // sSndMsg += astfPrintOut(430, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(460, 140+(cnt*30), 2, dayno,""); } } else { var prcpnm = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); prcpnm = prcpnm.substring(0,16); sSndMsg += astfPrintOut(135, 140+(cnt*30), 11, prcpnm,""); if( model.getValue("/root/main/lbllist/lbllist["+j+"]/lblgrup") == "DS"){ // sSndMsg += astfPrintOut(330, 140+(cnt*30), 2, dayqty+qtyunit,""); // sSndMsg += astfPrintOut(400, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(430, 140+(cnt*30), 2, dayno,""); } else { // sSndMsg += astfPrintOut(330, 140+(cnt*30), 2, dayqty,""); // sSndMsg += astfPrintOut(390, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(420, 140+(cnt*30), 2, dayno,""); } } if(model.getValue("/root/main/lbllist/lbllist["+ j +"]/lblcnts2").length > 0) ordflag += j + "/"; // 2010.02.10 pymi cnt++; //} else { // break; //} //if(cnt == fMthdnmLength(iPoint) || fChkIndependDrug(j)){ // j++; // break; //} if(cnt == 6){ pg++; sSndMsg += astfPrintOut(430,320, 2, pg+ "/" + totpg ,""); sSndMsg += astfEndFormat(0); j++; chk=true; break; } } // 2010.02 18 pymi if (chk == false) { if( model.getValue("/root/main/lbllist/lbllist["+(j-1)+"]/lblgrup") != "DI" ) { cnt ++; // ¶óº§³»¿ë Âï±â Àü¿¡ ÇÑÁÙ ¶ç¿ì±â if(!vlblcnt || cnt == 6) { pg++; sSndMsg += astfPrintOut(430,320, 2, pg+"/" +totpg ,""); sSndMsg += astfEndFormat(0); } } else{ sSndMsg += astfEndFormat(0); } } iPoint = j-1; //if( (cnt < 6) && (!vlblcnt)) sSndMsg += astfEndFormat(0); vcnt = cnt; // (e) //º¸°ü¹æ¹ý °í°¡ Ãâ·Â /*var sKeepmthd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd"); var sExpnyn = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/expnyn"); var sExpnnm = ""; if(sExpnyn == "Y") sExpnnm = "°í°¡"; //if(sKeepmthd != "" && sExpnnm != ""){ // sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+sExpnnm+">",""); //} else if(sKeepmthd != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+">",""); } if(sExpnnm != ""){ sSndMsg += astfPrintOut(135, 180, 3, "<"+sExpnnm+">",""); }*/ /* if(sKeepmthd != "" && sExpnnm != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+sExpnnm+">",""); } else if(sKeepmthd != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+">",""); } if(sExpnnm != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sExpnnm+">",""); }*/ //¿ë¹ýÀÇ ±æÀÌ¿¡ µû¶ó Âï´Â À§Ä¡¸¦ ´Þ¸®ÇÑ´Ù(¿ë¹ýÂïÀ» °ø°£À» È®º¸) //var iYPoint = 0; //if( fMthdnmLength(iPoint) == 4){ // iYPoint = 280; //} else { // iYPoint = 245; //} //if( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblgrup") == "DS"){ // sSndMsg += astfPrintOut(20, iYPoint, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims")+"ȸ " // +qty+qtyunit+" "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno")+"ÀϺÐ",""); //} else { // sSndMsg += astfPrintOut(20, iYPoint, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims")+"ȸ " // +model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno")+"ÀϺÐ",""); //} // //sSndMsg += fMthdnm(iPoint); //Á¾·á(¸Å¼ö) //sSndMsg += astfEndFormat(0); // 2010.02.12 pymi } // Æ÷Àå¶óº§³»¿ë Ãâ·Â 2010.02.10 pymi function fPrntLblCnt2(cnt, ordflag) { var lblcnts2 = ""; var sordflag = ordflag.split("/"); var lblcnt = cnt; var pgprnt = false; var sDD = getCurrentDate(); var sTM = getCurrentTime(); var reprint =""; var y = 0; var x = parseInt(sordflag[y]); //for(var x = parseInt(sordflag[0]); x <= parseInt(sordflag[sordflag.length - 2]); x ++) { while( x <= parseInt(sordflag[sordflag.length - 2])) { if(lblcnt == 6 || lblcnt == 0) { lblcnt = 0; pgprnt = false; /*PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind"); PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left"); PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top"); commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind"); Comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm"); PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval"); if(commkind == "02") { PortNm = 1; } else { PortNm = 2; } BarOCX.setPrt(PrnKind, PortNm, PrtNm, Comm);*/ // if ( model.getValue("/root/main/lbllist/lbllist["+x+"]/lblprnttims")>0 ){ reprint ="(Àç)"; } //½ÃÀÛ(X, Y) sSndMsg += astfStartFormat(0, 0, "S"); //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) //sSndMsg += astfPrintOut(20, 25, 21, model.getValue("/root/main/lbllist/lbllist["+x+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ //sSndMsg += astfPrintOut(190, 25, 21, "Ãâ·Â:"+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ //sSndMsg += astfPrintOut(190, 55, 21, "ó¹æ:"+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+x+"]/prcpdd"), "MD"),""); if(PrnKind == "2" || PrnKind == "7") { //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 21, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 25, 21, "Ãâ·Â:"+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 55, 21, "ó¹æ:"+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } else { //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 25, 21, "Ãâ ·Â : "+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 55, 21, "ó ¹æ : "+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } //º´½Ç sSndMsg += astfPrintOut(20, 80, 31, model.getValue("/root/main/lbllist/lbllist["+x+"]/roomcd"),""); //ȯÀÚÀ̸§ sSndMsg += astfPrintOut(120, 80, 31, model.getValue("/root/main/lbllist/lbllist["+x+"]/patnm"),""); //ȯÀÚ¹øÈ£ sSndMsg += astfPrintOut(240, 80, 31, model.getValue("/root/main/lbllist/lbllist["+x+"]/pid")+" ("+model.getValue("/root/main/lbllist/lbllist["+x+"]/drugno")+reprint+")",""); //¼±±×¸®±â sSndMsg += astfGraphicBox(5, 120, 465, 0, 4); } //if( !fChkIndependDrug(x) ) { lblcnts2 = model.getValue("/root/main/lbllist/lbllist["+ x +"]/lblcnts2"); // 2010.02.10 pymi sSndMsg += astfPrintOut(30, 140+(lblcnt*30), 2, lblcnts2,""); lblcnt ++; //} if(lblcnt == 6){ pg++; sSndMsg += astfPrintOut(430,320, 2, pg+ "/" + totpg ,""); lblcnt = 0; pgprnt = true; sSndMsg += astfEndFormat(0); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.SendMsg(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } else { BarOCX.SendMessage(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } } x = parseInt(sordflag[++y]); } // end while if(!pgprnt) { pg++; sSndMsg += astfPrintOut(430,320, 2, pg+ "/" + totpg ,""); sSndMsg += astfEndFormat(0); } if(!mlblcnt2) { if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.SendMsg(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } else { BarOCX.SendMessage(sSndMsg); //BarOCX.PortClose(); sSndMsg = "" } } ordflag = ""; vcnt = 0; pg = 0; totpg = 0; mlblcnt2 = false; model.refresh(); } // (e) /** * ¿Ü¿ë¾à ¶óº§ */ function fExUseDrugLBL() { var qty = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpqty"); var dayqty = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/dayprcpqty"); var tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims"); var dayno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno"); if(PrnKind == "2") { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpnm"); prcpnm = prcpnm.substr(0,7); } else { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpnm"); } // // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ //sSndMsg += astfPrintOut(20, 140, 24, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpcd"),""); // sSndMsg += astfPrintOut(165, 140, 11, prcpnm.substr(0,7),""); // sSndMsg += astfPrintOut(360, 140, 2, dayqty,""); // sSndMsg += astfPrintOut(430, 140, 2, tims,""); // sSndMsg += astfPrintOut(460, 140, 2, dayno,""); sSndMsg += astfPrintOut(20, 280, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims")+"ȸ " +model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno")+"ÀϺÐ",""); // sSndMsg += fMthdnm(iPoint); //Á¾·á(¸Å¼ö) sSndMsg += astfEndFormat(0); } /** * ÁÖ»ç¾à ¶óº§ */ function fInjDrugLBL() { var sSumCls1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls"); var cnt = 0; for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){ if(cnt != 0 && fChkIndependInj(j)){ //Áֻ簡 ¹¶Ãļ­ ³ª¿À´Ù°¡ ´Üµ¶Áֻ縦 ¸¸³¯°æ¿ì ´Üµ¶ÁÖ»ç´Â Ãâ·ÂÇÏÁö ¾Æ´ÏÇÔ. break; } sSumCls2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/sumcls"); var qty = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqty"); var dayqty = model.getValue("/root/main/lbllist/lbllist["+j+"]/dayprcpqty"); var qtyunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqtyunit"); var tims = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims"); var dayno = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); if(PrnKind == "2") { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); prcpnm = prcpnm.substr(0,7); } else { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); } // // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ //sSndMsg += astfPrintOut(20, 140+(cnt*30), 24, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),""); // sSndMsg += astfPrintOut(165, 140+(cnt*30), 11, prcpnm.substr(0,7),""); // sSndMsg += astfPrintOut(360, 140+(cnt*30), 2, fChkFloat(dayqty)+qtyunit,""); // sSndMsg += astfPrintOut(430, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(460, 140+(cnt*30), 2, dayno,""); cnt++; if(cnt == 5 || fChkIndependInj(j)){ j++; break; } } iPoint = j-1; //º¸°ü¹æ¹ý °í°¡ Ãâ·Â var sKeepmthd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd"); var sExpnyn = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/expnyn"); var sExpnnm = ""; if(sExpnyn == "Y") sExpnnm = "°í°¡"; //if(sKeepmthd != "" && sExpnnm != ""){ // sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+sExpnnm+">",""); //} else if(sKeepmthd != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+">",""); } if(sExpnnm != ""){ sSndMsg += astfPrintOut(135, 180, 3, "<"+sExpnnm+">",""); } //Á¾·á(¸Å¼ö) sSndMsg += astfEndFormat(0); } /** * ³»º¹¾à ´Üµ¶¶óº§ °ËÁõÀÛ¾÷ */ function fChkIndependDrug(cnt) { var sLBLGrup = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/lblgrup"); var sSnglyn = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/atcifsnglyn"); var sDrugindependpackflag = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/drugindependpackflag"); var sKeepmthd = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/keepmthd"); var sExpnyn = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/expnyn"); var sRst = false; if(sLBLGrup == "DS" || sLBLGrup == "DI" || sLBLGrup == "DT" || sLBLGrup == "DX") sRst = true; if(sSnglyn == "Y") sRst = true; if(sDrugindependpackflag == "Y") sRst = true; if(sExpnyn == "Y") sRst = true; if(sKeepmthd != "") sRst = true; return sRst; } /** * ÁÖ»ç¾à ´Üµ¶¶óº§ °ËÁõÀÛ¾÷ */ function fChkIndependInj(cnt) { var sLBLGrup = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/lblgrup"); var sExp = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/expnyn"); var sKeepmthd = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/keepmthd"); var sSelfprcpflag = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/selfprcpflag"); var sDrugindependpackflag = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/drugindependpackflag"); var sRst = false; if(sLBLGrup == "IH" || sLBLGrup == "IO" || sLBLGrup == "IS" || sLBLGrup == "IX") sRst = true; if(sExp == "Y" || sKeepmthd != "" || sSelfprcpflag == "Y") sRst = true; if(sDrugindependpackflag == "Y") sRst = true; //2010-06-29 [º¸°ü¹æ¹ý:³ÃÀåÁÖ»ç/°íÀ§ÇèÁÖ»ç] ´Üµ¶Ãâ·Â var sDngryn = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/dngryn"); //°íÀ§ÇèÁÖ»ç ¿©ºÎ var sKeepmthdyn = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/keepmthdyn"); //³ÃÀåÁÖ»ç ¿©ºÎ if(sDngryn == "Y" || sKeepmthdyn=="Y" ) sRst = true; return sRst; } /** * ¿ë¹ý »ý¼º */ function fMthdnm(iPoint) { var sMthd1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts1"); var sMthd2 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts2"); var sMthd3 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts3"); var sMthd4 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts4"); var sTemp = ""; var sRst = ""; if(sMthd1 != "") sTemp += sMthd1 + " "; if(sMthd2 != "") sTemp += sMthd2 + " "; if(sMthd3 != "") sTemp += sMthd3 + " "; if(sMthd4 != "") sTemp += sMthd4; if(sTemp.length > 28){ var sTemp1 = sTemp.substr(0, 26); var sTemp2 = sTemp.substr(26, sTemp.length); sRst = astfPrintOut(20, 285, 28, sTemp1,""); sRst += astfPrintOut(20, 320, 28, sTemp2,""); } else if(sTemp.length > 24){ sRst = astfPrintOut(20, 320, 29, sTemp,""); } else if(sTemp.length > 22){ sRst = astfPrintOut(20, 320, 3, sTemp,""); } else if(sTemp.length > 21){ sRst = astfPrintOut(20, 320, 3, sTemp,""); } else if(sTemp.length <= 21){ sRst = astfPrintOut(20, 320, 3, sTemp,""); } return sRst; } /** * ¿ë¹ý ±æÀÌ */ function fMthdnmLength(iPoint) { var sMthd1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts1"); var sMthd2 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts2"); var sMthd3 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts3"); var sMthd4 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts4"); var sTemp = ""; var sRst = "4"; //º´µ¿¶óº§Àº ±âº» 4ÁÙ±îÁö ¾àó¹æÀÌ Ãâ·ÂµÈ´Ù. if(sMthd1 != "") sTemp += sMthd1 + " "; if(sMthd2 != "") sTemp += sMthd2 + " "; if(sMthd3 != "") sTemp += sMthd3 + " "; if(sMthd4 != "") sTemp += sMthd4; if(sTemp.length > 28){ sRst = "3"; //º¹¿ë¹æ¹ýÀÌ ±æ°æ¿ì 3ÁÙ±îÁö ¾àó¹æÀ» Ãâ·ÂÇÑ´Ù. } return sRst; } /** * ÀÀ±Þ½Ç/Åð¿ø/¿Ü¹Ú/¿ÜÃâ ¶óº§Ãâ·Â(Å«»çÀÌÁî) */ function fBigLBLPrint() { /* ¶óº§ Sorting ·ÎÁ÷ //mgt¿¡¼­ vo·Î ¸®ÅÏ ´ëºÐ·ù - ³»º¹¾à, ¿Ü¿ë¾à, ÁÖ»ç, Ç×¾ÏÁ¦, TPN, ¸¶¾à, Áߺзù - ¹æ¹ýÄÚµå ¼ÒºÐ·ù - ³»º¹¾à,¿Ü¿ë¾à(¹æ¹ýÄÚµå), ÁÖ»ç,¸¶¾à,Ç×¾ÏÁ¦(mix) web js Ãâ·Â·ÎÁ÷ 1 ¾àÁ¾·ù(³»º¹¾à/ÁÖ»ç¾à/¿Ü¿ë¾à) 1.1 ¹æ¹ýÄÚµå 1.2 󹿼ö·® */ PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind"); PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left"); PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top"); commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind"); Comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm"); PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval"); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX = CommAX1; } else { BarOCX = CommAX2; } if(commkind == "02") { PortNm = 1; } else { PortNm = 2; } //alert("PrnKind : " + PrnKind + "\nportnm:" + PortNm + "\nprtnm:" + PrtNm + "\ncomm:" + Comm); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.setPrt(PrnKind, PortNm, PrtNm, Comm); } else { BarOCX.CommPort = "1"; // Ãâ·Â Port BarOCX.Settings = "9600,n,8,1"; // Comm ¼³Á¤ var ocxcnt = 0; while(!BarOCX.PortOpen() && ocxcnt < 10) { BarOCX.PortClose(); fSleep(2000); ocxcnt++; } } var reprint=""; //var iPageCnt = 0; var prcpCnt = 0; for(iPoint = 1; iPoint <= getNodesetCount("/root/main/lbllist/lbllist") ; iPoint++){ if( fChkSumcls(iPoint)){ //´Üµ¶¶óº§Ãâ·Â } else { //ÀϹݶóº§Ãâ·Â var drugkind1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"); var dayno1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno"); var mthd1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthd1"); var mthd2 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthd2"); var mthd3 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthd3"); var cnt = 0; var lblCnt = 0; for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){ var drugkind2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/drugkindnm"); var dayno2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); var mthd4 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd1"); var mthd5 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd2"); var mthd6 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd3"); var lblcnts2 = model.getValue("/root/main/lbllist/lbllist["+ j +"]/lblcnts2"); // 2010.02.17 pymi if((drugkind1 == drugkind2) && (dayno1 == dayno2) && (mthd1 == mthd4 && mthd2 == mthd5 && mthd3 == mthd6) && !fChkSumcls(j)){ // 2010.02.18 pymi if(lblcnts2.length > 0) { lblCnt ++; } cnt++; // (e) // ¿ë¹ý ¹Ù²îÁö ¾Ê´Â ¸¶Áö¸· ó¹æ °¹¼ö 2010.02.18 if( j == getNodesetCount("/root/main/lbllist/lbllist")) { //¶óº§°¹¼ö if( lblCnt >= 3 ) { iPageCnt += parseInt(lblCnt/3); lblCnt = parseInt(lblCnt%3); } // ±âÁØ °¹¼ö if(lblCnt == 0) prcpCnt = 8; if(lblCnt == 1) prcpCnt = 6; if(lblCnt == 2) prcpCnt = 2; // 󹿰¹¼ö - ±âÁذ¹¼ö var reCnt = cnt - prcpCnt; if( reCnt > 0 ) { iPageCnt ++; iPageCnt += parseInt(reCnt/14); // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ ÇÑ ÆäÀÌÁö¿¡ ÃÖ°í 8°³¿¡¼­ 14°³ Ãâ·ÂµÇ°Ô º¯°æ } } // (e) } else { //¶óº§°¹¼ö 2010.02.18 if( lblCnt >= 3 ) { iPageCnt += parseInt(lblCnt/3); lblCnt = parseInt(lblCnt%3); } // ±âÁØ °¹¼ö if(lblCnt == 0) prcpCnt = 8; if(lblCnt == 1) prcpCnt = 6; if(lblCnt == 2) prcpCnt = 2; // 󹿰¹¼ö - ±âÁذ¹¼ö var reCnt = cnt - prcpCnt; if( reCnt > 0 ) { iPageCnt ++; iPageCnt += parseInt(reCnt/14); // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ ÇÑ ÆäÀÌÁö¿¡ ÃÖ°í 8°³¿¡¼­ 14°³ Ãâ·ÂµÇ°Ô º¯°æ } // (e) break; } /*if(cnt == 8){ //2010.02.10 pymi j++; break; }*/ } iPoint = j-1; } iPageCnt++; } iTotalPageNum = iPageCnt; // 2010.02.10 pymi //alert(iTotalPageNum); iPageCnt = 0; for(iPoint = 1; iPoint <= getNodesetCount("/root/main/lbllist/lbllist") ; iPoint++){ if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid") =="" ) { return; } if ( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblprnttims")>0 ){ reprint ="(Àç)"; } //½ÃÀÛ(X, Y) sSndMsg += astfStartFormat(0, 0, "B"); iPageCnt++; ////////////////////////////////////////////////// // ¶óº§ »ó´Ü³»¿ë // ///////////////////////////////////////////////// //º´½Ç sSndMsg += astfPrintOut(30, 30, 6, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/roomcd"),""); //ȯÀÚ¸í sSndMsg += astfPrintOut(180, 30, 6, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/patnm").substring(0,5),""); //¹ÙÄÚµå(º¯È¯) // 20101101_laboru_°æºÏ´ëº´¿ø_atc drugkind ±¸ºÐÀÚ¿¡ ÀÇÇÑ ¹ÙÄÚµå Ãâ·Â Çü½Ä // t : "ATC" , p : »êÁ¦ ¹ÙÄÚµå, e : blank if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/atc_drugkind") == "t" ) { sSndMsg += astfPrintOut(390, 40, 6, "ATC",""); } else if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/atc_drugkind") == "p") { //model.setValue("/root/main/lbllist/lbllist["+iPoint+"]/barcode" , model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/barcode") + iPoint ); sSndMsg += astfBarCode_Code39(390, 40, "N", 70, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/barcode")); } else { // °ø¹é } //sSndMsg += astfBarCode_Code39(390, 40, "N", 70, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/barcode")); //ȯÀÚ¹øÈ£(Åõ¾à¹øÈ£) //sSndMsg += astfPrintOut(30, 85, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid") + // " (" + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugno") + reprint+")",""); //ȯÀÚ¹øÈ£ sSndMsg += astfPrintOut(30, 85, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid") ,""); //(Åõ¾à¹øÈ£)=>20091014 À̼±°æ : Å©°í ÁøÇÏ°Ô º¯°æ sSndMsg += astfPrintOut(130, 85, 6, " (" + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugno") + ")",""); //(Àç)¼ºº°³ªÀÌ sSndMsg += astfPrintOut(280, 85, 3, reprint+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sexage"),""); //󹿰ú¾à¾î¸í sSndMsg += astfPrintOut(30, 135, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/deptengabbr"),""); //ÀÇ»ç¸í sSndMsg += astfPrintOut(120, 135, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/orddrnm"),""); //ó¹æÀÏÀÚ sSndMsg += astfPrintOut(270, 135, 3, fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd")),""); //ÆäÀÌÁö¼ö sSndMsg += astfPrintOut(430, 135, 3, iPageCnt+"/"+iTotalPageNum,""); //¹ÙÄÚµå // 20101101_laboru_°æºÏ´ëº´¿ø_¹ÙÄÚµå ¾Æ·¡ ³»¿ë »èÁ¦ //sSndMsg += astfPrintOut(510, 130, 3, "*"+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/barcode")+"*",""); //¼±±×¸®±â¤» // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ ÇÏ´Ü ¾È³»¹®±¸ »èÁ¦ /* sSndMsg += astfGraphicBox(5, 180, 815, 0, 4); if(PrnKind == "2" || PrnKind == "7") { sSndMsg += astfPrintOut(20, 600, 2, "*ÀǾàǰÀº ±× Ư¼º»ó º¸°ü¹×°ü¸®°¡ ¾ö°ÝÇØ¾ßÇϹǷÎ, "); sSndMsg += astfPrintOut(20, 630, 2, " ÀÏ´Ü Á¶Á¦Åõ¾àµÈ ¾àÀº ¹Ý³³ÇÒ ¼ö ¾ø½À´Ï´Ù."); } else { sSndMsg += astfPrintOut(20, 630, 2, "*ÀǾàǰÀº ±× Ư¼º»ó º¸°ü¹×°ü¸®°¡ ¾ö°ÝÇØ¾ßÇϹǷÎ, ÀÏ´Ü Á¶Á¦Åõ¾àµÈ ¾àÀº ¹Ý³³ÇÒ ¼ö ¾ø½À´Ï´Ù."); } */ ////////////////////////////////////////////////// // ¶óº§ Çϴܳ»¿ë // ///////////////////////////////////////////////// if( fChkSumcls(iPoint)){ //´Üµ¶¶óº§Ãâ·Â fIndependPrint(); } else { //ÀϹݶóº§Ãâ·Â fGnrlPrint(); } //Á¾·á(¸Å¼ö) sSndMsg += astfEndFormat(0); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.SendMsg(sSndMsg); BarOCX.PortClose(); sSndMsg = ""; } else { BarOCX.SendMessage(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } // 2010.02.17 pymi if(nextPage) { fGnrlPrintnm(nCnt, bordflag); nextPage = false; nCnt = 0; bordflag = ""; } // (e) if(iPoint == getNodesetCount("/root/main/lbllist/lbllist")) { iTotalPageNum = 0; iPageCnt = 0; } } if(PrnKind == "2" || PrnKind == "7" ) {//sato } else { BarOCX.PortClose(); //alert("close 2"); } model.refresh(); } /** * */ function fIndependPrint() { //¾àÁ¾·ù(³»º¹¾à/ÁÖ»ç¾à/¿Ü¿ë¾à) sSndMsg += astfPrintOut(30, 230, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //¶óº§³»¿ë var drugkindnm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"); var qty = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpqty"); var dayqty = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/dayprcpqty"); var tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims"); var dayno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno");//ó¹æÀϼö var mthddayno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/dayno"); //¿ë¹ýÀϼö var packunit = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/packunit"); //¾àǰ¸¶½ºÅÍÀÇ ¼ö·®´ÜÀ§ if (drugkindnm == "[ÁÖ»ç¾à]"){ //¿ë¹ý2 sSndMsg += astfPrintOut(30, 300, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts4"),""); } else if (drugkindnm == "[¿Ü¿ë¾à]"){ //sSndMsg += astfPrintOut(210, 230, 7, "1ÀÏ "+tims+"ȸ "+fChkFloat(qty)+"°³¾¿ "+dayno+"ÀϺÐ",""); //¿ë¹ý1 //sSndMsg += astfPrintOut(30, 300, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts1") + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts2") // + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts3"),""); //¿ë¹ý2 //sSndMsg += astfPrintOut(30, 370, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts4"),""); //À̼±°æ 2008-08-20 start(¿ë¹ýÀÌ Â©¸®Áö ¾Ê°í Ãâ·ÂµÇµµ·Ï) var val = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts1") + " " + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts2") + " " + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts3") + " " + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts4"); if(val.length > 22) { sSndMsg += astfPrintOut(30, 300, 7, val.substring(0, 22),""); if(val.substring(0, 22).length > 22) { sSndMsg += astfPrintOut(30, 370, 7, val.substring(22, 50),""); sSndMsg += astfPrintOut(30, 440, 7, val.substring(50, val.length),""); } else { sSndMsg += astfPrintOut(30, 370, 7, val.substring(22, val.length),""); } } else { sSndMsg += astfPrintOut(30, 300, 7, val.substring(0, 22),""); } //À̼±°æ 2008-08-20 end(¿ë¹ýÀÌ Â©¸®Áö ¾Ê°í Ãâ·ÂµÇµµ·Ï) } else if (drugkindnm == "[³»º¹¾à]"){ var sumcls = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls"); var atcyn = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/atcyn"); alert("atcyn"); if( sumcls == "DM" || sumcls == "DS" || sumcls == "DT" || sumcls == "DX"){ //20091110 À̼±°æ ¼öÁ¤ : ¶óº§±×·ìÀÌ ¸¶¾à(°æ±¸), ¼öÁ¦, ptp, ±âŸ¾àÀϰæ¿ì ¾àǰ¸¶½ºÅÍÀÇ ¼ö·®´ÜÀ§¸¦ Ãâ·Â var tmpqty = Math.round(qty * 10) / 10; if(packunit == "T" || packunit == "C") { sSndMsg += astfPrintOut(210, 230, 7, mthddayno + "ÀÏ "+tims+"ȸ "+fChkFloat(qty)+"Á¤¾¿ "+(dayno*mthddayno)+"ÀϺÐ",""); } else { sSndMsg += astfPrintOut(210, 230, 7, mthddayno + "ÀÏ "+tims+"ȸ "+fChkFloat(tmpqty)+ packunit +"¾¿ "+(dayno*mthddayno)+"ÀϺÐ",""); } } else { sSndMsg += astfPrintOut(210, 230, 7, mthddayno + "ÀÏ "+tims+"ȸ "+fChkFloat(qty)+"Æ÷[Á¤]¾¿ "+(dayno*mthddayno)+"ÀϺÐ",""); } //sSndMsg += astfPrintOut(210, 230, 7, "1ÀÏ "+tims+"ȸ "+fChkFloat(qty)+packunit+dayno+"ÀϺÐ",""); //¿ë¹ý1 sSndMsg += astfPrintOut(30, 300, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts1") + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts2") + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts3"),""); //¿ë¹ý2 sSndMsg += astfPrintOut(30, 370, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts4"),""); } var lblcnts1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblcnts1"); lblcnts1 = lblcnts1.setReplaceWord("~", "-"); //20090728 // 2010.03.22 pymi if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugflag") == "L" && !fChkSumcls(iPoint) && model.getValue("/root/hidden/srchinfo/lbl5") == "Y") { var val = ""; } else { // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ var val = parseFloat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/totdrugqty")) +" "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpnm"); /* var val = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpcd") +" "+parseFloat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/totdrugqty")) +" "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpnm"); */ } // (e) if(lblcnts1.length > 28){ //ÁÖÀÇ»çÇ× sSndMsg += astfPrintOut(30, 450, 5, lblcnts1.substring(0,24),""); sSndMsg += astfPrintOut(30, 510, 5, lblcnts1.substring(24,lblcnts1.length),""); //¾àÁ¤º¸ sSndMsg += astfPrintOut(30, 570, 4, val, ""); } else { //ÁÖÀÇ»çÇ× sSndMsg += astfPrintOut(30, 450, 5, lblcnts1,""); //¾àÁ¤º¸ sSndMsg += astfPrintOut(30, 510, 4, val, ""); } } /** * */ function fGnrlPrint() { var cnt = 0; var drugcnt = 0; var ordCnt = 0; // 2010.02.10 pymi //¾àÁ¾·ù(³»º¹¾à/ÁÖ»ç¾à/¿Ü¿ë¾à) sSndMsg += astfPrintOut(30, 220, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //¶óº§³»¿ë var drugkindnm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"); var qty = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpqty"); var dayqty = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/dayprcpqty"); var tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims"); var dayno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno");//ó¹æÀϼö var mthddayno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/dayno"); //¿ë¹ýÀϼö //¾àÄÚµå Ãâ·Â var drugkind1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"); var dayno1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno"); var mthd1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthd1"); var mthd2 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthd2"); var mthd3 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthd3"); var mthdcd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcd"); if (drugkindnm != "[³»º¹¾à]"){ if (drugkindnm == "[ÁÖ»ç¾à]"){ //¿ë¹ý2 sSndMsg += astfPrintOut(30, 290, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts4"),""); } else if (drugkindnm == "[¿Ü¿ë¾à]"){ //sSndMsg += astfPrintOut(210, 220, 7, "1ÀÏ "+tims+"ȸ "+qty+"°³¾¿ "+dayno+"ÀϺÐ",""); //¿ë¹ý1 sSndMsg += astfPrintOut(30, 290, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts1") + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts2") + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts3"),""); //¿ë¹ý2 sSndMsg += astfPrintOut(30, 360, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts4"),""); } for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){ var drugkind2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/drugkindnm"); var dayno2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); var mthd4 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd1"); var mthd5 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd2"); var mthd6 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd3"); if((drugkind1 == drugkind2) && (dayno1 == dayno2) && (mthd1 == mthd4 && mthd2 == mthd5 && mthd3 == mthd6) && !fChkSumcls(j)){ //if(model.getValue("/root/main/lbllist/lbllist["+j+"]/fst_prnt") == "Y"){ var prcpqty = model.getValue("/root/main/lbllist/lbllist["+j+"]/totdrugqty")/model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims") ; prcpqty = Math.ceil( prcpqty * tims*1000)/1000; // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ var val = prcpqty +" "+(model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm")).substring(0,6); /* var val = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd") +" "+prcpqty +" "+(model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm")).substring(0,6); */ sSndMsg += astfPrintOut(30+((cnt%2)*380), 440+((parseInt(cnt/2, 10))*40), 2, val, ""); //} cnt++; } else { break; } if(cnt == 14){ // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ ÇÑ ÆäÀÌÁö¿¡ ÃÖ°í 8°³¿¡¼­ 14°³ Ãâ·ÂµÇ°Ô º¯°æ j++; break; } } iPoint = j-1; } else if (drugkindnm == "[³»º¹¾à]"){ var lbltims =0; lbl_tims = mthd2.split(","); if ( mthdcd == "ZZZ" ){ lbltims = tims; } else if ( mthd3.indexOf("Ãëħ") > -1 ) { lbltims = lbl_tims.length +1; } else if(mthd2.indexOf("¸¶´Ù") > -1){ lbltims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims"); } else if(mthd1.indexOf("ÀÇ»çÁö½Ã") > -1){ lbltims = tims; } else { lbltims = lbl_tims.length; } tims = lbltims; for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){ var drugkind2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/drugkindnm"); var dayno2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); var mthd4 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd1"); var mthd5 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd2"); var mthd6 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd3"); if((drugkind1 == drugkind2) && (dayno1 == dayno2) && (mthd1 == mthd4 && mthd2 == mthd5 && mthd3 == mthd6) && !fChkSumcls(j)){ drugcnt++; } else { break; } } /*if ( drugcnt == 1 ){ if(lbltims == 1) { if(mthd2.indexOf("¸¶´Ù") == -1) { sSndMsg += astfPrintOut(210, 220, 7, mthddayno + "ÀÏ "+lbltims+ "ȸ"+fChkFloat(qty)+"Æ÷[Á¤]¾¿ "+(dayno * mthddayno)+"ÀϺÐ",""); prcpqty = prcpqty * lbltims; } else { sSndMsg += astfPrintOut(210, 220, 7, mthddayno + "ÀÏ "+tims+ "ȸ"+fChkFloat(qty)+"Æ÷[Á¤]¾¿ "+(dayno * mthddayno)+"ÀϺÐ",""); prcpqty = prcpqty * tims; } } else { sSndMsg += astfPrintOut(210, 220, 7, mthddayno + "ÀÏ "+lbltims+ "ȸ"+fChkFloat(qty)+"Æ÷[Á¤]¾¿ "+(dayno * mthddayno)+"ÀϺÐ",""); prcpqty = prcpqty * lbltims; } } else { */ if(lbltims == 1) { if(mthd2.indexOf("¸¶´Ù") == -1) { sSndMsg += astfPrintOut(210, 220, 7, mthddayno + "ÀÏ "+lbltims+ "ȸ 1Æ÷¾¿ "+(dayno * mthddayno)+"ÀϺÐ",""); } else { sSndMsg += astfPrintOut(210, 220, 7, mthddayno + "ÀÏ "+tims+ "ȸ 1Æ÷¾¿ "+(dayno * mthddayno)+"ÀϺÐ",""); } } else { sSndMsg += astfPrintOut(210, 220, 7, mthddayno + "ÀÏ "+lbltims+ "ȸ 1Æ÷¾¿ "+(dayno * mthddayno)+"ÀϺÐ",""); } //} //¿ë¹ý1 //if ( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts3") =="ÃëħÀü¿¡" ){ // sSndMsg += astfPrintOut(30, 290, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts1") + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts2") // + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts3"),""); //} else { sSndMsg += astfPrintOut(30, 290, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthd1") + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthd2") + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthd3"),""); //} //¿ë¹ý2 sSndMsg += astfPrintOut(30, 360, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts4"),""); //} for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){ var drugkind2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/drugkindnm"); var dayno2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); var mthd4 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd1"); var mthd5 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd2"); var mthd6 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd3"); if((drugkind1 == drugkind2) && (dayno1 == dayno2) && (mthd1 == mthd4 && mthd2 == mthd5 && mthd3 == mthd6) && !fChkSumcls(j)){ //if(model.getValue("/root/main/lbllist/lbllist["+j+"]/fst_prnt") == "Y"){ /* var prcpqty = model.getValue("/root/main/lbllist/lbllist["+j+"]/totdrugqty")/model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims") ; prcpqty = Math.ceil( prcpqty * tims*1000)/1000; var val = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd") +" "+prcpqty +" "+(model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm")).substring(0,6); sSndMsg += astfPrintOut(30+((cnt%2)*380), 440+((parseInt(cnt/2, 10))*40), 2, val, "");*/ //} //cnt++; // 2010.02.17 pymi var lblcnts2 = model.getValue("/root/main/lbllist/lbllist["+ j +"]/lblcnts2"); bordflag += j + "/"; // Æ÷Àå¶óº§ ó¹æÄÚµå ¼ø¼­ if(lblcnts2.length > 0) { sSndMsg += astfPrintOut(30, 440 +(60 * ordCnt), 4, lblcnts2, ""); //if(ordCnt == 0) {sSndMsg += astfPrintOut(30, 440, 4, lblcnts2, ""); } //if(ordCnt == 1) {sSndMsg += astfPrintOut(30, 500, 4, lblcnts2, ""); } //if(ordCnt == 2) {sSndMsg += astfPrintOut(30, 560, 4, lblcnts2, ""); } ordCnt++; // Æ÷Àå¶óº§ °¹¼ö } // (e) } else { // ¿ë¹ýÀÌ ¹Ù²î´Â ½ÃÁ¡ 2010.02.10 pymi // ó¹æÃâ·Â fGnrlPrintnm(ordCnt, bordflag); bordflag = ""; // (e) break; } //if(cnt == 8){ if(ordCnt == 3){ //2010.02.17 pymi j++; if(j <= getNodesetCount("/root/main/lbllist/lbllist")) { var drugkind3 = model.getValue("/root/main/lbllist/lbllist["+j+"]/drugkindnm"); var dayno3 = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); var mthd7 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd1"); var mthd8 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd2"); var mthd9 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd3"); if((drugkind1 == drugkind3) && (dayno1 == dayno3) && (mthd1 == mthd7 && mthd2 == mthd8 && mthd3 == mthd9) && !fChkSumcls(j)){ // ÆäÀÌÁö ³Ñ°Ü¼­µµ ¿ë¹ý ¹Ù²îÁö ¾ÊÀ¸¸é °è¼Ó ÁøÇà } else { // ÆäÀÌÁö ³Ñ±æ¶§ ¿ë¹ýÀÌ ¹Ù²î¸é ó¹æ Ãâ·Â //Á¾·á(¸Å¼ö) nextPage = true; nCnt = ordCnt; //fGnrlPrintnm(ordCnt, bordflag); } } // (e) break; } } iPoint = j-1; // ¿ë¹ý ¹Ù²îÁö ¾Ê´Â ¸¶Áö¸· ó¹æ Ãâ·Â 2010.02.17 pymi if(iPoint == getNodesetCount("/root/main/lbllist/lbllist") ) { if(ordCnt == 3) { nextPage = true; nCnt = ordCnt; } else { fGnrlPrintnm(ordCnt, bordflag); bordflag = ""; } } // (e) } } /* * 2010.02.17 pymi ó¹æÃâ·Â */ function fGnrlPrintnm(linecnt, ordflag) { var cnt = 0; var xValue = 440; var valCnt = 14; // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ ÇÑ ÆäÀÌÁö¿¡ ÃÖ°í 8°³¿¡¼­ 14°³ Ãâ·ÂµÇ°Ô º¯°æ var lblup = false; var xtims = 0; var sordflag = ""; sordflag = ordflag.split("/"); if(linecnt == 1) { xValue = 490; valCnt = 6; } if(linecnt == 2) { xValue = 550; valCnt = 2; } if(linecnt == 3) { xValue = 440; valCnt = 8; lblup = true;} //¾àÁ¾·ù(³»º¹¾à/ÁÖ»ç¾à/¿Ü¿ë¾à) for(mPoint = parseInt(sordflag[0]); mPoint <= parseInt(sordflag[sordflag.length - 2]); mPoint++) { if(lblup) { //½ÃÀÛ(X, Y) xValue = 440; valCnt = 14; // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ ÇÑ ÆäÀÌÁö¿¡ ÃÖ°í 8°³¿¡¼­ 14°³ Ãâ·ÂµÇ°Ô º¯°æ cnt = 0; // /*PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind"); PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left"); PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top"); commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind"); Comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm"); PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval"); if(commkind == "02") { PortNm = 1; } else { PortNm = 2; } BarOCX.setPrt(PrnKind, PortNm, PrtNm, Comm);*/ // var reprint =""; if ( model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/lblprnttims")>0 ){ reprint ="(Àç)"; } sSndMsg += astfStartFormat(0, 0, "B"); iPageCnt++; //alert(iPageCnt); ////////////////////////////////////////////////// // ¶óº§ »ó´Ü³»¿ë // ///////////////////////////////////////////////// //º´½Ç sSndMsg += astfPrintOut(30, 30, 6, model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/roomcd"),""); //ȯÀÚ¸í sSndMsg += astfPrintOut(180, 30, 6, model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/patnm").substring(0,5),""); //¹ÙÄÚµå(º¯È¯) // 20101101_laboru_°æºÏ´ëº´¿ø_atc drugkind ±¸ºÐÀÚ¿¡ ÀÇÇÑ ¹ÙÄÚµå Ãâ·Â Çü½Ä // t : "ATC" , p : »êÁ¦ ¹ÙÄÚµå, e : blank if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/atc_drugkind") == "t" ) { sSndMsg += astfPrintOut(390, 40, 6, "ATC",""); } else if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/atc_drugkind") == "p") { //model.setValue("/root/main/lbllist/lbllist["+iPoint+"]/barcode" , model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/barcode") + iPoint ); sSndMsg += astfBarCode_Code39(390, 40, "N", 70, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/barcode")); } else { // °ø¹é } //sSndMsg += astfBarCode_Code39(390, 40, "N", 70, model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/barcode")); //ȯÀÚ¹øÈ£(Åõ¾à¹øÈ£) //sSndMsg += astfPrintOut(30, 85, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid") + // " (" + model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugno") + reprint+")",""); //ȯÀÚ¹øÈ£ sSndMsg += astfPrintOut(30, 85, 3, model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/pid") ,""); //(Åõ¾à¹øÈ£)=>20091014 À̼±°æ : Å©°í ÁøÇÏ°Ô º¯°æ sSndMsg += astfPrintOut(130, 85, 6, " (" + model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/drugno") + ")",""); //(Àç)¼ºº°³ªÀÌ sSndMsg += astfPrintOut(280, 85, 3, reprint+model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/sexage"),""); //󹿰ú¾à¾î¸í sSndMsg += astfPrintOut(30, 135, 3, model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/deptengabbr"),""); //ÀÇ»ç¸í sSndMsg += astfPrintOut(120, 135, 3, model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/orddrnm"),""); //ó¹æÀÏÀÚ sSndMsg += astfPrintOut(270, 135, 3, fDateFormat(model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/prcpdd")),""); //ÆäÀÌÁö¼ö sSndMsg += astfPrintOut(430, 135, 3, iPageCnt+"/"+iTotalPageNum,""); //¹ÙÄÚµå // 20101101_laboru_°æºÏ´ëº´¿ø_¹ÙÄÚµå ¾Æ·¡ ³»¿ë »èÁ¦ //sSndMsg += astfPrintOut(510, 130, 3, "*"+model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/barcode")+"*",""); //¼±±×¸®±â // 201011101_laboru_°æºÏ´ëº´¿ø_¶óº§ ÇÏ´Ü ¾È³»¹®±¸ »èÁ¦ /* sSndMsg += astfGraphicBox(5, 180, 815, 0, 4); if(PrnKind == "2" || PrnKind == "7") { sSndMsg += astfPrintOut(20, 600, 2, "*ÀǾàǰÀº ±× Ư¼º»ó º¸°ü¹×°ü¸®°¡ ¾ö°ÝÇØ¾ßÇϹǷÎ, "); sSndMsg += astfPrintOut(20, 630, 2, " ÀÏ´Ü Á¶Á¦Åõ¾àµÈ ¾àÀº ¹Ý³³ÇÒ ¼ö ¾ø½À´Ï´Ù."); } else { sSndMsg += astfPrintOut(20, 630, 2, "*ÀǾàǰÀº ±× Ư¼º»ó º¸°ü¹×°ü¸®°¡ ¾ö°ÝÇØ¾ßÇϹǷÎ, ÀÏ´Ü Á¶Á¦Åõ¾àµÈ ¾àÀº ¹Ý³³ÇÒ ¼ö ¾ø½À´Ï´Ù."); } */ lblup = false; //} sSndMsg += astfPrintOut(30, 220, 7, model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/drugkindnm"),""); //¶óº§³»¿ë var drugkindnm = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/drugkindnm"); var qty = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/prcpqty"); var dayqty = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/dayprcpqty"); var tims = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/prcptims"); var dayno = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/prcpdayno");//ó¹æÀϼö var mthddayno = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/dayno"); //¿ë¹ýÀϼö //¾àÄÚµå Ãâ·Â var drugkind1 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/drugkindnm"); var dayno1 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/prcpdayno"); var mthd1 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthd1"); var mthd2 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthd2"); var mthd3 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthd3"); var mthdcd = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthdcd"); var lbltims =0; lbl_tims = mthd2.split(","); if ( mthdcd == "ZZZ" ){ lbltims = tims; } else if ( mthd3.indexOf("Ãëħ") > -1 ) { lbltims = lbl_tims.length +1; } else if(mthd2.indexOf("¸¶´Ù") > -1){ lbltims = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/prcptims"); } else { lbltims = lbl_tims.length; } tims = lbltims; xtims = tims; if(lbltims == 1) { if(mthd2.indexOf("¸¶´Ù") == -1) { sSndMsg += astfPrintOut(210, 220, 7, mthddayno + "ÀÏ "+lbltims+ "ȸ 1Æ÷¾¿ "+(dayno * mthddayno)+"ÀϺÐ",""); } else { sSndMsg += astfPrintOut(210, 220, 7, mthddayno + "ÀÏ "+tims+ "ȸ 1Æ÷¾¿ "+(dayno*mthddayno)+"ÀϺÐ",""); } } else { sSndMsg += astfPrintOut(210, 220, 7, mthddayno + "ÀÏ "+lbltims+ "ȸ 1Æ÷¾¿ "+(dayno*mthddayno)+"ÀϺÐ",""); } //¿ë¹ý1 var val = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthd1") + model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthd2") + model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthd3"); sSndMsg += astfPrintOut(30, 290, 7, val,""); //¿ë¹ý2 sSndMsg += astfPrintOut(30, 360, 7, model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthdcnts4"),""); } else{ //¾àÄÚµå Ãâ·Â var drugkind1 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/drugkindnm"); var dayno1 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/prcpdayno"); var mthd1 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthd1"); var mthd2 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthd2"); var mthd3 = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthd3"); var mthdcd = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/mthdcd"); var tims = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/prcptims"); var lbltims =0; lbl_tims = mthd2.split(","); if ( mthdcd == "ZZZ" ){ lbltims = tims; } else if ( mthd3.indexOf("Ãëħ") > -1 ) { lbltims = lbl_tims.length +1; } else if(mthd2.indexOf("¸¶´Ù") > -1){ lbltims = model.getValue("/root/main/lbllist/lbllist["+mPoint+"]/prcptims"); } else { lbltims = lbl_tims.length; } tims = lbltims; xtims = tims; } for(var j = mPoint; j <= parseInt(sordflag[sordflag.length - 2]) ; j++){ //var drugkind2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/drugkindnm"); //var dayno2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); //var mthd4 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd1"); //var mthd5 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd2"); //var mthd6 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthd3"); //if((drugkind1 == drugkind2) && (dayno1 == dayno2) && (mthd1 == mthd4 && mthd2 == mthd5 && mthd3 == mthd6) // && !fChkSumcls(j)){ //if(model.getValue("/root/main/lbllist/lbllist["+j+"]/fst_prnt") == "Y"){ var prcpqty = model.getValue("/root/main/lbllist/lbllist["+j+"]/totdrugqty")/model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims"); prcpqty = Math.ceil( prcpqty * xtims*1000)/1000 ; //20100224 À̼±°æ ¼öÁ¤ : zebra´Â ¸íĪ ±æ°Ô ³ª¿Àµµ·Ï ÇÔ »çÅ丸 Àß¶ó¼­ Ãâ·Â if(PrnKind == "2" || PrnKind == "7" ) {//sato // 2010.03.22 pymi if(model.getValue("/root/main/lbllist/lbllist["+ j +"]/drugflag") == "L" && !fChkSumcls(j) && model.getValue("/root/hidden/srchinfo/lbl5") == "Y") { var val = ""; } else { // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ var val = prcpqty +" "+(model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm")).substring(0,6); /* var val = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd") +" "+prcpqty +" "+(model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm")).substring(0,6); */ } // (e) } else { // 2010.03.22 pymi if(model.getValue("/root/main/lbllist/lbllist["+ j +"]/drugflag") == "L" && !fChkSumcls(j) && model.getValue("/root/hidden/srchinfo/lbl5") == "Y") { var val = ""; } else { // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ var val = prcpqty +" "+model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); /* var val = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd") +" "+prcpqty +" "+model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); */ } // (e) } sSndMsg += astfPrintOut(30+((cnt%2)*380), xValue+((parseInt(cnt/2, 10))*40), 2, val, ""); //} cnt++; //} else { // break; //} //if(cnt == 8){ if(cnt == valCnt){ j++; lblup = true; break; } } mPoint = j-1; //var s ="º¹¿ë±â°£: "+(rcptdd.toDate("YYYYMMDD")).getDateFormat("YYYY/MM/DD") +" - "+ ((rcptdd.toDate("YYYYMMDD")).getAddDate( parseInt(dayno),"D")).getDateFormat("YYYY/MM/DD") ; //sSndMsg +=astfPrintOut(30, 630, 3, s); //Á¾·á(¸Å¼ö) sSndMsg += astfEndFormat(0); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.SendMsg(sSndMsg); BarOCX.PortClose(); sSndMsg = ""; } else { BarOCX.SendMessage(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } } model.refresh(); } /** * */ function fDateFormat(sDD, sYMD) { if(sYMD == "MD"){ return sDD.substr(4,2)+"/"+sDD.substr(6,2); } else { return sDD.substr(0,4)+"/"+sDD.substr(4,2)+"/"+sDD.substr(6,2); } } /** * */ function fPrntTime(sDD, sTM) { if(PrnKind == "2" || PrnKind == "7" ) { return sDD.substr(4,2)+"/"+sDD.substr(6,2)+" "+sTM.substr(0,2)+":"+sTM.substr(2,2); } else { return sDD.substr(4,2)+" / "+sDD.substr(6,2)+" "+sTM.substr(0,2)+":"+sTM.substr(2,2)+":"+sTM.substr(4,2); } } /** * */ function fChkFloat(qty) { var fQty = parseFloat(qty); var fRst = ""; if(fQty%1 == 0){ fRst = parseInt(qty); } else { fRst = qty; } return fRst; } /** * */ function fChkSumcls(cnt) { var chk = false; var sSumcls = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/sumcls"); var sSnglyn = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/atcifsnglyn"); var sDrugindependpackflag = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/drugindependpackflag"); if(sSumcls == "DI" || sSumcls == "DS"|| sSumcls == "DX"|| sSumcls == "DT" || sSumcls == "DM" || sSumcls == "DP" || sSumcls == "IH"|| sSumcls == "IO" || sSumcls == "IS"|| sSumcls == "IX"|| sSumcls == "X" || sSumcls == "I"){ chk = true; } if ( sSumcls == "D" && sSnglyn =="Y" ) { chk = true; } if ( sDrugindependpackflag =="Y"){ chk = true; } //2010-06-29 [º¸°ü¹æ¹ý:³ÃÀåÁÖ»ç/°íÀ§ÇèÁÖ»ç] ´Üµ¶Ãâ·Â var sDngryn = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/dngryn"); //°íÀ§ÇèÁÖ»ç ¿©ºÎ var sKeepmthdyn = model.getValue("/root/main/lbllist/lbllist["+cnt+"]/keepmthdyn"); //³ÃÀåÁÖ»ç ¿©ºÎ if(sDngryn == "Y" || sKeepmthdyn=="Y" ) chk = true; return chk; } /** * ¹°¾à¶óº§Ãâ·Â */ function fLiquidLBLPrint() { // Comm ¼³Á¤ //BarOCX.CommPort = "1"; // Ãâ·Â Port //BarOCX.Settings = "9600,n,8,1"; // Comm ¼³Á¤ //BarOCX.Settings = "127.0.0.1"; // Comm ¼³Á¤ PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind"); PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left"); PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top"); commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind"); Comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm"); PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval"); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX = CommAX1; } else { BarOCX = CommAX2; } if(commkind == "02") { PortNm = 1; } else { PortNm = 2; } //alert("PrnKind : " + PrnKind + "\nportnm:" + PortNm + "\nprtnm:" + PrtNm + "\ncomm:" + Comm); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.setPrt(PrnKind, PortNm, PrtNm, Comm); } else { BarOCX.CommPort = "1"; // Ãâ·Â Port BarOCX.Settings = "9600,n,8,1"; // Comm ¼³Á¤ var ocxcnt = 0; while(!BarOCX.PortOpen() && ocxcnt < 10) { BarOCX.PortClose(); fSleep(2000); ocxcnt++; } } var reprint =""; for(iPoint = 1; iPoint <= getNodesetCount("/root/main/lbllist/lbllist") ; iPoint++){ if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid") == "") { return; } if ( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblprnttims")>0 ){ reprint ="(Àç)"; } //½ÃÀÛ(X, Y) sSndMsg += astfStartFormat(0, 0, "S"); ////////////////////////////////////////////////// // ¶óº§ »ó´Ü³»¿ë // ///////////////////////////////////////////////// //º´½Ç //sSndMsg += astfPrintOut(50, 30, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/roomcd"),""); //ȯÀÚ¸í //sSndMsg += astfPrintOut(50, 85, 6, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/patnm"),""); //³»º¹¾à //sSndMsg += astfPrintOut(250, 30, 3, "³»º¹¾à",""); //ó¹æÀÏÀÚ //sSndMsg += astfPrintOut(250, 70, 3, fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd")),""); //ȯÀÚ¹øÈ£(Åõ¾à¹øÈ£) //sSndMsg += astfPrintOut(250, 110, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid")+ " ( "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugno")+reprint+" )",""); //¼±±×¸®±â //sSndMsg += astfGraphicBox(5, 145, 465, 0, 4); var sDD = getCurrentDate(); var sTM = getCurrentTime(); if(PrnKind == "2" || PrnKind == "7" ) {//sato //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 20, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 25, 21, "Ãâ·Â:"+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 55, 21, "ó¹æ:"+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } else { //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 25, 21, "Ãâ ·Â : "+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 55, 21, "ó ¹æ : "+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } //º´½Ç sSndMsg += astfPrintOut(20, 80, 31, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/roomcd"),""); //ȯÀÚÀ̸§ sSndMsg += astfPrintOut(120, 80, 31, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/patnm"),""); //ȯÀÚ¹øÈ£ sSndMsg += astfPrintOut(240, 80, 31, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid")+" ("+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugno")+reprint+")",""); //¼±±×¸®±â sSndMsg += astfGraphicBox(5, 120, 465, 0, 4); ////////////////////////////////////////////////// // ¶óº§ Çϴܳ»¿ë // ///////////////////////////////////////////////// //¶óº§³»¿ë var dayqty = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/dayprcpqty"); var qtyunit = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpqtyunit"); var tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims"); var dayno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno"); var qty = Math.ceil(dayqty / tims * 1000)/1000 ; var totqty = parseInt(dayqty)*parseInt(dayno); var mthd1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts1"); var mthd2 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts2"); var mthd3 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcnts3"); //¿ë¹ý if ( mthd1 == "" && mthd2 == "" && mthd3 == "" ){ //1ÀÏ Xȸ Xml¾¿ XÀϺРsSndMsg += astfPrintOut(40, 126, 27, "1ÀÏ "+tims+"ȸ "+qty+qtyunit+"¾¿ "+dayno+"ÀϺÐ",""); var val = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/abbrnm"); if (val.length > 17) { sSndMsg += astfPrintOut(40, 171, 27, val.substring(0,17) ,""); sSndMsg += astfPrintOut(40, 210, 27, val.substring(17,val.length) ,""); } else { sSndMsg += astfPrintOut(40, 210, 27, val ,""); } } else { //1ÀÏ Xȸ Xml¾¿ XÀϺРvar val = mthd1 + " " + mthd2 + " " + mthd3; if (val.length > 17) { sSndMsg += astfPrintOut(40, 126, 27, "1ÀÏ "+tims+"ȸ "+qty+qtyunit+"¾¿ "+dayno+"ÀϺÐ",""); sSndMsg += astfPrintOut(40, 171, 27, val.substring(0,17) ,""); sSndMsg += astfPrintOut(40, 210, 27, val.substring(17,val.length) ,""); } else { sSndMsg += astfPrintOut(40, 165, 27, "1ÀÏ "+tims+"ȸ "+qty+qtyunit+"¾¿ "+dayno+"ÀϺÐ",""); sSndMsg += astfPrintOut(40, 210, 27, val ,""); } } //¿ë¹ý //sSndMsg += astfPrintOut(40, 210, 27, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/abbrnm"),""); //¾àǰÄÚµå + Ãѿ뷮 //sSndMsg += astfPrintOut(40, 255, 27, "[ "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpcd")+" ] "+totqty,""); //¾àǰÄÚµå + Ãѿ뷮 + ¾àǰ¸í var prcpnm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpnm"); if(PrnKind == "2") { // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ var val = parseFloat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/totdrugqty")) + " " + prcpnm; /* var val = "[ "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpcd")+" ] "+ parseFloat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/totdrugqty")) + " " + prcpnm; */ sSndMsg += astfPrintOut(20, 255, 27, val,""); } else { if(prcpnm.length > 12) { prcpnm = prcpnm.substring(0,12); } // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ sSndMsg += astfPrintOut(20, 255, 27, parseFloat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/totdrugqty")) + " " + prcpnm,""); /* sSndMsg += astfPrintOut(20, 255, 27, "[ "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpcd")+" ] "+ parseFloat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/totdrugqty")) + " " + prcpnm,""); */ } //º¸°ü¹æ¹ý var lblcnts1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblcnts1"); lblcnts1 = lblcnts1.setReplaceWord("~", "-"); //20090728 if ( lblcnts1 == "" ) { if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd") != ""){ sSndMsg += astfPrintOut(40, 300, 27, "< "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd")+" >",""); } } else { if(lblcnts1.length > 17){ //ÁÖÀÇ»çÇ× sSndMsg += astfPrintOut(20, 285, 3, lblcnts1.substring(0,17),""); sSndMsg += astfPrintOut(20, 315, 3, lblcnts1.substring(17,lblcnts1.length),""); } else { //ÁÖÀÇ»çÇ× sSndMsg += astfPrintOut(40, 300, 27, lblcnts1,""); } } //Á¾·á(¸Å¼ö) sSndMsg += astfEndFormat(0); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.SendMsg(sSndMsg); BarOCX.PortClose(); sSndMsg = ""; } else { BarOCX.SendMessage(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } } if(PrnKind == "2" || PrnKind == "7" ) {//sato } else { BarOCX.PortClose(); //alert("close 3"); } model.refresh(); } /* * »êÁ¦Ã³¹æÀ» ¿ë¹ýÄڵ庰·Î ¶óº§Ãâ·Â */ function fPowderlLBLPrint() { PrnKind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind"); PrnMarginLeft = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/left"); PrnMarginTop = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/blank/top"); commkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind"); Comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm"); PrtNm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval"); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX = CommAX1; } else { BarOCX = CommAX2; } if(commkind == "02") { PortNm = 1; } else { PortNm = 2; } //alert("PrnKind : " + PrnKind + "\nportnm:" + PortNm + "\nprtnm:" + PrtNm + "\ncomm:" + Comm); if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.setPrt(PrnKind, PortNm, PrtNm, Comm); } else { BarOCX.CommPort = "1"; // Ãâ·Â Port BarOCX.Settings = "9600,n,8,1"; // Comm ¼³Á¤ var ocxcnt = 0; while(!BarOCX.PortOpen() && ocxcnt < 10) { BarOCX.PortClose(); fSleep(2000); ocxcnt++; } } var sDD = getCurrentDate(); var sTM = getCurrentTime(); var reprint =""; totcnt = 0; pg = 0; totpg = 0; for ( var i = 1; i <= getNodesetCount("/root/main/lbllist/lbllist") ; i++){ if(model.getValue("/root/main/lbllist/lbllist["+i+"]/pid") == "") { return; } if ( model.getValue("/root/main/lbllist/lbllist["+i+"]/lblgrup") != "DI" && model.getValue("/root/main/lbllist/lbllist["+i+"]/lblgrup") != "DS" ){ totcnt++; } } // 2010.02.12 pymi if( (totcnt%6) != 0) totcnt ++; // ¶óº§Âï±â Àü¿¡ ÇÑÁÙ ¶ç¿ì±â for ( var i = 1; i <= getNodesetCount("/root/main/lbllist/lbllist") ; i++){ if(model.getValue("/root/main/lbllist/lbllist["+ i +"]/lblcnts2").length > 0) { totcnt++; vlblcnt = true;} } // (e) for(iPoint = 1; iPoint <= getNodesetCount("/root/main/lbllist/lbllist") ; iPoint++){ if ( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblprnttims")>0 ){ reprint ="(Àç)"; } //½ÃÀÛ(X, Y) sSndMsg += astfStartFormat(0, 0, "S"); if(PrnKind == "2" || PrnKind == "7") { //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 21, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 25, 21, "Ãâ·Â:"+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(190, 55, 21, "ó¹æ:"+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } else { //¶óº§À̸§(³»º¹¾à/ÁÖ»ç¾à/¸¶¾à) sSndMsg += astfPrintOut(20, 25, 7, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 25, 21, "Ãâ ·Â : "+fPrntTime(sDD, sTM),""); //Ãâ·ÂÀÏÀÚ sSndMsg += astfPrintOut(220, 55, 21, "ó ¹æ : "+fDateFormat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd"), "MD"),""); } //º´½Ç sSndMsg += astfPrintOut(20, 80, 31, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/roomcd"),""); //ȯÀÚÀ̸§ sSndMsg += astfPrintOut(120, 80, 31, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/patnm"),""); //ȯÀÚ¹øÈ£ sSndMsg += astfPrintOut(240, 80, 31, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid")+" ("+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugno")+reprint+")",""); //¼±±×¸®±â sSndMsg += astfGraphicBox(5, 120, 465, 0, 4); var sDrugKindcd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugkindnm"); var sMixno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpmixno"); if(sDrugKindcd == "[³»º¹¾à]"){ fInPwdDrugLBL(); // 2010.02.19 pymi if((vcnt < 4) && (ordflag.length > 0)) { mlblcnt1 = true; fPrntLblCnt1(vcnt, ordflag); ordflag = ""; vcnt = 0; } // (e) } if(PrnKind == "2" || PrnKind == "7" ) {//sato BarOCX.SendMsg(sSndMsg); BarOCX.PortClose(); sSndMsg = ""; } else { BarOCX.SendMessage(sSndMsg); //BarOCX.PortClose(); sSndMsg = ""; } // 2010.02.11 pymi if(sDrugKindcd == "[³»º¹¾à]"){ if( iPoint == getNodesetCount("/root/main/lbllist/lbllist") ) { if(vlblcnt && (!mlblcnt1) && (ordflag.length > 0)) { fPrntLblCnt1(vcnt, ordflag); ordflag = ""; vcnt = 0; } } /*else if( iPoint < getNodesetCount("/root/main/lbllist/lbllist") ){ if(vcnt > 4 && (ordflag.length > 0) ) { fPrntLblCnt1(vcnt, ordflag); ordflag = ""; vcnt = 0; } }*/ mlblcnt1= false; } // (e) } if(PrnKind == "2" || PrnKind == "7" ) {//sato } else { BarOCX.PortClose(); //alert("close 4"); } model.refresh(); } /** * »êÁ¦ ¿ë¹ýÄڵ庰 ¶óº§»ó¼¼(¿ë¹ýÄڵ庰 ºÐ·ù) */ function fInPwdDrugLBL() { // var sSumCls1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls"); var sMthdcd1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mthdcd"); var qty = ""; var dayqty = ""; var qtyunit = ""; var tims = ""; var dayno = ""; var cnt = 0; var chgMth = false; // 2010.02.17 pymi for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){ //if(cnt != 0 && fChkIpwdDrug(j)){ // break; //} // sSumCls2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/sumcls"); sMthdcd2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthdcd"); qty = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqty"); dayqty = model.getValue("/root/main/lbllist/lbllist["+j+"]/dayprcpqty"); qtyunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqtyunit"); tims = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims"); dayno = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno"); if(PrnKind == "2") { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); prcpnm = prcpnm.substr(0,7); } else { var prcpnm= model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"); } if((sMthdcd1 == sMthdcd2)){ if(PrnKind == "2") { // // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ //sSndMsg += astfPrintOut(20, 140+(cnt*30), 24, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),""); // sSndMsg += astfPrintOut(165, 140+(cnt*30), 11, prcpnm.substr(0,7),""); // sSndMsg += astfPrintOut(360, 140+(cnt*30), 2, dayqty,""); // sSndMsg += astfPrintOut(430, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(460, 140+(cnt*30), 2, dayno,""); // 2010.02.17 pymi if(model.getValue("/root/main/lbllist/lbllist["+ j +"]/lblcnts2").length > 0 ) {ordflag += j + "/";} // (e) } else { // // 20101101_laboru_°æºÏ´ëº´¿ø_¶óº§ Ãâ·Â¹° ó¹æÄÚµå »èÁ¦ //sSndMsg += astfPrintOut(20, 140+(cnt*30), 24, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),""); // sSndMsg += astfPrintOut(135, 140+(cnt*30), 11, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm"),""); // sSndMsg += astfPrintOut(330, 140+(cnt*30), 2, dayqty,""); // sSndMsg += astfPrintOut(390, 140+(cnt*30), 2, tims,""); // sSndMsg += astfPrintOut(420, 140+(cnt*30), 2, dayno,""); // 2010.02.17 pymi if(model.getValue("/root/main/lbllist/lbllist["+ j +"]/lblcnts2").length > 0 ) {ordflag += j + "/";} // (e) } cnt++; } else { // ¿ë¹ý¹Ù²ð¶§ 2010.02.17 pymi chgMth = true; // (e) break; } //if(fChkIpwdDrug(j)){ // j++; // break; //} if(cnt == fMthdnmLength(iPoint)){ j++; // ´ÙÀ½ ¿ë¹ýÀÌ ´Ù¸¦¶§ 2010.02.17 pymi sMthdcd3 = model.getValue("/root/main/lbllist/lbllist["+j+"]/mthdcd"); if((sMthdcd1 != sMthdcd3) && (ordflag.length > 0) ){ prntflag = true; } break; } } iPoint = j-1; //º¸°ü¹æ¹ý °í°¡ Ãâ·Â var sKeepmthd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd"); var sExpnyn = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/expnyn"); var sExpnnm = ""; if(sExpnyn == "Y") sExpnnm = "°í°¡"; //if(sKeepmthd != "" && sExpnnm != ""){ // sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+sExpnnm+">",""); //} else if(sKeepmthd != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+">",""); } if(sExpnnm != ""){ sSndMsg += astfPrintOut(135, 180, 3, "<"+sExpnnm+">",""); } /* if(sKeepmthd != "" && sExpnnm != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+sExpnnm+">",""); } else if(sKeepmthd != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sKeepmthd+">",""); } if(sExpnnm != ""){ sSndMsg += astfPrintOut(20, 180, 3, "<"+sExpnnm+">",""); }*/ //¿ë¹ýÀÇ ±æÀÌ¿¡ µû¶ó Âï´Â À§Ä¡¸¦ ´Þ¸®ÇÑ´Ù(¿ë¹ýÂïÀ» °ø°£À» È®º¸) var iYPoint = 0; if( fMthdnmLength(iPoint) == 4){ iYPoint = 280; } else { iYPoint = 245; } sSndMsg += astfPrintOut(20, iYPoint, 3, "1ÀÏ "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims")+"ȸ " +model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno")+"ÀϺÐ",""); // sSndMsg += fMthdnm(iPoint); //Á¾·á(¸Å¼ö) //sSndMsg += astfEndFormat(0); // ¿ë¹ý¹Ù²ð¶§ 2010.02.17 pymi //if(chgMth) { if(ordflag.length > 0) { cnt++; //¶óº§³»¿ëÂï±âÀü ÇÑÁÙ ¶ç¿ì±â if(cnt >= 4) sSndMsg += astfEndFormat(0); } else { sSndMsg += astfEndFormat(0); } //} // (e) vcnt = cnt; } function fChkIpwdDrug() { }