/** * @desc : È­¸é control disabled ¼³Á¤ * @ È­¸é»óÅ¿¡ µû¸¥ controlÀÇ disableÀÇ ¼³Á¤ * @param : control id (ctrlID) * @return : * @--------------------------------------------------- */ function fSetCtrlDisabled(bool, updtFlag) { ipt_formfromdt.disabled = bool; ipt_formtodt.disabled = bool; ipt_formnm.disabled = bool; ipt_formextnnm.disabled = bool; ipt_formcnts.disabled = bool; ipt_rem.disabled = bool; cmb_formchosflag.disabled = bool; cmb_formkind.disabled = bool; //cmb_degnappyn.disabled = bool; cmb_userconfigyn.disabled = bool; cmb_print_only.disabled = bool; cmb_formuseflag.disabled = bool; //cmb_recreflockappyn.disabled = bool; textarea1.disabled = bool; cmb_reclistviewyn.disabled = bool; cmb_langflag.disabled = bool; // ¿¹Áø¼­½Ä Ãß°¡ (ÄÞº¸) cmb_foctsnwyn.disabled = bool; // °øÅë±â·Ï¿©ºÎ cmb_mainyn.disabled = bool; // ÀÎÁõ¼­·Îµù¿©ºÎ cmb_certuseyn.disabled = bool; // ´ë»ó¼­½ÄÄÚµå if(model.getValue("/root/main/newform/formstatus") == "0") // ¼öÁ¤¸ðµå »óÅ·Πº¯°æ { ipt_srcformcd.disabled = true; } else { ipt_srcformcd.disabled = bool; } if(updtFlag == "U"){ cmb_valiyn.disabled = bool; if(bool == false) ipt_formfromdt.disabled = !bool; if(!(bool)){ chk_ocrflag.disabled = bool; if(model.getValue("/root/main/ocrflag") == "OCR"){ cmb_formtypecls.disabled = bool; cmb_ocrtagprntyn.disabled = bool; } else { cmb_formtypecls.disabled = !(bool); cmb_ocrtagprntyn.disabled = !(bool); } cmb_formbizcls.disabled = bool; cmb_progflag.disabled = bool; }else{ chk_ocrflag.disabled = bool; cmb_formbizcls.disabled = bool; cmb_formtypecls.disabled = bool; cmb_ocrtagprntyn.disabled = bool; cmb_progflag.disabled = bool; } }else { chk_ocrflag.disabled = bool; cmb_formbizcls.disabled = bool; cmb_formtypecls.disabled = !(bool); cmb_ocrtagprntyn.disabled = !(bool); cmb_progflag.disabled = bool; } btn_srchdept.disabled = bool; btn_srchuser.disabled = bool; btn_classes.disabled = bool; } function fSetValiYN() { var valiyn = model.getValue("/root/temp/valiyn"); if(valiyn=='Y') // ¼­½ÄÀ¯È¿È­(¹«È¿ÀÎ ¼­½ÄÀ» À¯È¿·Î ¹Ù²Ü °æ¿ì) { // 2009.04.14 // À̰æÈñ model.setValue("/root/main/newform/formfromdt", getCurrentDate() + getCurrentTime()); model.setValue("/root/main/newform/formtodt","99991231000000"); model.setValue("/root/main/newform/formstatus", "1"); } else if(valiyn=='N') // ¼­½Ä¹«È¿È­(À¯È¿ÀÎ ¼­½ÄÀ» ¹«È¿·Î ¹Ù²Ü °æ¿ì) { var strposinstcd = getUserInfo("dutplceinstcd"); model.makeValue("/root/main/newform/instcd", strposinstcd); model.setValue("/root/main/newform/formfromdt", getCurrentDate() + getCurrentTime()); model.setValue("/root/main/newform/formtodt", getCurrentDate() + getCurrentTime()); model.setValue("/root/main/newform/formstatus", "3"); // ¼­½ÄÀ» ¹«È¿È­½ÃŲ userid¸¦ LASTRGSTDT¿¡ ÀúÀå. model.setValue("/root/main/newform/lastupdtrid", getUserId()); // ¼­½ÄÀ» ¹«È¿È­½ÃŲ userid¸¦ LASTRGSTDT¿¡ ÀúÀå. model.setValue("/root/main/newform/lastupdtrnm", getUserName()); model.removeNodeset("/root/send/savedata"); copyNode(model, model, "/root/send/savedata", "/root/main/newform"); //copyNodeset("/root/send/savedata", "/root/main/ocrinfo", "append"); model.removeNodeset("/root/main/formlist"); model.removeNodeset("/root/main/formhist"); } model.refresh(); } function fRemoveBlank(str) { str = str.replace(/\s/g,''); return str; } function fSelectForm() { if(!isDataCell()) return; iRow = grd_formlist.row; if(iRow < 1){ return; } model.removeNodeset("/root/main/ocrinfo"); model.copyNode("/root/main/newform", "/root/main/formlist[" + iRow + "]"); var currentdt = getCurrentDateTime(); currentdt = fRemoveBlank(currentdt); //var tempInterval = getTimeInterval(model.getValue("/root/main/newform/formtodt"), currentdt); if(parseInt(model.getValue("/root/main/newform/formtodt")) - parseInt(currentdt) > 0) { model.setValue("/root/temp/valiyn", "Y"); } else { model.setValue("/root/temp/valiyn", "N"); model.setValue("/root/temp/match_valiyn", "N"); } if(model.getValue("/root/main/newform/formprogflag") == "OCR" || model.getValue("/root/main/newform/formprogflag") == "OCR(CODE)"){; //chk_ocrflag.select(0); model.setValue("/root/main/ocrflag", "OCR"); cmb_formbizcls.disabled = false; cmb_formtypecls.disabled = false; cmb_ocrtagprntyn.disabled = false; btn_ocrwindow.attribute("visibility") = "visible"; }else { //chk_ocrflag.deselect(0); model.setValue("/root/main/ocrflag", ""); cmb_formbizcls.disabled = true; cmb_formtypecls.disabled = true; cmb_ocrtagprntyn.disabled = true; btn_ocrwindow.attribute("visibility") = "hidden"; } var formcd = model.getValue("/root/main/newform/formcd"); model.makeNode("/root/send/reqdata/reqdata"); model.makeNode("/root/send/reqdata/reqflag"); model.makeNode("/root/send/reqdata/reqfromdt"); model.makeNode("/root/send/reqdata/reqprogflag"); model.setValue("/root/send/reqdata/reqdata", formcd); model.setValue("/root/send/reqdata/reqflag", "formcd"); /** * ¼öÁ¤ : 2009.09.15 ¾ÈÄ¡¿ø TASK-2897 * ³»¿ë : ¼­½Ä°ü¸®È­¸é¿¡¼­ ¼­½ÄÁ¶È¸Á¶°ÇÀ¸·Î ±â°üÄÚµåÃß°¡ */ model.makeValue("/root/send/reqdata/reqinstcd", model.getValue("/root/send/reqdata/reqinstcd")); // 2009-04-15 // À̰æÈñ // OCR µ¥ÀÌÅÍ Á¶È¸½Ã ±â°üº° ¼­½Ä»ç¿ëÀÏÀÚ°¡ formfromdt °¡ µÇ¹Ç·Î, instformfromdt¸¦ formfromdt·Î »ðÀÔ. //model.setValue("/root/send/reqdata/reqfromdt", model.getValue("/root/main/newform/formfromdt")); model.setValue("/root/send/reqdata/reqfromdt", model.getValue("/root/main/newform/instformfromdt")); model.setValue("/root/send/reqdata/reqprogflag", model.getValue("/root/main/newform/formprogflag")); //model.setValue("/root/main/newform", "/root/send/savedata"); // Å×½ºÆ® fSetCtrlDisabled(true, "U"); model.removeNode("/root/send/selectedHist"); model.makeValue("/root/send/reqdata/selectedHist", "H"); btn_hist.selected = true; submit("TRMRF00702"); ///////////////////////////////////////////// //2010.04.12, ÁÖÈñ°æ //¼­½Ä µðÀÚÀÎ ¼öÁ¤(°øÀ¯ÇØÁ¦) Áß¿¡´Â ¼­½Ä °ü¸®¿¡¼­ ¼­½ÄÁ¤º¸ ¾÷µ¥ÀÌÆ® ¸øÇϵµ·Ï ºí·¯Å· Ãß°¡ model.makeValue("/root/send/req/formcd",formcd); submit("TRMRF02006"); // ÀбâÀü¿ëÀÎÁö È®ÀÎ var readonlystatdt = model.getValue("/root/temp/forminfo/readonlylist/readonlystatdt"); var readonlyuserid = model.getValue("/root/temp/forminfo/readonlylist/readonlyuserid"); var userid = getUserInfo("userid"); if ( readonlystatdt != "" && readonlystatdt != "-" ) //ÀбâÀü¿ëµî·ÏÀϽÃÁ¤º¸°¡ ÀÖ°í µ¿ÀϾÆÀ̵𰡠¾Æ´Ñ°æ¿ì { var blokingdt = readonlystatdt.substr(0,4) + "/"; blokingdt = blokingdt + readonlystatdt.substr(4,2) + "/"; blokingdt = blokingdt + readonlystatdt.substr(6,2) + "/ "; blokingdt = blokingdt + readonlystatdt.substr(8,2) + ":"; blokingdt = blokingdt + readonlystatdt.substr(10,2) + ":"; blokingdt = blokingdt + readonlystatdt.substr(12,2); var readonlyusernm = model.getValue("/root/temp/forminfo/readonlylist/readonlyusernm"); alert("["+readonlyuserid+","+readonlyusernm+"]´ÔÀÌ ["+blokingdt+"]ºÎÅÍ µðÀÚÀÎ ÀÛ¾÷ ÁßÀ̹ǷΠ¼öÁ¤ ÇÒ ¼ö ¾ø½À´Ï´Ù."); btn_updtform.disabled = true; btn_saveform.disabled = true; } else { btn_updtform.disabled = false; btn_saveform.disabled = false; } ///////////////////////////////////////////// var formuserid = model.getValue("/root/main/formhist/formuserid"); if ( formuserid == "DEPT_BASE" && getUserInfo("posinstcd") != "001" && getUserInfo("posdeptcd") != "4130700000" ) //º´¿øÃÖ´ë¼­½ÄÀº ÀÇ·á¿ø¿¡¼­¸¸ ¼öÁ¤ °¡´ÉÇϵµ·Ï, 2010.05.27, ÁÖÈñ°æ { btn_updtform.disabled = true; btn_saveform.disabled = true; } //model.refresh(); } /** * @group : * @ver : 2009-03-03 ¿ÀÈÄ 4:45:27 * @by : °­ÁöÈÆ * @--------------------------------------------------- * @type : function * @access : public * @desc : ±â°üº° ¿ë¾î ÀÌ·Â ¸®½ºÆ® Á¶È¸ * @param : selectedHist (H : ÀÌ·ÂÁ¶È¸, I : ±â°üº° ÀÌ·ÂÁ¶È¸) * @return : * @--------------------------------------------------- */ function fGetFormHistList(selectedHist){ var formcd = model.getValue("/root/main/newform/formcd"); model.setValue("/root/temp/selectedHist", selectedHist); model.removeNodeset("/root/send"); model.makeValue("/root/send/reqdata/reqdata", formcd); model.makeValue("/root/send/reqdata/reqflag", "formcd"); model.makeValue("/root/send/reqdata/reqfromdt", model.getValue("/root/main/newform/formfromdt")); model.makeValue("/root/send/reqdata/reqprogflag", model.getValue("/root/main/newform/formprogflag")); model.makeValue("/root/send/reqdata/selectedHist", model.getValue("/root/temp/selectedHist")); /** * ¼öÁ¤ : 2009.09.15 ¾ÈÄ¡¿ø TASK-2897 * ³»¿ë : ¼­½Ä°ü¸®È­¸é¿¡¼­ ¼­½ÄÁ¶È¸Á¶°ÇÀ¸·Î ±â°üÄÚµåÃß°¡ */ model.makeValue("/root/send/reqdata/reqinstcd", model.getValue("/root/send/reqdata/reqinstcd")); // KNUH_20101119_¹Ú¼ºÈ£_start model.removeNodeset("/root/main/ocrinfo"); // KNUH_20101119_¹Ú¼ºÈ£_end submit("TRMRF00702"); // KNUH_20101119_¹Ú¼ºÈ£_start grd_ocrlist.rebuild(); // KNUH_20101119_¹Ú¼ºÈ£_end model.refresh(); } function fSelectFormHist() { if(!isDataCell()) return; iRow = grd_formhist.row; if(iRow < 1){ return; } model.copyNode("/root/main/newform", "/root/main/formhist[" + iRow + "]"); if(parseInt(model.getValue("/root/main/newform/formtodt")) - parseInt(model.getValue("/root/main/newform/formfromdt")) > 0) model.setValue("/root/temp/valiyn", "Y"); else model.setValue("/root/temp/valiyn", "N"); var formcd = model.getValue("/root/main/newform/formcd"); model.makeNode("/root/send/reqdata/reqdata"); model.makeNode("/root/send/reqdata/reqflag"); model.makeNode("/root/send/reqdata/reqfromdt"); model.setValue("/root/send/reqdata/reqdata", formcd); model.setValue("/root/send/reqdata/reqflag", "formcd"); model.setValue("/root/send/reqdata/reqfromdt", model.getValue("/root/main/newform/formfromdt")); if(model.getValue("/root/main/newform/formprogflag") == "OCR"){ submit("TRMRF00704"); } model.refresh(); fSetCtrlDisabled(true, "U"); } /** * @desc : È­¸éÃʱâÈ­ * @ root/init/today, time¿¡ ÇöÀç ³¯Â¥¿Í ½Ã°£ ¼³Á¤ * @ Ãʱâ È­¸éÀÇ ¹øÆ° ºñȰ¼ºÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ model.setFocus("ipt_srchdata"); //model.setValue("/root/main/newform/formfromdt", getDate()); model.setValue("/root/main/newform/formfromdt", getCurrentDate() + getCurrentTime()); fBackupNewFormData(); fSetFormUsge(); grd_ocrlist.removeRow(); grd_ocrlist.colHidden(3) = true; grd_ocrlist.colHidden(4) = true; grd_formhist.colHidden(25) = true; grp_mngtocr.attribute("left") = "820px"; grp_mngtocr.attribute("top") = "60px"; btn_ocrwindow.attribute("visibility") = "hidden"; chk_ocrflag.disabled = true; cmb_formbizcls.disabled = true; cmb_formtypecls.disabled = true; cmb_ocrtagprntyn.disabled = true; textarea1.disabled = true; cmb_langflag.disabled = true; cmb_reclistviewyn.disabled = true; // ¿¹Áø¼­½Ä Ãß°¡ (ÄÞº¸) cmb_foctsnwyn.disabled = true; // °øÅë±â·Ï¿©ºÎ cmb_mainyn.disabled = true; // ´ë»ó¼­½ÄÄÚµå ipt_srcformcd.disabled = true; submit("TRMRF00706"); zbcfGetCodeList( new Array("M0534"), new Array("/root/init/M0534list") ); /** * ¼öÁ¤ : 2009.09.15 ¾ÈÄ¡¿ø TASK-2897 * ³»¿ë : ¼­½Ä°ü¸®È­¸é¿¡¼­ ¼­½ÄÁ¶È¸Á¶°ÇÀ¸·Î ±â°üÄÚµåÃß°¡ */ /* 2010.05.28, ÁÖÈñ°æ , ±â°üº° ¼­½Ä »ç¿ëÀÌ·ÂÀ» º¼ ¶§ ±â°üº°·Î Á¶È¸°¡´ÉÇÏ¿©¾ß Çϵµ·Ï ÁÖ¼®Ã³¸® if (getUserInfo("posinstcd") == "001" && getUserInfo("posdeptcd") == "4130700000") { cmb_cond_instcd.attribute("visibility") = "visible"; } else { cmb_cond_instcd.attribute("visibility") = "hidden"; } */ model.setValue("/root/main/condition/reqinstcd", getUserInfo("dutplceinstcd")); model.refresh(); } function fBackupNewFormData() { copyNode(model, model, "/root/temp/newform", "/root/main/newform"); } function fRestoreNewFormData() { copyNode(model, model, "/root/main/newform", "/root/temp/newform"); model.refresh(); } /** * @desc : ¼­½ÄºÐ·ùÄڵ带 mainÈ­¸é¿¡ ¼³Á¤ÇÑ´Ù * * @param : ±×¸®µå id (grdID) * @return : * @--------------------------------------------------- */ function fSetFormCls(){ /*var param = getParameter("pathnm"); var param2 = getParameter("pathnm", 2); var formclsnm = param.split('.'); var formclscd = param2.split('.'); model.setValue("/root/main/newform/formclsnm" , formclsnm[0]); model.setValue("/root/main/newform/formclsnm2", formclsnm[1]); model.setValue("/root/main/newform/formclsnm3", formclsnm[2]); model.setValue("/root/main/newform/formclsnm4", formclsnm[3]); model.setValue("/root/main/newform/formclscd" , formclscd[0]); model.setValue("/root/main/newform/formclscd2", formclscd[1]); model.setValue("/root/main/newform/formclscd3", formclscd[2]); model.setValue("/root/main/newform/formclscd4", formclscd[3]); model.refresh();*/ } /** * @desc : Grid ÀúÀå ÈÄ È­¸éÀ» clear * * @param : ±×¸®µå id (grdID) * @return : * @--------------------------------------------------- */ function fClrGrdStatus(grdID){ var totRow = grdID.rows; for(var i = grdID.fixedRows; i < totRow; i++){ var statusflag = grdID.rowstatus(i); if(statusflag == 1 || statusflag == 2){ grdID.rowstatus(i) = 0; }else if(statusflag == 4){ grdID.deleteItem(i); } } } /** * @desc : ¼­½ÄºÐ·ù ÆË¾÷â Open * * @param : * @return : * @--------------------------------------------------- */ function fOpenFormClsWnd(){ var xpos = event.screenX + 100; var ypos = event.screenY - 500; var scnNo; if(xpos > 1000){ scnNo = 2; }else{ scnNo = 1; } modal("SPMRF00701_¼­½ÄºÐ·ù", scnNo, xpos, ypos ); fSetFormCls(); } function fCreateForm() { model.resetInstanceNode("/root/main/newform"); model.removeNodeset("/root/main/formhist"); model.makeValue("/root/main/newform/formstatus", "0"); // ½Å±Ô ¼­½ÄÀÛ¼º // 2009.04.14 // À̰æÈñ // ½Å±Ô ¼­½ÄÀÇ °æ¿ì ½ÃÀÛÀÏÀÚ´Â ¹«Á¶°Ç "ÀÏÀÚ" + "00:00.00" À¸·Î ÇÑ´Ù. //model.makeValue("/root/main/newform/formfromdt", getCurrentDate() + getCurrentTime()); model.makeValue("/root/main/newform/formfromdt", getCurrentDate() + "000000"); model.makeValue("/root/main/newform/formtodt", "99991231" + getCurrentTime()); model.makeValue("/root/main/newform/formchosflag", "C"); model.makeValue("/root/main/newform/formkind", "C"); model.makeValue("/root/main/newform/degnappyn", "Y"); model.makeValue("/root/main/newform/userconfigyn", "N"); // UserConfigYN Ä÷³ model.makeValue("/root/main/newform/recreflockappyn", "N"); model.makeValue("/root/main/newform/sortno", "0"); model.makeValue("/root/main/newform/reclistviewyn", "Y"); model.makeValue("/root/main/newform/langflag", "KO"); // ¿¹Áø¼­½Ä ³ëµå Ãß°¡ model.makeValue("/root/main/newform/foctsnwyn", "N"); // mainYN ±â·Ï ³ëµå Ãß°¡ model.makeValue("/root/main/newform/mainyn", "N"); // print_only ³ëµå Ãß°¡ model.makeValue("/root/main/newform/print_only", "N"); // µðÀÚÀÎ ¿Ï·á ³ëµå Ãß°¡ model.makeValue("/root/main/newform/degncmpltyn", "-"); // certuseyn ³ëµå Ãß°¡ model.makeValue("/root/main/newform/certuseyn", "N"); fSetCtrlDisabled(false); model.setFocus("ipt_formnm"); chk_ocrflag.deselect(0); btn_ocrwindow.attribute("visibility") = "hidden"; cmb_formuseflag.select(0); cmb_progflag.select(0); model.removeNodeset("/root/main/ocrinfo"); model.removeNodeset("/root/main/ocrreview"); model.refresh(); } function fModifyForm() { if(model.getValue("/root/main/newform/formcd") == ""){ messageBox("¼öÁ¤ÇÒ ¼­½ÄÀÌ", "I004"); return; } model.makeValue("/root/main/newform/oldformfromdt", model.getValue("/root/main/newform/formfromdt")); model.makeValue("/root/main/newform/oldformtodt", model.getValue("/root/main/newform/formtodt")); // 2009.04.14 // À̰æÈñ // ¿¹¸¦ µé¾î 4/1 µî·ÏÇÑ ¼­½ÄÀÌ ÀÖÀ» °æ¿ì 4/4 ¿¡ ÇØ´ç ¼­½ÄÀ» ¼öÁ¤ÇÏ¸é ¼­½ÄÀÇ Fromdt °¡ ÇöÀçÀÏÀÚ·Î ¼öÁ¤µÇ¾î // ±â°üº° ½ÃÀÛÀÏÀÚº¸´Ù ¼­½ÄÀÇ ½ÃÀÛÀÏÀÚ°¡ µÚ¿¡ À§Ä¡ÇÏ´Â ¹®Á¦°¡ »ý±è. //model.makeValue("/root/main/newform/formfromdt", getCurrentDate() + getCurrentTime()); model.makeValue("/root/main/newform/formfromdt", model.getValue("/root/main/newform/formfromdt")); model.makeValue("/root/main/newform/formstatus", "1"); // ¼öÁ¤¸ðµå »óÅ·Πº¯°æ fSetCtrlDisabled(false, "U"); model.setFocus("ipt_formnm"); model.refresh(); } function fSaveForm() { var status = model.getValue("/root/main/newform/formstatus"); var chk_formuseflag = model.getValue("/root/main/newform/formuseflag"); var chk_formdeptnm = model.getValue("/root/main/newform/formdeptnm"); var chk_formusernm = model.getValue("/root/main/newform/formusernm"); var chk_formnm = model.getValue("/root/main/newform/formnm"); var chk_ipt_srcformcd = model.getValue("/root/main/newform/srcformcd"); if(status ==""){ messageBox("ÀúÀåÇÒ ¼­½ÄÀÌ", "I004"); return; } if ((chk_formuseflag == "D") && (chk_formdeptnm == "")){ messageBox("¼­½Ä»ç¿ëºÎ¼­¸¦", "C001"); return; } else if((chk_formuseflag == "I") && (chk_formdeptnm == "") && (chk_formusernm == "")){ messageBox("¼­½Ä»ç¿ëºÎ¼­¿Í ¼­½Ä»ç¿ëÀÚ¸¦", "C001"); return; }else if((chk_formuseflag == "I") && (chk_formdeptnm != "") && (chk_formusernm == "")){ messageBox("¼­½Ä»ç¿ëÀÚ¸¦", "C001"); return; }else if((chk_formuseflag == "I") && (chk_formdeptnm == "") && (chk_formusernm != "")){ messageBox("¼­½Ä»ç¿ëºÎ¼­¸¦", "C001"); return; }else if(chk_formnm == ""){ messageBox("¼­½Ä¸íĪÀ»", "C001"); return; }else if(chk_ipt_srcformcd == ""){ if(status == 1) { messageBox("±âº»¼­½ÄÄڵ尡 ¾ø½À´Ï´Ù. ±âº»¼­½ÄÄڵ带 ", "C001"); return; } } var struserid = getUserInfo("userid"); model.makeValue("/root/main/newform/userid", struserid); if (model.getValue("/root/main/newform/formprogflag") == "OCR") { if(model.getValue("/root/main/ocrinfo/ocrfilenm") == ""){ messageBox("OCR À̹ÌÁö¸¦", "C001"); return; } if(model.getValue("/root/main/newform/formbizcls") == ""){ messageBox("OCR ¾÷¹«ºÐ·ù Á¤º¸¸¦", "C001"); return; } if(model.getValue("/root/main/newform/formtypecls") == ""){ messageBox("OCR ºÐ·ù Á¤º¸¸¦", "C001"); return; } if(model.getValue("/root/main/newform/ocrtagprntyn") == ""){ messageBox("OCR Tag Ãâ·Â¿©ºÎ¸¦", "C001"); return; } } if(status == 1) { var formfromdt = model.getValue("/root/main/newform/formfromdt"); var currentDateTime = getCurrentDate() + getCurrentTime(); if( (parseInt(formfromdt) - parseInt(currentDateTime)) > 0) { messageBox("¹Ì·¡¼­½ÄÀÇ °æ¿ì´Â º¯°æÀ̷¾øÀÌ ÀúÀå", "I008"); } } //2009.03.11 °­ÁöÈÆ ¼öÁ¤ //º¯°æÀÌ·ÂÀ» ³²±âÁö ¾Ê°í Update. // formstatus: 1 ¼öÁ¤¸ðµå if(model.getValue("/root/main/newform/formstatus") == "1"){ var ret = messageBox("º¯°æ ÀÌ·ÂÀ» ÀúÀå", "S001"); // 2009.04.23 À̰æÈñ // OCR ¼­½ÄÀ̸鼭 OCRÀ̹ÌÁö º¯°æ¾øÀÌ ¼­½Ä³»¿ë¸¸ º¯°æÇÏ´Â °æ¿ì // OCR À̹ÌÁö »õ·Î µî·Ï¾øÀÌ ¼­½Ä ³»¿ë¸¸ ¾÷µ¥ÀÌÆ®ÇÔ if (model.getValue("/root/main/newform/formprogflag") == "OCR") { if(ret == "7") model.setValue("/root/main/newform/formstatus", "4"); } if(ret == "6"){ model.removenode("/root/main/newform/histsaveyn"); model.makeValue("/root/main/newform/histsaveyn", "Y"); } else if(ret == "7"){ model.removenode("/root/main/newform/histsaveyn"); model.makeValue("/root/main/newform/histsaveyn", "N"); } else{ return; } } var strposinstcd = getUserInfo("dutplceinstcd"); model.makeValue("/root/main/newform/instcd", strposinstcd); copyNodeset("/root/main/newform", "/root/main/ocrinfo", "append"); //model.setValue("/root/main/newform/formfromdt", model.getValue("/root/main/newform/formfromdt") + getCurrentTime()); //model.setValue("/root/main/newform/formtodt", model.getValue("/root/main/newform/formtodt") + "235959"); model.removeNodeset("/root/send/savedata"); copyNode(model, model, "/root/send/savedata", "/root/main/newform"); copyNodeset("/root/send/savedata", "/root/main/ocrinfo", "append"); model.removeNodeset("/root/main/formlist"); model.removeNodeset("/root/main/formhist"); //grd_formlist.rebuild(); var valiyn = model.getValue("/root/temp/valiyn"); if(valiyn == 'N') // ¼­½Ä¹«È¿È­ { model.removeNodeset("/root/send/savedata"); copyNode(model, model, "/root/send/savedata", "/root/main/newform"); // ¼­½ÄÀ» »õ·Î µî·ÏÇϵµ·Ï º¯°æ model.setValue("/root/send/savedata/formstatus", '3'); model.setValue("/root/temp/valiyn", "Y"); } submit("TXMRF00701"); //model.makeValue("/root/main/newform/formstatus", ""); fRestoreNewFormData(); fSetCtrlDisabled(true, "U"); } function fCallClassesInfo() { model.removeNodeset("/root/send"); model.makeValue("/root/send/paramindx",""); model.setValue("/root/send/paramindx", model.getValue("/root/temp/condition/indxflag")); setParameter("indxflag","F"); modal("SPMRF02100", 1,10, 10, "SPMRF02100", "/root/send", "/root/temp/condition/getdata"); var child = "SPMRF02100"; if(child != null) { //var valindxnm = getParameter("valindxnm"); var depthnm1 = getParameter("depthnm1"); var depthnm2 = getParameter("depthnm2"); var depthnm3 = getParameter("depthnm3"); var depthnm4 = getParameter("depthnm4"); var depthnm5 = getParameter("depthnm5"); var indxcd = getParameter("indexcode"); var pathcd = getParameter("pathcd"); //model.setValue("/root/main/imginfo/imgindxnm", imgindxnm); model.makeValue("/root/main/newform/depthnm1", depthnm1); model.makeValue("/root/main/newform/depthnm2", depthnm2); model.makeValue("/root/main/newform/depthnm3", depthnm3); model.makeValue("/root/main/newform/depthnm4", depthnm4); model.makeValue("/root/main/newform/depthnm5", depthnm5); model.makeValue("/root/main/newform/formclsseq", indxcd); model.makeValue("/root/main/newform/formlevlcd", pathcd); model.refresh(); if(depthnm1 == "Áø·á¼­½Ä") // ´ëºÐ·ù°¡ Áø·á¼­½ÄÀÎ °æ¿ì { if(depthnm2 == "°øÅë¼­½Ä") // Áߺзù°¡ °øÅë¼­½ÄÀÎ °æ¿ì { model.setValue("/root/main/newform/mainyn", "Y"); // °øÅë¼­½Ä Y model.setValue("/root/main/newform/foctsnwyn", "N"); // ¿¹Áø¼­½Ä N } else if(depthnm2 == "¿¹Áø±â·Ï") // Áߺзù°¡ ¿¹Áø±â·ÏÀÎ °æ¿ì { model.setValue("/root/main/newform/mainyn", "N"); // °øÅë¼­½Ä N model.setValue("/root/main/newform/foctsnwyn", "Y"); // ¿¹Áø¼­½Ä Y } else { model.setValue("/root/main/newform/mainyn", "N"); // °øÅë¼­½Ä N model.setValue("/root/main/newform/foctsnwyn", "N"); // ¿¹Áø¼­½Ä N } } else if(depthnm1 == "Á¦Áõ¸í") // ´ëºÐ·ù°¡ Á¦Áõ¸íÀÎ °æ¿ì { model.setValue("/root/main/newform/mainyn", "N"); // °øÅë¼­½Ä N model.setValue("/root/main/newform/foctsnwyn", "N"); // ¿¹Áø¼­½Ä N } else // ±âŸ ¼­½ÄÀÎ °æ¿ì { model.setValue("/root/main/newform/mainyn", "N"); // °øÅë¼­½Ä N model.setValue("/root/main/newform/foctsnwyn", "N"); // ¿¹Áø¼­½Ä N } } model.refresh(); } function fCallDeptInfo(){ var search_condition = "deptcd"; var search_term = ""; var receive_deptcd_path = "/root/main/newform/formdeptcd"; var receive_deptnm_path = "/root/main/newform/formdeptnm"; var standard_yn = null; var ord_deptflag = null; var dutinstcd = getUserInfo("dutplceinstcd"); //zbcfOpenInstDeptCodeList(search_condition, search_term, receive_deptcd_path, receive_deptnm_path, standard_yn, ord_deptflag, new Array("deptcd", "depthngnm")); //zbcfOpenInstDeptCodeList(search_condition, search_term, receive_deptcd_path, receive_deptnm_path, 'orduseyn', ord_deptflag, new Array("deptcd", "depthngnm")); //zbcfOpenAssignedInstDeptCodeList("012", search_condition, search_term, receive_deptcd_path, receive_deptnm_path, 'orduseyn', ord_deptflag, new Array("deptcd", "depthngnm")); zbcfOpenAssignedInstDeptCodeList(dutinstcd, search_condition, search_term, receive_deptcd_path, receive_deptnm_path, standard_yn, ord_deptflag, new Array("deptcd", "depthngnm")); } function fSrchForm() { var formnm = ""; var reqflag = model.getValue("/root/main/condition/reqflag"); if(reqflag == "formcd"){ var sCode = model.getValue("/root/main/condition/reqdata"); var sTmp = ""; var iTmp = 0; // formÄÚµå ÀԷ½à ÀÚ¸´¼ö ä¿öÁØ´Ù var iCodeLength = sCode.length; if(iCodeLength ==0){ messageBox(ipt_srchdata.label +" ¼­½ÄÄÚµå Á¶°ÇÀ»", "C001"); return; } else if(iCodeLength > 10){ messageBox(ipt_srchdata.label +" ¼­½ÄÄÚµå ÀÚ¸®¼ö¸¦ ¿Ã¹Ù¸£°Ô ", "C001"); return; } var temp = 10 - iCodeLength; for(var i = 1; i <= temp; i++){ sTmp += "0"; } sTmp = sTmp + sCode; model.setValue("/root/main/condition/reqdata",sTmp); } formnm = model.getValue("/root/main/condition/reqdata"); // À¯È¿ ¹× Àüü Á¶È¸½Ã °Ë»ö °ªÀÌ ¾ø´Â °æ¿ì °Ë»ö°ª ¿äûÀ» Çϵµ·Ï ¼öÁ¤ if(formnm == "") { messageBox(ipt_srchdata.label +" Á¶È¸ÇÒ ¼­½ÄÀ» ", "C001"); return; } model.setValue("/root/main/condition/reqdata",formnm.toUpperCase()); // ¼­½Ä°ü¸®¿¡¼­ º¸³½ Äõ¸®¶ó´Â°ÍÀ» ¸í½Ã model.makeValue("/root/main/condition/reqsrch", "formmaster"); model.makeNode("/root/send/reqdata"); model.copyNode("/root/send/reqdata", "/root/main/condition"); submit("TRMRF00701"); // ¼­½ÄµðÀÚÀÎ »ý¼º¾ÈÇÑ °ÍµéÀ» »ö»óÀ¸·Î Ç¥½Ã //fClassificationForm(); // "/root/temp/newform"³ëµå¸¦ "/root/main/newform"·Î º¹»çÇØµÒ fRestoreNewFormData(); } function fSetFormUsge() { var chk_formuseflag = model.getValue("/root/main/newform/formuseflag"); if (chk_formuseflag == "D"){ // ºÎ¼­ btn_srchdept.disabled = "false"; btn_srchuser.disabled = "true"; } else if(chk_formuseflag == "I"){ // °³ÀÎ btn_srchdept.disabled = "false"; btn_srchuser.disabled = "false"; }else if(chk_formuseflag == "C"){ // °øÅë btn_srchdept.disabled = "true"; btn_srchuser.disabled = "true"; model.setValue("/root/main/newform/formdeptcd", ""); model.setValue("/root/main/newform/formdeptnm", ""); } model.refresh(); } function fClassificationForm() { // ¼­½ÄÀ» »ý¼ºÇÏÁö ¾ÊÀº °ÍµéÀ» »ö»óÀ¸·Î ºÐ·ùÇÔ. try { /* // °úº°¼­½Ä, °øÅë¼­½Ä var srchformlist = model.instances(0).selectNodes("/root/main/formlist[formprogflag != 'OCR' and formprogflag != 'PROF(CODE)' and formprogflag != 'PROF']"); //var srchformlist = model.instances(0).selectNodes("/root/main/formlist[formprogflag = '-' or (formprogflag = 'PROG' and formcd = srcformcd and formkind = 'C' and formprognm != '-']"); var totalRows = grd_formlist.rows - 1; if(totalRows < 1){ return; } var forminfo = ""; for(var idx = 0 ; idx < totalRows; idx++) { forminfo = srchformlist.item(idx); if(forminfo != null) { var formcd = forminfo.selectSingleNode("formcd").text; if(forminfo.selectSingleNode("formdegnseq").text == "" || forminfo.selectSingleNode("formdegnseq").text == "0") { grd_formlist.rowstyle(idx + 1, "data", "background-color") = "#FFCCFF"; } } } grd_formlist.refresh(); */ } catch(e) { return; } } function fSetFormUse() { if(fIsFutureForm() == true) { model.removeNodeset("/root/send/grdsaverslt"); model.makeValue("/root/send/formuse/reqlist", getGridUpdateData(grd_formlist)); //model.makeValue("/root/send/formuse", grd_formlist.getUpdateData()); model.makeValue("/root/send/formuse/reqinstcd", model.getValue("/root/send/reqdata/reqinstcd")); submit("TXMRF00702"); model.refresh(); } fSrchForm(); } function fIsFutureForm() { var totalRows = grd_formlist.rows - 1; if(totalRows < 1){ return; } var srchformlist = model.instances(0).selectNodes("/root/main/formlist"); var forminfo = ""; for(var idx = 0 ; idx < totalRows; idx++) { forminfo = srchformlist.item(idx); if(forminfo != null) { var formcd = forminfo.selectSingleNode("formcd").text; var formfromdt = forminfo.selectSingleNode("formfromdt").text; var currentDateTime = getCurrentDate() + getCurrentTime(); if( (parseInt(formfromdt) - parseInt(currentDateTime)) > 0) { messageBox("¹Ì·¡ÀÏÀÚÀÇ ¼­½ÄÀº »ç¿ë¿©ºÎ¸¦ ÀúÀå", "E001"); return false; } } } return true; } function fPreviewFormdegn() { var row = grd_formlist.row; var formcd = model.getValue("/root/main/formlist["+row+"]/formcd"); var formprogflag = model.getValue("/root/main/formlist["+row+"]/formprogflag"); var formxrwyn = model.getValue("/root/main/formlist["+row+"]/formxrwyn"); var formdegnseq = model.getValue("/root/main/formlist["+row+"]/formdegnseq"); model.copyNode("/root/main/forminfo/formmast", "/root/main/formlist["+row+"]"); if(formprogflag == "MAIN" || formprogflag == "PROF" || formprogflag == "-" || formprogflag == "PROG") { if(formxrwyn == "Y" && formdegnseq != "") { setParameter("SPMRF05500_formcd", formcd); modal("SPMRF05500", 1,10, 10, "SPMRF05500", "", ""); //open("SPMRF05500", "2", 0, 0, "SPMRF05500", "", ""); } else messageBox("ÇØ´ç ¼­½ÄÀº ÀúÀåµÇÁö", "E007"); } else { messageBox("ÇØ´ç ¼­½ÄÀº " + formprogflag + " À¯Çü ¼­½Ä", "I009"); return; } } function fOcrLoad(url){ f_View.ViewMode = 0; f_View.pageremove(0,0); f_View.pageappend(url,0,0); f_View.fitmode = 3; f_View.pagecurrent = 1; f_View.AutoRefresh = true; } function fOcrLoadFile(filenm){ var ocrfilenm ="C:\\OCRMngt_ImgeFile\\"+filenm; f_View.ViewMode = 0; f_View.pageremove(0,0); f_View.pageappend(ocrfilenm,0,0); f_View.fitmode = 3; f_View.pagecurrent = 1; f_View.AutoRefresh = true; } function fOcrLoadTotal(fso, filenm, newCtrObj, filepath) { f_View.pageremove(0,0); f_View.pageappend(filenm,0,0); var basename; var extname; var arrayFile = ""; basename = fso.getbasename(filenm); extname = fso.getextensionname(filenm); for(var page = 1; page <= f_View.pagetotal ; page++){ f_View.pagecurrent = page; f_View.filesavecreate(filepath + "/temp/" + basename + "-" + page + "." + extname ,-1); Filenm = (filepath + "/temp/" + basename + "-" + page + "." + extname); grd_ocrlist.addRow(false,false); grd_ocrlist.valueMatrix(grd_ocrlist.row, grd_ocrlist.colRef("ocrfilenm")) = basename + "-" + page + "." + extname; grd_ocrlist.valueMatrix(grd_ocrlist.row, grd_ocrlist.colRef("ocrdata")) = loadGrd(Filenm); grd_ocrlist.valueMatrix(grd_ocrlist.row, grd_ocrlist.colRef("filepath")) = filepath; setImageRefInstance("/root/main/ocrinfo["+grd_ocrlist.row+"]/ocrdata"); } } function loadGrd(Filenm){ img.src = Filenm; return img.getBase64data() } function fDelFile(haveFile, fso){ currFile = new Enumerator(haveFile.Files); for( ; !currFile.atEnd(); currFile.moveNext()){ fso.DeleteFile(currFile.item().path, true); } }