/* --------------------------------------------------------------------- SMRSD07200_Áø´Ü°Ë»ç°ú ó¹æÁý°è Ãâ·Â(°æºÏ´ë).xrw (SMRSD07200.xfm - JScript ) - Version : 1) : Ver.1.00.01 : Create By Chungpd. : 2010.12.08 ---------------------------------------------------------------------- */ var vProgramCls = "SMRSD07100"; // var vGoodReqPath = "/root/main/list/goodreq/goodreqlist"; var xAuth = !(checkAuth("X")); var pAuth = !(checkAuth("P")); var DataPath = "/root/main/RscmggbnEmpData"; var MainPath = "/root/main/RscmggbnLists/rscmggbnlist"; var ListsPath = "/root/main/RscmggbnEmpLists"; var ListPath = "/root/main/RscmggbnEmpLists/rscmggbnemplist"; var HidePath = "/root/WorkData/HideData"; var TreePath = "/root/main/RscmgubnLists/TreeList"; var WorkPath = "/root/init/WorkInit"; var CompPath = "/root/init/CompareInit"; var TreeSendPath = "/root/send/SearchTree"; // -------------------------------------------------- // TreeÁ¤º¸ °¡Á®¿À±â // -------------------------------------------------- function fInit() { // È­¸é ControlÀ» ÃʱâÈ­ÇÑ´Ù fInitialize(); return; } // -------------------------------------------------------------- // È­¸é open½Ã¿Í ÃʱâÈ­ ¹öư Ŭ¸¯½Ã È­¸é ÃʱâÈ­ ±â´ÉÀ» ¼öÇàÇÑ´Ù. // -------------------------------------------------------------- function fInitialize() { model.setValue(opt_instcd.attribute("ref") , getUserInfo("dutplceinstcd")); // ±â°üÄÚµå model.setValue(opt_instcdnm.attribute("ref") , getUserInfo("dutplceinstnm")); // ±â°üÄÚµå¸í // model.setValue(ipt_prcpdeptcd.attribute("ref"), getUserInfo("dutplcecd")); // ½ÃÇàºÎ¼­ // model.setValue(ipt_prcpdeptnm.attribute("ref"), getUserInfo("dutplcenm")); // ½ÃÇàºÎ¼­¸í var curdate = getCurrentDate(); var cvtdate = curdate.toDate("YYYYMMDD"); model.setValue(ipt_prcpdd.attribute("ref") , curdate); model.setValue(ipt_prcpdd2.attribute("ref"), curdate); model.setValue(rdo_sumflag.attribute("ref") , "Y"); //model.setValue(rdo_ioflag.attribute("ref") , ""); //model.setValue(rdo_prntmthd.attribute("ref") , "G"); model.removeNodeset("/root/main/list/prcpgoodcase/prcpgoodcaselist"); model.removeNodeset("/root/main/list/prcppatcase/prcppatcaselist"); //ipt_prcpdd.dispatch("xforms-value-changed"); model.refresh(); } function fDataSearchTree() { // if (fCheckRetrieveData(false) == false) return; submit("TRRSD07103"); trv_setcode.rebuild(); } // ó¹æÀü´Þ¹°Ç°³»¿ªÁ¶È¸ function fDataSearchDetail(pIdx) { var rPath = "/root/send/SearchTree"; var dPath = "/root/send/prcppatcaseinfo"; var tPath = "/root/main/PrcpGoodTrees/TreeList"; var vCaption = " ó¹æÀü´Þ¹°Ç°"; // if (fCheckRetrieveData(false) == false)return; // ÀÔ·ÂÇ׸ñ Check var Idx = pIdx + 1; var sDepth = model.getValue(tPath +"["+Idx+"]/depth" ); var vCodeCd = model.getValue(tPath +"["+Idx+"]/codecd" ); var vCodeNm = model.getValue(tPath +"["+Idx+"]/codenm" ); var vBaseCd = model.getValue(tPath +"["+Idx+"]/basecode"); var Tree2 = trv_setcode.item(pIdx); //var ioflag = model.getValue(rdo_ioflag.attribute("ref")); //cpt_disp.value = ""; //cpt_disp.refresh(); if (vCodeCd == "") return; model.setValue(dPath + "/instcd" , model.getValue(rPath + "/instcd" )); // 01 ±â°üÄÚµå model.setValue(dPath + "/prcpdd" , model.getValue(rPath + "/prcpdd" )); // 02 ó¹æÀÏÀÚ model.setValue(dPath + "/prcpdd2" , model.getValue(rPath + "/prcpdd2" )); // 02 ó¹æÀÏÀÚ model.setValue(dPath + "/sumflag" , model.getValue(rPath + "/sumflag" )); // 04 Áý°è¿©ºÎ model.setValue(dPath + "/reqflag" , model.getValue(rPath + "/reqflag" )); // 05 û±¸±¸ºÐ model.setValue(dPath + "/reqdeptcd" , "" ); // 06 ó¹æºÎ¼­ model.setValue(dPath + "/reqprid" , model.getValue(rPath + "/reqprid" )); // 07 û±¸ÁÖ±â model.setValue(dPath + "/prcpdeptcd" , "" ); // 08 ½ÃÇàºÎ¼­ model.setValue(dPath + "/goodcd" , model.getValue(rPath + "/goodcd" )); // 09 ¹°Ç°ÄÚµå //model.setValue(dPath + "/ioflag" , model.getValue(rPath + "/ioflag" )); // 10 ÀԿܱ¸ºÐ model.setValue(dPath + "/deptgr" , "" ); // 11 ºÎ¼­±×·ì model.setValue(dPath + "/pid" , model.getValue(rPath + "/pid" )); // 12 ȯÀÚ¹øÈ£ model.setValue(dPath + "/patnm" , model.getValue(rPath + "/patnm" )); // 13 ȯÀÚ¸í model.setValue(dPath + "/purcflag" , model.getValue(rPath + "/purcflag" )); // 14 ±¸¸Å±¸ºÐ model.setValue(dPath + "/prodcmpynm" , model.getValue(rPath + "/prodcmpynm" )); // 15 Á¦Á¶È¸»ç¸í model.setValue(dPath + "/suplplcecdnm", model.getValue(rPath + "/suplplcecdnm" )); // 16 ÁÖ°Å·¡Ã³¸í model.setValue(dPath + "/suppcustnm" , model.getValue(rPath + "/suppcustnm" )); // 17 º¸Á¶°Å·¡Ã³¸í model.setValue(dPath + "/prntmthd" , 'G' ); // 18 Ãâ·ÂÇü½Ä model.setValue(dPath + "/sumcnt" , model.getValue(rPath + "/sumcnt" )); // 19 Áý°èȽ¼ö // ¼±ºÒÃâ Á¶È¸Á¶°Ç Ãß°¡ ÀÌâ·Ï model.makeValue(dPath + "/querycls" , model.getValue("/root/send/SearchTree/querycls")); // 19 ¶óµð¿À¹Ú½º ¼±ºÒÃâÄÚµå // ¹°·ùâ°í Á¶È¸Á¶°Ç Ãß°¡ model.setValue(dPath + "/wareflag" , model.getValue(rPath + "/wareflag" )); // â°í±¸ºÐ(¹°·ùâ°í) model.setValue(dPath + "/scrnid" , "SMRSD07200" ); // â°í±¸ºÐ(¹°·ùâ°í) var vCls = parseInt(rdo_viewcls.value+sDepth); switch(vCls) { case 01 : vCaption = " :: Àüü" ; break; case 02 : model.setValue(dPath + "/prcpdeptcd" , vCodeCd ); vCaption = "½ÃÇàºÎ¼­ : "+vCodeCd + " - " + vCodeNm; // grd_goodreq.colwidth(3) = "74"; break; case 11 : model.setValue(dPath + "/reqdeptcd" , vCodeCd); vCaption = "ó¹æºÎ¼­ : "+ vCodeCd + " - " + vCodeNm; // grd_goodreq.colwidth(3) = "74"; break; case 12 : model.setValue(dPath + "/prcpdeptcd" , vCodeCd ); vCode = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codecd" ); vName = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codenm" ); model.setValue(dPath + "/reqdeptcd" , vCode ); vCaption = "ó¹æºÎ¼­ : "+vCode + " - " + vName + " >> ½ÃÇàºÎ¼­ : "+vCodeCd+ " - "+vCodeNm; // grd_goodreq.colwidth(3) = "0"; break; case 21 : model.setValue(dPath + "/prcpdeptcd" , vCodeCd ); vCaption = "½ÃÇàºÎ¼­ : "+vCodeCd + " - " + vCodeNm; // grd_goodreq.colwidth(3) = "74"; break; case 22 : model.setValue(dPath + "/reqdeptcd" , vCodeCd); vCode = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codecd" ); vName = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codenm" ); model.setValue(dPath + "/prcpdeptcd" , vCode ); vCaption = "½ÃÇàºÎ¼­ : "+vCode + " - " + vName + " >> ó¹æºÎ¼­ : "+vCodeCd+ " - "+vCodeNm ; break; case 31 : model.setValue(dPath + "/prcpdeptcd" , vCodeCd ); vCaption = "½ÃÇàºÎ¼­ : "+vCodeCd + " - " + vCodeNm; // grd_goodreq.colwidth(3) = "74"; break; case 32 : model.setValue(dPath + "/goodcd" , vCodeCd); vCode = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codecd" ); vName = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codenm" ); model.setValue(dPath + "/prcpdeptcd" , vCode ); vCaption = "½ÃÇàºÎ¼­ : "+vCode + " - " + vName + " >> ¹°Ç°ÄÚµå : "+vCodeCd+ " - "+vCodeNm ; } // ////cpt_disp.value = vCaption; // + " ó¹æÀü´Þ¹°Ç°"; if (model.getValue(dPath + "/prntmthd") == "P"){ submit("TRRSD07101"); //ȯÀÚº° Áý°è³»¿ª }else{ submit("TRRSD07102"); //¹°Ç°º° Áý°è³»¿ª } //fGrdiDataValid(); ////cpt_disp.refresh(); } // Á¶È¸ °á°ú Count Setting function fAfterRetrieve() { // case 1 count model.setValue(opt_goodreqcnt.attribute("ref"),(grd_goodreq.rows-grd_goodreq.fixedRows)); model.refresh(); } /*********************************************************** * ¹°Ç° ó¹æ Áý°è¿¡¼­ »ç¿ëÇÑ Script ************************************************************/ // ºÎ¼­ÄÚµå Àоî¿À±â... function fDeptValidationCheck(pData1, pData2, pCodeName) { if (pData1.value.length == 0) { pData2.value = ""; } else { rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptnm","deptnm," + pData1.value,"", pCodeName, pData1, "SPRPZ00200", "",""); } model.refresh(); } /* ------------------------------------------------- */ /* ------End Of List ------------------------------- */ /* -------------------------------------------------- */