/* --------------------------------------------------------------------- * * SMRFC00700_°íÁ¤ÀÚ»ê¹ÙÄÚµåÃâ·Â.xrw (SMRFC00700.xfm - JScript ) * * - Version : * 1) : Ver.1.00.01 * : Create By * : 2008.08.22 ---------------------------------------------------------------------- */ function fInitialize() { misfGridInit(grd_fixasetlist); // °íÁ¤ÀÚ»ê List misfGridInit(grd_cpfixasetlist); // °íÁ¤ÀÚ»ê (¹ÙÄÚµå)List misfGridInit(grd_barcodetarget); // Barcode Print target Grid rszfGoodFlagListByPgmGubn(cmb_goodflag_search,"2","N"); model.resetInstanceNode("/root/send"); misfComboComCdListMulti("Z0007","cmb_instcd_search"); model.setValue("/root/send/fixasetlist/instcd_search", getUserInfo("dutplceinstcd")); // ±â°ü ¼³Á¤ fSetPrintUseCheck(); misfMsterDetailSet(grd_fixasetlist, null, "TRRFC00202", "N"); addComboItem("cmb_goodflag_search", "Àüü", "", "above"); cmb_goodflag_search.select(0); var curdate = getCurrentDate(); var cvtdate = curdate.toDate("YYYYMMDD"); //model.setValue(ipt_possnfrdd_search.attribute("ref") ,cvtdate.getAddDate(-1,"Y").getDateFormat("YYYYMMDD")); //model.setValue(ipt_possntodd_search.attribute("ref") ,curdate); // ´ëºÐ·ù ÄÚµå ÄÞº¸ ¼³Á¤. rszfLMSComboList(model.getValue(cmb_goodflag_search.attribute("ref")), "", "", "cmb_lrgcd_search", "", "L"); grd_fixasetlist.fixedcellcheckbox(0,1) = true; //¹ÙÄÚµå object ¼±¾ð misfMakeBrcdPrntObjHanDo("CommAX"); grd_fixasetlist.fixedcellcheckbox(0,grd_fixasetlist.colRef("choice"),false) = true; model.setValue("/root/main/barcdprntsetup/comm",2); model.refresh(); } function fSetPrintUseCheck(){ var instcd = model.getValue(cmb_instcd_search.attribute("ref")).getTrim(); if (instcd == "014"){ //btn_prntset.visible = "false"; }else{ //btn_prntset.visible = "true"; } model.refresh(); } function fGridItemCheck( choiceFlag ) { var choiceCnt = 0; if (grd_fixasetlist.rows - grd_fixasetlist.fixedRows <= 0 ) { messageBox("¼±ÅÃÇÒ µ¥ÀÌÅͰ¡","I004"); return false; } if ( choiceFlag == "check" ) { /* var goodflagengnm = ""; var goodmodel = ""; var possndd = ""; var mngtdeptnm = ""; var fixasetcd = ""; var instcd = ""; var goodflaghngnm = ""; var installplcecd = ""; var installplcenm = ""; var cntrdeptnm = ""; var suplplcenm = ""; var barcdprntyn = ""; var i = 1; for( cnt = grd_fixasetlist.fixedRows; cnt < grd_fixasetlist.rows ; cnt++ ) { if( grd_fixasetlist.valueMatrix( cnt, grd_fixasetlist.colRef("choice") ) == "Y") { choiceCnt = choiceCnt + 1; grd_barcodetarget.addRow(false); //±×¸®µå ¿­Ãß°¡ goodflagengnm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/goodflagengnm"); goodmodel = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/goodmodel"); possndd = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/possndd"); mngtdeptnm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/mngtdeptnm"); fixasetcd = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/fixasetcd"); instcd = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/instcd"); goodflaghngnm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/goodflaghngnm"); installplcecd = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/installplcecd"); installplcenm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/installplcenm"); cntrdeptnm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/cntrdeptnm"); suplplcenm = model.getValue("/root/main/list/fixaset/fixasetlist["+cnt+"]/suplplcenm"); //ÇÊ¿äÇÑ Ç׸ñµéÀ» ÀüºÎ ³ëµå¿¡¼­ °¡Á®¿Í¼­ º¯¼ö¿¡ ÀúÀåÇÑ´ÙÀ½ ÇÁ¸°Æ®ÇÑ´Ù. /* Àåºñ¸í goodflagengnm ¸ðµ¨¸í+Á¦Á¶¿ø goodmodel SN+ÃëµæÀÏÀÚ ?? + possndd ºÎ¼­¸í(°ü¸®) mngtdeptnm ÄÚµå¹øÈ£(¹ÙÄÚµå¹øÈ£) fixasetcd ¹ÙÄÚµå */ //¹ÙÄÚµåÃâ·Â ÇÔ¼ö È£Ãâ ¹× ¸Å°³º¯¼ö ³Ñ°ÜÁÖ±â //BarcodePrtRFCMFACD(goodflagengnm , goodmodel , possndd , mngtdeptnm , fixasetcd); //¼±ÅÃµÈ °íÁ¤ÀÚ»êÀÚ·áµéÀ» ÇØ´ç ³ëµå¿¡ ºÎ¾îÁÖ°í ±× ¾ö¸¶ ³ëµå¸¦ Æã¼Ç¿¡ º¸³»¼­ ¹ÙÄÚµå Ãâ·ÂÇÏ´Â µ¥ ¾´´Ù. /* model.setValue("/root/send/barcodetarget["+i+"]/fixasetcd" , fixasetcd , true ); model.setValue("/root/send/barcodetarget["+i+"]/goodflagengnm" , goodflagengnm , true ); model.setValue("/root/send/barcodetarget["+i+"]/goodmodel" , goodmodel , true ); model.setValue("/root/send/barcodetarget["+i+"]/possndd" , possndd , true ); model.setValue("/root/send/barcodetarget["+i+"]/mngtdeptnm" , mngtdeptnm , true ); model.setValue("/root/send/barcodetarget["+i+"]/instcd" , instcd ); model.setValue("/root/send/barcodetarget["+i+"]/goodflaghngnm" , goodflaghngnm , true ); model.setValue("/root/send/barcodetarget["+i+"]/installplcecd" , installplcecd , true ); model.setValue("/root/send/barcodetarget["+i+"]/installplcenm" , installplcenm , true ); model.setValue("/root/send/barcodetarget["+i+"]/cntrdeptnm" , cntrdeptnm , true ); model.setValue("/root/send/barcodetarget["+i+"]/suplplcenm" , suplplcenm , true ); //Ãâ·ÂÇÔ¼ö¿¡ ÇØ´ç ³ëµå ù¹øÂ° ¸¦ ³Ñ±â°í Ãâ·ÂÀÌ Àß µÇ¾ú´Ù¸é ±×¸®µåÀÇ ½ºÅ×ÀÌÅͽº¸¦ update·Î Çϰí //Ãâ·Â¿©ºÎ¸¦ Y·Î ¼ÂÆÃÇÑ´Ù. //¹ÙÄÚµåÃâ·Â ÇÔ¼ö È£Ãâ ¹× ¸Å°³º¯¼ö(ÇØ´ç³ëµå) ³Ñ°ÜÁÖ±â //BarcodePrtRFCMFACD(goodflagengnm , goodmodel , possndd , mngtdeptnm , fixasetcd); grd_barcodetarget.rowStatus(i) = 2; i = i+1; } } model.refresh(); */ model.resetInstanceNode("/root/copytemp"); var varcopy = instance1.selectNodes(grd_fixasetlist.nodeset + "[choice='Y']"); if ( varcopy.length == 0 ) { messageBox("¼±ÅÃÇÑ µ¥ÀÌÅͰ¡","I004"); return false; } } return true; } function fItemAllChoice( vFlag ) { if( fGridItemCheck()!=true ) return; for( cnt = grd_fixasetlist.fixedRows; cnt < grd_fixasetlist.rows ; cnt++ ) { grd_fixasetlist.valueMatrix( cnt, grd_fixasetlist.colRef("choice") ) = vFlag; } } function fBarcodePrt() { misfGridInit(grd_cpfixasetlist); // °íÁ¤ÀÚ»ê (¹ÙÄÚµå)List var instcd = model.getValue(cmb_instcd_search.attribute("ref")); var goodnm, mngtdeptnm, installplcenm; var cnt = 0; if (instcd == '014'){ var node = instance1.selectSingleNode("/root/main/list/fixaset/fixasetlist[choice='Y']"); if (node == null){ messageBox("¼±ÅÃÇÒ µ¥ÀÌÅͰ¡","I004"); return false; } for (var i = grd_fixasetlist.fixedRows;i (goodflag= EQ) if (goodflag == "EQ"){ goodnm = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodflagengnm")).getTrim(); }else{ goodnm = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodflaghngnm")).getTrim(); } grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodnm1")) = goodnm.cut(goodnm.num(goodnm, 20)); grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodnm2")) = goodnm.substr2(goodnm.num(goodnm, 20)-1, goodnm.length); mngtdeptnm = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("mngtdeptnm")).getTrim(); installplcenm = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("installplcenm")).getTrim(); if (installplcenm == ""){ deptnm = mngtdeptnm; }else{ deptnm = mngtdeptnm + "/" + installplcenm; } grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("deptnm1")) = deptnm.cut(deptnm.num(deptnm, 20)); grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("deptnm2")) = deptnm.substr2(deptnm.num(deptnm, 20)-1, deptnm.length); grd_cpfixasetlist.addRow(); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("goodnm1" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodnm1" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("goodnm2" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodnm2" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("goodmodel")) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodmodel")); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("mngtno" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("mngtno" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("deptnm1" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("deptnm1" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("deptnm2" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("deptnm2" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("possndd" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("possndd" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("fixasetcd")) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("fixasetcd")); } } exeReportPreview("RPRFC00701","XMLSTR"); }else{ fBarcodePrt_CmdType(); } } function fBarcodePrt_CmdType(){ if( fGridItemCheck( "check" ) != true ) return; misfGridInit(grd_barcodetarget); // Barcode Print target Grid ÃʱâÈ­ model.resetInstanceNode("/root/copytemp"); var varcopy = instance1.selectNodes(grd_fixasetlist.nodeset + "[choice='Y']"); if ( varcopy.length > 0 ) { var rCSV = getNodeListCSV(varcopy); //model.setValue("/root/copytemp", rCSV); //var CSV = model.getValue("/root/copytemp"); //setCSVToNode("/root/send", CSV, "barcodetarget"); setCSVToNode("/root/main", rCSV, "barcodetarget"); } /* for( cnt = grd_fixasetlist.fixedRows; cnt < grd_fixasetlist.rows; cnt++ ) { if ( grd_fixasetlist.valueMatrix( cnt, grd_fixasetlist.colRef("choice") ) == "Y" ) { grd_barcodetarget.addItem(); grd_barcodetarget.valueMatrix( grd_barcodetarget.rows - grd_barcodetarget.fixedRows, grd_barcodetarget.colRef("instcd") ) = grd_fixasetlist.valueMatrix( cnt, grd_fixasetlist.colRef("instcd")) } } */ //grd_barcodetarget.gridToInstance(); model.refresh(); for ( i = grd_barcodetarget.fixedRows ; i< grd_barcodetarget.rows; i++) { //¶óº§Ãâ·Â ÇÑÁÙ¾¿ ½ÃŰ°í ¶óº§ Ãâ·Â ÇßÀ¸¸é ÇØ´ç row¸¦ update·Î ¹Ù²Û´Ù grd_barcodetarget.rowStatus(i) = 2; } /* var nowdate = getCurrentDate(); var checkdate = nowdate.toDate("YYYYMMDD"); var checkdatestring = checkdate.getDateFormat("YYYYMMDD"); var nextcheckdatestring = checkdate.getAddDate(+1,"Y").getDateFormat("YYYYMMDD") */ model.setValue("/root/send/barcodetarget" ,grd_barcodetarget.getUpdateData()); if (model.getValue(cmb_instcd_search.attribute("ref")) == "013"){ if ( BarcodePrtRFCMFACD_013("/root/main/barcdprntsetup","/root/main/barcodetarget") == false ) //¹ÙÄÚµåÃâ·Â { return; } }else if ((model.getValue(cmb_instcd_search.attribute("ref")) == "114")||(model.getValue(cmb_instcd_search.attribute("ref")) == "032")||(model.getValue(cmb_instcd_search.attribute("ref")) == "103")){ if ( BarcodePrtRFCMFACD_103("/root/main/barcdprntsetup","/root/main/barcodetarget") == false ) //¹ÙÄÚµåÃâ·Â { return; } }else if (model.getValue(cmb_instcd_search.attribute("ref")) == "014"){ BarcodePrtRFCMFACD_014(); //¹ÙÄÚµåÃâ·Â }else if (model.getValue(cmb_instcd_search.attribute("ref")) == "011"){ if ( BarcodePrtRFCMFACD_011("/root/main/barcdprntsetup","/root/main/barcodetarget") == false ) //¹ÙÄÚµåÃâ·Â { return; } }else{ if ( BarcodePrtRFCMFACD("/root/main/barcdprntsetup","/root/main/barcodetarget") == false ) //¹ÙÄÚµåÃâ·Â { return; } } /* if ( BarcodePrtRFCMFACD("/root/main/barcdprntsetup","/root/main/barcodetarget") == false ) //¹ÙÄÚµåÃâ·Â { return; }*/ //¹ÙÄÚµå Ãâ·ÂÇÑ ¹°Ç°µé Ãâ·Â¿©ºÎ¸¦ Y·Î ¼ÂÆÃÇÑ´Ù. misfSave("TXRFC00701"); //¹Ù²ï ±×¸®µå¿¡ row¿¡ update¸¦ submit ³¯·Á¼­ DB¿¡ ÀúÀåÇÑ´Ù. //ÇöÀç ³ëµå¼ÂÀ» ´Ù ³Ñ°ÜÁØ´Ù. //var today = curdate.toString(); //alert(today); //BarcodePrtRFCMFACD("/root/main/barcdprntsetup","/root/send/barcodetarget",checkdatestring , nextcheckdatestring); btn_search.dispatch("DOMActivate"); } //ÇÁ¸°ÅÍ ¼³Á¤ function fSetPrint() { var count = getNodesetCount("/root/main/barcdprntsetup/prntsetupinfo/setupinfo"); if(count == 0) { model.makeNode("/root/main/barcdprntsetup/prntsetupinfo/setupinfo"); } open("SPRPZ00700_¹ÙÄÚµåÇÁ¸°Åͼ³Á¤.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo"); } /* *¹ÙÄÚµå Ãâ·Â ÇÔ¼ö * psRef ¹ÙÄÚµåÇÁ¸°Æ® ¼ÂÆÃ°ü·Ã ³ëµå¼Â * pRef °íÁ¤ÀÚ»ê ÇÁ¸°Æ® °ü·Ã ³ëµå¼Â * cvtdate Á¡°ËÀÏ(¿À´Ã³¯Â¥) * nextcvtdate ´ÙÀ½Á¡°ËÀÏ(ÇöÀç´Â ÀϳâµÚ·Î ¼ÂÆÃµÇ¾î ÀÖÀ½) */ function BarcodePrtRFCMFACD(psRef , pRef , cvtdate , nextcvtdate , pKCount , pPCount){ var vInstance = document.models(0).instances(0); var cntHR = vInstance.selectNodes(pRef).length; // °íÁ¤ÀÚ»ê ÇÁ¸°Æ® ÇÒ Àüü ¸ñ·ÏÀÇ °¹¼ö var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo"; // ¹ÙÄÚµåÇÁ¸°ÅÍ ¼ÂÆÃ°ü·Ã var sPrntKind = model.getValue(barcdRef + "[1]/prntkind"); // ¹ÙÄÚµåÇÁ¸°ÅÍ Á¾·ù var portOpenTF = ""; // Lcount , Mcont var KCount = 0; var PCount = 0; if (pKCount == null || pKCount == ""){ KCount = 0; }else{ KCount = pKCount; } if (pPCount == null || pPCount == ""){ PCount = 0; }else{ PCount = pPCount; } if (cntHR > 0 && sPrntKind != 0){ var sCommKind = model.getValue(barcdRef + "[1]/commkind"); //Åë½ÅÀ¯Çü(PRT , COM , TCP/IP) var sLeftBank = model.getValue(barcdRef + "[1]/blank/left"); //¿ÞÂÊ¿©¹é var sTopBank = model.getValue(barcdRef + "[1]/blank/top"); //À§ÂÊ¿©¹é if (sCommKind == "01") { //Åë½ÅÀ¯Çü(PRT) var sSetUpVal = model.getValue(barcdRef + "[1]/comm01/setupval"); } else if (sCommKind == "02") { //Åë½ÅÀ¯Çü(COM) var sComm = model.getValue(barcdRef + "[1]/comm02/comm" ); //COM Port var sDataBit = model.getValue(barcdRef + "[1]/comm02/databit" ); //Data Bit var sStopBit = model.getValue(barcdRef + "[1]/comm02/stopbit" ); //Stop Bit var sBaudRate = model.getValue(barcdRef + "[1]/comm02/baudrate"); //Baud Rate var sParity = model.getValue(barcdRef + "[1]/comm02/parity" ); //Parity CommAX.CommPort = sComm; CommAX.Settings = sBaudRate + "," + sParity + "," + sDataBit + "," + sStopBit; if(KCount > 0){ //ÀÌ¹Ì Æ÷Æ® ¿ÀÇ µÇ¾î ÀÖÀ¸¹Ç·Î "TRUE" ¼ÂÆÃ portOpenTF = "TRUE"; }else if(KCount == 0){ //port open ¹Ýȯ°ª -> String ¹®ÀÚ Æ÷Æ® ¿ÀÇ ¼º°øÀ̸é "TRUE" , ½ÇÆÐÇϸé "FALSE" portOpenTF = CommAX.PortOpen("true"); } } else if (sCommKind == "03") { //Åë½ÅÀ¯Çü(TCP/IP) var sSetUpVal = model.getValue(barcdRef + "[1]/comm03/setupval"); } var DeptNm = ""; if ( (portOpenTF == "TRUE" && sCommKind == "02") ||(sCommKind == "01") || (sCommKind == "03")){ for (i=1 ; i<= cntHR;i++){ var goodflag = model.getvalue(pRef+ "["+i+"]/goodflag" ).getTrim(); var fixasetcd = model.getvalue(pRef+ "["+i+"]/fixasetcd" ).getTrim(); var goodflagengnm = model.getvalue(pRef+ "["+i+"]/goodflagengnm").getTrim(); var goodmodel = model.getvalue(pRef+ "["+i+"]/goodmodel" ).getTrim(); var possndd = model.getvalue(pRef+ "["+i+"]/possndd" ).getTrim(); var mngtdeptnm = model.getvalue(pRef+ "["+i+"]/mngtdeptnm" ).getTrim(); var mngtno = model.getvalue(pRef+ "["+i+"]/mngtno" ).getTrim(); var instcd = model.getvalue(pRef+ "["+i+"]/instcd" ).getTrim(); var goodflaghngnm = model.getvalue(pRef+ "["+i+"]/goodflaghngnm").getTrim(); var installplcecd = model.getvalue(pRef+ "["+i+"]/installplcecd").getTrim(); var installplcenm = model.getvalue(pRef+ "["+i+"]/installplcenm").getTrim(); var cntrdeptnm = model.getvalue(pRef+ "["+i+"]/cntrdeptnm" ).getTrim(); var suplplcenm = model.getvalue(pRef+ "["+i+"]/suplplcenm" ).getTrim(); var prodcmpynm = model.getvalue(pRef+ "["+i+"]/prodcmpynm" ).getTrim(); var leftmargin = 250; var leftmarginother = 10; //½ÃÀÛ À§Ä¡ ¼³Á¤ if (sLeftBank == "" || sLeftBank == "-") sLeftBank = leftmargin; //350 if (sTopBank == "" || sTopBank == "-") sTopBank = 20; var sSndMsg = ""; if(sPrntKind == "1") { sSndMsg += misfBP_StartFormat(sLeftBank, sTopBank); // ½ÃÀÛÀ§Ä¡ ¼ÂÆÃ //sSndMsg += misfBP_ChangeFont("A", 0, 0); // ÆùÆ® ¼³Á¤ //misfBP_FieldDataHNEW(pX, pY, pW, pH, pData) //½ÃÀÛ(X, Y) //sSndMsg += misfBP_StartFormat(0, 30); sSndMsg += "^SEE:UHANGUL.DAT^FS^CWQ,E:AAAAA.FNT^FS^CI26^FO10,46^AQN,16,16^FD^FS"; //Àåºñ¸í //[2010.08.26]AS-IS ÄÚµå TO_BE ÄÚµå ÀüȯÀ» À§ÇÑ ¹°Ç°±¸ºÐ º¯°æ (goodflag= E) => (goodflag= EQ) if (goodflag == "EQ"){ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 15 , 25 , 25 , goodflagengnm.substr(0,20)); sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 47 , 25 , 25 , goodflagengnm.substr(20,20)); }else{ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 15 , 25 , 25 , goodflaghngnm.substr(0,20)); sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 47 , 25 , 25 , goodflaghngnm.substr(20,20)); } //¸ðµ¨¸í sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 75 , 24 , 24 , "- "+goodmodel); //ÃëµæÀÏÀÚ(ÀÏ-¿ù-³â ¼ø¼­·Î Ãâ·Â)+SN //[2010.08.26]AS-IS ÄÚµå TO_BE ÄÚµå ÀüȯÀ» À§ÇÑ ¹°Ç°±¸ºÐ º¯°æ (goodflag= G) => (goodflag= GE) if (goodflag == "GE") { sSndMsg += misfBP_FieldDataHNEW(leftmarginother, 105 , 24 , 24 , "- "+possndd.substr(6,2)+possndd.substr(4,2)+possndd.substr(2,2)+mngtno); //82 }else { sSndMsg += misfBP_FieldDataHNEW(leftmarginother, 105 , 24 , 24 , "- "+possndd.substr(6,2)+possndd.substr(4,2)+possndd.substr(2,2)+"_"+mngtno); //82 } //ºÎ¼­¸í(°ü¸®ºÎ¼­) sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 140 , 24 , 24 , "- "+mngtdeptnm); //100 , mngtdeptnm //[2010.08.26]AS-IS ÄÚµå TO_BE ÄÚµå ÀüȯÀ» À§ÇÑ ¹°Ç°±¸ºÐ º¯°æ (goodflag= E) => (goodflag= EQ) if (goodflag == "EQ"){ //Á¦Á¶¿ø(Àåºñ¸¸...) sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 172 , 24 , 24 , "- "+prodcmpynm); }else{ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 172 , 24 , 24 , "-"); } //ÄÚµå¹øÈ£ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 205 , 24 , 24 , "- "+fixasetcd); //¹ÙÄÚµå sSndMsg += misfBP_ChangeFont("F", 10, 10); sSndMsg += misfBP_BarCode_Code39NEW(0, 240, "N", 50, "*" +fixasetcd + "*"); // ¹ÙÄÚµå //114 sSndMsg += misfBP_EndFormat(); if(sCommKind == "01") { CommAX.SendMessageToLPT(sSndMsg); } else if(sCommKind == "02") { CommAX.SendMessage(sSndMsg); } }//end if(sPrntKind == "1") }//end for //portopenÀÌ trueÀ̰í Åë½ÅÀ¯ÇüÀÌ comÀ̰í Ãâ·ÂÇÒ º´¸® ¹ÙÄڵ尡 ¾øÀ»¶§ port close if( portOpenTF == "TRUE" && sCommKind == "02" && PCount == 0){ CommAX.PortOpen("false"); } }else if((portOpenTF = "FALSE" && sCommKind == "02")){ messageBox("¾Æ·¡ »çÇ×À» È®ÀÎÈÄ ÀçÃâ·ÂÇØÁֽʽÿÀ." + " \n 1.ÇÁ¸°Æ®¼³Á¤ È­¸é¿¡¼­ Åë½ÅÀ¯ÇüÀ» com À¸·Î ¼±ÅÃÇÑ °æ¿ì port ¹øÈ£ È®ÀÎ" + " \n 2.ÄÉÀ̺í È®ÀÎ" + " \n 3.¸ÕÀú Ãâ·ÂÁßÀÎ ¹ÙÄÚµå È®ÀÎ(¸ðµÎ Ãâ·ÂµÈ ÈÄ ÀçÃâ·ÂÇϽʽÿÀ.)", "I", ""); return false; } }//End if }//End Function function BarcodePrtRFCMFACD_011(psRef , pRef , cvtdate , nextcvtdate , pKCount , pPCount){ var vInstance = document.models(0).instances(0); var cntHR = vInstance.selectNodes(pRef).length; // °íÁ¤ÀÚ»ê ÇÁ¸°Æ® ÇÒ Àüü ¸ñ·ÏÀÇ °¹¼ö var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo"; // ¹ÙÄÚµåÇÁ¸°ÅÍ ¼ÂÆÃ°ü·Ã var sPrntKind = model.getValue(barcdRef + "[1]/prntkind"); // ¹ÙÄÚµåÇÁ¸°ÅÍ Á¾·ù var portOpenTF = ""; // Lcount , Mcont var KCount = 0; var PCount = 0; if (pKCount == null || pKCount == ""){ KCount = 0; }else{ KCount = pKCount; } if (pPCount == null || pPCount == ""){ PCount = 0; }else{ PCount = pPCount; } if (cntHR > 0 && sPrntKind != 0){ var sCommKind = model.getValue(barcdRef + "[1]/commkind"); //Åë½ÅÀ¯Çü(PRT , COM , TCP/IP) var sLeftBank = model.getValue(barcdRef + "[1]/blank/left"); //¿ÞÂÊ¿©¹é var sTopBank = model.getValue(barcdRef + "[1]/blank/top"); //À§ÂÊ¿©¹é if (sCommKind == "01") { //Åë½ÅÀ¯Çü(PRT) var sSetUpVal = model.getValue(barcdRef + "[1]/comm01/setupval"); } else if (sCommKind == "02") { //Åë½ÅÀ¯Çü(COM) var sComm = model.getValue(barcdRef + "[1]/comm02/comm" ); //COM Port var sDataBit = model.getValue(barcdRef + "[1]/comm02/databit" ); //Data Bit var sStopBit = model.getValue(barcdRef + "[1]/comm02/stopbit" ); //Stop Bit var sBaudRate = model.getValue(barcdRef + "[1]/comm02/baudrate"); //Baud Rate var sParity = model.getValue(barcdRef + "[1]/comm02/parity" ); //Parity CommAX.CommPort = sComm; CommAX.Settings = sBaudRate + "," + sParity + "," + sDataBit + "," + sStopBit; if(KCount > 0){ //ÀÌ¹Ì Æ÷Æ® ¿ÀÇ µÇ¾î ÀÖÀ¸¹Ç·Î "TRUE" ¼ÂÆÃ portOpenTF = "TRUE"; }else if(KCount == 0){ //port open ¹Ýȯ°ª -> String ¹®ÀÚ Æ÷Æ® ¿ÀÇ ¼º°øÀ̸é "TRUE" , ½ÇÆÐÇϸé "FALSE" portOpenTF = CommAX.PortOpen("true"); } } else if (sCommKind == "03") { //Åë½ÅÀ¯Çü(TCP/IP) var sSetUpVal = model.getValue(barcdRef + "[1]/comm03/setupval"); } var DeptNm = ""; if ( (portOpenTF == "TRUE" && sCommKind == "02") ||(sCommKind == "01") || (sCommKind == "03")){ for (i=1 ; i<= cntHR;i++){ var goodflag = model.getvalue(pRef+ "["+i+"]/goodflag" ).getTrim(); var fixasetcd = model.getvalue(pRef+ "["+i+"]/fixasetcd" ).getTrim(); var goodflagengnm = model.getvalue(pRef+ "["+i+"]/goodflagengnm").getTrim(); var goodmodel = model.getvalue(pRef+ "["+i+"]/goodmodel" ).getTrim(); var possndd = model.getvalue(pRef+ "["+i+"]/possndd" ).getTrim(); var mngtdeptnm = model.getvalue(pRef+ "["+i+"]/mngtdeptnm" ).getTrim(); var mngtno = model.getvalue(pRef+ "["+i+"]/mngtno" ).getTrim(); var instcd = model.getvalue(pRef+ "["+i+"]/instcd" ).getTrim(); var goodflaghngnm = model.getvalue(pRef+ "["+i+"]/goodflaghngnm").getTrim(); var installplcecd = model.getvalue(pRef+ "["+i+"]/installplcecd").getTrim(); var installplcenm = model.getvalue(pRef+ "["+i+"]/installplcenm").getTrim(); var cntrdeptnm = model.getvalue(pRef+ "["+i+"]/cntrdeptnm" ).getTrim(); var suplplcenm = model.getvalue(pRef+ "["+i+"]/suplplcenm" ).getTrim(); var prodcmpynm = model.getvalue(pRef+ "["+i+"]/prodcmpynm" ).getTrim(); var leftmargin = 250; var leftmarginother = 10; //½ÃÀÛ À§Ä¡ ¼³Á¤ if (sLeftBank == "" || sLeftBank == "-") sLeftBank = leftmargin; //350 if (sTopBank == "" || sTopBank == "-") sTopBank = 20; var sSndMsg = ""; if(sPrntKind == "1") { sSndMsg += misfBP_StartFormat(sLeftBank, sTopBank); // ½ÃÀÛÀ§Ä¡ ¼ÂÆÃ //sSndMsg += misfBP_ChangeFont("A", 0, 0); // ÆùÆ® ¼³Á¤ //misfBP_FieldDataHNEW(pX, pY, pW, pH, pData) //½ÃÀÛ(X, Y) //sSndMsg += misfBP_StartFormat(0, 30); sSndMsg += "^SEE:UHANGUL.DAT^FS^CWQ,E:AAAAA.FNT^FS^CI26^FO10,46^AQN,16,16^FD^FS"; //Àåºñ¸í //[2010.08.26]AS-IS ÄÚµå TO_BE ÄÚµå ÀüȯÀ» À§ÇÑ ¹°Ç°±¸ºÐ º¯°æ (goodflag= E) => (goodflag= EQ) if (goodflag == "EQ"){ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 15 , 27 , 27 , goodflagengnm.substr(0,20)); sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 47 , 27 , 27 , goodflagengnm.substr(20,20)); }else{ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 15 , 27 , 27 , goodflaghngnm.substr(0,20)); sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 47 , 27 , 27 , goodflaghngnm.substr(20,20)); } //¸ðµ¨¸í sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 75 , 24 , 24 , "- "+goodmodel); //ÃëµæÀÏÀÚ(ÀÏ-¿ù-³â ¼ø¼­·Î Ãâ·Â)+SN sSndMsg += misfBP_FieldDataHNEW(leftmarginother, 105 , 24 , 24 , "- "+possndd.substr(0,4)+"-"+possndd.substr(4,2)+"-"+possndd.substr(6,2)+"_"+mngtno); //82 //ºÎ¼­¸í(°ü¸®ºÎ¼­) sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 140 , 24 , 24 , "- "+mngtdeptnm); //100 , mngtdeptnm //[2010.08.26]AS-IS ÄÚµå TO_BE ÄÚµå ÀüȯÀ» À§ÇÑ ¹°Ç°±¸ºÐ º¯°æ (goodflag= E) => (goodflag= EQ) if (goodflag == "EQ"){ //Á¦Á¶¿ø(Àåºñ¸¸...) sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 172 , 24 , 24 , "- "+prodcmpynm); }else{ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 172 , 24 , 24 , "-"); } //ÄÚµå¹øÈ£ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 205 , 30 , 30 , "- "+fixasetcd); //¹ÙÄÚµå sSndMsg += misfBP_ChangeFont("F", 10, 10); sSndMsg += misfBP_BarCode_Code39NEW(0, 240, "N", 50, "*" +fixasetcd + "*"); // ¹ÙÄÚµå //114 sSndMsg += misfBP_EndFormat(); if(sCommKind == "01") { CommAX.SendMessageToLPT(sSndMsg); } else if(sCommKind == "02") { CommAX.SendMessage(sSndMsg); } }//end if(sPrntKind == "1") }//end for //portopenÀÌ trueÀ̰í Åë½ÅÀ¯ÇüÀÌ comÀ̰í Ãâ·ÂÇÒ º´¸® ¹ÙÄڵ尡 ¾øÀ»¶§ port close if( portOpenTF == "TRUE" && sCommKind == "02" && PCount == 0){ CommAX.PortOpen("false"); } }else if((portOpenTF = "FALSE" && sCommKind == "02")){ messageBox("¾Æ·¡ »çÇ×À» È®ÀÎÈÄ ÀçÃâ·ÂÇØÁֽʽÿÀ." + " \n 1.ÇÁ¸°Æ®¼³Á¤ È­¸é¿¡¼­ Åë½ÅÀ¯ÇüÀ» com À¸·Î ¼±ÅÃÇÑ °æ¿ì port ¹øÈ£ È®ÀÎ" + " \n 2.ÄÉÀ̺í È®ÀÎ" + " \n 3.¸ÕÀú Ãâ·ÂÁßÀÎ ¹ÙÄÚµå È®ÀÎ(¸ðµÎ Ãâ·ÂµÈ ÈÄ ÀçÃâ·ÂÇϽʽÿÀ.)", "I", ""); return false; } }//End if }//End Function function BarcodePrtRFCMFACD_103(psRef , pRef , cvtdate , nextcvtdate , pKCount , pPCount){ var vInstance = document.models(0).instances(0); var cntHR = vInstance.selectNodes(pRef).length; // °íÁ¤ÀÚ»ê ÇÁ¸°Æ® ÇÒ Àüü ¸ñ·ÏÀÇ °¹¼ö var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo"; // ¹ÙÄÚµåÇÁ¸°ÅÍ ¼ÂÆÃ°ü·Ã var sPrntKind = model.getValue(barcdRef + "[1]/prntkind"); // ¹ÙÄÚµåÇÁ¸°ÅÍ Á¾·ù var portOpenTF = ""; // Lcount , Mcont var KCount = 0; var PCount = 0; if (pKCount == null || pKCount == ""){ KCount = 0; }else{ KCount = pKCount; } if (pPCount == null || pPCount == ""){ PCount = 0; }else{ PCount = pPCount; } if (cntHR > 0 && sPrntKind != 0){ var sCommKind = model.getValue(barcdRef + "[1]/commkind"); //Åë½ÅÀ¯Çü(PRT , COM , TCP/IP) var sLeftBank = model.getValue(barcdRef + "[1]/blank/left"); //¿ÞÂÊ¿©¹é var sTopBank = model.getValue(barcdRef + "[1]/blank/top"); //À§ÂÊ¿©¹é if (sCommKind == "01") { //Åë½ÅÀ¯Çü(PRT) var sSetUpVal = model.getValue(barcdRef + "[1]/comm01/setupval"); } else if (sCommKind == "02") { //Åë½ÅÀ¯Çü(COM) var sComm = model.getValue(barcdRef + "[1]/comm02/comm" ); //COM Port var sDataBit = model.getValue(barcdRef + "[1]/comm02/databit" ); //Data Bit var sStopBit = model.getValue(barcdRef + "[1]/comm02/stopbit" ); //Stop Bit var sBaudRate = model.getValue(barcdRef + "[1]/comm02/baudrate"); //Baud Rate var sParity = model.getValue(barcdRef + "[1]/comm02/parity" ); //Parity CommAX.CommPort = sComm; CommAX.Settings = sBaudRate + "," + sParity + "," + sDataBit + "," + sStopBit; if(KCount > 0){ //ÀÌ¹Ì Æ÷Æ® ¿ÀÇ µÇ¾î ÀÖÀ¸¹Ç·Î "TRUE" ¼ÂÆÃ portOpenTF = "TRUE"; }else if(KCount == 0){ //port open ¹Ýȯ°ª -> String ¹®ÀÚ Æ÷Æ® ¿ÀÇ ¼º°øÀ̸é "TRUE" , ½ÇÆÐÇϸé "FALSE" portOpenTF = CommAX.PortOpen("true"); } } else if (sCommKind == "03") { //Åë½ÅÀ¯Çü(TCP/IP) var sSetUpVal = model.getValue(barcdRef + "[1]/comm03/setupval"); } var DeptNm = ""; if ( (portOpenTF == "TRUE" && sCommKind == "02") ||(sCommKind == "01") || (sCommKind == "03")){ for (i=1 ; i<= cntHR;i++){ var goodflag = model.getvalue(pRef+ "["+i+"]/goodflag" ).getTrim(); var fixasetcd = model.getvalue(pRef+ "["+i+"]/fixasetcd" ).getTrim(); var goodflagengnm = model.getvalue(pRef+ "["+i+"]/goodflagengnm").getTrim(); var goodmodel = model.getvalue(pRef+ "["+i+"]/goodmodel" ).getTrim(); var possndd = model.getvalue(pRef+ "["+i+"]/possndd" ).getTrim(); var mngtdeptnm = model.getvalue(pRef+ "["+i+"]/mngtdeptnm" ).getTrim(); var mngtno = model.getvalue(pRef+ "["+i+"]/mngtno" ).getTrim(); var instcd = model.getvalue(pRef+ "["+i+"]/instcd" ).getTrim(); var goodflaghngnm = model.getvalue(pRef+ "["+i+"]/goodflaghngnm").getTrim(); var installplcecd = model.getvalue(pRef+ "["+i+"]/installplcecd").getTrim(); var installplcenm = model.getvalue(pRef+ "["+i+"]/installplcenm").getTrim(); var cntrdeptnm = model.getvalue(pRef+ "["+i+"]/cntrdeptnm" ).getTrim(); var suplplcenm = model.getvalue(pRef+ "["+i+"]/suplplcenm" ).getTrim(); var prodcmpynm = model.getvalue(pRef+ "["+i+"]/prodcmpynm" ).getTrim(); var leftmargin = 220; var leftmarginother = 270; //½ÃÀÛ À§Ä¡ ¼³Á¤ if (sLeftBank == "" || sLeftBank == "-") sLeftBank = leftmargin; //350 if (sTopBank == "" || sTopBank == "-") sTopBank = 20; var sSndMsg = ""; if(sPrntKind == "1") { sSndMsg += misfBP_StartFormat(sLeftBank, sTopBank); // ½ÃÀÛÀ§Ä¡ ¼ÂÆÃ //sSndMsg += misfBP_ChangeFont("A", 0, 0); // ÆùÆ® ¼³Á¤ //misfBP_FieldDataHNEW(pX, pY, pW, pH, pData) //½ÃÀÛ(X, Y) //sSndMsg += misfBP_StartFormat(0, 30); sSndMsg += "^SEE:UHANGUL.DAT^FS^CWQ,E:AAAAA.FNT^FS^CI26^FO10,46^AQN,16,16^FD^FS"; //Àåºñ¸í //[2010.08.26]AS-IS ÄÚµå TO_BE ÄÚµå ÀüȯÀ» À§ÇÑ ¹°Ç°±¸ºÐ º¯°æ (goodflag= E) => (goodflag= EQ) if (goodflag == "EQ"){ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 15 , 25 , 25 , goodflagengnm.substr(0,27)); sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 47 , 25 , 25 , goodflagengnm.substr(27,20)); }else{ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 15 , 25 , 25 , goodflaghngnm.substr(0,27)); sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 47 , 25 , 25 , goodflaghngnm.substr(27,20)); } //¸ðµ¨¸í sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 75 , 24 , 24 , "- "+goodmodel); //ÃëµæÀÏÀÚ(ÀÏ-¿ù-³â ¼ø¼­·Î Ãâ·Â)+SN //if (goodflag == "G") { // sSndMsg += misfBP_FieldDataHNEW(leftmarginother, 105 , 24 , 24 , "- "+possndd.substr(6,2)+possndd.substr(4,2)+possndd.substr(2,2)+mngtno); //82 //}else { // sSndMsg += misfBP_FieldDataHNEW(leftmarginother, 105 , 24 , 24 , "- "+possndd.substr(6,2)+possndd.substr(4,2)+possndd.substr(2,2)+"_"+mngtno); //82 //} sSndMsg += misfBP_FieldDataHNEW(leftmarginother, 105 , 24 , 24 , "- "+possndd.substr(6,2)+possndd.substr(4,2)+possndd.substr(2,2)+"_"+mngtno); //82 //ºÎ¼­¸í(°ü¸®ºÎ¼­) //sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 140 , 24 , 24 , "- "+mngtdeptnm); //100 , mngtdeptnm //ºÎ¼­¸í(°ü¸®ºÎ¼­)+¼³Ä¡Àå¼Ò sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 140 , 24 , 24 , "- "+mngtdeptnm+"_"+installplcenm ); //100 , mngtdeptnm //if (goodflag == "E"){ //Á¦Á¶¿ø(Àåºñ¸¸...) sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 172 , 24 , 24 , "- "+prodcmpynm); //}else{ //sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 172 , 24 , 24 , "-"); //} //ÄÚµå¹øÈ£ sSndMsg += misfBP_FieldDataHNEW(leftmarginother , 205 , 24 , 24 , "- "+fixasetcd); //¹ÙÄÚµå sSndMsg += misfBP_ChangeFont("F", 10, 10); sSndMsg += misfBP_BarCode_Code39NEW(310, 240, "N", 50, "*" +fixasetcd + "*"); // ¹ÙÄÚµå //114 //title if (instcd == '114'){ sSndMsg += misfBP_FieldDataHNEW(70 , 195 , 28 , 28 , "»êÇÐÇù·Â´Ü"); }else if (instcd == '032'){ sSndMsg += misfBP_FieldDataHNEW(60 , 195 , 28 , 28 , "ÀǰúÇבּ¸¿ø"); } sSndMsg += misfBP_EndFormat(); if(sCommKind == "01") { CommAX.SendMessageToLPT(sSndMsg); } else if(sCommKind == "02") { CommAX.SendMessage(sSndMsg); } }//end if(sPrntKind == "1") }//end for //portopenÀÌ trueÀ̰í Åë½ÅÀ¯ÇüÀÌ comÀ̰í Ãâ·ÂÇÒ º´¸® ¹ÙÄڵ尡 ¾øÀ»¶§ port close if( portOpenTF == "TRUE" && sCommKind == "02" && PCount == 0){ CommAX.PortOpen("false"); } }else if((portOpenTF = "FALSE" && sCommKind == "02")){ messageBox("¾Æ·¡ »çÇ×À» È®ÀÎÈÄ ÀçÃâ·ÂÇØÁֽʽÿÀ." + " \n 1.ÇÁ¸°Æ®¼³Á¤ È­¸é¿¡¼­ Åë½ÅÀ¯ÇüÀ» com À¸·Î ¼±ÅÃÇÑ °æ¿ì port ¹øÈ£ È®ÀÎ" + " \n 2.ÄÉÀ̺í È®ÀÎ" + " \n 3.¸ÕÀú Ãâ·ÂÁßÀÎ ¹ÙÄÚµå È®ÀÎ(¸ðµÎ Ãâ·ÂµÈ ÈÄ ÀçÃâ·ÂÇϽʽÿÀ.)", "I", ""); return false; } }//End if }//End Function function fBarElementPrt(pValue, pSndMsg, iXPos, iYPos){ var aStr = ""; var iWidth = 0; var aFlag = new Array(); aStr = misfGetHanGul(pValue, aFlag); for (var iNo=0; iNo < aStr.length; iNo++) { if (aFlag[iNo] == "E") { pSndMsg += "^CF030,30^FO"+(Number(iXPos)+Number(iWidth))+","+ iYPos +"^FD" + aStr[iNo] + "^FS"; iWidth = iWidth + (Number(aStr[iNo].length) * 14); } else { pSndMsg += CommAX.PrtImgOut((Number(iXPos)+Number(iWidth)), iYPos, aStr[iNo], 1, 1); pSndMsg += CommAX.HanImageData(); iWidth = iWidth + (Number(aStr[iNo].length) * 24); } } return pSndMsg; } /* *¹ÙÄÚµå Ãâ·Â ÇÔ¼ö * psRef ¹ÙÄÚµåÇÁ¸°Æ® ¼ÂÆÃ°ü·Ã ³ëµå¼Â * pRef °íÁ¤ÀÚ»ê ÇÁ¸°Æ® °ü·Ã ³ëµå¼Â * cvtdate Á¡°ËÀÏ(¿À´Ã³¯Â¥) * nextcvtdate ´ÙÀ½Á¡°ËÀÏ(ÇöÀç´Â ÀϳâµÚ·Î ¼ÂÆÃµÇ¾î ÀÖÀ½) */ function BarcodePrtRFCMFACD_013(psRef , pRef , cvtdate , nextcvtdate , pKCount , pPCount){ var vInstance = document.models(0).instances(0); var cntHR = vInstance.selectNodes(pRef).length; //°íÁ¤ÀÚ»ê ÇÁ¸°Æ® ÇÒ Àüü ¸ñ·ÏÀÇ °¹¼ö var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo"; //¹ÙÄÚµåÇÁ¸°ÅÍ ¼ÂÆÃ°ü·Ã var sPrntKind = model.getValue(barcdRef + "[1]/prntkind"); //¹ÙÄÚµåÇÁ¸°ÅÍ Á¾·ù var portOpenTF = ""; // Lcount , Mcont var KCount = 0; var PCount = 0; if (pKCount == null || pKCount == ""){ KCount = 0; }else{ KCount = pKCount; } if (pPCount == null || pPCount == ""){ PCount = 0; }else{ PCount = pPCount; } // if (cntHR > 0 && sPrntKind != 0){ var sCommKind = model.getValue(barcdRef + "[1]/commkind"); //Åë½ÅÀ¯Çü(PRT , COM , TCP/IP) var sLeftBank = model.getValue(barcdRef + "[1]/blank/left"); //¿ÞÂÊ¿©¹é var sTopBank = model.getValue(barcdRef + "[1]/blank/top"); //À§ÂÊ¿©¹é if (sCommKind == "01") { //Åë½ÅÀ¯Çü(PRT) var sSetUpVal = model.getValue(barcdRef + "[1]/comm01/setupval"); if(KCount > 0){ //ÀÌ¹Ì Æ÷Æ® ¿ÀÇ µÇ¾î ÀÖÀ¸¹Ç·Î "TRUE" ¼ÂÆÃ portOpenTF = "TRUE"; }else if(KCount == 0){ portOpenTF = CommAX.PortOpen("true"); } } else if (sCommKind == "02") { //Åë½ÅÀ¯Çü(COM) var sComm = model.getValue(barcdRef + "[1]/comm02/comm" ); //COM Port var sDataBit = model.getValue(barcdRef + "[1]/comm02/databit" ); //Data Bit var sStopBit = model.getValue(barcdRef + "[1]/comm02/stopbit" ); //Stop Bit var sBaudRate = model.getValue(barcdRef + "[1]/comm02/baudrate"); //Baud Rate var sParity = model.getValue(barcdRef + "[1]/comm02/parity" ); //Parity CommAX.CommPort = sComm; CommAX.Settings = sBaudRate + "," + sParity + "," + sDataBit + "," + sStopBit; if(KCount > 0){ //ÀÌ¹Ì Æ÷Æ® ¿ÀÇ µÇ¾î ÀÖÀ¸¹Ç·Î "TRUE" ¼ÂÆÃ portOpenTF = "TRUE"; }else if(KCount == 0){ //port open ¹Ýȯ°ª -> String ¹®ÀÚ Æ÷Æ® ¿ÀÇ ¼º°øÀ̸é "TRUE" , ½ÇÆÐÇϸé "FALSE" portOpenTF = CommAX.PortOpen("true"); } } else if (sCommKind == "03") { //Åë½ÅÀ¯Çü(TCP/IP) var sSetUpVal = model.getValue(barcdRef + "[1]/comm03/setupval"); } var DeptNm = ""; if ( (portOpenTF == "TRUE" && sCommKind == "02") ||(sCommKind == "01") || (sCommKind == "03")){ for (i=1 ; i<= cntHR;i++){ var fixasetcd = model.getvalue(pRef+ "["+i+"]/fixasetcd" ).getTrim(); var goodflagengnm = model.getvalue(pRef+ "["+i+"]/goodflagengnm").getTrim(); var goodmodel = model.getvalue(pRef+ "["+i+"]/goodmodel" ).getTrim(); var possndd = model.getvalue(pRef+ "["+i+"]/possndd" ).getTrim(); var mngtdeptnm = model.getvalue(pRef+ "["+i+"]/mngtdeptnm" ).getTrim(); var mngtno = model.getvalue(pRef+ "["+i+"]/mngtno" ).getTrim(); var instcd = model.getvalue(pRef+ "["+i+"]/instcd" ).getTrim(); var goodflaghngnm = model.getvalue(pRef+ "["+i+"]/goodflaghngnm").getTrim(); var installplcecd = model.getvalue(pRef+ "["+i+"]/installplcecd").getTrim(); var installplcenm = model.getvalue(pRef+ "["+i+"]/installplcenm").getTrim(); var cntrdeptnm = model.getvalue(pRef+ "["+i+"]/cntrdeptnm" ).getTrim(); var suplplcenm = model.getvalue(pRef+ "["+i+"]/suplplcenm" ).getTrim(); var sSndMsg = ""; var iXPos = 0, iYPos = 0; if(sPrntKind == "1") { //½ÃÀÛ(X, Y) sSndMsg += misfBP_StartFormat(0, 0); // ½ÃÀÛÀ§Ä¡ ¼ÂÆÃ iXPos = Number(sLeftBank) + 190; iYPos = Number(sTopBank) + 115; //Á¦Ç°¸í sSndMsg += fBarElementPrt(goodflagengnm, sSndMsg, iXPos, iYPos); if(sCommKind == "01") { CommAX.SendMessageToLPT(sSndMsg); sSndMsg = ""; } else if(sCommKind == "02") { CommAX.SendMessage(sSndMsg); sSndMsg = ""; } //Serial No. iYPos += 30; sSndMsg += fBarElementPrt("S/N:"+mngtno, sSndMsg, iXPos, iYPos); //»ç¿ëºÎ¼­ iYPos += 60; sSndMsg += fBarElementPrt(mngtdeptnm, sSndMsg, iXPos, iYPos); if(sCommKind == "01") { CommAX.SendMessageToLPT(sSndMsg); sSndMsg = ""; } else if(sCommKind == "02") { CommAX.SendMessage(sSndMsg); sSndMsg = ""; } //±¸ÀÔÀÏÀÚ iYPos += 50; sSndMsg += misfBP_ChangeFont("C", 18, 18); // ÆùÆ® ¼³Á¤ sSndMsg += misfBP_FieldDataA(iXPos, iYPos, possndd.substr(0,4)+"-"+possndd.substr(4,2) +"-"+possndd.substr(6,2)); //ÀÚ»êÄÚµå iYPos += 50; sSndMsg += misfBP_ChangeFont("B", 17, 17); // ÆùÆ® ¼³Á¤ //sSndMsg += misfBP_FieldDataA(iXPos, iYPos, fixasetcd); sSndMsg += misfBP_FieldDataA(iXPos, iYPos, fixasetcd.substr(0,1)+"-"+fixasetcd.substr(1,2) +"-"+fixasetcd.substr(3,2) +"-"+fixasetcd.substr(5,fixasetcd.length-4)); //ÀÚ»êÄÚµå(¹ÙÄÚµå type) iXPos = 80; iYPos += 40; sSndMsg += misfBP_ChangeFont("C", 35, 35); // ÆùÆ® ¼³Á¤ sSndMsg += misfBP_BarCode_Code39NEW(iXPos, iYPos, "N", 70, "*" +fixasetcd + "*"); // ¹ÙÄÚµå //114 sSndMsg += misfBP_EndFormat(); if(sCommKind == "01") { CommAX.SendMessageToLPT(sSndMsg); } else if(sCommKind == "02") { CommAX.SendMessage(sSndMsg); } }//end if(sPrntKind == "1") }//end for //portopenÀÌ trueÀ̰í Åë½ÅÀ¯ÇüÀÌ comÀ̰í Ãâ·ÂÇÒ º´¸® ¹ÙÄڵ尡 ¾øÀ»¶§ port close if( portOpenTF == "TRUE" && sCommKind == "02" && PCount == 0){ CommAX.PortOpen("false"); } }else if((portOpenTF = "FALSE" && sCommKind == "02")){ messageBox("¾Æ·¡ »çÇ×À» È®ÀÎÈÄ ÀçÃâ·ÂÇØÁֽʽÿÀ." + " \n 1.ÇÁ¸°Æ®¼³Á¤ È­¸é¿¡¼­ Åë½ÅÀ¯ÇüÀ» com À¸·Î ¼±ÅÃÇÑ °æ¿ì port ¹øÈ£ È®ÀÎ" + " \n 2.ÄÉÀ̺í È®ÀÎ" + " \n 3.¸ÕÀú Ãâ·ÂÁßÀÎ ¹ÙÄÚµå È®ÀÎ(¸ðµÎ Ãâ·ÂµÈ ÈÄ ÀçÃâ·ÂÇϽʽÿÀ.)", "I", ""); return false; } }//End if }//End Function /* ------------------------------------------------- */ /* ------End Of List ------------------------------- */ /* -------------------------------------------------- */ function fGetBrcdPrntInfo() { model.makeNode("/root/main/barcdprntsetup"); model.makeNode("/root/send/scrnid"); model.setValue("/root/send/scrnid", getScreenID()); model.createChild("xforms:submission", "id:TRRPZ00701;mediatype:application/x-www-form-urlencoded; method:post; ref:" + "/root/send" + "; resultref:" + "/root/main/barcdprntsetup" + "; "); submit("TRRPZ00701"); } // °æºÏ´ë º´¿ø ¹öÀü function fBarcodePrtKnu() { misfGridInit(grd_cpfixasetlist); // °íÁ¤ÀÚ»ê (¹ÙÄÚµå)List var instcd = model.getValue(cmb_instcd_search.attribute("ref")); var goodnm, mngtdeptnm, installplcenm; var cnt = 0; var node = instance1.selectSingleNode("/root/main/list/fixaset/fixasetlist[choice='Y']"); if (node == null){ messageBox("¼±ÅÃÇÒ µ¥ÀÌÅͰ¡","I004"); return false; } for (var i = grd_fixasetlist.fixedRows;i (goodflag= EQ) if (goodflag == "EQ"){ goodnm = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodflagengnm")).getTrim(); }else{ goodnm = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodflaghngnm")).getTrim(); } grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodnm1")) = goodnm; mngtdeptnm = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("mngtdeptnm")).getTrim(); installplcenm = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("installplcenm")).getTrim(); grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("deptnm1")) = mngtdeptnm; grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("deptnm2")) = installplcenm; grd_cpfixasetlist.addRow(); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("fixasetcd")) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("fixasetcd")); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("possndd" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("possndd" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("goodnm1" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodnm1" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("goodspec" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("goodspec" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("deptnm1" )) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("deptnm1" )); grd_cpfixasetlist.valueMatrix(grd_cpfixasetlist.row, grd_cpfixasetlist.colRef("suplplcenm")) = grd_fixasetlist.valueMatrix(i, grd_fixasetlist.colRef("suplplcenm")); } } exeReportPreview("RPRFC00702","XMLSTR"); } /* ------------------------------------------------- */ /* ------End Of List ------------------------------- */ /* -------------------------------------------------- */